On 02/11/2024 12:09, Tamir Duberstein wrote:
> Use KVM or HVF if supported by the QEMU binary and available on the
> system.
>
> This produces a nice improvement on my Apple M3 Pro running macOS 14.7:
>
> Before:
> ./tools/testing/kunit/kunit.py exec --arch arm64
> [HH:MM:SS] Elapsed time: 10.145
On 14/02/2019 11:03, Amit Daniel Kachhap wrote:
> Hi,
>
> On 2/13/19 11:04 PM, Kristina Martsenko wrote:
>> On 28/01/2019 06:58, Amit Daniel Kachhap wrote:
>>> When restoring HCR_EL2 for the host, KVM uses HCR_HOST_VHE_FLAGS, which
>>> is a constant value. This
> Cc: Christoffer Dall
> Cc: Marc Zyngier
> Cc: Kristina Martsenko
> Cc: kvm...@lists.cs.columbia.edu
> Cc: Ramana Radhakrishnan
> Cc: Will Deacon
> ---
> Documentation/arm64/pointer-authentication.txt | 3 ++
> arch/arm64/kvm/sys_regs.c | 42
&g
On 28/01/2019 06:58, Amit Daniel Kachhap wrote:
> This feature will allow the KVM guest to allow the handling of
> pointer authentication instructions or to treat them as undefined
> if not set. It uses the existing vcpu API KVM_ARM_VCPU_INIT to
> supply this parameter instead of creating a new API
Hi Amit,
(Please always Cc: everyone who commented on previous versions of the
series.)
On 28/01/2019 06:58, Amit Daniel Kachhap wrote:
> When pointer authentication is supported, a guest may wish to use it.
> This patch adds the necessary KVM infrastructure for this to work, with
> a semi-lazy c
On 31/01/2019 16:25, James Morse wrote:
> Hi Amit,
>
> On 28/01/2019 06:58, Amit Daniel Kachhap wrote:
>> When pointer authentication is supported, a guest may wish to use it.
>> This patch adds the necessary KVM infrastructure for this to work, with
>> a semi-lazy context switch of the pointer au
On 28/01/2019 06:58, Amit Daniel Kachhap wrote:
> When restoring HCR_EL2 for the host, KVM uses HCR_HOST_VHE_FLAGS, which
> is a constant value. This works today, as the host HCR_EL2 value is
> always the same, but this will get in the way of supporting extensions
> that require HCR_EL2 bits to be
On 31/01/2019 16:20, James Morse wrote:
> Hi Amit,
>
> On 28/01/2019 06:58, Amit Daniel Kachhap wrote:
>> The keys can be switched either inside an assembly or such
>> functions which do not have pointer authentication checks, so a GCC
>> attribute is added to enable it.
>>
>> A function ptrauth_k
On 10/12/2018 20:22, Richard Henderson wrote:
> On 12/10/18 2:12 PM, Kristina Martsenko wrote:
>> The plan was to disable trapping, yes. However, after that thread there
>> was a retrospective change applied to the architecture, such that the
>> XPACLRI (and XPACD/XPACI) instr
On 09/12/2018 14:53, Richard Henderson wrote:
> On 12/7/18 12:39 PM, Kristina Martsenko wrote:
>> From: Mark Rutland
>>
>> In subsequent patches we're going to expose ptrauth to the host kernel
>> and userspace, but things are a bit trickier for guest kernels. F
On 09/12/2018 14:24, Richard Henderson wrote:
> On 12/7/18 12:39 PM, Kristina Martsenko wrote:
>> #define SCTLR_ELx_DSSBS (1UL << 44)
>> +#define SCTLR_ELx_ENIA (1 << 31)
>
> 1U or 1UL lest you produce signed -0x8000.
Thanks, this was setting all S
From: Mark Rutland
Now that all the necessary bits are in place for userspace, add the
necessary Kconfig logic to allow this to be enabled.
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Cc: Catalin Marinas
Cc: Will Deacon
---
arch/arm64/Kconfig | 23
-by: Kristina Martsenko
---
arch/arm64/include/uapi/asm/ptrace.h | 18 +
arch/arm64/kernel/ptrace.c | 72
include/uapi/linux/elf.h | 2 +
3 files changed, 92 insertions(+)
diff --git a/arch/arm64/include/uapi/asm/ptrace.h
b/arch
Add an arm64-specific prctl to allow a thread to reinitialize its
pointer authentication keys to random values. This can be useful when
exec() is not used for starting new processes, to ensure that different
processes still have different keys.
Signed-off-by: Kristina Martsenko
---
arch/arm64
used. This only affects the LR value, and not the
FP.
This only affects the in-kernel unwinder. When userspace performs
unwinding, it is up to userspace to strip PACs as necessary (which can
be determined from DWARF information).
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Cc: Ca
From: Mark Rutland
Now that we've added code to support pointer authentication, add some
documentation so that people can figure out if/how to use it.
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Reviewed-by: Ramana Radhakrishnan
Cc: Andrew Jones
Cc: Catalin Marina
).
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Tested-by: Adam Wallis
Cc: Catalin Marinas
Cc: Ramana Radhakrishnan
Cc: Suzuki K Poulose
Cc: Will Deacon
---
arch/arm64/include/asm/pointer_auth.h | 75 +++
arch/arm64/include/asm/thread_info.h
support, and the address authentication feature is
enabled. Otherwise, the regset is hidden.
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Cc: Catalin Marinas
Cc: Ramana Radhakrishnan
Cc: Will Deacon
---
arch/arm64/include/asm/pointer_auth.h | 8
arch/arm64/include/uapi
cks for both address and generic authentication,
separately. It is assumed that if all CPUs support an IMP DEF algorithm,
the same algorithm is used across all CPUs.
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Cc: Catalin Marinas
Cc: Suzuki K Poulose
Cc: Will Deacon
---
a
etting them.
This does not enable support for KVM guests, since KVM manages HCR_EL2
itself when running VMs.
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Acked-by: Christoffer Dall
Cc: Catalin Marinas
Cc: Marc Zyngier
Cc: Will Deacon
Cc: kvm...@lists.cs.columbia.edu
---
arch
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Reviewed-by: Christoffer Dall
Cc: Catalin Marinas
Cc: Marc Zyngier
Cc: Will Deacon
Cc: kvm...@lists.cs.columbia.edu
---
arch/arm64/include/asm/kvm_arm.h | 1 +
arch/arm64/kernel/head.S | 5 ++---
arch/arm64/kvm/hyp/switch.
attempt to use ptrauth instructions, triggering a trap to EL2,
resulting in noise from kvm_handle_unknown_ec(). So let's write up a
handler for the PAC trap, which silently injects an UNDEF into the
guest, as if the feature were really missing.
Signed-off-by: Mark Rutland
Signed-off-by: Kri
/mark/boot-wrapper-aarch64.git
Kristina Martsenko (3):
arm64: add comments about EC exception levels
arm64: add prctl control for resetting ptrauth keys
arm64: add ptrace regsets for ptrauth key management
Mark Rutland (10):
arm64: add pointer authentication register bits
arm64/kvm
To make it clear which exceptions can't be taken to EL1 or EL2, add
comments next to the ESR_ELx_EC_* macro definitions.
Signed-off-by: Kristina Martsenko
---
arch/arm64/include/asm/esr.h | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/includ
functionality.
* A new ESR_ELx.EC code used when the new instructions are affected by
configurable traps
This patch adds the relevant definitions to and
for these, to be used by subsequent patches.
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
Cc: Catalin Marinas
Cc: Marc
On 19/10/2018 12:35, Catalin Marinas wrote:
> On Tue, Oct 16, 2018 at 05:14:39PM +0100, Kristina Martsenko wrote:
>> On 05/10/2018 10:04, Ramana Radhakrishnan wrote:
>>> On 05/10/2018 09:47, Kristina Martsenko wrote:
>>>> +Virtualization
>>>> +---
On 05/10/2018 10:01, Ramana Radhakrishnan wrote:
> On 05/10/2018 09:47, Kristina Martsenko wrote:
>> Compile all functions with two ptrauth instructions: paciasp in the
>> prologue to sign the return address, and autiasp in the epilogue to
>> authenticate the return addr
auth for both userspace and the
kernel.
Signed-off-by: Mark Rutland
Signed-off-by: Kristina Martsenko
---
arch/arm64/Makefile | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 106039d25e2f..dbcd43ea99d8 100644
--- a/arch/arm64/Makefile
+++ b
-by: Kristina Martsenko
---
arch/arm64/include/asm/pointer_auth.h | 9 -
arch/arm64/include/asm/ptrauth-asm.h | 13 +
arch/arm64/include/asm/thread_info.h | 1 +
arch/arm64/kernel/asm-offsets.c | 1 +
arch/arm64/kernel/entry.S | 4
arch/arm64/kernel
cpu_enable callback, to avoid compiling the whole
callchain down to cpu_enable without pointer auth.
Note the change in behavior: if the boot CPU has pointer auth and a late
CPU does not, we panic. Until now we would have just disabled pointer
auth in this case.
Signed-off-by: Kristina Martsenko
: Kristina Martsenko
---
arch/arm64/include/asm/pointer_auth.h | 10 +++---
arch/arm64/kernel/ptrace.c| 2 +-
arch/arm64/kernel/stacktrace.c| 3 +++
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/include/asm/pointer_auth.h
b/arch/arm64/include
31 matches
Mail list logo