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 2/3] fanotify24: print range info for pre-content events
Date: Thu, 27 Mar 2025 11:54:34 +0100 [thread overview]
Message-ID: <20250327105434.GA72472@pevik> (raw)
In-Reply-To: <CAOQ4uxgW8rFNLOXMOQzXMrGXtsVvX6QHKMc8tPrnibra_cCAZA@mail.gmail.com>
Hi Amir, Jan,
> > > @@ -386,6 +388,22 @@ static void test_fanotify(unsigned int n)
> > > (unsigned int)event->pid,
> > > (unsigned int)child_pid,
> > > event->fd);
> > > + } else if (event->mask & LTP_PRE_CONTENT_EVENTS) {
> > You should probably check here that the event->len is sufficiently large to
> > contain the range info. Otherwise 'range' might point beyond the end of
> > event and result in odd behavior...
> Right. feel free to use the amended version below
> > Honza
> > > + if (range->hdr.info_type != FAN_EVENT_INFO_TYPE_RANGE) {
> > > + tst_res(TFAIL,
> > > + "got event: mask=%llx pid=%u fd=%d "
> > > + "(expected range info)",
> > > + (unsigned long long)event->mask,
> > > + (unsigned int)event->pid,
> > > + event->fd);
> if (event->event_len < sizeof(*event) +
> sizeof(*range) ||
> range->hdr.info_type != FAN_EVENT_INFO_TYPE_RANGE) {
> tst_res(TFAIL,
> "got event: mask=%llx pid=%u
> len=%d fd=%d "
> "(expected range info)",
> (unsigned long long)event->mask,
> (unsigned int)event->pid,
> (unsigned int)event->event_len,
> event->fd);
Thanks! I dared instead of copy pasting to use fan_hsm branch from your fork.
Jan, thanks for the review!
Merged the rest of the pachset.
Kind regards,
Petr
> Thanks,
> Amir.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-03-27 10:54 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 [this message]
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
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=20250327105434.GA72472@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.