[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFULd4YCQyYQssE0egTXMTcTX8whT39VTBVYZy6nwxKLiMGZjA@mail.gmail.com>
Date: Fri, 21 Mar 2025 08:15:07 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Kumar Kartikeya Dwivedi <memxor@...il.com>, Stephen Rothwell <sfr@...b.auug.org.au>,
Daniel Borkmann <daniel@...earbox.net>, Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andrii@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, bpf <bpf@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the bpf-next tree
On Fri, Mar 21, 2025 at 12:18 AM Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
> > BTW: You can use:
> >
> > --cut here--
> > diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
> > index 474d648bca9a..e6a7525c9db9 100644
> > --- a/arch/x86/include/asm/percpu.h
> > +++ b/arch/x86/include/asm/percpu.h
> > @@ -105,6 +105,10 @@
> > # define __my_cpu_type(var) typeof(var) __percpu_seg_override
> > # define __my_cpu_ptr(ptr) (__my_cpu_type(*(ptr))*)(__force uintptr_t)(ptr)
> > # define __my_cpu_var(var) (*__my_cpu_ptr(&(var)))
> > +
> > +# if __has_attribute(address_space) && defined(USE_TYPEOF_UNQUAL)
> > +# define __percpu_qual __attribute__((address_space(3)))
>
> I see, so for undefined addr spaces clang x86 just ignores it.
> Weird. But ok.
It ignores undefined addr spaces in the sense that it does nothing
with it. It has no effect on the access to variables in this addr
space. OTOH, the compiler still applies address space checks. I plan
to propose a (RFC?) patch after rc1, once the main part is applied to
the mainline, that enables percpu checks also for clang. It is in
effect just the above couple of lines.
Uros.
Powered by blists - more mailing lists