From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934539AbaE3UUt (ORCPT ); Fri, 30 May 2014 16:20:49 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47652 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbaE3UUr (ORCPT ); Fri, 30 May 2014 16:20:47 -0400 Message-ID: <5388E814.1080504@zytor.com> Date: Fri, 30 May 2014 13:20:36 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Andy Lutomirski CC: Marian Marinov , "linux-kernel@vger.kernel.org" , X86 ML , Linux API Subject: Re: Pondering per-process vsyscall disablement References: <537EB60E.40204@1h.com> <538658EE.8030809@zytor.com> <5388E499.6080101@zytor.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/30/2014 01:11 PM, Andy Lutomirski wrote: > On Fri, May 30, 2014 at 1:05 PM, H. Peter Anvin 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 :) > Yes, something like that. -hpa