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

From: Borislav Petkov
Date: Fri Mar 27 2015 - 11:23:53 EST


On Thu, Mar 26, 2015 at 11:33:45AM -0700, Dave Hansen wrote:
>
> From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>
> Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
> ---
>
> 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.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/