Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5164165ybp; Mon, 7 Oct 2019 21:25:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQ6cgb+Qv+15aDUXdJ3ToXJkEwTm3RH7pRUb/DfOQTxseXqW0/hG963a1KdoJMForweB+Q X-Received: by 2002:a17:906:6084:: with SMTP id t4mr26979311ejj.164.1570508706139; Mon, 07 Oct 2019 21:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570508706; cv=none; d=google.com; s=arc-20160816; b=I0Y6x5SzZqz/jQmxhyEOxgdrhotJGrvicK/o9ccnHTsoRycOn8M8pA0rKygryWNoI+ CjkzAcDd4nmiEPSnh5LHnKbEI2lpzHQUZZHb3tPKupzzhP0/sIxfXLe7ZV5JFVy6Dohq 0A1i+26Eta50WibWNZ93OJX5CzDCyceBKKUYc5MtKRDATqnf2Hb2Y03iX61uCGeH/Tuk Ef/Hqotc9QivtUnaXov2WTzb+Gfxyn1mnZUxRg1JZ9BVBiMH6tTm1xaTwbucmkg4QWuj qeBnhQcxgKMyfBcaTgnU3C6mlIJEJdyipFCJZVx7NuqoEkL7wKLYl4x+It03YECjmWCx U1ag== 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=4ibOtN5zf55brhdHuZKhclLlUWgiBgKFnugDa2ZrV1A=; b=c8B5wzLCXuFfOi2yizGy15Mql67R8veT1OYIz74wZ7FcfVkyF556/2c1UPfSbRquzY baDHb/EVyfy/AQk1gyBPBN94NFUlB613LR81ckJUapYbAaT0q5VfieQi4kkT0ygVaqdg daawdiDCEkKfYbu/SRFXwT76YdcRsO4nzcsWzHVSenX3Y55WOMqpW8iSg1cEDnk56BpM j8JfMkFAoY3V79fCmjIQcAQf9cxjdB1RYIUVpKpezXQaqHNM9NBpC84UOMbUhGpAYLqI SrchU2+DxSI4ewdq5eHvg8ZiKx71sddpd1UQYnOftg4KVgK4jFyRApjQxov7oZF/e1u9 hHeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=QpdIgpsp; 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 a41si10394885edc.180.2019.10.07.21.24.41; Mon, 07 Oct 2019 21:25:06 -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=QpdIgpsp; 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 S1729949AbfJHEYh (ORCPT + 99 others); Tue, 8 Oct 2019 00:24:37 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45393 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbfJHEYh (ORCPT ); Tue, 8 Oct 2019 00:24:37 -0400 Received: by mail-lj1-f196.google.com with SMTP id q64so15959398ljb.12 for ; Mon, 07 Oct 2019 21:24:35 -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=4ibOtN5zf55brhdHuZKhclLlUWgiBgKFnugDa2ZrV1A=; b=QpdIgpspj1uKTJeRIV+rb5IqCsrK/WhrG85qjV26pC9dTDaiih4t0xTBb3STpoRZM8 jaYC3nDYkrX3Eu4RlO7a92ZHnXWQFD/u6MxVsxrYZlj/42wy+oxwnUITZ1324bcp/G3h zA4GaBxcUmaUrESAvwEiD2TuZ7xkaIY1kKoO4= 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=4ibOtN5zf55brhdHuZKhclLlUWgiBgKFnugDa2ZrV1A=; b=WL/xqdNn+/TJ36gv0c7fcE8NsGODLXfpkp3zkG3Lh1p+ySoxYrUJF1aKMpuIOcxiTk ycRpxGz9m6F39F2vvQGuFjfpQp6f9eHuTWc69BCwHYAb+slhH4Qyjup7FUgpWocfQQKC +2EoEqH13RwHN3Fkg/AxwxDZhFzf0MtdNeEUXFtMozjNZViETESfRCggaEPbvwAmHzLW pdzC7r+82mXEe+B8ZDRrGSJ8F581UiuAmWS9AiZwkF9o4FyPBQzG8+/UKsbGK+Cf9NON KS6bE09I+06LX55jyPg9gaFMDkbe/jwdkY/aCAgriUePT70Pw1BA+AUaGdz3aRZeX0Vc 37Vw== X-Gm-Message-State: APjAAAV/thYSy0E79hv52xi2n9Da9wbeokvGyzuwr+nwblycVi5h2x+A Q0cMlvhGhlaWJgjK1AREjNIxG+XtPbk= X-Received: by 2002:a2e:96d5:: with SMTP id d21mr19771242ljj.187.1570508674610; Mon, 07 Oct 2019 21:24:34 -0700 (PDT) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id x15sm4170056lff.54.2019.10.07.21.24.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Oct 2019 21:24:33 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id d1so15944798ljl.13 for ; Mon, 07 Oct 2019 21:24:33 -0700 (PDT) X-Received: by 2002:a2e:551:: with SMTP id 78mr21151541ljf.48.1570508673174; Mon, 07 Oct 2019 21:24:33 -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> <20191008032912.GQ26530@ZenIV.linux.org.uk> In-Reply-To: From: Linus Torvalds Date: Mon, 7 Oct 2019 21:24:17 -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 9:09 PM Linus Torvalds wrote: > > Try the attached patch, and then count the number of "rorx" > instructions in the kernel. Hint: not many. On my personal config, > this triggers 15 times in the whole kernel build (not counting > modules). .. and four of them are in perf_callchain_user(), and are due to those "__copy_from_user_nmi()" with either 4-byte or 8-byte copies. It might as well just use __get_user() instead. The point being that the silly code in the header files is just pointless. We shouldn't do it. Linus