mirror of https://github.com/mkerrisk/man-pages
syscall.2: Some fixes to Eugene Syromyatnikov's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
2ad7b4c46c
commit
5b7630723c
|
@ -240,42 +240,44 @@ and so on up to
|
|||
.IR "trap #0x17"
|
||||
for 7-argument system calls.
|
||||
.IP [5]
|
||||
The x32 ABI shares syscall table with x86-64 ABI, however, there are some
|
||||
The x32 ABI shares syscall table with x86-64 ABI, but there are some
|
||||
nuances:
|
||||
.RS
|
||||
.IP \(bu 3
|
||||
In order to signalise that a system call is called under the x32 ABI, additional
|
||||
.I __X32_SYSCALL_BIT
|
||||
In order to indicate that a system call is called under the x32 ABI,
|
||||
an additional bit,
|
||||
.BR __X32_SYSCALL_BIT ,
|
||||
is bitwise-ORed with the system call number.
|
||||
The ABI used by a process affects some things, signal handling or syscall
|
||||
restarting, for example.
|
||||
The ABI used by a process affects some process behaviors,
|
||||
including signal handling or system call restarting.
|
||||
.IP \(bu
|
||||
Since x32 has different sizes for
|
||||
.I long
|
||||
and pointer types, layouts of some (but not all;
|
||||
.B struct timeval
|
||||
.I struct timeval
|
||||
or
|
||||
.B struct rlimit
|
||||
are 64-bit, for example) structures are different, and, in order to handle this,
|
||||
additional syscalls are added to the syscall table, starting from number 512
|
||||
.I struct rlimit
|
||||
are 64-bit, for example) structures are different.
|
||||
In order to handle this,
|
||||
additional system calls are added to the system call table,
|
||||
starting from number 512
|
||||
(without the
|
||||
.IR __X32_SYSCALL_BIT );
|
||||
for example,
|
||||
.BR __X32_SYSCALL_BIT ).
|
||||
For example,
|
||||
.B __NR_readv
|
||||
is defined to 19 for x86-64 ABI and to
|
||||
is defined as 19 for the x86-64 ABI and as
|
||||
.IR __X32_SYSCALL_BIT " | " \fB515\fP
|
||||
for x32 ABI.
|
||||
Most of there additional system calls are actually identical to the syscalls
|
||||
used for providing i386 compat; there are some notable exceptions, however,
|
||||
such as
|
||||
for the x32 ABI.
|
||||
Most of these additional system calls are actually identical
|
||||
to the system calls used for providing i386 compat.
|
||||
There are some notable exceptions, however, such as
|
||||
.BR preadv2 (2),
|
||||
that uses
|
||||
.B struct iovec
|
||||
entities with 4-byte pointers and sizes ("compat_iovec" in kernel's terms), but
|
||||
passes 8-byte
|
||||
which uses
|
||||
.I struct iovec
|
||||
entities with 4-byte pointers and sizes ("compat_iovec" in kernel terms),
|
||||
but passes an 8-byte
|
||||
.I pos
|
||||
argument in a single register and not two, as it is implemented in every other
|
||||
ABI.
|
||||
argument in a single register and not two, as is done in every other ABI.
|
||||
.RE
|
||||
.if t \{\
|
||||
.in
|
||||
|
|
Loading…
Reference in New Issue