[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9CECB9F7-E700-4A92-98B9-6FD027F9CE65@gmail.com>
Date: Fri, 29 Nov 2024 17:45:09 +0200
From: Nadav Amit <nadav.amit@...il.com>
To: Uros Bizjak <ubizjak@...il.com>
Cc: the arch/x86 maintainers <x86@...nel.org>,
linux-sparse@...r.kernel.org,
"open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-bcachefs@...r.kernel.org,
linux-arch@...r.kernel.org,
netdev@...r.kernel.org,
Dennis Zhou <dennis@...nel.org>,
Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Brian Gerst <brgerst@...il.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 6/6] percpu/x86: Enable strict percpu checks via named AS
qualifiers
> On 26 Nov 2024, at 19:21, Uros Bizjak <ubizjak@...il.com> wrote:
>
> This patch declares percpu variables in __seg_gs/__seg_fs named AS
> and keeps them named AS qualified until they are dereferenced with
> percpu accessor. This approach enables various compiler check
> for cross-namespace variable assignments.
[snip]
> @@ -95,9 +95,19 @@
>
> #endif /* CONFIG_SMP */
>
> -#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 defined(CONFIG_USE_X86_SEG_SUPPORT) && \
> + defined(CONFIG_CC_HAS_TYPEOF_UNQUAL) && !defined(__CHECKER__)
Is the __CHECKER__ check because of sparse, as in patch 2/6 ?
If so, do you want to add a similar comment here?
Other than that, I went over the different patches and it looks good as
much as I can tell.
If it means anything, you have for the series
Acked-by: Nadav Amit <nadav.amit@...il.com <mailto:nadav.amit@...il.com>>
Powered by blists - more mailing lists