* [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-30 10:50 ` wuchi
0 siblings, 0 replies; 14+ messages in thread
From: wuchi @ 2022-08-30 10:50 UTC (permalink / raw)
To: paul, eparis; +Cc: linux-audit, linux-kernel
With updating the code, some header files are unnecessary. Remove
obvious header files.
Signed-off-by: wuchi <wuchi.zero@gmail.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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-30 10:50 ` wuchi
0 siblings, 0 replies; 14+ messages in thread
From: wuchi @ 2022-08-30 10:50 UTC (permalink / raw)
To: paul, eparis; +Cc: linux-audit, linux-kernel
With updating the code, some header files are unnecessary. Remove
obvious header files.
Signed-off-by: wuchi <wuchi.zero@gmail.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
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
2022-08-30 10:50 ` wuchi
@ 2022-08-30 17:04 ` Paul Moore
-1 siblings, 0 replies; 14+ messages in thread
From: Paul Moore @ 2022-08-30 17:04 UTC (permalink / raw)
To: wuchi; +Cc: eparis, linux-audit, linux-kernel
On Tue, Aug 30, 2022 at 6:50 AM wuchi <wuchi.zero@gmail.com> wrote:
>
> With updating the code, some header files are unnecessary. Remove
> obvious header files.
>
> Signed-off-by: wuchi <wuchi.zero@gmail.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(-)
Hi Wuchi, can you explain what process you used to determine that
these header file includes were unnecessary?
--
paul-moore.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-30 17:04 ` Paul Moore
0 siblings, 0 replies; 14+ messages in thread
From: Paul Moore @ 2022-08-30 17:04 UTC (permalink / raw)
To: wuchi; +Cc: linux-audit, linux-kernel, eparis
On Tue, Aug 30, 2022 at 6:50 AM wuchi <wuchi.zero@gmail.com> wrote:
>
> With updating the code, some header files are unnecessary. Remove
> obvious header files.
>
> Signed-off-by: wuchi <wuchi.zero@gmail.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(-)
Hi Wuchi, can you explain what process you used to determine that
these header file includes were unnecessary?
--
paul-moore.com
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
2022-08-30 10:50 ` wuchi
@ 2022-08-30 21:17 ` kernel test robot
-1 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2022-08-30 21:17 UTC (permalink / raw)
To: wuchi, paul, eparis; +Cc: kbuild-all, linux-audit, linux-kernel
Hi wuchi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pcmoore-audit/next]
[also build test ERROR on linus/master v6.0-rc3 next-20220830]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next
config: sh-randconfig-m041-20220830 (https://download.01.org/0day-ci/archive/20220831/202208310505.EyxcPqGV-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/f693f8ef00782656e1a94129e11611d410914905
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
git checkout f693f8ef00782656e1a94129e11611d410914905
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/sched/signal.h:14,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from kernel/auditsc.c:36:
kernel/auditsc.c: In function 'audit_seccomp':
>> arch/sh/include/asm/ptrace.h:127:30: error: implicit declaration of function 'task_stack_page'; did you mean 'task_stack_vm_area'? [-Werror=implicit-function-declaration]
127 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
| ^~~~~~~~~~~~~~~
arch/sh/include/asm/processor_32.h:185:25: note: in expansion of macro 'task_pt_regs'
185 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
| ^~~~~~~~~~~~
kernel/auditsc.c:2987:47: note: in expansion of macro 'KSTK_EIP'
2987 | in_compat_syscall(), KSTK_EIP(current), code);
| ^~~~~~~~
cc1: some warnings being treated as errors
vim +127 arch/sh/include/asm/ptrace.h
34d0b5af50a063 arch/sh/include/asm/ptrace.h Paul Mundt 2009-12-28 122
c84b51e65ea2f2 arch/sh/include/asm/ptrace.h Paul Gortmaker 2011-07-31 123 extern void ptrace_triggered(struct perf_event *bp,
34d0b5af50a063 arch/sh/include/asm/ptrace.h Paul Mundt 2009-12-28 124 struct perf_sample_data *data, struct pt_regs *regs);
34d0b5af50a063 arch/sh/include/asm/ptrace.h Paul Mundt 2009-12-28 125
3cf0f4ece9f168 include/asm-sh/ptrace.h Al Viro 2006-01-12 126 #define task_pt_regs(task) \
4f099ebb27211d arch/sh/include/asm/ptrace.h Magnus Damm 2009-02-23 @127 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
3cf0f4ece9f168 include/asm-sh/ptrace.h Al Viro 2006-01-12 128
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-30 21:17 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2022-08-30 21:17 UTC (permalink / raw)
To: wuchi, paul, eparis; +Cc: linux-audit, kbuild-all, linux-kernel
Hi wuchi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pcmoore-audit/next]
[also build test ERROR on linus/master v6.0-rc3 next-20220830]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next
config: sh-randconfig-m041-20220830 (https://download.01.org/0day-ci/archive/20220831/202208310505.EyxcPqGV-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/f693f8ef00782656e1a94129e11611d410914905
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
git checkout f693f8ef00782656e1a94129e11611d410914905
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/sched/signal.h:14,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from kernel/auditsc.c:36:
kernel/auditsc.c: In function 'audit_seccomp':
>> arch/sh/include/asm/ptrace.h:127:30: error: implicit declaration of function 'task_stack_page'; did you mean 'task_stack_vm_area'? [-Werror=implicit-function-declaration]
127 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
| ^~~~~~~~~~~~~~~
arch/sh/include/asm/processor_32.h:185:25: note: in expansion of macro 'task_pt_regs'
185 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
| ^~~~~~~~~~~~
kernel/auditsc.c:2987:47: note: in expansion of macro 'KSTK_EIP'
2987 | in_compat_syscall(), KSTK_EIP(current), code);
| ^~~~~~~~
cc1: some warnings being treated as errors
vim +127 arch/sh/include/asm/ptrace.h
34d0b5af50a063 arch/sh/include/asm/ptrace.h Paul Mundt 2009-12-28 122
c84b51e65ea2f2 arch/sh/include/asm/ptrace.h Paul Gortmaker 2011-07-31 123 extern void ptrace_triggered(struct perf_event *bp,
34d0b5af50a063 arch/sh/include/asm/ptrace.h Paul Mundt 2009-12-28 124 struct perf_sample_data *data, struct pt_regs *regs);
34d0b5af50a063 arch/sh/include/asm/ptrace.h Paul Mundt 2009-12-28 125
3cf0f4ece9f168 include/asm-sh/ptrace.h Al Viro 2006-01-12 126 #define task_pt_regs(task) \
4f099ebb27211d arch/sh/include/asm/ptrace.h Magnus Damm 2009-02-23 @127 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
3cf0f4ece9f168 include/asm-sh/ptrace.h Al Viro 2006-01-12 128
--
0-DAY CI Kernel Test Service
https://01.org/lkp
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
2022-08-30 10:50 ` wuchi
@ 2022-08-30 21:58 ` kernel test robot
-1 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2022-08-30 21:58 UTC (permalink / raw)
To: wuchi, paul, eparis; +Cc: kbuild-all, linux-audit, linux-kernel
Hi wuchi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pcmoore-audit/next]
[also build test ERROR on linus/master v6.0-rc3 next-20220830]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next
config: arm-randconfig-r015-20220830 (https://download.01.org/0day-ci/archive/20220831/202208310549.y7u0iX8g-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/f693f8ef00782656e1a94129e11611d410914905
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
git checkout f693f8ef00782656e1a94129e11611d410914905
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/prefetch.h:15,
from arch/arm/include/asm/atomic.h:12,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/lock.h:5,
from arch/arm/include/asm/bitops.h:245,
from include/linux/bitops.h:67,
from include/linux/log2.h:12,
from include/asm-generic/div64.h:55,
from arch/arm/include/asm/div64.h:107,
from include/linux/math.h:6,
from include/linux/math64.h:6,
from include/linux/time64.h:5,
from include/linux/restart_block.h:10,
from include/linux/thread_info.h:14,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from kernel/auditsc.c:36:
kernel/auditsc.c: In function 'audit_seccomp':
>> arch/arm/include/asm/processor.h:90:47: error: implicit declaration of function 'task_stack_page'; did you mean 'task_stack_vm_area'? [-Werror=implicit-function-declaration]
90 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
| ^~~~~~~~~~~~~~~
arch/arm/include/asm/processor.h:92:25: note: in expansion of macro 'task_pt_regs'
92 | #define KSTK_EIP(tsk) task_pt_regs(tsk)->ARM_pc
| ^~~~~~~~~~~~
kernel/auditsc.c:2987:47: note: in expansion of macro 'KSTK_EIP'
2987 | in_compat_syscall(), KSTK_EIP(current), code);
| ^~~~~~~~
cc1: some warnings being treated as errors
vim +90 arch/arm/include/asm/processor.h
^1da177e4c3f41 include/asm-arm/processor.h Linus Torvalds 2005-04-16 88
815d5ec86eb8d5 include/asm-arm/processor.h Al Viro 2006-01-12 89 #define task_pt_regs(p) \
32d39a9355780b include/asm-arm/processor.h Al Viro 2006-01-12 @90 ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
815d5ec86eb8d5 include/asm-arm/processor.h Al Viro 2006-01-12 91
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-30 21:58 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2022-08-30 21:58 UTC (permalink / raw)
To: wuchi, paul, eparis; +Cc: linux-audit, kbuild-all, linux-kernel
Hi wuchi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pcmoore-audit/next]
[also build test ERROR on linus/master v6.0-rc3 next-20220830]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next
config: arm-randconfig-r015-20220830 (https://download.01.org/0day-ci/archive/20220831/202208310549.y7u0iX8g-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/f693f8ef00782656e1a94129e11611d410914905
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review wuchi/audit-remove-obvious-unnecessary-header-files/20220830-185249
git checkout f693f8ef00782656e1a94129e11611d410914905
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/prefetch.h:15,
from arch/arm/include/asm/atomic.h:12,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/lock.h:5,
from arch/arm/include/asm/bitops.h:245,
from include/linux/bitops.h:67,
from include/linux/log2.h:12,
from include/asm-generic/div64.h:55,
from arch/arm/include/asm/div64.h:107,
from include/linux/math.h:6,
from include/linux/math64.h:6,
from include/linux/time64.h:5,
from include/linux/restart_block.h:10,
from include/linux/thread_info.h:14,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from kernel/auditsc.c:36:
kernel/auditsc.c: In function 'audit_seccomp':
>> arch/arm/include/asm/processor.h:90:47: error: implicit declaration of function 'task_stack_page'; did you mean 'task_stack_vm_area'? [-Werror=implicit-function-declaration]
90 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
| ^~~~~~~~~~~~~~~
arch/arm/include/asm/processor.h:92:25: note: in expansion of macro 'task_pt_regs'
92 | #define KSTK_EIP(tsk) task_pt_regs(tsk)->ARM_pc
| ^~~~~~~~~~~~
kernel/auditsc.c:2987:47: note: in expansion of macro 'KSTK_EIP'
2987 | in_compat_syscall(), KSTK_EIP(current), code);
| ^~~~~~~~
cc1: some warnings being treated as errors
vim +90 arch/arm/include/asm/processor.h
^1da177e4c3f41 include/asm-arm/processor.h Linus Torvalds 2005-04-16 88
815d5ec86eb8d5 include/asm-arm/processor.h Al Viro 2006-01-12 89 #define task_pt_regs(p) \
32d39a9355780b include/asm-arm/processor.h Al Viro 2006-01-12 @90 ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
815d5ec86eb8d5 include/asm-arm/processor.h Al Viro 2006-01-12 91
--
0-DAY CI Kernel Test Service
https://01.org/lkp
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
2022-08-30 17:04 ` Paul Moore
@ 2022-08-31 0:20 ` chi wu
-1 siblings, 0 replies; 14+ messages in thread
From: chi wu @ 2022-08-31 0:20 UTC (permalink / raw)
To: Paul Moore; +Cc: eparis, linux-audit, linux-kernel
Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 01:04写道:
>
>
> Hi Wuchi, can you explain what process you used to determine that
> these header file includes were unnecessary?
When reading the code, if I don't found the user of the *.h in the *.c
file,I will think that is unnecessary. For example, #include
<linux/kthread.h> in the audit.c, I don't found the use of kthread* in
the file.
But, I just build that without "W=1 " , the after test robot show that I
was wrong. and I don't sure that if it is true to remove some header
files.
thanks
wuchi
>
> --
> paul-moore.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-31 0:20 ` chi wu
0 siblings, 0 replies; 14+ messages in thread
From: chi wu @ 2022-08-31 0:20 UTC (permalink / raw)
To: Paul Moore; +Cc: linux-audit, linux-kernel, eparis
Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 01:04写道:
>
>
> Hi Wuchi, can you explain what process you used to determine that
> these header file includes were unnecessary?
When reading the code, if I don't found the user of the *.h in the *.c
file,I will think that is unnecessary. For example, #include
<linux/kthread.h> in the audit.c, I don't found the use of kthread* in
the file.
But, I just build that without "W=1 " , the after test robot show that I
was wrong. and I don't sure that if it is true to remove some header
files.
thanks
wuchi
>
> --
> paul-moore.com
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
2022-08-31 0:20 ` chi wu
@ 2022-08-31 0:49 ` Paul Moore
-1 siblings, 0 replies; 14+ messages in thread
From: Paul Moore @ 2022-08-31 0:49 UTC (permalink / raw)
To: chi wu; +Cc: eparis, linux-audit, linux-kernel
On Tue, Aug 30, 2022 at 8:20 PM chi wu <wuchi.zero@gmail.com> wrote:
> Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 01:04写道:
> >
> >
> > Hi Wuchi, can you explain what process you used to determine that
> > these header file includes were unnecessary?
>
> When reading the code, if I don't found the user of the *.h in the *.c
> file,I will think that is unnecessary. For example, #include
> <linux/kthread.h> in the audit.c, I don't found the use of kthread* in
> the file.
> But, I just build that without "W=1 " , the after test robot show that I
> was wrong. and I don't sure that if it is true to remove some header
> files.
Yes, I would recommend that you focus your time and energy on other
tasks within the Linux Kernel. I'm very happy to see patches which
improve the audit subsystem, but I don't believe verifying the header
file usage is a good use of time at this point.
--
paul-moore.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-31 0:49 ` Paul Moore
0 siblings, 0 replies; 14+ messages in thread
From: Paul Moore @ 2022-08-31 0:49 UTC (permalink / raw)
To: chi wu; +Cc: linux-audit, linux-kernel, eparis
On Tue, Aug 30, 2022 at 8:20 PM chi wu <wuchi.zero@gmail.com> wrote:
> Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 01:04写道:
> >
> >
> > Hi Wuchi, can you explain what process you used to determine that
> > these header file includes were unnecessary?
>
> When reading the code, if I don't found the user of the *.h in the *.c
> file,I will think that is unnecessary. For example, #include
> <linux/kthread.h> in the audit.c, I don't found the use of kthread* in
> the file.
> But, I just build that without "W=1 " , the after test robot show that I
> was wrong. and I don't sure that if it is true to remove some header
> files.
Yes, I would recommend that you focus your time and energy on other
tasks within the Linux Kernel. I'm very happy to see patches which
improve the audit subsystem, but I don't believe verifying the header
file usage is a good use of time at this point.
--
paul-moore.com
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
2022-08-31 0:49 ` Paul Moore
@ 2022-08-31 1:04 ` chi wu
-1 siblings, 0 replies; 14+ messages in thread
From: chi wu @ 2022-08-31 1:04 UTC (permalink / raw)
To: Paul Moore; +Cc: eparis, linux-audit, linux-kernel
Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 08:49写道:
>
> On Tue, Aug 30, 2022 at 8:20 PM chi wu <wuchi.zero@gmail.com> wrote:
> > Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 01:04写道:
> > >
> > >
> > > Hi Wuchi, can you explain what process you used to determine that
> > > these header file includes were unnecessary?
> >
> > When reading the code, if I don't found the user of the *.h in the *.c
> > file,I will think that is unnecessary. For example, #include
> > <linux/kthread.h> in the audit.c, I don't found the use of kthread* in
> > the file.
> > But, I just build that without "W=1 " , the after test robot show that I
> > was wrong. and I don't sure that if it is true to remove some header
> > files.
>
> Yes, I would recommend that you focus your time and energy on other
> tasks within the Linux Kernel. I'm very happy to see patches which
> improve the audit subsystem, but I don't believe verifying the header
> file usage is a good use of time at this point.
>
thanks very much
> --
> paul-moore.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] audit: remove obvious unnecessary header files
@ 2022-08-31 1:04 ` chi wu
0 siblings, 0 replies; 14+ messages in thread
From: chi wu @ 2022-08-31 1:04 UTC (permalink / raw)
To: Paul Moore; +Cc: linux-audit, linux-kernel, eparis
Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 08:49写道:
>
> On Tue, Aug 30, 2022 at 8:20 PM chi wu <wuchi.zero@gmail.com> wrote:
> > Paul Moore <paul@paul-moore.com> 于2022年8月31日周三 01:04写道:
> > >
> > >
> > > Hi Wuchi, can you explain what process you used to determine that
> > > these header file includes were unnecessary?
> >
> > When reading the code, if I don't found the user of the *.h in the *.c
> > file,I will think that is unnecessary. For example, #include
> > <linux/kthread.h> in the audit.c, I don't found the use of kthread* in
> > the file.
> > But, I just build that without "W=1 " , the after test robot show that I
> > was wrong. and I don't sure that if it is true to remove some header
> > files.
>
> Yes, I would recommend that you focus your time and energy on other
> tasks within the Linux Kernel. I'm very happy to see patches which
> improve the audit subsystem, but I don't believe verifying the header
> file usage is a good use of time at this point.
>
thanks very much
> --
> paul-moore.com
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-08-31 13:13 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 10:50 [PATCH] audit: remove obvious unnecessary header files wuchi
2022-08-30 10:50 ` wuchi
2022-08-30 17:04 ` Paul Moore
2022-08-30 17:04 ` Paul Moore
2022-08-31 0:20 ` chi wu
2022-08-31 0:20 ` chi wu
2022-08-31 0:49 ` Paul Moore
2022-08-31 0:49 ` Paul Moore
2022-08-31 1:04 ` chi wu
2022-08-31 1:04 ` chi wu
2022-08-30 21:17 ` kernel test robot
2022-08-30 21:17 ` kernel test robot
2022-08-30 21:58 ` kernel test robot
2022-08-30 21:58 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.