Date: Fri, 4 Dec 2009 19:35:02 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Boris Samorodov <bsam@ipt.ru> Cc: freebsd-current@freebsd.org Subject: Re: amd64 host + i386 jail + ls -l = core dumped Message-ID: <20091204173502.GJ43143@deviant.kiev.zoral.com.ua> In-Reply-To: <20226798@bb.ipt.ru> References: <20226798@bb.ipt.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--fmvA4kSBHQVZhkR6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Dec 04, 2009 at 06:36:49PM +0300, Boris Samorodov wrote:
> Hello List,
>=20
> I'm using an amd64 system (r200095):
> -----
> % uname -srm
> FreeBSD 9.0-CURRENT amd64
> -----
>=20
> The i386 jail was build with the same sources. There is a problem
> in the jail:
> -----
> % sudo jail -c path=3D/export/diskless_root host.hostname=3Dtesthostname =
ip4.addr=3D127.0.0.10 command=3D/bin/csh
> %uname -m
> amd64
> %setenv UNAME_m i386
> %uname -m
> i386
> %cd /root
> %ls
> ls.core test.txt
> %ls -l
> total 8191
> Bad system call (core dumped)
> % %gdb /bin/ls ls.core=20
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you =
are
> welcome to change it and/or distribute copies of it under certain conditi=
ons.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for detail=
s.
> This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols =
found)...
> Core was generated by `ls'.
> Program terminated with signal 12, Bad system call.
> Reading symbols from /lib/libutil.so.8...(no debugging symbols found)...d=
one.
> Loaded symbols for /lib/libutil.so.8
> Reading symbols from /lib/libncurses.so.8...(no debugging symbols found).=
..done.
> Loaded symbols for /lib/libncurses.so.8
> Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
> Loaded symbols for /lib/libc.so.7
> Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found).=
..done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0 0x2814316f in __sys___acl_get_link () from /lib/libc.so.7
> (gdb) bt
> #0 0x2814316f in __sys___acl_get_link () from /lib/libc.so.7
> #1 0x2814303c in acl_get_link_np () from /lib/libc.so.7
> #2 0x0804c2f9 in ?? ()
> #3 0xffffcb83 in ?? ()
> #4 0x00000004 in ?? ()
> [...]
It seems that struct acl does not need translation. And another block
of acl-related syscalls do not touch it.
Please try the patch below. After application of the patch, cd to
sys/compat/freebsd32 directory and do make sysent. Then, rebuild
the kernel as usual.
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/sy=
scalls.master
index 865f0c1..485f7a6 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -740,10 +740,14 @@
struct freebsd32_ucontext *oucp, \
const struct freebsd32_ucontext *ucp); }
424 AUE_SWAPOFF UNIMPL swapoff
-425 AUE_NULL UNIMPL __acl_get_link
-426 AUE_NULL UNIMPL __acl_set_link
-427 AUE_NULL UNIMPL __acl_delete_link
-428 AUE_NULL UNIMPL __acl_aclcheck_link
+425 AUE_NULL NOPROTO { int __acl_get_link(const char *path, \
+ acl_type_t type, struct acl *aclp); }
+426 AUE_NULL NOPROTO { int __acl_set_link(const char *path, \
+ acl_type_t type, struct acl *aclp); }
+427 AUE_NULL NOPROTO { int __acl_delete_link(const char *path, \
+ acl_type_t type); }
+428 AUE_NULL NOPROTO { int __acl_aclcheck_link(const char *path, \
+ acl_type_t type, struct acl *aclp); }
429 AUE_SIGWAIT NOPROTO { int sigwait(const sigset_t *set, \
int *sig); }
430 AUE_NULL UNIMPL thr_create;
--fmvA4kSBHQVZhkR6
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
iEYEARECAAYFAksZSEUACgkQC3+MBN1Mb4iBqgCgupAVAC/EfVz98KID0S+SxwT+
3i0An2kAmQWs/V1HkrY8ltLp/+rOHisN
=WUGj
-----END PGP SIGNATURE-----
--fmvA4kSBHQVZhkR6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091204173502.GJ43143>
