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]
Message-ID: <7deb63a4-1f5f-4d6c-9ff4-0239464bd691@vivo.com>
Date: Thu, 29 May 2025 10:25:02 +0800
From: Yangtao Li <frank.li@...o.com>
To: Viacheslav Dubeyko <Slava.Dubeyko@....com>,
 "glaubitz@...sik.fu-berlin.de" <glaubitz@...sik.fu-berlin.de>,
 "slava@...eyko.com" <slava@...eyko.com>, brauner@...nel.org
Cc: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] hfs: correct superblock flags

+cc Christian Brauner

在 2025/5/29 05:26, Viacheslav Dubeyko 写道:
> On Wed, 2025-05-28 at 16:37 +0000, 李扬韬 wrote:
>> Hi Slava,
>>
>>> I am slightly confused by comment. Does it mean that the fix introduces more errors? It looks like we need to have more clear explanation of the fix here.
>>
>> I'll update commit msg.
>>
>>> s->s_flags |= SB_NODIRATIME | SB_NOATIME;
>>
>> IIUC, SB_NOATIME > SB_NODIRATIME.
>>
> 
> Semantically, it's two different flags. One is responsible for files and another
> one is responsible for folders. So, this is why I believe it's more safe to have
> these both flags.

To be honest, from my point of view, SB_NOATIME is more like disabling 
atime updates for all types of files, not just files. I would like to 
know what vfs people think, whether we need to use both flags at the 
same time.

> 
> Implementation could change but setting these flags we guarantee that it needs
> to take into account not to update atime for files and folders.
> 
>> So we should correct flags in smb, ceph.
>>
> 
> I am not sure that it makes sense. It's more safe to have both flags set.
> 
> Thanks,
> Slava.
> 
>> 2091 bool atime_needs_update(const struct path *path, struct inode *inode)
>> 2092 {
>> 2093         struct vfsmount *mnt = path->mnt;
>> 2094         struct timespec64 now, atime;
>> 2095
>> 2096         if (inode->i_flags & S_NOATIME)
>> 2097                 return false;
>> 2098
>> 2099         /* Atime updates will likely cause i_uid and i_gid to be written
>> 2100         ¦* back improprely if their true value is unknown to the vfs.
>> 2101         ¦*/
>> 2102         if (HAS_UNMAPPED_ID(mnt_idmap(mnt), inode))
>> 2103                 return false;
>> 2104
>> 2105         if (IS_NOATIME(inode))
>> 2106                 return false;
>> 2107         if ((inode->i_sb->s_flags & SB_NODIRATIME) && S_ISDIR(inode->i_mode))
>> 2108                 return false;
>>

Thx,
Yangtao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ