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 47DC4C4360C for ; Sun, 13 Oct 2019 20:20:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1463620663 for ; Sun, 13 Oct 2019 20:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570998055; bh=rz8lfW8M0nAm7u1LgOB2YxZBb0h1KOcI/wcFrZYldvk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=IDAuvvMJTRRsllkReV03SonUnKI/LB5dW/WkRUgD0RI+XpF9RTIEJ5yIwIvy9N9L5 1sRlmBCFymrwtdnH85GnFrvECXihTMUh8VNXrw+KvY1qdoWOzZbXQEUBOO4xd8hrK0 M/1Mvfeifn+ewrHYhGcY/4b/0Pa2Z+3cBYLN27do= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729383AbfJMUUy (ORCPT ); Sun, 13 Oct 2019 16:20:54 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:43536 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbfJMUUy (ORCPT ); Sun, 13 Oct 2019 16:20:54 -0400 Received: by mail-lj1-f194.google.com with SMTP id n14so14533180ljj.10 for ; Sun, 13 Oct 2019 13:20:52 -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=biyXIQ64lacc+GB4eBkt5jK89E3+WM3AyXiJgrgtYAuh6xk6lNPWa24YI78eC+2mnO FXl1OuPONWM9QnaBfwcdty2eW79WZe/PWTQx9yZIujPZ95HCixaO0TSTTknuzR65ctup hM09agnvyJXxP4LHs3DeXyzQdxKe2yTSePdmwI5TNZtviG0Rgbf8wL98nVamrxcIDE9E d/ibRATqu9MQ2L+Z71uMsET4yjhQRQF2EL4xUSlclCymLTlFSjS3v+IW63GmlS7ARlfy P6yOhaTo7B6Vv2/ObpMtTga2gPes93EICLSDgpRr1Z3lijBO9XRQRh2G0nReFz2MsMwl iooA== X-Gm-Message-State: APjAAAU/eUe4vQe2ahjSUcRSJDPnX6SrsZLBPFWf6Ez4tCxzfHXn26Fy lswSm1reZDd6/8YGjVA+DUhtnlaBChI= X-Google-Smtp-Source: APXvYqy1w+9NFkrGmrqiX3NCiW4WN1O/G+543motOMI9AwPUS/gU5ngFMR9QY6wo8PhpCIV+f4CfIQ== X-Received: by 2002:a2e:9759:: with SMTP id f25mr5740499ljj.173.1570998051872; Sun, 13 Oct 2019 13:20:51 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id c18sm4243756ljd.27.2019.10.13.13.20.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Oct 2019 13:20:50 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id c195so10328057lfg.9 for ; Sun, 13 Oct 2019 13:20:50 -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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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