On Wed, Sep 23, 2026 at 08:42:12AM +0100, Vincent Donnefort wrote:
> simple_ring_buffer uses local_set() and cmpxchg() on unsigned long. Add
> them to undefsyms_base.c to extend the allowlist for the parisc
> architecture.
> 
> Fixes: 1211907ac0b5 ("tracing: Generate undef symbols allowlist for 
> simple_ring_buffer")
> Reported-by: Guenter Roeck <[email protected]>
> Closes: 
> https://lore.kernel.org/all/[email protected]/
> Signed-off-by: Vincent Donnefort <[email protected]>

Tested-by: Guenter Roeck <[email protected]>

> ---
>  kernel/trace/undefsyms_base.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/undefsyms_base.c b/kernel/trace/undefsyms_base.c
> index e65baf58e6ff..37310baf706b 100644
> --- a/kernel/trace/undefsyms_base.c
> +++ b/kernel/trace/undefsyms_base.c
> @@ -9,6 +9,7 @@
>  
>  #include <linux/atomic.h>
>  #include <linux/string.h>
> +#include <asm/local.h>
>  #include <asm/page.h>
>  
>  void undefsyms_base(void *p, int n);
> @@ -18,11 +19,13 @@ static char page[PAGE_SIZE] __aligned(PAGE_SIZE);
>  void undefsyms_base(void *p, int n)
>  {
>       char buffer[256] = { 0 };
> -
>       u32 u = 0;
> +
>       memset((char * volatile)page, 8, PAGE_SIZE);
>       memset((char * volatile)buffer, 8, sizeof(buffer));
>       memcpy((void * volatile)p, buffer, sizeof(buffer));
>       cmpxchg((u32 * volatile)&u, 0, 8);
> +     cmpxchg((unsigned long *)p, 0, 8);
> +     local_set((local_t *)p, 8);
>       WARN_ON(n == 0xdeadbeef);
>  }
> -- 
> 2.55.0.1082.g2b9226bbc0-goog
> 

Reply via email to