Kernel-hardening archive on lore.kernel.org
 help / color / Atom feed
From: Kees Cook <keescook@chromium.org>
To: samitolvanen@google.com
Cc: Will Deacon <will@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Dave Martin <Dave.Martin@arm.com>,
	Laura Abbott <labbott@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Jann Horn <jannh@google.com>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	clang-built-linux@googlegroups.com,
	kernel-hardening@lists.openwall.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 17/17] arm64: implement Shadow Call Stack
Date: Thu, 31 Oct 2019 20:45:48 -0700
Message-ID: <201910312042.5AF689AAC@keescook> (raw)
In-Reply-To: <20191031164637.48901-18-samitolvanen@google.com>

On Thu, Oct 31, 2019 at 09:46:37AM -0700, samitolvanen@google.com wrote:
> This change implements shadow stack switching, initial SCS set-up,
> and interrupt shadow stacks for arm64.
> 
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

The only suggestion would be calling attention the clearing step (both in
comments below and in the commit log), just to record the earlier
discussion about it.

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
>  arch/arm64/Kconfig                   |  5 ++++
>  arch/arm64/include/asm/scs.h         | 37 ++++++++++++++++++++++++++
>  arch/arm64/include/asm/stacktrace.h  |  4 +++
>  arch/arm64/include/asm/thread_info.h |  3 +++
>  arch/arm64/kernel/Makefile           |  1 +
>  arch/arm64/kernel/asm-offsets.c      |  3 +++
>  arch/arm64/kernel/entry.S            | 28 ++++++++++++++++++++
>  arch/arm64/kernel/head.S             |  9 +++++++
>  arch/arm64/kernel/irq.c              |  2 ++
>  arch/arm64/kernel/process.c          |  2 ++
>  arch/arm64/kernel/scs.c              | 39 ++++++++++++++++++++++++++++
>  arch/arm64/kernel/smp.c              |  4 +++
>  12 files changed, 137 insertions(+)
>  create mode 100644 arch/arm64/include/asm/scs.h
>  create mode 100644 arch/arm64/kernel/scs.c
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 42867174920f..f4c94c5e8012 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -66,6 +66,7 @@ config ARM64
>  	select ARCH_USE_QUEUED_RWLOCKS
>  	select ARCH_USE_QUEUED_SPINLOCKS
>  	select ARCH_SUPPORTS_MEMORY_FAILURE
> +	select ARCH_SUPPORTS_SHADOW_CALL_STACK if CC_HAVE_SHADOW_CALL_STACK
>  	select ARCH_SUPPORTS_ATOMIC_RMW
>  	select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANG
>  	select ARCH_SUPPORTS_NUMA_BALANCING
> @@ -948,6 +949,10 @@ config ARCH_HAS_CACHE_LINE_SIZE
>  config ARCH_ENABLE_SPLIT_PMD_PTLOCK
>  	def_bool y if PGTABLE_LEVELS > 2
>  
> +# Supported by clang >= 7.0
> +config CC_HAVE_SHADOW_CALL_STACK
> +	def_bool $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)
> +
>  config SECCOMP
>  	bool "Enable seccomp to safely compute untrusted bytecode"
>  	---help---
> diff --git a/arch/arm64/include/asm/scs.h b/arch/arm64/include/asm/scs.h
> new file mode 100644
> index 000000000000..c50d2b0c6c5f
> --- /dev/null
> +++ b/arch/arm64/include/asm/scs.h
> @@ -0,0 +1,37 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _ASM_SCS_H
> +#define _ASM_SCS_H
> +
> +#ifndef __ASSEMBLY__
> +
> +#include <linux/scs.h>
> +
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +
> +extern void scs_init_irq(void);
> +
> +static __always_inline void scs_save(struct task_struct *tsk)
> +{
> +	void *s;
> +
> +	asm volatile("mov %0, x18" : "=r" (s));
> +	task_set_scs(tsk, s);
> +}
> +
> +static inline void scs_overflow_check(struct task_struct *tsk)
> +{
> +	if (unlikely(scs_corrupted(tsk)))
> +		panic("corrupted shadow stack detected inside scheduler\n");
> +}
> +
> +#else /* CONFIG_SHADOW_CALL_STACK */
> +
> +static inline void scs_init_irq(void) {}
> +static inline void scs_save(struct task_struct *tsk) {}
> +static inline void scs_overflow_check(struct task_struct *tsk) {}
> +
> +#endif /* CONFIG_SHADOW_CALL_STACK */
> +
> +#endif /* __ASSEMBLY __ */
> +
> +#endif /* _ASM_SCS_H */
> diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h
> index 4d9b1f48dc39..b6cf32fb4efe 100644
> --- a/arch/arm64/include/asm/stacktrace.h
> +++ b/arch/arm64/include/asm/stacktrace.h
> @@ -68,6 +68,10 @@ extern void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk);
>  
>  DECLARE_PER_CPU(unsigned long *, irq_stack_ptr);
>  
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +DECLARE_PER_CPU(unsigned long *, irq_shadow_call_stack_ptr);
> +#endif
> +
>  static inline bool on_irq_stack(unsigned long sp,
>  				struct stack_info *info)
>  {
> diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
> index f0cec4160136..8c73764b9ed2 100644
> --- a/arch/arm64/include/asm/thread_info.h
> +++ b/arch/arm64/include/asm/thread_info.h
> @@ -41,6 +41,9 @@ struct thread_info {
>  #endif
>  		} preempt;
>  	};
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	void			*shadow_call_stack;
> +#endif
>  };
>  
>  #define thread_saved_pc(tsk)	\
> diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
> index 478491f07b4f..b3995329d9e5 100644
> --- a/arch/arm64/kernel/Makefile
> +++ b/arch/arm64/kernel/Makefile
> @@ -63,6 +63,7 @@ obj-$(CONFIG_CRASH_CORE)		+= crash_core.o
>  obj-$(CONFIG_ARM_SDE_INTERFACE)		+= sdei.o
>  obj-$(CONFIG_ARM64_SSBD)		+= ssbd.o
>  obj-$(CONFIG_ARM64_PTR_AUTH)		+= pointer_auth.o
> +obj-$(CONFIG_SHADOW_CALL_STACK)		+= scs.o
>  
>  obj-y					+= vdso/ probes/
>  obj-$(CONFIG_COMPAT_VDSO)		+= vdso32/
> diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
> index 214685760e1c..f6762b9ae1e1 100644
> --- a/arch/arm64/kernel/asm-offsets.c
> +++ b/arch/arm64/kernel/asm-offsets.c
> @@ -33,6 +33,9 @@ int main(void)
>    DEFINE(TSK_TI_ADDR_LIMIT,	offsetof(struct task_struct, thread_info.addr_limit));
>  #ifdef CONFIG_ARM64_SW_TTBR0_PAN
>    DEFINE(TSK_TI_TTBR0,		offsetof(struct task_struct, thread_info.ttbr0));
> +#endif
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +  DEFINE(TSK_TI_SCS,		offsetof(struct task_struct, thread_info.shadow_call_stack));
>  #endif
>    DEFINE(TSK_STACK,		offsetof(struct task_struct, stack));
>  #ifdef CONFIG_STACKPROTECTOR
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index cf3bd2976e57..12a5bc209280 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -172,6 +172,10 @@ alternative_cb_end
>  
>  	apply_ssbd 1, x22, x23
>  
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	ldr	x18, [tsk, #TSK_TI_SCS]		// Restore shadow call stack
> +	str	xzr, [tsk, #TSK_TI_SCS]
> +#endif
>  	.else
>  	add	x21, sp, #S_FRAME_SIZE
>  	get_current_task tsk
> @@ -278,6 +282,12 @@ alternative_else_nop_endif
>  	ct_user_enter
>  	.endif
>  
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	.if	\el == 0
> +	str	x18, [tsk, #TSK_TI_SCS]		// Save shadow call stack
> +	.endif
> +#endif
> +
>  #ifdef CONFIG_ARM64_SW_TTBR0_PAN
>  	/*
>  	 * Restore access to TTBR0_EL1. If returning to EL0, no need for SPSR
> @@ -383,6 +393,9 @@ alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
>  
>  	.macro	irq_stack_entry
>  	mov	x19, sp			// preserve the original sp
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	mov	x20, x18		// preserve the original shadow stack
> +#endif
>  
>  	/*
>  	 * Compare sp with the base of the task stack.
> @@ -400,6 +413,12 @@ alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
>  
>  	/* switch to the irq stack */
>  	mov	sp, x26
> +
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	/* also switch to the irq shadow stack */
> +	ldr_this_cpu x18, irq_shadow_call_stack_ptr, x26
> +#endif
> +
>  9998:
>  	.endm
>  
> @@ -409,6 +428,10 @@ alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
>  	 */
>  	.macro	irq_stack_exit
>  	mov	sp, x19
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	/* x20 is also preserved */
> +	mov	x18, x20
> +#endif
>  	.endm
>  
>  /* GPRs used by entry code */
> @@ -1155,6 +1178,11 @@ ENTRY(cpu_switch_to)
>  	ldr	lr, [x8]
>  	mov	sp, x9
>  	msr	sp_el0, x1
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	str	x18, [x0, #TSK_TI_SCS]
> +	ldr	x18, [x1, #TSK_TI_SCS]
> +	str	xzr, [x1, #TSK_TI_SCS]

For example here.

> +#endif
>  	ret
>  ENDPROC(cpu_switch_to)
>  NOKPROBE(cpu_switch_to)
> diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> index 989b1944cb71..2be977c6496f 100644
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -27,6 +27,7 @@
>  #include <asm/pgtable-hwdef.h>
>  #include <asm/pgtable.h>
>  #include <asm/page.h>
> +#include <asm/scs.h>
>  #include <asm/smp.h>
>  #include <asm/sysreg.h>
>  #include <asm/thread_info.h>
> @@ -424,6 +425,10 @@ __primary_switched:
>  	stp	xzr, x30, [sp, #-16]!
>  	mov	x29, sp
>  
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	adr_l	x18, init_shadow_call_stack	// Set shadow call stack
> +#endif
> +
>  	str_l	x21, __fdt_pointer, x5		// Save FDT pointer
>  
>  	ldr_l	x4, kimage_vaddr		// Save the offset between
> @@ -731,6 +736,10 @@ __secondary_switched:
>  	ldr	x2, [x0, #CPU_BOOT_TASK]
>  	cbz	x2, __secondary_too_slow
>  	msr	sp_el0, x2
> +#ifdef CONFIG_SHADOW_CALL_STACK
> +	ldr	x18, [x2, #TSK_TI_SCS]		// Set shadow call stack
> +	str	xzr, [x2, #TSK_TI_SCS]

And here. Maybe something like "// Limit visibility of saved SCS"

-Kees

> +#endif
>  	mov	x29, #0
>  	mov	x30, #0
>  	b	secondary_start_kernel
> diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c
> index 04a327ccf84d..fe0ca522ff60 100644
> --- a/arch/arm64/kernel/irq.c
> +++ b/arch/arm64/kernel/irq.c
> @@ -21,6 +21,7 @@
>  #include <linux/vmalloc.h>
>  #include <asm/daifflags.h>
>  #include <asm/vmap_stack.h>
> +#include <asm/scs.h>
>  
>  unsigned long irq_err_count;
>  
> @@ -63,6 +64,7 @@ static void init_irq_stacks(void)
>  void __init init_IRQ(void)
>  {
>  	init_irq_stacks();
> +	scs_init_irq();
>  	irqchip_init();
>  	if (!handle_arch_irq)
>  		panic("No interrupt controller found.");
> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
> index 71f788cd2b18..5f0aec285848 100644
> --- a/arch/arm64/kernel/process.c
> +++ b/arch/arm64/kernel/process.c
> @@ -52,6 +52,7 @@
>  #include <asm/mmu_context.h>
>  #include <asm/processor.h>
>  #include <asm/pointer_auth.h>
> +#include <asm/scs.h>
>  #include <asm/stacktrace.h>
>  
>  #if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK)
> @@ -507,6 +508,7 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev,
>  	uao_thread_switch(next);
>  	ptrauth_thread_switch(next);
>  	ssbs_thread_switch(next);
> +	scs_overflow_check(next);
>  
>  	/*
>  	 * Complete any pending TLB or cache maintenance on this CPU in case
> diff --git a/arch/arm64/kernel/scs.c b/arch/arm64/kernel/scs.c
> new file mode 100644
> index 000000000000..6f255072c9a9
> --- /dev/null
> +++ b/arch/arm64/kernel/scs.c
> @@ -0,0 +1,39 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Shadow Call Stack support.
> + *
> + * Copyright (C) 2019 Google LLC
> + */
> +
> +#include <linux/percpu.h>
> +#include <linux/vmalloc.h>
> +#include <asm/scs.h>
> +
> +DEFINE_PER_CPU(unsigned long *, irq_shadow_call_stack_ptr);
> +
> +#ifndef CONFIG_SHADOW_CALL_STACK_VMAP
> +DEFINE_PER_CPU(unsigned long [SCS_SIZE/sizeof(long)], irq_shadow_call_stack)
> +	__aligned(SCS_SIZE);
> +#endif
> +
> +void scs_init_irq(void)
> +{
> +	int cpu;
> +
> +	for_each_possible_cpu(cpu) {
> +#ifdef CONFIG_SHADOW_CALL_STACK_VMAP
> +		unsigned long *p;
> +
> +		p = __vmalloc_node_range(SCS_SIZE, SCS_SIZE,
> +					 VMALLOC_START, VMALLOC_END,
> +					 SCS_GFP, PAGE_KERNEL,
> +					 0, cpu_to_node(cpu),
> +					 __builtin_return_address(0));
> +
> +		per_cpu(irq_shadow_call_stack_ptr, cpu) = p;
> +#else
> +		per_cpu(irq_shadow_call_stack_ptr, cpu) =
> +			per_cpu(irq_shadow_call_stack, cpu);
> +#endif /* CONFIG_SHADOW_CALL_STACK_VMAP */
> +	}
> +}
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index dc9fe879c279..cc1938a585d2 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -44,6 +44,7 @@
>  #include <asm/pgtable.h>
>  #include <asm/pgalloc.h>
>  #include <asm/processor.h>
> +#include <asm/scs.h>
>  #include <asm/smp_plat.h>
>  #include <asm/sections.h>
>  #include <asm/tlbflush.h>
> @@ -357,6 +358,9 @@ void cpu_die(void)
>  {
>  	unsigned int cpu = smp_processor_id();
>  
> +	/* Save the shadow stack pointer before exiting the idle task */
> +	scs_save(current);
> +
>  	idle_task_exit();
>  
>  	local_daif_mask();
> -- 
> 2.24.0.rc0.303.g954a862665-goog
> 

-- 
Kees Cook

  reply index

Thread overview: 252+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 16:10 [PATCH 00/18] add support for Clang's " Sami Tolvanen
2019-10-18 16:10 ` [PATCH 01/18] arm64: mm: don't use x18 in idmap_kpti_install_ng_mappings Sami Tolvanen
2019-10-18 16:43   ` Nick Desaulniers
2019-10-18 16:10 ` [PATCH 02/18] arm64/lib: copy_page: avoid x18 register in assembler code Sami Tolvanen
2019-10-18 16:10 ` [PATCH 03/18] arm64: kvm: stop treating register x18 as caller save Sami Tolvanen
2019-10-21  6:19   ` Ard Biesheuvel
2019-10-22 17:22   ` Marc Zyngier
2019-10-22 21:45     ` Sami Tolvanen
2019-10-18 16:10 ` [PATCH 04/18] arm64: kernel: avoid x18 as an arbitrary temp register Sami Tolvanen
2019-10-18 16:10 ` [PATCH 05/18] arm64: kbuild: reserve reg x18 from general allocation by the compiler Sami Tolvanen
2019-10-18 17:32   ` Nick Desaulniers
2019-10-18 19:00     ` Sami Tolvanen
2019-10-21  6:12       ` Ard Biesheuvel
2019-10-21 20:43         ` Sami Tolvanen
2019-10-18 16:10 ` [PATCH 06/18] add support for Clang's Shadow Call Stack (SCS) Sami Tolvanen
2019-10-18 16:58   ` Joe Perches
2019-10-18 17:08   ` Nick Desaulniers
2019-10-18 17:11     ` Sami Tolvanen
2019-10-18 18:32       ` Miguel Ojeda
2019-10-18 20:33         ` Nick Desaulniers
2019-10-19  0:21           ` Miguel Ojeda
2019-10-18 17:42   ` Jann Horn
2019-10-18 17:56     ` Sami Tolvanen
2019-10-22 16:28   ` Mark Rutland
2019-10-22 16:30     ` Kees Cook
2019-10-22 16:49       ` Mark Rutland
2019-10-22 19:26     ` Sami Tolvanen
2019-10-24 13:28       ` Mark Rutland
2019-10-24 14:38         ` Masahiro Yamada
2019-10-23 16:59     ` Sami Tolvanen
2019-10-24  1:47       ` Masahiro Yamada
2019-10-24 12:04       ` Steven Rostedt
2019-10-24 22:17         ` Sami Tolvanen
2019-10-18 16:10 ` [PATCH 07/18] scs: add accounting Sami Tolvanen
2019-10-18 16:10 ` [PATCH 08/18] scs: add support for stack usage debugging Sami Tolvanen
2019-10-18 16:10 ` [PATCH 09/18] trace: disable function graph tracing with SCS Sami Tolvanen
2019-10-18 17:01   ` Steven Rostedt
2019-10-18 17:08     ` Sami Tolvanen
2019-10-21  6:15   ` Ard Biesheuvel
2019-10-18 16:10 ` [PATCH 10/18] kprobes: fix compilation without CONFIG_KRETPROBES Sami Tolvanen
2019-10-18 17:02   ` Steven Rostedt
2019-10-21  9:13     ` Masami Hiramatsu
2019-10-18 16:10 ` [PATCH 11/18] kprobes: disable kretprobes with SCS Sami Tolvanen
2019-10-18 17:04   ` Steven Rostedt
2019-10-21  9:15     ` Masami Hiramatsu
2019-10-18 16:10 ` [PATCH 12/18] arm64: reserve x18 only with Shadow Call Stack Sami Tolvanen
2019-10-18 21:23   ` Nick Desaulniers
2019-10-22 16:00     ` Mark Rutland
2019-10-22 16:27       ` Kees Cook
2019-10-18 16:10 ` [PATCH 13/18] arm64: preserve x18 when CPU is suspended Sami Tolvanen
2019-10-18 16:49   ` Nick Desaulniers
2019-10-18 17:05     ` Sami Tolvanen
2019-10-21 16:56   ` Mark Rutland
2019-10-21 22:43     ` Sami Tolvanen
2019-10-22 15:47       ` Mark Rutland
2019-10-18 16:10 ` [PATCH 14/18] arm64: efi: restore x18 if it was corrupted Sami Tolvanen
2019-10-21  6:20   ` Ard Biesheuvel
2019-10-21 22:39     ` Sami Tolvanen
2019-10-22  5:54       ` Ard Biesheuvel
2019-10-18 16:10 ` [PATCH 15/18] arm64: vdso: disable Shadow Call Stack Sami Tolvanen
2019-10-18 16:10 ` [PATCH 16/18] arm64: kprobes: fix kprobes without CONFIG_KRETPROBES Sami Tolvanen
2019-10-21  6:21   ` Ard Biesheuvel
2019-10-21 16:06     ` Kees Cook
2019-10-18 16:10 ` [PATCH 17/18] arm64: disable SCS for hypervisor code Sami Tolvanen
2019-10-18 16:10 ` [PATCH 18/18] arm64: implement Shadow Call Stack Sami Tolvanen
2019-10-18 17:12   ` Jann Horn
2019-10-18 17:18     ` Sami Tolvanen
2019-10-18 17:23     ` Mark Rutland
2019-10-18 17:35       ` Sami Tolvanen
2019-10-21 16:49         ` Mark Rutland
2019-10-21  9:28 ` [PATCH 00/18] add support for Clang's " Masami Hiramatsu
2019-10-24 22:51 ` [PATCH v2 00/17] " samitolvanen
2019-10-24 22:51   ` [PATCH v2 01/17] arm64: mm: don't use x18 in idmap_kpti_install_ng_mappings samitolvanen
2019-10-25  9:24     ` Mark Rutland
2019-10-24 22:51   ` [PATCH v2 02/17] arm64/lib: copy_page: avoid x18 register in assembler code samitolvanen
2019-10-25  9:41     ` Mark Rutland
2019-10-25 21:40       ` Sami Tolvanen
2019-10-24 22:51   ` [PATCH v2 03/17] arm64: kvm: stop treating register x18 as caller save samitolvanen
2019-10-24 22:51   ` [PATCH v2 04/17] arm64: kernel: avoid x18 as an arbitrary temp register samitolvanen
2019-10-25 10:02     ` Mark Rutland
2019-10-24 22:51   ` [PATCH v2 05/17] add support for Clang's Shadow Call Stack (SCS) samitolvanen
2019-10-25 10:56     ` Mark Rutland
2019-10-25 20:49       ` Sami Tolvanen
2019-10-28 16:35         ` Mark Rutland
2019-10-28 19:57           ` Kees Cook
2019-10-29 18:06             ` Sami Tolvanen
2019-10-25 16:22     ` Nick Desaulniers
2019-10-25 20:51       ` Sami Tolvanen
2019-10-26 15:57     ` Joe Perches
2019-10-28 15:19       ` Sami Tolvanen
2019-10-28 15:31         ` Miguel Ojeda
2019-10-28 16:15           ` Sami Tolvanen
2019-10-24 22:51   ` [PATCH v2 06/17] scs: add accounting samitolvanen
2019-10-24 22:51   ` [PATCH v2 07/17] scs: add support for stack usage debugging samitolvanen
2019-10-24 22:51   ` [PATCH v2 08/17] kprobes: fix compilation without CONFIG_KRETPROBES samitolvanen
2019-10-24 22:51   ` [PATCH v2 09/17] arm64: disable function graph tracing with SCS samitolvanen
2019-10-25 11:03     ` Mark Rutland
2019-10-29 17:45       ` Sami Tolvanen
2019-10-29 20:35         ` Nick Desaulniers
2019-10-24 22:51   ` [PATCH v2 10/17] arm64: disable kretprobes " samitolvanen
2019-10-24 22:51   ` [PATCH v2 11/17] arm64: reserve x18 from general allocation " samitolvanen
2019-10-24 22:51   ` [PATCH v2 12/17] arm64: preserve x18 when CPU is suspended samitolvanen
2019-10-24 22:51   ` [PATCH v2 13/17] arm64: efi: restore x18 if it was corrupted samitolvanen
2019-10-24 22:51   ` [PATCH v2 14/17] arm64: vdso: disable Shadow Call Stack samitolvanen
2019-10-24 22:51   ` [PATCH v2 15/17] arm64: kprobes: fix kprobes without CONFIG_KRETPROBES samitolvanen
2019-10-24 22:51   ` [PATCH v2 16/17] arm64: disable SCS for hypervisor code samitolvanen
2019-10-25  1:20     ` Steven Rostedt
2019-10-25  1:29     ` Masahiro Yamada
2019-10-25  1:42       ` Steven Rostedt
2019-10-25 19:24       ` Sami Tolvanen
2019-10-24 22:51   ` [PATCH v2 17/17] arm64: implement Shadow Call Stack samitolvanen
2019-10-31 16:46 ` [PATCH v3 00/17] add support for Clang's " samitolvanen
2019-10-31 16:46   ` [PATCH v3 01/17] arm64: mm: avoid x18 in idmap_kpti_install_ng_mappings samitolvanen
2019-10-31 16:46   ` [PATCH v3 02/17] arm64/lib: copy_page: avoid x18 register in assembler code samitolvanen
2019-10-31 16:46   ` [PATCH v3 03/17] arm64: kvm: stop treating register x18 as caller save samitolvanen
2019-11-01  3:48     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 04/17] arm64: kernel: avoid x18 __cpu_soft_restart samitolvanen
2019-11-01  3:47     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 05/17] add support for Clang's Shadow Call Stack (SCS) samitolvanen
2019-11-01  3:51     ` Kees Cook
2019-11-01 16:28       ` Sami Tolvanen
2019-10-31 16:46   ` [PATCH v3 06/17] scs: add accounting samitolvanen
2019-11-01  3:52     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 07/17] scs: add support for stack usage debugging samitolvanen
2019-11-01  3:55     ` Kees Cook
2019-11-01 16:32       ` Sami Tolvanen
2019-11-01 19:02         ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 08/17] kprobes: fix compilation without CONFIG_KRETPROBES samitolvanen
2019-11-01  3:55     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 09/17] arm64: kprobes: fix kprobes " samitolvanen
2019-11-01  3:56     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 10/17] arm64: disable kretprobes with SCS samitolvanen
2019-11-01  3:56     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 11/17] arm64: disable function graph tracing " samitolvanen
2019-11-01  3:58     ` Kees Cook
2019-11-01 20:32       ` Sami Tolvanen
2019-10-31 16:46   ` [PATCH v3 12/17] arm64: reserve x18 from general allocation " samitolvanen
2019-10-31 17:11     ` Nick Desaulniers
2019-11-01  3:59     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 13/17] arm64: preserve x18 when CPU is suspended samitolvanen
2019-10-31 17:18     ` Nick Desaulniers
2019-10-31 17:27       ` Sami Tolvanen
2019-10-31 17:34         ` Nick Desaulniers
2019-10-31 17:42           ` Sami Tolvanen
2019-11-01  3:59           ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 14/17] arm64: efi: restore x18 if it was corrupted samitolvanen
2019-11-01  4:00     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 15/17] arm64: vdso: disable Shadow Call Stack samitolvanen
2019-10-31 17:28     ` Nick Desaulniers
2019-11-01  4:01     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 16/17] arm64: disable SCS for hypervisor code samitolvanen
2019-11-01  3:46     ` Kees Cook
2019-11-01  4:02     ` Kees Cook
2019-10-31 16:46   ` [PATCH v3 17/17] arm64: implement Shadow Call Stack samitolvanen
2019-11-01  3:45     ` Kees Cook [this message]
2019-11-01 15:44       ` Sami Tolvanen
2019-11-01 22:11 ` [PATCH v4 00/17] add support for Clang's " Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 01/17] arm64: mm: avoid x18 in idmap_kpti_install_ng_mappings Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 02/17] arm64/lib: copy_page: avoid x18 register in assembler code Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 03/17] arm64: kvm: stop treating register x18 as caller save Sami Tolvanen
2019-11-04 11:04     ` Marc Zyngier
2019-11-04 13:30       ` Marc Zyngier
2019-11-04 11:51     ` Mark Rutland
2019-11-04 21:44       ` Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 04/17] arm64: kernel: avoid x18 __cpu_soft_restart Sami Tolvanen
2019-11-04 11:39     ` Mark Rutland
2019-11-04 16:44       ` Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 05/17] add support for Clang's Shadow Call Stack (SCS) Sami Tolvanen
2019-11-01 22:36     ` Miguel Ojeda
2019-11-04 12:31     ` Mark Rutland
2019-11-04 18:25       ` Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 06/17] scs: add accounting Sami Tolvanen
2019-11-04 13:13     ` Marc Zyngier
2019-11-04 16:42       ` Sami Tolvanen
2019-11-04 16:59         ` Marc Zyngier
2019-11-01 22:11   ` [PATCH v4 07/17] scs: add support for stack usage debugging Sami Tolvanen
2019-11-02 17:31     ` Kees Cook
2019-11-04 12:40     ` Mark Rutland
2019-11-04 21:35       ` Sami Tolvanen
2019-11-05  9:17         ` Mark Rutland
2019-11-01 22:11   ` [PATCH v4 08/17] kprobes: fix compilation without CONFIG_KRETPROBES Sami Tolvanen
2019-11-13 20:27     ` Steven Rostedt
2019-11-01 22:11   ` [PATCH v4 09/17] arm64: kprobes: fix kprobes " Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 10/17] arm64: disable kretprobes with SCS Sami Tolvanen
2019-11-04 17:04     ` Mark Rutland
2019-11-04 23:42       ` Sami Tolvanen
2019-11-05  9:04         ` Mark Rutland
2019-11-01 22:11   ` [PATCH v4 11/17] arm64: disable function graph tracing " Sami Tolvanen
2019-11-04 17:11     ` Mark Rutland
2019-11-04 23:44       ` Sami Tolvanen
2019-11-05  9:15         ` Mark Rutland
2019-11-05 20:00           ` Nick Desaulniers
2019-11-05 22:05           ` Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 12/17] arm64: reserve x18 from general allocation " Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 13/17] arm64: preserve x18 when CPU is suspended Sami Tolvanen
2019-11-04 13:20     ` Marc Zyngier
2019-11-04 21:38       ` Sami Tolvanen
2019-11-04 21:59         ` Nick Desaulniers
2019-11-05  0:02           ` Sami Tolvanen
2019-11-05 14:55             ` Marc Zyngier
2019-11-01 22:11   ` [PATCH v4 14/17] arm64: efi: restore x18 if it was corrupted Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 15/17] arm64: vdso: disable Shadow Call Stack Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 16/17] arm64: disable SCS for hypervisor code Sami Tolvanen
2019-11-01 22:11   ` [PATCH v4 17/17] arm64: implement Shadow Call Stack Sami Tolvanen
2019-11-05 23:55 ` [PATCH v5 00/14] add support for Clang's " Sami Tolvanen
2019-11-05 23:55   ` [PATCH v5 01/14] arm64: mm: avoid x18 in idmap_kpti_install_ng_mappings Sami Tolvanen
2019-11-05 23:55   ` [PATCH v5 02/14] arm64/lib: copy_page: avoid x18 register in assembler code Sami Tolvanen
2019-11-05 23:55   ` [PATCH v5 03/14] arm64: kvm: stop treating register x18 as caller save Sami Tolvanen
2019-11-05 23:55   ` [PATCH v5 04/14] arm64: kernel: avoid x18 in __cpu_soft_restart Sami Tolvanen
2019-11-05 23:55   ` [PATCH v5 05/14] add support for Clang's Shadow Call Stack (SCS) Sami Tolvanen
2019-11-15 15:37     ` Mark Rutland
2019-11-15 18:34       ` Sami Tolvanen
2019-11-05 23:56   ` [PATCH v5 06/14] scs: add accounting Sami Tolvanen
2019-11-05 23:56   ` [PATCH v5 07/14] scs: add support for stack usage debugging Sami Tolvanen
2019-11-05 23:56   ` [PATCH v5 08/14] arm64: disable function graph tracing with SCS Sami Tolvanen
2019-11-15 14:18     ` Mark Rutland
2019-11-05 23:56   ` [PATCH v5 09/14] arm64: reserve x18 from general allocation " Sami Tolvanen
2019-11-05 23:56   ` [PATCH v5 10/14] arm64: preserve x18 when CPU is suspended Sami Tolvanen
2019-11-06 20:39     ` Nick Desaulniers
2019-11-15 14:27     ` Mark Rutland
2019-11-05 23:56   ` [PATCH v5 11/14] arm64: efi: restore x18 if it was corrupted Sami Tolvanen
2019-11-06  4:45     ` Miguel Ojeda
2019-11-07 10:51       ` Ard Biesheuvel
2019-11-07 16:26         ` Sami Tolvanen
2019-11-05 23:56   ` [PATCH v5 12/14] arm64: vdso: disable Shadow Call Stack Sami Tolvanen
2019-11-15 14:43     ` Mark Rutland
2019-11-05 23:56   ` [PATCH v5 13/14] arm64: disable SCS for hypervisor code Sami Tolvanen
2019-11-15 14:46     ` Mark Rutland
2019-11-05 23:56   ` [PATCH v5 14/14] arm64: implement Shadow Call Stack Sami Tolvanen
2019-11-15 15:20     ` Mark Rutland
2019-11-15 20:19       ` Sami Tolvanen
2019-11-18 23:13         ` Sami Tolvanen
2019-11-12 23:44   ` [PATCH v5 00/14] add support for Clang's " Kees Cook
2019-11-13 12:03     ` Will Deacon
2019-11-13 18:33       ` Kees Cook
2019-11-15 14:16     ` Mark Rutland
2019-12-06 22:13 ` [PATCH v6 00/15] " Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 01/15] arm64: mm: avoid x18 in idmap_kpti_install_ng_mappings Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 02/15] arm64/lib: copy_page: avoid x18 register in assembler code Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 03/15] arm64: kvm: stop treating register x18 as caller save Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 04/15] arm64: kernel: avoid x18 in __cpu_soft_restart Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 05/15] add support for Clang's Shadow Call Stack (SCS) Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 06/15] scs: add accounting Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 07/15] scs: add support for stack usage debugging Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 08/15] arm64: disable function graph tracing with SCS Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 09/15] arm64: reserve x18 from general allocation " Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 10/15] arm64: preserve x18 when CPU is suspended Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 11/15] arm64: efi: restore x18 if it was corrupted Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 12/15] arm64: vdso: disable Shadow Call Stack Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 13/15] arm64: disable SCS for hypervisor code Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 14/15] arm64: implement Shadow Call Stack Sami Tolvanen
2019-12-06 22:13   ` [PATCH v6 15/15] arm64: scs: add shadow stacks for SDEI Sami Tolvanen

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910312042.5AF689AAC@keescook \
    --to=keescook@chromium.org \
    --cc=Dave.Martin@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jannh@google.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=rostedt@goodmis.org \
    --cc=samitolvanen@google.com \
    --cc=will@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel-hardening archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernel-hardening/0 kernel-hardening/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernel-hardening kernel-hardening/ https://lore.kernel.org/kernel-hardening \
		kernel-hardening@lists.openwall.com
	public-inbox-index kernel-hardening

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.openwall.lists.kernel-hardening


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git