Thread (222 messages) 222 messages, 21 authors, 2022-11-03

Re: [PATCH v2 07/39] x86/cet: Add user control-protection fault handler

From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Date: 2022-10-03 18:12:38
Also in: linux-arch, linux-doc, linux-mm, lkml

On Mon, 2022-10-03 at 17:01 +0300, Kirill A . Shutemov wrote:
On Thu, Sep 29, 2022 at 03:29:04PM -0700, Rick Edgecombe wrote:
quoted
+#else
+static void do_user_control_protection_fault(struct pt_regs *regs,
+                                          unsigned long
error_code)
+{
+     WARN_ONCE(1, "User-mode control protection fault with shadow
support disabled\n");
Why is this a warning, but runtime check for !X86_FEATURE_IBT and
!X86_FEATURE_SHSTK below is fatal?
It was a BUG() in the original KERNEL_IBT focused handler IIRC. There
seems to be some renewed effort to stop doing those:

https://lore.kernel.org/all/20220923113426.52871-2-david@redhat.com/T/#u (local)

...so I'll change it to a WARN for this. In the kernel specific portion
of the handler, it also does a BUG on endbranch violation. I'll leave
that one for this change.

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