Skip to contentSkip to conversation

x86/tracing: comment need for atomic nop

tip:tracing/core Mathieu Desnoyers 2 participants 2 messages Sep 12, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mathieu Desnoyers

author Acked-by
#1 lore raw
Quoted 14 lines · * tip-bot for Steven Rostedt ([email protected]) wrote:
Commit-ID:  fc06b8520b3bf9aaeb2e27debe6719c215bd4916
Gitweb:     http://git.kernel.org/tip/fc06b8520b3bf9aaeb2e27debe6719c215bd4916
Author:     Steven Rostedt <[email protected]>
AuthorDate: Thu, 10 Sep 2009 17:22:44 -0400
Committer:  Steven Rostedt <[email protected]>
CommitDate: Thu, 10 Sep 2009 17:22:44 -0400

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.

Quoted 4 lines

This patch adds a comment to note that the P6_NOPs are expected to be atomic. This will hopefully prevent anyone from changing that.

With an added "s" to my last name, that will be good.

Thanks !

Quoted 20 lines
---
 arch/x86/include/asm/nops.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/include/asm/nops.h +2 -0
index ad2668e..6d8723a 100644
@@ -65,6 +65,8 @@
    6: osp nopl 0x00(%eax,%eax,1)
    7: nopl 0x00000000(%eax)
    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_NOP2	".byte 0x66,0x90\n"
Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#2 lore raw
Quoted 15 lines · Mathieu Desnoyers
Quoted 14 lines · * tip-bot for Steven Rostedt ([email protected]) wrote:
Commit-ID:  fc06b8520b3bf9aaeb2e27debe6719c215bd4916
Gitweb:     http://git.kernel.org/tip/fc06b8520b3bf9aaeb2e27debe6719c215bd4916
Author:     Steven Rostedt <[email protected]>
AuthorDate: Thu, 10 Sep 2009 17:22:44 -0400
Committer:  Steven Rostedt <[email protected]>
CommitDate: Thu, 10 Sep 2009 17:22:44 -0400

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.

Quoted 6 lines
Quoted 4 lines

This patch adds a comment to note that the P6_NOPs are expected to be atomic. This will hopefully prevent anyone from changing that.

With an added "s" to my last name, that will be good.

Oops, sorry. I seem to always do that to your name. I was too busy concentrating in getting your email correct (wrote the commit on a different box than my email client) that I didn't notice your name was wrong.

-- Steve

Quoted 6 lines

Thanks !

Quoted 1 line