public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Jan Kara <jack@suse.cz>, linux-man@vger.kernel.org
Subject: [PATCH v2 3/3] fanotify.7: Document FAN_DENY_ERRNO()
Date: Mon, 31 Mar 2025 10:27:59 +0200	[thread overview]
Message-ID: <20250331082759.1424401-3-amir73il@gmail.com> (raw)
In-Reply-To: <20250331082759.1424401-1-amir73il@gmail.com>

Document FAN_DENY_ERRNO(), that was added in v6.13 to
report specific errors on file access.

Cc: Jan Kara <jack@suse.cz>
Cc: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---

Changes since v1:
- Split out to 3 patches
- Add example of FAN_DENY_ERRNO

 man/man7/fanotify.7 | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/man/man7/fanotify.7 b/man/man7/fanotify.7
index 863578bd7..a532a963a 100644
--- a/man/man7/fanotify.7
+++ b/man/man7/fanotify.7
@@ -778,6 +778,28 @@ to deny the file operation.
 If access is denied, the requesting application call will receive an
 .B EPERM
 error.
+Since Linux 6.13,
+.\" commit b4b2ff4f61ded819bfa22e50fdec7693f51cbbee
+if a notification group is initialized with class
+.BR FAN_CLASS_PRE_CONTENT ,
+the file operation can be denied with errors other than
+.BR EPERM .
+For example, for the requesting application to get the
+.B EIO
+error, the event listener can write the response
+.BR FAN_DENY_ERRNO ( EIO ).
+At the time of writing,
+only the following error values could be returned to the application with
+.BR FAN_DENY_ERRNO
+macro:
+.BR EPERM ,
+.BR EIO ,
+.BR EBUSY ,
+.BR ETXTBSY ,
+.BR EAGAIN ,
+.BR ENOSPC ,
+.BR EDQUOT .
+.P
 Additionally, if the notification group has been created with the
 .B FAN_ENABLE_AUDIT
 flag, then the
-- 
2.34.1


  parent reply	other threads:[~2025-03-31  8:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31  8:27 [PATCH v2 1/3] fanotify.7: wfix Amir Goldstein
2025-03-31  8:27 ` [PATCH v2 2/3] fanotify.7: Document FAN_RESPONSE_INFO_AUDIT_RULE Amir Goldstein
2025-03-31  9:01   ` Alejandro Colomar
2025-03-31  9:46     ` Amir Goldstein
2025-03-31  9:53       ` Alejandro Colomar
2025-04-02 21:14       ` Alejandro Colomar
2025-03-31  8:27 ` Amir Goldstein [this message]
2025-03-31  9:06   ` [PATCH v2 3/3] fanotify.7: Document FAN_DENY_ERRNO() Alejandro Colomar
2025-03-31  8:55 ` [PATCH v2 1/3] fanotify.7: wfix Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250331082759.1424401-3-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox