diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-07-01 03:56:16 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-07-01 07:44:10 -0400 |
commit | b915543b46a2aa599fdd2169e51bcfd88812a12b (patch) | |
tree | 8025e6654829d4c245b5b6b6f47a84543ebffb7b /arch/x86_64/kernel | |
parent | 6e5a2d1d32596850a0ebf7fb3e54c0d69901dabd (diff) |
[PATCH] audit syscall classes
Allow to tie upper bits of syscall bitmap in audit rules to kernel-defined
sets of syscalls. Infrastructure, a couple of classes (with 32bit counterparts
for biarch targets) and actual tie-in on i386, amd64 and ia64.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r-- | arch/x86_64/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/audit.c | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index aeb9c560be88..819e84ec5b64 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile | |||
@@ -35,6 +35,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o | |||
35 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o | 35 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o |
36 | obj-$(CONFIG_X86_VSMP) += vsmp.o | 36 | obj-$(CONFIG_X86_VSMP) += vsmp.o |
37 | obj-$(CONFIG_K8_NB) += k8.o | 37 | obj-$(CONFIG_K8_NB) += k8.o |
38 | obj-$(CONFIG_AUDIT) += audit.o | ||
38 | 39 | ||
39 | obj-$(CONFIG_MODULES) += module.o | 40 | obj-$(CONFIG_MODULES) += module.o |
40 | 41 | ||
diff --git a/arch/x86_64/kernel/audit.c b/arch/x86_64/kernel/audit.c new file mode 100644 index 000000000000..a067aa468a85 --- /dev/null +++ b/arch/x86_64/kernel/audit.c | |||
@@ -0,0 +1,29 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned chattr_class[] = { | ||
12 | #include <asm-generic/audit_change_attr.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static int __init audit_classes_init(void) | ||
17 | { | ||
18 | #ifdef CONFIG_IA32_EMULATION | ||
19 | extern __u32 ia32_dir_class[]; | ||
20 | extern __u32 ia32_chattr_class[]; | ||
21 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | ||
22 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | ||
23 | #endif | ||
24 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
25 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | __initcall(audit_classes_init); | ||