From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32962C28CC1 for ; Wed, 29 May 2019 21:09:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B2A7241E0 for ; Wed, 29 May 2019 21:09:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="khBn2JsX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbfE2VJJ (ORCPT ); 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-Google-Smtp-Source: APXvYqw4+6WHlbq1/hdBYT0j6sWeY46tQL+hvGmOlLuYyaRNMv8Wv1i6JkrHWJ/s16NkHy0X8+ZG43jnvlddUrrS1wY= 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.