Enable strict percpu address space checks
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | x86/kgdb: Use IS_ERR_PCPU() macroarch/ | +1 | 0 replies | |
| 2/6 | compiler.h: Introduce TYPEOF_UNQUAL() macroinclude/ init/ | +16 | 0 replies | |
| 3/6 | percpu: Use TYPEOF_UNQUAL() in variable declarationsarch/ fs/ include/ +5 more | +27 | 0 replies | |
| 4/6 | percpu: Use TYPEOF_UNQUAL() in *_cpu_ptr() accessorsarch/ include/ | +7 | 0 replies | |
| 5/6 | percpu: Repurpose __percpu tag as a named address space qualifierinclude/ include/ | +16 | 0 replies | |
| 6/6 | percpu/x86: Enable strict percpu checks via named AS qualifiersarch/ | +13 | 2 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Nadav Amit |
|---|---|
| 1/6 | |
| 2/6 | |
| 3/6 | |
| 4/6 | |
| 5/6 | |
| 6/6 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] Enable strict percpu address space checks
This patchset enables strict percpu address space checks via x86 named address space qualifiers. Percpu variables are declared in __seg_gs/__seg_fs named AS and kept named AS qualified until they are dereferenced via percpu accessor. This approach enables various compiler checks for cross-namespace variable assignments.
Please note that current version of sparse doesn't know anything about __typeof_unqual__() operator. Avoid the usage of __typeof_unqual__() when sparse checking is active to prevent sparse errors with unknowing keyword.
Uros Bizjak (6):
x86/kgdb: Use IS_ERR_PCPU() macro
compiler.h: Introduce TYPEOF_UNQUAL() macro
percpu: Use TYPEOF_UNQUAL() in variable declarations
percpu: Use TYPEOF_UNQUAL() in *_cpu_ptr() accessors
percpu: Repurpose __percpu tag as a named address space qualifier percpu/x86: Enable strict percpu checks via named AS qualifiers
arch/x86/include/asm/percpu.h | 34 +++++++++++++++++++--------- arch/x86/kernel/kgdb.c | 2 +- fs/bcachefs/util.h | 2 +- include/asm-generic/percpu.h | 41 +++++++++++++++++++++++----------- include/linux/compiler.h | 13 +++++++++++ include/linux/compiler_types.h | 2 +- include/linux/part_stat.h | 2 +- include/linux/percpu-defs.h | 6 ++--- include/net/snmp.h | 5 ++--- init/Kconfig | 3 +++ kernel/locking/percpu-rwsem.c | 2 +- net/mpls/internal.h | 4 ++-- 12 files changed, 80 insertions(+), 36 deletions(-)
Signature · 1 line
2.42.0