[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <acd02481-ca2e-412a-8c6b-d9dff1345139@p183>
Date: Fri, 9 Feb 2024 15:30:37 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Kees Cook <keescook@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Florian Weimer <fweimer@...hat.com>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-api@...r.kernel.org,
x86@...nel.org, Eric Biederman <ebiederm@...ssion.com>,
linux-mm@...ck.org
Subject: Re: [PATCH v4] ELF: AT_PAGE_SHIFT_MASK -- supply userspace with
available page shifts
On Mon, Feb 05, 2024 at 04:48:08AM -0800, Kees Cook wrote:
> On Mon, Feb 05, 2024 at 12:51:43PM +0300, Alexey Dobriyan wrote:
> > +#define ARCH_AT_PAGE_SHIFT_MASK \
> > + do { \
> > + u32 val = 1 << 12; \
> > + if (boot_cpu_has(X86_FEATURE_PSE)) { \
> > + val |= 1 << 21; \
> > + } \
> > + if (boot_cpu_has(X86_FEATURE_GBPAGES)) { \
> > + val |= 1 << 30; \
> > + } \
>
> Can we use something besides literal "12", "21", and "30" values here?
Ehh, no, why? Inside x86_64 the page shifts are very specific numbers,
they won't change.
Powered by blists - more mailing lists