Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154896 - mmx/mmxext/sse* use flag masked on hardened/amd64
Summary: mmx/mmxext/sse* use flag masked on hardened/amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-12 08:42 UTC by Hopeless
Modified: 2009-04-23 18:31 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 Hopeless 2006-11-12 08:42:39 UTC
The mmxext use flag was masked on amd64 as it was enabled by default, however this was changed because intel x86_64 cpu's don't support it.
Problem is the use flag is still masked on amd64, so even those using an amd cpu which does support it can't enable it.

Excerpt from /usr/portage/profiles/default-linux/amd64/ChangeLog;
  25 Oct 2006; Simon Stelling <blubb@gentoo.org> package.use.force:
  don't hard-enable mmxext for mplayer anymore

  25 Oct 2006; Simon Stelling <blubb@gentoo.org> make.defaults:
  apparently EM64T doesn't support mmxext, so don't enable it by default


I'm on hardened amd64, using the "/usr/portage/profiles/hardened/amd64/" profile, but from what I can see the same applies to the default 2006.1 amd64 profiles.
Comment 1 Christoph Mende (RETIRED) gentoo-dev 2006-11-12 08:44:19 UTC
Upgrade to portage 2.1.2 and enable it in make.conf
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-11-12 10:05:34 UTC
Not a bug.
Comment 3 Hopeless 2006-11-12 10:18:14 UTC
(In reply to comment #2)
> Not a bug.
> 

I'm sorry, but how is this not a bug?

Currently the only way to add mmxext support to a package in portage such as mplayer is to manually edit the ebuild and add --enable-mmxext

Or is there some reason why mmxext should not be enabled on ANY amd64 machines?
Comment 4 Hopeless 2006-11-12 12:05:40 UTC
I'm re-opening this bug, as it'll just be ignored otherwise, if you're going to close it again fine, but at least respond to my last comment and explain WHY this is not a bug

(In reply to comment #1)
> Upgrade to portage 2.1.2 and enable it in make.conf
> 

I don't see how this would fix it, but I just tried out 2.1.2 rc1-r6 anyway, and no change (was using 2.1.1-r1).
mmxext is in make.conf's USE setting, but is filtered out, see my abridged emerge --info for details;

Portage 2.1.2_rc1-r6 (hardened/amd64, gcc-3.4.6, glibc-2.3.6-r4, 2.6.18-hardened x86_64)
=================================================================
System uname: 2.6.18-hardened x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.6
Last Sync: Sun, 12 Nov 2006 13:00:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3, 2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ABI="amd64"
ACCEPT_KEYWORDS="amd64"
ARCH="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CDEFINE_amd64="__x86_64__"
CFLAGS="-O2 -march=athlon64 -mtune=athlon64 -pipe -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="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 /usr/share/hddtemp"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CVS_RSH="ssh"
CXXFLAGS="-O2 -march=athlon64 -mtune=athlon64 -pipe -fforce-addr"
DEFAULT_ABI="amd64"
ELIBC="glibc"
FEATURES="autoconfig collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict stricter userfetch usersandbox"
GCC_SPECS=""
GENERATION="2"
GRP_STAGE23_USE="amd64 berkdb crypt hardened justify nls pam pic readline ssl userlocales tcpd zlib"
LANG="en_IE@euro"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LIBDIR_amd64="lib64"
LINGUAS="en en_GB eu"
MULTILIB_ABIS="amd64"
NOCOLOR="true"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha ppc-macos hppa sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib/portage/bin"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_NICENESS="19"
PORTAGE_PYM_PATH="/usr/lib/portage/pym"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
PYTHONPATH="/usr/lib/portage/pym"
QMAKESPEC="linux-g++"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp --limit-rate=100k ${URI} -P ${DISTDIR}"
STAGE1_USE="hardened pic userlocales"
SYMLINK_LIB="yes"
USB_DEVFS_PATH="/dev/bus/usb"
USE="3dnow 3dnowext X a52 aac acpi aiglx alsa amd64 asf branding bzip2 cairo caps cdparanoia chardet cracklib crypt css cups djvu dlloader dri dts dv dvd dvdr elibc_glibc encode exif fastcgi ffmpeg flac foomaticdb gimp glibc-omitfp glitz glut gphoto2 gpm gtk hardened icecast imlib input_devices_evdev input_devices_keyboard input_devices_mouse ithreads jikes jpeg justify kernel_linux lcms linguas_en linguas_en_GB linguas_eu lm_sensors mad mmap mouse mp3 mp4 mpeg mysql ncurses network no-old-linux nptl nptlonly ogg opengl php pic png ppds pulseaudio quicktime readline rtc sse sse2 ssl svg tcpd theora threads threadsafe transcode usb userland_GNU userlocales utempter v4l v4l2 video_cards_r200 video_cards_radeon vorbis x264 xanim xcomposite xine xinetd xorg xrandr xv xvid yv12 zlib"
USE_EXPAND="CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal"
ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal"
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-11-12 12:31:51 UTC
As already said, this in intended. It's unmasked for mplayer in package.use.mask, read the package.use.{mask,force} files in default-linux/amd64 profile and man portage. It won't be visible in emerge --info output as it's unmasked on a per-package basis, not globally.

Not a bug, closing.

Comment 6 Christoph Mende (RETIRED) gentoo-dev 2006-11-12 13:12:56 UTC
portage 2.1.1:
[ebuild  N    ] media-video/mplayer-1.0_pre8  USE="X aac alsa cdparanoia dvd dvdread encode gif gtk jpeg lirc mad opengl png rtc sdl truetype unicode v4l v4l2 vorbis x264 xinerama xv xvid (-3dfx) (-3dnow) (-3dnowext) -aalib (-altivec) -arts -bidi -bindist -bl -cpudetection -custom-cflags -debug -dga -directfb -doc -dts -dv -dvb -esd -fbcon -ggi -i8x0 -ipv6 -jack -joystick -libcaca -live -livecd -lzo -matrox (-mmx) (-mmxext) -musepack -nas -nvidia -openal -oss (-real) -samba -speex (-sse) (-sse2) (-svga) -tga -theora (-win32codecs) -xanim -xvmc" LINGUAS="-bg -cs -da -de -el -en -es -fr -hu -ja -ko -mk -nl -no -pl -pt_BR -ro -ru -sk -tr -uk -zh_CN -zh_TW" 8,885 kB

portage 2.1.2:
[ebuild   R   ] media-video/mplayer-1.0_pre8  USE="3dnow 3dnowext X aac alsa dvd dvdread encode gif gtk jpeg lirc mad (mmx) mmxext opengl png rtc sdl (sse) (sse2) truetype unicode v4l v4l2 vorbis xinerama xv xvid (-3dfx) -aalib (-altivec) -arts -bidi -bindist -bl -cdparanoia -cpudetection -custom-cflags -debug -dga -directfb -doc -dts -dv -dvb -esd -fbcon -ggi -i8x0 -ipv6 -jack -joystick -libcaca -live -livecd -lzo -matrox -musepack -nas -nvidia -openal -oss (-real) -samba -speex (-svga) -tga -theora (-win32codecs) -x264 -xanim -xvmc" LINGUAS="-bg -cs -da -de -el -en -es -fr -hu -ja -ko -mk -nl -no -pl -pt_BR -ro -ru -sk -tr -uk -zh_CN -zh_TW" 0 kB

-> No bug, kinda a feature
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-11-12 13:34:28 UTC
Closing now. ;)
Comment 8 Hopeless 2006-11-12 15:02:05 UTC
portage 2.1.1;
[ebuild   R   ] media-video/mplayer-1.0_rc1  USE="3dnow 3dnowext X aac alsa cdparanoia dts dvd encode iconv mad opengl png rtc sse sse2 theora truetype v4l v4l2 vorbis x264 xanim xv xvid (-3dfx) -aalib (-altivec) -amr -arts -bidi -bindist -bl -cpudetection -custom-cflags -debug -dga -directfb -doc -dv -dvb -dvdread -enca -esd -fbcon -ggi -gif -gtk -ipv6 -jack -joystick -jpeg -libcaca -lirc -live -livecd -lzo -matrox (-mmx) (-mmxext) -musepack -nas -openal -oss (-real) -samba -sdl -speex (-svga) -tga -unicode (-win32codecs) -xinerama -xvmc" LINGUAS="en -bg -cs -da -de -el -es -fr -hu -ja -ko -mk -nl -no -pl -pt_BR -ro -ru -sk -tr -uk -zh_CN -zh_TW" 0 kB

portage 2.1.2;
[ebuild   R   ] media-video/mplayer-1.0_rc1  USE="3dnow 3dnowext X aac alsa cdparanoia dts dvd encode iconv mad opengl png rtc sse sse2 theora truetype v4l v4l2 vorbis x264 xanim xv xvid (-3dfx) -aalib (-altivec) -amr -arts -bidi -bindist -bl -cpudetection -custom-cflags -debug -dga -directfb -doc -dv -dvb -dvdread -enca -esd -fbcon -ggi -gif -gtk -ipv6 -jack -joystick -jpeg -libcaca -lirc -live -livecd -lzo -matrox (-mmx) (-mmxext) -musepack -nas -openal -oss (-real) -samba -sdl -speex (-svga) -tga -unicode (-win32codecs) -xinerama -xvmc" LINGUAS="en -bg -cs -da -de -el -es -fr -hu -ja -ko -mk -nl -no -pl -pt_BR -ro -ru -sk -tr -uk -zh_CN -zh_TW" 0 kB

No change.

HOWEVER, with 2.1.2 and the "/default-linux/amd64/2006.1/no-multilib/" profile;
[ebuild   R   ] media-video/mplayer-1.0_rc1  USE="3dnow 3dnowext X aac alsa cdparanoia dts dvd encode iconv ipv6* mad (mmx*) mmxext* opengl png rtc (sse) (sse2) theora truetype unicode* v4l v4l2 vorbis x264 xanim xv xvid (-3dfx) -aalib (-altivec) -amr -arts -bidi -bindist -bl -cpudetection -custom-cflags -debug -dga -directfb -doc -dv -dvb -dvdread -enca -esd -fbcon -ggi -gif -gtk -jack -joystick -jpeg -libcaca -lirc -live -livecd -lzo -matrox -musepack -nas -openal -oss (-real) -samba -sdl -speex (-svga) -tga (-win32codecs) -xinerama -xvmc" LINGUAS="en -bg -cs -da -de -el -es -fr -hu -ja -ko -mk -nl -no -pl -pt_BR -ro -ru -sk -tr -uk -zh_CN -zh_TW" 0 kB


So this there is a problem, but it's only with "hardened/amd64/" profile.


For the sake of comparison, the default profile with 2.1.1;
[ebuild   R   ] media-video/mplayer-1.0_rc1  USE="X aac alsa cdparanoia dts dvd encode iconv ipv6* mad opengl png rtc theora truetype unicode* v4l v4l2 vorbis x264 xanim xv xvid (-3dfx) (-3dnow*) (-3dnowext*) -aalib (-altivec) -amr -arts -bidi -bindist -bl -cpudetection -custom-cflags -debug -dga -directfb -doc -dv -dvb -dvdread -enca -esd -fbcon -ggi -gif -gtk -jack -joystick -jpeg -libcaca -lirc -live -livecd -lzo -matrox (-mmx) (-mmxext) -musepack -nas -openal -oss (-real) -samba -sdl -speex (-sse*) (-sse2*) (-svga) -tga (-win32codecs) -xinerama -xvmc" LINGUAS="en -bg -cs -da -de -el -es -fr -hu -ja -ko -mk -nl -no -pl -pt_BR -ro -ru -sk -tr -uk -zh_CN -zh_TW" 0 kB

I checked with the default profile before reporting, but not with 2.1.2.

Anyway, I'll leave this as closed, I think I've bothered you all enough as it is. ;)
You can decide wether or not it's worth taking a look at.

Thank you both for the prompt replys.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-11-12 15:09:54 UTC
(In reply to comment #8)
> So this there is a problem, but it's only with "hardened/amd64/" profile.

Would save us quite a bit of time if you told that you are using hardened profile in the first place... ;)
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-11-12 15:10:11 UTC
@blubb - looks like you've missed a profile or two here :)
Comment 11 Hopeless 2006-11-12 15:52:27 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > So this there is a problem, but it's only with "hardened/amd64/" profile.
> 
> Would save us quite a bit of time if you told that you are using hardened
> profile in the first place... ;)
> 

Ahem.

My original post;
I'm on hardened amd64, using the "/usr/portage/profiles/hardened/amd64/"
profile, but from what I can see the same applies to the default 2006.1 amd64
profiles.

:p
Comment 12 Simon Stelling (RETIRED) gentoo-dev 2006-11-13 07:43:43 UTC
This is wierd. In the hardened profile, there are some (not all, though) SIMD use flags unmasked, actually since July. When they should have been masked. I will have a closer look at it, but for now, what you get is the correct behaviour, because the mmx, sse and sse2 use flags are hard-enabled in the ebuild anyway, so you WILL get it.
Comment 13 Kevin F. Quinn (RETIRED) gentoo-dev 2006-11-13 09:25:02 UTC
The SIMD use flags should not be masked on hardened.  The use of MMX, SSE etc is not intrinsically in conflict with hardened.

The SIMD use flag masking was inverted a while back; so that by default in base they're all masked, then unmasked on appropriate arches.  Hardened should be no different from default-linux in that respect (please let me know if there are differences) - we may have noticed somewhat later than default-linux ;)

The problem for hardened occurs when assembler code is written for the non-PIC ABI - it _should_ never be a problem for shared library code (but often is - although many of these have now been fixed).  This is most frequently seen with SIMD code, because that's the most common incidence of hand-crafted assembler.

The use of SIMD code should be managed on a per-ebuild basis, conditional on USE=hardened where appropriate.  So, for example, if you know the mmxext code for mplayer is non-PIC, then it has to be configured out, unless some brave soul wants to modify it.
Comment 14 Kevin F. Quinn (RETIRED) gentoo-dev 2006-11-13 09:47:01 UTC
BTW modifying assembler code for executables is usually not worth the trouble. We would have to maintain any such patch; they are often large, and it's far too easy to make nasty mistakes.  Where the code is for an executable there's no reason upstream should accept such patches.

Patches to shared libraries on the other hand are normally acceptable to sane upstreams, so can be worth doing.
Comment 15 Simon Stelling (RETIRED) gentoo-dev 2006-12-13 02:59:00 UTC
Sorry for not getting back to this earlier. Anyways, this is up to hardened. If they want to control it in the ebuild rather then the profiles, that's their decision. Reassigning.
Comment 16 Gordon Malm (RETIRED) gentoo-dev 2009-04-23 18:31:00 UTC
SIMD USE flags being masked on hardened/amd64 is fixed.  File new bugs for new issues.  Only re-open this bug if something directly related to the overall notion of SIMD USE flags being masked on hardened/amd64.