[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a31ca10a-ee1a-71fb-2c3d-a6184e12b543@linaro.org>
Date: Sun, 9 Dec 2018 09:41:31 -0600
From: Richard Henderson <richard.henderson@...aro.org>
To: Kristina Martsenko <kristina.martsenko@....com>,
linux-arm-kernel@...ts.infradead.org
Cc: Adam Wallis <awallis@...eaurora.org>,
Amit Kachhap <amit.kachhap@....com>,
Andrew Jones <drjones@...hat.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
Christoffer Dall <christoffer.dall@....com>,
Cyrill Gorcunov <gorcunov@...il.com>,
Dave P Martin <dave.martin@....com>,
Jacob Bramley <jacob.bramley@....com>,
Kees Cook <keescook@...omium.org>,
Marc Zyngier <marc.zyngier@....com>,
Mark Rutland <mark.rutland@....com>,
Ramana Radhakrishnan <ramana.radhakrishnan@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Will Deacon <will.deacon@....com>,
kvmarm@...ts.cs.columbia.edu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 08/13] arm64: expose user PAC bit positions via ptrace
On 12/7/18 12:39 PM, Kristina Martsenko wrote:
> When pointer authentication is in use, data/instruction pointers have a
> number of PAC bits inserted into them. The number and position of these
> bits depends on the configured TCR_ELx.TxSZ and whether tagging is
> enabled. ARMv8.3 allows tagging to differ for instruction and data
> pointers.
At this point I think it's worth starting a discussion about pointer tagging,
and how we can make it controllable and not mandatory.
With this patch set, we are enabling 7 authentication bits: [54:48].
However, it won't be too long before someone implements support for
ARMv8.2-LVA, at which point, without changes to mandatory pointer tagging, we
will only have 3 authentication bits: [54:52]. This seems useless and easily
brute-force-able.
I assume that pointer tagging is primarily used by Android, since I'm not aware
of anything else that uses it at all.
Unfortunately, there is no obvious path to making this optional that does not
break compatibility with Documentation/arm64/tagged-pointers.txt.
I've been thinking that there ought to be some sort of global setting, akin to
/proc/sys/kernel/randomize_va_space, as well as a prctl which an application
could use to selectively enable TBI/TBID for an application that actually uses
tagging.
The global /proc setting allows the default to remain 1, which would let any
application using tagging to continue working. If there are none, the sysadmin
can set the default to 0. Going forward, applications could be updated to use
the prctl, allowing more systems to set the default to 0.
FWIW, pointer authentication continues to work when enabling TBI, but not the
other way around. Thus the prctl could be used to enable TBI at any point, but
if libc is built with PAuth, there's no way to turn it back off again.
r~
Powered by blists - more mailing lists