The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/kernel-objtool.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 dnl #
    2 dnl # Detect objtool functionality.
    3 dnl #
    4 
    5 dnl #
    6 dnl # Kernel 5.10: linux/frame.h was renamed linux/objtool.h
    7 dnl #
    8 AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL_HEADER], [
    9         AC_MSG_CHECKING([whether objtool header is available])
   10         ZFS_LINUX_TRY_COMPILE([
   11                 #include <linux/objtool.h>
   12         ],[
   13         ],[
   14                 AC_DEFINE(HAVE_KERNEL_OBJTOOL_HEADER, 1,
   15                     [kernel has linux/objtool.h])
   16                 AC_MSG_RESULT(linux/objtool.h)
   17         ],[
   18                 AC_MSG_RESULT(linux/frame.h)
   19         ])
   20 ])
   21 
   22 dnl #
   23 dnl # Check for objtool support.
   24 dnl #
   25 AC_DEFUN([ZFS_AC_KERNEL_SRC_OBJTOOL], [
   26 
   27         dnl # 4.6 API for compile-time stack validation
   28         ZFS_LINUX_TEST_SRC([objtool], [
   29                 #undef __ASSEMBLY__
   30                 #include <asm/ptrace.h>
   31                 #include <asm/frame.h>
   32         ],[
   33                 #if !defined(FRAME_BEGIN)
   34                 #error "FRAME_BEGIN is not defined"
   35                 #endif
   36         ])
   37 
   38         dnl # 4.6 API added STACK_FRAME_NON_STANDARD macro
   39         ZFS_LINUX_TEST_SRC([stack_frame_non_standard], [
   40                 #ifdef HAVE_KERNEL_OBJTOOL_HEADER
   41                 #include <linux/objtool.h>
   42                 #else
   43                 #include <linux/frame.h>
   44                 #endif
   45         ],[
   46                 #if !defined(STACK_FRAME_NON_STANDARD)
   47                 #error "STACK_FRAME_NON_STANDARD is not defined."
   48                 #endif
   49         ])
   50 ])
   51 
   52 AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [
   53         AC_MSG_CHECKING(
   54             [whether compile-time stack validation (objtool) is available])
   55         ZFS_LINUX_TEST_RESULT([objtool], [
   56                 AC_MSG_RESULT(yes)
   57                 AC_DEFINE(HAVE_KERNEL_OBJTOOL, 1,
   58                     [kernel does stack verification])
   59 
   60                 AC_MSG_CHECKING([whether STACK_FRAME_NON_STANDARD is defined])
   61                 ZFS_LINUX_TEST_RESULT([stack_frame_non_standard], [
   62                         AC_MSG_RESULT(yes)
   63                         AC_DEFINE(HAVE_STACK_FRAME_NON_STANDARD, 1,
   64                            [STACK_FRAME_NON_STANDARD is defined])
   65                 ],[
   66                         AC_MSG_RESULT(no)
   67                 ])
   68         ],[
   69                 AC_MSG_RESULT(no)
   70         ])
   71 ])

Cache object: 5f68cffc9a7db08a796934f00c057e60


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.