Thread (107 messages) 107 messages, 7 authors, 2020-04-08

Re: [RFC PATCH v9 05/27] x86/cet/shstk: Add Kconfig option for user-mode Shadow Stack protection

From: H.J. Lu <hidden>
Date: 2020-02-27 01:03:08
Also in: linux-api, linux-doc, linux-mm, lkml

On Wed, Feb 26, 2020 at 10:05 AM Dave Hansen [off-list ref] wrote:
On 2/5/20 10:19 AM, Yu-cheng Yu wrote:
quoted
+# Check assembler Shadow Stack suppot
                                  ^ support
quoted
+ifdef CONFIG_X86_INTEL_SHADOW_STACK_USER
+  ifeq ($(call as-instr, saveprevssp, y),)
+      $(error CONFIG_X86_INTEL_SHADOW_STACK_USER not supported by the assembler)
+  endif
+endif
Is this *just* looking for instruction support in the assembler?

We usually just .byte them, like this for pkeys:

        asm volatile(".byte 0x0f,0x01,0xee\n\t"
                     : "=a" (pkru), "=d" (edx)
                     : "c" (ecx));

That way everybody with old toolchains can still build the kernel (and
run/test code with your config option on, btw...).
CET requires a complete new OS image from kernel, toolchain, run-time.
CET enabled kernel without the rest of updated OS won't give you CET
at all.

-- 
H.J.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help