kern/86619: linux emulator interacts oddly with cp

Daniel O'Connor doconnor at
Wed Sep 28 18:30:22 PDT 2005

The following reply was made to PR kern/86619; it has been noted by GNATS.

From: "Daniel O'Connor" <doconnor at>
To: FreeBSD-gnats-submit at
Cc: Andrew Bliznak <andriko.b at>
Subject: Re: kern/86619: linux emulator interacts oddly with cp
Date: Thu, 29 Sep 2005 10:53:54 +0930

 Content-Type: text/plain;
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 On Wednesday 28 September 2005 02:29, Andrew Bliznak wrote:
 > Look like behaviour depends on cp binary
 > gentoo:
 > andrew at beef$ ldd /compat/linux/bin/cp
 > /compat/linux/bin/cp:
 > =3D> /lib/ (0x28075000)
 > /lib/ (0x28057000)
 > debian:
 > andrew at beef$ ldd /compat/linux/bin/cp
 > /compat/linux/bin/cp:
 > =3D> /lib/ (0x28070000)
 > =3D> /lib/ (0x28077000)
 > =3D> /lib/ (0x281aa000)
 > /lib/ =3D> /lib/ (0x28055000)
 Hmm, so RH & Gentoo are OK, but SUSE is not.
 I have seen oddities while trying to build Gentoo stage 1 though - I could =
 get the most recent one to build. It would install binaries with whacky=20
 linux_ktrace shows both creating the file with the same permissions (100644)
   1925 cp-rh8   CALL  linux_open(0xbfbfeaeb,0x8041,0x81a4)
   1925 cp-rh8   NAMI  "def"
   1925 cp-rh8   RET   linux_open 4
   1923 cp-suse9.3 CALL  linux_open(0xbfbfeaeb,0x8041,0x81a4)
   1923 cp-suse9.3 NAMI  "def"
   1923 cp-suse9.3 RET   linux_open 4
 However the SUSE binary chown's the file
   1923 cp-suse9.3 CALL  linux_chmod(0xbfbfeaeb,0xbfbfe430)
   1923 cp-suse9.3 NAMI  "def"
   1923 cp-suse9.3 RET   linux_chmod 0
 Obviously the chmod is broken..
 It looks like it's passing a pointer as the mode_t (!)
 Daniel O'Connor software and network engineer
 for Genesis Software -
 "The nice thing about standards is that there
 are so many of them to choose from."
   -- Andrew Tanenbaum
 GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
 Content-Type: application/pgp-signature
 Version: GnuPG v1.4.1 (FreeBSD)

More information about the freebsd-bugs mailing list