Received: by 10.192.165.148 with SMTP id m20csp3251083imm; Mon, 23 Apr 2018 03:23:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+rYxcW495vVN0jQmoQa59fUjq+C68nrOss2D95ghI3f48ft5mJ7j+C/Bdea5H2hHlj4yPB X-Received: by 10.101.72.201 with SMTP id o9mr16154243pgs.390.1524478998724; Mon, 23 Apr 2018 03:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524478998; cv=none; d=google.com; s=arc-20160816; b=a3QlYVlLgj5r5IARnHguVjp50J5sKdyAj2r1CXkvQaDTHYYq0Cjz68T6EzK8MAaE7i 1NjA0RWX2Lk5kAtQt2Q6XMZTYW1WrtkESkOHLJPwc8B/zgW9K18uXHF8XWgwJNmCQ7Fb JJCf7dgYm/A6oDt6lqrVoW4KwmUd8hWW3oir4a+8COb46E8eSNacfzqfDH/AOlu3r5Mp N6EyLgVCJWBdVnjP5xRLgJ+UG3bXLeW70GX2e9CiKVD1aYf4uJu2BwMlWBl9GXsCAZrq gcKZ/iu3ngnBkZFDFl6R8ZPcnpWbl9xGV+LCLHmBuCVcaisgI9K+DnBenxW9iMpYZ8XH ysXQ== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=DiW+a8g+6kQKZf21YKcnPvtfUFg9gGJxYXNbjh6t5ms=; b=cq2FGRhrUMl9TYnCrZjO/KpogxPzbz1uGJ8OhQbX1Q1809w2VOCJ8KhYe0FmEHDVVV SQoIZvTmwSIuXyfifDn3nT9aN2d28Ju9e2yIZ40x9vd7UE30IHgyR0yUAIKNMjV2Yq++ rF0o34mqG5FnZHUIsuTi1728OrzfykkRBkQJznD5+eeVbijuBNwYWR2fJytrZfvxO9hp MG5LtPzJ5qlSh2ERPeRR03xycA4DOGcCbuHDnJeicYSMYCCuTp4lB14nlOiLoI1pl89k aipY70fL0l3cS0VkdpMYpDLfwyTUK36oK4UdLh6sXIXrcf9Ao/3brOBJ5C2pwOPzwwXk U3IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=GU4EU/Fm; 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 16si11073044pfh.354.2018.04.23.03.23.04; Mon, 23 Apr 2018 03:23:18 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=GU4EU/Fm; 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 S1754693AbeDWKVs (ORCPT + 99 others); Mon, 23 Apr 2018 06:21:48 -0400 Received: from mail-ot0-f174.google.com ([74.125.82.174]:34001 "EHLO mail-ot0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109AbeDWKVo (ORCPT ); Mon, 23 Apr 2018 06:21:44 -0400 Received: by mail-ot0-f174.google.com with SMTP id i5-v6so16619706oth.1 for ; Mon, 23 Apr 2018 03:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DiW+a8g+6kQKZf21YKcnPvtfUFg9gGJxYXNbjh6t5ms=; b=GU4EU/FmvhJYXGMdcPj22tGkcPWBgZt89qhzgOaDdaKwtlv0xl1mGP5GW89vEW+Jr8 H6bnLf1PTVtDOaKIrUzkIh23cQ8boAtgMpxiNvgl7TfnQqAahET+iOMtDfWMI/et4/8o +YfSKAMxJMdyrPV1TOgEb1g5m0tLaaYVjYRhk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DiW+a8g+6kQKZf21YKcnPvtfUFg9gGJxYXNbjh6t5ms=; b=MW4hsFfzVjtoRWQ7Ib7rT89uuZxGGj5NyftiEd5VT2MEvsSEo6CPXJEyNVJH5klmXx 4TvyrU5EZ+PclyjHYEGVaIRIbEw4nBLZJZ9bozne9mOcYpeGBulx2M1m72jGq9SiHMg3 zNYZcCd9cz8kkzBkOWu3CYYhaAJDhrqzR6wuplN6Vz2QNsSyb+HkOnPL+rN+ZPbMYSrm jo/9su99vTxCBHJhVRJ23MZbIjcUP7SAh288lYlRlHUmTQIB5fnnQcN4DMifbEBM9KtO bnHSFYLy5P+kncgA7MOOqJl9UNhqDR9FNHGrm2bEVqHkI/Spanhe9yYXkr7odsGgz9di PbUg== X-Gm-Message-State: ALQs6tDPmqhHmgviujCZ4QHsN/SpEBjl7oZAOhDbSWa3Pq3E36h6bal1 FgB2zBpIx20iZMdM0oW5zKWjV6dtDQhodlFfIyqs8w== X-Received: by 2002:a9d:1de4:: with SMTP id w33-v6mr5311382otw.85.1524478904018; Mon, 23 Apr 2018 03:21:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:5303:0:0:0:0:0 with HTTP; Mon, 23 Apr 2018 03:21:43 -0700 (PDT) X-Originating-IP: [176.63.54.97] In-Reply-To: References: <20180412150826.20988-1-mszeredi@redhat.com> <20180412150826.20988-17-mszeredi@redhat.com> From: Miklos Szeredi Date: Mon, 23 Apr 2018 12:21:43 +0200 Message-ID: Subject: Re: [RFC PATCH 16/35] ovl: readd lsattr/chattr support To: Amir Goldstein Cc: Miklos Szeredi , overlayfs , linux-fsdevel , linux-kernel 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, Apr 22, 2018 at 10:35 AM, Amir Goldstein wrote: > On Tue, Apr 17, 2018 at 10:51 PM, Amir Goldstein wrote: [snip] > Is there a reason why the real file can't get the real path? It could, except for vma->vm_file. Now, we could have a separate realfile for mmap (with overlay path) and one for everything else (with real path). Maybe that's the way to go, to minimize the chance of trouble caused by this irregularity. > For current kernels, can you say what else can go wrong when filesystems > call mnt_want_write_file() on an overlay file on ioctl with filesystem > inode and why I couldn't reproduce readonly/freeze bypass? mnt_want_write_file() is overlayfs-aware in current kernels. We could fix it to use file_inode()->i_sb instead of f_path.dentry->d_sb after reverting the overlay specific hack, and that would fix the freeze bypass bug and would be correct for all filesystems. But I wonder how many such issues we have where discrepancy between f_path.dentry and file_inode() matters. Thanks, Miklos