All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-mm@kvack.org, linux-arch@vger.kernel.org,
	linux-api@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Andy Lutomirski <luto@kernel.org>,
	Balbir Singh <bsingharora@gmail.com>,
	Borislav Petkov <bp@alien8.de>,
	Cyrill Gorcunov <gorcunov@gmail.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Eugene Syromiatnikov <esyr@redhat.com>,
	Florian Weimer <fweimer@redhat.com>,
	"H . J . Lu" <hjl.tools@gmail.com>, Jann Horn <jannh@google.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Nadav Amit <nadav.amit@gmail.com>,
	Oleg Nesterov <oleg@redhat.com>, Pavel Machek <pavel@ucw.cz>,
	Peter Zijlstra <peterz@infradead.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	"Ravi V . Shankar" <ravi.v.shankar@intel.com>,
	Weijiang Yang <weijiang.yang@intel.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	joao.moreira@intel.com, John Allen <john.allen@amd.com>,
	kcc@google.com, eranian@google.com, rppt@kernel.org,
	jamorris@linux.microsoft.com, dethoma@microsoft.com,
	Yu-cheng Yu <yu-cheng.yu@intel.com>
Subject: Re: [PATCH v2 24/39] x86/cet/shstk: Add user-mode shadow stack support
Date: Mon, 3 Oct 2022 12:43:57 -0700	[thread overview]
Message-ID: <202210031203.EB0DC0B7DD@keescook> (raw)
In-Reply-To: <20220929222936.14584-25-rick.p.edgecombe@intel.com>

On Thu, Sep 29, 2022 at 03:29:21PM -0700, Rick Edgecombe wrote:
> From: Yu-cheng Yu <yu-cheng.yu@intel.com>
> 
> Introduce basic shadow stack enabling/disabling/allocation routines.
> A task's shadow stack is allocated from memory with VM_SHADOW_STACK flag
> and has a fixed size of min(RLIMIT_STACK, 4GB).
> 
> Keep the task's shadow stack address and size in thread_struct. This will
> be copied when cloning new threads, but needs to be cleared during exec,
> so add a function to do this.
> 
> Do not support IA32 emulation.
> 
> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
> Co-developed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
> Cc: Kees Cook <keescook@chromium.org>
> 
> ---
> 
> v2:
>  - Get rid of unnessary shstk->base checks
>  - Don't support IA32 emulation
> 
> v1:
>  - Switch to xsave helpers.
>  - Expand commit log.
> 
> Yu-cheng v30:
>  - Remove superfluous comments for struct thread_shstk.
>  - Replace 'populate' with 'unused'.
> 
> Yu-cheng v28:
>  - Update shstk_setup() with wrmsrl_safe(), returns success when shadow
>    stack feature is not present (since this is a setup function).
> 
>  arch/x86/include/asm/cet.h        |  13 +++
>  arch/x86/include/asm/msr.h        |  11 +++
>  arch/x86/include/asm/processor.h  |   5 ++
>  arch/x86/include/uapi/asm/prctl.h |   2 +
>  arch/x86/kernel/Makefile          |   2 +
>  arch/x86/kernel/process_64.c      |   2 +
>  arch/x86/kernel/shstk.c           | 143 ++++++++++++++++++++++++++++++
>  7 files changed, 178 insertions(+)
> 
> diff --git a/arch/x86/include/asm/cet.h b/arch/x86/include/asm/cet.h
> index 0fa4dbc98c49..a4a1f4c0089b 100644
> --- a/arch/x86/include/asm/cet.h
> +++ b/arch/x86/include/asm/cet.h
> @@ -7,12 +7,25 @@
>  
>  struct task_struct;
>  
> +struct thread_shstk {
> +	u64	base;
> +	u64	size;
> +};
> +
>  #ifdef CONFIG_X86_SHADOW_STACK
>  long cet_prctl(struct task_struct *task, int option,
>  		      unsigned long features);
> +int shstk_setup(void);
> +void shstk_free(struct task_struct *p);
> +int shstk_disable(void);
> +void reset_thread_shstk(void);
>  #else
>  static inline long cet_prctl(struct task_struct *task, int option,
>  		      unsigned long features) { return -EINVAL; }
> +static inline int shstk_setup(void) { return -EOPNOTSUPP; }
> +static inline void shstk_free(struct task_struct *p) {}
> +static inline int shstk_disable(void) { return -EOPNOTSUPP; }
> +static inline void reset_thread_shstk(void) {}
>  #endif /* CONFIG_X86_SHADOW_STACK */

shstk_setup() and shstk_disable() are not called outside of shstk.c, so
they can be removed from this header entirely.

>  
>  #endif /* __ASSEMBLY__ */
> diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
> index 65ec1965cd28..a9cb4c434e60 100644
> --- a/arch/x86/include/asm/msr.h
> +++ b/arch/x86/include/asm/msr.h
> @@ -310,6 +310,17 @@ void msrs_free(struct msr *msrs);
>  int msr_set_bit(u32 msr, u8 bit);
>  int msr_clear_bit(u32 msr, u8 bit);
>  
> +static inline void set_clr_bits_msrl(u32 msr, u64 set, u64 clear)
> +{
> +	u64 val, new_val;
> +
> +	rdmsrl(msr, val);
> +	new_val = (val & ~clear) | set;
> +
> +	if (new_val != val)
> +		wrmsrl(msr, new_val);
> +}

I always get uncomfortable when I see these kinds of generalized helper
functions for touching cpu bits, etc. It just begs for future attacker
abuse to muck with arbitrary bits -- even marked inline there is a risk
the compiler will ignore that in some circumstances (not as currently
used in the code, but I'm imagining future changes leading to such a
condition). Will you humor me and change this to a macro instead? That'll
force it always inline (even __always_inline isn't always inline):

/* Helper that can never get accidentally un-inlined. */
#define set_clr_bits_msrl(msr, set, clear)	do {	\
	u64 __val, __new_val;				\
							\
	rdmsrl(msr, __val);				\
	__new_val = (__val & ~(clear)) | (set);		\
							\
	if (__new_val != __val)				\
		wrmsrl(msr, __new_val);			\
} while (0)


> +
>  #ifdef CONFIG_SMP
>  int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
>  int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
> diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
> index a92bf76edafe..3a0c9d9d4d1d 100644
> --- a/arch/x86/include/asm/processor.h
> +++ b/arch/x86/include/asm/processor.h
> @@ -27,6 +27,7 @@ struct vm86;
>  #include <asm/unwind_hints.h>
>  #include <asm/vmxfeatures.h>
>  #include <asm/vdso/processor.h>
> +#include <asm/cet.h>
>  
>  #include <linux/personality.h>
>  #include <linux/cache.h>
> @@ -533,6 +534,10 @@ struct thread_struct {
>  	unsigned long		features;
>  	unsigned long		features_locked;
>  
> +#ifdef CONFIG_X86_SHADOW_STACK
> +	struct thread_shstk	shstk;
> +#endif
> +
>  	/* Floating point and extended processor state */
>  	struct fpu		fpu;
>  	/*
> diff --git a/arch/x86/include/uapi/asm/prctl.h b/arch/x86/include/uapi/asm/prctl.h
> index 028158e35269..41af3a8c4fa4 100644
> --- a/arch/x86/include/uapi/asm/prctl.h
> +++ b/arch/x86/include/uapi/asm/prctl.h
> @@ -26,4 +26,6 @@
>  #define ARCH_CET_DISABLE		0x4002
>  #define ARCH_CET_LOCK			0x4003
>  
For readability, maybe add: /* ARCH_CET_* "features" bits */

> +#define CET_SHSTK			0x1

This is UAPI, so the BIT() macro isn't available, but since this is
unsigned long, please use the form:  (1ULL <<  0)  etc...

> +
>  #endif /* _ASM_X86_PRCTL_H */
> diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> index a20a5ebfacd7..8950d1f71226 100644
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -139,6 +139,8 @@ obj-$(CONFIG_UNWINDER_GUESS)		+= unwind_guess.o
>  
>  obj-$(CONFIG_AMD_MEM_ENCRYPT)		+= sev.o
>  
> +obj-$(CONFIG_X86_SHADOW_STACK)		+= shstk.o
> +
>  ###
>  # 64 bit specific files
>  ifeq ($(CONFIG_X86_64),y)
> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
> index 8fa2c2b7de65..be544b4b4c8b 100644
> --- a/arch/x86/kernel/process_64.c
> +++ b/arch/x86/kernel/process_64.c
> @@ -514,6 +514,8 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,
>  		load_gs_index(__USER_DS);
>  	}
>  
> +	reset_thread_shstk();
> +
>  	loadsegment(fs, 0);
>  	loadsegment(es, _ds);
>  	loadsegment(ds, _ds);
> diff --git a/arch/x86/kernel/shstk.c b/arch/x86/kernel/shstk.c
> index e3276ac9e9b9..a0b8d4adb2bf 100644
> --- a/arch/x86/kernel/shstk.c
> +++ b/arch/x86/kernel/shstk.c
> @@ -8,8 +8,151 @@
>  
>  #include <linux/sched.h>
>  #include <linux/bitops.h>
> +#include <linux/types.h>
> +#include <linux/mm.h>
> +#include <linux/mman.h>
> +#include <linux/slab.h>
> +#include <linux/uaccess.h>
> +#include <linux/sched/signal.h>
> +#include <linux/compat.h>
> +#include <linux/sizes.h>
> +#include <linux/user.h>
> +#include <asm/msr.h>
> +#include <asm/fpu/xstate.h>
> +#include <asm/fpu/types.h>
> +#include <asm/cet.h>
> +#include <asm/special_insns.h>
> +#include <asm/fpu/api.h>
>  #include <asm/prctl.h>
>  
> +static bool feature_enabled(unsigned long features)
> +{
> +	return current->thread.features & features;
> +}
> +
> +static void feature_set(unsigned long features)
> +{
> +	current->thread.features |= features;
> +}
> +
> +static void feature_clr(unsigned long features)
> +{
> +	current->thread.features &= ~features;
> +}

"feature" vs "features" here is confusing. Should these helpers enforce
the single-bit-set requirements? If so, please switch to a bit number
instead of a mask. If not, please rename these to
"features_{enabled,set,clr}", and fix "features_enabled" to check them
all:
	return (current->thread.features & features) == features;

> +static unsigned long alloc_shstk(unsigned long size)
> +{
> +	int flags = MAP_ANONYMOUS | MAP_PRIVATE;
> +	struct mm_struct *mm = current->mm;
> +	unsigned long addr, unused;

WARN_ON + clamp on "size" here, or perhaps move the bounds check from
shstk_setup() into here?

> +
> +	mmap_write_lock(mm);
> +	addr = do_mmap(NULL, addr, size, PROT_READ, flags,
> +		       VM_SHADOW_STACK | VM_WRITE, 0, &unused, NULL);

This will use the mmap base address offset randomization, I guess?

> +
> +	mmap_write_unlock(mm);
> +
> +	return addr;
> +}
> +
> +static void unmap_shadow_stack(u64 base, u64 size)
> +{
> +	while (1) {
> +		int r;
> +
> +		r = vm_munmap(base, size);
> +
> +		/*
> +		 * vm_munmap() returns -EINTR when mmap_lock is held by
> +		 * something else, and that lock should not be held for a
> +		 * long time.  Retry it for the case.
> +		 */
> +		if (r == -EINTR) {
> +			cond_resched();
> +			continue;
> +		}
> +
> +		/*
> +		 * For all other types of vm_munmap() failure, either the
> +		 * system is out of memory or there is bug.
> +		 */
> +		WARN_ON_ONCE(r);
> +		break;
> +	}
> +}
> +
> +int shstk_setup(void)

Only called local. Make static?

> +{
> +	struct thread_shstk *shstk = &current->thread.shstk;
> +	unsigned long addr, size;
> +
> +	/* Already enabled */
> +	if (feature_enabled(CET_SHSTK))
> +		return 0;
> +
> +	/* Also not supported for 32 bit */
> +	if (!cpu_feature_enabled(X86_FEATURE_SHSTK) || in_ia32_syscall())
> +		return -EOPNOTSUPP;
> +
> +	size = PAGE_ALIGN(min_t(unsigned long long, rlimit(RLIMIT_STACK), SZ_4G));
> +	addr = alloc_shstk(size);
> +	if (IS_ERR_VALUE(addr))
> +		return PTR_ERR((void *)addr);
> +
> +	fpu_lock_and_load();
> +	wrmsrl(MSR_IA32_PL3_SSP, addr + size);
> +	wrmsrl(MSR_IA32_U_CET, CET_SHSTK_EN);
> +	fpregs_unlock();
> +
> +	shstk->base = addr;
> +	shstk->size = size;
> +	feature_set(CET_SHSTK);
> +
> +	return 0;
> +}
> +
> +void reset_thread_shstk(void)
> +{
> +	memset(&current->thread.shstk, 0, sizeof(struct thread_shstk));
> +	current->thread.features = 0;
> +	current->thread.features_locked = 0;
> +}

If features is always going to be tied to shstk, why not put them in the
shstk struct?

Also, shouldn't this also be called from arch_setup_new_exec() instead
of the open-coded wipe of features there?

> +
> +void shstk_free(struct task_struct *tsk)
> +{
> +	struct thread_shstk *shstk = &tsk->thread.shstk;
> +
> +	if (!cpu_feature_enabled(X86_FEATURE_SHSTK) ||
> +	    !feature_enabled(CET_SHSTK))
> +		return;
> +
> +	if (!tsk->mm)
> +		return;
> +
> +	unmap_shadow_stack(shstk->base, shstk->size);

I feel like base and size should be zeroed here?

> +}
> +
> +int shstk_disable(void)

This is only called locally. static?

> +{
> +	if (!cpu_feature_enabled(X86_FEATURE_SHSTK))
> +		return -EOPNOTSUPP;
> +
> +	/* Already disabled? */
> +	if (!feature_enabled(CET_SHSTK))
> +		return 0;
> +
> +	fpu_lock_and_load();
> +	/* Disable WRSS too when disabling shadow stack */
> +	set_clr_bits_msrl(MSR_IA32_U_CET, 0, CET_SHSTK_EN);
> +	wrmsrl(MSR_IA32_PL3_SSP, 0);
> +	fpregs_unlock();
> +
> +	shstk_free(current);
> +	feature_clr(CET_SHSTK);
> +
> +	return 0;
> +}
> +
>  long cet_prctl(struct task_struct *task, int option, unsigned long features)
>  {
>  	if (option == ARCH_CET_LOCK) {
> -- 
> 2.17.1
> 

-- 
Kees Cook

  reply	other threads:[~2022-10-03 19:44 UTC|newest]

Thread overview: 241+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 22:28 [PATCH v2 00/39] Shadowstacks for userspace Rick Edgecombe
2022-09-29 22:28 ` [PATCH v2 01/39] Documentation/x86: Add CET description Rick Edgecombe
2022-09-30  3:41   ` Bagas Sanjaya
2022-09-30 13:33     ` Jonathan Corbet
2022-09-30 13:41       ` Bagas Sanjaya
2022-10-03 16:56         ` Edgecombe, Rick P
2022-10-04  2:16           ` Bagas Sanjaya
2022-10-05  9:10           ` Peter Zijlstra
2022-10-05  9:25             ` Bagas Sanjaya
2022-10-05  9:46               ` Peter Zijlstra
2022-10-03 19:35     ` John Hubbard
2022-10-03 19:39       ` Dave Hansen
2022-10-04  2:13       ` Bagas Sanjaya
2022-10-03 17:18   ` Kees Cook
2022-10-03 19:46     ` Edgecombe, Rick P
2022-10-05  0:02   ` Andrew Cooper
2022-10-10 12:19   ` Florian Weimer
2022-10-10 16:44     ` Edgecombe, Rick P
2022-10-10 16:51       ` H.J. Lu
2022-10-12 12:29       ` Florian Weimer
2022-10-12 15:59         ` Dave Hansen
2022-10-12 16:54           ` Florian Weimer
2022-10-13 21:28         ` Edgecombe, Rick P
2022-10-13 22:15           ` H.J. Lu
2022-10-26 21:59           ` Edgecombe, Rick P
2022-09-29 22:28 ` [PATCH v2 02/39] x86/cet/shstk: Add Kconfig option for Shadow Stack Rick Edgecombe
2022-10-03 13:40   ` Kirill A . Shutemov
2022-10-03 19:53     ` Edgecombe, Rick P
2022-10-03 17:25   ` Kees Cook
2022-10-03 19:52     ` Edgecombe, Rick P
2022-10-03 19:42   ` Dave Hansen
2022-10-03 19:50     ` Edgecombe, Rick P
2022-10-12 20:04   ` Borislav Petkov
2022-10-13  0:31     ` Edgecombe, Rick P
2022-10-13  9:21       ` Borislav Petkov
2022-09-29 22:29 ` [PATCH v2 03/39] x86/cpufeatures: Add CPU feature flags for shadow stacks Rick Edgecombe
2022-10-03 17:26   ` Kees Cook
2022-10-14 16:20   ` Borislav Petkov
2022-10-14 19:35     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 04/39] x86/cpufeatures: Enable CET CR4 bit for shadow stack Rick Edgecombe
2022-10-03 17:31   ` Kees Cook
2022-10-05  0:55   ` Andrew Cooper
2022-10-14 17:12   ` Borislav Petkov
2022-10-14 18:15     ` Edgecombe, Rick P
2022-10-14 19:44       ` Borislav Petkov
2022-09-29 22:29 ` [PATCH v2 05/39] x86/fpu/xstate: Introduce CET MSR and XSAVES supervisor states Rick Edgecombe
2022-10-03 17:40   ` Kees Cook
2022-10-15  9:46   ` Borislav Petkov
2022-10-17 18:57     ` Edgecombe, Rick P
2022-10-17 19:33       ` Borislav Petkov
2022-09-29 22:29 ` [PATCH v2 06/39] x86/fpu: Add helper for modifying xstate Rick Edgecombe
2022-10-03 17:48   ` Kees Cook
2022-10-03 20:05     ` Edgecombe, Rick P
2022-10-04  4:05       ` Kees Cook
2022-10-04 14:18       ` Dave Hansen
2022-10-04 16:13         ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 07/39] x86/cet: Add user control-protection fault handler Rick Edgecombe
2022-10-03 14:01   ` Kirill A . Shutemov
2022-10-03 18:12     ` Edgecombe, Rick P
2022-10-03 18:04   ` Kees Cook
2022-10-03 20:33     ` Edgecombe, Rick P
2022-10-03 22:51   ` Andy Lutomirski
2022-10-03 23:09     ` H. Peter Anvin
2022-10-03 23:11     ` Edgecombe, Rick P
2022-10-05  1:20   ` Andrew Cooper
2022-10-05 22:44     ` Edgecombe, Rick P
2022-10-05  9:39   ` Peter Zijlstra
2022-10-05 22:45     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 08/39] x86/mm: Remove _PAGE_DIRTY from kernel RO pages Rick Edgecombe
2022-10-03 14:17   ` Kirill A . Shutemov
2022-10-05  1:31   ` Andrew Cooper
2022-10-05 11:16     ` Peter Zijlstra
2022-10-05 12:34       ` Andrew Cooper
2022-09-29 22:29 ` [PATCH v2 09/39] x86/mm: Move pmd_write(), pud_write() up in the file Rick Edgecombe
2022-10-03 18:06   ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 10/39] x86/mm: Introduce _PAGE_COW Rick Edgecombe
2022-09-30 15:16   ` Jann Horn
2022-10-06 16:10     ` Edgecombe, Rick P
2022-10-03 16:26   ` Kirill A . Shutemov
2022-10-03 21:36     ` Edgecombe, Rick P
2022-10-03 21:54       ` Jann Horn
2022-10-03 22:20         ` Edgecombe, Rick P
2022-10-03 22:14       ` Dave Hansen
2022-10-05  2:17   ` Andrew Cooper
2022-10-05 14:08     ` Dave Hansen
2022-10-05 23:06       ` Edgecombe, Rick P
2022-10-05 23:01     ` Edgecombe, Rick P
2022-10-05 11:33   ` Peter Zijlstra
2022-10-14  9:41   ` Peter Zijlstra
2022-10-14 15:52     ` Edgecombe, Rick P
2022-10-14  9:42   ` Peter Zijlstra
2022-10-14 18:06     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 11/39] x86/mm: Update pte_modify for _PAGE_COW Rick Edgecombe
2022-09-29 22:29 ` [PATCH v2 12/39] x86/mm: Update ptep_set_wrprotect() and pmdp_set_wrprotect() for transition from _PAGE_DIRTY to _PAGE_COW Rick Edgecombe
2022-10-03 17:43   ` Kirill A . Shutemov
2022-10-03 18:11   ` Nadav Amit
2022-10-03 18:51     ` Dave Hansen
2022-10-03 22:28     ` Edgecombe, Rick P
2022-10-03 23:17       ` Nadav Amit
2022-10-03 23:20         ` Nadav Amit
2022-10-03 23:25           ` Nadav Amit
2022-10-03 23:38             ` Edgecombe, Rick P
2022-10-04  0:40               ` Nadav Amit
2022-09-29 22:29 ` [PATCH v2 13/39] mm: Move VM_UFFD_MINOR_BIT from 37 to 38 Rick Edgecombe
2022-10-03 18:11   ` Kees Cook
2022-10-03 18:24   ` Peter Xu
2022-09-29 22:29 ` [PATCH v2 14/39] mm: Introduce VM_SHADOW_STACK for shadow stack memory Rick Edgecombe
2022-10-03 17:47   ` Kirill A . Shutemov
2022-10-04  0:29     ` Edgecombe, Rick P
2022-10-03 18:17   ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 15/39] x86/mm: Check Shadow Stack page fault errors Rick Edgecombe
2022-10-03 18:20   ` Kees Cook
2022-10-14 10:07   ` Peter Zijlstra
2022-10-14 15:51     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 16/39] x86/mm: Update maybe_mkwrite() for shadow stack Rick Edgecombe
2022-10-03 18:22   ` Kees Cook
2022-10-03 23:53   ` Kirill A . Shutemov
2022-10-14 15:32   ` Peter Zijlstra
2022-10-14 15:45     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 17/39] mm: Fixup places that call pte_mkwrite() directly Rick Edgecombe
2022-10-03 18:24   ` Kees Cook
2022-10-03 23:56   ` Kirill A . Shutemov
2022-10-04 16:15     ` Edgecombe, Rick P
2022-10-04  1:56   ` Nadav Amit
2022-10-04 16:21     ` Edgecombe, Rick P
2022-10-14 15:52   ` Peter Zijlstra
2022-10-14 15:56     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 18/39] mm: Add guard pages around a shadow stack Rick Edgecombe
2022-10-03 18:30   ` Kees Cook
2022-10-05  2:30     ` Andrew Cooper
2022-10-10 12:33       ` Florian Weimer
2022-10-10 13:32         ` Andrew Cooper
2022-10-10 13:40           ` Florian Weimer
2022-10-10 13:56             ` Andrew Cooper
2022-09-29 22:29 ` [PATCH v2 19/39] mm/mmap: Add shadow stack pages to memory accounting Rick Edgecombe
2022-10-03 18:31   ` Kees Cook
2022-10-04  0:03   ` Kirill A . Shutemov
2022-10-04  0:32     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 20/39] mm/mprotect: Exclude shadow stack from preserve_write Rick Edgecombe
2022-09-29 22:29 ` [PATCH v2 21/39] mm: Re-introduce vm_flags to do_mmap() Rick Edgecombe
2022-09-29 22:29 ` [PATCH v2 22/39] mm: Don't allow write GUPs to shadow stack memory Rick Edgecombe
2022-09-30 19:16   ` Dave Hansen
2022-09-30 20:30     ` Edgecombe, Rick P
2022-09-30 20:37       ` Dave Hansen
2022-09-30 23:00     ` Jann Horn
2022-09-30 23:02       ` Jann Horn
2022-09-30 23:04       ` Edgecombe, Rick P
2022-10-03 18:39   ` Kees Cook
2022-10-03 22:49     ` Andy Lutomirski
2022-10-04  4:21       ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 23/39] x86: Introduce userspace API for CET enabling Rick Edgecombe
2022-10-03 19:01   ` Kees Cook
2022-10-03 22:51     ` Edgecombe, Rick P
2022-10-06 18:50       ` Mike Rapoport
2022-10-10 10:56   ` Florian Weimer
2022-10-10 16:28     ` Edgecombe, Rick P
2022-10-12 12:18       ` Florian Weimer
2022-10-12 17:30         ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 24/39] x86/cet/shstk: Add user-mode shadow stack support Rick Edgecombe
2022-10-03 19:43   ` Kees Cook [this message]
2022-10-03 20:04     ` Dave Hansen
2022-10-04  4:04       ` Kees Cook
2022-10-04 16:25         ` Edgecombe, Rick P
2022-10-04 10:17       ` David Laight
2022-10-04 19:32         ` Kees Cook
2022-10-05 13:32           ` David Laight
2022-10-20 21:29     ` Edgecombe, Rick P
2022-10-20 22:54       ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 25/39] x86/cet/shstk: Handle thread shadow stack Rick Edgecombe
2022-10-03 10:36   ` Mike Rapoport
2022-10-03 16:57     ` Edgecombe, Rick P
2022-10-03 20:29   ` Kees Cook
2022-10-04 22:09     ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 26/39] x86/cet/shstk: Introduce routines modifying shstk Rick Edgecombe
2022-10-03 20:44   ` Kees Cook
2022-10-04 22:13     ` Edgecombe, Rick P
2022-10-05  2:43   ` Andrew Cooper
2022-10-05 22:47     ` Edgecombe, Rick P
2022-10-05 22:58       ` Andrew Cooper
2022-10-20 21:51         ` Edgecombe, Rick P
2022-09-29 22:29 ` [PATCH v2 27/39] x86/cet/shstk: Handle signals for shadow stack Rick Edgecombe
2022-10-03 20:52   ` Kees Cook
2022-10-20 22:08     ` Edgecombe, Rick P
2022-10-20 22:57       ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 28/39] x86/cet/shstk: Introduce map_shadow_stack syscall Rick Edgecombe
2022-10-03 22:23   ` Kees Cook
2022-10-04 22:56     ` Edgecombe, Rick P
2022-10-04 23:16       ` H.J. Lu
2022-10-10 11:13   ` Florian Weimer
2022-10-10 14:19     ` Jason A. Donenfeld
2022-09-29 22:29 ` [PATCH v2 29/39] x86/cet/shstk: Support wrss for userspace Rick Edgecombe
2022-10-03 22:28   ` Kees Cook
2022-10-03 23:00     ` Andy Lutomirski
2022-10-04  4:37       ` Kees Cook
2022-10-06  0:38         ` Edgecombe, Rick P
2022-10-06  3:11           ` Kees Cook
2022-10-04  8:30     ` Mike Rapoport
2022-09-29 22:29 ` [PATCH v2 30/39] x86: Expose thread features status in /proc/$PID/arch_status Rick Edgecombe
2022-10-03 22:37   ` Kees Cook
2022-10-03 22:45     ` Andy Lutomirski
2022-10-04  4:18       ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 31/39] x86/cet/shstk: Wire in CET interface Rick Edgecombe
2022-10-03 22:41   ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 32/39] selftests/x86: Add shadow stack test Rick Edgecombe
2022-10-03 23:56   ` Kees Cook
2022-09-29 22:29 ` [PATCH v2 33/39] x86/cpufeatures: Limit shadow stack to Intel CPUs Rick Edgecombe
2022-10-03 23:57   ` Kees Cook
2022-10-04  0:09     ` Dave Hansen
2022-10-04  4:54       ` Kees Cook
2022-10-04 15:47         ` Nathan Chancellor
2022-10-04 19:43           ` John Allen
2022-10-04 20:34             ` Edgecombe, Rick P
2022-10-04 20:50               ` Nathan Chancellor
2022-10-04 21:17                 ` H. Peter Anvin
2022-10-04 23:24                   ` Edgecombe, Rick P
2022-11-03 17:39                     ` John Allen
2022-10-20 21:22                 ` Edgecombe, Rick P
2022-10-04  8:36       ` Mike Rapoport
2022-09-29 22:29 ` [OPTIONAL/CLEANUP v2 34/39] x86: Separate out x86_regset for 32 and 64 bit Rick Edgecombe
2022-09-29 22:29 ` [OPTIONAL/CLEANUP v2 35/39] x86: Improve formatting of user_regset arrays Rick Edgecombe
2022-09-29 22:29 ` [OPTIONAL/RFC v2 36/39] x86/fpu: Add helper for initing features Rick Edgecombe
2022-10-03 19:07   ` Chang S. Bae
2022-10-04 23:05     ` Edgecombe, Rick P
2022-09-29 22:29 ` [OPTIONAL/RFC v2 37/39] x86/cet: Add PTRACE interface for CET Rick Edgecombe
2022-10-03 23:59   ` Kees Cook
2022-10-04  8:44     ` Mike Rapoport
2022-10-04 19:24       ` Kees Cook
2022-09-29 22:29 ` [OPTIONAL/RFC v2 38/39] x86/cet/shstk: Add ARCH_CET_UNLOCK Rick Edgecombe
2022-10-04  0:00   ` Kees Cook
2022-09-29 22:29 ` [OPTIONAL/RFC v2 39/39] x86: Add alt shadow stack support Rick Edgecombe
2022-10-03 23:21   ` Andy Lutomirski
2022-10-04 16:12     ` Edgecombe, Rick P
2022-10-04 17:46       ` Andy Lutomirski
2022-10-04 18:04         ` Edgecombe, Rick P
2022-10-03 17:04 ` [PATCH v2 00/39] Shadowstacks for userspace Kees Cook
2022-10-03 17:25   ` Jann Horn
2022-10-04  5:01     ` Kees Cook
2022-10-04  9:57       ` David Laight
2022-10-04 19:28         ` Kees Cook
2022-10-03 18:33   ` Edgecombe, Rick P
2022-10-04  3:59     ` Kees Cook

Reply instructions:

You may reply publicly 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=202210031203.EB0DC0B7DD@keescook \
    --to=keescook@chromium.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=bsingharora@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=dethoma@microsoft.com \
    --cc=eranian@google.com \
    --cc=esyr@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=gorcunov@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jamorris@linux.microsoft.com \
    --cc=jannh@google.com \
    --cc=joao.moreira@intel.com \
    --cc=john.allen@amd.com \
    --cc=kcc@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mike.kravetz@oracle.com \
    --cc=mingo@redhat.com \
    --cc=nadav.amit@gmail.com \
    --cc=oleg@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=ravi.v.shankar@intel.com \
    --cc=rdunlap@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=rppt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=weijiang.yang@intel.com \
    --cc=x86@kernel.org \
    --cc=yu-cheng.yu@intel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.