lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 11 Sep 2021 10:36:59 -0400
From:   Sasha Levin <sashal@...nel.org>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        stable <stable@...r.kernel.org>,
        Miklos Szeredi <mszeredi@...hat.com>,
        overlayfs <linux-unionfs@...r.kernel.org>
Subject: Re: [PATCH AUTOSEL 5.14 46/99] ovl: copy up sync/noatime fileattr
 flags

On Fri, Sep 10, 2021 at 08:35:41AM +0300, Amir Goldstein wrote:
>On Fri, Sep 10, 2021 at 3:17 AM Sasha Levin <sashal@...nel.org> wrote:
>>
>> From: Amir Goldstein <amir73il@...il.com>
>>
>> [ Upstream commit 72db82115d2bdfbfba8b15a92d91872cfe1b40c6 ]
>>
>> When a lower file has sync/noatime fileattr flags, the behavior of
>> overlayfs post copy up is inconsistent.
>>
>> Immediately after copy up, ovl inode still has the S_SYNC/S_NOATIME
>> inode flags copied from lower inode, so vfs code still treats the ovl
>> inode as sync/noatime.  After ovl inode evict or mount cycle,
>> the ovl inode does not have these inode flags anymore.
>>
>> To fix this inconsistency, try to copy the fileattr flags on copy up
>> if the upper fs supports the fileattr_set() method.
>>
>> This gives consistent behavior post copy up regardless of inode eviction
>> from cache.
>>
>> We cannot copy up the immutable/append-only inode flags in a similar
>> manner, because immutable/append-only inodes cannot be linked and because
>> overlayfs will not be able to set overlay.* xattr on the upper inodes.
>>
>> Those flags will be addressed by a followup patch.
>>
>> Signed-off-by: Amir Goldstein <amir73il@...il.com>
>> Signed-off-by: Miklos Szeredi <mszeredi@...hat.com>
>> Signed-off-by: Sasha Levin <sashal@...nel.org>
>> ---
>
>Sasha,
>
>I do not recommend applying this patch to stable.
>The value/risk ratio is not worth it IMO.
>
>I don't know of anyone who ever complained about not copying
>the NOATIME/SYNC fileattrs specifically.
>
>This patch is more of a complimentary patch to the IMMUTABLE/
>APPEND fileattr patch, which is not appropriate for stable either.

Thanks! I'll drop it.

>OTOH, ovl-update-5.15 has this patch that was not included in the
>AUTOSEL batch, even though it has a Fixes tag, CC stable and
>very strong hints in the subject:
>52d5a0c6bd8a ("ovl: fix BUG_ON() in may_delete() when called from
>ovl_cleanup()")
>
>I suppose AUTOSEL leaves these sorts of patches to Greg's scripts?

That's correct. If it has a stable tag AUTOSEL won't look at it (why
should it? :) ).

-- 
Thanks,
Sasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ