| 1 |
.TH AUSYSCALL "8" "Feb 2023" "Red Hat" "System Administration Utilities" |
| 2 |
.SH NAME |
| 3 |
ausyscall \- a program that allows mapping syscall names and numbers |
| 4 |
.SH SYNOPSIS |
| 5 |
.B ausyscall [arch] name | number | \-\-dump | \-\-exact |
| 6 |
.SH DESCRIPTION |
| 7 |
\fBausyscall\fP is a program that prints out the mapping from syscall name to number and reverse for the given arch. The arch can be anything returned by `uname \-m`. If arch is not given, the program will take a guess based on the running image. Or for convenience, you can pass \fBb32\fP or \fBb64\fP to use the current arch but a specific ABI. You may give the syscall name or number and it will find the opposite. You can also dump the whole table with the \-\-dump option. By default a syscall name lookup will be a substring match meaning that it will try to match all occurrences of the given name with syscalls. So giving a name of chown will match both fchown and chown as any other syscall with chown in its name. If this behavior is not desired, pass the \-\-exact flag and it will do an exact string match. |
| 8 |
|
| 9 |
The program takes the special arch, |
| 10 |
.B uring, |
| 11 |
to denote that you want to specify io_uring operations. In this case, the arch must be given because it will otherwise detect the underlying hardware. |
| 12 |
|
| 13 |
This program can be used to verify syscall numbers on a biarch platform for rule optimization. For example, suppose you had an auditctl rule: |
| 14 |
|
| 15 |
.B \-a always, exit \-S open \-F exit=\-EPERM \-k fail\-open |
| 16 |
|
| 17 |
If you wanted to verify that both 32 and 64 bit programs would be audited, run "ausyscall i386 open" and then "ausyscall x86_64 open". (Or use the b32 and b64 option.) Look at the returned numbers. If they are different, you will have to write two auditctl rules to get complete coverage. |
| 18 |
|
| 19 |
.nf |
| 20 |
.B \-a always,exit \-F arch=b32 \-S open \-F exit=\-EPERM \-k fail\-open |
| 21 |
.B \-a always,exit \-F arch=b64 \-S open \-F exit=\-EPERM \-k fail\-open |
| 22 |
.fi |
| 23 |
|
| 24 |
For more information about a specific syscall, use the man program and pass the number 2 as an argument to make sure that you get the syscall information rather than a shell script program or glibc function call of the same name. For example, if you wanted to learn about the open syscall, type: man 2 open. |
| 25 |
.SH OPTIONS |
| 26 |
.TP |
| 27 |
.B \-\-dump |
| 28 |
Print all syscalls for the given arch |
| 29 |
.TP |
| 30 |
.B \-\-exact |
| 31 |
Instead of doing a partial word match, match the given syscall name exactly. |
| 32 |
|
| 33 |
.SH "SEE ALSO" |
| 34 |
.BR ausearch (8), |
| 35 |
.BR auditctl (8). |
| 36 |
|
| 37 |
.SH AUTHOR |
| 38 |
Steve Grubb |