diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-12 03:04:40 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-12 03:04:40 -0400 |
| commit | e65e1fc2d24b09c496af76e9c5253ac30b300a89 (patch) | |
| tree | b8f88773afd81ab97d5e6b79fc307523bf6b3430 | |
| parent | 05ff0e291af086f4325bac76abad250690bbbd63 (diff) | |
[PATCH] syscall class hookup for all normal targets
Take default arch/*/kernel/audit.c to lib/, have those with special
needs (== biarch) define AUDIT_ARCH in their Kconfig.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | arch/i386/kernel/Makefile | 1 | ||||
| -rw-r--r-- | arch/ia64/Kconfig | 4 | ||||
| -rw-r--r-- | arch/powerpc/Kconfig | 4 | ||||
| -rw-r--r-- | arch/s390/Kconfig | 4 | ||||
| -rw-r--r-- | arch/x86_64/Kconfig | 4 | ||||
| -rw-r--r-- | lib/Kconfig | 5 | ||||
| -rw-r--r-- | lib/Makefile | 1 | ||||
| -rw-r--r-- | lib/audit.c (renamed from arch/i386/kernel/audit.c) | 2 |
8 files changed, 24 insertions, 1 deletions
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index ab98fc21a541..5427a842e841 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
| @@ -39,7 +39,6 @@ obj-$(CONFIG_VM86) += vm86.o | |||
| 39 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 39 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
| 40 | obj-$(CONFIG_HPET_TIMER) += hpet.o | 40 | obj-$(CONFIG_HPET_TIMER) += hpet.o |
| 41 | obj-$(CONFIG_K8_NB) += k8.o | 41 | obj-$(CONFIG_K8_NB) += k8.o |
| 42 | obj-$(CONFIG_AUDIT) += audit.o | ||
| 43 | 42 | ||
| 44 | EXTRA_AFLAGS := -traditional | 43 | EXTRA_AFLAGS := -traditional |
| 45 | 44 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 674de8943478..db274da7dba1 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
| @@ -75,6 +75,10 @@ config DMA_IS_NORMAL | |||
| 75 | depends on IA64_SGI_SN2 | 75 | depends on IA64_SGI_SN2 |
| 76 | default y | 76 | default y |
| 77 | 77 | ||
| 78 | config AUDIT_ARCH | ||
| 79 | bool | ||
| 80 | default y | ||
| 81 | |||
| 78 | choice | 82 | choice |
| 79 | prompt "System type" | 83 | prompt "System type" |
| 80 | default IA64_GENERIC | 84 | default IA64_GENERIC |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4d4b6fb156e1..694b0c63ee50 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -95,6 +95,10 @@ config GENERIC_TBSYNC | |||
| 95 | default y if PPC32 && SMP | 95 | default y if PPC32 && SMP |
| 96 | default n | 96 | default n |
| 97 | 97 | ||
| 98 | config AUDIT_ARCH | ||
| 99 | bool | ||
| 100 | default y | ||
| 101 | |||
| 98 | config DEFAULT_UIMAGE | 102 | config DEFAULT_UIMAGE |
| 99 | bool | 103 | bool |
| 100 | help | 104 | help |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index ae071a11ce71..2f4f70c4dbb2 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
| @@ -118,6 +118,10 @@ config SYSVIPC_COMPAT | |||
| 118 | depends on COMPAT && SYSVIPC | 118 | depends on COMPAT && SYSVIPC |
| 119 | default y | 119 | default y |
| 120 | 120 | ||
| 121 | config AUDIT_ARCH | ||
| 122 | bool | ||
| 123 | default y | ||
| 124 | |||
| 121 | comment "Code generation options" | 125 | comment "Code generation options" |
| 122 | 126 | ||
| 123 | choice | 127 | choice |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 28df7d88ce2c..6cd4878625f1 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
| @@ -85,6 +85,10 @@ config DMI | |||
| 85 | bool | 85 | bool |
| 86 | default y | 86 | default y |
| 87 | 87 | ||
| 88 | config AUDIT_ARCH | ||
| 89 | bool | ||
| 90 | default y | ||
| 91 | |||
| 88 | source "init/Kconfig" | 92 | source "init/Kconfig" |
| 89 | 93 | ||
| 90 | 94 | ||
diff --git a/lib/Kconfig b/lib/Kconfig index f6299342b882..734ce95a93d1 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
| @@ -38,6 +38,11 @@ config LIBCRC32C | |||
| 38 | require M here. See Castagnoli93. | 38 | require M here. See Castagnoli93. |
| 39 | Module will be libcrc32c. | 39 | Module will be libcrc32c. |
| 40 | 40 | ||
| 41 | config AUDIT_GENERIC | ||
| 42 | bool | ||
| 43 | depends on AUDIT && !AUDIT_ARCH | ||
| 44 | default y | ||
| 45 | |||
| 41 | # | 46 | # |
| 42 | # compression support is select'ed if needed | 47 | # compression support is select'ed if needed |
| 43 | # | 48 | # |
diff --git a/lib/Makefile b/lib/Makefile index be9719ae82d0..ef1d37afbbb6 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
| @@ -49,6 +49,7 @@ obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o | |||
| 49 | obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o | 49 | obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o |
| 50 | obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o | 50 | obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o |
| 51 | obj-$(CONFIG_SMP) += percpu_counter.o | 51 | obj-$(CONFIG_SMP) += percpu_counter.o |
| 52 | obj-$(CONFIG_AUDIT_GENERIC) += audit.o | ||
| 52 | 53 | ||
| 53 | obj-$(CONFIG_SWIOTLB) += swiotlb.o | 54 | obj-$(CONFIG_SWIOTLB) += swiotlb.o |
| 54 | 55 | ||
diff --git a/arch/i386/kernel/audit.c b/lib/audit.c index 3b97cff41549..8c21625ef938 100644 --- a/arch/i386/kernel/audit.c +++ b/lib/audit.c | |||
| @@ -30,8 +30,10 @@ int audit_classify_syscall(int abi, unsigned syscall) | |||
| 30 | return 2; | 30 | return 2; |
| 31 | case __NR_openat: | 31 | case __NR_openat: |
| 32 | return 3; | 32 | return 3; |
| 33 | #ifdef __NR_socketcall | ||
| 33 | case __NR_socketcall: | 34 | case __NR_socketcall: |
| 34 | return 4; | 35 | return 4; |
| 36 | #endif | ||
| 35 | case __NR_execve: | 37 | case __NR_execve: |
| 36 | return 5; | 38 | return 5; |
| 37 | default: | 39 | default: |
