From: Petr Vorel <pvorel@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/3] fanotify24: add mmap() and user page fault to test
Date: Thu, 20 Mar 2025 18:00:39 +0100 [thread overview]
Message-ID: <20250320170039.GA113087@pevik> (raw)
In-Reply-To: <20250319192742.999506-4-amir73il@gmail.com>
Hi Amir,
> Commit 066e053fe208a ("fsnotify: add pre-content hooks on mmap()")
> in 6.14-rc7 added a pre-content hooh in mmap() before the final release
> of the fsnotify pre-content event feature.
> To test pre-content hook on mmap(), increase the size of the test file
> to 101 pages use mmap() to setup a buffer from the end of the test file.
> Change some of the test cases to allow the write() and use this buffer
> as the input buffer to write(), which tests deadlock avoidance by
> suppresing pre-content hook on user page faults.
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> .../kernel/syscalls/fanotify/fanotify24.c | 41 ++++++++++++++++---
> 1 file changed, 35 insertions(+), 6 deletions(-)
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify24.c b/testcases/kernel/syscalls/fanotify/fanotify24.c
> index 2d2479b39..3a76f2c1b 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify24.c
> +++ b/testcases/kernel/syscalls/fanotify/fanotify24.c
> @@ -46,6 +46,7 @@
> static char fname[BUF_SIZE];
> static char buf[BUF_SIZE];
> static volatile int fd_notify;
> +static size_t page_sz;
> static pid_t child_pid;
> @@ -68,7 +69,8 @@ static struct tcase {
> FAN_OPEN_PERM | FAN_PRE_ACCESS,
> {
> {FAN_OPEN_PERM, FAN_ALLOW},
> - {FAN_PRE_ACCESS, FAN_DENY},
> + {FAN_PRE_ACCESS, FAN_ALLOW},
> + {FAN_PRE_ACCESS, FAN_ALLOW},
If I understand correctly, these doubled FAN_PRE_ACCESS, FAN_ALLOW are for
reusing the write buffer, right? Obviously it's needed but on the first look it
looks like error.
<snip>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-03-20 17:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 19:27 [LTP] [PATCH 0/3] fanotify tests update for 6.14-rc7 Amir Goldstein
2025-03-19 19:27 ` [LTP] [PATCH 1/3] fanotify24: remove redundant event_count field Amir Goldstein
2025-03-24 13:23 ` Jan Kara
2025-03-25 20:46 ` Petr Vorel
2025-03-19 19:27 ` [LTP] [PATCH 2/3] fanotify24: print range info for pre-content events Amir Goldstein
2025-03-26 15:04 ` Jan Kara
2025-03-27 9:11 ` Amir Goldstein
2025-03-27 10:54 ` Petr Vorel
2025-03-27 17:15 ` Amir Goldstein
2025-03-19 19:27 ` [LTP] [PATCH 3/3] fanotify24: add mmap() and user page fault to test Amir Goldstein
2025-03-20 17:00 ` Petr Vorel [this message]
2025-03-20 17:42 ` Amir Goldstein
2025-03-20 18:18 ` Petr Vorel
2025-03-26 15:08 ` Jan Kara
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=20250320170039.GA113087@pevik \
--to=pvorel@suse.cz \
--cc=amir73il@gmail.com \
--cc=jack@suse.cz \
--cc=ltp@lists.linux.it \
/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