From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F01A6C43331 for ; Thu, 2 Apr 2020 20:54:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A0CE020719 for ; Thu, 2 Apr 2020 20:54:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="dq1Xt42z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0CE020719 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2D18C8E0008; Thu, 2 Apr 2020 16:54:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2816D8E0007; Thu, 2 Apr 2020 16:54:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 149428E0008; Thu, 2 Apr 2020 16:54:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id F11588E0007 for ; Thu, 2 Apr 2020 16:54:24 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B2CF68248068 for ; Thu, 2 Apr 2020 20:54:24 +0000 (UTC) X-FDA: 76664118048.24.actor26_7dc8f445a282a X-HE-Tag: actor26_7dc8f445a282a X-Filterd-Recvd-Size: 4814 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 20:54:24 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id de14so6272470edb.4 for ; Thu, 02 Apr 2020 13:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YR/nUD2Z88aJr6Pg6Jbj/uRmXq5/iJdtBPPDjhYxa08=; b=dq1Xt42zOdAJ9Qswqhw3DC5ZWJPx708kVOLPio6Z4i5kSkx4SK5PaEo/6koIh9QTi0 yfOTVpLmbl4n8jtyb/2WcDEO7fuXO+AAVPX7mMUJ0v/+lRQnPhNsNuau5SsaccYONsWw LhoxKSxXEV20XpXwx2ctLh7uQXRBDSE3iznhk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YR/nUD2Z88aJr6Pg6Jbj/uRmXq5/iJdtBPPDjhYxa08=; b=Puiec2A64i9jvyCuWo8SYzAjI8UDts21+ez2I7He3ML8l8RHSCthimraBcPc1r15MT SAgxuA0lXP5oQpY9PcWt8omaptOrWr4j67IgAs7z1aFZ3/UO0nzvcn4m1UW3UAZYI6Qv RKVbhSXeQTZJNosflqA+V39CETgrYg0BhJUOVjN0FwBcZ5SsFCv4mlEC7VVn35tBX6Nr ywAm0F6H0NML2truJzfP6HiUV4xiRm0FhppAM9mTS5ZexpUCyAiljyEO4WhXsgS8qdHf QEW/8Bm1wVK5hJJa7tw0nS/VY2XQr95vlkHMzsji0/4wrswTwg7lJKr4ky7IHVO8d6/Y EKxg== X-Gm-Message-State: AGi0Pua45mA4ytpOdFlOxFaiM/qJHz6bQE/qJAy4nzGU03n6dN+QYzB3 B/GUx5GlDmzyJl5kIt5ASNOq9EMTwUs= X-Google-Smtp-Source: APiQypItwiTtEg3Ovam8mcUPrNdjq5LgjzlGVyE22uCryGb9Yfnw6jqLGkp7FD2v39cGNpFv1vTDuA== X-Received: by 2002:a17:906:8243:: with SMTP id f3mr5041638ejx.166.1585860862505; Thu, 02 Apr 2020 13:54:22 -0700 (PDT) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com. [209.85.208.42]) by smtp.gmail.com with ESMTPSA id v15sm464179eds.95.2020.04.02.13.54.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Apr 2020 13:54:22 -0700 (PDT) Received: by mail-ed1-f42.google.com with SMTP id z65so6308679ede.0 for ; Thu, 02 Apr 2020 13:54:22 -0700 (PDT) X-Received: by 2002:ac2:5e70:: with SMTP id a16mr3290368lfr.152.1585860460299; Thu, 02 Apr 2020 13:47:40 -0700 (PDT) MIME-Version: 1.0 References: <27106d62fdbd4ffb47796236050e418131cb837f.1585811416.git.christophe.leroy@c-s.fr> <20200402162942.GG23230@ZenIV.linux.org.uk> <67e21b65-0e2d-7ca5-7518-cec1b7abc46c@c-s.fr> <20200402175032.GH23230@ZenIV.linux.org.uk> <202004021132.813F8E88@keescook> <202004021322.5F80467@keescook> In-Reply-To: <202004021322.5F80467@keescook> From: Linus Torvalds Date: Thu, 2 Apr 2020 13:47:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RESEND 1/4] uaccess: Add user_read_access_begin/end and user_write_access_begin/end To: Kees Cook Cc: Al Viro , Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Dave Airlie , Daniel Vetter , Andrew Morton , Peter Anvin , Linux Kernel Mailing List , linuxppc-dev , Linux-MM , linux-arch , Russell King , Christian Borntraeger Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 2, 2020 at 1:27 PM Kees Cook wrote: > > I was just speaking to design principles in this area: if the "enable" > is called when already enabled, Something Is Wrong. :) Well, the "something is wrong" could easily be "the hardware does not support this". I'm not at all interested in the crazy code to do this in software. Nobody sane should ever do that. Yes, I realize that PaX did software emulation of things like that, and it was one of the reasons why it was never useful to any normal use. Security is not an end goal in itself, it's always secondary to "can I use this". Security that means "normal people can't use this, it's only for the special l33t users" is not security, it's garbage. That "do page tables in software" was a prime example of garbage. Linus