mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Dave Hansen <dave.hansen@linux.intel.com>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	the arch/x86 maintainers <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Rick Edgecombe <rick.p.edgecombe@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Kees Cook <kees@kernel.org>,
	Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>
Subject: [RFC PATCH 07/27] x86/entry: Handle int3 text patching with kernel shadow stack
Date: Sun, 29 Nov 2026 22:29:32 +0000	[thread overview]
Message-ID: <20261129222953.9124-8-kprateek.nayak@amd.com> (raw)
In-Reply-To: <20261129222953.9124-1-kprateek.nayak@amd.com>

Kernel running with shadow stacks enabled explode early into the boot
during text-poke like:

  RIP: 0010:asm_fred_entrypoint_kernel+0x5f/0x70    <- ERETS, #CP
  RIP: 0010:native_send_call_func_ipi+0x11/0xf0     <- after emulated NOP5
    smp_call_function_many_cond+0x2c0/0x5f0
    smp_text_poke_batch_finish+0x12f/0x590
    static_key_enable+0x1f/0x30
    _cpu_up+0x11a/0x260

With kernel shadow stacks, a same-level FRED event pushes {CS, LIP, SSP}
onto the shadow stack. ERETS raises #CP unless LIP and CS match the RIP
and CS on the regular stack. The extable code already updates the frame
through regs_set_return_ip() but this has not been extended to generic
int3 based text patching.

Emulating JMP and RET are simple enough - jmp sets the ret->ip like
extables and ret too does this with an addition of an emulated stack pop
to direct to the return IP which has to adjust the SSP accordingly by
moving it one slot lower.

Emulating a CALL is slightly more complicated - CALL pushes the return
address onto the stack and jumps to the function as if it was called
from LIP.

FRED stacks add a redzone on the stack that can be used for the call
emulation but there is no gap in shadow stack for the same.

There are two ways to solve this:

o Inspired by IDT handling, add a dummy shadow stack slot on shadow
  stack for X86_TRAP_BP. This slot can then be used for CALL emulation
  to push a ret frame below the FRED shadow stack frame and then steer
  the FRED shadow stack frame to return to the caller.

  In practice it looks like:

  .macro PUSH_KERN_SHSTK_FRAME
    xor %eax, %eax
    pushq %rax

    rdsspq %rax
    cmpb  $X86_TRAP_BP, PTREGS_fred_vector(%rdi)
    jne .Lpush_shstk_done\@

    ANNOTATE_INTRA_FUNCTION_CALL
    call 1f
    int3
  1:
    /* Indicate one extra slot is available on frame */
    add $8, %rsp
    incq (%rsp)
  .Lpush_shstk_done\@:
    push %rax
  .endm

  .macro POP_KERN_SHSTK_FRAME
    pop %rax
    pop	%rax
    /* Spare slots are recalimed here. */
    incsspq %rax
  .endm

  The CALL emulation moves the FRED frame up by one slot to occupy the
  spare slot, sets 8(%rsp) to 0 to indicate that spare slot has
  been consumed

  This has one key disadvantage that the INTRA_FUNCTION_CALL for every
  #BP will unbalance the RSB and CPU will mis-speculate every return
  after the handler has finished. Not ideal.

o (Implemented here) Use the same spare frame flags at 8(%rsp) to insert
  a tail call at POP_KERN_SHSTK_FRAME during FRED_EXIT. This adds a
  matching RSB to call entry much like the orig_rax path in the
  ftrace_regs_call.

  The call emulation would have adjusted the SS frame to insert the ret
  frame, CS, and LIP. POP_KERN_SHSTK_FRAME adds the missing SSP to slot
  by pointing it to SPP + 32 after the INTRA_FUNCTION_CALL.

The emulation functions are marked noisntr since subsequent patches
enable Ftrace caller hooks which can recurse if the patching function
can be probed.

Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
---
 arch/x86/entry/entry_64_fred.S       |  92 ++++++++++++++---
 arch/x86/include/asm/insn-eval.h     |  22 ++++-
 arch/x86/include/asm/text-patching.h |   7 +-
 arch/x86/kernel/alternative.c        |   4 +-
 arch/x86/kernel/asm-offsets.c        |   3 +
 arch/x86/kernel/cet.c                | 142 +++++++++++++++++++++++++--
 arch/x86/kernel/traps.c              |   4 +-
 7 files changed, 247 insertions(+), 27 deletions(-)

diff --git a/arch/x86/entry/entry_64_fred.S b/arch/x86/entry/entry_64_fred.S
index 9ff32e2a9103..284976114c70 100644
--- a/arch/x86/entry/entry_64_fred.S
+++ b/arch/x86/entry/entry_64_fred.S
@@ -3,6 +3,7 @@
  * The actual FRED entry points.
  */
 
+#include <linux/annotate.h>
 #include <linux/export.h>
 #include <linux/kvm_types.h>
 
@@ -16,6 +17,79 @@
 	.code64
 	.section .noinstr.text, "ax"
 
+#ifdef CONFIG_X86_KERN_SHADOW_STACK
+
+/*
+ * A INT3 breakpoint can emulate a CALL which requires pushing the
+ * return frame below this FRED event. Allow the handlers to communicate
+ * if it emulated a CALL by setting a flag on the stack.
+ *
+ * FRED event pushes { SSP, LIP, CS } onto the shadow stack and SSP
+ * points to record three slots for top here and it should stay that
+ * way.
+ *
+ * CALL emulation will consume the SSP, push a return frame below, and
+ * set a flag on stack. If the flag is set, FRED_EXIT will add an
+ * shadow stack frame on top by doing an INTRA_FUNCTION_CALL and
+ * populate the top with a pointer to three slots below, thus recreating
+ * the correct FRED frame.
+ */
+.macro PUSH_KERN_SHSTK_FRAME
+	xor	%eax, %eax
+	rdsspq  %rax /* NOP if SHSTK is off. */
+	pushq	%rax
+	/*
+	 * Frame metadata:
+	 *
+	 *   [15:8] Context (FRED_EVENT)
+	 *   [ 7:0] fred_exit_work_flags
+	 *
+	 * Context data is used by CET helpers to interpret
+	 * SSP frame. fred_exit_work_flags is used to fixup
+	 * shadow stack for CALL emulation.
+	 */
+	pushq	$0x100
+.endm
+
+/* Clobbers RAX, RCX; Both will be restored later. */
+.macro POP_KERN_SHSTK_FRAME
+	popq	%rax /* fred_exit_work_flags */
+
+	/* Only one action is supported currently. */
+	test	%al, %al
+	jz	.Lpop_shstk_done\@
+
+	/*
+	 * CALL Emulation has overwritten the shadow-stack frame and
+	 * SSP is lost. Point it back to 3 slots down where the real
+	 * return has to go.
+	 *
+	 * Doing a CALL here will add a RSB which the next RET will
+	 * mispredict on but all RETs after that are balanced.
+	 */
+	ANNOTATE_INTRA_FUNCTION_CALL
+	call	1f
+	int3
+1:
+	/* Synthesize the corrct SSP to fix the FRED Frame. */
+	addq	$8, %rsp
+	rdsspq	%rax
+	leaq	24(%rax), %rcx
+	wrssq	%rcx, (%rax)
+
+.Lpop_shstk_done\@:
+	popq	%rax
+.endm
+
+#else /* !CONFIG_X86_KERN_SHADOW_STACK */
+
+.macro PUSH_KERN_SHSTK_FRAME
+.endm
+.macro POP_KERN_SHSTK_FRAME
+.endm
+
+#endif /* CONFIG_X86_KERN_SHADOW_STACK */
+
 .macro FRED_ENTER ssp=0
 	UNWIND_HINT_END_OF_STACK
 	ANNOTATE_NOENDBR
@@ -23,20 +97,16 @@
 	ENCODE_FRAME_POINTER
 	movq	%rsp, %rdi	/* %rdi -> pt_regs */
 
-#ifdef CONFIG_X86_KERN_SHADOW_STACK
-       .if \ssp
-       rdsspq  %rax /* NOP if SHSTK is off.  Pre-zeroed. */
-       push    %rax
-       .endif
-#endif
+.if \ssp
+	PUSH_KERN_SHSTK_FRAME
+.endif
 .endm
 
 .macro FRED_EXIT ssp=0
-#ifdef CONFIG_X86_KERN_SHADOW_STACK
-       .if \ssp
-       pop     %rax /* Any dead register */
-       .endif
-#endif
+.if \ssp
+	POP_KERN_SHSTK_FRAME
+.endif
+
 	UNWIND_HINT_REGS
 	POP_REGS
 .endm
diff --git a/arch/x86/include/asm/insn-eval.h b/arch/x86/include/asm/insn-eval.h
index 2f4c4d3d3f9b..75d40a399ace 100644
--- a/arch/x86/include/asm/insn-eval.h
+++ b/arch/x86/include/asm/insn-eval.h
@@ -83,8 +83,13 @@ static inline void insn_assign_reg(unsigned long *reg, u64 val, int bytes)
 }
 
 #ifdef CONFIG_X86_CET
+
 void regs_set_return_ip(struct pt_regs *regs, unsigned long ip);
-#else
+void regs_emulate_call(struct pt_regs *regs, unsigned long ret, unsigned long func);
+void regs_emulate_ret(struct pt_regs *regs, unsigned long ret_ip);
+
+#else /* !CONFIG_X86_CET */
+
 static inline void regs_set_return_ip(struct pt_regs *regs, unsigned long ip)
 {
 	/* This is only for changing kernel return addresses: */
@@ -92,6 +97,19 @@ static inline void regs_set_return_ip(struct pt_regs *regs, unsigned long ip)
 
 	regs->ip = ip;
 }
-#endif
+
+static inline void regs_emulate_call(struct pt_regs *regs,
+				     unsigned long ret,
+				     unsigned long func)
+{
+	regs_set_return_ip(regs, func);
+}
+
+static inline void regs_emulate_ret(struct pt_regs *regs, unsigned long ret_ip)
+{
+	regs_set_return_ip(regs, ret_ip);
+}
+
+#endif /* CONFIG_X86_CET */
 
 #endif /* _ASM_X86_INSN_EVAL_H */
diff --git a/arch/x86/include/asm/text-patching.h b/arch/x86/include/asm/text-patching.h
index ea09381070e8..2c0c736fb62a 100644
--- a/arch/x86/include/asm/text-patching.h
+++ b/arch/x86/include/asm/text-patching.h
@@ -5,6 +5,7 @@
 #include <linux/types.h>
 #include <linux/stddef.h>
 #include <asm/ptrace.h>
+#include <asm/insn-eval.h>
 
 /*
  * Currently, the max observed size in the kernel code is
@@ -135,7 +136,7 @@ extern __ro_after_init unsigned long text_poke_mm_addr;
 static __always_inline
 void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip)
 {
-	regs->ip = ip;
+	regs_set_return_ip(regs, ip);
 }
 
 static __always_inline
@@ -167,14 +168,14 @@ static __always_inline
 void int3_emulate_call(struct pt_regs *regs, unsigned long ip, unsigned long func)
 {
 	int3_emulate_push(regs, ip);
-	int3_emulate_jmp(regs, func);
+	regs_emulate_call(regs, ip, func);
 }
 
 static __always_inline
 void int3_emulate_ret(struct pt_regs *regs)
 {
 	unsigned long ip = int3_emulate_pop(regs);
-	int3_emulate_jmp(regs, ip);
+	regs_emulate_ret(regs, ip);
 }
 
 static __always_inline
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 582c6d8307d1..20880945a1fa 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -1981,7 +1981,7 @@ static bool decode_fineibt_preamble(struct pt_regs *regs, unsigned long *target,
 	 * Since regs->ip points to the middle of an instruction; it cannot
 	 * continue with the normal fixup.
 	 */
-	regs->ip = *target;
+	regs_set_return_ip(regs, *target);
 
 	return true;
 
@@ -2085,7 +2085,7 @@ static bool decode_fineibt_paranoid(struct pt_regs *regs, unsigned long *target,
 		*target = regs->r11 + fineibt_prefix_size;
 		*type = regs->ax;
 
-		regs->ip = *target;
+		regs_set_return_ip(regs, *target);
 		return true;
 	}
 
diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
index acbd0c1fb2ad..fc1cbee2f9e9 100644
--- a/arch/x86/kernel/asm-offsets.c
+++ b/arch/x86/kernel/asm-offsets.c
@@ -112,6 +112,9 @@ static void __used common(void)
 	BLANK();
 	DEFINE(PTREGS_SIZE, sizeof(struct pt_regs));
 	OFFSET(C_PTREGS_SIZE, pt_regs, orig_ax);
+#ifdef CONFIG_X86_KERN_SHADOW_STACK
+	DEFINE(PTREGS_fred_vector, offsetof(struct pt_regs, fred_ss) + 4);
+#endif
 
 	/* TLB state for the entry code */
 	OFFSET(TLB_STATE_user_pcid_flush_mask, tlb_state, user_pcid_flush_mask);
diff --git a/arch/x86/kernel/cet.c b/arch/x86/kernel/cet.c
index 97375a8335c8..bab8ff1c64c5 100644
--- a/arch/x86/kernel/cet.c
+++ b/arch/x86/kernel/cet.c
@@ -114,6 +114,14 @@ static void ibt_clear_fred_wfe(struct pt_regs *regs)
 	regs->fred_cs.wfe = 0;
 }
 
+enum fred_exit_work {
+	FRED_EXIT_EMULATE_CALL = 1
+};
+
+enum frame_context {
+	FRED_ENTRY = 1
+};
+
 /*
  * FRED hardware pushes this frame on to the shadow stack for
  * kernel=>kernel entry. First (lowest address) in this struct
@@ -129,11 +137,23 @@ struct fred_shstk_entry_frame {
  * The kernel=>kernel entry code pushes SSP on to the entry stack.
  * This only occurs for kernel=>kernel entry. Not userspace.
  *
- * SSP is pushed on to the frame below pt_regs. At the point it is
- * pushed, it points to a special FRED entry frame.
+ * Number of spare frames available on shadow stack is pushed onto
+ * the frame below pt_regs followed by the SSP before the spare
+ * frames were populated (if any). At the point it is pushed, it
+ * points to a special FRED entry frame.
  */
-struct fred_kernel_frame {
-	struct fred_shstk_entry_frame *ssef;
+struct kernel_event_frame {
+	union {
+		struct {
+			u8 fred_exit_work_flags;
+			u8 context;
+		};
+		u64 metadata;
+	};
+	union {
+		struct fred_shstk_entry_frame *ssef;
+		u64 *ssp;
+	};
 	struct pt_regs regs;
 };
 
@@ -158,7 +178,7 @@ static void do_kernel_shstk_cp(struct pt_regs *regs, unsigned long error_code)
 	unsigned long ssp, ip, shstk_ip, sp_off = 0;
 	u8 insn[sizeof(erets)] = { };
 
-	ssef = container_of(regs, struct fred_kernel_frame, regs)->ssef;
+	ssef = container_of(regs, struct kernel_event_frame, regs)->ssef;
 	ssp = cp_peek((unsigned long)&ssef->ssef_ssp);
 
 	switch (error_code & CP_EC) {
@@ -249,7 +269,7 @@ DEFINE_IDTENTRY_ERRORCODE(exc_control_protection)
  *
  * Update the FRED entry frame in addition to regs->ip.
  */
-void regs_set_return_ip(struct pt_regs *regs, unsigned long ip)
+noinstr void regs_set_return_ip(struct pt_regs *regs, unsigned long ip)
 {
 	struct fred_shstk_entry_frame *ssef;
 
@@ -261,9 +281,117 @@ void regs_set_return_ip(struct pt_regs *regs, unsigned long ip)
 	/* Only kernel-mode events save the 'ssef' pointer. */
 	WARN_ON_ONCE(user_mode(regs));
 
-	ssef = container_of(regs, struct fred_kernel_frame, regs)->ssef;
+	ssef = container_of(regs, struct kernel_event_frame, regs)->ssef;
+	if (!ssef)
+		return;
+
+	wrss(ip, &ssef->ssef_lip);
+}
+
+/*
+ * Make the event return to @func as if it executed a CALL that returns to
+ * @ret. The caller has already pushed @ret on the regular stack.
+ * If int3 does not emulate a CALL, the dummy shadow stack frame is popped
+ * at FRED_EXIT \ssp=1 before ERETS.
+ */
+noinstr void regs_emulate_call(struct pt_regs *regs, unsigned long ret, unsigned long func)
+{
+	struct fred_shstk_entry_frame *ssef;
+	struct kernel_event_frame *frame;
+	int frame_size;
+	u64 *raw_frame;
+
+	regs->ip = func;
+
+	if (!cpu_feature_enabled(X86_FEATURE_KERN_SHSTK))
+		return;
+
+	WARN_ON_ONCE(user_mode(regs));
+
+	frame = container_of(regs, struct kernel_event_frame, regs);
+
+	ssef = frame->ssef;
+	if (!ssef)
+		return;
+
+	/* Someone else emulated a CALL for same frame? */
+	if (WARN_ON_ONCE(frame->fred_exit_work_flags))
+		return;
+
+	/*
+	 * Return frame must be right below the FRED frame
+	 * else FRED_EXIT will not be able to recreate the
+	 * SSP correctly. Leave breadcrumbs if we #CP.
+	 */
+	raw_frame = (u64 *)ssef;
+	frame_size = sizeof(*ssef) / sizeof(u64);
+	WARN_ON_ONCE((u64 *)ssef->ssef_ssp != raw_frame + frame_size);
+
+	frame->fred_exit_work_flags |= FRED_EXIT_EMULATE_CALL;
+	wrss(func, &ssef->ssef_lip);
+
+	/*
+	 * Consume the SSP and move the rest of the FRED frame aka
+	 * { LIP, CS } up by one slot. This is how the shadow stack
+	 * looks at the end:
+	 *
+	 *   +-----+			+-----+ <--- Top of Shadow Stack
+	 *   | SSP |			| LIP |
+	 *   | LIP |		->	| CS  |
+	 *   | CS  |			+-----+
+	 *   +-----+ <- SSP points	| RET |
+	 *   | ... |    here		+-----+
+	 *   +-----+			| ... |
+	 *
+	 * Since SSP should always point 3 slots below, a new frame is
+	 * synthesized at FRED exit to reconstruct the SSP making the
+	 * FRED frame whole again before ERETS.
+	 *
+	 * XXX: One wrss() call can be reduced by doing "ssef_lip"
+	 * overwrite during the movement but keep it simple for now.
+	 */
+	for (int i = 0; i < frame_size - 1; ++i)
+		wrss(raw_frame[i + 1], &raw_frame[i]);
+
+	/*
+	 * Populate the ret frame and consme the FRED frame
+	 * pointer so no other emulation is possible.
+	 */
+	wrss(ret, &raw_frame[frame_size - 1]);
+	frame->ssef = NULL;
+}
+
+/*
+ * Make the event return to @ip as if it executed a RET. The caller
+ * has already popped @ip off the regular stack.
+ */
+noinstr void regs_emulate_ret(struct pt_regs *regs, unsigned long ip)
+{
+	struct fred_shstk_entry_frame *ssef;
+
+	regs->ip = ip;
+
+	if (!cpu_feature_enabled(X86_FEATURE_KERN_SHSTK))
+		return;
+
+	WARN_ON_ONCE(user_mode(regs));
+
+	ssef = container_of(regs, struct kernel_event_frame, regs)->ssef;
 	if (!ssef)
 		return;
 
+	/*
+	 * Return target should point to the old SP on top of the shadow
+	 * stack that was popped from the regular stack.
+	 */
+	if (*((u64 *)ssef->ssef_ssp) != ip)
+		return;
+
+	/* Point the SP on the frame to the new SP one frame below. */
+	wrss(ssef->ssef_ssp + sizeof(unsigned long), &ssef->ssef_ssp);
+	/*
+	 * Set return ip on frame to the new return target such that
+	 * return from FRED frame jumps to the target.
+	 */
 	wrss(ip, &ssef->ssef_lip);
 }
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 30aa8369957e..01b16dcd0d8c 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -466,9 +466,9 @@ noinstr bool handle_bug(struct pt_regs *regs)
 	 */
 	if (handled) {
 		if (regs->ip == addr)
-			regs->ip += ud_len;
+			regs_set_return_ip(regs, addr + ud_len);
 	} else {
-		regs->ip = addr;
+		regs_set_return_ip(regs, addr);
 	}
 
 	if (regs->flags & X86_EFLAGS_IF)
-- 
2.43.0


  parent reply	other threads:[~2026-11-29 22:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 22:29 [RFC PATCH 00/27] x86/shstk: More shadow stack enablement and path to IDT support K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 01/27] x86/entry: Parameterize kernel shadow stack handling at FRED entry K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 02/27] x86/perf_regs: Rename pt_regs_offset array to prevent build failure K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 03/27] x86/cet: Fix build for KERN_SHADOW_STACK and !USER_SHADOW_STACK K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 04/27] x86/cet: Make kernel shadow stack #CP fatal instead of livelocking K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 05/27] x86/sync_core: Don't use IRET-to-self with kernel shadow stacks K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 06/27] x86/process: Initialize and enable kernel shadow stack at boot K Prateek Nayak
2026-11-29 22:29 ` K Prateek Nayak [this message]
2026-11-29 22:29 ` [RFC PATCH 08/27] x86/retpoline: Handle retpolies and thunks with kernel shadow stack K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 09/27] x86/ftrace: Prepare ftrace trampolines to handle " K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 10/27] x86/kprobes: Prepare optprobe trampoline to handle shadow stacks K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 11/27] x86/rethook: Prepare the rethook trampoline to handle shadow stack K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 12/27] x86/cet: Make regs_set_return_ip() helpers context aware K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 13/27] x86/cet: Introduce regs_set_return_trampoline() for rethook trampoline K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 14/27] x86/ftrace,livepatch: Use CET helpers for ftrace regs->ip and trampoline redirection K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 15/27] x86/rethook: Make the trampoline insert and return shadow stack aware K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 16/27] x86/error_inject: Use CET helpers to insert just_return_func trampoline K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 17/27] x86/kprobes: Use CET helpers in kprobe core to modify regs->ip K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 18/27] x86/bpf: Make BPF JIT aware of CET handling K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 19/27] x86/shstk: Remove profiling related dependencies for KERN_SHADOW_STACK K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 20/27] x86/shstk: Disable kenrel shadow stack when CPU is offlined K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 21/27] x86/shstsk: Allow suspend-resume and hibernation with kernel shadow stack K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 22/27] x86/shstk: Save and restore shadow stack pointer during kexec K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 23/27] x86/idt: Map MCE shadow stack and populate the INT_SPP table K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 24/27] x86/process: Initialize shadow stack for IDT systems K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 25/27] x86/entry: Prepare IDT entry for shadow stacks K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 26/27] x86/syscall: Toggle shadow stack busy on entry and exit from syscall K Prateek Nayak
2026-11-29 22:29 ` [RFC PATCH 27/27] x86/entry: Handle shadow stack on nested NMI K Prateek Nayak
2026-11-29 23:00 ` [RFC PATCH 00/27] x86/shstk: More shadow stack enablement and path to IDT support Andrew Cooper

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=20261129222953.9124-8-kprateek.nayak@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®