[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e10e729392c5fa421baf08b4ea7aaac6ffada0f5.camel@intel.com>
Date: Tue, 22 Aug 2023 16:47:26 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "broonie@...nel.org" <broonie@...nel.org>,
"david@...hat.com" <david@...hat.com>
CC: "corbet@....net" <corbet@....net>,
"ardb@...nel.org" <ardb@...nel.org>,
"maz@...nel.org" <maz@...nel.org>,
"shuah@...nel.org" <shuah@...nel.org>,
"Szabolcs.Nagy@....com" <Szabolcs.Nagy@....com>,
"keescook@...omium.org" <keescook@...omium.org>,
"james.morse@....com" <james.morse@....com>,
"debug@...osinc.com" <debug@...osinc.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"palmer@...belt.com" <palmer@...belt.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"hjl.tools@...il.com" <hjl.tools@...il.com>,
"paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
"oleg@...hat.com" <oleg@...hat.com>,
"arnd@...db.de" <arnd@...db.de>,
"ebiederm@...ssion.com" <ebiederm@...ssion.com>,
"will@...nel.org" <will@...nel.org>,
"suzuki.poulose@....com" <suzuki.poulose@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvmarm@...ts.linux.dev" <kvmarm@...ts.linux.dev>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"oliver.upton@...ux.dev" <oliver.upton@...ux.dev>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH v5 11/37] mm: Define VM_SHADOW_STACK for arm64 when we
support GCS
On Tue, 2023-08-22 at 16:41 +0100, Mark Brown wrote:
> On Tue, Aug 22, 2023 at 05:21:09PM +0200, David Hildenbrand wrote:
> > On 22.08.23 15:56, Mark Brown wrote:
>
> > > @@ -372,7 +372,17 @@ extern unsigned int kobjsize(const void
> > > *objp);
> > > * having a PAGE_SIZE guard gap.
> > > */
> > > # define VM_SHADOW_STACK VM_HIGH_ARCH_5
> > > -#else
> > > +#endif
> > > +
> > > +#if defined(CONFIG_ARM64_GCS)
> > > +/*
> > > + * arm64's Guarded Control Stack implements similar
> > > functionality and
> > > + * has similar constraints to shadow stacks.
> > > + */
> > > +# define VM_SHADOW_STACK VM_HIGH_ARCH_5
> > > +#endif
>
> > Shouldn't that all just merged with the previous define(s)?
>
> > Also, I wonder if we now want to have CONFIG_HAVE_ARCH_SHADOW_STACK
> > or
> > similar.
>
> I can certainly update it to do that, I was just trying to fit in
> with
> how the code was written on the basis that there was probably a good
> reason for it that had been discussed somewhere. I can send an
> incremental patch for this on top of the x86 patches assuming they go
> in
> during the merge window.
There was something like that on the x86 series way back, but it was
dropped[0]. IIRC risc-v was going to try to do something other than
VM_SHADOW_STACK, so they may conflict some day. But in the meantime,
adding a CONFIG_HAVE_ARCH_SHADOW_STACK here in the arm series makes
sense to me.
[0]
https://lore.kernel.org/lkml/d09e952d8ae696f687f0787dfeb7be7699c02913.camel@intel.com/
Powered by blists - more mailing lists