Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 461872

Summary: app-emulation/vmware-modules-271.2 with >=sys-kernel/hardened-sources-3.8.2-r1 - vsock-only/linux/af_vsock.c:3163:7: error: assignment of member ‘family’ in read-only object
Product: Gentoo Linux Reporter: iGentoo <AlphatPC>
Component: HardenedAssignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE) <hardened-kernel+disabled>
Status: RESOLVED UPSTREAM    
Severity: normal CC: hlein, hydrapolic, pageexec
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: vmware-modules-271.2-build.log
vsock-constify.patch
vsock-pax-const.patch
openvm_hardened399_build.log

Description iGentoo 2013-03-15 23:33:10 UTC
Created attachment 342190 [details]
vmware-modules-271.2-build.log

/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c: In function ‘VSockVmciRegisterAddressFamily’:
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c:3163:7: error: assignment of member ‘family’ in read-only object
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c:3167:10: error: assignment of member ‘family’ in read-only object
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c: In function ‘VSockVmciUnregisterAddressFamily’:
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c:3205:4: error: assignment of member ‘family’ in read-only object
make[3]: *** [/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.o] Error 1
make[2]: *** [_module_/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-3.8.2-hardened-r1'
make: *** [vsock.ko] Error 2
 * ERROR: app-emulation/vmware-modules-271.2 failed (compile phase):
 *   emake failed


Portage 2.2.0_alpha166 (hardened/linux/13.0/amd64/selinux, gcc-4.7.2, glibc-2.17, 3.8.3-pax.x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.8.3-pax.x86_64-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.2
KiB Mem:     6114284 total,    502948 free
KiB Swap:   10484724 total,  10481052 free
Timestamp of tree: Fri, 15 Mar 2013 22:00:01 +0000
ld GNU gold (GNU Binutils 2.23.1) 1.11
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.5.4-r5, 2.6.8-r1, 2.7.3-r3, 3.1.5-r1, 3.2.3-r2, 3.3.0-r1
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo systemd hardened-dev gnome custom
Installed sets: @local
ACCEPT_KEYWORDS="amd64 x86 ~amd64 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Wall -Wextra -gdwarf-4 -ggdb -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-Wall -Wextra -gdwarf-4 -ggdb -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going"
FCFLAGS="-Wall -Wextra -gdwarf-4 -ggdb -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms split-elog split-log splitdebug strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-Wall -Wextra -gdwarf-4 -ggdb -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--build-id -Wl,--hash-style=gnu -Wl,--icf=safe"
MAKEOPTS="V=1 -j10"
PKGDIR="/var/portage/packages-amd64"
PORTAGE_BZIP2_COMMAND="lbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9ef"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--ipv4"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/var/lib/layman/systemd /var/lib/layman/hardened-development /var/lib/layman/gnome /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 audit bash-completion berkdb bzip2 c++0x cairo caps cli cracklib crypt custom-cflags cxx dbus dri ffmpeg gdbm gmp gnome gpm gtk gtk3 hardened iconv icu ipv6 jit jpeg jpeg2k justify lzma mmx modules mudflap multilib ncurses nls nptl open_perms opengl openmp orc pam pax_kernel pcre png pulseaudio qt4 readline selinux session sse sse2 ssl svg systemd tcpd threads tiff udev unicode urandom vim-syntax xattr xinetd zlib" ABI_X86="x32 32 64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="bootchart btrfs caps dmsquash-live gensplash livenet lvm nfs ssh-client syslog systemd" 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 ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US zh zh_CN" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="pypy1_9 pypy2_0 python3_1 python3_2 python3_3 python2_5 python2_6 python2_7" QEMU_SOFTMMU_TARGETS="x86_64 arm mips64el ppc64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia" 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"
USE_PYTHON="2.7-pypy-1.9 2.7-pypy-2.0 3.1 3.2 3.3 2.5 2.6 2.7"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND

=================================================================
                        Package Settings
=================================================================

app-emulation/vmware-modules-271.2 was built with the following:
USE="(multilib) pax_kernel (selinux) test" ABI_X86="64"
Comment 1 PaX Team 2013-04-07 18:02:51 UTC
something like this should work: http://pastebin.com/dVPszctW
Comment 2 Anton Bolshakov 2013-05-30 02:57:52 UTC
(In reply to PaX Team from comment #1)
> something like this should work: http://pastebin.com/dVPszctW

PaX Team, your link has expired, could you repost it?..
Comment 3 iGentoo 2013-05-31 21:28:45 UTC
Created attachment 349764 [details, diff]
vsock-constify.patch
Comment 4 iGentoo 2013-05-31 21:34:36 UTC
Created attachment 349766 [details, diff]
vsock-pax-const.patch
Comment 5 Anthony Basile gentoo-dev 2013-06-24 21:44:06 UTC
What is the state of this bug?  Still a problem.  Anything for us to do here?
Comment 6 PaX Team 2013-06-24 22:32:56 UTC
(In reply to Anthony Basile from comment #5)
> What is the state of this bug?  Still a problem.  Anything for us to do here?

if i'm not mistaken, vsock is in 3.9 now and should compile fine.
Comment 7 Mike 2013-06-26 14:30:58 UTC
I'm still getting this issue when pax options are enabled in the kernel:

/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c: In function ‘VSockVmciRegisterAddressFamily’:    
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c:3163:7: error: assignment of member ‘family’ in re
ad-only object                                                                                                                         
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c:3167:10: error: assignment of member ‘family’ in r
ead-only object                                                                                                                        
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c: In function ‘VSockVmciUnregisterAddressFamily’:  
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.c:3205:4: error: assignment of member ‘family’ in re
ad-only object                                                                                                                         
make[3]: *** [/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/af_vsock.o] Error 1                            
make[2]: *** [_module_/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only] Error 2                                     
make[1]: *** [sub-make] Error 2                                                                                                        
make[1]: Leaving directory `/usr/src/linux-3.9.7-hardened'                                                                             
make: *** [vsock.ko] Error 2                                                                                                           
 * ERROR: app-emulation/vmware-modules-271.2 failed (compile phase):                                                                   
 *   emake failed                                                                                                                      
 *                                                                                                                                     
 * If you need support, post the output of `emerge --info '=app-emulation/vmware-modules-271.2'`,                                      
 * the complete build log and the output of `emerge -pqv '=app-emulation/vmware-modules-271.2'`.                                       
 * The complete build log is located at '/var/tmp/portage/app-emulation/vmware-modules-271.2/temp/build.log'.                          
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/vmware-modules-271.2/temp/environment'.                   
 * Working directory: '/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only'                                            
 * S: '/var/tmp/portage/app-emulation/vmware-modules-271.2/work'                                                                     



# uname -a

Linux akarin 3.9.7-hardened #1 SMP Wed Jun 26 06:36:36 PDT 2013 x86_64 Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz GenuineIntel GNU/Linux
Comment 8 PaX Team 2013-06-26 15:03:44 UTC
(In reply to Mike from comment #7)
> I'm still getting this issue when pax options are enabled in the kernel:
> 
> /var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/
> af_vsock.c: In function ‘VSockVmciRegisterAddressFamily’:    

i guess vsock should be disabled in vmware-modules when compiling for linux 3.9 since it has its own vsock module now.
Comment 9 Mike 2013-06-27 05:03:41 UTC
(In reply to PaX Team from comment #8)
> (In reply to Mike from comment #7)
> > I'm still getting this issue when pax options are enabled in the kernel:
> > 
> > /var/tmp/portage/app-emulation/vmware-modules-271.2/work/vsock-only/linux/
> > af_vsock.c: In function ‘VSockVmciRegisterAddressFamily’:    
> 
> i guess vsock should be disabled in vmware-modules when compiling for linux
> 3.9 since it has its own vsock module now.

Yeah, I remember reading that VSOCK was going to be included in the kernel. Either way, I'll have to leave the fix up to the teams working on the bug. I just wanted to submit a report saying I'm still having the issue with the 3.9 kernel.
Comment 10 Tomáš Mózes 2013-07-30 12:14:09 UTC
Same for app-emulation/open-vm-tools-kmod-2013.04.16.1098359 with hardened-sources-3.9.9.
Comment 11 Tomáš Mózes 2013-07-30 12:14:36 UTC
Created attachment 354606 [details]
openvm_hardened399_build.log
Comment 12 Anthony Basile gentoo-dev 2014-11-29 14:02:20 UTC
This is an old bug which I was never really able to test.  Is the readonly object fixed?
Comment 13 Tomáš Mózes 2014-12-29 16:33:36 UTC
This got fixed in latest open-vm-tools-kmod where the building of vsock is disabled on kernel > 3.9 since it's already upstream.