diff options
author | Nadav Amit <[email protected]> | 2023-10-04 16:49:43 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2023-10-05 09:01:52 +0200 |
commit | 9a462b9eafa6dda16ea8429b151edb1fb535d744 (patch) | |
tree | 5a124efc314591a8d7aac4fe40dacd1ad21e11c3 /lib/test_fortify/write_overflow-strncpy.c | |
parent | 1ca3683cc6d2c2ce4204df519c4e4730d037905a (diff) |
x86/percpu: Use compiler segment prefix qualifier
Using a segment prefix qualifier is cleaner than using a segment prefix
in the inline assembly, and provides the compiler with more information,
telling it that __seg_gs:[addr] is different than [addr] when it
analyzes data dependencies. It also enables various optimizations that
will be implemented in the next patches.
Use segment prefix qualifiers when they are supported. Unfortunately,
gcc does not provide a way to remove segment qualifiers, which is needed
to use typeof() to create local instances of the per-CPU variable. For
this reason, do not use the segment qualifier for per-CPU variables, and
do casting using the segment qualifier instead.
Uros: Improve compiler support detection and update the patch
to the current mainline.
Signed-off-by: Nadav Amit <[email protected]>
Signed-off-by: Uros Bizjak <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions