lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220830105001.68478-1-wuchi.zero@gmail.com>
Date:   Tue, 30 Aug 2022 18:50:01 +0800
From:   wuchi <wuchi.zero@...il.com>
To:     paul@...l-moore.com, eparis@...hat.com
Cc:     linux-audit@...hat.com, linux-kernel@...r.kernel.org
Subject: [PATCH] audit: remove obvious unnecessary header files

With updating the code, some header files are unnecessary. Remove
obvious header files.

Signed-off-by: wuchi <wuchi.zero@...il.com>
---
 kernel/audit.c          |  3 ---
 kernel/audit_fsnotify.c |  5 -----
 kernel/audit_watch.c    |  4 ----
 kernel/auditfilter.c    |  2 --
 kernel/auditsc.c        | 11 +----------
 5 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index a75978ae38ad..f2caa710524f 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -35,13 +35,10 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/atomic.h>
-#include <linux/mm.h>
-#include <linux/export.h>
 #include <linux/slab.h>
 #include <linux/err.h>
 #include <linux/kthread.h>
 #include <linux/kernel.h>
-#include <linux/syscalls.h>
 #include <linux/spinlock.h>
 #include <linux/rcupdate.h>
 #include <linux/mutex.h>
diff --git a/kernel/audit_fsnotify.c b/kernel/audit_fsnotify.c
index c565fbf66ac8..1b7b1cb7033d 100644
--- a/kernel/audit_fsnotify.c
+++ b/kernel/audit_fsnotify.c
@@ -8,15 +8,10 @@
 
 #include <linux/kernel.h>
 #include <linux/audit.h>
-#include <linux/kthread.h>
-#include <linux/mutex.h>
 #include <linux/fs.h>
 #include <linux/fsnotify_backend.h>
 #include <linux/namei.h>
-#include <linux/netlink.h>
-#include <linux/sched.h>
 #include <linux/slab.h>
-#include <linux/security.h>
 #include "audit.h"
 
 /*
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 65075f1e4ac8..68d1fa42426d 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -9,16 +9,12 @@
 #include <linux/file.h>
 #include <linux/kernel.h>
 #include <linux/audit.h>
-#include <linux/kthread.h>
 #include <linux/mutex.h>
 #include <linux/fs.h>
 #include <linux/fsnotify_backend.h>
 #include <linux/namei.h>
-#include <linux/netlink.h>
 #include <linux/refcount.h>
-#include <linux/sched.h>
 #include <linux/slab.h>
-#include <linux/security.h>
 #include "audit.h"
 
 /*
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 42d99896e7a6..7287c14dfb97 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -12,8 +12,6 @@
 #include <linux/audit.h>
 #include <linux/kthread.h>
 #include <linux/mutex.h>
-#include <linux/fs.h>
-#include <linux/namei.h>
 #include <linux/netlink.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 9f8c05228d6d..57734fea51fb 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -33,27 +33,19 @@
 
 #include <linux/init.h>
 #include <asm/types.h>
-#include <linux/atomic.h>
 #include <linux/fs.h>
 #include <linux/namei.h>
 #include <linux/mm.h>
 #include <linux/export.h>
 #include <linux/slab.h>
-#include <linux/mount.h>
 #include <linux/socket.h>
-#include <linux/mqueue.h>
 #include <linux/audit.h>
 #include <linux/personality.h>
 #include <linux/time.h>
-#include <linux/netlink.h>
-#include <linux/compiler.h>
 #include <asm/unistd.h>
 #include <linux/security.h>
 #include <linux/list.h>
 #include <linux/binfmts.h>
-#include <linux/highmem.h>
-#include <linux/syscalls.h>
-#include <asm/syscall.h>
 #include <linux/capability.h>
 #include <linux/fs_struct.h>
 #include <linux/compat.h>
@@ -61,8 +53,7 @@
 #include <linux/string.h>
 #include <linux/uaccess.h>
 #include <linux/fsnotify_backend.h>
-#include <uapi/linux/limits.h>
-#include <uapi/linux/netfilter/nf_tables.h>
+#include <linux/limits.h>
 #include <uapi/linux/openat2.h> // struct open_how
 
 #include "audit.h"
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ