[PATCH] Add direct support for Linux kernel __fentry__ patching

Jeff Law law@redhat.com
Thu Sep 25 19:33:00 GMT 2014


On 09/01/14 21:24, Andi Kleen wrote:
>
> Having a nop area at the beginning of each function can be also
> also useful for other things. For example it can be used to patch
> functions at runtime to point to different functions, to do
> binary updates without restarting the program (like ksplice or
> similar)
ISTM the black-hats would love this too...


> gcc/:
>
> 2014-09-01  Andi Kleen  <ak@linux.intel.com>
>
> 	* config/i386/i386.c (x86_print_call_or_nop): New function.
> 	(x86_function_profiler): Support -mnop-mcount and
> 	-mrecord-mcount.
> 	* config/i386/i386.opt (-mnop-mcount, -mrecord-mcount): Add
> 	* doc/invoke.texi: Document -mnop-mcount, -mrecord-mcount
> 	* testsuite/gcc/gcc.target/i386/nop-mcount.c: New file.
> 	* testsuite/gcc/gcc.target/i386/record-mcount.c: New file.
OK.  Please install.



Jeff



More information about the Gcc-patches mailing list