Trying to build a kernel from the hardened-sources-2.6.14-r1 fails with the error below. hardened-sources-2.6.14 works fine. hopeless linux # make CHK include/linux/version.h HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc SPLIT include/linux/autoconf.h -> include/config/* CC arch/ppc/kernel/asm-offsets.s GEN include/asm-ppc/asm-offsets.h CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost HOSTCC scripts/conmakehash HOSTCC scripts/bin2c CC init/main.o CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o CC init/do_mounts.o CC init/do_mounts_rd.o LD init/mounts.o CC init/initramfs.o CC init/calibrate.o LD init/built-in.o HOSTCC usr/gen_init_cpio CHK usr/initramfs_list UPD usr/initramfs_list CPIO usr/initramfs_data.cpio GZIP usr/initramfs_data.cpio.gz AS usr/initramfs_data.o LD usr/built-in.o AS arch/ppc/kernel/entry.o CC arch/ppc/kernel/traps.o CC arch/ppc/kernel/irq.o CC arch/ppc/kernel/idle.o CC arch/ppc/kernel/time.o AS arch/ppc/kernel/misc.o CC arch/ppc/kernel/process.o CC arch/ppc/kernel/signal.o CC arch/ppc/kernel/ptrace.o CC arch/ppc/kernel/align.o CC arch/ppc/kernel/semaphore.o CC arch/ppc/kernel/syscalls.o CC arch/ppc/kernel/setup.o CC arch/ppc/kernel/cputable.o CC arch/ppc/kernel/ppc_htab.o CC arch/ppc/kernel/perfmon.o AS arch/ppc/kernel/l2cr.o AS arch/ppc/kernel/cpu_setup_6xx.o CC arch/ppc/kernel/module.o arch/ppc/kernel/module.c: In function `do_plt_call': arch/ppc/kernel/module.c:167: error: structure has no member named `module_core' arch/ppc/kernel/module.c:168: error: structure has no member named `module_core' arch/ppc/kernel/module.c:168: error: structure has no member named `core_size' make[1]: *** [arch/ppc/kernel/module.o] Error 1 make: *** [arch/ppc/kernel] Error 2 Reproducible: Always emerge info: Portage 2.0.51.22-r3 (selinux/2005.1/ppc, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-hardened ppc) ================================================================= System uname: 2.6.14-hardened ppc 7447A, altivec supported Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="ppc" AUTOCLEAN="yes" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" DISTDIR="/var/tmp/portage/distfiles" FEATURES="autoconfig distlocks sandbox selinux sfperms strict test userpriv usersandbox" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://pandemonium.tiscali.de/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" LC_ALL="en_GB.UTF-8" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa altivec audiofile berkdb bzip2 cdb cdr crypt cups curl directfb divx4linux dlloader dvd dvdread esd exif expat fam flac gd gdbm gif glut gmp gpm gtk hardened idn imagemagick imlib java jpeg lcms ldap mad mng motif mpeg ncurses network nls nptl nptlonly ogg opengl pam pcre perl png ppc python qt readline real selinux slang sqlite ssl tcpd theora tiff truetype udev unicode vorbis xine xml2 xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LDFLAGS, LINGUAS, MAKEOPTS
Created attachment 74155 [details] .config used
Created attachment 74247 [details] Failing .config for Alpha FWIW, I get a very similar error on Alpha (same problem, just in a different place). 2.6.14-hardened is fine with the same config. CC arch/alpha/kernel/module.o arch/alpha/kernel/module.c: In function `apply_relocate_add': arch/alpha/kernel/module.c:180: error: structure has no member named `module_core' arch/alpha/kernel/module.c:180: error: structure has no member named `core_size' make[1]: *** [arch/alpha/kernel/module.o] Error 1
There are two changes in the new release (1) genpatches-base-2.6.14-5 is applied to the vanilla tree (the biggest difference here is that it incorporates 2.6.14.3 rather than 2.6.14.2). (2) The use of the latest "grsecurity-2.1.7-2.6.14.3-200511291802" patch. Could both of you try making a copy of the tree, patching out grsec and then attempting to reproduce the problem? Something like: # cd /usr/src/linux-2.6.14-hardened-r1.copy # zcat /path/to/grsecurity-2.1.7-2.6.14.3-200511291802.patch.gz | patch -s -p1 -R # make oldconfig # make Note that the reverse application of the patch should result in a single reject (in Makefile). This can be safely ignored.
Backing out the grsec patch (producing 3 rejects in various source files, all easily fixed) allows it to compile. I'll have a look at what changed there to try to find the problem.
Backing out the grsec patch allows it to compile here as well. Looks like the change in include/linux/module.h is causing some confusion. I guess those changes were worked into the i386 and x86_64 arch trees too, but not to all other arches. grepping for module_core shows up a list of files that still use the "old" names.
Good catch. I'm assuming that this has something to do with the recent changes concerning the KERNEXEC feature (namely, that module support can now co-exist with the feature). See: http://grsecurity.net/pipermail/grsecurity/2005-November/000616.html
Created attachment 74318 [details] bad-module_core-references-scan.log Results of the following command executed in /usr/src/linux containing a hardened-sources-2.6.14-r1 tree: find -regex ".*[hc]$" -exec egrep -Hn "module_core([^_]|$)" '{}' \; | cut -d/ -f2-
(In reply to comment #6) > Good catch. I'm assuming that this has something to do with the recent changes > concerning the KERNEXEC feature (namely, that module support can now co-exist > with the feature). See: > > http://grsecurity.net/pipermail/grsecurity/2005-November/000616.html indeed, those changes are the reason for the other arch failures, i'll fix them up soon (TM).
test14 is available at the usual place, it seems to compile and work on parisc at least, other archs need confirmation.
Thanks. I'm attaching a quick and dirty ebuild which, whilst entirely unsuitable for inclusion, makes use of the test14 patch for the convenience of interested testers apropos of this bug.
Created attachment 74518 [details] hardened-sources-2.6.14-r2.ebuild (based on -test14 patch) Test ebuild (which should hopefully resolve the compile failures reported on this bug). Uses the -test14 grsec/pax patch instead of the 2.6.14.3-200511291802 patch.
Adding depend on bug 115771, because the new grsecurity-2.1.7-2.6.14.3-200512111706 patch should resolve all of the issues described here. Would anyone able to care to test?
Ok, builds and boots fine on ppc. So the build problem is solved. But since I like a nice tune on my mac mini too, I'd like sound to work properly. And h-s-2.6.14-r2 is really messing it up (skipping, distortion, squeals). h-s-2.6.14 is fine, and gentoo-sources-2.6.14-r5 is too. And since the latter is (according to the changelog) based on the 2.6.14.4 sources just as h-s-2.6.14-r2 is (according to bug 115771), that suggest to me that the "vanilla" kernel sources are not the problem, but something in the patches is.
Should be solved with -r2 when it hits mirrors.