Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1358416pxb; Sat, 17 Apr 2021 15:21:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF8kFT164eF1Na/hNpC9njlNlRRqmr9fpFvCybbl4pKiyspA5JYg+ynp+/4sXgmiZfvEfm X-Received: by 2002:a05:6a00:b43:b029:25e:cead:eae3 with SMTP id p3-20020a056a000b43b029025eceadeae3mr130216pfo.41.1618698112061; Sat, 17 Apr 2021 15:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618698112; cv=none; d=google.com; s=arc-20160816; b=YvtAeDujrvmApgm2gCcpa1gOIUQgoMCG7HEj1l/0CEmNMbtrpvzDxJMxe5BisWAgGZ KGsuGjHuPxnTKkjRcxPQSyr8+OMq7GL16IY2bD/E2Pvvtb1Y5vsOu0fTasbOrvXqRWFl WiMmtIywjsWZBNmDZ04CFchwLybMZei7J92YCG8MQtGTyMOHadgvyiqzDBItBdwqmEUJ fUC2Wg/HUdWoxKNOkkbb52Pkc6pypszmrjFrhIW5IsJDASlHHDBLMKQ1k643/08GDoIb mTTCM/0mwZBxPkOD+hTIBAY6fF8xbh1nqqNWQjyj7uXwINq7w/OxErtc9OV3P5dmg4ys OH0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+YOjTok1ja7/6itKWpyudalV8VLi+Uvt4/y+1cqETJo=; b=zRLUxNyU+98uWAsRrc6ksJk1M+OqO05/juPaYQQUGxda4T1jmTTqTERwwsfnwypv+3 GFIqb+b/8ysp+2tyH5iZ5HxhXbs0yRlSga/8ZvO+lEYJchi5xWy69jNVAaiw4aGNyWdH /EhG2UjXXQS8fgEOfp0OY/rP4xNdGVmObQqcK6MTKg7W/gwaFEh8PQ7kiBbDg+UUIpD2 Uz4+WNxrt3+MXAZuS4d5UUS8KRrR016krr1/Z9JiIYv9gxi8MBKVMvJkDWzjFIxArF4x XfgI0bfcXN7WE1Z2MS1VshI4mWHXZsLoxto0LdvI8992339bVGAFFUZpYINLIcBbc0Ow +68A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FQKwGiOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si12643404pgv.176.2021.04.17.15.21.08; Sat, 17 Apr 2021 15:21:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FQKwGiOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235589AbhDQWMh (ORCPT + 99 others); Sat, 17 Apr 2021 18:12:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231854AbhDQWMg (ORCPT ); Sat, 17 Apr 2021 18:12:36 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE0E2C06174A for ; Sat, 17 Apr 2021 15:12:07 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id o5so1975488ljc.1 for ; Sat, 17 Apr 2021 15:12:07 -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=+YOjTok1ja7/6itKWpyudalV8VLi+Uvt4/y+1cqETJo=; b=FQKwGiOW9jgCKW4PHPBlhmZgxF3YF8NmFeufKyHyndb7jrFHeDS3JL9KNJPkJFoNvE +9FKlJ/CaG594RSCuXcvE3Ci6VcuYJnXmwKXGRbTYaUXLp+qKvyp6Wa+WAqO+9sjDIms TV1RXrT+urloum+8BSf8sCC3MUupKvJUm7CPc= 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=+YOjTok1ja7/6itKWpyudalV8VLi+Uvt4/y+1cqETJo=; b=NjFbokfvrrFbASkJcLIwpGfAJueGu3v61FCbJVebCtDowatZsA1eAJXtDwPG9G7NVR h9Bxl22LrQ74j3jLOrA8C2IJmemh38/blSXCjjAANwFfKNG4c8QwzbKtcB0R0/Sd5Iny 8sAbdSjQEQQ88MIo59oiyJSfvmwZB/w11WIu499oSARRMTaoMxIjpOnOZyAa/BgoeRlK yisgXzAUI8kYovXVwr6uC4DnoqW1SdJqWQUZe6NTT2QGVDE/HbBS3omlu00jxrB9NMOS ODX2BOgcVe23yXq9UUHUK2OK1jMDxeq7YAUXSSStzne14cKJDydjxHbwYGmGOtCuLidX peXw== X-Gm-Message-State: AOAM531qXB0OJaI+btsJvRLraNFP0TmfFYoiHXlB9wlMUnh5nkfIheqT yDE0BAWjyr492GzIXZJw+okqZrZeKVUs81DF X-Received: by 2002:a2e:9953:: with SMTP id r19mr6532417ljj.132.1618697526032; Sat, 17 Apr 2021 15:12:06 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id i8sm1383772lfc.115.2021.04.17.15.12.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 17 Apr 2021 15:12:05 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id 12so50022633lfq.13 for ; Sat, 17 Apr 2021 15:12:05 -0700 (PDT) X-Received: by 2002:ac2:58fc:: with SMTP id v28mr6968301lfo.201.1618697525005; Sat, 17 Apr 2021 15:12:05 -0700 (PDT) MIME-Version: 1.0 References: <20210416192413.1514419-1-eric.dumazet@gmail.com> In-Reply-To: From: Linus Torvalds Date: Sat, 17 Apr 2021 15:11:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/uaccess: small optimization in unsafe_copy_to_user() To: Al Viro Cc: Eric Dumazet , Thomas Gleixner , linux-kernel , Eric Dumazet , "Theodore Ts'o" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 17, 2021 at 1:35 PM Al Viro wrote: > > No, wait - we have non-NULL buf->prev_reclen, so we'll hit > with buf->error completely ignored. Nevermind. Yeah, I'm pretty sure I even tested that -EINTR case at one point. Of course, it could easily have gotten broken again, so that's not a strong argument. That said, the "buf->err" handling has always been very confusing, and it would be lovely to get rid of that confusion. I don't remember why we did it that way, but I think it's because low-level filesystems ended up changing the error that the filldir() function returned or something like that. Linus