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=DKIMWL_WL_HIGH,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 61D46C43331 for ; Thu, 2 Apr 2020 20:27:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 043A920678 for ; Thu, 2 Apr 2020 20:27:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Smm1q5CY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 043A920678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 57D918E0008; Thu, 2 Apr 2020 16:27:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 52CF58E0007; Thu, 2 Apr 2020 16:27:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F48B8E0008; Thu, 2 Apr 2020 16:27:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0219.hostedemail.com [216.40.44.219]) by kanga.kvack.org (Postfix) with ESMTP id 23F1D8E0007 for ; Thu, 2 Apr 2020 16:27:50 -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 D2BF48248D7C for ; Thu, 2 Apr 2020 20:27:49 +0000 (UTC) X-FDA: 76664051058.24.hot52_27377dae96759 X-HE-Tag: hot52_27377dae96759 X-Filterd-Recvd-Size: 4765 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 20:27:49 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id k5so2388225pga.2 for ; Thu, 02 Apr 2020 13:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Tm9Yr3bqmuNGExiY7vVKsPwnaHo60Po4ISz6K0cbNJM=; b=Smm1q5CY/oX1a5RB+6/rg0OMMpkQQEyasTzFJrBTMrH/9ggcr/BfvbpYsLykFyjKyj 2PwhzKCTjNwbauICju6+DoHPLTmOfE26sbu8gKPAF0JNysrFbBXJP1k99H1Y81ZGotjF HBEOphcciEgjXYH2LvUC0i9QCTEJqTA6uBORk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Tm9Yr3bqmuNGExiY7vVKsPwnaHo60Po4ISz6K0cbNJM=; b=Yvw34WIRwGWM3QdFJRSCgMWOtpyHuXq5+bPg4pPc453HjaLbj8P7SPuytWVZz14wgg kKCSPdF2R767yMZUF3evzEhDr64fYP/1CnGEwwJkCyCWNAzLa/q+IR+/3wqjGsQ1d4Vf jQSWRMCGaPNIoMMDdrFVwoJu6kHHZA28GlpHJDhsNQPQ+LFxG5JpsuKbvm6JroLiGTqN 3T2bCx319+Xcqg1/SBvZ4AOu8WWK22xFkmnN4yBhfbLm9KPaJ+6h3HHvdTOw5nrBPr0T w1/yTSVvmpwlkp17yGlS6IgFbIWAfAUdidlkJEelXLbk8G0SYxEGZifcbW0qwTJ1hJVO ZX5w== X-Gm-Message-State: AGi0PuY4lWbLRy4/HcMw9Nd2gSfWtlB9JToBSmgeW8Mfunnz7Bxlf2Va 5hXf7Ju+jpOCQy8WOLxZkflXYuSzGig= X-Google-Smtp-Source: APiQypJru05phqDJ49g1EwlFJFXm3/ghT/fLOJrssR3ZOL3AQdXi15r8fpVrMULS6+mqXqrkrXK0nA== X-Received: by 2002:a63:b80a:: with SMTP id p10mr4870517pge.306.1585859268304; Thu, 02 Apr 2020 13:27:48 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i187sm4325945pfg.33.2020.04.02.13.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 13:27:47 -0700 (PDT) Date: Thu, 2 Apr 2020 13:27:46 -0700 From: Kees Cook To: Linus Torvalds 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 Subject: Re: [PATCH RESEND 1/4] uaccess: Add user_read_access_begin/end and user_write_access_begin/end Message-ID: <202004021322.5F80467@keescook> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 02, 2020 at 12:26:52PM -0700, Linus Torvalds wrote: > On Thu, Apr 2, 2020 at 11:36 AM Kees Cook wrote: > > > > Yup, I think it's a weakness of the ARM implementation and I'd like to > > not extend it further. AFAIK we should never nest, but I would not be > > surprised at all if we did. > > Wel, at least the user_access_begin/end() sections can't nest. objtool > verifies and warns about that on x86. Right, yes, I mentioned that earlier in the thread. I meant I wasn't 100% sure about ARM's corner cases. I would _hope_ it doesn't. > > If we were looking at a design goal for all architectures, I'd like > > to be doing what the public PaX patchset > > We already do better than PaX ever did. Seriously. Mainline has long > since passed their hacky garbage. I was just speaking to design principles in this area: if the "enable" is called when already enabled, Something Is Wrong. :) (And one thing still missing in this general subject is that x86 still lacks SMAP emulation. And yes, I understand it's just not been a priority for anyone that can work on it, but it is still a gap.) -- Kees Cook