public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ppavlu@suse.cz, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] Add test for fanotify monitoring of tracing filesystem
Date: Tue, 24 Feb 2026 15:31:42 +0100	[thread overview]
Message-ID: <20260224143142.GA64233@pevik> (raw)
In-Reply-To: <784652f2-788f-4108-a6da-18f4f1b613e5@suse.cz>

> Hi!

> On 2/24/26 14:40, Petr Vorel wrote:
> > > +static void setup(void)
> > > +{
> > > +	if (tst_fs_type(MNTPOINT) != TST_TRACEFS_MAGIC) {
> > > +		SAFE_MOUNT("tracefs", MNTPOINT, "tracefs",
> > > +			MS_NODEV | MS_NOEXEC | MS_NOSUID, NULL);

> > I see possible mounting is the reason...

> > > +		unmount_needed = 1;
> > > +	}
> > > +
> > > +	if (access(EVENTS_SYSFILE, F_OK))
> > > +		tst_brk(TCONF, "Kprobe events not supported by kernel");

> > ... why we cannot check /sys/kernel/tracing/kprobe_events presence via
> > .save_restore.

> Well, yes, tracefs may need to be mounted during test setup. But
> .save_restore also assumes that sysfiles contain only one line while
> kprobe_events may hold arbitrarily long kprobe list. Also note that the
> restore function opens the sysfile with O_TRUNC, which might wipe all
> existing kprobes before creating them again. Therefore I've decided to check
> the file availability in setup() and send a targeted kprobe delete command
> instead of saving and restoring the whole sysfile.

Makes sense. Thanks for info.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-02-24 14:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20 15:47 [LTP] [PATCH 0/2] Add test for fanotify monitoring of tracefs Martin Doucha
2026-02-20 15:47 ` [LTP] [PATCH 1/2] tst_fs.h: Add TST_TRACEFS_MAGIC constant Martin Doucha
2026-02-24 13:32   ` Petr Vorel
2026-02-24 14:41   ` Andrea Cervesato via ltp
2026-02-20 15:47 ` [LTP] [PATCH 2/2] Add test for fanotify monitoring of tracing filesystem Martin Doucha
2026-02-23 16:30   ` Cyril Hrubis
2026-02-23 16:54     ` Amir Goldstein
2026-02-26 11:33     ` Jan Kara
2026-02-24 13:40   ` Petr Vorel
2026-02-24 14:06     ` Martin Doucha
2026-02-24 14:31       ` Petr Vorel [this message]
2026-02-24 14:41   ` Andrea Cervesato via ltp
2026-02-26 12:00 ` [LTP] [PATCH 0/2] Add test for fanotify monitoring of tracefs Andrea Cervesato via ltp

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=20260224143142.GA64233@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    --cc=ppavlu@suse.cz \
    /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