From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753047AbbKKXOT (ORCPT ); Wed, 11 Nov 2015 18:14:19 -0500 Received: from mail.kernel.org ([198.145.29.136]:34799 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbbKKXOS (ORCPT ); Wed, 11 Nov 2015 18:14:18 -0500 From: Andy Lutomirski To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Brian Gerst , Linus Torvalds , Borislav Petkov , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Weisbecker?= , Peter Zijlstra , Andy Lutomirski Subject: [PATCH v2 0/4] x86 entry stuff, maybe for 4.4 Date: Wed, 11 Nov 2015 15:14:10 -0800 Message-Id: X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 (4): 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 | 8 ++--- arch/x86/include/asm/jump_label.h | 63 ++++++++++++++++++++++++++++++---- include/linux/context_tracking_state.h | 4 +-- kernel/context_tracking.c | 4 +-- 5 files changed, 77 insertions(+), 17 deletions(-) -- 2.5.0