Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 522202 - app-emulation/qemu-2.1.0-r1: Unsupported attr/xattr in qemu-user
Summary: app-emulation/qemu-2.1.0-r1: Unsupported attr/xattr in qemu-user
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-05 14:34 UTC by Thomas Reitmayr
Modified: 2014-09-06 12:27 UTC (History)
0 users

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 Thomas Reitmayr 2014-09-05 14:34:42 UTC
Even though qemu was built with the USE flag "xattr" the (statically linked) qemu-arm binary cannot handle attr/xattr syscalls. Doing a simple "ls -l" within an ARM chroot environment (binfmt_misc setup) results in multiple lines like:

qemu: Unsupported syscall: 229

Other programs might lead to different unsupported syscall numbers in the same area, like 231 etc.

The reason is that the ebuild assumes that the "xattr" USE flag is only relevant for qemu-system but not for qemu-user. Looking at the qemu source code in linux-user/syscall.c shows that the attr/xattr implementation is only compiled when configured for attr support ("CONFIG_ATTR"). Therefore the ebuild should set the respective configure flag also for qemu-user, as done by the following patch (inline due to its simplicity):

--- /usr/portage/app-emulation/qemu/qemu-2.1.0-r1.ebuild	2014-09-05 15:49:11.425598991 +0200
+++ qemu-2.1.0-r1.ebuild	2014-09-05 16:29:31.149923024 +0200
@@ -299,6 +299,7 @@ qemu_src_configure() {
 		$(use_enable debug debug-tcg)
 		--enable-docs
 		$(use_enable tci tcg-interpreter)
+		$(use_enable xattr attr)
 	)
 
 	# Disable options not used by user targets as the default configure
@@ -347,7 +348,6 @@ qemu_src_configure() {
 		$(conf_softmmu vhost-net)
 		$(conf_softmmu virtfs)
 		$(conf_softmmu vnc)
-		$(conf_softmmu xattr attr)
 		$(conf_softmmu xen)
 		$(conf_softmmu xen xen-pci-passthrough)
 		$(conf_softmmu xfs xfsctl)


With the patch applied there are no more warnings about unsupported attr/xattr syscalls.

Reproducible: Always

Steps to Reproduce:
1. Build qemu-arm from qemu 2.1.0-r1 with the xattr USE flag set
2. Invoke "ls -l" in chroot ARM environment 
3. Observe multiple messages "qemu: Unsupported syscall: 229"
Actual Results:  
attr/xattr syscalls are not supported

Expected Results:  
attr/xattr syscalls should be supported due to enabled USE flag "xattr"

# emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.7.3, glibc-2.19-r1, 3.16.1-gentoo x86_64)
=================================================================
System uname: Linux-3.16.1-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770S_CPU_@_3.10GHz-with-gentoo-2.2
KiB Mem:     7846508 total,   3608776 free
KiB Swap:    3068408 total,   3068408 free
Timestamp of tree: Fri, 05 Sep 2014 12:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.2.5-r6, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo LOCAL-REPOSITORY
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @FSF-APPROVED dlj-1.1 PUEL sun-bcla-java-vm skype-eula Q3AEULA skype-4.0.0.7-copyright Intel-SDP googleearth >=www-plugins/adobe-flash-11.2.202.258 AdobeFlash-10.3 AdobeFlash-11.x Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mtune=generic -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -mtune=generic -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.inode.at/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="64bit X a52 aac acl acpi airplay alsa amd64 apache2 applet asf avahi berkdb bluetooth branding bzip2 cairo cdda cdparanoia cdr cdrdao cleartype cli colord cracklib crypt cups cxx dbus dlna dri dts dvb dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran g3dvl gallium gbm gd gdbm gif glamor gnome gnome-keyring gnome-online-accounts gphoto2 gpm gstreamer gtk hddtemp iconv introspection ipv6 jpeg kvm lame lcms libcaca libkms libnotify libsecret libvirt libvirtd lm_sensors mad mdnsresponder-compat mms mmx mmxext mng modules mozilla mp3 mp4 mpd mpeg mplayer multilib musicbrainz mysql nautilus ncurses network nfs nls nptl nscd nsplugin ntfs ntp odf ogg opencl opengl openmp openvg pam pango pcre pdf perl png policykit ppds pulseaudio python qemu qt3support qt4 readline samba sdl session sna socialweb speex spell sqlite srt srtp sse sse2 sse3 sse4_1 ssl ssse3 startup-notification stream subtitles svg systemd tcpd theora threads tiff truetype udev udisks unicode upnp upnp-av upower usb uxa v4l vaapi vdpau vhost-net vhosts video virtualbox vnc vorbis vpx win32 wxwidgets x264 xcap xcb xcomposite xfs xft xinetd xml xv xvid xvmc zeroconf zlib zvbi" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" LIRC_DEVICES="userspace" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="arm i386 x86_64 ppc" QEMU_USER_TARGETS="arm armeb i386 x86_64 ppc" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel fbdev vesa apm" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 SpanKY gentoo-dev 2014-09-06 10:15:47 UTC
should be all set now in the tree; thanks for the report!

Commit message: Move USE=xattr logic to common code path since qemu-user uses it too
http://sources.gentoo.org/app-emulation/qemu/qemu-2.1.0-r1.ebuild?r1=1.3&r2=1.4
http://sources.gentoo.org/app-emulation/qemu/qemu-9999.ebuild?r1=1.88&r2=1.89
Comment 2 Thomas Reitmayr 2014-09-06 12:27:33 UTC
Thanks for incorporating the fix so quickly!