From: Will Deacon <will@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Vincenzo Frascino <Vincenzo.Frascino@arm.com>,
Kees Cook <keescook@chromium.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 04/10] arm64: Set GP bit in kernel page tables to enable BTI for the kernel
Date: Wed, 29 Apr 2020 08:40:15 +0100 [thread overview]
Message-ID: <20200429074012.GA29143@willie-the-truck> (raw)
In-Reply-To: <20200428180353.GN5677@sirena.org.uk>
On Tue, Apr 28, 2020 at 07:03:53PM +0100, Mark Brown wrote:
> On Tue, Apr 28, 2020 at 06:24:32PM +0100, Catalin Marinas wrote:
> > On Wed, Apr 15, 2020 at 02:07:43PM +0100, Mark Brown wrote:
>
> > > +#define PAGE_KERNEL_EXEC_GP __pgprot((PROT_NORMAL & ~PTE_PXN) | PTE_GP)
> > > #define PAGE_KERNEL_EXEC_CONT __pgprot((PROT_NORMAL & ~PTE_PXN) | PTE_CONT)
>
> > Are the PAGE_*_GP defines used anywhere in this series?
>
> Not any more, I'll drop them.
>
> > > +#ifdef CONFIG_ARM64_BTI_KERNEL
> > > + .type = ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE,
> > > +#else
> > > .type = ARM64_CPUCAP_SYSTEM_FEATURE,
> > > +#endif
>
> > As with PtrAuth, I'm tempted to have a single config for both user and
> > kernel. Not a strong opinion though, just looking for some consistency.
>
> Yeah, it's not ideal. My concern with this was that at the time I sent
> the patches out GCC had a sufficiently severe code generation issue that
> it was unsustainable to use for building the kernel. That seemed
> excessively restrictive so I made it a separate option. This will be
> fixed in GCC 10 all being well (one of the things I need to do before
> reposting this is to verify that the current fix addresses everything I
> was seeing and update the dependencies) so it's less of a concern
> although still a bit annoying.
FWIW, I don't agree with Catalin here (I realise this is unhelpful ;) and
would much prefer to have separate config options for user and kernel. I
also think it would be worth doing this for pointer auth too, since at the
moment we have nonsensical dependencies such as user pointer auth depending
on VHE if KVM is enabled.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-29 7:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 13:07 [PATCH 00/10] arm64: BTI kernel and vDSO support Mark Brown
2020-04-15 13:07 ` [PATCH 01/10] arm64: kernel: Convert to modern annotations for assembly functions Mark Brown
2020-04-15 13:07 ` [PATCH 02/10] arm64: bti: Support building kernel C code using BTI Mark Brown
2020-04-15 13:07 ` [PATCH 03/10] arm64: asm: Override SYM_FUNC_START when building the kernel with BTI Mark Brown
2020-04-15 13:07 ` [PATCH 04/10] arm64: Set GP bit in kernel page tables to enable BTI for the kernel Mark Brown
2020-04-28 17:24 ` Catalin Marinas
2020-04-28 18:03 ` Mark Brown
2020-04-29 7:40 ` Will Deacon [this message]
2020-04-29 10:10 ` Mark Brown
2020-04-15 13:07 ` [PATCH 05/10] arm64: mm: Mark module text as guarded pages Mark Brown
2020-04-27 15:07 ` Mark Brown
2020-04-15 13:07 ` [PATCH 06/10] arm64: bti: Provide Kconfig for kernel mode BTI Mark Brown
2020-04-15 13:07 ` [PATCH 07/10] arm64: asm: Provide a mechanism for generating ELF note for BTI Mark Brown
2020-04-15 13:07 ` [PATCH 08/10] arm64: vdso: Annotate " Mark Brown
2020-04-15 13:07 ` [PATCH 09/10] arm64: vdso: Force the vDSO to be linked as BTI when built " Mark Brown
2020-04-15 13:07 ` [PATCH 10/10] arm64: vdso: Map the vDSO text with guarded pages " Mark Brown
2020-04-15 13:07 ` [PATCH 10/10] arm64: vdso: Map the VDSO " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200429074012.GA29143@willie-the-truck \
--to=will@kernel.org \
--cc=Vincenzo.Frascino@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox