aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorPeter Collingbourne <[email protected]>2022-01-29 13:41:14 -0800
committerLinus Torvalds <[email protected]>2022-01-30 09:56:58 +0200
commit27fe73394a1c6d0b07fa4d95f1bca116d1cc66e9 (patch)
tree1667b65ac52ebb8bc51f6e9d9e9db259220f7fa5 /scripts/gcc-plugins/randomize_layout_plugin.c
parent09c6304e38e440b93a9ebf3f3cf75cd6cb529f91 (diff)
mm, kasan: use compare-exchange operation to set KASAN page tag
It has been reported that the tag setting operation on newly-allocated pages can cause the page flags to be corrupted when performed concurrently with other flag updates as a result of the use of non-atomic operations. Fix the problem by using a compare-exchange loop to update the tag. Link: https://lkml.kernel.org/r/[email protected] Link: https://linux-review.googlesource.com/id/I456b24a2b9067d93968d43b4bb3351c0cec63101 Fixes: 2813b9c02962 ("kasan, mm, arm64: tag non slab memory allocated via pagealloc") Signed-off-by: Peter Collingbourne <[email protected]> Reviewed-by: Andrey Konovalov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions