Skip to contentSkip to conversation

netlink: Remove the include of files doesn't exist

PATCH In review I Hsin Cheng 2 participants 2 messages Apr 5, 2024 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: Remove the include of files doesn't exist

The file for /security/selinux/security.h and the file for /include/linux/selinux_netlink.h are no long exist. However the preprocessor still performs the inclusion of those files, these behaviors should be removed to ensure it's bug-free.

---
 security/selinux/netlink.c | 2 --
 1 file changed, 2 deletions(-)
security/selinux/netlink.c +0 -2
index 1760aee71..8ce36abaa 100644
@@ -13,11 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/export.h>
 #include <linux/skbuff.h>
-#include <linux/selinux_netlink.h>
 #include <net/net_namespace.h>
 #include <net/netlink.h>
 
-#include "security.h"
 
 static struct sock *selnl __ro_after_init;
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 7 lines · I Hsin Cheng

The file for /security/selinux/security.h and the file for /include/linux/selinux_netlink.h are no long exist. However the preprocessor still performs the inclusion of those files, these behaviors should be removed to ensure it's bug-free.

NAK. You are incorrect on both counts and evidently didn't try compiling. At a purely source level, I agree it might look confusing, but the Makefile adds the security/selinux/include directory (where security.h lives) to the include path and selinux_netlink.h lives under include/uapi/linux which is auto-magically included.

Quoted 23 lines
---
 security/selinux/netlink.c | 2 --
 1 file changed, 2 deletions(-)
security/selinux/netlink.c +0 -3
index 1760aee71..8ce36abaa 100644
@@ -13,11 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/export.h>
 #include <linux/skbuff.h>
-#include <linux/selinux_netlink.h>
 #include <net/net_namespace.h>
 #include <net/netlink.h>
 
-#include "security.h"
 
 static struct sock *selnl __ro_after_init;
 
--

2.34.1