| Summary: | x11-drivers/ati-drivers-11.12-r1 fails to compile with sys-kernel/hardened-sources | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Matthias Heizmann <matthias> |
| Component: | Current packages | Assignee: | Gentoo X packagers <x11> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | normal | CC: | enrico.tagliavini, hardened, thomas |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | 3.1.5-hardened Kernel Configuration | ||
|
Description
Matthias Heizmann
2012-01-25 00:43:05 UTC
Strange i cannot reproduce. I can build ati-drivers-12.1 (ok not fair you are right) against h-s-3.1.5, and i also built 11.12-r1. That's odd. Inspired by this comment https://bugs.gentoo.org/show_bug.cgi?id=392753#c19 I did the following $ sh /usr/portage/distfiles/ati-driver-installer-11-12-x86.x86_64.run --extract /tmp/ati $ cd /tmp/ati/common/lib/modules/fglrx/build_mod/ $ ./make.sh --norootcheck --uname_r=3.1.5-hardened The output was: AMD kernel module generator version 2.1 ./make.sh: line 390: [: too many arguments ./make.sh: line 396: [: too many arguments doing Makefile based build for kernel 2.6.x and higher rm -rf *.c *.h *.o *.ko *.a .??* *.symvers make -C /lib/modules/3.1.5-hardened/build SUBDIRS=/tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x modules make[1]: Entering directory `/usr/src/linux-3.1.5-hardened' CC [M] /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o In file included from /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:192:0: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:202:5: warning: "_DEBUG" is not defined /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘firegl_init_module’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1034:20: error: called object ‘2’ is not a function /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_SetPageCache_Array’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1330:17: error: called object ‘2’ is not a function /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MEM_SmallBufferAlloc’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2016:12: error: called object ‘2’ is not a function /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MEM_SmallBufferAllocAtomic’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2031:12: error: called object ‘2’ is not a function /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MEM_Alloc’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2041:12: error: called object ‘2’ is not a function /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MEM_AllocAtomic’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2046:12: error: called object ‘2’ is not a function /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_lock_init’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5739:12: error: called object ‘2’ is not a function /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_fpu_begin’: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5803:33: error: ‘struct thread_info’ has no member named ‘task’ /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: At top level: /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:162:16: warning: ‘module_log_map’ defined but not used /tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:175:19: warning: ‘module_type_map’ defined but not used make[2]: *** [/tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1 make[1]: *** [_module_/tmp/ati/common/lib/modules/fglrx/build_mod/2.6.x] Error 2 make[1]: Leaving directory `/usr/src/linux-3.1.5-hardened' make: *** [kmod_build] Error 2 build failed with return value 2 line 390 is 390: if [ $MODVERSIONS = 0 ] line 396 is: 396: if [ ! $MODVERSIONS = 0 ] MODVERSIONS occurs in the following three lines for the first time 370: # resolve if we are running a MODVERSIONS enabled kernel 371: 372: MODVERSIONS=0 Please attach your kernel .config Created attachment 300005 [details]
3.1.5-hardened Kernel Configuration
Diff of both kernel configs I am using (remark I can build against gentoo-sources-3.1.6 but not against hardened-sources-3.1.5) -# Linux/i386 3.1.5-hardened Kernel Configuration +# Linux/i386 3.1.6-gentoo Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -317,7 +317,6 @@ CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y -CONFIG_X86_ALIGNMENT_16=y CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_TSC=y CONFIG_X86_CMPXCHG64=y @@ -550,6 +549,7 @@ CONFIG_BINFMT_ELF=y CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_MISC=y CONFIG_HAVE_ATOMIC_IOMAP=y CONFIG_HAVE_TEXT_POKE_SMP=y @@ -719,6 +719,7 @@ # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set +# CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_PHONET is not set # CONFIG_IEEE802154 is not set @@ -1589,6 +1590,7 @@ CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_FB_CON_DECOR is not set # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y @@ -2103,6 +2105,7 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y @@ -2270,6 +2273,7 @@ # CONFIG_LKDTM is not set # CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set # CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set CONFIG_SYSCTL_SYSCALL_CHECK=y # CONFIG_DEBUG_PAGEALLOC is not set CONFIG_USER_STACKTRACE_SUPPORT=y @@ -2319,6 +2323,9 @@ CONFIG_EARLY_PRINTK_DBGP=y CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_X86_PTDUMP is not set +CONFIG_DEBUG_RODATA=y +CONFIG_DEBUG_RODATA_TEST=y +# CONFIG_DEBUG_SET_MODULE_RONX is not set CONFIG_DEBUG_NX_TEST=m CONFIG_DOUBLEFAULT=y # CONFIG_IOMMU_STRESS is not set @@ -2341,144 +2348,6 @@ # # Security options # - -# -# Grsecurity -# -CONFIG_GRKERNSEC=y -CONFIG_GRKERNSEC_LOW=y -# CONFIG_GRKERNSEC_MEDIUM is not set -# CONFIG_GRKERNSEC_HIGH is not set -# CONFIG_GRKERNSEC_HARDENED_SERVER is not set -# CONFIG_GRKERNSEC_HARDENED_WORKSTATION is not set -# CONFIG_GRKERNSEC_HARDENED_VIRTUALIZATION is not set -# CONFIG_GRKERNSEC_CUSTOM is not set - -# -# Address Space Protection -# -# CONFIG_GRKERNSEC_KMEM is not set -CONFIG_GRKERNSEC_VM86=y -# CONFIG_GRKERNSEC_IO is not set -CONFIG_GRKERNSEC_PROC_MEMMAP=y -CONFIG_GRKERNSEC_BRUTE=y -CONFIG_GRKERNSEC_MODHARDEN=y -CONFIG_GRKERNSEC_HIDESYM=y -# CONFIG_GRKERNSEC_KERN_LOCKOUT is not set - -# -# Role Based Access Control Options -# -# CONFIG_GRKERNSEC_NO_RBAC is not set -# CONFIG_GRKERNSEC_ACL_HIDEKERN is not set -CONFIG_GRKERNSEC_ACL_MAXTRIES=3 -CONFIG_GRKERNSEC_ACL_TIMEOUT=30 - -# -# Filesystem Protections -# -CONFIG_GRKERNSEC_PROC=y -CONFIG_GRKERNSEC_PROC_USERGROUP=y -CONFIG_GRKERNSEC_PROC_GID=10 -# CONFIG_GRKERNSEC_PROC_ADD is not set -CONFIG_GRKERNSEC_LINK=y -CONFIG_GRKERNSEC_FIFO=y -# CONFIG_GRKERNSEC_SYSFS_RESTRICT is not set -# CONFIG_GRKERNSEC_ROFS is not set -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 is not set -# CONFIG_GRKERNSEC_EXECLOG is not set -CONFIG_GRKERNSEC_RESLOG=y -# CONFIG_GRKERNSEC_CHROOT_EXECLOG is not set -# CONFIG_GRKERNSEC_AUDIT_PTRACE is not set -# CONFIG_GRKERNSEC_AUDIT_CHDIR is not set -CONFIG_GRKERNSEC_AUDIT_MOUNT=y -CONFIG_GRKERNSEC_SIGNAL=y -CONFIG_GRKERNSEC_FORKFAIL=y -CONFIG_GRKERNSEC_TIME=y -CONFIG_GRKERNSEC_PROC_IPADDR=y - -# -# Executable Protections -# -CONFIG_GRKERNSEC_DMESG=y -CONFIG_GRKERNSEC_HARDEN_PTRACE=y -# CONFIG_GRKERNSEC_TPE is not set - -# -# Network Protections -# -CONFIG_GRKERNSEC_RANDNET=y -# CONFIG_GRKERNSEC_BLACKHOLE is not set -# CONFIG_GRKERNSEC_SOCKET is not set - -# -# Sysctl support -# -CONFIG_GRKERNSEC_SYSCTL=y -CONFIG_GRKERNSEC_SYSCTL_ON=y - -# -# Logging Options -# -CONFIG_GRKERNSEC_FLOODTIME=10 -CONFIG_GRKERNSEC_FLOODBURST=6 - -# -# PaX -# -CONFIG_PAX=y - -# -# PaX Control -# -# CONFIG_PAX_SOFTMODE is not set -CONFIG_PAX_EI_PAX=y -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 is not set -# CONFIG_PAX_KERNEXEC is not set -CONFIG_PAX_KERNEXEC_PLUGIN_METHOD="" - -# -# 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_STACKLEAK is not set -# CONFIG_PAX_MEMORY_UDEREF is not set -CONFIG_PAX_REFCOUNT=y -CONFIG_PAX_USERCOPY=y CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y # CONFIG_SECURITY_DMESG_RESTRICT is not set I can confirm this. I don't use hardened-sources but my own patchset, which includes grsec (the only patch it has in common with hardened-sources) and all ati-drivers versions seem to be affected. Can you test hardened sources with the pax options in the kernel disabled, also 3.2.2-r1 (In reply to comment #8) > Can you test hardened sources with the pax options in the kernel disabled, also > 3.2.2-r1 I did that - in fact I disabled all options that are introduced by grsec/PaX and co. and the behavior is the same. ati-drivers-12.1-r1 compiles fine with hardened-sources 3.2.6 ati-drivers version 11.12, 12.1 and 12.1-r1 all emerge fine on a AMD64 multilib system with a 3.2.2-r1 kernel. Uderef is turned off but kernexec is enabled using the bts plugin that is compatible with blobs. For me CHOST="i686-pc-linux-gnu" the problem remains with hardened-sources-3.2.6 and x11-drivers/ati-drivers-12.1-r1 (However, for my GPU the radeon driver is in powersaving as good as the fglrx driver. Hence, I do not need to install the ati-drivers any more) Ok i have an idea: this is failing only on x86 system for now. I guess this is similar to bug #409935 where we have an x86 break only. If this is the case the solution might be very easy. If I will find the time I will look at the code, but I can't test. I really have no time to maintain an x86 install. Help is welcome as usual :) Can you try with ati-drivers-12.4 and attach the new build log if failing again? This really sounds related in some way to bug #409935 and the code snippet involved seems to be the same. Please check again with latest ati-drivers and hardened-sources and reopen if the issue still exists. |