Thread (32 messages) 32 messages, 5 authors, 2020-04-30

Re: [PATCH v10 00/13] arm64: Branch Target Identification support

From: Mark Rutland <mark.rutland@arm.com>
Date: 2020-03-23 15:02:20
Also in: linux-arch, linux-fsdevel, lkml

On Mon, Mar 23, 2020 at 02:39:55PM +0000, Catalin Marinas wrote:
On Mon, Mar 23, 2020 at 01:57:22PM +0000, Mark Rutland wrote:
quoted
On Mon, Mar 23, 2020 at 01:24:12PM +0000, Mark Brown wrote:
quoted
On Mon, Mar 23, 2020 at 12:21:44PM +0000, Catalin Marinas wrote:
quoted
On Fri, Mar 20, 2020 at 05:39:46PM +0000, Szabolcs Nagy wrote:
quoted
+int arch_elf_adjust_prot(int prot, const struct arch_elf_state *state,
+                        bool has_interp, bool is_interp)
+{
+       if (is_interp != has_interp)
+               return prot;
+
+       if (!(state->flags & ARM64_ELF_BTI))
+               return prot;
+
+       if (prot & PROT_EXEC)
+               prot |= PROT_BTI;
+
+       return prot;
+}
quoted
I think it would be best to document the current behaviour, as it's a
simple ABI that we can guarantee, and the dynamic linker will have to be
aware of BTI in order to do the right thing anyhow.
That's a valid point. If we have an old dynamic linker and the kernel
enabled BTI automatically for the main executable, could things go wrong
(e.g. does the PLT need to be BTI-aware)?
Also worth noting that an old dynamic linker won't have ARM64_ELF_BTI
set, so the kernel will not enable BTI for this.

Mark.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help