Skip to contentSkip to conversation

libattr 2.4.32 arm eabi system call calling convention

PATCH In review Lennert Buytenhek 4 participants 5 messages Nov 30, 2006 – Dec 8, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libattr 2.4.32 arm eabi system call calling convention

When building for EABI, a different system call calling convention is used where system calls are numbered starting from zero, not 0x900000 as in the old ABI. This was causing 'ls -al' with an ls binary that was built with xattr support to SIGILL.

libattr/syscalls.c renamed from libattr/syscalls.c.orig +5 -1
@@ -110,7 +110,11 @@
 # define __NR_fremovexattr	235
 #elif defined (__arm__)
 # define HAVE_XATTR_SYSCALLS 1
-# define __NR_SYSCALL_BASE 0x900000
+# if defined(__ARM_EABI__) || defined(__thumb__)
+#  define __NR_SYSCALL_BASE 0
+# else
+#  define __NR_SYSCALL_BASE 0x900000
+# endif
 # define __NR_setxattr		(__NR_SYSCALL_BASE+226)
 # define __NR_lsetxattr		(__NR_SYSCALL_BASE+227)
 # define __NR_fsetxattr		(__NR_SYSCALL_BASE+228)

-------------------------------------------------------------------

List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
#1 lore raw
Quoted 4 lines · Lennert Buytenhek

When building for EABI, a different system call calling convention is used where system calls are numbered starting from zero, not 0x900000 as in the old ABI. This was causing 'ls -al' with an ls binary that was built with xattr support to SIGILL.

Please just rip out the direct syscalls. The days glibc provices all the xattr syscalls in sys/xattr.h, and libattr should just forward to those.

#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines

When building for EABI, a different system call calling convention is used where system calls are numbered starting from zero, not 0x900000 as in the old ABI. This was causing 'ls -al' with an ls binary that was built with xattr support to SIGILL.

Please just rip out the direct syscalls. The days glibc provices all the xattr syscalls in sys/xattr.h, and libattr should just forward to those.

Sounds like the better option to me as well. (Would have saved me a bunch of work, too.)

#3 lore raw
In reply to Christoph Hellwig

Hello,

Quoted 9 lines · Christoph Hellwig
Quoted 4 lines · Lennert Buytenhek

When building for EABI, a different system call calling convention is used where system calls are numbered starting from zero, not 0x900000 as in the old ABI. This was causing 'ls -al' with an ls binary that was built with xattr support to SIGILL.

Please just rip out the direct syscalls. The days glibc provices all the xattr syscalls in sys/xattr.h, and libattr should just forward to those.

Yes, makes sense these days. Thanks for paying attention, Christoph.

Tim, who from the SGI side is taking care of the acl and attr packages in the xfs-cmds repository these days? Would you be doing this change, or are you waiting for a patch?

Thanks,
Andreas

PS. I hope we'll meet at linux.conf.au this January in Sydney, or in Melbourne some days later :-)

#4 lore raw
Quoted 1 line · Andreas Gruenbacher

Hello,

Hi Andreas,

Quoted 11 lines · Christoph Hellwig
Quoted 9 lines · Lennert Buytenhek
Quoted 4 lines

When building for EABI, a different system call calling convention is used where system calls are numbered starting from zero, not 0x900000 as in the old ABI. This was causing 'ls -al' with an ls binary that was built with xattr support to SIGILL.

Please just rip out the direct syscalls. The days glibc provices all the xattr syscalls in sys/xattr.h, and libattr should just forward to those.

Quoted 5 lines

Yes, makes sense these days. Thanks for paying attention, Christoph.

Tim, who from the SGI side is taking care of the acl and attr packages in the xfs-cmds repository these days? Would you be doing this change, or are you waiting for a patch?

Tim's on holiday atm. I'll cook up a patch (I have another attr patch from someone I need to get merged too), and get someone to check it in.

Quoted 2 lines

PS. I hope we'll meet at linux.conf.au this January in Sydney, or in Melbourne some days later :-)

I'll see you there too (I'm looking forward to your LCA talk ;)

cheers.

Signature · 1 line
Nathan