bpf/umd possible deadcode
cover bpf/umd possible deadcode
From: "Dr. David Alan Gilbert" <[email protected]>
Hi,
I'm not 100% sure about these, since I'm not quite
sure how to test it properly.
As far as I can tell the UMD isn't needed by bpf itself
any more; so I've got one patch that just removes that select. But then that leaves no users of umd itself; and I split that separately since I saw there was still some discussion this year on other uses.
Dave
Dr. David Alan Gilbert (2):
bpf: Don't select USERMODE_DRIVER
umd: Remove
include/linux/usermode_driver.h | 19 ---- kernel/Makefile | 1 - kernel/bpf/preload/Kconfig | 5 - kernel/usermode_driver.c | 191 -------------------------------- 4 files changed, 216 deletions(-) delete mode 100644 include/linux/usermode_driver.h delete mode 100644 kernel/usermode_driver.c
Signature · 1 line
2.47.0
PATCH 1/2 bpf: Don't select USERMODE_DRIVER
From: "Dr. David Alan Gilbert" <[email protected]>
USERMODE_DRIVER isn't neede dby BPF_PRELOAD anymore since commit cb80ddc67152 ("bpf: Convert bpf_preload.ko to use light skeleton.")
Remove the depend Kconfig.
--- 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.47.0
PATCH 2/2 umd: Remove
In reply to [email protected]From: "Dr. David Alan Gilbert" <[email protected]>
The last use of the usermode driver code was removed by commit 98e20e5e13d2 ("bpfilter: remove bpfilter")
Remove the code.
--- include/linux/usermode_driver.h | 19 ---- kernel/Makefile | 1 - kernel/bpf/preload/Kconfig | 4 - kernel/usermode_driver.c | 191 -------------------------------- 4 files changed, 215 deletions(-) delete mode 100644 include/linux/usermode_driver.h delete mode 100644 kernel/usermode_driver.c
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.47.0
Quoted 7 lines · * [email protected] ([email protected]) wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
Hi,
I'm not 100% sure about these, since I'm not quite
sure how to test it properly.
Quoted 5 lines
As far as I can tell the UMD isn't needed by bpf itself
any more; so I've got one patch that just removes that select. But then that leaves no users of umd itself; and I split that separately since I saw there was still some discussion this year on other uses.
Hi,
Does anyone have any views on this pair?
Thanks,
Dave
Quoted 19 lines
Signed-off-by Dr. David Alan Gilbert <[email protected]>Dave
Dr. David Alan Gilbert (2):
bpf: Don't selectUSERMODE_DRIVER
umd: Removeinclude/linux/usermode_driver.h | 19 ---- kernel/Makefile | 1 - kernel/bpf/preload/Kconfig | 5 - kernel/usermode_driver.c | 191 -------------------------------- 4 files changed, 216 deletions(-) delete mode 100644 include/linux/usermode_driver.h delete mode 100644 kernel/usermode_driver.cSignature · 1 line
2.47.0
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/