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
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"])
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"], [
18 AS_IF([test "$ac_cv_linux_exports_init_mm" = "no"], [
20 [Can't do syscall probing without exported init_mm])
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])
29 AC_DEFUN([OPENAFS_LINUX_KERNEL_SYSCALL_PROBE_CHECKS],[
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])
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
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
52 if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
53 linux_syscall_method=kallsyms_symbol
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