Commit | Line | Data |
---|---|---|
805e021f CE |
1 | AC_DEFUN([OPENAFS_LINUX_KERNEL_SYSCALL_PROBE_SETUP],[ |
2 | dnl If we are guaranteed that keyrings will work - that is | |
3 | dnl a) The kernel has keyrings enabled | |
4 | dnl b) The code is new enough to give us a key_type_keyring | |
5 | dnl then we just disable syscall probing unless we've been | |
6 | dnl told otherwise | |
7 | ||
8 | AS_IF([test "$enable_linux_syscall_probing" = "maybe"], | |
9 | [AS_IF([test "$ac_cv_linux_keyring_support" = "yes" -a "$ac_cv_linux_exports_key_type_keyring" = "yes"], | |
10 | [enable_linux_syscall_probing="no"], | |
11 | [enable_linux_syscall_probing="yes"]) | |
12 | ]) | |
13 | ||
14 | dnl Syscall probing needs a few tests of its own, and just | |
15 | dnl won't work if the kernel doesn't export init_mm | |
16 | AS_IF([test "$enable_linux_syscall_probing" = "yes"], [ | |
17 | LINUX_EXPORTS_INIT_MM | |
18 | AS_IF([test "$ac_cv_linux_exports_init_mm" = "no"], [ | |
19 | AC_MSG_ERROR( | |
20 | [Can't do syscall probing without exported init_mm]) | |
21 | ]) | |
22 | LINUX_EXPORTS_SYS_CHDIR | |
23 | LINUX_EXPORTS_SYS_OPEN | |
24 | AC_DEFINE(ENABLE_LINUX_SYSCALL_PROBING, 1, | |
25 | [define to enable syscall table probes]) | |
26 | ]) | |
27 | ]) | |
28 | ||
29 | AC_DEFUN([OPENAFS_LINUX_KERNEL_SYSCALL_PROBE_CHECKS],[ | |
30 | dnl Syscall probing | |
31 | if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then | |
32 | AS_IF([test "$enable_linux_syscall_probing" = "yes"], [ | |
33 | AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported]) | |
34 | ]) | |
35 | ac_cv_linux_exports_sys_call_table=no | |
36 | if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then | |
37 | ac_cv_linux_exports_ia32_sys_call_table=yes | |
38 | fi | |
39 | else | |
40 | LINUX_EXPORTS_KALLSYMS_ADDRESS | |
41 | LINUX_EXPORTS_KALLSYMS_SYMBOL | |
42 | LINUX_EXPORTS_SYS_CALL_TABLE | |
43 | LINUX_EXPORTS_IA32_SYS_CALL_TABLE | |
44 | if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then | |
45 | linux_syscall_method=none | |
46 | if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then | |
47 | linux_syscall_method=scan | |
48 | if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then | |
49 | linux_syscall_method=scan_with_kallsyms_address | |
50 | fi | |
51 | fi | |
52 | if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then | |
53 | linux_syscall_method=kallsyms_symbol | |
54 | fi | |
55 | if test "x$linux_syscall_method" = "xnone"; then | |
56 | AC_MSG_WARN([no available sys_call_table access method -- guessing scan]) | |
57 | linux_syscall_method=scan | |
58 | fi | |
59 | fi | |
60 | fi | |
61 | ]) |