Message ID | 20121212153203.GA29278@afflict.kos.to |
---|---|
State | Superseded |
Headers | show |
On Wednesday 12 December 2012 10:32:03 Riku Voipio wrote: > The syscall numbers for Aarch64 (The official name for 64Bit arm) are > defined in include/uapi/asm-generic/unistd.h. these numbers are also used > by other architectures where there is no historic numbering of syscalls. > Thus this patch uses the numbers on tilera (__tile__) and unicore > (__unicore32__), > > Applying this patch makes attr "make tests" pass on ext4 with Linux 3.7 > on the 64-Bit arm simulator. > > Also, when making the next attr and acl release tarballs, make sure you run > autoreconf autotools-dev 20120210.1 or later, to get aarch64 strings in > config.sub and config.guess. seems to me that this code is fundamentally taking the wrong approach. it should just use SYS_xxx that sys/syscall.h already provides. -mike
On 12 December 2012 22:47, Mike Frysinger <vapier@gentoo.org> wrote: > On Wednesday 12 December 2012 10:32:03 Riku Voipio wrote: > > Applying this patch makes attr "make tests" pass on ext4 with Linux 3.7 > > on the 64-Bit arm simulator. > > > > Also, when making the next attr and acl release tarballs, make sure you > run > > autoreconf autotools-dev 20120210.1 or later, to get aarch64 strings in > > config.sub and config.guess > > seems to me that this code is fundamentally taking the wrong approach. it > should just use SYS_xxx that sys/syscall.h already provides. > I guess the original approach originates from time when kernel headers were more often broken than not for userspace. I've attached a new patch that includes sys/syscall.h and removes the local defines. It passes the testsuite on x86, x86_64, arm eabi and 64bit arm. Riku
--- a/libattr/syscalls.c +++ b/libattr/syscalls.c @@ -189,6 +189,21 @@ # define __NR_removexattr 232 # define __NR_lremovexattr 233 # define __NR_fremovexattr 234 +#elif defined(__aarch64__) || defined(__tile__) || defined(__unicore32__) +/* Architectures using generic syscall numbers */ +# define HAVE_XATTR_SYSCALLS 1 +# define __NR_setxattr 5 +# define __NR_lsetxattr 6 +# define __NR_fsetxattr 7 +# define __NR_getxattr 8 +# define __NR_lgetxattr 9 +# define __NR_fgetxattr 10 +# define __NR_listxattr 11 +# define __NR_llistxattr 12 +# define __NR_flistxattr 13 +# define __NR_removexattr 14 +# define __NR_lremovexattr 15 +# define __NR_fremovexattr 16 #else # warning "Extended attribute syscalls undefined for this architecture" # define HAVE_XATTR_SYSCALLS 0