Re: [PATCH v5 06/15] fs,fork,exit: export symbols necessary for KUnit UAPI support

From: Thomas Weißschuh
Date: Mon Jul 21 2025 - 02:43:04 EST


On Fri, Jul 18, 2025 at 05:44:12PM +0100, Al Viro wrote:
> On Thu, Jul 17, 2025 at 10:48:08AM +0200, Thomas Weißschuh wrote:
> > The KUnit UAPI infrastructure starts userspace processes.
> > As it should be able to be built as a module, export the necessary symbols.
> >
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
>
> No. This is just plain wrong. This is way too low-level; teach kernel/umh.c
> to provide what you need, but do *not* add more kernel_execve() callers.

Sounds good.

> And the situation with ramfs needs cleaning up, but "export put_filesystem()"
> is not a solution.

Cleaning up would mean to stop calling put_filesystem(), as it is a no-op
here anyways, right?


This would still leave the exports for replace_fd(), create_pipe_files()
and set_fs_pwd(). Instead of using kernel/umh.c, I can also extend
kernel/usermode_driver.c to provide these in a way that works for me.
But kernel/usermode_driver.c is dead code, unused since commit
98e20e5e13d2 ("bpfilter: remove bpfilter")
Would it be fine to export those symbols? And delete usermode_driver.c,
as carrying around an unused generic framework seems pointless.


Thomas