Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3755561ybp; Sun, 13 Oct 2019 13:27:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzg+ZqefTw11ONa9OGSdSLGvHgIIUbdI3J/Qs5T6+ruPYKui2TPliSZY0vPgjn7HhwDvkeh X-Received: by 2002:a17:906:68f:: with SMTP id u15mr25189670ejb.306.1570998454112; Sun, 13 Oct 2019 13:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570998454; cv=none; d=google.com; s=arc-20160816; b=hHSB5KEfZ9SKFvhJkZUkZRalpOvsxOiajUmccYYP/vbThY1IM9De4KqEZf81MBkn4p V7zv3JZsrA4KMWmKPx31MxQnU9bJrVeU1XH4tC+YH5g2kGxh+FctpVg4Uu/zYuefc+yu eCIS2Gn8VA9FC1hdCzppVgydzvbvPW0b3s2GTwyt8TmS90NCArV8GEqrMElxzQs90LgX sfO//eRiorKAuaa8KE8yMaHD6+kJJsS70qMyg9HTeJRUJsJCA1dp8P7FDkae4bF11s5q RtJuY3kXuCrv+S5KLYdCAslCBuZGmFRzhLhAZfmGjiAvN6IHohOESzPpL3J+ptxyETx1 9/sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=eJmSPxWD5/TkHbFJUcVPXh6iFR/S6K/PI1RETNfV6+Q=; b=0JWIuGIlbTeYPnw3ac1T11gpkGAboBE8QS8TxP7z3lUpSxwGeZ8Ll87QssFq6TyVg+ ym3HEmv1EwkK8V8JbUOM72Ki7qiUWSS8YmBAWnbQcoMxh3ZOLJ6VhZk1xL0LxZcc9x0K 4OygPT9cy8K72p6H41zruZ2Vibg1jhg8tsPZrcybP/YYuROgTDa9reu1mT/KCnmwd8qV ZCvSDkbaoCEQBJ82J9dt8QD7U2y6jKNqtiQj8HVeJ4LOHhAfb/v7NdOXrQRDfSBj7jqx +cB00v82z0p6SQsarWG1D9kYMpmVA4qUV/xNAkFxiLFEHMPV92GitBiHJHmaJxuob5lr Heag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=F06ZA8X2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a24si9675288ejg.127.2019.10.13.13.27.10; Sun, 13 Oct 2019 13:27:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=F06ZA8X2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729423AbfJMUU6 (ORCPT + 99 others); Sun, 13 Oct 2019 16:20:58 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39954 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbfJMUU5 (ORCPT ); Sun, 13 Oct 2019 16:20:57 -0400 Received: by mail-lj1-f193.google.com with SMTP id 7so14561479ljw.7 for ; Sun, 13 Oct 2019 13:20:56 -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=eJmSPxWD5/TkHbFJUcVPXh6iFR/S6K/PI1RETNfV6+Q=; b=F06ZA8X2/ZCMYGLX0R+bf2JXirE2mkKo7IKs4CYOx5tLbue+pdhZGlAlH+MMsJTsSI JJhOLZ3SHIGQ5/J8Vp7sV6c23/uIAr/0wnjI+wmnPX+pGWhBIOqPiagnxJJBrXOmjf7F atW5/J+N+Y2hPd11tAYDnE+8xGz6Q+ljHks94= 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=eJmSPxWD5/TkHbFJUcVPXh6iFR/S6K/PI1RETNfV6+Q=; b=DxCHxqWnqZPTpAOM6mkmli1RP4dW1oebJiGyjJPZZwH8E840OqU7n7rxeWIUM1lefB KHlpY+OdsGtWS4w+vmZzTGnhuy8T9E1t9UWODU4Za9lp0NYdUmPdPLS3z/rkmydHmO5H 1GwNKNz1znG2nvOThCPgQXlewN3MQqxKwltHa6j0PyTz3Ze7Zf1ND18w5b8bRsb4HjwR eoV1bEkbeXwSwW4jTpBoKL7zTIoEn+WTwvSPCkkKoZI8ZmnfbSTCz05Mnm03S1RC6WX+ 24Gf7913KbMqq7KPi26rIZPTTQlppyO0J05gFeVUAlyuq/RZaRNaaQeUu0QbFGbiGq+8 69xg== X-Gm-Message-State: APjAAAVsfcfEFyDS8DiUCX1D+EdXlwMdWKGLv/oJo5eFXVIhv9CVlOjO XqvDf4uTcQunDiLMGkFz3WAYZHD0A0w= X-Received: by 2002:a2e:9b8a:: with SMTP id z10mr16272664lji.66.1570998055408; Sun, 13 Oct 2019 13:20:55 -0700 (PDT) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com. [2a00:1450:4864:20::135]) by smtp.gmail.com with ESMTPSA id j7sm3677932lfc.16.2019.10.13.13.20.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Oct 2019 13:20:55 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id r2so10322911lfn.8 for ; Sun, 13 Oct 2019 13:20:55 -0700 (PDT) X-Received: by 2002:a05:6512:219:: with SMTP id a25mr15490954lfo.61.1570998050112; Sun, 13 Oct 2019 13:20:50 -0700 (PDT) MIME-Version: 1.0 References: <20191010195504.GI26530@ZenIV.linux.org.uk> <20191011001104.GJ26530@ZenIV.linux.org.uk> <20191013181333.GK26530@ZenIV.linux.org.uk> <20191013191050.GL26530@ZenIV.linux.org.uk> <20191013195949.GM26530@ZenIV.linux.org.uk> In-Reply-To: <20191013195949.GM26530@ZenIV.linux.org.uk> From: Linus Torvalds Date: Sun, 13 Oct 2019 13:20:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Convert filldir[64]() from __put_user() to unsafe_put_user() To: Al Viro Cc: Guenter Roeck , Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 13, 2019 at 12:59 PM Al Viro wrote: > > Re plotting: how strongly would you object against passing the range to > user_access_end()? Powerpc folks have a very close analogue of stac/clac, > currently buried inside their __get_user()/__put_user()/etc. - the same > places where x86 does, including futex.h and friends. > > And there it's even costlier than on x86. It would obviously be nice > to lift it at least out of unsafe_get_user()/unsafe_put_user() and > move into user_access_begin()/user_access_end(); unfortunately, in > one subarchitecture they really want it the range on the user_access_end() > side as well. Hmm. I'm ok with that. Do they want the actual range, or would it prefer some kind of opaque cookie that user_access_begin() returns (where 0 would mean "failure" of course)? I'm thinking like a local_irq_save/restore thing, which might be the case on yet other architectures. Linus