Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1188304pxb; Sat, 17 Apr 2021 09:12:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFKuUOMk1dHz3ld8jQxvCsuPGmrqPR47PZFxwGukSRCRPg3gNTIv5V1lNMY6zCrTDADPMc X-Received: by 2002:a05:6402:368:: with SMTP id s8mr10714496edw.183.1618675973274; Sat, 17 Apr 2021 09:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618675973; cv=none; d=google.com; s=arc-20160816; b=hF+TbNPIRSPFvxN7XDE6saKSmfGIYT4MqP4TFZWH6nJZ5H7w1LT1DPuphnQDddUEgv D+lLTaNhJKyATOR7mMDds7unqELA/kg1fAgWiDqvFRlJBK0ksxV3q6bp7Be8z98KV+3y 9vX9KV+LkpC1M1lwho/mkITJTbW9Zqa7rB62gQ7in78OXalujhJD6nseyrNRE6pcj1MF Khgx6FblZK/gbDzfy/6SNz9tPBQ9w90rAa0Gg6LWScJPYbx+8f0L8grXmi4ICy0tzKJX EnA0utz1aojOEB1iSioQMQo5EHGMNjLNgR0MjNng+6DCJMZm9wfG1w6Yn97I5ieShx9n LRxQ== 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=CpXLVFKBuxGedOXr5UF0J1u8IEqvpoojnAx1dnjinuU=; b=K4VbWyiHuGtM1EGcB2C1PDd9VwvEMIFf5DM8IhmfYvMcY7i0Omk+TAa1MWgW8dA6zV SmYZ8Go7BxBQECtK9+f2UluRH1QScfMIkslUnjIlz553+JXBRvC5068i1Hwnzswk4G2F 5kACvM4mJxsl6SIcvWPNB3Di/icIsIX61Nb4KJWy6kUSM/CNCXaHTk96bLEqmgLGYkDF 1jrLKJjCA+SyEok3SHC2qWZ+04AywPbFCaOWWTChtrO0Brbj2BWt81tOotEim4Maz+qB RD2xttNpMsc4o3xyF9uUoDlo/BgeG+LxNYMeXlxcd4bmb96yn9mpZK2hHDqoCMkwGyJ4 SvPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=NDpiaqC8; 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 n5si7285373eji.73.2021.04.17.09.12.29; Sat, 17 Apr 2021 09:12:53 -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=NDpiaqC8; 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 S236541AbhDQQJK (ORCPT + 99 others); Sat, 17 Apr 2021 12:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236595AbhDQQJH (ORCPT ); Sat, 17 Apr 2021 12:09:07 -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 D6234C061574 for ; Sat, 17 Apr 2021 09:08:39 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id l22so27067377ljc.9 for ; Sat, 17 Apr 2021 09:08:39 -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=CpXLVFKBuxGedOXr5UF0J1u8IEqvpoojnAx1dnjinuU=; b=NDpiaqC8RQdgppn7RNtRTkdfZ7vU2zRrl/NWu5MRi+0Muy5p1Nyk1Kv5xMHM8PCNrV zQspn/Tus7HsyElEKxWtCdWeZnlqfi8ydsPONU595KFuVxBcqt66os6d0+t2hsjecdq/ JBuJ2zmacJRO4WfO5OKwAKJeg6vrEkaEDjHbI= 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=CpXLVFKBuxGedOXr5UF0J1u8IEqvpoojnAx1dnjinuU=; b=ZZFBaRfBwiWdtG+WRZDVii6zuCrfu6N8l2LNX+8lr4kPAF9iGeQtV6w+tPhcO06Q6C OunKPuMBHixPUM/H04FgF/EFOYTzqmOeZYYc6Pgqz0SsYhkxC4plVoWN5uSgbBPLH4Kb KzO/ZBU3Dy324X39763UxyOxyLeY/rqfMIYcT2QaXpuq80gu2591ucm1jpdQ0rloKwV6 lZduRrQ7Hav2G4Rmg+q0oTcSsdzfkQg+/fr7ECjAfE6igMQoyNCIS03UOt5mMGQwdWff zXHdYJEt+z+rnuMdiqcScGkAsHCASsSQhI/AESsXftn+njjTJwdgudgdqkQdAGWZ6wdW Ftbw== X-Gm-Message-State: AOAM531Mq+kqkiPLT3xM4UqlMHQRFToXoFL9caf+e5k7X3Kt4KZfF3Yt ABp5YnclLSvMcpBZ41QqpdnMAWF01TTRZgo2 X-Received: by 2002:a2e:8704:: with SMTP id m4mr5928595lji.390.1618675718096; Sat, 17 Apr 2021 09:08:38 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id c5sm1325405lfk.141.2021.04.17.09.08.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 17 Apr 2021 09:08:37 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id n138so49518303lfa.3 for ; Sat, 17 Apr 2021 09:08:37 -0700 (PDT) X-Received: by 2002:a05:6512:33d3:: with SMTP id d19mr5533163lfg.40.1618675717267; Sat, 17 Apr 2021 09:08:37 -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 09:08:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/uaccess: small optimization in unsafe_copy_to_user() To: Eric Dumazet Cc: Thomas Gleixner , linux-kernel , Eric Dumazet 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 9:03 AM Linus Torvalds wrote: > > Really. The "unsafe" user accesses are named that way very explicitly, > and for a very very good reason: the safety needs to be guaranteed and > obvious within the context of those accesses. Not within some "oh, > nobody will ever call this with a negative argument" garbage bullshit. Side note: I'm, looking at the readdir cases that I wrote, and I have to just say that is broken too. So "stones and glass houses" etc, and I'll have to fix that too. Linus