From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753412AbbC0Vzn (ORCPT ); Fri, 27 Mar 2015 17:55:43 -0400 Received: from mga02.intel.com ([134.134.136.20]:19229 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753044AbbC0Vw5 (ORCPT ); Fri, 27 Mar 2015 17:52:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,481,1422950400"; d="scan'208";a="671692614" Subject: [PATCH 11/17] x86, mpx: we do not allocate the bounds directory To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, tglx@linutronix.de, Dave Hansen , dave.hansen@linux.intel.com From: Dave Hansen Date: Fri, 27 Mar 2015 14:53:09 -0700 References: <20150327215253.8583D538@viggo.jf.intel.com> In-Reply-To: <20150327215253.8583D538@viggo.jf.intel.com> Message-Id: <20150327215309.B648C240@viggo.jf.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Hansen The comment and code here are confusing. We do not currently allocate the bounds directory in the kernel. Signed-off-by: Dave Hansen --- b/arch/x86/mm/mpx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN arch/x86/mm/mpx.c~x86-mpx-we-do-not-allocate-the-bounds-directory arch/x86/mm/mpx.c --- a/arch/x86/mm/mpx.c~x86-mpx-we-do-not-allocate-the-bounds-directory 2015-03-27 14:35:08.031909106 -0700 +++ b/arch/x86/mm/mpx.c 2015-03-27 14:35:08.035909287 -0700 @@ -51,8 +51,8 @@ static unsigned long mpx_mmap(unsigned l vm_flags_t vm_flags; struct vm_area_struct *vma; - /* Only bounds table and bounds directory can be allocated here */ - if (len != MPX_BD_SIZE_BYTES && len != MPX_BT_SIZE_BYTES) + /* Only bounds table can be allocated here */ + if (len != MPX_BT_SIZE_BYTES) return -EINVAL; down_write(&mm->mmap_sem); _