[LTP] [PATCH v3 3/4] tst_kconfig: add module mappings for vsock/vsock_loopback

Andrea Cervesato andrea.cervesato@suse.com
Wed Oct 14 09:13:27 CEST 2026


> On Mon, Oct 12, 2026 at 03:51:32PM +0000, Andrea Cervesato wrote:
> > Hi Li,
> > 
> > > The test needs root only to load the modules; the reproducer runs as
> > > an ordinary nonroot process in the initial namespace, which can use
> > > loopback VSOCK on nonprivileged ports. Drop privileges to nobody after
> > > module loading and regain root in cleanup() so the modules can be
> > > unloaded.
> > 
> > Please drop the root _only_ if we are root, we shouldn'f force the test
> > to be root always, even when we are user.
> 
> After thinking it over, I'd prefer to leave this patch unchanged:
> 
> The test does need root, but not for the reproducer itself -- it needs
> root for setup and cleanup:
> 
>   - loading vsock_loopback requires CAP_SYS_MODULE;
>   - unloading it in cleanup() also requires CAP_SYS_MODULE.

yeah we need root for that. This is something we can't workaround.

So I would just avoid defining functions we use once. We can simply merge
them with setup/cleanup and keep the needs_root = 1.

Kind Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list