diff for duplicates of <20220828135407.3897717-1-xianting.tian@linux.alibaba.com>
diff --git a/a/1.txt b/N1/1.txt
index 8206cb3..ccd0ed9 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,3 +1,5 @@
+From: Xianting Tian <xianting.tian@linux.alibaba.com>
+
This adds support for the STACKLEAK gcc plugin to RISC-V and disables
the plugin in EFI stub code, which is out of scope for the protection.
@@ -28,35 +30,6 @@ index ed66c31e4655..61fd0dad4463 100644
select HAVE_ASM_MODVERSIONS
select HAVE_CONTEXT_TRACKING_USER
select HAVE_DEBUG_KMEMLEAK
-diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h
-index 19eedd4af4cd..75620c467d25 100644
---- a/arch/riscv/include/asm/processor.h
-+++ b/arch/riscv/include/asm/processor.h
-@@ -85,6 +85,10 @@ int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid);
- extern void riscv_fill_hwcap(void);
- extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
-
-+#define current_top_of_stack() ((unsigned long)current->stack + THREAD_SIZE)
-+#define on_thread_stack() ((unsigned long)((current_top_of_stack() \
-+ - current_stack_pointer) < THREAD_SIZE))
-+
- #endif /* __ASSEMBLY__ */
-
- #endif /* _ASM_RISCV_PROCESSOR_H */
-diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
-index b9eda3fcbd6d..5f98660b46d4 100644
---- a/arch/riscv/kernel/entry.S
-+++ b/arch/riscv/kernel/entry.S
-@@ -233,6 +233,9 @@ check_syscall_nr:
- ret_from_syscall:
- /* Set user a0 to kernel a0 */
- REG_S a0, PT_A0(sp)
-+#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
-+ call stackleak_erase_on_task_stack
-+#endif
- /*
- * We didn't execute the actual syscall.
- * Seccomp already set return value for the current task pt_regs.
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index d0537573501e..5e1fc4f82883 100644
--- a/drivers/firmware/efi/libstub/Makefile
diff --git a/a/content_digest b/N1/content_digest
index 87ae7d7..d8aad66 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,25 +1,41 @@
[
- "From\0Xianting Tian <xianting.tian\@linux.alibaba.com>\0"
+ "ref\00020220903162328.1952477-1-guoren\@kernel.org\0"
+]
+[
+ "From\0guoren\@kernel.org\0"
]
[
"Subject\0[PATCH] RISC-V: Add STACKLEAK erasing the kernel stack at the end of syscalls\0"
]
[
- "Date\0Sun, 28 Aug 2022 21:54:07 +0800\0"
+ "Date\0Sat, 3 Sep 2022 12:23:28 -0400\0"
]
[
- "To\0paul.walmsley\@sifive.com",
+ "To\0oleg\@redhat.com",
+ " vgupta\@kernel.org",
+ " linux\@armlinux.org.uk",
+ " monstr\@monstr.eu",
+ " dinguyen\@kernel.org",
" palmer\@dabbelt.com",
+ " davem\@davemloft.net",
+ " arnd\@arndb.de",
+ " shorne\@gmail.com",
+ " guoren\@kernel.org",
+ " paul.walmsley\@sifive.com",
" aou\@eecs.berkeley.edu",
" ardb\@kernel.org",
- " guoren\@kernel.org",
" heiko\@sntech.de\0"
]
[
- "Cc\0linux-riscv\@lists.infradead.org",
+ "Cc\0linux-arch\@vger.kernel.org",
" linux-kernel\@vger.kernel.org",
- " linux-efi\@vger.kernel.org",
- " Xianting Tian <xianting.tian\@linux.alibaba.com>\0"
+ " linux-riscv\@lists.infradead.org",
+ " linux-arm-kernel\@lists.infradead.org",
+ " linux-snps-arc\@lists.infradead.org",
+ " sparclinux\@vger.kernel.org",
+ " openrisc\@lists.librecores.org",
+ " Xianting Tian <xianting.tian\@linux.alibaba.com>",
+ " linux-efi\@vger.kernel.org\0"
]
[
"\0000:1\0"
@@ -28,6 +44,8 @@
"b\0"
]
[
+ "From: Xianting Tian <xianting.tian\@linux.alibaba.com>\n",
+ "\n",
"This adds support for the STACKLEAK gcc plugin to RISC-V and disables\n",
"the plugin in EFI stub code, which is out of scope for the protection.\n",
"\n",
@@ -58,35 +76,6 @@
" \tselect HAVE_ASM_MODVERSIONS\n",
" \tselect HAVE_CONTEXT_TRACKING_USER\n",
" \tselect HAVE_DEBUG_KMEMLEAK\n",
- "diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h\n",
- "index 19eedd4af4cd..75620c467d25 100644\n",
- "--- a/arch/riscv/include/asm/processor.h\n",
- "+++ b/arch/riscv/include/asm/processor.h\n",
- "\@\@ -85,6 +85,10 \@\@ int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid);\n",
- " extern void riscv_fill_hwcap(void);\n",
- " extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);\n",
- " \n",
- "+#define current_top_of_stack()\t((unsigned long)current->stack + THREAD_SIZE)\n",
- "+#define on_thread_stack()\t((unsigned long)((current_top_of_stack() \\\n",
- "+\t\t\t\t - current_stack_pointer) < THREAD_SIZE))\n",
- "+\n",
- " #endif /* __ASSEMBLY__ */\n",
- " \n",
- " #endif /* _ASM_RISCV_PROCESSOR_H */\n",
- "diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S\n",
- "index b9eda3fcbd6d..5f98660b46d4 100644\n",
- "--- a/arch/riscv/kernel/entry.S\n",
- "+++ b/arch/riscv/kernel/entry.S\n",
- "\@\@ -233,6 +233,9 \@\@ check_syscall_nr:\n",
- " ret_from_syscall:\n",
- " \t/* Set user a0 to kernel a0 */\n",
- " \tREG_S a0, PT_A0(sp)\n",
- "+#ifdef CONFIG_GCC_PLUGIN_STACKLEAK\n",
- "+\tcall stackleak_erase_on_task_stack\n",
- "+#endif\n",
- " \t/*\n",
- " \t * We didn't execute the actual syscall.\n",
- " \t * Seccomp already set return value for the current task pt_regs.\n",
"diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile\n",
"index d0537573501e..5e1fc4f82883 100644\n",
"--- a/drivers/firmware/efi/libstub/Makefile\n",
@@ -110,4 +99,4 @@
"http://lists.infradead.org/mailman/listinfo/linux-riscv"
]
-9351b46af59a115017086c49f490e4fe13965c9ab137ce76af2c3bd63f5ba792
+74d7cfedcb5b17281ad97fd434de1506353ff8e90ea2e1788641e5193aecdfc0
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).