[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix descriptions for AT_NO_AUTOMOUNT

From: Pádraig Brady
Subject: Re: [PATCH] fix descriptions for AT_NO_AUTOMOUNT
Date: Mon, 14 Mar 2022 18:02:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0

On 14/03/2022 13:24, Alejandro Colomar (man-pages) wrote:
[Added a few CCs from the relevant kernel commits]

Hi Pádraig,

On 3/10/22 14:46, Pádraig Brady wrote:
On 10/03/2022 07:44, Andreas Schwab wrote:
On Mär 09 2022, Paul Eggert wrote:

I audited gnulib's uses of fstatat and found one fishy one that doesn't
use AT_NO_AUTOMOUNT, namely, in fts.c where the follow-symlink branch
'stat' whereas the no-follow-symlink branch uses fstatat without
AT_NO_AUTOMOUNT. I installed the first patch to cause it be
consistent in
using AT_NO_AUTOMOUNT, which is also consistent with what glibc does

??? In glibc, stat is the same as fstatat(,,,0).

Indeed. It looks like the man page for fstatat is out of date.
After looking at the kernel code, it seems that:
   fstatat() did _not_ imply AT_NO_AUTOMOUNT from 2.6.38 -> 4.11
     I'm not sure it even honored the AT_NO_AUTOMOUNT flag before 4.11
   fstatat() did imply AT_NO_AUTOMOUNT since 4.11

The attached patch clarifies this is the fstatat and statx man pages.

sorry for the confusion,


Subject: [PATCH] fix descriptions for AT_NO_AUTOMOUNT

Don't mention AT_NO_AUTOMOUNT for fstatat.2
as it's implied since v4.11-rc7-14-gdeccf497d804

Even though it's implied, since code may pass it,
and especially code written based on the old manual page,
it would be good to keep the paragraph in fstatat.2,
even if the text is replaced by something like
"Before Linux x.xx, this flag was ignored.
After Linux y.yy, this flag is implied."

Does it make sense to you?

Yes good point.
I went through the git history and the summary is fstatat()
honored the flag since 2.6.38,
ignored the flag since 3.1,
implied the flag since 4.11,

I'll add that info to fstatat(2), and the details to the commit message.

Don't mention commit v4.13-9318-g42f461482178 as it was reverted

Please also mention v4.15-rc1-50-g5d38f049cee1 as the commit in which it
was reverted.
Since it was present in some kernel releases, we might want to mention
it in the manual page?

Well since the flag for fstatat() doesn't change anything since 3.1
it's probably best not to mention this old, short lived, and very specific info.

Mention that stat(), lstat(), and fstatat()
imply AT_NO_AUTOMOUNT, on the statx.2 man page

Please sign the patch with "Signed-off-by: ..."

Done in the attached.


Attachment: man-fix-AT_NO_AUTOMOUNT-2.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]