[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877fxzexuz.fsf@x220.int.ebiederm.org>
Date: Wed, 10 Dec 2014 20:14:44 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [GIT pull] x86 mpx support for 3.19
Thomas Gleixner <tglx@...utronix.de> writes:
> Linus,
>
> please pull the latest x86-mpx-for-linus git tree from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-mpx-for-linus
>
> This enables support for x86 MPX:
>
> MPX is a new debug feature for bound checking in user space. It
> requires kernel support to handle the bound tables and decode the
> bound violating instruction in the trap handler.
I some really dumb questions.
Given that mpx is both architecture and cpu specific why use prctl?
I would think arch_prctl would be a much more appropriate place to
expose this logic.
Why don't you have a call to let an application query to see if mpx
management is enabled? I am trying to imagine how checkpoint/restart is
going to be supported for mpx applications. If I can't even query if
mpx is enabled I don't have a clue how we could save this state and
duplicate it in another process on another machine.
> +Adding new prctl commands
> +-------------------------
> +
> +Two new prctl commands are added to enable and disable MPX bounds tables
> +management in kernel.
> +
> +155 #define PR_MPX_ENABLE_MANAGEMENT 43
> +156 #define PR_MPX_DISABLE_MANAGEMENT 44
> +
> +Runtime library in userspace is responsible for allocation of bounds
> +directory. So kernel have to use XSAVE instruction to get the base
> +of bounds directory from BNDCFG register.
> +
> +But XSAVE is expected to be very expensive. In order to do performance
> +optimization, we have to get the base of bounds directory and save it
> +into struct mm_struct to be used in future during PR_MPX_ENABLE_MANAGEMENT
> +command execution.
> +
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists