Basically the same as #454870, but this time it is explicitly kmalloc'ed at runtime. This is using sys-kernel/hardened-sources-3.15.10-r2, but it also happened with 3.14 /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c: In function ‘KCL_ACPI_InstallHandler’: /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:401:18: error: assignment of member ‘notifier_call’ in read-only object /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:414:18: error: assignment of member ‘notifier_call’ in read-only object
# emerge --info Portage 2.2.8-r1 (hardened/linux/amd64, gcc-4.7.3, glibc-2.19-r1, 3.15.10-hardened-r2 x86_64) ================================================================= System uname: Linux-3.15.10-hardened-r2-x86_64-Intel-R-_Xeon-R-_CPU_E5-2620_0_@_2.00GHz-with-gentoo-2.2 KiB Mem: 32914696 total, 31465716 free KiB Swap: 0 total, 0 free Timestamp of tree: Tue, 02 Sep 2014 06:45:01 +0000 ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2 app-shells/bash: 4.2_p45 dev-lang/python: 2.7.7, 3.3.5-r1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.12.6, 1.13.4 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.13 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--jobs=15 --load-average=30 --keep-going --color y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildsyspkg compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://rush.tisys.org/pub/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,--hash-style=both -Wl,--as-needed" MAKEOPTS="-j20 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="" USE="acl acpi amd64 avx bash-completion berkdb bzip2 cli cracklib crypt cxx dbus dri gdbm hardened iconv icu iproute2 ipv6 ithreads justify lzma mmx modules multilib ncurses nls nptl openmp pam pax_kernel pcre qt3support readline session sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 tcpd threads udev unicode urandom vim-syntax xattr xtpax zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="alias auth_basic authn_anon authn_core authn_file authz_core authz_default authz_groupfile authz_host authz_owner authz_user cache cache_disk cgi cgid deflate dir env expires file_cache filter headers log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb status unique_id unixd usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fglrx" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Same error message for non-legacy 13.x versions. I've managed to overcome the problem in kcl_acpi.c by defining two struct instances at compile time and then memcpy'ing them to *ng and adding them to the acpi function call. Now, a second problem in kcl_agp.c showed up. Host is down at the moment, I will post the errors once it is back up.
Created attachment 384186 [details, diff] kcl_acpi.c: create notifier_blocks at compile time rather than runtime Patch for kcl_acpi.c, I have no idea if this does work at all, but it compiles without warnings. Next error: CC [M] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:116:5: error: invalid initializer /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:116:5: error: (near initialization for ‘kcl_agp_callbacks.<anonymous>’) /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:117:5: warning: initialization from incompatible pointer type [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:117:5: warning: (near initialization for ‘kcl_agp_callbacks.release’) [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:119:5: warning: initialization from incompatible pointer type [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:119:5: warning: (near initialization for ‘kcl_agp_callbacks.allocate_memory’) [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:120:5: warning: initialization from incompatible pointer type [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:120:5: warning: (near initialization for ‘kcl_agp_callbacks.free_memory’) [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:122:5: warning: initialization from incompatible pointer type [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:122:5: warning: (near initialization for ‘kcl_agp_callbacks.enable’) [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:124:1: warning: initialization from incompatible pointer type [enabled by default] /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.c:124:1: warning: (near initialization for ‘kcl_agp_callbacks.unbind_memory’) [enabled by default] make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o] Error 1 make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
Sorry for getting at this late. Let me bounce this off the x11 team (that fixed bug #454870) and upstream pax. Do you still get this problem on the latest hardened-sources?
(In reply to Stefan Valouch from comment #3) > Created attachment 384186 [details, diff] [details, diff] > kcl_acpi.c: create notifier_blocks at compile time rather than runtime > > Patch for kcl_acpi.c, I have no idea if this does work at all, but it > compiles without warnings. would be nice to see more code context but i think the assignment to *nb is wrong, you want to simply store the address of the structures there, not copying into an area pointed to by a wild pointer (and i wonder if nb is a local variable in which case there's probably no point for its existence at all anymore). > Next error: > > CC [M] > /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/ > fglrx/build_mod/2.6.x/kcl_agp.o > /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/ > fglrx/build_mod/2.6.x/kcl_agp.c:116:5: error: invalid initializer > /var/tmp/portage/x11-drivers/ati-drivers-14.6_beta2/work/common/lib/modules/ > fglrx/build_mod/2.6.x/kcl_agp.c:116:5: error: (near initialization for > ‘kcl_agp_callbacks.<anonymous>’) again, this needs source code context to tell what's going on.
Fixed in 14.9