Linux Manual Pages development
 help / color / mirror / Atom feed
* [PATCH] man/man2/fanotify_mark.2: AT_FDCWD plus NULL path doesn't work
@ 2026-05-29 17:27 Jann Horn
  2026-05-29 21:38 ` Amir Goldstein
  0 siblings, 1 reply; 4+ messages in thread
From: Jann Horn @ 2026-05-29 17:27 UTC (permalink / raw)
  To: Alejandro Colomar, Jan Kara, Amir Goldstein, Matthew Bobrowski
  Cc: linux-man, linux-fsdevel, linux-kernel, Jann Horn

The fanotify_mark.2 manpage claims that AT_FDCWD works with a NULL path,
but there is no kernel code for that - in fanotify_find_path(), in the
`if (filename == NULL)` block, the fd is only used for a normal FD
lookup.

This was also already the case when this manpage was written back in
2014, so remove the bogus documentation.

Fixes: c200b422d ("fanotify_mark.2: New page documenting fanotify_mark(2)")
Signed-off-by: Jann Horn <jannh@google.com>
---
 man/man2/fanotify_mark.2 | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/man/man2/fanotify_mark.2 b/man/man2/fanotify_mark.2
index e561ffd21..a3b77537c 100644
--- a/man/man2/fanotify_mark.2
+++ b/man/man2/fanotify_mark.2
@@ -560,14 +560,6 @@ defines the filesystem object to be marked.
 .IP \[bu]
 If
 .I path
-is NULL, and
-.I dirfd
-takes the special value
-.BR AT_FDCWD ,
-the current working directory is to be marked.
-.IP \[bu]
-If
-.I path
 is absolute, it defines the filesystem object to be marked, and
 .I dirfd
 is ignored.

---
base-commit: 9db8ca91f920b9aba40ed68de6b8da0ca9dbefaa
change-id: 20260529-fan-mark-cwd-1c760106eff9

Best regards,
--  
Jann Horn <jannh@google.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] man/man2/fanotify_mark.2: AT_FDCWD plus NULL path doesn't work
  2026-05-29 17:27 [PATCH] man/man2/fanotify_mark.2: AT_FDCWD plus NULL path doesn't work Jann Horn
@ 2026-05-29 21:38 ` Amir Goldstein
  2026-05-29 21:45   ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Amir Goldstein @ 2026-05-29 21:38 UTC (permalink / raw)
  To: Jann Horn
  Cc: Alejandro Colomar, Jan Kara, Matthew Bobrowski, linux-man,
	linux-fsdevel, linux-kernel

On Fri, May 29, 2026 at 7:27 PM Jann Horn <jannh@google.com> wrote:
>
> The fanotify_mark.2 manpage claims that AT_FDCWD works with a NULL path,
> but there is no kernel code for that - in fanotify_find_path(), in the
> `if (filename == NULL)` block, the fd is only used for a normal FD
> lookup.
>
> This was also already the case when this manpage was written back in
> 2014, so remove the bogus documentation.
>
> Fixes: c200b422d ("fanotify_mark.2: New page documenting fanotify_mark(2)")
> Signed-off-by: Jann Horn <jannh@google.com>

Hah,  never noticed this.
Apparently, hallucinations already existed in 2014 :D

Acked-by: Amir Goldstein <amir73il@gmail.com>

> ---
>  man/man2/fanotify_mark.2 | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/man/man2/fanotify_mark.2 b/man/man2/fanotify_mark.2
> index e561ffd21..a3b77537c 100644
> --- a/man/man2/fanotify_mark.2
> +++ b/man/man2/fanotify_mark.2
> @@ -560,14 +560,6 @@ defines the filesystem object to be marked.
>  .IP \[bu]
>  If
>  .I path
> -is NULL, and
> -.I dirfd
> -takes the special value
> -.BR AT_FDCWD ,
> -the current working directory is to be marked.
> -.IP \[bu]
> -If
> -.I path
>  is absolute, it defines the filesystem object to be marked, and
>  .I dirfd
>  is ignored.
>
> ---
> base-commit: 9db8ca91f920b9aba40ed68de6b8da0ca9dbefaa
> change-id: 20260529-fan-mark-cwd-1c760106eff9
>
> Best regards,
> --
> Jann Horn <jannh@google.com>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] man/man2/fanotify_mark.2: AT_FDCWD plus NULL path doesn't work
  2026-05-29 21:38 ` Amir Goldstein
@ 2026-05-29 21:45   ` Alejandro Colomar
  2026-06-01 22:19     ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Colomar @ 2026-05-29 21:45 UTC (permalink / raw)
  To: Amir Goldstein, Heinrich Schuchardt
  Cc: Jann Horn, Jan Kara, Matthew Bobrowski, linux-man, linux-fsdevel,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]

Hi Jann, Amir,

On 2026-05-29T23:38:11+0200, Amir Goldstein wrote:
> On Fri, May 29, 2026 at 7:27 PM Jann Horn <jannh@google.com> wrote:
> >
> > The fanotify_mark.2 manpage claims that AT_FDCWD works with a NULL path,
> > but there is no kernel code for that - in fanotify_find_path(), in the
> > `if (filename == NULL)` block, the fd is only used for a normal FD
> > lookup.
> >
> > This was also already the case when this manpage was written back in
> > 2014, so remove the bogus documentation.
> >
> > Fixes: c200b422d ("fanotify_mark.2: New page documenting fanotify_mark(2)")
> > Signed-off-by: Jann Horn <jannh@google.com>
> 
> Hah,  never noticed this.
> Apparently, hallucinations already existed in 2014 :D
> 
> Acked-by: Amir Goldstein <amir73il@gmail.com>

Thanks!  I've added the author of the fixed commit in the recipients.
I'll apply on Monday or so.


Have a lovely night!
Alex

> 
> > ---
> >  man/man2/fanotify_mark.2 | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/man/man2/fanotify_mark.2 b/man/man2/fanotify_mark.2
> > index e561ffd21..a3b77537c 100644
> > --- a/man/man2/fanotify_mark.2
> > +++ b/man/man2/fanotify_mark.2
> > @@ -560,14 +560,6 @@ defines the filesystem object to be marked.
> >  .IP \[bu]
> >  If
> >  .I path
> > -is NULL, and
> > -.I dirfd
> > -takes the special value
> > -.BR AT_FDCWD ,
> > -the current working directory is to be marked.
> > -.IP \[bu]
> > -If
> > -.I path
> >  is absolute, it defines the filesystem object to be marked, and
> >  .I dirfd
> >  is ignored.
> >
> > ---
> > base-commit: 9db8ca91f920b9aba40ed68de6b8da0ca9dbefaa
> > change-id: 20260529-fan-mark-cwd-1c760106eff9
> >
> > Best regards,
> > --
> > Jann Horn <jannh@google.com>
> >
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] man/man2/fanotify_mark.2: AT_FDCWD plus NULL path doesn't work
  2026-05-29 21:45   ` Alejandro Colomar
@ 2026-06-01 22:19     ` Alejandro Colomar
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2026-06-01 22:19 UTC (permalink / raw)
  To: Amir Goldstein, Heinrich Schuchardt
  Cc: Jann Horn, Jan Kara, Matthew Bobrowski, linux-man, linux-fsdevel,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

Hi,

On 2026-05-29T23:45:55+0200, Alejandro Colomar wrote:
> Hi Jann, Amir,
> 
> On 2026-05-29T23:38:11+0200, Amir Goldstein wrote:
> > On Fri, May 29, 2026 at 7:27 PM Jann Horn <jannh@google.com> wrote:
> > >
> > > The fanotify_mark.2 manpage claims that AT_FDCWD works with a NULL path,
> > > but there is no kernel code for that - in fanotify_find_path(), in the
> > > `if (filename == NULL)` block, the fd is only used for a normal FD
> > > lookup.
> > >
> > > This was also already the case when this manpage was written back in
> > > 2014, so remove the bogus documentation.
> > >
> > > Fixes: c200b422d ("fanotify_mark.2: New page documenting fanotify_mark(2)")
> > > Signed-off-by: Jann Horn <jannh@google.com>
> > 
> > Hah,  never noticed this.
> > Apparently, hallucinations already existed in 2014 :D
> > 
> > Acked-by: Amir Goldstein <amir73il@gmail.com>
> 
> Thanks!  I've added the author of the fixed commit in the recipients.
> I'll apply on Monday or so.

I've applied the patch and tag now.  Thanks!


Have a lovely night!
Alex

> 
> 
> Have a lovely night!
> Alex
> 
> > 
> > > ---
> > >  man/man2/fanotify_mark.2 | 8 --------
> > >  1 file changed, 8 deletions(-)
> > >
> > > diff --git a/man/man2/fanotify_mark.2 b/man/man2/fanotify_mark.2
> > > index e561ffd21..a3b77537c 100644
> > > --- a/man/man2/fanotify_mark.2
> > > +++ b/man/man2/fanotify_mark.2
> > > @@ -560,14 +560,6 @@ defines the filesystem object to be marked.
> > >  .IP \[bu]
> > >  If
> > >  .I path
> > > -is NULL, and
> > > -.I dirfd
> > > -takes the special value
> > > -.BR AT_FDCWD ,
> > > -the current working directory is to be marked.
> > > -.IP \[bu]
> > > -If
> > > -.I path
> > >  is absolute, it defines the filesystem object to be marked, and
> > >  .I dirfd
> > >  is ignored.
> > >
> > > ---
> > > base-commit: 9db8ca91f920b9aba40ed68de6b8da0ca9dbefaa
> > > change-id: 20260529-fan-mark-cwd-1c760106eff9
> > >
> > > Best regards,
> > > --
> > > Jann Horn <jannh@google.com>
> > >
> > 
> 
> -- 
> <https://www.alejandro-colomar.es>



-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-01 22:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29 17:27 [PATCH] man/man2/fanotify_mark.2: AT_FDCWD plus NULL path doesn't work Jann Horn
2026-05-29 21:38 ` Amir Goldstein
2026-05-29 21:45   ` Alejandro Colomar
2026-06-01 22:19     ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox