Messages in this thread | | | From | Andy Lutomirski <> | Date | Mon, 5 Jan 2015 21:59:27 -0800 | Subject | Re: [PATCH 3.19 3/3] x86, mpx: Change the MPX enable/disable API to arch_prctl |
| |
On Mon, Jan 5, 2015 at 8:04 PM, Andi Kleen <andi@firstfloor.org> wrote: >> We should avoid arch_prctl because glibc won't add a syscall stub that >> libgcc or whatever would want? My mind boggles. > > Please turn brain on before posting.
Brain was on.
> > Of course they would add it. But only in the next version. Which means > everyone using older glibc would be out of luck. So all the users > would be stuck using syscall(). Anything you may gain in the kernel > would be totally made up by that. >
ISTM libmpx shouldn't link against glibc at all -- what if libmpx users want to use an alternate runtime (musl, Go, etc.)?
But I decided to check whether libmpx links against glibc, and I can't find sources for it at all. Do they exist? Is there any code with source available that invokes this prctl?
If not, I personally have very little sympathy for the argument that a binary buried in the depths of the Intel SDE would need to change if we switched to using arch_prctl. And I think that it should issue the syscall itself without using glibc, in which case the syscall wrapper issue is moot.
--Andy
> BTW I added arch_prctl, but in hindsight it wasn't good idea. > > -Andi
-- Andy Lutomirski AMA Capital Management, LLC
| |