Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2009 16:54:02 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Tim Kientzle <kientzle@freebsd.org>
Cc:        Dmitry Marakasov <amdmi3@amdmi3.ru>, freebsd-current@freebsd.org
Subject:   Re: Missing extattr syscalls on compat32 (was Re: libarchive extattr i386/amd64 syscall issue)
Message-ID:  <20090604135402.GT1927@deviant.kiev.zoral.com.ua>
In-Reply-To: <4A2750F0.3070106@freebsd.org>
References:  <20090604010719.GC15659@hades.panopticon> <4A2750F0.3070106@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--nPfW/i9ThgtiBSRK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jun 03, 2009 at 09:43:28PM -0700, Tim Kientzle wrote:
> Dmitry Marakasov wrote:
> >
> >The problem: on recent current, 32bit bsdtar won't write archives when
> >running under 64bit kernel, dying with exit code 140 and `Bad system cal=
l'
> >message. I've ran into that using i386 tinderbox jail on amd64 host.
> >The problem actually happens in libarchive:
> >
> >--- lib/libarchive/archive_read_disk_entry_from_file.c ---
> >   484		if (!a->follow_symlinks)
> >   485			list_size =3D extattr_list_link(path,=20
> >   namespace, NULL, 0);   // <-- HERE
> >   486		else
> >   487			list_size =3D extattr_list_file(path,=20
> >   namespace, NULL, 0);
> >--- lib/libarchive/archive_read_disk_entry_from_file.c ---
>=20
> Yes, it looks like only about half of the extattr calls are
> actually connected in the freebsd32 compatibility layer. (see below)
> According to SVN history, peter@ reserved these slots back
> in December 2003 but no one ever went back and connected
> them up.  I don't know if there was a reason for not
> connecting them or if simply no one remembered to do so.
> I would guess the latter; the ones that are connected
> were all implemented before mid-2002.
>=20
> I don't see any obvious reason these should not just
> work.  If you're feeling adventurous, you could try
> copying the data from /usr/src/kern/syscalls.master
> and see what happens.  I don't have a 64-bit system
> handy here or I would try this myself.
>=20
> You can test by going to /usr/src/lib/libarchive/test and
> running "make check".  That will build and run the libarchive
> test suite, which does exercise the extended attribute support.
> (Of course, you should revert your change first so that the
> extended attribute support is actually compiled.)
>=20
> Let me know if you find anything,
>=20
> Tim
>=20
>=20
> $ grep extattr /usr/src/sys/compat/freebsd32/syscalls.master
> 355     AUE_EXTATTRCTL  NOPROTO { int extattrctl(const char *path, int=20
> cmd, \
> 356     AUE_EXTATTR_SET_FILE    NOPROTO { int extattr_set_file( \
> 357     AUE_EXTATTR_GET_FILE    NOPROTO { ssize_t extattr_get_file( \
> 358     AUE_EXTATTR_DELETE_FILE NOPROTO { int extattr_delete_file( \
> 371     AUE_EXTATTR_SET_FD      NOPROTO { int extattr_set_fd(int fd, \
> 372     AUE_EXTATTR_GET_FD      NOPROTO { ssize_t extattr_get_fd(int fd, \
> 373     AUE_EXTATTR_DELETE_FD   NOPROTO { int extattr_delete_fd(int fd, \
> 412     AUE_EXTATTR_SET_LINK    UNIMPL  extattr_set_link
> 413     AUE_EXTATTR_GET_LINK    UNIMPL  extattr_get_link
> 414     AUE_EXTATTR_DELETE_LINK UNIMPL  extattr_delete_link
> 437     AUE_EXTATTR_LIST_FD     UNIMPL  extattr_list_fd
> 438     AUE_EXTATTR_LIST_FILE   UNIMPL  extattr_list_file
> 439     AUE_EXTATTR_LIST_LINK   UNIMPL  extattr_list_link

The size_t arguments need translation. Please try the patch below.

diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/f=
reebsd32_misc.c
index 9301b8d..e8526de 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2719,6 +2719,73 @@ freebsd32_nmount(struct thread *td,
 	return error;
 }
=20
+int
+freebsd32_extattr_set_link(struct thread *td,
+    struct freebsd32_extattr_set_link_args *uap)
+{
+	struct extattr_set_link_args ap;
+
+	ap.path =3D uap->path;
+	ap.attrnamespace =3D uap->attrnamespace;
+	ap.attrname =3D uap->attrname;
+	ap.data =3D uap->data;
+	ap.nbytes =3D uap->nbyteslo | ((size_t)uap->nbyteshi << 32);
+	return (extattr_set_link(td, &ap));
+}
+
+int
+freebsd32_extattr_get_link(struct thread *td,
+    struct freebsd32_extattr_get_link_args *uap)
+{
+	struct extattr_get_link_args ap;
+
+	ap.path =3D uap->path;
+	ap.attrnamespace =3D uap->attrnamespace;
+	ap.attrname =3D uap->attrname;
+	ap.data =3D uap->data;
+	ap.nbytes =3D uap->nbyteslo | ((size_t)uap->nbyteshi << 32);
+	return (extattr_get_link(td, &ap));
+}
+
+int
+freebsd32_extattr_list_fd(struct thread *td,
+    struct freebsd32_extattr_list_fd_args *uap)
+{
+	struct extattr_list_fd_args ap;
+
+	ap.fd =3D uap->fd;
+	ap.attrnamespace =3D uap->attrnamespace;
+	ap.data =3D uap->data;
+	ap.nbytes =3D uap->nbyteslo | ((size_t)uap->nbyteshi << 32);
+	return (extattr_list_fd(td, &ap));
+}
+
+int
+freebsd32_extattr_list_file(struct thread *td,
+    struct freebsd32_extattr_list_file_args *uap)
+{
+	struct extattr_list_file_args ap;
+
+	ap.path =3D uap->path;
+	ap.attrnamespace =3D uap->attrnamespace;
+	ap.data =3D uap->data;
+	ap.nbytes =3D uap->nbyteslo | ((size_t)uap->nbyteshi << 32);
+	return (extattr_list_file(td, &ap));
+}
+
+int
+freebsd32_extattr_list_link(struct thread *td,
+    struct freebsd32_extattr_list_link_args *uap)
+{
+	struct extattr_list_link_args ap;
+
+	ap.path =3D uap->path;
+	ap.attrnamespace =3D uap->attrnamespace;
+	ap.data =3D uap->data;
+	ap.nbytes =3D uap->nbyteslo | ((size_t)uap->nbyteshi << 32);
+	return (extattr_list_link(td, &ap));
+}
+
 #if 0
 int
 freebsd32_xxx(struct thread *td, struct freebsd32_xxx_args *uap)
diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/=
freebsd32_proto.h
index 5a12c5d..4365322 100644
--- a/sys/compat/freebsd32/freebsd32_proto.h
+++ b/sys/compat/freebsd32/freebsd32_proto.h
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 191673 =
2009-04-29 21:14:15Z jamie=20
+ * created from FreeBSD
  */
=20
 #ifndef _FREEBSD32_SYSPROTO_H_
@@ -317,6 +317,22 @@ struct freebsd32_sendfile_args {
 	char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_=
t *)];
 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
 };
+struct freebsd32_extattr_set_link_args {
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(=
const char *)];
+	char attrnamespace_l_[PADL_(int)]; int attrnamespace; char attrnamespace_=
r_[PADR_(int)];
+	char attrname_l_[PADL_(const char *)]; const char * attrname; char attrna=
me_r_[PADR_(const char *)];
+	char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)];
+	char nbyteslo_l_[PADL_(u_int32_t)]; u_int32_t nbyteslo; char nbyteslo_r_[=
PADR_(u_int32_t)];
+	char nbyteshi_l_[PADL_(u_int32_t)]; u_int32_t nbyteshi; char nbyteshi_r_[=
PADR_(u_int32_t)];
+};
+struct freebsd32_extattr_get_link_args {
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(=
const char *)];
+	char attrnamespace_l_[PADL_(int)]; int attrnamespace; char attrnamespace_=
r_[PADR_(int)];
+	char attrname_l_[PADL_(const char *)]; const char * attrname; char attrna=
me_r_[PADR_(const char *)];
+	char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)];
+	char nbyteslo_l_[PADL_(u_int32_t)]; u_int32_t nbyteslo; char nbyteslo_r_[=
PADR_(u_int32_t)];
+	char nbyteshi_l_[PADL_(u_int32_t)]; u_int32_t nbyteshi; char nbyteshi_r_[=
PADR_(u_int32_t)];
+};
 struct freebsd32_sigaction_args {
 	char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
 	char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char =
act_r_[PADR_(struct sigaction32 *)];
@@ -341,6 +357,27 @@ struct freebsd32_umtx_lock_args {
 struct freebsd32_umtx_unlock_args {
 	char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR=
_(struct umtx *)];
 };
+struct freebsd32_extattr_list_fd_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char attrnamespace_l_[PADL_(int)]; int attrnamespace; char attrnamespace_=
r_[PADR_(int)];
+	char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)];
+	char nbyteslo_l_[PADL_(u_int32_t)]; u_int32_t nbyteslo; char nbyteslo_r_[=
PADR_(u_int32_t)];
+	char nbyteshi_l_[PADL_(u_int32_t)]; u_int32_t nbyteshi; char nbyteshi_r_[=
PADR_(u_int32_t)];
+};
+struct freebsd32_extattr_list_file_args {
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(=
const char *)];
+	char attrnamespace_l_[PADL_(int)]; int attrnamespace; char attrnamespace_=
r_[PADR_(int)];
+	char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)];
+	char nbyteslo_l_[PADL_(u_int32_t)]; u_int32_t nbyteslo; char nbyteslo_r_[=
PADR_(u_int32_t)];
+	char nbyteshi_l_[PADL_(u_int32_t)]; u_int32_t nbyteshi; char nbyteshi_r_[=
PADR_(u_int32_t)];
+};
+struct freebsd32_extattr_list_link_args {
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(=
const char *)];
+	char attrnamespace_l_[PADL_(int)]; int attrnamespace; char attrnamespace_=
r_[PADR_(int)];
+	char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)];
+	char nbyteslo_l_[PADL_(u_int32_t)]; u_int32_t nbyteslo; char nbyteslo_r_[=
PADR_(u_int32_t)];
+	char nbyteshi_l_[PADL_(u_int32_t)]; u_int32_t nbyteshi; char nbyteshi_r_[=
PADR_(u_int32_t)];
+};
 struct freebsd32_thr_suspend_args {
 	char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec3=
2 * timeout; char timeout_r_[PADR_(const struct timespec32 *)];
 };
@@ -510,6 +547,8 @@ int	freebsd32_aio_waitcomplete(struct thread *, struct =
freebsd32_aio_waitcomplet
 int	freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *);
 int	freebsd32_nmount(struct thread *, struct freebsd32_nmount_args *);
 int	freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *);
+int	freebsd32_extattr_set_link(struct thread *, struct freebsd32_extattr_s=
et_link_args *);
+int	freebsd32_extattr_get_link(struct thread *, struct freebsd32_extattr_g=
et_link_args *);
 int	freebsd32_sigaction(struct thread *, struct freebsd32_sigaction_args *=
);
 int	freebsd32_sigreturn(struct thread *, struct freebsd32_sigreturn_args *=
);
 int	freebsd32_getcontext(struct thread *, struct freebsd32_getcontext_args=
 *);
@@ -517,6 +556,9 @@ int	freebsd32_setcontext(struct thread *, struct freebs=
d32_setcontext_args *);
 int	freebsd32_swapcontext(struct thread *, struct freebsd32_swapcontext_ar=
gs *);
 int	freebsd32_umtx_lock(struct thread *, struct freebsd32_umtx_lock_args *=
);
 int	freebsd32_umtx_unlock(struct thread *, struct freebsd32_umtx_unlock_ar=
gs *);
+int	freebsd32_extattr_list_fd(struct thread *, struct freebsd32_extattr_li=
st_fd_args *);
+int	freebsd32_extattr_list_file(struct thread *, struct freebsd32_extattr_=
list_file_args *);
+int	freebsd32_extattr_list_link(struct thread *, struct freebsd32_extattr_=
list_link_args *);
 int	freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_ar=
gs *);
 int	freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *);
 int	freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *);
@@ -739,6 +781,8 @@ int	freebsd6_freebsd32_ftruncate(struct thread *, struc=
t freebsd6_freebsd32_ftru
 #define	FREEBSD32_SYS_AUE_freebsd32_kevent	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_nmount	AUE_NMOUNT
 #define	FREEBSD32_SYS_AUE_freebsd32_sendfile	AUE_SENDFILE
+#define	FREEBSD32_SYS_AUE_freebsd32_extattr_set_link	AUE_EXTATTR_SET_LINK
+#define	FREEBSD32_SYS_AUE_freebsd32_extattr_get_link	AUE_EXTATTR_GET_LINK
 #define	FREEBSD32_SYS_AUE_freebsd32_sigaction	AUE_SIGACTION
 #define	FREEBSD32_SYS_AUE_freebsd32_sigreturn	AUE_SIGRETURN
 #define	FREEBSD32_SYS_AUE_freebsd32_getcontext	AUE_NULL
@@ -746,6 +790,9 @@ int	freebsd6_freebsd32_ftruncate(struct thread *, struc=
t freebsd6_freebsd32_ftru
 #define	FREEBSD32_SYS_AUE_freebsd32_swapcontext	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_umtx_lock	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_umtx_unlock	AUE_NULL
+#define	FREEBSD32_SYS_AUE_freebsd32_extattr_list_fd	AUE_EXTATTR_LIST_FD
+#define	FREEBSD32_SYS_AUE_freebsd32_extattr_list_file	AUE_EXTATTR_LIST_FILE
+#define	FREEBSD32_SYS_AUE_freebsd32_extattr_list_link	AUE_EXTATTR_LIST_LINK
 #define	FREEBSD32_SYS_AUE_freebsd32_thr_suspend	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_umtx_op	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_thr_new	AUE_NULL
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd3=
2/freebsd32_syscall.h
index 73fc7b3..c320178 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 191673 =
2009-04-29 21:14:15Z jamie=20
+ * created from FreeBSD
  */
=20
 #define	FREEBSD32_SYS_syscall	0
@@ -303,6 +303,9 @@
 #define	FREEBSD32_SYS_statfs	396
 #define	FREEBSD32_SYS_fstatfs	397
 #define	FREEBSD32_SYS_fhstatfs	398
+#define	FREEBSD32_SYS_freebsd32_extattr_set_link	412
+#define	FREEBSD32_SYS_freebsd32_extattr_get_link	413
+#define	FREEBSD32_SYS_extattr_delete_link	414
 #define	FREEBSD32_SYS_freebsd32_sigaction	416
 #define	FREEBSD32_SYS_freebsd32_sigreturn	417
 #define	FREEBSD32_SYS_freebsd32_getcontext	421
@@ -315,6 +318,9 @@
 #define	FREEBSD32_SYS_freebsd32_umtx_lock	434
 #define	FREEBSD32_SYS_freebsd32_umtx_unlock	435
 #define	FREEBSD32_SYS_jail_attach	436
+#define	FREEBSD32_SYS_freebsd32_extattr_list_fd	437
+#define	FREEBSD32_SYS_freebsd32_extattr_list_file	438
+#define	FREEBSD32_SYS_freebsd32_extattr_list_link	439
 #define	FREEBSD32_SYS_freebsd32_thr_suspend	442
 #define	FREEBSD32_SYS_thr_wake	443
 #define	FREEBSD32_SYS_kldunloadf	444
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd=
32/freebsd32_syscalls.c
index c31d080..ed0d24f 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 191673 =
2009-04-29 21:14:15Z jamie=20
+ * created from FreeBSD
  */
=20
 const char *freebsd32_syscallnames[] =3D {
@@ -419,9 +419,9 @@ const char *freebsd32_syscallnames[] =3D {
 	"#409",			/* 409 =3D __mac_get_pid */
 	"#410",			/* 410 =3D __mac_get_link */
 	"#411",			/* 411 =3D __mac_set_link */
-	"#412",			/* 412 =3D extattr_set_link */
-	"#413",			/* 413 =3D extattr_get_link */
-	"#414",			/* 414 =3D extattr_delete_link */
+	"freebsd32_extattr_set_link",			/* 412 =3D freebsd32_extattr_set_link */
+	"freebsd32_extattr_get_link",			/* 413 =3D freebsd32_extattr_get_link */
+	"extattr_delete_link",			/* 414 =3D extattr_delete_link */
 	"#415",			/* 415 =3D __mac_execve */
 	"freebsd32_sigaction",			/* 416 =3D freebsd32_sigaction */
 	"freebsd32_sigreturn",			/* 417 =3D freebsd32_sigreturn */
@@ -444,9 +444,9 @@ const char *freebsd32_syscallnames[] =3D {
 	"freebsd32_umtx_lock",			/* 434 =3D freebsd32_umtx_lock */
 	"freebsd32_umtx_unlock",			/* 435 =3D freebsd32_umtx_unlock */
 	"jail_attach",			/* 436 =3D jail_attach */
-	"#437",			/* 437 =3D extattr_list_fd */
-	"#438",			/* 438 =3D extattr_list_file */
-	"#439",			/* 439 =3D extattr_list_link */
+	"freebsd32_extattr_list_fd",			/* 437 =3D freebsd32_extattr_list_fd */
+	"freebsd32_extattr_list_file",			/* 438 =3D freebsd32_extattr_list_file */
+	"freebsd32_extattr_list_link",			/* 439 =3D freebsd32_extattr_list_link */
 	"#440",			/* 440 =3D kse_switchin */
 	"#441",			/* 441 =3D ksem_timedwait */
 	"freebsd32_thr_suspend",			/* 442 =3D freebsd32_thr_suspend */
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32=
/freebsd32_sysent.c
index a44eb58..6e3a787 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 191673 =
2009-04-29 21:14:15Z jamie=20
+ * created from FreeBSD
  */
=20
 #include "opt_compat.h"
@@ -450,9 +450,9 @@ struct sysent freebsd32_sysent[] =3D {
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 409 =3D __mac_ge=
t_pid */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 410 =3D __mac_ge=
t_link */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 411 =3D __mac_se=
t_link */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 412 =3D extattr_=
set_link */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 413 =3D extattr_=
get_link */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 414 =3D extattr_=
delete_link */
+	{ AS(freebsd32_extattr_set_link_args), (sy_call_t *)freebsd32_extattr_set=
_link, AUE_EXTATTR_SET_LINK, NULL, 0, 0, 0 },	/* 412 =3D freebsd32_extattr_=
set_link */
+	{ AS(freebsd32_extattr_get_link_args), (sy_call_t *)freebsd32_extattr_get=
_link, AUE_EXTATTR_GET_LINK, NULL, 0, 0, 0 },	/* 413 =3D freebsd32_extattr_=
get_link */
+	{ AS(extattr_delete_link_args), (sy_call_t *)extattr_delete_link, AUE_EXT=
ATTR_DELETE_LINK, NULL, 0, 0, 0 },	/* 414 =3D extattr_delete_link */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 415 =3D __mac_ex=
ecve */
 	{ AS(freebsd32_sigaction_args), (sy_call_t *)freebsd32_sigaction, AUE_SIG=
ACTION, NULL, 0, 0, 0 },	/* 416 =3D freebsd32_sigaction */
 	{ AS(freebsd32_sigreturn_args), (sy_call_t *)freebsd32_sigreturn, AUE_SIG=
RETURN, NULL, 0, 0, 0 },	/* 417 =3D freebsd32_sigreturn */
@@ -475,9 +475,9 @@ struct sysent freebsd32_sysent[] =3D {
 	{ AS(freebsd32_umtx_lock_args), (sy_call_t *)freebsd32_umtx_lock, AUE_NUL=
L, NULL, 0, 0, 0 },	/* 434 =3D freebsd32_umtx_lock */
 	{ AS(freebsd32_umtx_unlock_args), (sy_call_t *)freebsd32_umtx_unlock, AUE=
_NULL, NULL, 0, 0, 0 },	/* 435 =3D freebsd32_umtx_unlock */
 	{ AS(jail_attach_args), (sy_call_t *)jail_attach, AUE_NULL, NULL, 0, 0, 0=
 },	/* 436 =3D jail_attach */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 437 =3D extattr_=
list_fd */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 438 =3D extattr_=
list_file */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 439 =3D extattr_=
list_link */
+	{ AS(freebsd32_extattr_list_fd_args), (sy_call_t *)freebsd32_extattr_list=
_fd, AUE_EXTATTR_LIST_FD, NULL, 0, 0, 0 },	/* 437 =3D freebsd32_extattr_lis=
t_fd */
+	{ AS(freebsd32_extattr_list_file_args), (sy_call_t *)freebsd32_extattr_li=
st_file, AUE_EXTATTR_LIST_FILE, NULL, 0, 0, 0 },	/* 438 =3D freebsd32_extat=
tr_list_file */
+	{ AS(freebsd32_extattr_list_link_args), (sy_call_t *)freebsd32_extattr_li=
st_link, AUE_EXTATTR_LIST_LINK, NULL, 0, 0, 0 },	/* 439 =3D freebsd32_extat=
tr_list_link */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 440 =3D kse_swit=
chin */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },			/* 441 =3D ksem_tim=
edwait */
 	{ AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE=
_NULL, NULL, 0, 0, 0 },	/* 442 =3D freebsd32_thr_suspend */
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/sy=
scalls.master
index 50e30ad..234f3f1 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -708,9 +708,17 @@
 409	AUE_NULL	UNIMPL	__mac_get_pid
 410	AUE_NULL	UNIMPL	__mac_get_link
 411	AUE_NULL	UNIMPL	__mac_set_link
-412	AUE_EXTATTR_SET_LINK	UNIMPL	extattr_set_link
-413	AUE_EXTATTR_GET_LINK	UNIMPL	extattr_get_link
-414	AUE_EXTATTR_DELETE_LINK	UNIMPL	extattr_delete_link
+412	AUE_EXTATTR_SET_LINK	STD	{ int freebsd32_extattr_set_link( \
+				    const char *path, int attrnamespace, \
+				    const char *attrname, void *data, \
+				    u_int32_t nbyteslo, u_int32_t nbyteshi); }
+413	AUE_EXTATTR_GET_LINK	STD	{ ssize_t freebsd32_extattr_get_link( \
+				    const char *path, int attrnamespace, \
+				    const char *attrname, void *data, \
+				    u_int32_t nbyteslo, u_int32_t nbyteshi); }
+414	AUE_EXTATTR_DELETE_LINK	NOPROTO	{ int extattr_delete_link( \
+				    const char *path, int attrnamespace, \
+				    const char *attrname); }
 415	AUE_NULL	UNIMPL	__mac_execve
 416	AUE_SIGACTION	STD	{ int freebsd32_sigaction(int sig, \
 				    struct sigaction32 *act, \
@@ -741,9 +749,17 @@
 434	AUE_NULL	STD	{ int freebsd32_umtx_lock(struct umtx *umtx); }
 435	AUE_NULL	STD	{ int freebsd32_umtx_unlock(struct umtx *umtx); }
 436	AUE_NULL	NOPROTO	{ int jail_attach(int jid); }
-437	AUE_EXTATTR_LIST_FD	UNIMPL	extattr_list_fd
-438	AUE_EXTATTR_LIST_FILE	UNIMPL	extattr_list_file
-439	AUE_EXTATTR_LIST_LINK	UNIMPL	extattr_list_link
+437	AUE_EXTATTR_LIST_FD	STD	{ ssize_t freebsd32_extattr_list_fd( \
+				    int fd, int attrnamespace, void *data, \
+				    u_int32_t nbyteslo, u_int32_t nbyteshi); }
+438	AUE_EXTATTR_LIST_FILE	STD	{ ssize_t freebsd32_extattr_list_file( \
+				    const char *path, int attrnamespace, \
+				    void *data, u_int32_t nbyteslo, \
+				    u_int32_t nbyteshi); }
+439	AUE_EXTATTR_LIST_LINK	STD	{ ssize_t freebsd32_extattr_list_link( \
+				    const char *path, int attrnamespace, \
+				    void *data, u_int32_t nbyteslo, \
+				    u_int32_t nbyteshi); }
 440	AUE_NULL	UNIMPL	kse_switchin
 441	AUE_NULL	UNIMPL	ksem_timedwait
 442	AUE_NULL	STD	{ int freebsd32_thr_suspend( \

--nPfW/i9ThgtiBSRK
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkon0foACgkQC3+MBN1Mb4hVhQCfXojwvanA/IIk120Bi6wXn0It
LoUAoIhirb246xrZ2lWZB4JNcfV1VtV9
=6J/V
-----END PGP SIGNATURE-----

--nPfW/i9ThgtiBSRK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090604135402.GT1927>