Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427642 - dev-java/sun-jdk: needs to depend on sys-apps/paxctl
Summary: dev-java/sun-jdk: needs to depend on sys-apps/paxctl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-22 13:55 UTC by Anthony Basile
Modified: 2012-07-23 19:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2012-07-22 13:55:24 UTC
The java binaries bundled in jdk-6u33-linux-x64.bin are precompiled and do not have a PT_PAX_FLAGS program header.  (Natively compiled gentoo binaries do because of a patch in binutils.)  Unfortunately scanelf, which is part of pax-utils and comes on all gentoo systems, will not create a phdr while paxctl will.  So, it needs to depend on sys-apps/paxctl.

1) scanelf failure:

hard-sixtyfour sun-jdk # scanelf -Xxz m /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac
 TYPE    PAX   FILE 
ET_EXEC PeMRxS /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac 

hard-sixtyfour sun-jdk # paxctl -v /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac
PaX control v0.7
Copyright 2004,2005,2006,2007,2009,2010,2011,2012 PaX Team <pageexec@freemail.hu>

file /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac does not have a PT_PAX_FLAGS program header, try conversion


2) paxctl works:

hard-sixtyfour sun-jdk # paxctl -m /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac
file /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac does not have a PT_PAX_FLAGS program header, try conversion

hard-sixtyfour sun-jdk # paxctl -Cm /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac
file /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac got a new PT_PAX_FLAGS program header

hard-sixtyfour sun-jdk # paxctl -v /var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac
PaX control v0.7
Copyright 2004,2005,2006,2007,2009,2010,2011,2012 PaX Team <pageexec@freemail.hu>

- PaX flags: -----m-x-e-- [/var/tmp/portage/dev-java/sun-jdk-1.6.0.33-r1/work/jdk1.6.0_33/bin/javac]
	MPROTECT is disabled
	RANDEXEC is disabled
	EMUTRAMP is disabled


3) In eclass in java-vm_set-pax-markings(), make sure paxctl gets the "C" flag to create the header.  You probably want to add the depend there too and comment that you must force the user of paxctl.
Comment 1 Ralph Sennhauser (RETIRED) gentoo-dev 2012-07-23 19:12:24 UTC
Fixed all sun, oracle and emul JDKs and JREs to depend on pax_kernel? ( sys-apps/paxctl ). Added C to the flags passed to pax-mark in java-vm-2.eclass.

Thanks for the report.