Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754047AbdLNWai (ORCPT ); Thu, 14 Dec 2017 17:30:38 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34409 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753972AbdLNWah (ORCPT ); Thu, 14 Dec 2017 17:30:37 -0500 X-Google-Smtp-Source: ACJfBoteW750BruXe3K20+kQqIqtWqmpn06nR410PScdrD2jN9RCPqldrAC9Hnbgh8KdzBa/69p5vg== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2 11/17] selftests/x86/ldt_gdt: Prepare for access bit forced From: Andy Lutomirski X-Mailer: iPhone Mail (15C114) In-Reply-To: Date: Thu, 14 Dec 2017 14:30:34 -0800 Cc: Andy Lutomirski , Peter Zijlstra , "linux-kernel@vger.kernel.org" , Thomas Gleixner , X86 ML , Dave Hansen , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , "Liguori, Anthony" , Will Deacon , "linux-mm@kvack.org" , "Kirill A. Shutemov" , Dan Williams Message-Id: <03293FB5-DC9B-47BB-8C3A-7827CD82FECB@amacapital.net> References: <20171214112726.742649793@infradead.org> <20171214113851.647809433@infradead.org> To: Linus Torvalds Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vBEMUieC000844 Content-Length: 741 Lines: 16 > On Dec 14, 2017, at 2:15 PM, Linus Torvalds wrote: > >> On Thu, Dec 14, 2017 at 2:11 PM, Andy Lutomirski wrote: >> >> That seems to rather defeat the point of using a VMA, though. > > There never was any point in using a VMA per se. > > The point was always to just map the damn thing in the user page > tables, wasn't it? > > The vma bit was just an implementation detail. And all this is why I dislike using a VMA. My patch puts it at a negative address. We could just as easily put it just above TASK_SIZE_MAX, but I'm a bit nervous about bugs that overrun an access_ok check by a small amount. IIRC I found one of those in the net code once, and I didn't look very hard.