umd: Remove usermode driver framework
cover umd: Remove usermode driver framework
The code is unused, remove it.
---
Thomas Weißschuh (2):
bpf/preload: Don't select USERMODE_DRIVER
umd: Remove usermode driver framework
include/linux/usermode_driver.h | 19 ---- kernel/Makefile | 1 - kernel/bpf/preload/Kconfig | 5 -- kernel/usermode_driver.c | 191 ---------------------------------------- 4 files changed, 216 deletions(-)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250721-remove-usermode-driver-aecfe2950c59
Best regards,
Signature · 1 line
Thomas Weißschuh <[email protected]>
PATCH 1/2 bpf/preload: Don't select USERMODE_DRIVER
The usermode driver framework is not used anymore by the BPF preload code.
--- kernel/bpf/preload/Kconfig | 1 - 1 file changed, 1 deletion(-)
kernel/bpf/preload/Kconfig +0 -1
@@ -10,7 +10,6 @@ menuconfig BPF_PRELOAD # The dependency on !COMPILE_TEST prevents it from being enabled # in allmodconfig or allyesconfig configurations depends on !COMPILE_TEST - select USERMODE_DRIVER help This builds kernel module with several embedded BPF programs that are pinned into BPF FS mount point as human readable files that are
Signature · 1 line
2.50.1
Re: [PATCH bpf-next 1/2] bpf/preload: Don't select USERMODE_DRIVER
Looks good:
PATCH 2/2 umd: Remove usermode driver framework
In reply to Thomas WeißschuhThe code is unused since commit 98e20e5e13d2 ("bpfilter: remove bpfilter"), remove it.
--- include/linux/usermode_driver.h | 19 ---- kernel/Makefile | 1 - kernel/bpf/preload/Kconfig | 4 - kernel/usermode_driver.c | 191 ---------------------------------------- 4 files changed, 215 deletions(-)
include/linux/usermode_driver.h deleted +0 -19
@@ -1,19 +0,0 @@ -#ifndef __LINUX_USERMODE_DRIVER_H__ -#define __LINUX_USERMODE_DRIVER_H__ - -#include <linux/umh.h> -#include <linux/path.h> - -struct umd_info { -const char *driver_name; -struct file *pipe_to_umh; -struct file *pipe_from_umh; -struct path wd; -struct pid *tgid; -}; -int umd_load_blob (struct umd_info *info,const void *data,size_t len); -int umd_unload_blob (struct umd_info *info); -int fork_usermode_driver (struct umd_info *info); -void umd_cleanup_helper (struct umd_info *info); - -#endif /* __LINUX_USERMODE_DRIVER_H__ */
kernel/Makefile +0 -1
@@ -12,7 +12,6 @@ obj-y = fork.o exec_domain.o panic.o \ notifier.o ksysfs.o cred.o reboot.o \ async.o range.o smpboot.o ucount.o regset.o ksyms_common.o -obj-$(CONFIG_USERMODE_DRIVER) += usermode_driver.o obj-$(CONFIG_MULTIUSER) += groups.o obj-$(CONFIG_VHOST_TASK) += vhost_task.o
kernel/bpf/preload/Kconfig +0 -4
@@ -1,8 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -config USERMODE_DRIVER - bool - default n - menuconfig BPF_PRELOAD bool "Preload BPF file system with kernel specific program and map iterators" depends on BPF
kernel/usermode_driver.c deleted +0 -191
191 lines not on this page · raw message
Signature · 1 line
2.50.1
Quoted 3 lines · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"), remove it.
Correct, but we have plans to use it.
Since it's not causing any problems we prefer to keep it to avoid reverting the removal later.
Quoted 9 lines · Alexei Starovoitov
Quoted 3 lines · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"), remove it.Correct, but we have plans to use it.
Since it's not causing any problems we prefer to keep it to avoid reverting the removal later.
Plans to eventually use something are no reason to keep code that's been unused for almost 2 years around. Unless the removal would conflict with currently queued up in linux-next code it is always better to just drop it and reinstate it when (or rather usually IFF) it is used again.
Eric W. Biederman
Acked-byQuoted 7 lines · Christoph Hellwig
Quoted 6 lines · Alexei Starovoitov
Quoted 3 lines · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"), remove it.
Quoted 8 lines
Quoted 3 lines
Correct, but we have plans to use it.
Since it's not causing any problems we prefer to keep it to avoid reverting the removal later.Plans to eventually use something are no reason to keep code that's been unused for almost 2 years around. Unless the removal would conflict with currently queued up in linux-next code it is always better to just drop it and reinstate it when (or rather usually IFF) it is used again.
I wonder if those are the same plans that existed in June of 2020 when I split out the usermode driver code from user mode helper?
As far as I know this code has never been seriously used, so I am in favor of simplifying the maintenance burden.
Eric
Quoted 1 line · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"),
Overly long commit message here.
Quoted 1 line
remove it.
Otherwise looks good:
Quoted 4 lines · Christoph Hellwig
Quoted 1 line · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"),Overly long commit message here.
75 characters are allowed, no?
Quoted 5 lines
Quoted 1 line
remove it.
Otherwise looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Thanks!
Quoted 7 lines · Thomas Weißschuh
Quoted 4 lines · Christoph Hellwig
Quoted 1 line · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"),Overly long commit message here.
75 characters are allowed, no?
73.
Quoted 10 lines · Christoph Hellwig
Quoted 7 lines · Thomas Weißschuh
Quoted 4 lines · Christoph Hellwig
Quoted 1 line · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"),Overly long commit message here.
75 characters are allowed, no?
73.
Documentation/process/submitting-patches.rst:
The canonical patch message body contains the following:
(...)
- The body of the explanation, line wrapped at 75 columns, which will be copied to the permanent changelog to describe this patch.
scripts/checkpatch.pl:
# Check for line lengths > 75 in commit log, warn once
if ($in_commit_log && !$commit_log_long_line &&
length($line) > 75 &&
(...)) {
WARN("COMMIT_LOG_LONG_LINE",
"Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);
$commit_log_long_line = 1;
}What am I missing?
Quoted 8 lines · Thomas Weißschuh
Documentation/process/submitting-patches.rst:The canonical patch message body contains the following:
(...)
- The body of the explanation, line wrapped at 75 columns, which will be copied to the permanent changelog to describe this patch.
Hmm, weird. I always through we stuck to the usual email length, because in the end that's what commit messages actually are.
But I guess I was wrong, at least since people added this.
Quoted 10 lines · Christoph Hellwig
Quoted 1 line · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"),Overly long commit message here.
Quoted 1 line
remove it.
Otherwise looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 7 lines · Christian Brauner
Quoted 5 lines · Christoph Hellwig
Quoted 1 line · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"),Overly long commit message here.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
remove it.
Otherwise looks good:
Reviewed-by Christoph Hellwig <[email protected]>Reviewed-by Christian Brauner <[email protected]>
Fair enough. Democracy wins.
Will apply once I'm back from pto.
Christian Brauner
maintainerQuoted 10 lines · Alexei Starovoitov
Quoted 9 lines · Christian Brauner
Quoted 7 lines · Christoph Hellwig
Quoted 1 line · Thomas Weißschuh
The code is unused since commit
98e20e5e13d2("bpfilter: remove bpfilter"),Overly long commit message here.
Quoted 1 line
remove it.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Otherwise looks good:
Reviewed-by Christoph Hellwig <[email protected]>Reviewed-by Christian Brauner <[email protected]>Fair enough. Democracy wins.
Will apply once I'm back from pto.
Fwiw, I honestly don't care that much. I think the removal makes sense precisely because having unused code is usually not a good idea. If you really want that infra you can always reintroduce it once someone actually ends up using it.
This series was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This series was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Quoted 9 lines · On Mon, 21 Jul 2025 11:04:40 +0200 you wrote:
The code is unused, remove it.
Signed-off-by Thomas Weißschuh <[email protected]>---
Thomas Weißschuh (2):
bpf/preload: Don't selectUSERMODE_DRIVER
umd: Remove usermode driver framework[...]
Here is the summary with links:
- [bpf-next,1/2] bpf/preload: Don't select USERMODE_DRIVER
https://git.kernel.org/bpf/bpf-next/c/2b03164eee20 - [bpf-next,2/2] umd: Remove usermode driver framework https://git.kernel.org/bpf/bpf-next/c/b7b3500bd4ee
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html