Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6839641ybi; Wed, 29 May 2019 14:10:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPBPuVZUFyE+v9t4iWBX5jZHpaD29YRozHyXVg8sSSkwnvdaqzsnuHk0We4D0MmJU/7j+h X-Received: by 2002:a63:1e62:: with SMTP id p34mr38953pgm.49.1559164256003; Wed, 29 May 2019 14:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559164255; cv=none; d=google.com; s=arc-20160816; b=JW/pfbmyrFyl+zDQk2YdJ3WKqrP+X1316vcU7qq5DlDrA6Gb31lQwpHxdjVaqPaoLw U+GVDt4OpU1/eRRdckHxRm/dFgX2JhrDuBpryzrcOMwixXuqHfZQP64vA7jWw19J15vQ xZiW0WrJFsIzDJMX92lZZUaPRLeLFbeJsxQRkwjoWwfx6ww7hqf/IbzxF0IRMHR3qA9n UN9UXZzzpwVJEZwQCgWq8BZ+TutSLNM+/qgJlafxb6+3H7hCQsQAZY1iALxV2UDlZJZK iL+mOOxmFmLySHQRVtSLkhhkiSBHTe4+h1q0wUVCwaTF8Amn+uHkVwufmI+P+21BCWvr SmiQ== 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=pyyIg1feZBNJIOhAeqOm6voCt8dVu19c0GgtaObDKJ4=; b=zD1tLCl8XYO8EGwuyefvjAWb0jbV4IH8xCoXmNWFTvbiGROq3JbLln2Gr8YtD3VtxC r40nee2lG67iRjvRGSM7jkVKXPrEsftqXMx01yrWV0udxrBZRnWP9X8T0Ys92JEK/w1l S5Z52DJOBrBM/o87zEyJcDH70/WbsAra0XPaSDKcGZj+RMnHubLi+2wjkQdmEwwOFXxA 0XgYo9d0Lb+fpKfqj6fPsjqT2ddO6sVq385ZCraV8or4k2pIglHWXBKk2EHLZb/Gz3Y1 UyIRGVv8SFjA2/cAuKJ94ZSZ5zipLdPWUT7T7KhtLqeNa0Rz5RQktKTgWgVTeQLp21Fa jCuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=khBn2JsX; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n65si614450pji.53.2019.05.29.14.10.41; Wed, 29 May 2019 14:10:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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=@gmail.com header.s=20161025 header.b=khBn2JsX; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbfE2VJJ (ORCPT + 99 others); Wed, 29 May 2019 17:09:09 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:36349 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbfE2VJJ (ORCPT ); Wed, 29 May 2019 17:09:09 -0400 Received: by mail-yw1-f67.google.com with SMTP id e68so1692500ywf.3; Wed, 29 May 2019 14:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pyyIg1feZBNJIOhAeqOm6voCt8dVu19c0GgtaObDKJ4=; b=khBn2JsXbz31CjWCwT0lgFatYodQo+vX1CyVs6m9K+NUubSGgvBtj/AIj7nRCQRhx5 WLAEY8+1qqY9wTuT4f/Um/9JFo0pFxwKfbt42NyvSJzBxm+5pi6tDX99QFPwSLuRCYdq nLPqhtLe7lKAXe2MmfSSop6mau30E1NIDyq9p/UjmVSefVXM2BfIku/MG2/PILCf2YwS hq6kOumFUUIUer5U3TW+NL0GcV+q1eejGacmXMuzzMQueSLxWp2j2+nQSlUsdnVDOcwA M2NhVBSjt+9sQK0lWkkA9PzQ4/17yLkzK96fzS+qdPSmRjQo47gxh6ZrYXPNOqCWbsqR OFUg== 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=pyyIg1feZBNJIOhAeqOm6voCt8dVu19c0GgtaObDKJ4=; b=O+Qs9vUYiWkdDdijUfvxUJJUlhekHTgfv61ksccw49vfXQtx13+Q7zhSvX3oeeVCpR ybISK80NgIIN6Qp8v9kVj0uHke9DQ9PFV7yQDSxWIu7ahRdFuATJMnQg0ijUuUv3Wfk/ d00dy1GDQ/44FExrEme/RjmR2fCEms0vAnOxGjVzqx9qit5tDrZFin4HONTMzISpZZNp rp8Kuxh1+V0ezT2vqTUfdo32/2Mzokq7f6CE4Wt415sqgGWDMZ9ei4ARgdHKpnXQdC8V +R2rf3b7P75jiKgRohzJb2MRkSTbWFQE26+0m3ZxBodWQGgi5HuUm31dk1hXcSf/5UG1 q8dg== X-Gm-Message-State: APjAAAXlhc4T2LvXOm7hAsYjmXRbQhoyexUvUm3U6ygt64IozFDE+INv a9MHAemLNIeChz+LpYL9tCGZsXidegffs42tvF60tWwqeNw= X-Received: by 2002:a81:3956:: with SMTP id g83mr19628ywa.183.1559164148335; Wed, 29 May 2019 14:09:08 -0700 (PDT) MIME-Version: 1.0 References: <20190529174318.22424-1-amir73il@gmail.com> <20190529174318.22424-9-amir73il@gmail.com> <20190529183333.GH5231@magnolia> In-Reply-To: <20190529183333.GH5231@magnolia> From: Amir Goldstein Date: Thu, 30 May 2019 00:08:56 +0300 Message-ID: Subject: Re: [PATCH v3 08/13] vfs: copy_file_range needs to strip setuid bits and update timestamps To: "Darrick J. Wong" Cc: Dave Chinner , Christoph Hellwig , linux-xfs , Olga Kornievskaia , Luis Henriques , Al Viro , linux-fsdevel , Linux API , ceph-devel@vger.kernel.org, Linux NFS Mailing List , CIFS Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, May 29, 2019 at 9:33 PM Darrick J. Wong wrote: > > On Wed, May 29, 2019 at 08:43:12PM +0300, Amir Goldstein wrote: > > Because generic_copy_file_range doesn't hold the destination inode lock > > throughout the copy, strip setuid bits before and after copy. > > > > The destination inode mtime is updated before and after the copy and the > > source inode atime is updated after the copy, similar to > > generic_file_read_iter(). > > > > Signed-off-by: Amir Goldstein > > Looks reasonable, Actually, it isn't reasonable. I'd like to recall this patch :-/ As one might expect, splice_direct_to_actor() already has file_accessed() and "file_modified" is the responsibility of filesystem's ->write_iter(). Thanks, Amir.