From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933729AbdKBSkc (ORCPT ); Thu, 2 Nov 2017 14:40:32 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:55899 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbdKBSkb (ORCPT ); Thu, 2 Nov 2017 14:40:31 -0400 Date: Thu, 2 Nov 2017 19:40:27 +0100 (CET) From: Thomas Gleixner To: Linus Torvalds cc: Andy Lutomirski , Dave Hansen , Andy Lutomirski , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , moritz.lipp@iaik.tugraz.at, Daniel Gruss , michael.schwarz@iaik.tugraz.at, Kees Cook , Hugh Dickins , X86 ML Subject: Re: [PATCH 02/23] x86, kaiser: do not set _PAGE_USER for init_mm page tables In-Reply-To: Message-ID: References: <20171031223146.6B47C861@viggo.jf.intel.com> <20171031223150.AB41C68F@viggo.jf.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Nov 2017, Linus Torvalds wrote: > On Thu, Nov 2, 2017 at 11:19 AM, Andy Lutomirski wrote: > > > > We'd have to force NONE, and Linus won't like it. > > Oh, I think it's fine for the kaiser case. > > I am not convinced anybody will actually use it, but if you do use it, > I suspect "the legacy vsyscall page no longer works" is the least of > your worries. > > That said, I think you can keep emulation, and just make it > unreadable. That will keep legacy binaries still working, and will > break a much smaller subset. So we have four cases: > > - native > - read-only emulation > - unreadable emulation > - none > > and kaiser triggering that unreadable case sounds like the option > least likely to cause trouble. vsyscalls still work, anybody who tries > to trace them and look at the code will not. Hmm. Not sure. IIRC you need to be able to read it to figure out where the entry points are. They are at fixed offsets, but there is some voodoo out there which reads the 'elf' to get to them. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 029976B0033 for ; Thu, 2 Nov 2017 14:40:33 -0400 (EDT) Received: by mail-wm0-f70.google.com with SMTP id r196so120637wmf.3 for ; Thu, 02 Nov 2017 11:40:32 -0700 (PDT) Received: from Galois.linutronix.de (Galois.linutronix.de. [2a01:7a0:2:106d:700::1]) by mx.google.com with ESMTPS id y8si241310wmd.129.2017.11.02.11.40.31 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 02 Nov 2017 11:40:31 -0700 (PDT) Date: Thu, 2 Nov 2017 19:40:27 +0100 (CET) From: Thomas Gleixner Subject: Re: [PATCH 02/23] x86, kaiser: do not set _PAGE_USER for init_mm page tables In-Reply-To: Message-ID: References: <20171031223146.6B47C861@viggo.jf.intel.com> <20171031223150.AB41C68F@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Andy Lutomirski , Dave Hansen , Andy Lutomirski , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , moritz.lipp@iaik.tugraz.at, Daniel Gruss , michael.schwarz@iaik.tugraz.at, Kees Cook , Hugh Dickins , X86 ML On Thu, 2 Nov 2017, Linus Torvalds wrote: > On Thu, Nov 2, 2017 at 11:19 AM, Andy Lutomirski wrote: > > > > We'd have to force NONE, and Linus won't like it. > > Oh, I think it's fine for the kaiser case. > > I am not convinced anybody will actually use it, but if you do use it, > I suspect "the legacy vsyscall page no longer works" is the least of > your worries. > > That said, I think you can keep emulation, and just make it > unreadable. That will keep legacy binaries still working, and will > break a much smaller subset. So we have four cases: > > - native > - read-only emulation > - unreadable emulation > - none > > and kaiser triggering that unreadable case sounds like the option > least likely to cause trouble. vsyscalls still work, anybody who tries > to trace them and look at the code will not. Hmm. Not sure. IIRC you need to be able to read it to figure out where the entry points are. They are at fixed offsets, but there is some voodoo out there which reads the 'elf' to get to them. Thanks, tglx -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org