From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934695AbbLPSEs (ORCPT ); Wed, 16 Dec 2015 13:04:48 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:49893 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966512AbbLPRka (ORCPT ); Wed, 16 Dec 2015 12:40:30 -0500 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Dave Hansen , Andrew Morton , Dave Hansen , "H. Peter Anvin" , Linus Torvalds , Peter Zijlstra , Ingo Molnar , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 008/128] x86/mpx: Introduce new 'directory entry' to 'addr' helper function Date: Wed, 16 Dec 2015 09:37:28 -0800 Message-Id: <1450287568-19808-9-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450287568-19808-1-git-send-email-kamal@canonical.com> References: <1450287568-19808-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.19.8-ckt12 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Dave Hansen 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(-) 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<