Validate that SVE B16B16 support is reported correctly and consistently to
userspace.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/abi/hwcap.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c
b/tools/testing/selftests
SVE 2.1 introduced a new feature FEAT_SVE_B16B16 which adds instructions
supporting the BFloat16 floating point format. Report this to userspace
through the ID registers and hwcap.
Signed-off-by: Mark Brown
---
Mark Brown (2):
arm64/sve: Report FEAT_SVE_B16B16 to userspace
kselftest
SVE 2.1 introduced a new feature FEAT_SVE_B16B16 which adds instructions
supporting the BFloat16 floating point format. Report this to userspace
through the ID registers and hwcap.
Reported-by: Peter Maydell
Signed-off-by: Mark Brown
---
Documentation/arch/arm64/cpu-feature-registers.rst | 2
On Fri, Sep 15, 2023 at 10:27:54PM +, Beau Belgrave wrote:
> Fix to unmount tracefs if the self-test mounted it to allow testing.
> If tracefs was already mounted, this does nothing.
Reviewed-by: Mark Brown
signature.asc
Description: PGP signature
o be
> present on the system is missing. This allows the configuration files to
> not only be used to detect missing PCM devices (which is currently
> possible) but also that the soundcard hasn't been registered at all.
Reviewed-by: Mark Brown
signature.asc
Description: PGP signature
In the ZA and ZT test programs we explicitly validate that PSTATE.ZA is as
expected on each loop but we do not do the equivalent for our streaming
SVE test, add a check that we are still in streaming mode on every loop
in case that goes wrong.
Signed-off-by: Mark Brown
---
tools/testing
don't really benefit from KTAP and there were a couple
where the conversion was a bit more complex so I've left them for now.
Signed-off-by: Mark Brown
---
Mark Brown (3):
kselftest: Add a ksft_perror() helper
selftests: timers: Convert posix_timers test to generate KTAP
the table of strings required
doesn't seem like a good fit for what it's trying to do so when we're using
that only print the errno.
Signed-off-by: Mark Brown
---
tools/testing/selftests/kselftest.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/tools/testing
.
As part of this fix the printing of diagnostics in the unlikely event that
the pthread APIs fail, these were using perror() but the API functions
directly return an error code instead of setting errno.
Signed-off-by: Mark Brown
---
tools/testing/selftests/timers/posix_timers.c | 81
.
Signed-off-by: Mark Brown
---
tools/testing/selftests/timers/nsleep-lat.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/tools/testing/selftests/timers/nsleep-lat.c
b/tools/testing/selftests/timers/nsleep-lat.c
index eb3e79ed7b4a..edb5acacf214 100644
ies timers
test changes.
Signed-off-by: Mark Brown
---
Mark Brown (2):
kselftest: Add a ksft_perror() helper
selftests/exec: Convert execveat test to generate KTAP output
tools/testing/selftests/exec/execveat.c | 87 -
tools/testing/selftests/kselftest.
the table of strings required
doesn't seem like a good fit for what it's trying to do so when we're using
that only print the errno.
Signed-off-by: Mark Brown
---
tools/testing/selftests/kselftest.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/tools/testing
: Mark Brown
---
tools/testing/selftests/exec/execveat.c | 87 -
1 file changed, 52 insertions(+), 35 deletions(-)
diff --git a/tools/testing/selftests/exec/execveat.c
b/tools/testing/selftests/exec/execveat.c
index 67bf7254a48f..bf79d664c8e6 100644
--- a/tools/testing
On Thu, Sep 28, 2023 at 05:48:22PM -0700, Kees Cook wrote:
> > nolibc doesn't have a strerror() and adding the table of strings required
> > doesn't seem like a good fit for what it's trying to do so when we're using
> > that only print the errno.
> Oh, interesting... what environment ends up wit
On Fri, Sep 29, 2023 at 10:31:56AM -0700, Kees Cook wrote:
> On Fri, Sep 29, 2023 at 09:50:53AM +0200, Mark Brown wrote:
> > Like I say it's for nolibc - it's just some header files (all in the
> > kernel source), while it generally aims to be libc compatible it'
On Thu, Sep 28, 2023 at 05:59:25PM +0100, Szabolcs Nagy wrote:
> The 08/23/2023 14:11, Catalin Marinas wrote:
> > > and there is user code doing raw clone threads (such threads are
> > > technically not allowed to call into libc) it's not immediately
> > > clear to me if having gcs in those thread
On Mon, Oct 02, 2023 at 09:43:25PM +, Edgecombe, Rick P wrote:
> If ARM is thinking of doing things differently than x86, you might
> think about how you weight those tradeoffs. Like, it might be silly to
> worry about clone() support if something else ends up breaking
> compatibility majorly.
On Tue, Oct 03, 2023 at 09:45:56AM +0100, Szabolcs Nagy wrote:
> clone3 seems to have features that are only available in clone3 and
> not exposed (reasonably) in libc apis so ppl will use clone3 directly
> and those will be hard to fix for gcs (you have to convince upstream
> to add future arm64
On Wed, Sep 27, 2023 at 03:01:08PM +0100, Joey Gouly wrote:
> +/* Initial value for Permission Overlay Extension for EL0 */
> +#define POR_EL0_INIT UL(0x7)
Might be useful to explain why this is the default (and possibly also
define in terms of the constants for POR values)?
> +static void permi
On Wed, Sep 27, 2023 at 03:01:04PM +0100, Joey Gouly wrote:
> Add POR_EL{0,1} according to DDI0601 2023-03.
Reviewed-by: Mark Brown
signature.asc
Description: PGP signature
On Wed, Sep 27, 2023 at 03:01:10PM +0100, Joey Gouly wrote:
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -400,6 +400,7 @@ static const struct arm64_ftr_bits ftr_id_aa64mmfr2[] = {
> };
>
> static const struct arm64_ftr_bits ftr_id_aa64mmfr3[] = {
> + A
On Wed, Sep 27, 2023 at 03:01:10PM +0100, Joey Gouly wrote:
> Expose a HWCAP and ID_AA64MMFR3_EL1_S1POE to userspace, so they can be used to
> check if the CPU supports the feature.
Please also add the new hwcap to the hwcaps self test.
signature.asc
Description: PGP signature
On Wed, Sep 27, 2023 at 03:01:05PM +0100, Joey Gouly wrote:
> Add E0POE bit that traps accesses to POR_EL0 from EL0.
> Updated according to DDI0601 2023-03.
Reviewed-by: Mark Brown
It's also up to date with DDI 0601 2023-09 it seems.
signature.asc
Description: PGP signature
On Wed, Sep 27, 2023 at 03:01:18PM +0100, Joey Gouly wrote:
> Add PKEY support to signals, by saving and restoring POR_EL0 from the
> stackframe.
It'd be nice to have at least a basic test that validates that we
generate a POE signal frame when expected, though that should be a very
minor thing w
On Thu, Oct 05, 2023 at 06:23:10PM +0100, Catalin Marinas wrote:
> It's not just the default size that I dislike (I think the x86
> RLIMIT_STACK or clone3() stack_size is probably good enough) but the
> kernel allocating the shadow stack and inserting it into the user
> address space. The actual t
On Fri, Oct 06, 2023 at 07:29:45AM -0500, Eric W. Biederman wrote:
> Mark Brown writes:
> >> It's not just the default size that I dislike (I think the x86
> >> RLIMIT_STACK or clone3() stack_size is probably good enough) but the
> >> kernel allocating the sha
rg/lkml/20230213045351.3945824-1-de...@rivosinc.com/
Pending feedback from Catalin:
- Use clone3() paramaters to size/place the GCS.
- Switch copy_to_user_gcs() to be put_user_gcs().
Signed-off-by: Mark Brown
---
Changes in v6:
- Rebase onto v6.6-rc3.
- Add some more gcsb_dsync() barriers foll
.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/mman.h | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/include/asm/mman.h b/arch/arm64/include/asm/mman.h
index 5966ee4a6154..c21849ffdd88 100644
--- a/arch/arm64/include/asm/mman.h
+++ b/arch/arm64
locking interface reworked. The set status prctl()
is also reworked to just set flags, if setting/reading the shadow stack
pointer is required this could be a separate prctl.
Signed-off-by: Mark Brown
---
include/linux/mm.h | 4
include/uapi/linux/prctl.h | 22
stack marker suitable for use by unwinders should be added
above that.
For arm64 the top of stack marker is all bits 0.
Signed-off-by: Mark Brown
---
arch/x86/include/uapi/asm/mman.h | 3 ---
include/uapi/asm-generic/mman.h | 4
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a
FEAT_GCS introduces a number of new system registers, we require that
access to these registers is not trapped when we identify that the feature
is detected.
Signed-off-by: Mark Brown
---
Documentation/arch/arm64/booting.rst | 22 ++
1 file changed, 22 insertions(+)
diff
Add some documentation of the userspace ABI for Guarded Control Stacks.
Signed-off-by: Mark Brown
---
Documentation/arch/arm64/gcs.rst | 233 +
Documentation/arch/arm64/index.rst | 1 +
2 files changed, 234 insertions(+)
diff --git a/Documentation/arch
FEAT_GCS introduces a number of new system registers. Add the registers
available up to EL2 to sysreg as per DDI0601 2022-12.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 55 +
1 file changed, 55 insertions(+)
diff --git a/arch/arm64
The architecture defines a format for guarded control stack caps, used
to mark the top of an unused GCS in order to limit the potential for
exploitation via stack switching. Add definitions associated with these.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/sysreg.h | 20
sufficiently fast paths for this to be a problem.
Note that GCSSTTR is used to store to EL0.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/gcs.h | 51
arch/arm64/include/asm/uaccess.h | 22 +
2 files changed, 73 insertions(+)
diff --git
than u64 due to sparse.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/uaccess.h | 20
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 22e10e79f56a..24aa804e95a7 100644
--- a/arch/arm64/include
Add a cpufeature for GCS, allowing other code to conditionally support it
at runtime.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/cpufeature.h | 6 ++
arch/arm64/kernel/cpufeature.c | 16
arch/arm64/tools/cpucaps| 1 +
3 files changed, 23
to copy.
Since the actual effect is defined using PIE the specific bit pattern used
does not matter to the hardware but we choose two values which differ only
in PTE_WRITE in order to help share code with non-PIE cases.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/pgtable-prot.h | 14
Map pages flagged as being part of a GCS as such rather than using the
full set of generic VM flags.
This is done using a conditional rather than extending the size of
protection_map since that would make for a very sparse array.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/mman.h | 9
GCS introduces a number of system registers for EL1 and EL0, on systems
with GCS we need to context switch them and expose them to VMMs to allow
guests to use GCS. Traps are already disabled.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/kvm_host.h | 12
arch/arm64
Use VM_HIGH_ARCH_5 for guarded control stack pages.
Signed-off-by: Mark Brown
---
Documentation/filesystems/proc.rst | 2 +-
fs/proc/task_mmu.c | 3 +++
include/linux/mm.h | 12 +++-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a
There is a control HCRX_EL2.GCSEn which must be set to allow GCS
features to take effect at lower ELs and also fine grained traps for GCS
usage at EL0 and EL1. Configure all these to allow GCS usage by EL0 and
EL1.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/el2_setup.h | 17
Hook up an override for GCS, allowing it to be disabled from the command
line by specifying arm64.nogcs in case there are problems.
Signed-off-by: Mark Brown
---
Documentation/admin-guide/kernel-parameters.txt | 6 ++
arch/arm64/kernel/idreg-override.c | 2 ++
2 files changed
ating any GCS
fault as fatal.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/esr.h | 28 +++-
arch/arm64/include/asm/exception.h | 2 ++
arch/arm64/kernel/entry-common.c | 23 +++
arch/arm64/kernel/traps.c | 11 +++
4
Provide a hwcap to enable userspace to detect support for GCS.
Signed-off-by: Mark Brown
---
Documentation/arch/arm64/elf_hwcaps.rst | 3 +++
arch/arm64/include/asm/hwcap.h | 1 +
arch/arm64/include/uapi/asm/hwcap.h | 1 +
arch/arm64/kernel/cpufeature.c | 3 +++
arch/arm64
it
attempts to do GCS operations outside a GCS.
Signed-off-by: Mark Brown
---
arch/arm64/mm/fault.c | 79 +--
1 file changed, 71 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 2e5d1e238af9
been disabled.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/gcs.h | 24
arch/arm64/include/asm/processor.h | 6
arch/arm64/kernel/process.c| 56 ++
arch/arm64/mm/Makefile | 1 +
arch/arm64/mm/gcs.c
the GCS can easily detect the end of the
region.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/gcs.h | 7 +++
arch/arm64/kernel/process.c | 36 +
arch/arm64/mm/gcs.c | 47
3 files changed, 90
fault reporting.
Since it is not an expected use case and since it presents some
complications in determining what to do with previously initialsed data
on the GCS attempts to reenable GCS after this are rejected. This can
be revisted if a use case arises.
Signed-off-by: Mark Brown
---
arch/arm64
de has not yet been rebased to v6.5-rc1 this includes
the architecture neutral parts of Rick Edgecmbe's "x86/shstk: Introduce
map_shadow_stack syscall".
Signed-off-by: Mark Brown
---
arch/arm64/mm/gcs.c | 61 ++-
include/uapi/asm-gene
, there is a conflict
between specifying GCSPR_EL0 and allocation of a new GCS and this is not
an ancticipated use case. We also enforce GCS configuration locking on
signal return.
Signed-off-by: Mark Brown
---
arch/arm64/include/uapi/asm/sigcontext.h | 9 +++
arch/arm64/kernel/signal.c
stack
switch instructions.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/gcs.h | 2 +
arch/arm64/kernel/signal.c | 130 +--
arch/arm64/mm/gcs.c | 1 +
3 files changed, 128 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/include/asm
Provide a new register type NT_ARM_GCS reporting the current GCS mode
and pointer for EL0. Due to the interactions with allocation and
deallocation of Guarded Control Stacks we do not permit any changes to
the GCS mode via ptrace, only GCSPR_EL0 may be changed.
Signed-off-by: Mark Brown
This test program just covers the basic GCS ABI, covering aspects of the
ABI as standalone features without attempting to integrate things.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/Makefile| 2 +-
tools/testing/selftests/arm64/gcs/.gitignore | 1 +
tools/testing
There are things like threads which nolibc struggles with which we want
to add coverage for, and the ABI allows us to test most of these even if
libc itself does not understand GCS so add a test application built
using the system libc.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64
to not do that in the build system but there are no
such toolchains yet so it is not yet an issue.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/gcs/.gitignore| 1 +
tools/testing/selftests/arm64/gcs/Makefile | 2 +-
tools/testing/selftests/arm64/gcs/gcs-locki
Do some testing of the signal handling for GCS, checking that a GCS
frame has the expected information in it and that the expected signals
are delivered with invalid operations.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/signal/.gitignore| 1 +
.../selftests/arm64/signal
are inserted when moving a GCS using task to another CPU. The test runs for
a configurable amount of time, defaulting to 10 seconds.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/gcs/.gitignore | 2 +
tools/testing/selftests/arm64/gcs/Makefile | 6 +-
tools/testing
they continue to work as before on systems without GCS.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/fp/assembler.h | 15 +++
tools/testing/selftests/arm64/fp/fpsimd-test.S | 2 ++
tools/testing/selftests/arm64/fp/sve-test.S| 2 ++
tools/testing/selftests/arm64/
Add coverage of the GCS hwcap to the hwcap selftest, using a read of
GCSPR_EL0 to generate SIGILL without having to worry about enabling GCS.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/abi/hwcap.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools
Teach the framework about the GCS signal context, avoiding warnings on
the unknown context.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/signal/testcases/testcases.c | 7 +++
tools/testing/selftests/arm64/signal/testcases/testcases.h | 1 +
2 files changed, 8 insertions
Provide a Kconfig option allowing the user to select if GCS support is
built into the kernel.
Signed-off-by: Mark Brown
---
arch/arm64/Kconfig | 19 +++
1 file changed, 19 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b10515c0200b..d235e725177b 100644
In preparation for testing GCS related signal handling add it as a feature
we check for in the signal handling support code.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/signal/test_signals.h | 2 ++
tools/testing/selftests/arm64/signal/test_signals_utils.c | 3 +++
2 files
anything with stacks that would cause problems with GCS we can sidestep
this issue by unconditionally enabling GCS on startup and exiting with a
call to exit() rather than a return from main().
Signed-off-by: Mark Brown
---
.../testing/selftests/arm64/signal/test_signals.c | 17
Currently we ignore si_code unless the expected signal is a SIGSEGV, in
which case we enforce it being SEGV_ACCERR. Allow test cases to specify
exactly which si_code should be generated so we can validate this, and
test for other segfault codes.
Signed-off-by: Mark Brown
---
.../testing
On Thu, Oct 05, 2023 at 03:34:29PM +0100, Mark Brown wrote:
> On Wed, Sep 27, 2023 at 03:01:18PM +0100, Joey Gouly wrote:
> > Add PKEY support to signals, by saving and restoring POR_EL0 from the
> > stackframe.
> It'd be nice to have at least a basic test that validates t
On Tue, Oct 10, 2023 at 10:54:23AM +0100, Joey Gouly wrote:
> On Thu, Oct 05, 2023 at 03:14:50PM +0100, Mark Brown wrote:
> > On Wed, Sep 27, 2023 at 03:01:08PM +0100, Joey Gouly wrote:
> > > + if (alternative_has_cap_unlikely(ARM64_HAS_S1POE)) {
> > Why the _unlikely h
On Tue, Oct 10, 2023 at 10:58:02AM +0100, Joey Gouly wrote:
> On Mon, Oct 09, 2023 at 03:49:29PM +0100, Mark Brown wrote:
> > Actually, now I think about it we at least need an update to the frame
> > parser in userspace so it knows about the new frame. Without that it'll
On Tue, Oct 10, 2023 at 10:57:02AM +0100, Joey Gouly wrote:
> On Thu, Oct 05, 2023 at 03:34:29PM +0100, Mark Brown wrote:
> > On Wed, Sep 27, 2023 at 03:01:18PM +0100, Joey Gouly wrote:
> > > Add PKEY support to signals, by saving and restoring POR_EL0 from the
> > &g
-list test code")
Signed-off-by: Mark Brown
---
tools/testing/selftests/kvm/get-reg-list.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/kvm/get-reg-list.c
b/tools/testing/selftests/kvm/get-reg-list.c
index be7bf5224434..dd62a6976c0d 100644
--- a/tools/testing/sel
oduce vcpu
configs")
Reviewed-by: Andrew Jones
Signed-off-by: Mark Brown
---
Changes in v2:
- Update Fixes: tag.
- Link to v1:
https://lore.kernel.org/r/20231013-kvm-get-reg-list-str-init-v1-1-034f370ff...@kernel.org
---
tools/testing/selftests/kvm/get-reg-list.c | 1 +
1 file changed, 1
done in a moderately
invasive fashion where we move from a sequence of function calls to having
an array of test parameters. This hopefully also makes it a little easier
to see what the tests are doing when looking at both the source and the
logs.
Signed-off-by: Mark Brown
---
tools/testing/s
On Thu, Oct 05, 2023 at 06:23:10PM +0100, Catalin Marinas wrote:
> I haven't checked how many clone() or clone3() uses outside the libc are
> (I tried some quick search in Debian but did not dig into the specifics
> to see how generic that code is). I agree that having to change valid
> cases outs
ize = 0,
.expected = 0,
.test_mode = CLONE3_ARGS_NO_TEST,
+ .filter = timens_unsupported,
},
{
.name = "exit signal (SIGCHLD) in flags",
---
base-commit: 8d4099dd0727acfc8b0f644eacaf852f9d5dc649
change-id: 20231019-kselftest-clone3-time-ns-730b6f4187c7
Best regards,
--
Mark Brown
On Thu, Oct 19, 2023 at 04:35:38PM -0700, Andrew Morton wrote:
> On Fri, 20 Oct 2023 00:08:12 +0100 Mark Brown wrote:
> > Use a filter function to skip the time namespace test on systems with
> > !CONFIG_TIME_NS. This reworks a fix originally done by Tiezhu Yang prior
> >
cs-v6-0-78e55deaa...@kernel.org/
[2]
https://lore.kernel.org/r/20231018-kselftest-clone3-output-v1-1-12b7c50ea...@kernel.org
Signed-off-by: Mark Brown
---
Mark Brown (5):
mm: Introduce ARCH_HAS_USER_SHADOW_STACK
fork: Add shadow stack support to clone3()
selftests/clone3: Factor
Since multiple architectures have support for shadow stacks and we need to
select support for this feature in several places in the generic code
provide a generic config option that the architectures can select.
Suggested-by: David Hildenbrand
Signed-off-by: Mark Brown
---
arch/x86/Kconfig
that
into the shadow stack code rather than individual fields.
Signed-off-by: Mark Brown
---
arch/x86/include/asm/shstk.h | 11 +++
arch/x86/kernel/process.c| 2 +-
arch/x86/kernel/shstk.c | 36 +++-
include/linux/sched/task.h | 2 ++
include
lone3() may return
-E2BIG due to the use of newer struct versions. Currently no tests need
this but it will become an issue for testing clone3() support for shadow
stacks, the support for shadow stacks is already present on x86.
Signed-off-by: Mark Brown
---
tools/testing/selftests/clone3/clone3.
change.
Signed-off-by: Mark Brown
---
tools/testing/selftests/clone3/clone3.c | 77 -
1 file changed, 37 insertions(+), 40 deletions(-)
diff --git a/tools/testing/selftests/clone3/clone3.c
b/tools/testing/selftests/clone3/clone3.c
index 9429d361059e..afe383689a67
map_shadow_stack().
Signed-off-by: Mark Brown
---
tools/testing/selftests/clone3/clone3.c | 97 +++
tools/testing/selftests/clone3/clone3_selftests.h | 5 ++
2 files changed, 102 insertions(+)
diff --git a/tools/testing/selftests/clone3/clone3.c
b/tools/testing/selftests
On Mon, Oct 23, 2023 at 04:32:22PM +, Edgecombe, Rick P wrote:
> On Mon, 2023-10-23 at 14:20 +0100, Mark Brown wrote:
> +Some security folks
I *think* I captured everyone for future versions but I might've missed
some, it's a long Cc list.
> > Add parameters to c
ogram that duplicates the boilerplace for tracing a
target and doesn't actually run the traced program.
Signed-off-by: Mark Brown
---
Mark Brown (21):
arm64/sysreg: Add definition for ID_AA64PFR2_EL1
arm64/sysreg: Update ID_AA64ISAR2_EL1 defintion for DDI0601 2023-09
arm64/sysreg:
DDI0601 2023-09 defines a new system register ID_AA64PFR2_EL1 which
enumerates FPMR and some new MTE features. Add a definition of this
register.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 21 +
1 file changed, 21 insertions(+)
diff --git a/arch/arm64/tools
DDI0601 2023-09 defines some new fields in previously RES0 space in
ID_AA64ISAR2_EL1, together with one new enum value. Update the system
register definition to reflect this.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 24 ++--
1 file changed, 22 insertions(+), 2
DDI0601 2023-09 adds a new system register ID_AA64ISAR3_EL1 enumerating
new floating point and TLB invalidation features. Add a defintion for it.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 17 +
1 file changed, 17 insertions(+)
diff --git a/arch/arm64/tools/sysreg
DDI0601 2023-09 defines a new feature register ID_AA64FPFR0_EL1 which
enumerates a number of FP8 related features. Add a definition for it.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 29 +
1 file changed, 29 insertions(+)
diff --git a/arch/arm64/tools
The 2023-09 release of DDI0601 defines a number of new feature enumeration
fields in ID_AA64SMFR0_EL1. Add these fields.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 30 +++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/tools
DDI0601 2023-09 defines new fields in HCRX_EL2 controlling access to new
system registers, update our definition of HCRX_EL2 to reflect this.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/tools/sysreg b
DDI0601 2023-09 defines some new fields in SCTLR_EL1 controlling new MTE
and floating point features. Update our sysreg definition to reflect these.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/tools
DDI0601 2023-09 defines a new sysrem register FPMR (Floating Point Mode
Register) which configures the new FP8 features. Add a definition of this
register.
Signed-off-by: Mark Brown
---
arch/arm64/tools/sysreg | 23 +++
1 file changed, 23 insertions(+)
diff --git a/arch
.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/kvm_arm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 1095c6647e96..ef033c6c745c 100644
--- a/arch/arm64/include/asm/kvm_arm.h
+++ b/arch/arm64/include
The 2023 architecture extensions have defined several new ID registers,
hook them up to the cpufeature code so we can add feature checks and hwcaps
based on their contents.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/cpu.h | 3 +++
arch/arm64/kernel/cpufeature.c | 28
Add a new regset to expose FPMR via ptrace. It is not added to the FPSIMD
registers since that structure is exposed elsewhere without any allowance
for extension we don't add there.
Signed-off-by: Mark Brown
---
arch/arm64/kernel/ptrace.c | 42 ++
in
means that it is not practical to extend that
directly.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/cpufeature.h | 5 +
arch/arm64/include/asm/fpsimd.h | 2 ++
arch/arm64/include/asm/kvm_host.h | 1 +
arch/arm64/include/asm/processor.h | 2 ++
arch/arm64/kernel/cpufeature.c
Expose FPMR in the signal context on systems where it is supported. The
kernel validates the exact size of the FPSIMD registers so we can't readily
add it to fpsimd_context without disruption.
Signed-off-by: Mark Brown
---
arch/arm64/include/uapi/asm/sigcontext.h | 8 +
arch/arm64/k
Teach the generic signal frame parsing code about the newly added FPMR
frame, avoiding warnings every time one is generated.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/signal/testcases/testcases.c | 8
tools/testing/selftests/arm64/signal/testcases/testcases.h | 1 +
2
The 2023 architecture extensions include a large number of floating point
features, most of which simply add new instructions. Add hwcaps so that
userspace can enumerate these features.
Signed-off-by: Mark Brown
---
Documentation/arch/arm64/elf_hwcaps.rst | 49
Verify that a FPMR frame is generated on systems that support FPMR and not
generated otherwise.
Signed-off-by: Mark Brown
---
tools/testing/selftests/arm64/signal/.gitignore| 1 +
.../arm64/signal/testcases/fpmr_siginfo.c | 82 ++
2 files changed, 83 insertions
FPMR specific trap and rely on the floating point access trap to
detect guest floating point usage.
Signed-off-by: Mark Brown
---
arch/arm64/include/asm/kvm_arm.h| 2 +-
arch/arm64/include/asm/kvm_host.h | 4 +++-
arch/arm64/kvm/fpsimd.c | 20
1 - 100 of 886 matches
Mail list logo