[LTP] [PATCH v1] security/dirtyc0w_shmem: Add new test for CVE-2022-2590
Petr Vorel
pvorel@suse.cz
Fri Nov 25 13:02:18 CET 2022
> > > +static void cleanup(void)
> > > +{
> > > + SAFE_UMOUNT(TMP_DIR);
> > > +}
> > > +
> > > +static struct tst_test test = {
> > > + .needs_checkpoints = 1,
> > > + .forks_child = 1,
> > > + .needs_root = 1,
> > We are missing .needs_tmpdir flag here, otherwise the test will create
> > the the TMPDIR in PWD which may fail in certain setups.
> I just noticed that compilation now says:
> testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c: useless tag:
> needs_tmpdir
Good catch.
> So is "needs_tmpdir" indeed usless or are we missing something else?
Although not printing which tags implying .needs_tmpdir is a bit confusing,
the warning is correct - .needs_checkpoints implies .needs_tmpdir
https://github.com/linux-test-project/ltp/blob/e814430fad2e976e4a40c9d2de9e39401456d8eb/metadata/metaparse.c#L797-L806
Kind regards,
Petr
More information about the ltp
mailing list