Re: Pondering per-process vsyscall disablement

Andy Lutomirski
2014-05-30T20:11:28Z

On Fri, May 30, 2014 at 1:05 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> On 05/30/2014 01:00 PM, Andy Lutomirski wrote:
>>
>> Do the flags go in the ELF loader or in the executable we're running?
>> Or both (and, if both, do we and them or or them)?
>>
>> I think the interpreter makes a little more sense in general: for the
>> most part, use of vsyscalls is a property of the runtime environment,
>> not of the program being run. But maybe this is naive.
>>
>
> They go into each object which becomes part of the running program, i.e.
> executable, dynamic libraries, and dynamic linker.

Well, sure, but the kernel is not about to start reading ELF headers
in dynamic libraries. So we need to make a decision based on the
interpreter and the executable. The conservative approach is to
require both to have the flag set *and* to offer a prctl to twiddle
the flags. Then userspace loaders can do whatever they want, and
distros get to rebuild the world :)

--Andy