percpu-use-typeof_unqual-in-_cpu_ptr-accessors.patch removed from -mm tree
The quilt patch titled
Subject: percpu: use TYPEOF_UNQUAL() in *_cpu_ptr() accessors
has been removed from the -mm tree. Its filename was
percpu-use-typeof_unqual-in-_cpu_ptr-accessors.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Uros Bizjak <[email protected]>
Subject: percpu: use TYPEOF_UNQUAL() in *_cpu_ptr() accessors
Date: Mon, 27 Jan 2025 17:05:08 +0100
Use TYPEOF_UNQUAL() macro to declare the return type of *_cpu_ptr() accessors in the generic named address space to avoid access to data from pointer to non-enclosed address space type of errors.
---
arch/x86/include/asm/percpu.h | 8 ++++++-- include/linux/percpu-defs.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)
arch/x86/include/asm/percpu.h renamed from arch/x86/include/asm/percpu.h~percpu-use-typeof_unqual-in-_cpu_ptr-accessors +6 -2
@@ -73,10 +73,14 @@unsigned long tcp_ptr__ =raw_cpu_read_long (this_cpu_off); \ \ tcp_ptr__ += (__force unsigned long )(_ptr); \ - (typeof(*(_ptr)) __kernel __force *)tcp_ptr__; \ + (TYPEOF_UNQUAL(*(_ptr)) __force __kernel *)tcp_ptr__; \ })#else -#define arch_raw_cpu_ptr (_ptr) ({ BUILD_BUG(); (typeof(_ptr))0; }) +#define arch_raw_cpu_ptr (_ptr) \ +({ \ + BUILD_BUG(); \ + (TYPEOF_UNQUAL(*(_ptr)) __force __kernel *)0; \ +})#endif #define PER_CPU_VAR (var) %__percpu_seg:(var)__percpu_rel
include/linux/percpu-defs.h renamed from include/linux/percpu-defs.h~percpu-use-typeof_unqual-in-_cpu_ptr-accessors +1 -1
@@ -221,7 +221,7 @@ do { \ } while (0)#define PERCPU_PTR (__p) \ - (typeof(*(__p)) __force __kernel *)((__force unsigned long)(__p)) + (TYPEOF_UNQUAL(*(__p)) __force __kernel *)((__force unsigned long)(__p))#ifdef CONFIG_SMP
_
Patches currently in -mm which might be from [email protected] are