[RFC PATCH 6/6] sparc: Use update_thread_flag()

2018-04-19 Thread Dave Martin
This patch uses the new update_thread_flag() helper to simplify an if () set; else clear; construct. No functional change. Signed-off-by: Dave Martin Cc: "David S. Miller" --- arch/sparc/include/asm/elf_64.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/

[RFC PATCH 4/6] MIPS: Use update{,_tsk}_thread_flag()

2018-04-19 Thread Dave Martin
This patch uses the new update_thread_flag() helpers to simplify a couple of if () set; else clear; constructs. No functional change. Signed-off-by: Dave Martin Cc: Ralf Baechle Cc: James Hogan --- arch/mips/kernel/elf.c | 10 ++ arch/mips/kernel/process.c | 15

[RFC PATCH 5/6] powerpc: Use update_thread_flag()

2018-04-19 Thread Dave Martin
This patch uses the new update_thread_flag() helper to simplify a couple of if () set; else clear; constructs. No functional change. Signed-off-by: Dave Martin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman --- arch/powerpc/include/asm/elf.h | 10 ++ 1 file

[RFC PATCH 3/6] arm64: Use update{,_tsk}_thread_flag()

2018-04-19 Thread Dave Martin
This patch uses the new update_thread_flag() helpers to simplify a couple of if () set; else clear; constructs. No functional change. Signed-off-by: Dave Martin Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/fpsimd.c | 19 +++ 1 file changed, 7 insertions(+), 12

[RFC PATCH 2/6] ARM: Use update_thread_flag()

2018-04-19 Thread Dave Martin
This patch uses the new update_thread_flag() helper to simplify an if () set; else clear; construct. No functional change. Signed-off-by: Dave Martin Cc: Russell King --- arch/arm/kernel/elf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/kernel/elf.c b

[RFC PATCH 1/6] thread_info: Add update_thread_flag() helpers

2018-04-19 Thread Dave Martin
, cond) which do the equivalent of: if (cond) set*_thread_flag([...,] flag); else clear*_thread_flag([...,] flag); Signed-off-by: Dave Martin Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Oleg Nesterov --- Note, this patch assumes

[RFC PATCH 0/6] Simplify setting thread flags to a particular value

2018-04-19 Thread Dave Martin
p. The core changes are in the first patch; other changes are split per-arch. Dave Martin (6): thread_info: Add update_thread_flag() helpers ARM: Use update_thread_flag() arm64: Use update{,_tsk}_thread_flag() MIPS: Use update{,_tsk}_thread_flag() powerpc: Use update_thread

Re: [PATCH v15 04/10] arm64: Kprobes with single stepping support

2016-07-27 Thread Dave Martin
On Tue, Jul 26, 2016 at 05:55:43PM +0100, Catalin Marinas wrote: > On Tue, Jul 26, 2016 at 10:50:08AM +0100, Daniel Thompson wrote: > > On 25/07/16 18:13, Catalin Marinas wrote: > > >On Fri, Jul 22, 2016 at 11:51:32AM -0400, David Long wrote: > > >>OK, it sounds like an improvement. I do worry a li

Re: [PATCH v15 04/10] arm64: Kprobes with single stepping support

2016-07-27 Thread Dave Martin
On Wed, Jul 27, 2016 at 12:19:59PM +0100, Daniel Thompson wrote: [...] > It is interesting to note that you force large_func() to stack its arguments > (by providing 8 dummy int arguments first) then the implicit > pass-by-reference behavior is still preserved even for a stacked argument; > large

Re: [sample] A sample program for MRS emulation

2016-11-30 Thread Dave Martin
On Wed, Nov 30, 2016 at 03:15:01PM +, Suzuki K Poulose wrote: > Here is a sample program which demonstrates how to use mrs > emulation to fetch the ID registers. Are we planning to add this in Documentation/? If so, we might want some tweaks (noted below). > > 8> > /* > * Sample pr

[RFC PATCH v2 00/41] Scalable Vector Extension (SVE) core support

2017-03-22 Thread Dave Martin
isters, or (more rarely) P-registers or FFR would be unexpectedly replaced with zeros or stale data belonging to the same task. Thus I have seen no evidence that suggests non-SVE systems can be affected, but it's difficult to say for certain. I have a strong suspicion that the complexit

[RFC PATCH v2 29/41] prctl: Add skeleton for PR_SVE_{SET,GET}_VL controls

2017-03-22 Thread Dave Martin
}_task_vl() will be fleshed out with actual functionality in subsequent patches. Signed-off-by: Dave Martin --- arch/arm64/include/asm/fpsimd.h| 16 arch/arm64/include/asm/processor.h | 4 arch/arm64/kernel/fpsimd.c | 13 + include/uapi/linux/prctl.h

[RFC PATCH v2 41/41] arm64/sve: Documentation: Add overview of the SVE userspace ABI

2017-03-22 Thread Dave Martin
This patch adds initial documentation of the ABI provided by the kernel to enable userspace software to make use of SVE. Signed-off-by: Dave Martin --- Documentation/arm64/sve.txt | 475 1 file changed, 475 insertions(+) create mode 100644

[RFC PATCH v2 33/41] arm64/sve: Wire up vector length control prctl() calls

2017-03-22 Thread Dave Martin
-- this behaviour will be refined in susequent patches. Signed-off-by: Dave Martin --- arch/arm64/include/asm/fpsimd.h | 3 ++ arch/arm64/kernel/fpsimd.c | 65 +++-- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm

Re: [PATCH 00/22] arm64: Consolidate CPU feature handling

2015-09-23 Thread Dave Martin
On Wed, Sep 16, 2015 at 03:20:58PM +0100, Suzuki K. Poulose wrote: > From: "Suzuki K. Poulose" > > This is an updated reincarnation of my "arm64: Expose CPU feature registers" > series [1], which does much more. [...] Do you get whitespace errors for some patches in this series? git am complai

Re: [PATCH 07/22] arm64: Keep track of CPU feature registers

2015-09-25 Thread Dave Martin
On Wed, Sep 16, 2015 at 03:21:05PM +0100, Suzuki K. Poulose wrote: > From: "Suzuki K. Poulose" > > This patch adds an infrastructure to keep track of the CPU feature > registers on the system. For each register, the infrastructure keeps > track of the system wide safe value of the feature bits. A

Re: Question about the sparse memory section size

2015-09-22 Thread Dave Martin
On Tue, Sep 22, 2015 at 04:14:21PM +0800, chenfeng wrote: > Hi all, > The sparse memory section size, SECTION_SIZE_BITS, currently is 1GB > for arm64 by default. However, it might generate wasted memmap memory > space for those memory sections less than 1GB. e.g. > > for 512MB memory section, stil

[RFC REPOST] lib/bug: Show backtrace for generic WARN

2015-07-13 Thread Dave Martin
cted, otherwise show_stack() is used as a fallback. Signed-off-by: Dave Martin --- For arches that don't need anything except the stack pointer to start the backtrace, we might be able to define a generic arch_dump_backtrace() that invokes show_stack with sp instead of just assuming the sp is

Re: arm64: Register modification during syscall entry/exit stop

2020-05-27 Thread Dave Martin
On Wed, May 27, 2020 at 10:55:29AM +0100, Will Deacon wrote: > On Sun, May 24, 2020 at 02:56:35AM -0400, Keno Fischer wrote: > > Just ran into this issue again, with what I think may be most compelling > > example yet why this is problematic: > > > > The tracee incurred a signal, we PTRACE_SYSEMU'

Re: [PATCH] arm64: vdso32: force vdso32 to be compiled as -marm

2020-05-27 Thread Dave Martin
On Tue, May 26, 2020 at 09:45:05PM +0100, Will Deacon wrote: > On Tue, 26 May 2020 10:31:14 -0700, Nick Desaulniers wrote: > > Custom toolchains that modify the default target to -mthumb cannot It's probably too late to water this down, but it's unfortunate to have this comment in the upstream com

Re: [PATCH v3 3/9] efi/libstub: Remove .note.gnu.property

2020-06-24 Thread Dave Martin
On Wed, Jun 24, 2020 at 04:26:46PM +0100, Will Deacon wrote: > On Wed, Jun 24, 2020 at 02:48:55PM +0100, Dave Martin wrote: > > On Wed, Jun 24, 2020 at 12:26:47PM +0100, Will Deacon wrote: > > > On Wed, Jun 24, 2020 at 12:46:32PM +0200, Ard Biesheuvel wrote: > > > >

Re: [PATCH v3 3/9] efi/libstub: Remove .note.gnu.property

2020-06-24 Thread Dave Martin
On Wed, Jun 24, 2020 at 05:48:41PM +0200, Ard Biesheuvel wrote: > On Wed, 24 Jun 2020 at 17:45, Kees Cook wrote: > > > > On Wed, Jun 24, 2020 at 05:31:06PM +0200, Ard Biesheuvel wrote: > > > On Wed, 24 Jun 2020 at 17:21, Kees Cook wrote: > > > > > > > > On Wed, Jun 24, 2020 at 12:46:32PM +0200, A

Re: [PATCH v3 3/9] efi/libstub: Remove .note.gnu.property

2020-06-24 Thread Dave Martin
On Wed, Jun 24, 2020 at 06:40:48PM +0200, Ard Biesheuvel wrote: > On Wed, 24 Jun 2020 at 18:29, Dave Martin wrote: > > > > On Wed, Jun 24, 2020 at 05:48:41PM +0200, Ard Biesheuvel wrote: > > > On Wed, 24 Jun 2020 at 17:45, Kees Cook wrote: > > > > > > &g

Re: [PATCH] arm64: fpsimd: Added API to manage fpsimd state inside kernel

2020-06-15 Thread Dave Martin
On Thu, Jun 11, 2020 at 03:11:02PM +0100, Catalin Marinas wrote: > On Thu, Jun 11, 2020 at 06:42:12PM +0900, Wooyeon Kim wrote: > > I am in charge of camera driver development in Samsung S.LSI division. > > > > In order to guarantee real time processing such as Camera 3A algorithm in > > current o

Re: [PATCH 5/5] perf: arm_spe: Decode SVE events

2020-10-05 Thread Dave Martin
On Wed, Sep 30, 2020 at 07:04:53PM +0800, Leo Yan wrote: [...] > > > > > >> diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c > > > > > >> b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c > > > > > >> index a033f34846a6..f0c369259554 100644 > > > > > >> --- a/tools/perf/u

Re: [RFC PATCH 1/4] x86/signal: Introduce helpers to get the maximum signal frame size

2020-10-05 Thread Dave Martin
On Tue, Sep 29, 2020 at 01:57:43PM -0700, Chang S. Bae wrote: > Signal frames do not have a fixed format and can vary in size when a number > of things change: support XSAVE features, 32 vs. 64-bit apps. Add the code > to support a runtime method for userspace to dynamically discover how large > a

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-05 Thread Dave Martin
On Tue, Sep 29, 2020 at 01:57:42PM -0700, Chang S. Bae wrote: > During signal entry, the kernel pushes data onto the normal userspace > stack. On x86, the data pushed onto the user stack includes XSAVE state, > which has grown over time as new features and larger registers have been > added to the

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-06 Thread Dave Martin
On Mon, Oct 05, 2020 at 10:17:06PM +0100, H.J. Lu wrote: > On Mon, Oct 5, 2020 at 6:45 AM Dave Martin wrote: > > > > On Tue, Sep 29, 2020 at 01:57:42PM -0700, Chang S. Bae wrote: > > > During signal entry, the kernel pushes data onto the normal userspace > > > st

Re: [BUG][PATCH] arm64: bti: fix BTI to handle local indirect branches

2020-10-06 Thread Dave Martin
On Mon, Oct 05, 2020 at 02:24:47PM -0500, Jeremy Linton wrote: > Hi, > > On 10/5/20 1:54 PM, Ard Biesheuvel wrote: > >On Mon, 5 Oct 2020 at 20:18, Jeremy Linton wrote: > >> > >>The AES code uses a 'br x7' as part of a function called by > >>a macro, that ends up needing a BTI_J as a target. > > >

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon wrote: > On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > > The AES code uses a 'br x7' as part of a function called by > > a macro. That branch needs a bti_j as a target. This results > > in a panic as seen below. Instead of try

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 11:25:11AM +0100, Catalin Marinas wrote: > On Tue, Oct 06, 2020 at 11:01:21AM +0100, Dave P Martin wrote: > > On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon wrote: > > > On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > > > > The AES code uses a 'br x7'

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 05:12:29AM -0700, H.J. Lu wrote: > On Tue, Oct 6, 2020 at 2:25 AM Dave Martin wrote: > > > > On Mon, Oct 05, 2020 at 10:17:06PM +0100, H.J. Lu wrote: > > > On Mon, Oct 5, 2020 at 6:45 AM Dave Martin wrote: > > > > > > > > O

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 08:18:03AM -0700, H.J. Lu wrote: > On Tue, Oct 6, 2020 at 5:12 AM H.J. Lu wrote: > > > > On Tue, Oct 6, 2020 at 2:25 AM Dave Martin wrote: > > > > > > On Mon, Oct 05, 2020 at 10:17:06PM +0100, H.J. Lu wrote: > > > > On M

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 08:34:06AM -0700, H.J. Lu wrote: > On Tue, Oct 6, 2020 at 8:25 AM Dave Martin wrote: > > > > On Tue, Oct 06, 2020 at 05:12:29AM -0700, H.J. Lu wrote: > > > On Tue, Oct 6, 2020 at 2:25 AM Dave Martin wrote: > > > > > > > > O

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 08:33:47AM -0700, Dave Hansen wrote: > On 10/6/20 8:25 AM, Dave Martin wrote: > > Or are people reporting real stack overruns on x86 today? > > We have real overruns. We have ~2800 bytes of XSAVE (regisiter) state > mostly from AVX-512, and a 2048 byte M

Re: [PATCH 5/5] perf: arm_spe: Decode SVE events

2020-09-30 Thread Dave Martin
On Tue, Sep 29, 2020 at 10:19:02AM +0800, Leo Yan wrote: > On Mon, Sep 28, 2020 at 03:47:56PM +0100, Dave Martin wrote: > > On Mon, Sep 28, 2020 at 02:59:34PM +0100, André Przywara wrote: > > > On 28/09/2020 14:21, Dave Martin wrote: > > > > > > Hi Dave, >

Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack

2020-08-26 Thread Dave Martin
On Tue, Aug 25, 2020 at 04:34:27PM -0700, Yu, Yu-cheng wrote: > On 8/25/2020 4:20 PM, Dave Hansen wrote: > >On 8/25/20 2:04 PM, Yu, Yu-cheng wrote: > I think this is more arch-specific.  Even if it becomes a new syscall, > we still need to pass the same parameters. > >>> > >>>Right, but wit

Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack

2020-08-26 Thread Dave Martin
On Wed, Aug 26, 2020 at 06:51:48PM +0200, Florian Weimer wrote: > * Dave Martin: > > > On Tue, Aug 25, 2020 at 04:34:27PM -0700, Yu, Yu-cheng wrote: > >> On 8/25/2020 4:20 PM, Dave Hansen wrote: > >> >On 8/25/20 2:04 PM, Yu, Yu-cheng wrote: > >> >>&

Re: [BUG][PATCH v3] crypto: arm64: Use x16 with indirect branch to bti_c

2020-10-07 Thread Dave Martin
> crypto_skcipher_encrypt+0x50/0x84 > test_skcipher_vec_cfg+0x224/0x5f0 > test_skcipher+0xbc/0x120 > alg_test_skcipher+0xa0/0x1b0 > alg_test+0x3dc/0x47c > cryptomgr_test+0x38/0x60 > > Fixes: 0e89640b640d ("crypto: arm64 - Use modern annotations for assembly

Re: [RFC PATCH 1/4] x86/signal: Introduce helpers to get the maximum signal frame size

2020-10-07 Thread Dave Martin
On Tue, Oct 06, 2020 at 05:45:24PM +, Bae, Chang Seok wrote: > On Mon, 2020-10-05 at 14:42 +0100, Dave Martin wrote: > > On Tue, Sep 29, 2020 at 01:57:43PM -0700, Chang S. Bae wrote: > > > > > > +/* > > > + * The FP state frame contains an XSAVE buffer

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-07 Thread Dave Martin
On Tue, Oct 06, 2020 at 08:21:00PM +0200, Florian Weimer wrote: > * Dave Martin via Libc-alpha: > > > On Tue, Oct 06, 2020 at 08:33:47AM -0700, Dave Hansen wrote: > >> On 10/6/20 8:25 AM, Dave Martin wrote: > >> > Or are people reporting real stack overruns on x

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-07 Thread Dave Martin
On Tue, Oct 06, 2020 at 11:30:42AM -0700, Dave Hansen wrote: > On 10/6/20 10:00 AM, Dave Martin wrote: > > On Tue, Oct 06, 2020 at 08:33:47AM -0700, Dave Hansen wrote: > >> On 10/6/20 8:25 AM, Dave Martin wrote: > >>> Or are people reporting real stack overruns o

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-07 Thread Dave Martin
On Tue, Oct 06, 2020 at 10:44:14AM -0700, H.J. Lu wrote: > On Tue, Oct 6, 2020 at 9:55 AM Dave Martin wrote: > > > > On Tue, Oct 06, 2020 at 08:34:06AM -0700, H.J. Lu wrote: > > > On Tue, Oct 6, 2020 at 8:25 AM Dave Martin wrote: > > > > > > > > O

Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size

2020-10-07 Thread Dave Martin
On Wed, Oct 07, 2020 at 06:30:03AM -0700, H.J. Lu wrote: > On Wed, Oct 7, 2020 at 3:47 AM Dave Martin wrote: > > > > On Tue, Oct 06, 2020 at 10:44:14AM -0700, H.J. Lu wrote: [...] > > > I updated my glibc patch to add both _SC_MINSIGSTKSZ and _SC_SIGSTKSZ. > > >

Re: [PATCH 5/5] perf: arm_spe: Decode SVE events

2020-09-29 Thread Dave Martin
On Tue, Sep 29, 2020 at 10:19:02AM +0800, Leo Yan wrote: > On Mon, Sep 28, 2020 at 03:47:56PM +0100, Dave Martin wrote: > > On Mon, Sep 28, 2020 at 02:59:34PM +0100, André Przywara wrote: > > > On 28/09/2020 14:21, Dave Martin wrote: > > > > > > Hi Dave, >

Re: [RFC PATCH 1/4] x86/signal: Introduce helpers to get the maximum signal frame size

2020-10-12 Thread Dave Martin
On Thu, Oct 08, 2020 at 10:43:50PM +, Bae, Chang Seok wrote: > On Wed, 2020-10-07 at 11:05 +0100, Dave Martin wrote: > > On Tue, Oct 06, 2020 at 05:45:24PM +, Bae, Chang Seok wrote: > > > On Mon, 2020-10-05 at 14:42 +0100, Dave Martin wrote: > > > > On Tue, Se

Re: [PATCH 5/5] perf: arm_spe: Decode SVE events

2020-09-28 Thread Dave Martin
On Tue, Sep 22, 2020 at 11:12:25AM +0100, Andre Przywara wrote: > The Scalable Vector Extension (SVE) is an ARMv8 architecture extension > that introduces very long vector operations (up to 2048 bits). (8192, in fact, though don't expect to see that on real hardware any time soon... qemu and the

Re: [PATCH 5/5] perf: arm_spe: Decode SVE events

2020-09-28 Thread Dave Martin
On Mon, Sep 28, 2020 at 02:59:34PM +0100, André Przywara wrote: > On 28/09/2020 14:21, Dave Martin wrote: > > Hi Dave, > > > On Tue, Sep 22, 2020 at 11:12:25AM +0100, Andre Przywara wrote: > >> The Scalable Vector Extension (SVE) is an ARMv8 architecture extension >

Re: [PATCH V2] arm64/cpuinfo: Move HWCAP name arrays alongside their bit definitions

2020-05-13 Thread Dave Martin
On Thu, May 07, 2020 at 06:59:10PM +0530, Anshuman Khandual wrote: > All HWCAP name arrays (i.e hwcap_str, compat_hwcap_str, compat_hwcap2_str) > that are scanned for /proc/cpuinfo output are detached from their bit fild > definitions making it difficult to corelate. This is also bit problematic >

Re: [PATCH v7 1/9] firmware: arm_scmi: Add notification protocol-registration

2020-05-13 Thread Dave Martin
On Mon, May 11, 2020 at 11:04:03PM +0100, Cristian Marussi wrote: > Hi Dave > > thanks for the review first of all. > > On Wed, May 06, 2020 at 04:25:50PM +0100, Dave Martin wrote: > > On Mon, May 04, 2020 at 05:38:47PM +0100, Cristian Marussi wrote: > > > Add co

Re: [PATCH] arm64: fpsimd: Added API to manage fpsimd state inside kernel

2020-06-08 Thread Dave Martin
On Fri, Jun 05, 2020 at 11:37:05AM +0100, Mark Rutland wrote: > Hi Wooyeon, > > There are a *lot* of people Cc' here, many of whomo will find this > irrelevant. Please try to keep the Cc list constrained to a reasonable > number of interested parties. > > On Fri, Jun 05, 2020 at 04:30:52PM +0900,

Re: [PATCH 0/4] kselftests/arm64: add PAuth tests

2020-09-02 Thread Dave Martin
On Fri, Aug 28, 2020 at 02:16:02PM +0100, Boyan Karatotev wrote: > Pointer Authentication (PAuth) is a security feature introduced in ARMv8.3. > It introduces instructions to sign addresses and later check for potential > corruption using a second modifier value and one of a set of keys. The > sign

Re: [PATCH 1/4] kselftests/arm64: add a basic Pointer Authentication test

2020-09-02 Thread Dave Martin
On Fri, Aug 28, 2020 at 02:16:03PM +0100, Boyan Karatotev wrote: > PAuth signs and verifies return addresses on the stack. It does so by > inserting a Pointer Authentication code (PAC) into some of the unused top > bits of an address. This is achieved by adding paciasp/autiasp instructions > at the

Re: [PATCH 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys

2020-09-02 Thread Dave Martin
On Fri, Aug 28, 2020 at 02:16:05PM +0100, Boyan Karatotev wrote: > Kernel documentation states that it will change PAuth keys on exec() calls. > > Verify that all keys are correctly switched to new ones. > > Cc: Shuah Khan > Cc: Catalin Marinas > Cc: Will Deacon > Signed-off-by: Boyan Karatote

Re: [PATCH v2 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys

2020-09-02 Thread Dave Martin
On Mon, Aug 31, 2020 at 12:04:49PM +0100, Boyan Karatotev wrote: > Kernel documentation states that it will change PAuth keys on exec() calls. > > Verify that all keys are correctly switched to new ones. > > Cc: Shuah Khan > Cc: Catalin Marinas > Cc: Will Deacon > Reviewed-by: Vincenzo Frascin

Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack

2020-09-02 Thread Dave Martin
On Tue, Sep 01, 2020 at 11:11:37AM -0700, Dave Hansen wrote: > On 9/1/20 10:45 AM, Andy Lutomirski wrote: > >>> For arm64 (and sparc etc.) we continue to use the regular mmap/mprotect > >>> family of calls. One or two additional arch-specific mmap flags are > >>> sufficient for now. > >>> > >>> Is

Re: [PATCH 1/4] kselftests/arm64: add a basic Pointer Authentication test

2020-09-07 Thread Dave Martin
On Thu, Sep 03, 2020 at 11:12:02AM +0100, Boyan Karatotev wrote: > On 02/09/2020 17:49, Dave Martin wrote: > > On Fri, Aug 28, 2020 at 02:16:03PM +0100, Boyan Karatotev wrote: > >> PAuth signs and verifies return addresses on the stack. It does so by > >> inserting a

Re: [PATCH 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys

2020-09-07 Thread Dave Martin
On Thu, Sep 03, 2020 at 11:20:25AM +0100, Boyan Karatotev wrote: > On 02/09/2020 18:00, Dave Martin wrote: > > On Fri, Aug 28, 2020 at 02:16:05PM +0100, Boyan Karatotev wrote: > >> Kernel documentation states that it will change PAuth keys on exec() calls. > >> &g

Re: [PATCH 0/4] kselftests/arm64: add PAuth tests

2020-09-07 Thread Dave Martin
On Thu, Sep 03, 2020 at 10:46:33AM +0100, Boyan Karatotev wrote: > On 02/09/2020 17:48, Dave Martin wrote: > > On Fri, Aug 28, 2020 at 02:16:02PM +0100, Boyan Karatotev wrote: > >> Pointer Authentication (PAuth) is a security feature introduced in ARMv8.3. > >> It intr

Re: [PATCH v2 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys

2020-09-07 Thread Dave Martin
On Thu, Sep 03, 2020 at 11:48:37AM +0100, Boyan Karatotev wrote: > On 02/09/2020 18:08, Dave Martin wrote: > > On Mon, Aug 31, 2020 at 12:04:49PM +0100, Boyan Karatotev wrote: > >> +/* > >> + * fork() does not change keys. Only exec() does so call a worker program. >

Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack

2020-09-01 Thread Dave Martin
On Thu, Aug 27, 2020 at 06:26:11AM -0700, H.J. Lu wrote: > On Wed, Aug 26, 2020 at 12:57 PM Dave Hansen wrote: > > > > On 8/26/20 11:49 AM, Yu, Yu-cheng wrote: > > >> I would expect things like Go and various JITs to call it directly. > > >> > > >> If we wanted to be fancy and add a potentially mo

Re: BTI interaction between seccomp filters in systemd and glibc mprotect calls, causing service failures

2020-10-27 Thread Dave Martin
On Mon, Oct 26, 2020 at 05:45:42PM +0100, Florian Weimer via Libc-alpha wrote: > * Dave Martin via Libc-alpha: > > > Would it now help to add something like: > > > > int mchangeprot(void *addr, size_t len, int old_flags, int new_flags) > > { > > int re

Re: [PATCH v4 06/21] perf arm-spe: Refactor printing string to buffer

2020-10-27 Thread Dave Martin
This patch also moves the variable 'blen' as the function's local > variable, this allows to remove the unnecessary braces and improve the > readability. > > Suggested-by: Dave Martin > Signed-off-by: Leo Yan > Reviewed-by: Andre Przywara > --- > .../ar

Re: BTI interaction between seccomp filters in systemd and glibc mprotect calls, causing service failures

2020-10-27 Thread Dave Martin
On Mon, Oct 26, 2020 at 05:39:42PM -0500, Jeremy Linton via Libc-alpha wrote: > Hi, > > On 10/26/20 12:52 PM, Dave Martin wrote: > >On Mon, Oct 26, 2020 at 04:57:55PM +, Szabolcs Nagy via Libc-alpha wrote: > >>The 10/26/2020 16:24, Dave Martin via Libc-alpha wr

Re: BTI interaction between seccomp filters in systemd and glibc mprotect calls, causing service failures

2020-10-26 Thread Dave Martin
On Mon, Oct 26, 2020 at 02:52:46PM +, Catalin Marinas via Libc-alpha wrote: > On Sat, Oct 24, 2020 at 02:01:30PM +0300, Topi Miettinen wrote: > > On 23.10.2020 12.02, Catalin Marinas wrote: > > > On Thu, Oct 22, 2020 at 01:02:18PM -0700, Kees Cook wrote: > > > > Regardless, it makes sense to me

Re: BTI interaction between seccomp filters in systemd and glibc mprotect calls, causing service failures

2020-10-26 Thread Dave Martin
On Wed, Oct 21, 2020 at 10:44:46PM -0500, Jeremy Linton via Libc-alpha wrote: > Hi, > > There is a problem with glibc+systemd on BTI enabled systems. Systemd > has a service flag "MemoryDenyWriteExecute" which uses seccomp to deny > PROT_EXEC changes. Glibc enables BTI only on segments which are m

Re: BTI interaction between seccomp filters in systemd and glibc mprotect calls, causing service failures

2020-10-26 Thread Dave Martin
On Mon, Oct 26, 2020 at 04:57:55PM +, Szabolcs Nagy via Libc-alpha wrote: > The 10/26/2020 16:24, Dave Martin via Libc-alpha wrote: > > Unrolling this discussion a bit, this problem comes from a few sources: > > > > 1) systemd is trying to implement a policy tha

Re: [PATCH v8 06/22] perf arm-spe: Refactor printing string to buffer

2020-11-11 Thread Dave Martin
7;blen' as the function's local > variable, this allows to remove the unnecessary braces and improve the > readability. > > Suggested-by: Dave Martin > Signed-off-by: Leo Yan > Reviewed-by: Andre Przywara Mostly looks fine to me now, thought there are a few potention

Re: [PATCH v8 06/22] perf arm-spe: Refactor printing string to buffer

2020-11-11 Thread Dave Martin
On Wed, Nov 11, 2020 at 03:53:20PM +, Dave Martin wrote: > On Wed, Nov 11, 2020 at 07:11:33AM +, Leo Yan wrote: > > When outputs strings to the decoding buffer with function snprintf(), > > SPE decoder needs to detects if any error returns from snprintf() and if > >

Re: [PATCH v8 07/22] perf arm-spe: Consolidate arm_spe_pkt_desc()'s return value

2020-11-11 Thread Dave Martin
ailing out in switch-cases, > it returns error at the end of arm_spe_pkt_desc(). > > This patch changes the caller arm_spe_dump() to respect the updated > return value semantics of arm_spe_pkt_desc(). > > Suggested-by: Dave Martin > Signed-off-by: Leo Yan >

Re: [PATCH v8 06/22] perf arm-spe: Refactor printing string to buffer

2020-11-11 Thread Dave Martin
> >> arm_spe_pkt_snprintf() which is used to wrap up the complex logics, and > > >> it's used by the caller arm_spe_pkt_desc(). > > >> > > >> This patch also moves the variable 'blen' as the function's local > > >> variable,

Re: BTI interaction between seccomp filters in systemd and glibc mprotect calls, causing service failures

2020-11-04 Thread Dave Martin
On Thu, Oct 29, 2020 at 11:02:22AM +, Catalin Marinas via Libc-alpha wrote: > On Tue, Oct 27, 2020 at 02:15:22PM +, Dave P Martin wrote: > > I also wonder whether we actually care whether the pages are marked > > executable or not here; probably the flags can just be independent. This > >

Re: [PATCH v6 20/21] perf arm_spe: Decode memory tagging properties

2020-11-02 Thread Dave Martin
struct arm_spe_pkt { > > #define SPE_ADDR_PKT_GET_NS(v) (((v) & BIT_ULL(63)) >> > 63) > #define SPE_ADDR_PKT_GET_EL(v) (((v) & GENMASK_ULL(62, > 61)) >> 61) > +#define SPE_ADDR_PKT_GET_CH(v)

Re: [PATCH v6 06/21] perf arm-spe: Refactor printing string to buffer

2020-11-02 Thread Dave Martin
imes in a flow, the error is a cumulative value and simply > returns its final value. > > This patch also moves the variable 'blen' as the function's local > variable, this allows to remove the unnecessary braces and improve the > readability. > > Suggested-by:

Re: [PATCH v6 06/21] perf arm-spe: Refactor printing string to buffer

2020-11-03 Thread Dave Martin
On Tue, Nov 03, 2020 at 10:13:49AM +, André Przywara wrote: > On 03/11/2020 06:40, Leo Yan wrote: > > Hi Dave, Leo, > > > On Mon, Nov 02, 2020 at 05:06:53PM +, Dave Martin wrote: > >> On Fri, Oct 30, 2020 at 02:57:09AM +, Leo Yan wrote: > >>&g

Re: [PATCH v6 20/21] perf arm_spe: Decode memory tagging properties

2020-11-03 Thread Dave Martin
On Tue, Nov 03, 2020 at 06:51:01AM +, Leo Yan wrote: > On Mon, Nov 02, 2020 at 04:25:36PM +0000, Dave Martin wrote: > > On Fri, Oct 30, 2020 at 02:57:23AM +, Leo Yan wrote: > > > From: Andre Przywara > > > > > > When SPE records a physical addres

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-07-06 Thread Dave Martin
On Thu, Jul 02, 2020 at 08:23:02AM +0100, Will Deacon wrote: > On Wed, Jul 01, 2020 at 06:07:25PM +0100, Dave P Martin wrote: > > On Tue, Jun 30, 2020 at 06:37:34PM +0100, Will Deacon wrote: > > > When building with LTO, there is an increased risk of the compiler > > > converting an address depende

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-07-06 Thread Dave Martin
On Tue, Jun 30, 2020 at 06:37:34PM +0100, Will Deacon wrote: > When building with LTO, there is an increased risk of the compiler > converting an address dependency headed by a READ_ONCE() invocation > into a control dependency and consequently allowing for harmful > reordering by the CPU. > > Ens

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-07-06 Thread Dave Martin
On Mon, Jul 06, 2020 at 09:34:55AM -0700, Paul E. McKenney wrote: > On Mon, Jul 06, 2020 at 05:00:23PM +0100, Dave Martin wrote: > > On Thu, Jul 02, 2020 at 08:23:02AM +0100, Will Deacon wrote: > > > On Wed, Jul 01, 2020 at 06:07:25PM +0100, Dave P Martin wrote: > > > &

Re: [PATCH 3/3] Documentation: arm64/sve: drop duplicate words

2020-07-06 Thread Dave Martin
On Fri, Jul 03, 2020 at 01:51:10PM -0700, Randy Dunlap wrote: > Drop the doubled word "for". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: Catalin Marinas > Cc: Will Deacon > Cc: linux-arm-ker...@lists.infrad

Re: [PATCH 0/3] readfile(2): a new syscall to make open/read/close faster

2020-07-06 Thread Dave Martin
On Sat, Jul 04, 2020 at 04:02:46PM +0200, Greg Kroah-Hartman wrote: > Here is a tiny new syscall, readfile, that makes it simpler to read > small/medium sized files all in one shot, no need to do open/read/close. > This is especially helpful for tools that poke around in procfs or > sysfs, making a

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-07-07 Thread Dave Martin
On Mon, Jul 06, 2020 at 07:35:11PM +0100, Will Deacon wrote: > On Mon, Jul 06, 2020 at 05:08:20PM +0100, Dave Martin wrote: > > On Tue, Jun 30, 2020 at 06:37:34PM +0100, Will Deacon wrote: > > > diff --git a/arch/arm64/include/asm/rwonce.h > > > b/arch/arm64/include/

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-07-07 Thread Dave Martin
On Mon, Jul 06, 2020 at 10:36:28AM -0700, Paul E. McKenney wrote: > On Mon, Jul 06, 2020 at 06:05:57PM +0100, Dave Martin wrote: > > On Mon, Jul 06, 2020 at 09:34:55AM -0700, Paul E. McKenney wrote: > > > On Mon, Jul 06, 2020 at 05:00:23PM +0100, Dave Martin wrote: > > >

Re: [PATCH 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys

2020-09-16 Thread Dave Martin
On Tue, Sep 15, 2020 at 04:18:28PM +0100, Boyan Karatotev wrote: > On 07/09/2020 11:27 am, Dave Martin wrote: > > On Thu, Sep 03, 2020 at 11:20:25AM +0100, Boyan Karatotev wrote: > >> On 02/09/2020 18:00, Dave Martin wrote: > >>> On Fri, Aug 28, 2020 at 02:16:05P

Re: [PATCH v2] arm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGS

2019-06-12 Thread Dave Martin
-fno-stack-protector > > Use cc-disable-warning so that it gets disabled for GCC and does nothing > for Clang. > > Fixes: ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift") > Link: https://github.com/ClangBuiltLinux/linux/issues/511 > Reported-by: Q

Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-12 Thread Dave Martin
On Tue, Jun 11, 2019 at 12:31:34PM -0700, Yu-cheng Yu wrote: > On Tue, 2019-06-11 at 12:41 +0100, Dave Martin wrote: > > On Mon, Jun 10, 2019 at 07:24:43PM +0200, Florian Weimer wrote: > > > * Yu-cheng Yu: > > > > > > > To me, looking at PT_GNU_PROPERT

Re: [PATCH v7 22/27] binfmt_elf: Extract .note.gnu.property from an ELF file

2019-06-13 Thread Dave Martin
On Wed, Jun 12, 2019 at 12:04:01PM -0700, Yu-cheng Yu wrote: > On Wed, 2019-06-12 at 10:32 +0100, Dave Martin wrote: > > On Tue, Jun 11, 2019 at 12:31:34PM -0700, Yu-cheng Yu wrote: > > > On Tue, 2019-06-11 at 12:41 +0100, Dave Martin wrote: > > > > On Mon, Ju

Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Dave Martin
On Thu, Jun 13, 2019 at 01:28:21PM +0100, Catalin Marinas wrote: > On Thu, Jun 13, 2019 at 12:37:32PM +0100, Dave P Martin wrote: > > On Thu, Jun 13, 2019 at 11:15:34AM +0100, Vincenzo Frascino wrote: > > > On 12/06/2019 16:35, Catalin Marinas wrote: > > > > On Wed, Jun 12, 2019 at 03:21:10PM +0100

Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Dave Martin
On Thu, Jun 13, 2019 at 11:15:34AM +0100, Vincenzo Frascino wrote: > Hi Catalin, > > On 12/06/2019 16:35, Catalin Marinas wrote: > > Hi Vincenzo, > > > > Some minor comments below but it looks fine to me overall. Cc'ing > > Szabolcs as well since I'd like a view from the libc people. > > > > Th

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-13 Thread Dave Martin
On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: > From: Catalin Marinas > > It is not desirable to relax the ABI to allow tagged user addresses into > the kernel indiscriminately. This patch introduces a prctl() interface > for enabling or disabling the tagged ABI with a global

Re: [PATCH] arm64/sve: should not depend on

2019-06-13 Thread Dave Martin
On Thu, Jun 13, 2019 at 06:38:01PM +0200, Anisse Astier wrote: > Otherwise this will create userspace build issues for any program > (strace, qemu) that includes both (with musl libc) and > (which then includes ), like this: > > error: redefinition of 'struct prctl_mm_map' >struct

Re: [kvmtool PATCH v10 5/5] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-05-28 Thread Dave Martin
On Tue, May 28, 2019 at 06:18:16PM +0530, Amit Daniel Kachhap wrote: > Hi Dave, [...] > >Were you planning to repost this? > > > >Alternatively, I can fix up the diagnostic messages discussed here and > >post it together with the SVE support. I'll do that locally for now, > >but let me know what

Re: [RFC PATCH] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state

2019-04-11 Thread Dave Martin
On Thu, Apr 11, 2019 at 04:58:41PM +0100, Julien Grall wrote: > Hi Dave, > > On 4/5/19 4:07 PM, Dave Martin wrote: > >On Fri, Apr 05, 2019 at 10:02:45AM +0100, Julien Grall wrote: > >>>>+#ifdef CONFIG_KERNEL_MODE_NEON > >>>>+ > >>>>

Re: [PATCH v7 1/9] firmware: arm_scmi: Add notification protocol-registration

2020-05-06 Thread Dave Martin
On Mon, May 04, 2020 at 05:38:47PM +0100, Cristian Marussi wrote: > Add core SCMI Notifications protocol-registration support: allow protocols > to register their own set of supported events, during their initialization > phase. Notification core can track multiple platform instances by their > han

Re: [RFC PATCH 0/2] MTE support for KVM guest

2020-06-24 Thread Dave Martin
On Wed, Jun 24, 2020 at 10:38:48AM +0100, Catalin Marinas wrote: > On Tue, Jun 23, 2020 at 07:05:07PM +0100, Peter Maydell wrote: > > On Wed, 17 Jun 2020 at 13:39, Steven Price wrote: > > > These patches add support to KVM to enable MTE within a guest. It is > > > based on Catalin's v4 MTE user sp

Re: [PATCH v3 3/9] efi/libstub: Remove .note.gnu.property

2020-06-24 Thread Dave Martin
On Wed, Jun 24, 2020 at 12:26:47PM +0100, Will Deacon wrote: > On Wed, Jun 24, 2020 at 12:46:32PM +0200, Ard Biesheuvel wrote: > > On Wed, 24 Jun 2020 at 12:44, Will Deacon wrote: > > > On Tue, Jun 23, 2020 at 09:44:11PM -0700, Kees Cook wrote: > > > > On Tue, Jun 23, 2020 at 08:31:42PM -0700, 'Fa

Re: [RFC PATCH v2 00/41] Scalable Vector Extension (SVE) core support

2017-04-03 Thread Dave Martin
On Fri, Mar 31, 2017 at 04:28:16PM +0100, Ard Biesheuvel wrote: > On 22 March 2017 at 14:50, Dave Martin wrote: > > Hi Dave, > > > The Scalable Vector Extension (SVE) [1] is an extension to AArch64 which > > adds extra SIMD functionality and supports much larger vect

Re: [RFC PATCH v2 00/41] Scalable Vector Extension (SVE) core support

2017-04-03 Thread Dave Martin
On Mon, Apr 03, 2017 at 11:01:28AM +0100, Ard Biesheuvel wrote: > On 3 April 2017 at 10:45, Dave Martin wrote: > > On Fri, Mar 31, 2017 at 04:28:16PM +0100, Ard Biesheuvel wrote: [...] > >> Given the above, I think it is perfectly reasonable to conditionally > >> d

Re: [PATCH 00/11] ARMv8.3 pointer authentication userspace support

2017-07-21 Thread Dave Martin
On Wed, Jul 19, 2017 at 05:01:21PM +0100, Mark Rutland wrote: > This series adds support for the ARMv8.3 pointer authentication extension. > > Since RFC [1]: > * Make the KVM context switch (semi-lazy) > * Rebase to v4.13-rc1 > * Improve pointer authentication documentation > * Add hwcap documenta

Re: [PATCH 01/11] arm64: docs: describe ELF hwcaps

2017-07-21 Thread Dave Martin
s"? I'm not sure of the history here. > Signed-off-by: Mark Rutland > Cc: Catalin Marinas > Cc: Dave Martin > Cc: Suzuki K Poulose > Cc: Will Deacon > --- > Documentation/arm64/elf_hwcaps.txt | 133 > + > 1 file changed,

<    1   2   3   4   5   6   7   >