Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3709103ybp; Sun, 13 Oct 2019 12:25:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPjs25fVa8NrLUTHi6UlHyCy/52jmaodB7mSQCNuU4uekexpnXGOeoarhqEsQdW+EFrMdZ X-Received: by 2002:a17:906:418:: with SMTP id d24mr25347947eja.305.1570994754730; Sun, 13 Oct 2019 12:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570994754; cv=none; d=google.com; s=arc-20160816; b=KHLRIw0/EihSnraLC2y25CnnTWBrdhHcVn5J28z335u4zDDI/BZLFSFefjKtFcfPHQ hAhNJWd4GLPVW9271pqkda7nmJHci/n/nLoIpuIILzXwlTbh1Lw29kMgmCoTWAwsS4B0 rFCI2NQrZR98ce7rqhC6RHgcX3UleEQBrkv6/NylJ9octBCysP/dWcoNegQMAr9CiLY+ TH3XdMDibaUjxHsXwPUoBBkTwWtFNOQ094c6JO7QT1wZM88NveumBAGDEqzzJ2/sihAK mei6BPy9DjjkfiIiwtqKLvHici8Nr5JaP7Yi+qFBYqDnLjiuFJcCDo4vl/L8tl0IE9H+ WEoA== 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=jcke8lUrtb8vhHtb5SzfvLcSsz8Joiz0psIhCZXHclw=; b=PxrjSGB5IzsexlLrKmUWn1APwtPv6TCx3OlomurJfUFe0FPqFCOp/10b/kYvhAKLIj hBZ/KohNFnlGRJ0nBztgLXGVWo6e9GoqtMKXViDdb/9qU6bsPTVnkMELgoRnmkQ01uaw fuBA/DNPn1mVtlmKrpJpixxM3ln+eHFl5wBrdN/8ccDIOp1AuSN5ZYRxqBMSLADlnEmh 77/lOn8vpj4YvU1mIW+HNrHWUbcT+xvXtBO/C6S7qPK3q+hnS3i7CyL5e6CvfXI9L3Pd ggJmf9M2DTrhrmddnPxZubGfCHfkrgfzziWG6jphqvU1dgzQzAlRHSRkJAA7i162Uvji 2ujA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="ALg9ZHg/"; 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 t18si9812438ejr.428.2019.10.13.12.25.31; Sun, 13 Oct 2019 12:25:54 -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="ALg9ZHg/"; 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 S1729528AbfJMTXA (ORCPT + 99 others); Sun, 13 Oct 2019 15:23:00 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36124 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729486AbfJMTW6 (ORCPT ); Sun, 13 Oct 2019 15:22:58 -0400 Received: by mail-lj1-f193.google.com with SMTP id v24so14499883ljj.3 for ; Sun, 13 Oct 2019 12:22:57 -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=jcke8lUrtb8vhHtb5SzfvLcSsz8Joiz0psIhCZXHclw=; b=ALg9ZHg/wXXbWsRVKIX2Tj6yGXeSM+rooiwzW8dCPBNoVNlR1Pig56y9g/E4pjK0L+ gu3SSubcXh8qX90I1wrsT/Wx79+uX7oPKjAxXF6b1oZab7+Q1pxPOfBG+7OPTSBYKtFP Decyu1cQ2EPt4/bb0wu/abfV/QsXzpoC8Lnzw= 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=jcke8lUrtb8vhHtb5SzfvLcSsz8Joiz0psIhCZXHclw=; b=JXzmXczHHMZIP2ymxxvKrS3gTTf5npr9BLq2ukpiUl9YsmD6JDQV3if7UNCCYnMbI9 gq6MXwAqAXdZW5IDK7ptCgPLwSQicJrpSWaWOervwKNJg2nnLLGvRE99HHvM37ET3rZy wsm9XaZoHOm7arDt+oIXENjLF1YySdCA6SlL+VZkFgI55pOayAHk6c3UadXNUvviDV4g mgcp9Mq9ib2qVsnmgPlhmrmvLE/oJ7l8Ts2ebWl3GPLYyPomKZEEEiOhx4kQSyJ4LabT bAjZa9tXPe3cl14g2GHI91JSZsV7c9fRq+brD3ybq/Zj6dplvaD5vfOTRn5JXuD3+20/ vtrA== X-Gm-Message-State: APjAAAUccRM3wanCaI7IWD/ag+y2QPNRLqmxlgTlBhEq6RKJSE6qyIbU fynmUOPmAa2tyCw+7FFNx+lzptEjzfA= X-Received: by 2002:a05:651c:237:: with SMTP id z23mr16645880ljn.8.1570994576230; Sun, 13 Oct 2019 12:22:56 -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 q5sm3766115lfm.93.2019.10.13.12.22.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Oct 2019 12:22:55 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id x80so10309699lff.3 for ; Sun, 13 Oct 2019 12:22:55 -0700 (PDT) X-Received: by 2002:ac2:5924:: with SMTP id v4mr15064721lfi.29.1570994574844; Sun, 13 Oct 2019 12:22:54 -0700 (PDT) MIME-Version: 1.0 References: <20191008032912.GQ26530@ZenIV.linux.org.uk> <20191010195504.GI26530@ZenIV.linux.org.uk> <20191011001104.GJ26530@ZenIV.linux.org.uk> <20191013181333.GK26530@ZenIV.linux.org.uk> <20191013191050.GL26530@ZenIV.linux.org.uk> In-Reply-To: <20191013191050.GL26530@ZenIV.linux.org.uk> From: Linus Torvalds Date: Sun, 13 Oct 2019 12:22:38 -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 Sun, Oct 13, 2019 at 12:10 PM Al Viro wrote: > > No arguments re put_user_ex side of things... Below is a completely > untested patch for get_user_ex elimination (it seems to build, but that's > it); in any case, I would really like to see comments from x86 folks > before it goes anywhere. Please don't do this: > + if (unlikely(__copy_from_user(&sc, usc, sizeof(sc)))) > + goto Efault; Why would you use __copy_from_user()? Just don't. > + if (unlikely(__copy_from_user(&v, user_vm86, > + offsetof(struct vm86_struct, int_revectored)))) Same here. There's no excuse for __copy_from_user(). Linus