I ran into compilation problems with grsecurity-2.1.11-2.6.22.1-200708072019.patch.
I hope to have included enough information below.
I compile for an C3-2 on an Ahtlon64 (ARCH=i386).
I ran into:
$ make bzImage modules
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CC arch/i386/kernel/asm-offsets.s
In file included from include/linux/notifier.h:14,
from include/linux/memory_hotplug.h:7,
from include/linux/mmzone.h:466,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/percpu.h:5,
from include/asm/local.h:4,
from include/linux/module.h:19,
from include/linux/crypto.h:21,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/rwsem.h:24:65: error: asm/rwsem.h: No such file or directory
In file included from include/linux/memory_hotplug.h:7,
from include/linux/mmzone.h:466,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/percpu.h:5,
from include/asm/local.h:4,
from include/linux/module.h:19,
from include/linux/crypto.h:21,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/notifier.h:62: error: field â has incomplete type
In file included from include/asm/tsc.h:1,
from include/asm/timex.h:15,
from include/linux/timex.h:187,
from include/linux/sched.h:50,
from arch/i386/kernel/asm-offsets.c:8:
include/asm-i386/tsc.h: In function â:
include/asm-i386/tsc.h:29: warning: left shift count >= width of type
include/asm-i386/tsc.h: In function â:
include/asm-i386/tsc.h:57: warning: left shift count >= width of type
In file included from include/linux/timer.h:5,
from include/linux/sched.h:83,
from arch/i386/kernel/asm-offsets.c:8:
include/linux/ktime.h: In function â:
include/linux/ktime.h:84: warning: comparison is always false due to limited range of data type
In file included from arch/i386/kernel/asm-offsets.c:8:
include/linux/sched.h: At top level:
include/linux/sched.h:340: error: field â has incomplete type
In file included from include/asm/suspend.h:6,
from include/linux/suspend.h:5,
from arch/i386/kernel/asm-offsets.c:11:
include/asm/desc.h: In function â:
include/asm/desc.h:46: warning: right shift count >= width of type
include/asm/desc.h: In function â:
include/asm/desc.h:86: warning: right shift count >= width of type
In file included from include/linux/fs.h:361,
from include/linux/mm.h:14,
from include/linux/suspend.h:11,
from arch/i386/kernel/asm-offsets.c:11:
include/linux/quota.h: At top level:
include/linux/quota.h:291: error: field â has incomplete type
In file included from include/linux/mm.h:14,
from include/linux/suspend.h:11,
from arch/i386/kernel/asm-offsets.c:11:
include/linux/fs.h:555: error: field â has incomplete type
In file included from include/linux/mm.h:14,
from include/linux/suspend.h:11,
from arch/i386/kernel/asm-offsets.c:11:
include/linux/fs.h:923: error: field â has incomplete type
In file included from include/linux/mm.h:40,
from include/linux/suspend.h:11,
from arch/i386/kernel/asm-offsets.c:11:
include/asm/pgtable.h: In function â:
include/asm/pgtable.h:237: warning: left shift count >= width of type
include/asm/pgtable.h: In function â:
include/asm/pgtable.h:242: warning: left shift count >= width of type
include/asm/pgtable.h: In function â:
include/asm/pgtable.h:247: warning: left shift count >= width of type
include/asm/pgtable.h: In function â:
include/asm/pgtable.h:278: warning: left shift count >= width of type
include/asm/pgtable.h:279: warning: left shift count >= width of type
include/asm/pgtable.h: In function â:
include/asm/pgtable.h:294: warning: left shift count >= width of type
include/asm/pgtable.h:295: warning: left shift count >= width of type
include/asm/pgtable.h: In function â:
include/asm/pgtable.h:308: warning: left shift count >= width of type
include/asm/pgtable.h:309: warning: left shift count >= width of type
include/asm/pgtable.h: In function â:
include/asm/pgtable.h:402: warning: left shift count >= width of type
In file included from include/linux/suspend.h:11,
from arch/i386/kernel/asm-offsets.c:11:
include/linux/mm.h: In function â:
include/linux/mm.h:575: warning: integer constant is too large for â type
include/linux/mm.h:575: warning: cast to pointer from integer of different size
include/linux/mm.h: In function â:
include/linux/mm.h:919: warning: left shift count >= width of type
include/linux/mm.h:919: warning: integer constant is too large for â type
include/linux/mm.h:919: warning: cast to pointer from integer of different size
include/linux/mm.h: In function â:
include/linux/mm.h:925: warning: left shift count >= width of type
include/linux/mm.h:925: warning: integer constant is too large for â type
include/linux/mm.h:925: warning: cast to pointer from integer of different size
arch/i386/kernel/asm-offsets.c: In function â:
arch/i386/kernel/asm-offsets.c:33: error: â has no member named â
arch/i386/kernel/asm-offsets.c:34: error: â has no member named â
arch/i386/kernel/asm-offsets.c:35: error: â has no member named â
arch/i386/kernel/asm-offsets.c:36: error: â has no member named â
arch/i386/kernel/asm-offsets.c:37: error: â has no member named â
arch/i386/kernel/asm-offsets.c:38: error: â has no member named â
arch/i386/kernel/asm-offsets.c:39: error: â has no member named â
arch/i386/kernel/asm-offsets.c:40: error: â has no member named â
arch/i386/kernel/asm-offsets.c:41: error: â has no member named â
arch/i386/kernel/asm-offsets.c:48: error: â has no member named â
arch/i386/kernel/asm-offsets.c:62: error: â has no member named â
arch/i386/kernel/asm-offsets.c:65: error: invalid use of undefined type â
arch/i386/kernel/asm-offsets.c:66: error: invalid use of undefined type â
arch/i386/kernel/asm-offsets.c:67: error: invalid use of undefined type â
arch/i386/kernel/asm-offsets.c:70: error: â has no member named â
arch/i386/kernel/asm-offsets.c:71: error: â has no member named â
arch/i386/kernel/asm-offsets.c:72: error: â has no member named â
arch/i386/kernel/asm-offsets.c:73: error: â has no member named â
arch/i386/kernel/asm-offsets.c:74: error: â has no member named â
arch/i386/kernel/asm-offsets.c:75: error: â has no member named â
arch/i386/kernel/asm-offsets.c:76: error: â has no member named â
arch/i386/kernel/asm-offsets.c:77: error: â has no member named â
arch/i386/kernel/asm-offsets.c:78: error: â has no member named â
arch/i386/kernel/asm-offsets.c:79: error: â has no member named â
arch/i386/kernel/asm-offsets.c:80: error: â has no member named â
arch/i386/kernel/asm-offsets.c:81: error: â has no member named â
arch/i386/kernel/asm-offsets.c:82: error: â has no member named â
arch/i386/kernel/asm-offsets.c:84: error: â has no member named â
arch/i386/kernel/asm-offsets.c:85: error: â has no member named â
arch/i386/kernel/asm-offsets.c:97: error: â has no member named â
arch/i386/kernel/asm-offsets.c:107: error: â undeclared (first use in this function)
arch/i386/kernel/asm-offsets.c:107: error: (Each undeclared identifier is reported only once
arch/i386/kernel/asm-offsets.c:107: error: for each function it appears in.)
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
Configuration:
#
# Grsecurity
#
CONFIG_GRKERNSEC=y
# CONFIG_GRKERNSEC_LOW is not set
# CONFIG_GRKERNSEC_MEDIUM is not set
# CONFIG_GRKERNSEC_HIGH is not set
CONFIG_GRKERNSEC_CUSTOM=y
#
# Address Space Protection
#
CONFIG_GRKERNSEC_KMEM=y
CONFIG_GRKERNSEC_IO=y
CONFIG_GRKERNSEC_PROC_MEMMAP=y
CONFIG_GRKERNSEC_BRUTE=y
CONFIG_GRKERNSEC_MODSTOP=y
CONFIG_GRKERNSEC_HIDESYM=y
#
# Role Based Access Control Options
#
CONFIG_GRKERNSEC_ACL_HIDEKERN=y
CONFIG_GRKERNSEC_ACL_MAXTRIES=3
CONFIG_GRKERNSEC_ACL_TIMEOUT=30
#
# Filesystem Protections
#
CONFIG_GRKERNSEC_PROC=y
CONFIG_GRKERNSEC_PROC_USER=y
CONFIG_GRKERNSEC_PROC_ADD=y
CONFIG_GRKERNSEC_LINK=y
CONFIG_GRKERNSEC_FIFO=y
CONFIG_GRKERNSEC_CHROOT=y
CONFIG_GRKERNSEC_CHROOT_MOUNT=y
CONFIG_GRKERNSEC_CHROOT_DOUBLE=y
CONFIG_GRKERNSEC_CHROOT_PIVOT=y
CONFIG_GRKERNSEC_CHROOT_CHDIR=y
CONFIG_GRKERNSEC_CHROOT_CHMOD=y
CONFIG_GRKERNSEC_CHROOT_FCHDIR=y
CONFIG_GRKERNSEC_CHROOT_MKNOD=y
CONFIG_GRKERNSEC_CHROOT_SHMAT=y
CONFIG_GRKERNSEC_CHROOT_UNIX=y
CONFIG_GRKERNSEC_CHROOT_FINDTASK=y
CONFIG_GRKERNSEC_CHROOT_NICE=y
CONFIG_GRKERNSEC_CHROOT_SYSCTL=y
CONFIG_GRKERNSEC_CHROOT_CAPS=y
#
# Kernel Auditing
#
CONFIG_GRKERNSEC_AUDIT_GROUP=y
CONFIG_GRKERNSEC_AUDIT_GID=2007
CONFIG_GRKERNSEC_EXECLOG=y
CONFIG_GRKERNSEC_RESLOG=yCONFIG_GRKERNSEC_CHROOT_EXECLOG=y
CONFIG_GRKERNSEC_AUDIT_CHDIR=y
CONFIG_GRKERNSEC_AUDIT_MOUNT=y
CONFIG_GRKERNSEC_AUDIT_IPC=y
CONFIG_GRKERNSEC_SIGNAL=y
CONFIG_GRKERNSEC_FORKFAIL=y
CONFIG_GRKERNSEC_TIME=y
CONFIG_GRKERNSEC_PROC_IPADDR=y
CONFIG_GRKERNSEC_AUDIT_TEXTREL=y
#
# Executable Protections
#
CONFIG_GRKERNSEC_EXECVE=y
CONFIG_GRKERNSEC_SHM=y
CONFIG_GRKERNSEC_DMESG=y
CONFIG_GRKERNSEC_TPE=y
CONFIG_GRKERNSEC_TPE_ALL=y
CONFIG_GRKERNSEC_TPE_INVERT=y
CONFIG_GRKERNSEC_TPE_GID=2005
#
# Network Protections
#
CONFIG_GRKERNSEC_RANDNET=y
CONFIG_GRKERNSEC_SOCKET=y
CONFIG_GRKERNSEC_SOCKET_ALL=y
CONFIG_GRKERNSEC_SOCKET_ALL_GID=2004
CONFIG_GRKERNSEC_SOCKET_CLIENT=y
CONFIG_GRKERNSEC_SOCKET_CLIENT_GID=2003
CONFIG_GRKERNSEC_SOCKET_SERVER=y
CONFIG_GRKERNSEC_SOCKET_SERVER_GID=2002
#
# Sysctl support
#
CONFIG_GRKERNSEC_SYSCTL=y
CONFIG_GRKERNSEC_SYSCTL_ON=y
#
# Logging Options
#
CONFIG_GRKERNSEC_FLOODTIME=10
CONFIG_GRKERNSEC_FLOODBURST=4
#
# PaX
#
CONFIG_PAX=y
#
# PaX Control
#
CONFIG_PAX_SOFTMODE=y
# CONFIG_PAX_EI_PAX is not set
CONFIG_PAX_PT_PAX_FLAGS=y
CONFIG_PAX_NO_ACL_FLAGS=y
# CONFIG_PAX_HAVE_ACL_FLAGS is not set
# CONFIG_PAX_HOOK_ACL_FLAGS is not set
#
# Non-executable pages
CONFIG_PAX_NOEXEC=y
CONFIG_PAX_PAGEEXEC=y
CONFIG_PAX_SEGMEXEC=y
## CONFIG_PAX_EMUTRAMP is not set
CONFIG_PAX_MPROTECT=y
CONFIG_PAX_NOELFRELOCS=y
CONFIG_PAX_KERNEXEC=y
#
# Address Space Layout Randomization
#
CONFIG_PAX_ASLR=y
CONFIG_PAX_RANDKSTACK=y
CONFIG_PAX_RANDUSTACK=y
CONFIG_PAX_RANDMMAP=y
#
# Miscellaneous hardening features
#
CONFIG_PAX_MEMORY_SANITIZE=y
CONFIG_PAX_MEMORY_UDEREF=y
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set