[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242240694.3364.3.camel@localhost.localdomain>
Date: Thu, 14 May 2009 00:21:34 +0530
From: Jaswinder Singh Rajput <jaswinder@...nel.org>
To: Ingo Molnar <mingo@...e.hu>, Al Viro <viro@...iv.linux.org.uk>,
x86 maintainers <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [RFC][PATCH -tip] x86: audit.c remove unnecessary global arrays
ia32_dir_class[], ia32_write_class[], ia32_read_class[], ia32_chattr_class[]
and ia32_signal_class[] are used only by arch/x86/kernel/audit_64.c
which can be replace by local variables:
dir_class[], write_class[], read_class[], chattr_class[] and signal_class[]
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@...il.com>
---
arch/x86/ia32/audit.c | 25 -------------------------
arch/x86/kernel/audit_64.c | 15 +++++----------
2 files changed, 5 insertions(+), 35 deletions(-)
diff --git a/arch/x86/ia32/audit.c b/arch/x86/ia32/audit.c
index 5d7b381..ee8ce50 100644
--- a/arch/x86/ia32/audit.c
+++ b/arch/x86/ia32/audit.c
@@ -1,30 +1,5 @@
#include <asm/unistd_32.h>
-unsigned ia32_dir_class[] = {
-#include <asm-generic/audit_dir_write.h>
-~0U
-};
-
-unsigned ia32_chattr_class[] = {
-#include <asm-generic/audit_change_attr.h>
-~0U
-};
-
-unsigned ia32_write_class[] = {
-#include <asm-generic/audit_write.h>
-~0U
-};
-
-unsigned ia32_read_class[] = {
-#include <asm-generic/audit_read.h>
-~0U
-};
-
-unsigned ia32_signal_class[] = {
-#include <asm-generic/audit_signal.h>
-~0U
-};
-
int ia32_classify_syscall(unsigned syscall)
{
switch (syscall) {
diff --git a/arch/x86/kernel/audit_64.c b/arch/x86/kernel/audit_64.c
index 06d3e5a..aede8d2 100644
--- a/arch/x86/kernel/audit_64.c
+++ b/arch/x86/kernel/audit_64.c
@@ -59,16 +59,11 @@ int audit_classify_syscall(int abi, unsigned syscall)
static int __init audit_classes_init(void)
{
#ifdef CONFIG_IA32_EMULATION
- extern __u32 ia32_dir_class[];
- extern __u32 ia32_write_class[];
- extern __u32 ia32_read_class[];
- extern __u32 ia32_chattr_class[];
- extern __u32 ia32_signal_class[];
- audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class);
- audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class);
- audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class);
- audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class);
- audit_register_class(AUDIT_CLASS_SIGNAL_32, ia32_signal_class);
+ audit_register_class(AUDIT_CLASS_WRITE_32, write_class);
+ audit_register_class(AUDIT_CLASS_READ_32, read_class);
+ audit_register_class(AUDIT_CLASS_DIR_WRITE_32, dir_class);
+ audit_register_class(AUDIT_CLASS_CHATTR_32, chattr_class);
+ audit_register_class(AUDIT_CLASS_SIGNAL_32, signal_class);
#endif
audit_register_class(AUDIT_CLASS_WRITE, write_class);
audit_register_class(AUDIT_CLASS_READ, read_class);
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists