Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1268276 > unrolled thread

[PATCH v3 0/5] x86 entry stuff, maybe for 4.4

Started byAndy Lutomirski <luto@kernel.org>
First post2015-11-12 22:10 +0100
Last post2015-11-13 15:20 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/5] x86 entry stuff, maybe for 4.4 Andy Lutomirski <luto@kernel.org> - 2015-11-12 22:10 +0100
    [PATCH v3 3/5] x86/asm: Error out if asm/jump_label.h is included inappropriately Andy Lutomirski <luto@kernel.org> - 2015-11-12 22:10 +0100
      Re: [PATCH v3 3/5] x86/asm: Error out if asm/jump_label.h is included  inappropriately Thomas Gleixner <tglx@linutronix.de> - 2015-11-13 15:20 +0100

#1268276 — [PATCH v3 0/5] x86 entry stuff, maybe for 4.4

FromAndy Lutomirski <luto@kernel.org>
Date2015-11-12 22:10 +0100
Subject[PATCH v3 0/5] x86 entry stuff, maybe for 4.4
Message-ID<qu78l-5oc-3@gated-at.bofh.it>
The first patch is a bit ugly, but it fixes a bug that could affect
lockdep.  That bug is very minor and may not be observable at all,
but I don't really want to bet on it.

The other three are intended to fix a performance regression in the
entry rework that Frédéric objected to.  They're much later than I'd
like to have sent them for 4.4, but they're kind-of sort-of
regression fixes, so maybe they're still okay.  They would certainly
need careful review, though.

I don't have a great benchmark for them.  The biggest impact is
likely to be to user page fault latency on CONFIG_CONTEXT_TRACKING=y
kernels (i.e. distro kernels) that don't use context tracking
(i.e. most users).

Changes from v3: Actually send entire series (patch 1 was missing)

Changes from v1:
 - CALL_ENTER_FROM_USER_MODE is now CALL_enter_from_user_mode (Ingo)
 - STATIC_JUMP_IF_{TRUE,FALSE} now cannot be (mis-)used on non-jump-label
   kernels (Thomas)
 - Comments are better (Borislav)

This doesn't really address Thomas' objections to the HAVE_JUMP_LABEL stuff,
but it's more robust now, and maybe that's good enough.

Andy Lutomirski (5):
  x86/entry/64: Fix irqflag tracing wrt context tracking
  context_tracking: Switch to new static_branch API
  x86/asm: Error out if asm/jump_label.h is included inappropriately
  x86/asm: Add asm macros for static keys/jump labels
  x86/entry/64: Bypass enter_from_user_mode on non-context-tracking
    boots

 arch/x86/entry/calling.h               | 15 ++++++++
 arch/x86/entry/entry_64.S              | 27 +++++++++++----
 arch/x86/include/asm/jump_label.h      | 63 ++++++++++++++++++++++++++++++----
 include/linux/context_tracking_state.h |  4 +--
 kernel/context_tracking.c              |  4 +--
 5 files changed, 95 insertions(+), 18 deletions(-)

-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1268277 — [PATCH v3 3/5] x86/asm: Error out if asm/jump_label.h is included inappropriately

FromAndy Lutomirski <luto@kernel.org>
Date2015-11-12 22:10 +0100
Subject[PATCH v3 3/5] x86/asm: Error out if asm/jump_label.h is included inappropriately
Message-ID<qu7i2-5GE-15@gated-at.bofh.it>
In reply to#1268276
Rather than potentially generating incorrect code on a
non-HAVE_JUMP_LABEL kernel if someone includes asm/jump_label.h,
error out.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 arch/x86/include/asm/jump_label.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
index 5daeca3d0f9e..96872dc96597 100644
--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -1,6 +1,19 @@
 #ifndef _ASM_X86_JUMP_LABEL_H
 #define _ASM_X86_JUMP_LABEL_H
 
+#ifndef HAVE_JUMP_LABEL
+/*
+ * For better or for worse, if jump labels (the gcc extension) are missing,
+ * then the entire static branch patching infrastructure is compiled out.
+ * If that happens, the code in here will malfunction.  Raise a compiler
+ * error instead.
+ *
+ * In theory, jump labels and the static branch patching infrastructure
+ * could be decoupled to fix this.
+ */
+#error asm/jump_label.h included on a non-jump-label kernel
+#endif
+
 #ifndef __ASSEMBLY__
 
 #include <linux/stringify.h>
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1268968 — Re: [PATCH v3 3/5] x86/asm: Error out if asm/jump_label.h is included inappropriately

FromThomas Gleixner <tglx@linutronix.de>
Date2015-11-13 15:20 +0100
SubjectRe: [PATCH v3 3/5] x86/asm: Error out if asm/jump_label.h is included inappropriately
Message-ID<qunmO-7uR-7@gated-at.bofh.it>
In reply to#1268277

On Thu, 12 Nov 2015, Andy Lutomirski wrote:

> Rather than potentially generating incorrect code on a
> non-HAVE_JUMP_LABEL kernel if someone includes asm/jump_label.h,
> error out.
> 
> Signed-off-by: Andy Lutomirski <luto@kernel.org>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web