summaryrefslogtreecommitdiff
path: root/samples/kprobes/kprobe_example.c
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2014-11-25 10:01:16 +0100
committerSasha Levin <sasha.levin@oracle.com>2015-04-26 23:02:56 -0400
commit63787890ec2624b97dd499050519781f346458b2 (patch)
tree3c10f0e2a40be6edeb589bb79805e0cbc7848a5e /samples/kprobes/kprobe_example.c
parentb94e91cc2225ea311e6bb8500f492702e319b348 (diff)
kernel: Provide READ_ONCE and ASSIGN_ONCE
[ Upstream commit 230fa253df6352af12ad0a16128760b5cb3f92df ] ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145) Let's provide READ_ONCE/ASSIGN_ONCE that will do all accesses via scalar types as suggested by Linus Torvalds. Accesses larger than the machines word size cannot be guaranteed to be atomic. These macros will use memcpy and emit a build warning. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'samples/kprobes/kprobe_example.c')
0 files changed, 0 insertions, 0 deletions