From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964866AbbC0PXv (ORCPT ); Fri, 27 Mar 2015 11:23:51 -0400 Received: from mail.skyhub.de ([78.46.96.112]:57477 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752625AbbC0PXp (ORCPT ); Fri, 27 Mar 2015 11:23:45 -0400 Date: Fri, 27 Mar 2015 16:21:55 +0100 From: Borislav Petkov To: Dave Hansen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, dave.hansen@linux.intel.com, oleg@redhat.com Subject: Re: [PATCH 09/17] x86: make is_64bit_mm() widely available Message-ID: <20150327152155.GC5517@pd.tnic> References: <20150326183327.64807530@viggo.jf.intel.com> <20150326183345.6727B83D@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150326183345.6727B83D@viggo.jf.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2015 at 11:33:45AM -0700, Dave Hansen wrote: > > From: Dave Hansen > > The uprobes code has a nice helper, is_64bit_mm(), that consults both > the runtime and compile-time flags for 32-bit support. Instead of > reinventing the wheel, pull it in to an x86 header so we can use it > for MPX. > > I prefer passing the mm around to test_thread_flag(TIF_IA32) beacuse Just a nitpick: s/beacuse/because/ > it makes it explicit where the context is coming from. It will also > make it easier if we ever need to access the MPX structures from > another process. > > Signed-off-by: Dave Hansen > Cc: Oleg Nesterov > --- > > b/arch/x86/include/asm/mmu_context.h | 13 +++++++++++++ > b/arch/x86/kernel/uprobes.c | 10 +--------- > 2 files changed, 14 insertions(+), 9 deletions(-) -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --