Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 424996

Summary: sys-kernel/hardened-sources-3.4.4-r1 compilation fails on process_64
Product: Gentoo Linux Reporter: Eric Gisse <jowr.pi>
Component: HardenedAssignee: The Gentoo Linux Hardened Team <hardened>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Kernel configuration

Description Eric Gisse 2012-07-06 00:58:08 UTC
Upon trying to update my hardened-sources, I found this compilation failure:

# make
  HOSTCC  -fPIC tools/gcc/colorize_plugin.o
  HOSTCC  -fPIC tools/gcc/constify_plugin.o
  HOSTLLD -shared tools/gcc/constify_plugin.so
  HOSTLLD -shared tools/gcc/colorize_plugin.so
  HOSTCC  arch/x86/tools/relocs
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  HOSTCC  scripts/basic/fixdep
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  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/kallsyms
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/conmakehash
  CC      init/main.o
  CHK     include/generated/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  LD      init/mounts.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  AS      arch/x86/crypto/aes-x86_64-asm_64.o
  CC      arch/x86/crypto/aes_glue.o
  AS      arch/x86/crypto/salsa20-x86_64-asm_64.o
  CC      arch/x86/crypto/salsa20_glue.o
  AS      arch/x86/crypto/twofish-x86_64-asm_64.o
  CC      arch/x86/crypto/twofish_glue.o
  LD      arch/x86/crypto/aes-x86_64.o
  LD      arch/x86/crypto/twofish-x86_64.o
  LD      arch/x86/crypto/salsa20-x86_64.o
  LD      arch/x86/crypto/built-in.o
  AS      arch/x86/ia32/ia32entry.o
  CC      arch/x86/ia32/sys_ia32.o
  CC      arch/x86/ia32/ia32_signal.o
  CC      arch/x86/ia32/nosyscall.o
  CC      arch/x86/ia32/syscall_ia32.o
  CC      arch/x86/ia32/ipc32.o
  CC      arch/x86/ia32/audit.o
  LD      arch/x86/ia32/built-in.o
  CC      arch/x86/kernel/process_64.o
arch/x86/kernel/process_64.c: In function 'do_arch_prctl':
arch/x86/kernel/process_64.c:458:15: error: 'CONFIG_TASK_SIZE_MAX_SHIFT' undeclared (first use in this function)
arch/x86/kernel/process_64.c:458:15: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [arch/x86/kernel/process_64.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2

It is not clear whether this is a kernel bug itself, or an issue with my configuration, or something gentoo added. Or a combination of all three.

I do note there is a CONFIG_TASK_SIZE_MAX_SHIFT directive that searching through menuconfig acknowledges as true, but there's no documentation on it and I have never had to set it before. So it looks like an include was borked at some point, but that's just my guess at this juncture.

This is a repeatable issue for me with this specific build. It looks like I'll stick with 3.1.8 for awhile more.

My emerge --info is as follows:

# emerge --info
Portage 2.1.10.55 (hardened/linux/amd64, gcc-4.5.3, glibc-2.14.1-r2, 3.1.8-hardened x86_64)
=================================================================
System uname: Linux-3.1.8-hardened-x86_64-Intel-R-_Xeon-TM-_CPU_3.00GHz-with-gentoo-2.1
Timestamp of tree: Thu, 05 Jul 2012 23:45:01 +0000
ccache version 3.1.7 [enabled]
app-shells/bash:          4.2_p24
dev-lang/python:          2.6.7-r2, 2.7.2-r3, 3.1.4-r3, 3.2.2-r1
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.4
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/pam.d/ /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org"
LDFLAGS="-Wl,--hash-style=gnu,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow amd64 custom-cflags custom-optimization cxx fuse hardened hvm ipv6 lm_sensors logrotate mmx mmxext multilib ncurses offensive pax_kernel pcre qemu readline snmp spell sse sse2 ssl threads unicode zlib" APACHE2_MODULES="authz_host dir mime userdir vhost_alias alias rewrite log_config" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LINGUAS="en_US en" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


My kernel config couldn't be pasted into the bug so it is attached as a text file from my windows workstation.
Comment 1 Eric Gisse 2012-07-06 00:59:01 UTC
Created attachment 317374 [details]
Kernel configuration

Note the egrep
Comment 2 Anthony Basile gentoo-dev 2012-07-07 13:27:53 UTC

*** This bug has been marked as a duplicate of bug 424886 ***