Commit 2ede8f2
committed
doc: Add documentation for updating syscalls.csv
Add documentation on how to update syscalls.csv.
Here are the exact steps and results for updating syscalls.csv to
kernels v6.14 through v7.0-rc7
$ apt install libc6-dev-x32
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ git clone https://github.com/hrw/syscalls-table.git
$ git clone git@github.com:<yourrepo>/libseccomp.git
$ cd libseccomp
$ vim include/seccomp-kvers.h
--> add new syscall enumerations
$ time ./src/arch-build-kver-tables.py -d ../syscalls-table -k ../linux -V 6.14,6.15,6.16,6.17,6.18,6.19,7.0-rc7
Building version table for kernel 6.14
Building version table for kernel 6.15
Building version table for kernel 6.16
Building version table for kernel 6.17
Building version table for kernel 6.18
Building version table for kernel 6.19
Building version table for kernel 7.0-rc7
real 2m47.672s
user 1m22.094s
sys 1m23.954s
$ time ./src/arch-update-syscalls-csv.py -a -d ./ -k ../linux -c
src/syscalls.csv -V 6.14,6.15,6.16,6.17,6.18,6.19,7.0-rc7
Updating src/syscalls.csv version table for kernel 6.14
Updating src/syscalls.csv version table for kernel 6.15
Updating src/syscalls.csv version table for kernel 6.16
Updating src/syscalls.csv version table for kernel 6.17
Updating src/syscalls.csv version table for kernel 6.18
Updating src/syscalls.csv version table for kernel 6.19
Updating src/syscalls.csv version table for kernel 7.0-rc7
real 0m30.112s
user 0m20.716s
sys 0m9.547s
$ vim include-seccomp-syscalls.h
--> add new syscall __SNR and __PNR entries as appropriate
$ ./src/arch-syscall-check
--> Make changes as recommended by this script
--> Re-run this script until there are no more changes to be made
$ cd src
$ ./arch-syscall-validate -c syscalls-prev.csv ../../linux/
$ git diff HEAD syscalls.csv
$ diff syscalls-prev.csv with syscalls.csv
Signed-off-by: Tom Hromatka (Oracle) <tom.hromatka@gmail.com>1 parent c4a85cc commit 2ede8f2
1 file changed
Lines changed: 99 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
67 | 166 | | |
68 | 167 | | |
69 | 168 | | |
| |||
0 commit comments