Enable strict percpu address space checks
Status from this message: [merged mm-stable] percpu-x86-enable-strict-percpu-checks-via-named-as-qualifiers.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest6 patches 19 repliesApplied 6/6
- v36 patches 7 repliesApplied 6/6
- v2 posting 2/26 patches 3 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 RFC posting 1/2 | 4 patches | 4 replies | Superseded | |
| v1 RFC | 3 patches | 3 replies | Superseded |
Patches in v4 All 6 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | x86/kgdb: Use IS_ERR_PCPU() macroarch/ | +1 | 0 replies | Applied |
| 2/6 | compiler.h: Introduce TYPEOF_UNQUAL() macroinclude/ include/ include/ | +36 | 0 replies | Applied |
| 3/6 | percpu: Use TYPEOF_UNQUAL() in variable declarationsarch/ fs/ include/ +5 more | +27 | 0 replies | Applied |
| 4/6 | percpu: Use TYPEOF_UNQUAL() in *_cpu_ptr() accessorsarch/ include/ | +7 | 0 replies | Applied |
| 5/6 | percpu: Repurpose __percpu tag as a named address space qualifierinclude/ include/ | +14 | 0 replies | Applied |
| 6/6 | percpu/x86: Enable strict percpu checks via named AS qualifiersarch/ | +12 | 19 replies | Applied |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Nadav Amit | Christoph Lameter |
|---|---|---|
| 1/6 | A-b | |
| 2/6 | ||
| 3/6 | A-b | A-b |
| 4/6 | A-b | A-b |
| 5/6 | A-b | |
| 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 v4 0/6] Enable strict percpu address space checks
Enable 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. The proposed patch by Dan Carpenter to implement __typeof_unqual__() handling in sparse is located at:
https://lore.kernel.org/lkml/[email protected]/
v2: - Add comment to remove test for __CHECKER__ once sparse learns
about __typeof_unqual__.
- Add Acked-by: tags.
v3: - Rename __per_cpu_qual to __percpu_qual.
- Add more Acked-by: tags.
v4: - Do not auto-detect compiler support for __typeof_unqual__()
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 | 33 +++++++++++++++++++--------- arch/x86/kernel/kgdb.c | 2 +- fs/bcachefs/util.h | 2 +- include/asm-generic/percpu.h | 39 ++++++++++++++++++++++------------ include/linux/compiler-clang.h | 8 +++++++ include/linux/compiler-gcc.h | 8 +++++++ include/linux/compiler.h | 20 +++++++++++++++++ include/linux/compiler_types.h | 2 +- include/linux/part_stat.h | 2 +- include/linux/percpu-defs.h | 6 +++--- include/net/snmp.h | 5 ++--- kernel/locking/percpu-rwsem.c | 2 +- net/mpls/internal.h | 4 ++-- 13 files changed, 97 insertions(+), 36 deletions(-)
Signature · 1 line
2.42.0