2 dnl # grsecurity API change,
3 dnl # kmem_cache_create() with SLAB_USERCOPY flag replaced by
4 dnl # kmem_cache_create_usercopy().
6 AC_DEFUN([ZFS_AC_KERNEL_SRC_KMEM_CACHE_CREATE_USERCOPY], [
7 ZFS_LINUX_TEST_SRC([kmem_cache_create_usercopy], [
8 #include <linux/slab.h>
9 static void ctor(void *foo) { /* fake ctor */ }
11 struct kmem_cache *skc_linux_cache;
12 const char *name = "test";
15 unsigned long flags = 0;
16 size_t useroffset = 0;
17 size_t usersize = size - useroffset;
19 skc_linux_cache = kmem_cache_create_usercopy(
20 name, size, align, flags, useroffset, usersize, ctor);
24 AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY], [
25 AC_MSG_CHECKING([whether kmem_cache_create_usercopy() exists])
26 ZFS_LINUX_TEST_RESULT([kmem_cache_create_usercopy], [
28 AC_DEFINE(HAVE_KMEM_CACHE_CREATE_USERCOPY, 1,
29 [kmem_cache_create_usercopy() exists])
35 AC_DEFUN([ZFS_AC_KERNEL_SRC_KMEM_CACHE], [
36 ZFS_AC_KERNEL_SRC_KMEM_CACHE_CREATE_USERCOPY
39 AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE], [
40 ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY