tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Tests requiring MD hooks
On 11.07.2011 18:13, Matt Thomas wrote:
> Would the easiest method be something like:
>
> volatile int a1;
> extern const char mprotect_this[];
> void
> victim(void)
> {
> a1 = 1;
> __insn_barrier();
> __asm volatile(".globl mprotect_this" __ASM_DELIMITER
> "mprotect_this:");
> a1 = 0;
> }
Yeah, I gave the "volatile" approach a try, but reusability is almost
nil. Sooner or later I'll have to copy a payload somewhere for testing
(easiest example: in a stack array), so I am back to my original issue:
generate trivial MD code in pure-C, and have a way to copy it
arbitrarily at any place in memory.
--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost
Home |
Main Index |
Thread Index |
Old Index