Re: [LTP] syscalls: add v7.3 syscall numbers

Andrea Cervesato via ltp <[email protected]>
Newsgroups it.linux.lists.ltp
Message-ID <[email protected]>
> Could this subject be prefixed with [STAGING]? Linux 7.2 is the latest
> stable release, while this test targets fchroot() from Linux 7.3.

Please ignore this, it's handled by patchwork and there's no way to obtain it.

> >  * :manpage:`fchroot(2) `was introduced in Linux v7.3.
> 
> Could the space be moved after the closing backtick? As written, it becomes
> part of the man-page role target.

will fix before merge.

> > 	off += snprintf(upwards + off, sizeof(upwards) - off, "/..");
> 
> Could truncation be handled here? LTP accepts an arbitrary absolute TMPDIR.
> With a sufficiently deep path, off grows past sizeof(upwards), the size
> subtraction underflows, and the next iteration passes an out-of-bounds
> pointer and a huge size to snprintf().

this can be fixed indeed.

> > 	SAFE_STAT(tst_tmpdir_path(), &st);
> > 	TST_EXP_EXPR(st.st_dev == realcwd.st_dev &&
> > 		st.st_ino == realcwd.st_ino,
> > 		"working directory restored after setns()");
> 
> Could this stat "." and compare it with realroot instead? mntns_install()
> sets both fs->pwd and fs->root to the mount namespace root. Calling stat on
> an absolute tmpdir path succeeds regardless of the current working directory,
> so a regression that leaves pwd unchanged would pass this check.

this is funny, it was "." before and it was complaining. I will use "." before
merge.

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.