

it's hardened: pie, sspkfiaciarka wrote:what is so special in gcc-4.2.0-piepatches-v9.0.7.tar.bz2 ? sth superior to portage patches?



that won't workVlad.Sharp wrote:Having no luck with Gcc 4.2.1 hardened. The -Wno-overlength-strings error. Going from 2007.0 stage1 x86 to 4.2.1 with USE="-* nls vanilla multislot" emerge --oneshot gcc... Trying again atm. with "bootstrap" USE on

Code: Select all
USE="-gcj -gtk -hardened -multislot -openmp vanilla bootstrap" emerge -pv --oneshot =gcc-4.2.0
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild NS ] sys-devel/gcc-4.2.0 USE="bootstrap nls vanilla (-altivec) -build -doc -fortran -gcj -gtk -hardened -ip28 -ip32r10k -mudflap -multilib -multislot (-n32) (-n64) -nocxx -nopie -objc -objc++ -objc-gc -openmp -test" 0 kB [1]
Total: 1 package (1 in new slot), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/portage
[1] /usr/local/portage
Code: Select all
/usr/i686-pc-linux-gnu/bin/ar rc .libs/libgomp.a alloc.o barrier.o critical.o env.o error.o iter.o loop.o ordered.o parallel.o sections.o single.o team.o work.o lock.o mutex.o proc.o sem.o bar.o time.o fortran.o
/usr/i686-pc-linux-gnu/bin/ranlib .libs/libgomp.a
creating libgomp.la
(cd .libs && rm -f libgomp.la && ln -s ../libgomp.la libgomp.la)
true DO=all multi-do # make
make[4]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/i686-pc-linux-gnu/libgomp'
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/i686-pc-linux-gnu/libgomp'
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/i686-pc-linux-gnu/libgomp'
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build'
/var/tmp/portage/sys-devel/gcc-4.2.0/work/build /var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0
* Creating a hardenednopiessp gcc specs file ...
config.h is unchanged
tm.h is unchanged
bconfig.h is unchanged
tm_p.h is unchanged [ ok ]
* Creating a vanilla gcc specs file ... [ ok ]
* Creating a hardenednossp gcc specs file ...
config.h is unchanged
tm.h is unchanged
bconfig.h is unchanged
tm_p.h is unchanged [ ok ]
>>> Source compiled.
>>> Test phase [not enabled]: sys-devel/gcc-4.2.0
>>> Install gcc-4.2.0 into /var/tmp/portage/sys-devel/gcc-4.2.0/image/ category sys-devel
* Installing GCC...
make[1]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build'
/bin/sh /var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/mkinstalldirs /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr
mkdir -p -- /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr
make[2]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/fixincludes'
rm -rf /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/libexec/gcc/i686-pc-linux-gnu/4.2.0/install-tools
/bin/sh /var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/fixincludes/../mkinstalldirs /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/libexec/gcc/i686-pc-linux-gnu/4.2.0/install-tools
mkdir -p -- /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/libexec/gcc/i686-pc-linux-gnu/4.2.0/install-tools
/bin/sh /var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/fixincludes/../mkinstalldirs /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/lib/gcc/i686-pc-linux-gnu/4.2.0/install-tools/include
mkdir -p -- /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/lib/gcc/i686-pc-linux-gnu/4.2.0/install-tools/include
/bin/install -c -m 644 /var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/fixincludes/README-fixinc \
/var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/lib/gcc/i686-pc-linux-gnu/4.2.0/install-tools/include/README
/bin/install -c fixinc.sh /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/libexec/gcc/i686-pc-linux-gnu/4.2.0/install-tools/fixinc.sh
/bin/install -c fixincl \
/var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/libexec/gcc/i686-pc-linux-gnu/4.2.0/install-tools/fixincl
/bin/install -c mkheaders /var/tmp/portage/sys-devel/gcc-4.2.0/image//usr/libexec/gcc/i686-pc-linux-gnu/4.2.0/install-tools/mkheaders
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/fixincludes'
make[2]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/gcc'
gcc -O2 -march=pentium3 -pipe -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/gcc -I/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/gcc/../libdecnumber -I../libdecnumber \
-DGCC_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include\" -DGPLUSPLUS_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4\" -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/i686-pc-linux-gnu\" -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/backward\" -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" -DCROSS_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/sys-include\" -DTOOL_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/include\" \
-c /var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/gcc/cppdefault.c -o cppdefault.o
cc1: error: unrecognized command line option "-Wno-variadic-macros"
cc1: error: unrecognized command line option "-Wno-overlength-strings"
make[2]: *** [cppdefault.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build'
make: *** [install] Error 2
*
* ERROR: sys-devel/gcc-4.2.0 failed.
* Call stack:
* ebuild.sh, line 1648: Called dyn_install
* ebuild.sh, line 1083: Called qa_call 'src_install'
* ebuild.sh, line 44: Called src_install
* ebuild.sh, line 1328: Called toolchain_src_install
* toolchain.eclass, line 35: Called gcc-compiler_src_install
* toolchain.eclass, line 1619: Called die
*
* (no error message)
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.2.0/temp/build.log'.
* This ebuild is from an overlay: '/usr/local/portage/'
*
* Messages for package sys-devel/gcc-4.2.0:
*
* ERROR: sys-devel/gcc-4.2.0 failed.
* Call stack:
* ebuild.sh, line 1648: Called dyn_install
* ebuild.sh, line 1083: Called qa_call 'src_install'
* ebuild.sh, line 44: Called src_install
* ebuild.sh, line 1328: Called toolchain_src_install
* toolchain.eclass, line 35: Called gcc-compiler_src_install
* toolchain.eclass, line 1619: Called die
*
* (no error message)
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.2.0/temp/build.log'.
* This ebuild is from an overlay: '/usr/local/portage/'
Code: Select all
[ebuild R ] sys-apps/sandbox-1.2.18.1 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Would you like to merge these packages? [Yes/No] Yes
>>> Verifying ebuild Manifests...
>>> Emerging (1 of 1) sys-apps/sandbox-1.2.18.1 to /
* sandbox-1.2.18.1.tar.bz2 RMD160 ;-) ... [ ok ]
* sandbox-1.2.18.1.tar.bz2 SHA1 ;-) ... [ ok ]
* sandbox-1.2.18.1.tar.bz2 SHA256 ;-) ... [ ok ]
* sandbox-1.2.18.1.tar.bz2 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking sandbox-1.2.18.1.tar.bz2 ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking sandbox-1.2.18.1.tar.bz2 to /var/tmp/portage/sys-apps/sandbox-1.2.18.1/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-apps/sandbox-1.2.18.1/work/sandbox-1.2.18.1 ...
* If configure fails with a 'cannot run C compiled programs' error, try this:
* FEATURES=-sandbox emerge sandbox
* Configuring sandbox for ABI=x86...
* econf: updating sandbox-1.2.18.1/config.sub with /usr/share/gnuconfig/config.sub
* econf: updating sandbox-1.2.18.1/config.guess with /usr/share/gnuconfig/config.guess
../sandbox-1.2.18.1//configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib32 --enable-multilib --build=i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/sys-apps/sandbox-1.2.18.1/work/build-x86-x86_64-pc-linux-gnu/config.log
*
* ERROR: sys-apps/sandbox-1.2.18.1 failed.
* Call stack:
* ebuild.sh, line 1648: Called dyn_compile
* ebuild.sh, line 988: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* sandbox-1.2.18.1.ebuild, line 84: Called econf '--libdir=/usr/lib32' '--enable-multilib'
* ebuild.sh, line 591: Called die
*
* econf failed
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-apps/sandbox-1.2.18.1/temp/build.log'.
*
localhost chris # Code: Select all
localhost chris # emerge --info
Portage 2.1.3.3 (default-linux/amd64/2007.0, gcc-4.2.1, glibc-2.6.1-r0, 2.6.22-kamikaze3-r3 x86_64)
=================================================================
System uname: 2.6.22-kamikaze3-r3 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System release 1.12.10
Timestamp of tree: Sat, 04 Aug 2007 00:00:01 +0000
ccache version 2.4 [enabled]
dev-lang/python: 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/sandbox: 1.2.18.1
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.17.50.0.16, 2.17.50.0.17, 2.17.50.0.18
sys-devel/gcc-config: 1.3.16
sys-devel/libtool: 1.5.24
virtual/os-headers: 2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildsyspkg ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org ftp://ftp.solnet.ch/mirror/Gentoo"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LINGUAS="fr fr_FR"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/toolchain /usr/portage/local/layman/custom-kernels /usr/portage/local/layman/flameeyes-overlay /usr/portage/local/layman/sunrise /usr/portage/local/layman/berkano /usr/portage/local/layman/xeffects /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac alsa amd64 berkdb bitmap-fonts bzip2 cli cracklib crypt cups dlloader dri fortran gdbm gif gpm iconv ipv6 isdnlog jpeg kde kdeenablefinal kdehiddenvisibility libg++ mad mmx mmxext mp3 mudflap ncurses newspr nls nptl nptlonly nvidia opengl openmp pam pcre perl pertty png pppd python qt readline reflection session spl sse sse2 ssl tcpd transparency truetype truetype-fonts type1-fonts unicode userlocales vorbis xcomposite xorg xv xvid zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr fr_FR" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
localhost chris # Code: Select all
localhost chris # gcc -v
Utilisation des specs internes.
Target: x86_64-pc-linux-gnu
Configuré avec: /var/tmp/portage/sys-devel/gcc-4.2.1/work/gcc-4.2.1/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.1 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.1/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.1 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.1/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.1/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.1/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --enable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Modèle de thread: posix
version gcc 4.2.1 (Gentoo 4.2.1)
localhost chris # 

(output of the 4 files in /etc/env.d/gcc/)ls -l /etc/env.d/gcc/
total 60
-rw-r--r-- 1 root root 32 6. Aug 18:10 config
-rw-r--r-- 1 root root 292 14. Apr 14:09 i686-pc-linux-gnu-3.4.6
-rw-r--r-- 1 root root 361 14. Apr 14:09 i686-pc-linux-gnu-3.4.6-hardenednopie
-rw-r--r-- 1 root root 364 14. Apr 14:09 i686-pc-linux-gnu-3.4.6-hardenednopiessp
-rw-r--r-- 1 root root 361 14. Apr 14:09 i686-pc-linux-gnu-3.4.6-hardenednossp
-rw-r--r-- 1 root root 355 14. Apr 14:09 i686-pc-linux-gnu-3.4.6-vanilla
-rw-r--r-- 1 root root 327 29. Jul 19:43 i686-pc-linux-gnu-4.1.2
-rw-r--r-- 1 root root 399 29. Jul 19:43 i686-pc-linux-gnu-4.1.2-hardenednopiessp
-rw-r--r-- 1 root root 396 29. Jul 19:43 i686-pc-linux-gnu-4.1.2-hardenednossp
-rw-r--r-- 1 root root 390 29. Jul 19:43 i686-pc-linux-gnu-4.1.2-vanilla
-rw-r--r-- 1 root root 327 30. Jul 20:37 i686-pc-linux-gnu-4.2.0
-rw-r--r-- 1 root root 327 30. Jul 21:44 i686-pc-linux-gnu-4.2.1
-rw-r--r-- 1 root root 399 30. Jul 21:44 i686-pc-linux-gnu-4.2.1-hardenednopiessp
-rw-r--r-- 1 root root 396 30. Jul 21:44 i686-pc-linux-gnu-4.2.1-hardenednossp
-rw-r--r-- 1 root root 390 30. Jul 21:44 i686-pc-linux-gnu-4.2.1-vanilla
cat /etc/env.d/gcc/i686-pc-linux-gnu-4.2.1*
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
GCC_PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.2.1"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/info"
STDCXX_INCDIR="g++-v4"
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
GCC_PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.2.1"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/info"
STDCXX_INCDIR="g++-v4"
GCC_SPECS="/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/hardenednopiessp.specs"
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
GCC_PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.2.1"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/info"
STDCXX_INCDIR="g++-v4"
GCC_SPECS="/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/hardenednossp.specs"
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
GCC_PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.2.1"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.2.1"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.2.1/info"
STDCXX_INCDIR="g++-v4"
GCC_SPECS="/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/vanilla.specs"
if I look in more detail I think the only difference are the strcpy & memcpy functions [not those with "contains a NULL byte]Mode: kiddie
Linux cathy 2.6.22-kamikaze5-ssp #1 PREEMPT Sun Aug 5 18:08:38 CEST 2007 i686 Intel(R) Pentium(R) M processor 1.73GHz GenuineIntel GNU/Linux
Executable anonymous mapping : Killed
Executable bss : Killed
Executable data : Killed
Executable heap : Killed
Executable stack : Killed
Executable anonymous mapping (mprotect) : Vulnerable
Executable bss (mprotect) : Vulnerable
Executable data (mprotect) : Vulnerable
Executable heap (mprotect) : Vulnerable
Executable stack (mprotect) : Vulnerable
Executable shared library bss (mprotect) : Vulnerable
Executable shared library data (mprotect): Vulnerable
Writable text segments : Vulnerable
Anonymous mapping randomisation test : 9 bits (guessed)
Heap randomisation test (ET_EXEC) : No randomisation
Heap randomisation test (ET_DYN) : No randomisation
Main executable randomisation (ET_EXEC) : 10 bits (guessed)
Main executable randomisation (ET_DYN) : 10 bits (guessed)
Shared library randomisation test : 10 bits (guessed)
Stack randomisation test (SEGMEXEC) : 19 bits (guessed)
Stack randomisation test (PAGEEXEC) : 19 bits (guessed)
Return to function (strcpy) : paxtest: return address contains a NULL byte.
Return to function (memcpy) : Killed
Return to function (strcpy, RANDEXEC) : paxtest: return address contains a NULL byte.
Return to function (memcpy, RANDEXEC) : Killed
Executable shared library bss : Killed
Executable shared library data : Killed


well I only replaced reiser4 with official latest reiser4-patch, grsecurity / pax unfortunately doesn't apply cleanly,Vlad.Sharp wrote:kernelOfTruth - you are definitely having more luck with hardened than I. What are your C(XX)FLAGS and LDFLAGS?
And what patches do you have for kamikaze5? (as an addon)
it also works with -O2, -Os is somewhat better in terms of space & memory usagePortage 2.1.3.3 (hardened/x86/2.6, gcc-4.2.1, glibc-2.6-r0, 2.6.22-kamikaze5-ssp i686)
=================================================================
System uname: 2.6.22-kamikaze5-ssp i686 Intel(R) Pentium(R) M processor 1.73GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 05 Aug 2007 09:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python: 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.16.1-r3, 2.17.50.0.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool: 1.5.23b
virtual/os-headers: 2.6.22-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium-m -pipe -mfpmath=sse -falign-functions=64 -fforce-addr -Wno-error -D_FORTIFY_SOURCE=2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-Os -march=pentium-m -pipe -mfpmath=sse -falign-functions=64 -fforce-addr -Wno-error -D_FORTIFY_SOURCE=2"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://gentoo.inode.at/source/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://mirrors.ludost.net/gentoo/ ftp://mirror.bih.net.ba/gentoo/ http://gentoo.mirror.web4u.cz/ http://mirror.uni-c.dk/pub/gentoo/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.public.fix.fi/gentoo ftp://mirror.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo ftp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://sunsite.informatik.rwth-aachen.de ... nux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ "
LINGUAS="de en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/svn/experimental /usr/local/portage/misc_overlays /usr/local/portage/overlay /usr/local/portage/xeffects /usr/local/portage/ycarus /usr/local/portage/sunrise /usr/local/portage/gentooscience /usr/local/portage/gentopia /usr/local/portage/rmh3093 /usr/local/portage/berkano /usr/local/portage/hardened"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi aim alsa arts asf avahi avi bash-completion beagle berkdb bonjour bzip2 cairo cddb cdparanoia cdr cjk clamav cracklib crypt cups dbus divx djvu dts dvb dvd dvdr dvdread dvi encode esd fbcon ffmpeg firefox flac ftp gdbm gif glitz gnome gnutls gpm gstreamer gtk gtk2 hal hardened hashstyle iconv icq idn imlib ipod ipv6 jack java javascript jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility lcms ldap lesstif libnotify lm_sensors mad mailwrapper midi mmx mmx2 mmxext mp3 mpeg musepack musicbrainz ncurses newspr nls no-seamonkey nptl nptlonly nsplugin ogg opengl oscar paludis pam pango pcre pdf perl pic pie png ppds python qt3support qt4 quicktime readline rtc sasl scanner sdl slang smp speex spell sse sse2 ssl startup-notification svg t1lib tcpd threads tiff truetype unicode urandom usb v4l2 vcd vorbis wifi win32codecs x264 x86 xine xinerama xorg xprint xscreensaver xvid xvmc yahoo zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="canon casio kodak konica minolta mustek panasonic polaroid ricoh samsung sonix sonydscf1 sonydscf55 soundvision toshiba" ELIBC="glibc" INPUT_DEVICES="keyboard mouse linuxinput ps2mouse serialmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="nv ati128 fglrx"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

-march=native should be equivalent to -march=nocona -mtune=generic on C2D. btw, use `size` when comparing binary files.darkphader wrote:Whatever -march=native is doing, it is not providing the equivalent code to -march=nocona.
Here's quick check to see what it is doing (I suspect it's "-march=nocona -mtune=generic" which I understand is the gcc 4.2 recommendation for core2). The output should show you the values native is using.darkphader wrote:Whatever -march=native is doing, it is not providing the equivalent code to -march=nocona.
Code: Select all
touch test.c && gcc -v -c test.c -o test -march=native
try my overlay:mudrii wrote:where can I find working ebuild for gcc-4.2.1 ?

you mean these ?Ishiki wrote:kernelOfTruth, I can't download patches for your ebuild...
And there are many other failing download initalizations after that.emerge -u gcc
Calculating dependencies... done!
>>> Verifying ebuild Manifests...
>>> Emerging (1 of 1) sys-devel/gcc-4.2.1 to /
>>> Downloading 'http://distfiles.gentoo.org/distfiles/g ... .7.tar.bz2'
Initializing download: http://distfiles.gentoo.org/distfiles/g ... .7.tar.bz2
HTTP/1.1 404 Not Found
>>> Downloading 'http://distro.ibiblio.org/pub/linux/dis ... .7.tar.bz2'

You're welcome,Ishiki wrote:Thanks for the link.
It's just odd that those patches are not included in your overlay file and ebuilds have no information about the URL to them.[/code]


ah, well, sorry for the long delayVlad.Sharp wrote:kernelOfTruth: Thanks for the tip, I'll try -Os. Do you know why it keeps appending -fno-stack-protector when compiling paxtest??