Skip to contentSkip to conversation

bpf: make inode code explicitly non-modular

PATCH Applied Paul Gortmaker 3 participants 3 messages Jul 11, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: make inode code explicitly non-modular

The Kconfig currently controlling compilation of this code is:

init/Kconfig:config BPF_SYSCALL
init/Kconfig: bool "Enable bpf() system call"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.

Note that MODULE_ALIAS is a no-op for non-modular code.

We replace module.h with init.h since the file does use __init.

---
 kernel/bpf/inode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/bpf/inode.c +1 -3
index 318858edb1cd..5967b870a895 100644
@@ -11,7 +11,7 @@
  * version 2 as published by the Free Software Foundation.
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/magic.h>
 #include <linux/major.h>
 #include <linux/mount.h>
@@ -367,8 +367,6 @@ static struct file_system_type bpf_fs_type = {
 	.kill_sb	= kill_litter_super,
 };
 
-MODULE_ALIAS_FS("bpf");
-
 static int __init bpf_init(void)
 {
 	int ret;
Signature · 1 line
2.8.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Paul Gortmaker

The Kconfig currently controlling compilation of this code is:

init/Kconfig:config BPF_SYSCALL
init/Kconfig: bool "Enable bpf() system call"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.

Quoted 7 lines

Note that MODULE_ALIAS is a no-op for non-modular code.

We replace module.h with init.h since the file does use __init.

(Patch is for net-next tree then.)

maintainer Applied
#2 lore raw
In reply to Paul Gortmaker

From: Paul Gortmaker <[email protected]>
Date: Mon, 11 Jul 2016 12:51:01 -0400

Quoted 10 lines

The Kconfig currently controlling compilation of this code is:

init/Kconfig:config BPF_SYSCALL
init/Kconfig: bool "Enable bpf() system call"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.

Quoted 7 lines

Note that MODULE_ALIAS is a no-op for non-modular code.

We replace module.h with init.h since the file does use __init.

Applied.