Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4626385ybp; Mon, 7 Oct 2019 11:14:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6D0vDnMwn7sbF8x1gZ0rM5hNvGGEoV//xDvZZ9NMHVkpu1jZacwxED5RjJ874rOYwx9gr X-Received: by 2002:aa7:c2ce:: with SMTP id m14mr30544255edp.191.1570472065313; Mon, 07 Oct 2019 11:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570472065; cv=none; d=google.com; s=arc-20160816; b=i8AmItwEqaT0n9xURe7F9l6mslMjhSvSft6ZI5IqD+mNSbZ2SawnXxY/m5nZyIjwzd k21XVwDXJI/kXFPnmzOUv6vAWEfr1rI8IZvyonVHayAo+YOR8qVw8muxPbNNxtJ0d0J/ 1IYyETK1Dteyqna/MhpOvlhTkQQWVzMNbMZBF3V9xZVg+6BXo4mg4w4fp6guKGhOJBXB SVXS2vb4QQpPsYMcLSTozdKfycHFsFtVDXVTnEbzOwesky2XQ+I6ZfM4LtGA53TyVOrn kZSte5hvIfTMLQkibnLlUQlM3i+JTddl1hpz4ALZgLu0uG1fHx069Be1NaWnq3KbOxl7 dy1A== 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=yMlh6GXN6QbpwC889qdv/mL2tKRwyhPfZJiqASBvKqo=; b=SkQThGR8b6WgBoz2B8LDjMlf6WoqqtYr/D9DC3/KXfJC21rFBi++8VXCjy8YVJYV+s HrtyCp7bVx350d8d/6CPrP4/qtzijI5o/bJCljB9wj5XAVwafOwLLkkpToapPuNXXlDM kZvisvQCXk02LkcK23t+we7qUjXxSnY7VFGZdNq3sQnAAgZVrC4K63F8NmNueGLCPUOG tohLY9YGVgMIlaKadXZ0ORZ1laXtLzBsORLuRk6GQHUGj4avLo2V9/eeRl3EPnL9Qi71 cyl4fjeI1Lvn5/VSltT1YNLtLaGRsdIqQblmR7B3HWYo1f29vsFbJ3xAbSi+/pZP41AX 2KCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=h8vVKPc8; 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 x20si7414499ejb.393.2019.10.07.11.14.02; Mon, 07 Oct 2019 11:14:25 -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=h8vVKPc8; 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 S1729327AbfJGSNs (ORCPT + 99 others); Mon, 7 Oct 2019 14:13:48 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35893 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728723AbfJGSNr (ORCPT ); Mon, 7 Oct 2019 14:13:47 -0400 Received: by mail-lf1-f68.google.com with SMTP id x80so9971898lff.3 for ; Mon, 07 Oct 2019 11:13:45 -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=yMlh6GXN6QbpwC889qdv/mL2tKRwyhPfZJiqASBvKqo=; b=h8vVKPc80ltfyFjjkk1eX3SsLDZsWpHSGP70shQML8lM+pQi5PD43ZLbNhTvHnnieH 3Pdsvi7u5yvEvu0mkBG36/MC6h2vZ5j/Ramv3pLra1nTcYqBd177SsSNYgfSw50OivjV toQ4l5QhAqNdBrZzz/KNR6RQik0WFppq5OXBQ= 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=yMlh6GXN6QbpwC889qdv/mL2tKRwyhPfZJiqASBvKqo=; b=j/T4yeiiFoc0IsMKOrJeO+62ZCibzJUWhAmFyXX1nLt4o+B5AVrROejh4+itNAHTv0 5lrNsL1MhY6Yo3lcff9ylZ1vpxpRdU8ynUiO3ThKn5nxQGGlsEY3FeXpaI80ic/hyQb0 XoWqgYCi7gmh1IhIQdrZnRHkAB8V/Lez3lIyfRX2HS3dYw6XbpmSMeQLlXh8hGsEloVR +BHyUe0UHeS3IKS8lmoSp40hRlM/mL9og4JhRfuQlCkpDTHUGgU9pTYx9hSvyMubauAE hnIebtW8jRBsES+oAj/vV6sTwJtz75s3KtsNIro+CKXmAboOycxKK+BHDpS5rpooCPiR gJUw== X-Gm-Message-State: APjAAAV8c3zpwZWgNW30eCQMhhJefJZhThAymF7GdAtmJ4oJ/+xYNsHo VFNJpRrj3159CrPUvxdh9m9SCn8O378= X-Received: by 2002:a19:ae0b:: with SMTP id f11mr18175406lfc.28.1570472024330; Mon, 07 Oct 2019 11:13:44 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id 202sm3307827ljf.75.2019.10.07.11.13.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Oct 2019 11:13:43 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id u3so9931694lfl.10 for ; Mon, 07 Oct 2019 11:13:43 -0700 (PDT) X-Received: by 2002:a19:f204:: with SMTP id q4mr17404487lfh.29.1570472023078; Mon, 07 Oct 2019 11:13:43 -0700 (PDT) MIME-Version: 1.0 References: <20191006222046.GA18027@roeck-us.net> <5f06c138-d59a-d811-c886-9e73ce51924c@roeck-us.net> <20191007012437.GK26530@ZenIV.linux.org.uk> <20191007025046.GL26530@ZenIV.linux.org.uk> <20191007173432.GM26530@ZenIV.linux.org.uk> In-Reply-To: <20191007173432.GM26530@ZenIV.linux.org.uk> From: Linus Torvalds Date: Mon, 7 Oct 2019 11:13:27 -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 Mon, Oct 7, 2019 at 10:34 AM Al Viro wrote: > > Tangentially related: copy_regster_to_user() and copy_regset_from_user(). Not a worry. It's not performance-critical code, and if it ever is, it needs to be rewritten anyway. > The former variant tends to lead to few calls > of __copy_{to,from}_user(); the latter... On x86 it ends up doing > this: Just replace the __put_user() with a put_user() and be done with it. That code isn't acceptable, and if somebody ever complains about performance it's not the lack of __put_user that is the problem. Linus