Commit fc06b852 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

x86/tracing: comment need for atomic nop

The dynamic function tracer relys on the macro P6_NOP5 always being
an atomic NOP. If for some reason it is changed to be two operations
(like a nop2 nop3) it can faults within the kernel when the function
tracer modifies the code.

This patch adds a comment to note that the P6_NOPs are expected to
be atomic. This will hopefully prevent anyone from changing that.
Reported-by: default avatarMathieu Desnoyer <mathieu.desnoyers@polymtl.ca>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 197e2eab
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
6: osp nopl 0x00(%eax,%eax,1) 6: osp nopl 0x00(%eax,%eax,1)
7: nopl 0x00000000(%eax) 7: nopl 0x00000000(%eax)
8: nopl 0x00000000(%eax,%eax,1) 8: nopl 0x00000000(%eax,%eax,1)
Note: All the above are assumed to be a single instruction.
There is kernel code that depends on this.
*/ */
#define P6_NOP1 GENERIC_NOP1 #define P6_NOP1 GENERIC_NOP1
#define P6_NOP2 ".byte 0x66,0x90\n" #define P6_NOP2 ".byte 0x66,0x90\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment