diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2012-01-13 07:45:16 -0500 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2012-01-18 08:02:23 -0500 |
commit | 5eb686d105ebd7cea332fd1ef0bb3af9386e19f7 (patch) | |
tree | 3df9e137dcdcc8b78cb9ca78aee8c5de50316e87 /libc/arch-x86/syscalls | |
parent | e30e909363c5c706f394050d9cd00ce222caadbf (diff) | |
download | bionic-5eb686d105ebd7cea332fd1ef0bb3af9386e19f7.zip bionic-5eb686d105ebd7cea332fd1ef0bb3af9386e19f7.tar.gz bionic-5eb686d105ebd7cea332fd1ef0bb3af9386e19f7.tar.bz2 |
Add extended attribute (xattr) system call wrappers to bionic.
The xattr system calls are required for the SE Android userspace in
order to get and set file security contexts. In particular, libselinux
requires these calls.
Change-Id: I78f5eb3d8f3384aed0a5e7c6a6f001781d982017
Diffstat (limited to 'libc/arch-x86/syscalls')
-rw-r--r-- | libc/arch-x86/syscalls/fgetxattr.S | 32 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/flistxattr.S | 29 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/fremovexattr.S | 26 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/fsetxattr.S | 35 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/getxattr.S | 32 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/lgetxattr.S | 32 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/listxattr.S | 29 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/llistxattr.S | 29 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/lremovexattr.S | 26 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/lsetxattr.S | 35 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/removexattr.S | 26 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/setxattr.S | 35 |
12 files changed, 366 insertions, 0 deletions
diff --git a/libc/arch-x86/syscalls/fgetxattr.S b/libc/arch-x86/syscalls/fgetxattr.S new file mode 100644 index 0000000..d9f582f --- /dev/null +++ b/libc/arch-x86/syscalls/fgetxattr.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fgetxattr, @function + .globl fgetxattr + .align 4 + +fgetxattr: + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + mov 20(%esp), %ebx + mov 24(%esp), %ecx + mov 28(%esp), %edx + mov 32(%esp), %esi + movl $__NR_fgetxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %esi + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/flistxattr.S b/libc/arch-x86/syscalls/flistxattr.S new file mode 100644 index 0000000..43ff73d --- /dev/null +++ b/libc/arch-x86/syscalls/flistxattr.S @@ -0,0 +1,29 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type flistxattr, @function + .globl flistxattr + .align 4 + +flistxattr: + pushl %ebx + pushl %ecx + pushl %edx + mov 16(%esp), %ebx + mov 20(%esp), %ecx + mov 24(%esp), %edx + movl $__NR_flistxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/fremovexattr.S b/libc/arch-x86/syscalls/fremovexattr.S new file mode 100644 index 0000000..eeed57f --- /dev/null +++ b/libc/arch-x86/syscalls/fremovexattr.S @@ -0,0 +1,26 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fremovexattr, @function + .globl fremovexattr + .align 4 + +fremovexattr: + pushl %ebx + pushl %ecx + mov 12(%esp), %ebx + mov 16(%esp), %ecx + movl $__NR_fremovexattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/fsetxattr.S b/libc/arch-x86/syscalls/fsetxattr.S new file mode 100644 index 0000000..a70ca4f --- /dev/null +++ b/libc/arch-x86/syscalls/fsetxattr.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type fsetxattr, @function + .globl fsetxattr + .align 4 + +fsetxattr: + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + pushl %edi + mov 24(%esp), %ebx + mov 28(%esp), %ecx + mov 32(%esp), %edx + mov 36(%esp), %esi + mov 40(%esp), %edi + movl $__NR_fsetxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %edi + popl %esi + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/getxattr.S b/libc/arch-x86/syscalls/getxattr.S new file mode 100644 index 0000000..80d2fc4 --- /dev/null +++ b/libc/arch-x86/syscalls/getxattr.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type getxattr, @function + .globl getxattr + .align 4 + +getxattr: + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + mov 20(%esp), %ebx + mov 24(%esp), %ecx + mov 28(%esp), %edx + mov 32(%esp), %esi + movl $__NR_getxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %esi + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/lgetxattr.S b/libc/arch-x86/syscalls/lgetxattr.S new file mode 100644 index 0000000..3f5b63e --- /dev/null +++ b/libc/arch-x86/syscalls/lgetxattr.S @@ -0,0 +1,32 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type lgetxattr, @function + .globl lgetxattr + .align 4 + +lgetxattr: + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + mov 20(%esp), %ebx + mov 24(%esp), %ecx + mov 28(%esp), %edx + mov 32(%esp), %esi + movl $__NR_lgetxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %esi + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/listxattr.S b/libc/arch-x86/syscalls/listxattr.S new file mode 100644 index 0000000..88109bb --- /dev/null +++ b/libc/arch-x86/syscalls/listxattr.S @@ -0,0 +1,29 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type listxattr, @function + .globl listxattr + .align 4 + +listxattr: + pushl %ebx + pushl %ecx + pushl %edx + mov 16(%esp), %ebx + mov 20(%esp), %ecx + mov 24(%esp), %edx + movl $__NR_listxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/llistxattr.S b/libc/arch-x86/syscalls/llistxattr.S new file mode 100644 index 0000000..fa8505c --- /dev/null +++ b/libc/arch-x86/syscalls/llistxattr.S @@ -0,0 +1,29 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type llistxattr, @function + .globl llistxattr + .align 4 + +llistxattr: + pushl %ebx + pushl %ecx + pushl %edx + mov 16(%esp), %ebx + mov 20(%esp), %ecx + mov 24(%esp), %edx + movl $__NR_llistxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/lremovexattr.S b/libc/arch-x86/syscalls/lremovexattr.S new file mode 100644 index 0000000..f6c7afe --- /dev/null +++ b/libc/arch-x86/syscalls/lremovexattr.S @@ -0,0 +1,26 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type lremovexattr, @function + .globl lremovexattr + .align 4 + +lremovexattr: + pushl %ebx + pushl %ecx + mov 12(%esp), %ebx + mov 16(%esp), %ecx + movl $__NR_lremovexattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/lsetxattr.S b/libc/arch-x86/syscalls/lsetxattr.S new file mode 100644 index 0000000..56c8cf8 --- /dev/null +++ b/libc/arch-x86/syscalls/lsetxattr.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type lsetxattr, @function + .globl lsetxattr + .align 4 + +lsetxattr: + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + pushl %edi + mov 24(%esp), %ebx + mov 28(%esp), %ecx + mov 32(%esp), %edx + mov 36(%esp), %esi + mov 40(%esp), %edi + movl $__NR_lsetxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %edi + popl %esi + popl %edx + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/removexattr.S b/libc/arch-x86/syscalls/removexattr.S new file mode 100644 index 0000000..2350865 --- /dev/null +++ b/libc/arch-x86/syscalls/removexattr.S @@ -0,0 +1,26 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type removexattr, @function + .globl removexattr + .align 4 + +removexattr: + pushl %ebx + pushl %ecx + mov 12(%esp), %ebx + mov 16(%esp), %ecx + movl $__NR_removexattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %ecx + popl %ebx + ret diff --git a/libc/arch-x86/syscalls/setxattr.S b/libc/arch-x86/syscalls/setxattr.S new file mode 100644 index 0000000..38be736 --- /dev/null +++ b/libc/arch-x86/syscalls/setxattr.S @@ -0,0 +1,35 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type setxattr, @function + .globl setxattr + .align 4 + +setxattr: + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + pushl %edi + mov 24(%esp), %ebx + mov 28(%esp), %ecx + mov 32(%esp), %edx + mov 36(%esp), %esi + mov 40(%esp), %edi + movl $__NR_setxattr, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %edi + popl %esi + popl %edx + popl %ecx + popl %ebx + ret |