Skip to contentSkip to conversation

fa_notify_mark(2): Support for FA_ flags has been backported to LTS kernels

PATCH Superseded [email protected] 2 participants 4 messages Jul 12, 2024 – Jul 13, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 fa_notify_mark(2): Support for FA_ flags has been backported to LTS kernels

From: Chuck Lever <[email protected]>

---
 man/man2/fanotify_mark.2 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
man/man2/fanotify_mark.2 +4 -4
index f3fce0c4e4c4..edeadc883029 100644
@@ -176,7 +176,7 @@ the update fails with
 .B EEXIST
 error.
 .TP
-.BR FAN_MARK_IGNORE " (since Linux 6.0)"
+.BR FAN_MARK_IGNORE " (since Linux 6.0, 5.15.154, and 5.10.220)"
 .\" commit e252f2ed1c8c6c3884ab5dd34e003ed21f1fe6e0
 This flag has a similar effect as setting the
 .B FAN_MARK_IGNORED_MASK
@@ -271,7 +271,7 @@ error.
 This is a synonym for
 .RB ( FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY ).
 .TP
-.BR FAN_MARK_EVICTABLE " (since Linux 5.19)"
+.BR FAN_MARK_EVICTABLE " (since Linux 5.19, 5.15.154, and 5.10.220)"
 .\" commit 5f9d3bd520261fd7a850818c71809fd580e0f30c
 When an inode mark is created with this flag,
 the inode object will not be pinned to the inode cache,
@@ -362,7 +362,7 @@ Create an event when a marked file or directory itself is deleted.
 An fanotify group that identifies filesystem objects by file handles
 is required.
 .TP
-.BR FAN_FS_ERROR " (since Linux 5.16)"
+.BR FAN_FS_ERROR " (since Linux 5.16, 5.15.154, and 5.10.220)"
 .\" commit 9709bd548f11a092d124698118013f66e1740f9b
 Create an event when a filesystem error
 leading to inconsistent filesystem metadata is detected.
@@ -399,7 +399,7 @@ directory.
 An fanotify group that identifies filesystem objects by file handles
 is required.
 .TP
-.BR FAN_RENAME " (since Linux 5.17)"
+.BR FAN_RENAME " (since Linux 5.17, 5.15.154, and 5.10.220)"
 .\" commit 8cc3b1ccd930fe6971e1527f0c4f1bdc8cb56026
 This event contains the same information provided by events
 .B FAN_MOVED_FROM
Signature · 1 line
2.45.1
#1 lore raw

PATCH 2/2 fa_notify_init(2): Support for FA_ flags has been backported to LTS kernels

From: Chuck Lever <[email protected]>

---
 man/man2/fanotify_init.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/fanotify_init.2 +1 -1
index e5f9cbf298ee..51c7d61fd86d 100644
@@ -295,7 +295,7 @@ for additional details.
 This is a synonym for
 .RB ( FAN_REPORT_DIR_FID | FAN_REPORT_NAME ).
 .TP
-.BR FAN_REPORT_TARGET_FID " (since Linux 5.17)"
+.BR FAN_REPORT_TARGET_FID " (since Linux 5.17, 5.15.154, and 5.10.220)"
 .\" commit d61fd650e9d206a71fda789f02a1ced4b19944c4
 Events for fanotify groups initialized with this flag
 will contain additional information about the child
Signature · 1 line
2.45.1
#2 lore raw

Re: [PATCH v1 2/2] fa_notify_init(2): Support for FA_ flags has been backported to LTS kernels

Quoted 4 lines · On Fri, Jul 12, 2024 at 8:57 PM <[email protected]> wrote:

From: Chuck Lever <[email protected]>

Please fix typo in syscall name in title

Quoted 10 lines
---
 man/man2/fanotify_init.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Since Linux 5.13, the following interfaces can be used to control the amount of kernel resources consumed by fanotify:

man/man2/fanotify_init.2 +0 -0
index e5f9cbf298ee..51c7d61fd86d 100644

man/man2/fanotify_init.2 for additional details.

Quoted 9 lines
man/man2/fanotify_init.2 +1 -2
@@ -295,7 +295,7 @@ for additional details.
 This is a synonym for
 .RB ( FAN_REPORT_DIR_FID | FAN_REPORT_NAME ).
 .TP
-.BR FAN_REPORT_TARGET_FID " (since Linux 5.17)"
+.BR FAN_REPORT_TARGET_FID " (since Linux 5.17, 5.15.154, and 5.10.220)"
 .\" commit d61fd650e9d206a71fda789f02a1ced4b19944c4
 Events for fanotify groups initialized with this flag
 will contain additional information about the child
--

I think that is also needed for
FAN_REPORT_PIDFD (since Linux 5.15)
that was backported to 5.10.y?

There's also:
VERSIONS
Prior to Linux 5.13, calling fanotify_init() required the
CAP_SYS_ADMIN capability.
Since Linux 5.13, users may call fanotify_init() without the
CAP_SYS_ADMIN capability
to create and initialize an fanotify group with limited functionality.

and in fanotify.7 there is:
Since Linux 5.13, the following interfaces can be used to
control the amount
of kernel resources consumed by fanotify...

Both these changes from 5.13 were backported to 5.10.y.

Thanks,
Amir.

Reviewed-by on v1 1/2
#3 lore raw
In reply to [email protected]
Quoted 4 lines · On Fri, Jul 12, 2024 at 8:57 PM <[email protected]> wrote:

From: Chuck Lever <[email protected]>

Apart from misspelling the syscall in title

Quoted 47 lines
---
 man/man2/fanotify_mark.2 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
man/man2/fanotify_mark.2 +4 -5
index f3fce0c4e4c4..edeadc883029 100644
@@ -176,7 +176,7 @@ the update fails with
 .B EEXIST
 error.
 .TP
-.BR FAN_MARK_IGNORE " (since Linux 6.0)"
+.BR FAN_MARK_IGNORE " (since Linux 6.0, 5.15.154, and 5.10.220)"
 .\" commit e252f2ed1c8c6c3884ab5dd34e003ed21f1fe6e0
 This flag has a similar effect as setting the
 .B FAN_MARK_IGNORED_MASK
@@ -271,7 +271,7 @@ error.
 This is a synonym for
 .RB ( FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY ).
 .TP
-.BR FAN_MARK_EVICTABLE " (since Linux 5.19)"
+.BR FAN_MARK_EVICTABLE " (since Linux 5.19, 5.15.154, and 5.10.220)"
 .\" commit 5f9d3bd520261fd7a850818c71809fd580e0f30c
 When an inode mark is created with this flag,
 the inode object will not be pinned to the inode cache,
@@ -362,7 +362,7 @@ Create an event when a marked file or directory itself is deleted.
 An fanotify group that identifies filesystem objects by file handles
 is required.
 .TP
-.BR FAN_FS_ERROR " (since Linux 5.16)"
+.BR FAN_FS_ERROR " (since Linux 5.16, 5.15.154, and 5.10.220)"
 .\" commit 9709bd548f11a092d124698118013f66e1740f9b
 Create an event when a filesystem error
 leading to inconsistent filesystem metadata is detected.
@@ -399,7 +399,7 @@ directory.
 An fanotify group that identifies filesystem objects by file handles
 is required.
 .TP
-.BR FAN_RENAME " (since Linux 5.17)"
+.BR FAN_RENAME " (since Linux 5.17, 5.15.154, and 5.10.220)"
 .\" commit 8cc3b1ccd930fe6971e1527f0c4f1bdc8cb56026
 This event contains the same information provided by events
 .B FAN_MOVED_FROM
--

2.45.1