Re: [PATCH 09/17] x86: make is_64bit_mm() widely available

Borislav Petkov
2015-03-27T15:23:51Z

On Thu, Mar 26, 2015 at 11:33:45AM -0700, Dave Hansen wrote:
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> 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 <dave.hansen@linux.intel.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> ---
>
> 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.
--