From patchwork Mon Dec 14 22:47:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 556941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 17E0C140AB4; Tue, 15 Dec 2015 23:17:38 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1a8oXv-0008Sd-39; Tue, 15 Dec 2015 12:17:35 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1a8btd-0000Nh-3W for kernel-team@lists.ubuntu.com; Mon, 14 Dec 2015 22:47:09 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1a8btb-0004oo-SM; Mon, 14 Dec 2015 22:47:08 +0000 Received: from kamal by fourier with local (Exim 4.82) (envelope-from ) id 1a8btZ-00027z-LF; Mon, 14 Dec 2015 14:47:05 -0800 From: Kamal Mostafa To: Dave Hansen Subject: [3.19.y-ckt stable] Patch "x86/mpx: Introduce new 'directory entry' to 'addr' helper function" has been added to staging queue Date: Mon, 14 Dec 2015 14:47:05 -0800 Message-Id: <1450133225-8149-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 X-Extended-Stable: 3.19 X-Mailman-Approved-At: Tue, 15 Dec 2015 12:17:30 +0000 Cc: Dave Hansen , Peter Zijlstra , Kamal Mostafa , Ingo Molnar , kernel-team@lists.ubuntu.com, "H. Peter Anvin" , Thomas Gleixner , Linus Torvalds , Andrew Morton X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled x86/mpx: Introduce new 'directory entry' to 'addr' helper function to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue This patch is scheduled to be released in version 3.19.8-ckt12. If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.19.y-ckt tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From 8898f1ad06d762863899773b0b5b6ebc305b561d Mon Sep 17 00:00:00 2001 From: Dave Hansen Date: Sun, 7 Jun 2015 11:37:04 -0700 Subject: x86/mpx: Introduce new 'directory entry' to 'addr' helper function commit 54587653904c552c56b9dec153d7a89063394b09 upstream. Currently, to get from a bounds directory entry to the virtual address of a bounds table, we simply mask off a few low bits. However, the set of bits we mask off is different for 32-bit and 64-bit binaries. This breaks the operation out in to a helper function and also adds a temporary variable to store the result until we are sure we are returning one. Signed-off-by: Dave Hansen Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20150607183704.007686CE@viggo.jf.intel.com Signed-off-by: Ingo Molnar [ kamal: 3.19-stable prereq for "46561c3 x86/mpx: Do proper get_user() when running 32-bit binaries on 64-bit kernels" ] Signed-off-by: Kamal Mostafa --- arch/x86/include/asm/mpx.h | 1 - arch/x86/mm/mpx.c | 41 ++++++++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 8 deletions(-) -- 1.9.1 diff --git a/arch/x86/include/asm/mpx.h b/arch/x86/include/asm/mpx.h index a952a13d..2857144 100644 --- a/arch/x86/include/asm/mpx.h +++ b/arch/x86/include/asm/mpx.h @@ -46,7 +46,6 @@ #define MPX_BNDCFG_TAIL 12 #define MPX_BNDSTA_ADDR_MASK (~((1UL<