First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 51962
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: The Gentoo Linux Hardened Team <hardened@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Travis Snoozy <ai2097@users.sourceforge.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
dosfstools-2.10-lseek64.patch files/dosfstools-2.10-lseek64.patch patch Cory Visi (RETIRED) 2004-06-27 22:06 0000 5.52 KB Details | Diff
dosfstools-2.10.ebuild.diff dosfstools-2.10.ebuild.diff patch Cory Visi (RETIRED) 2004-06-27 22:06 0000 390 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 51962 depends on: Show dependency tree
Show dependency graph
Bug 51962 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-05-24 18:22 0000
I'm in the midst of "rebuilding the world," and dosfstools is one of the
packages that broke in the middle of the operation :p. My guess is that there
is an SSE/MMX-related setting somewhere that this package doesn't paly nice
with (as is usually the case with register-referencing compiler errors); all of
the pertinent output is included here.

Reproducible: Didn't try
Steps to Reproduce:
(emerge dosfsutils, 2.10)
Actual Results:  
It broke:
<snip>
make -C mkdosfs all
make[1]: Entering directory
`/var/tmp/portage/dosfstools-2.10/work/dosfstools-2.10/mkdosfs'
gcc -O2 -fomit-frame-pointer -Wall  -c mkdosfs.c -o mkdosfs.o
mkdosfs.c: In function `_llseek':
mkdosfs.c:110: error: can't find a register in class `BREG' while reloading
`asm'
make[1]: *** [mkdosfs.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/dosfstools-2.10/work/dosfstools-2.10/mkdosfs'
make: *** [all] Error 2

!!! ERROR: sys-fs/dosfstools-2.10 failed.
!!! Function src_compile, Line 36, Exitcode 2
!!! (no error message)

Expected Results:  
It would be quite preferable if the package did not break :).


Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040420-r0,
2.6.5-gentoo)
=================================================================
System uname: 2.6.5-gentoo i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.15
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-g -O2 -march=pentium3 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-g -O2 -march=pentium3 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache nostrip sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/portage_overlay/"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acl acpi aim alsa apache2 app-admin/amanda:xfs app-admin/lcap:lids
app-admin/sdsc-syslog:beep app-admin/webalizer:geoip app-cdr/k3b:monkey
app-crypt/johntheripper:ntlm app-editors/vim:vim-with-x app-editors/xemacs:dnd
app-emulation/fuse:libdsk app-emulation/mol:oldworld app-emulation/mol:sheep
app-emulation/qemu:qemu-fast app-emulation/qemu:softmmu app-emulation/wine:nptl
app-i18n/anthy-ss:ucs4 app-i18n/im-ja:anthy app-i18n/im-ja:skk
app-laptop/tpctl:tpctlir app-misc/grass:nviz app-misc/workrave:distribution
app-misc/workrave:noexercises app-misc/workrave:noexperimental
app-office/gnucash:hbci app-office/gnucash:ofx app-office/gnucash:quotes
app-pda/gtkpod:mpeg4 app-pda/multisync:bluetooth app-pda/multisync:irmc
app-pda/multisync:opie app-pda/synce-kde:avantgo app-sci/gmt:gmtfull
app-sci/gmt:gmthigh app-sci/gmt:gmtsuppl app-sci/gmt:gmttria
app-sci/maxima:auctex app-sci/maxima:clisp app-sci/maxima:cmucl
app-sci/maxima:gcl app-sci/octave-forge:qhull app-sci/octave:blas
app-sci/octave:hdf5 app-sci/orsa:cln app-sci/orsa:gsl app-sci/predict:xforms
app-shells/zsh:cap app-shells/zsh:pcre app-text/namazu:chasen
app-text/namazu:kakasi app-text/sword:icu audiofile avi bidi bonobo caps crypt
cscope cups curl debug dev-db/postgresql:pg-hier
dev-db/postgresql:pg-vacuumdelay dev-dotnet/mono:nptl
dev-games/clanlib:clanJavaScript dev-games/clanlib:clanVoice
dev-games/crystalspace:3ds dev-games/crystalspace:mng
dev-games/crystalspace:openal dev-java/gnu-classpath:native
dev-java/quartz:servlet-2.3 dev-java/quartz:servlet-2.4 dev-java/sun-j2sdk:nptl
dev-lang/tcl:threads dev-lang/tk:threads dev-libs/DirectFB:fusion
dev-libs/libcdio:cddb dev-libs/libmix:no-net2 dev-libs/libsqlora8:pthreads
dev-libs/redland:php dev-lisp/clisp:pcre dev-lisp/gauche-gtk:glgd
dev-lisp/sbcl:threads dev-ml/lablgl:glut dev-ml/lablgtk:glade
dev-ml/lablgtk:svg
dev-php/PEAR-Log:pear-db dev-php/mod_php:hardenedphp dev-python/anygui:wxwin
dev-python/skunkweb:apache1 dev-python/wxPython:unicode
dev-scheme/bigloo-lib:expat dev-scheme/bigloo-lib:ipcs dev-util/eric:idl
dev-util/glade:gnomedb dev-util/monodevelop:nptl dev-util/pbuilder:uml dga
directfb divx4linux doc dvd encode esd ethereal evo fam fastcgi fbcon fftw flac
flash foomaticdb freetds games-arcade/tuxracer:stencil-buffer
games-board/crafty:no-opts games-emulation/xmame:net games-emulation/xmess:net
games-fps/quake2-icculus:rogue games-fps/quake2-icculus:xatrix
games-rpg/nwn:nowin games-server/halflife-metamod:src
games-strategy/freecraft-fcmp:music games-strategy/wesnoth:editor
games-strategy/wesnoth:server games-strategy/wesnoth:tools games-util/xqf:geoip
gb gd ggi gif ginac gnome gnome-extra/libgda:mdb gphoto2 gpm gstreamer gtk gtk2
gtkhtml guile hardened icq imagemagick imap imlib ipv6 jabber java jikes jpeg
kde-base/kdenetwork:wifi kerberos krb4 lcms ldap libg++ libgda libwww mad
maildir mbox mcal media-gfx/blender:fmod media-gfx/fontforge:svg
media-gfx/gimp:gimpprint media-gfx/imagemagick:jbig media-gfx/maya:bundled-libs
media-gfx/nvidia-cg-toolkit:glut media-gfx/opendx:cdf media-gfx/opendx:hdf
media-gfx/sane-frontends:gimp media-libs/dumb:dumb-allegro
media-libs/libao:mmap
media-libs/libsdl:libcaca media-libs/libsdl:noaudio
media-libs/libsdl:nojoystick
media-libs/libsdl:novideo media-libs/sdl-sound:physfs media-libs/tiff:lzw-tiff
media-plugins/mythdvd:transcode media-sound/gnusound:libsamplerate
media-sound/jack-audio-connection-kit:jack-tmpfs media-sound/lilypond:nopfa
media-sound/mpd:aac media-sound/museseq:fluidsynth media-sound/rhythmbox:xine
media-sound/terminatorx:sox media-sound/timidity++:portaudio
media-tv/freevo:matrox media-tv/mythfrontend:cle266 media-tv/mythfrontend:lcd
media-tv/mythtv:cle266 media-tv/mythtv:lcd media-tv/xawdecode:ffmpeg
media-tv/xawtv:zvbi media-video/ffmpeg:faad media-video/mjpegtools:dv
media-video/mjpegtools:yv12 media-video/mplayer:live
media-video/mplayer:matroska media-video/mplayer:v4l media-video/mplayer:v4l2
media-video/vlc:faad media-video/vlc:matroska media-video/vlc:v4l mikmod mmx
mozilla mpeg mpi msn nas ncurses net-analyzer/nagios-core:noweb
net-analyzer/nagios-plugins:nagios-dns net-analyzer/nagios-plugins:nagios-ntp
net-analyzer/nagios-plugins:nagios-ping net-analyzer/nagios-plugins:nagios-ssh
net-analyzer/nstats:pcap net-dialup/gammu:bluetooth net-dialup/gammu:irda
net-dialup/gnokii:bluetooth net-dialup/gnokii:irda net-dialup/ppp:activefilter
net-dialup/ppp:atm net-dns/djbdns:fwdzone net-dns/djbdns:ipv6arpa
net-dns/djbdns:multipleip net-dns/djbdns:roundrobin net-dns/pdnsd:isdn
net-fs/samba:oav net-fs/shfs:amd net-im/gnugadu:tlen net-im/kadu:kadu-modules
net-im/kadu:kadu-voice net-im/silc-toolkit:client net-im/silc-toolkit:server
net-irc/unrealircd:leaf net-libs/libvncserver:no24bpp
net-libs/libvncserver:nobackchannel net-mail/amavisd-new:milter
net-mail/clamav:milter net-mail/courier:fax net-mail/courier:norewrite
net-mail/cyrus-imapd:drac net-mail/dovecot:vpopmail net-mail/exim:dnsdb
net-mail/exim:exiscan net-mail/exim:exiscan-acl net-mail/exim:lmtp
net-mail/exim:wildlsearch net-mail/mutt:nntp net-mail/pine:passfile
net-mail/postfix:vda net-mail/sendmail:milter net-mail/squirrelmail:virus-scan
net-mail/ssmtp:md5sum net-mail/sylpheed-claws:clamav
net-mail/sylpheed-claws:dillo net-mail/vpopmail:ipalias
net-misc/gnugk:accounting net-misc/gnugk:radius net-misc/ntp:parse-clocks
net-misc/nut:cgi net-misc/openssh:X509 net-misc/openssh:chroot
net-misc/openssh:skey net-misc/openvpn:pthreads net-misc/pxes:ltsp
net-misc/ssh:openssh net-misc/zaptel:devfs26 net-misc/zebra:ospfapi
net-p2p/bittorrent-theshadow:psyco net-p2p/mldonkey:mldonkeypango
net-p2p/nicotine:geoip net-www/apache:threads net-www/elinks:lua
net-www/links:javascript net-www/memcached:php net-www/monkeyd:php
net-www/mozilla-firefox:mozsvg net-www/mozilla-firefox:xprint
net-www/mozilla:mozaccess net-www/mozilla:mozcalendar
net-www/mozilla:moznocompose net-www/mozilla:moznoirc net-www/mozilla:moznomail
net-www/mozilla:mozp3p net-www/mozilla:mozsvg net-www/mozilla:mozxmlterm
net-www/mozilla:xprint net-www/opera:operanom2 net-www/pound:msdav
net-www/tinyproxy:transparent-proxy net-www/w3m-m17n:imlib2
net-www/w3m-m17n:migemo net-www/w3m:async net-www/w3m:imlib2
net-www/w3m:lynxkeymap net-www/w3m:migemo netcdf nocd offensive oggvorbis oscar
pam pcmcia pdflib perl pic pie plotutils png pnp ppds python quicktime readline
ruby samba sasl scanner sdl slang slp snmp socks5 speex spell sse ssl svga
sys-apps/busybox:diet sys-apps/busybox:make-busybox-symlinks
sys-apps/busybox:savedconfig sys-apps/busybox:uclibc sys-apps/dbus:mono
sys-apps/iproute2:atm sys-apps/memtest86+:serial sys-apps/memtest86:serial
sys-apps/tcng:tcsim sys-apps/tinylogin:uclibc sys-boot/lilo:devmap
sys-devel/binutils:multitarget sys-devel/gcc:f77 sys-devel/gcc:gcj
sys-devel/gcc:hardened sys-devel/oskit:oskit-profiling
sys-devel/uclibc-buildroot:fullrpc sys-devel/uclibc-buildroot:propolice
sys-devel/uclibc-buildroot:savedconfig sys-fs/lufs:lufsusermount
sys-kernel/gentoo-sources:aavm sys-kernel/gentoo-sources:acpi4linux
sys-kernel/gentoo-sources:usagi sys-libs/glibc:nptl sys-libs/pam:pwdb tcpd
tetex
theora tiff truetype unicode usb vhosts wmf wxwindows x11-base/kdrive:fbdev
x11-base/kdrive:freetype x11-base/kdrive:fs x11-base/kdrive:speedo
x11-base/kdrive:type1 x11-base/xfree-drm:gatos x11-base/xfree-drm:rage128
x11-base/xfree:gatos x11-base/xfree:sdk x11-base/xorg-x11:sdk
x11-libs/gtkmathview:t1lib x11-libs/wxGTK:unicode x11-misc/rss-glx:openal
x11-terms/eterm:escreen x11-terms/eterm:etwin x11-terms/mlterm:uim
x11-terms/rxvt-unicode:xgetdefault x11-terms/rxvt:xgetdefault
x11-wm/enlightenment:xrandr x11-wm/fvwm:rplay x11-wm/fvwm:stroke x86 xinerama
xml xml2 xmms xosd xv xvid yahoo yaz zeo zlib"

------- Comment #1 From Mr. Bones. 2004-05-24 21:55:56 0000 -------
man portage, read about package.keywords

It's more fun than what you're doing to USE.

------- Comment #2 From Mr. Bones. 2004-05-24 21:57:11 0000 -------
hmmmm, maybe this bug should go to hardened?  Looks a lot like #36926

------- Comment #3 From Travis Snoozy 2004-05-25 06:45:33 0000 -------
What? Portage has documentation?! :p
Yeah, I probably need to RTFM again at some point... cat, sed, and use.desc{,.local} are easier on me, but using portage's features is probably more graceful ^^.

But seriously... yes this does look dangerously similar to bug 36926; I'll go ahead and toss it over to the Hardened folks, and see what they have to say.

------- Comment #4 From Cory Visi (RETIRED) 2004-06-24 22:31:53 0000 -------
I confirm this bug with:

gcc (GCC) 3.3.3 20040412 (Gentoo Hardened Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.76)
glibc-2.3.3.20040420
and USE="hardened pic pie"

Bug 36926 either didn't fix it or it was reintroduced somehow.

------- Comment #5 From Cory Visi (RETIRED) 2004-06-27 22:05:16 0000 -------
I don't think this is a hardened issue.

I did a ton of research on this error. The following site talks about these types of compiler errors:
http://my.execpc.com/~geezer/osd/gotchas/index.htm

The difference between this bug and those errors, is that we do not have any inline assembly. This led me to the next step that we probably shouldn't be using the _llseek system call. It's clearly calling up some assembly in the wrong way.

If you examine the llseek definition in both dosfsck/dosfsck.c and mkdosfs/mkdosfs.c, you'll see that there's some silliness related to a glibc bug. Well I tracked this bug down, and here's what the deal is:

http://old.lwn.net/lwn/1998/0625/glibc.html

This bug hasn't been fixed in the way you'd think it would be. Instead, developers are now being encouraged to use lseek64 instead of lseek. Indeed, if you define a function prototype for llseek and use it (which I tried), gcc will warn you to use lseek64 instead of llseek. I went and look as far back as glibc 2.1.3 and I found a working definition for lseek64.

I also checked out the latest sourcecode for e2fsprogs. There is quite a bit of discussion on numerous mailing lists regarding this glibc bug related to e2fsprogs. The way they solved it is with some extensive autoconf logic to test for all the different cases of having llseek, having lseek64, already having a prototype, etc. At this point, I feel it's very safe to simply use lseek64.

If you're still not convinced, here's a great discussion on the issue that confirms my research:
http://www.uwsg.iu.edu/hypermail/linux/kernel/9806.1/0840.html

I have attached a patch for the ebuild, a patch to switch to lseek64, submitted this patch upstream, and encouraged the dosfstools maintainer to read this bug.

I've tested all this and it seems to work!

------- Comment #6 From Cory Visi (RETIRED) 2004-06-27 22:06:28 0000 -------
Created an attachment (id=34317) [edit]
files/dosfstools-2.10-lseek64.patch

------- Comment #7 From Cory Visi (RETIRED) 2004-06-27 22:06:56 0000 -------
Created an attachment (id=34318) [edit]
dosfstools-2.10.ebuild.diff

------- Comment #8 From Cory Visi (RETIRED) 2004-06-27 22:23:23 0000 -------
Interestingly enough, with this patch, we can remove the filter-flags -fPIC.
woo! (That is not in my ebuild diff)

------- Comment #9 From Cory Visi (RETIRED) 2004-06-27 22:49:35 0000 -------
FYI...

<Roman.Hodek@informatik.uni-erlangen.de>: host
    fauern.informatik.uni-erlangen.de[131.188.34.45] said: 553
    <Roman.Hodek@informatik.uni-erlangen.de>... user cannot be delivered
    locally (in reply to RCPT TO command)

------- Comment #10 From Cory Visi (RETIRED) 2004-06-27 23:08:38 0000 -------
Found him at: roman@hodek.net

------- Comment #11 From solar 2004-07-03 11:24:51 0000 -------
Added in dosfstools-2.10-r1.ebuild
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~amd64 ~ia64"

Arch maintainers please test and mark stable.

------- Comment #12 From Danny van Dyk (RETIRED) 2004-07-03 14:04:10 0000 -------
Marked stable on amd64.

------- Comment #13 From Ian Leitch (RETIRED) 2004-07-03 17:40:46 0000 -------
Stable on x86.

------- Comment #14 From Bryan Østergaard (RETIRED) 2004-07-06 18:34:32 0000 -------
Stable on alpha.

------- Comment #15 From Jason Wever (RETIRED) 2004-07-06 20:45:40 0000 -------
I haven't looked into why yet, but dosfsck consistantly generates bus errors on
SPARC.

------- Comment #16 From solar 2004-07-07 01:39:36 0000 -------
Weeve, 
Is that <=dosfstools-2.10 ||  >=dosfstools-2.10-r1 that causes bus errors?
All of the above?

------- Comment #17 From Jason Wever (RETIRED) 2004-07-07 18:56:51 0000 -------
Looks like all of the above.  Tested all versions currently in portage (2.8-r3,
2.9, 2.10 and 2.10-r1) and they all exhibit the same behavior.

------- Comment #18 From Pieter Van den Abeele 2004-08-19 18:52:14 0000 -------
stable on ppc

------- Comment #19 From SpanKY 2004-09-07 15:55:48 0000 -------
ia64 is all set

------- Comment #20 From solar 2004-09-08 18:36:13 0000 -------
Bug seems to be fixed then.

First Last Prev Next    No search results available      Search page      Enter new bug