Skip to content

Commit

Permalink
sys/linux: regenerate and fix const files
Browse files Browse the repository at this point in the history
1. Move fsverity descriptions to a separate file which
is not regenerated automatically. It was dropped from linux-next.
2. Fix tlk_device.txt name in syz-extract.
3. Update some socket consts e.g. s/SO_TIMESTAMPING/SO_TIMESTAMPING_OLD/.
4. Regenerate const files on current upstream head.
  • Loading branch information
dvyukov committed Mar 14, 2019
1 parent d34313c commit 1e82084
Show file tree
Hide file tree
Showing 39 changed files with 796 additions and 153 deletions.
10 changes: 5 additions & 5 deletions executor/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

#if GOARCH_386
#define GOARCH "386"
#define SYZ_REVISION "128a81541c2be92786d8f10bb9a09bc617848c2a"
#define SYZ_REVISION "0a0e33691ab05cdb4188e6ed357107f6b910fafb"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -70,7 +70,7 @@

#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "8fb493ce36069a092bb13b1f6aa0c3f5bde6ed9d"
#define SYZ_REVISION "a17fc9ffd2d2e5fae6122fcc2f7b8307394fe83d"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -80,7 +80,7 @@

#if GOARCH_arm
#define GOARCH "arm"
#define SYZ_REVISION "89af28e08a5fe6430ecedad595a5f602ab9263a2"
#define SYZ_REVISION "4fb2c502fa3c67c71fe60ddf2550873f4335a914"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -90,7 +90,7 @@

#if GOARCH_arm64
#define GOARCH "arm64"
#define SYZ_REVISION "58b90ec2a1e2b3164cb3046d7e6e3f35c2f43d71"
#define SYZ_REVISION "4b7009c8009f4d05ae3478b07945151611372941"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -100,7 +100,7 @@

#if GOARCH_ppc64le
#define GOARCH "ppc64le"
#define SYZ_REVISION "bd5291942a429ed2bae7bdeb0cc8c1f23c3d3fdf"
#define SYZ_REVISION "1a16c369fcafc67ece8515c18e01226cccf49276"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand Down
76 changes: 76 additions & 0 deletions executor/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -3032,6 +3032,16 @@ const call_t syscalls[] = {
{"mq_timedsend", 279},
{"mq_unlink", 278},
{"mremap", 163},
{"msgctl$IPC_INFO", 402},
{"msgctl$IPC_RMID", 402},
{"msgctl$IPC_SET", 402},
{"msgctl$IPC_STAT", 402},
{"msgctl$MSG_INFO", 402},
{"msgctl$MSG_STAT", 402},
{"msgget", 399},
{"msgget$private", 399},
{"msgrcv", 401},
{"msgsnd", 400},
{"msync", 144},
{"munlock", 151},
{"munlockall", 153},
Expand Down Expand Up @@ -3294,6 +3304,21 @@ const call_t syscalls[] = {
{"sched_yield", 158},
{"seccomp", 354},
{"select", 82},
{"semctl$GETALL", 394},
{"semctl$GETNCNT", 394},
{"semctl$GETPID", 394},
{"semctl$GETVAL", 394},
{"semctl$GETZCNT", 394},
{"semctl$IPC_INFO", 394},
{"semctl$IPC_RMID", 394},
{"semctl$IPC_SET", 394},
{"semctl$IPC_STAT", 394},
{"semctl$SEM_INFO", 394},
{"semctl$SEM_STAT", 394},
{"semctl$SETALL", 394},
{"semctl$SETVAL", 394},
{"semget", 393},
{"semget$private", 393},
{"sendfile", 187},
{"sendfile64", 239},
{"sendmmsg", 345},
Expand Down Expand Up @@ -3710,6 +3735,18 @@ const call_t syscalls[] = {
{"setxattr$trusted_overlay_origin", 226},
{"setxattr$trusted_overlay_redirect", 226},
{"setxattr$trusted_overlay_upper", 226},
{"shmat", 397},
{"shmctl$IPC_INFO", 396},
{"shmctl$IPC_RMID", 396},
{"shmctl$IPC_SET", 396},
{"shmctl$IPC_STAT", 396},
{"shmctl$SHM_INFO", 396},
{"shmctl$SHM_LOCK", 396},
{"shmctl$SHM_STAT", 396},
{"shmctl$SHM_UNLOCK", 396},
{"shmdt", 398},
{"shmget", 395},
{"shmget$private", 395},
{"shutdown", 373},
{"sigaltstack", 186},
{"signalfd", 321},
Expand Down Expand Up @@ -8088,6 +8125,7 @@ const call_t syscalls[] = {
{"mbind", 319},
{"membarrier", 389},
{"memfd_create", 385},
{"migrate_pages", 400},
{"mincore", 219},
{"mkdir", 39},
{"mkdirat", 323},
Expand Down Expand Up @@ -13166,6 +13204,16 @@ const call_t syscalls[] = {
{"mq_timedsend", 264},
{"mq_unlink", 263},
{"mremap", 163},
{"msgctl$IPC_INFO", 402},
{"msgctl$IPC_RMID", 402},
{"msgctl$IPC_SET", 402},
{"msgctl$IPC_STAT", 402},
{"msgctl$MSG_INFO", 402},
{"msgctl$MSG_STAT", 402},
{"msgget", 399},
{"msgget$private", 399},
{"msgrcv", 401},
{"msgsnd", 400},
{"msync", 144},
{"munlock", 151},
{"munlockall", 153},
Expand Down Expand Up @@ -13428,6 +13476,22 @@ const call_t syscalls[] = {
{"sched_yield", 158},
{"seccomp", 358},
{"select", 82},
{"semctl$GETALL", 394},
{"semctl$GETNCNT", 394},
{"semctl$GETPID", 394},
{"semctl$GETVAL", 394},
{"semctl$GETZCNT", 394},
{"semctl$IPC_INFO", 394},
{"semctl$IPC_RMID", 394},
{"semctl$IPC_SET", 394},
{"semctl$IPC_STAT", 394},
{"semctl$SEM_INFO", 394},
{"semctl$SEM_STAT", 394},
{"semctl$SETALL", 394},
{"semctl$SETVAL", 394},
{"semget", 393},
{"semget$private", 393},
{"semtimedop", 392},
{"sendfile", 186},
{"sendmmsg", 349},
{"sendmmsg$alg", 349},
Expand Down Expand Up @@ -13842,6 +13906,18 @@ const call_t syscalls[] = {
{"setxattr$trusted_overlay_origin", 209},
{"setxattr$trusted_overlay_redirect", 209},
{"setxattr$trusted_overlay_upper", 209},
{"shmat", 397},
{"shmctl$IPC_INFO", 396},
{"shmctl$IPC_RMID", 396},
{"shmctl$IPC_SET", 396},
{"shmctl$IPC_STAT", 396},
{"shmctl$SHM_INFO", 396},
{"shmctl$SHM_LOCK", 396},
{"shmctl$SHM_STAT", 396},
{"shmctl$SHM_UNLOCK", 396},
{"shmdt", 398},
{"shmget", 395},
{"shmget$private", 395},
{"shutdown", 338},
{"sigaltstack", 185},
{"signalfd", 305},
Expand Down
2 changes: 1 addition & 1 deletion sys/linux/bpf_386.const
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ BPF_XOR0 = 10
BTF_MAGIC = 60319
BTF_VERSION = 1
MAX_BPF_REG = 11
__BPF_FUNC_MAX_ID = 93
__BPF_FUNC_MAX_ID = 98
__MAX_BPF_REG = 11
__NR_bpf = 357
bpf_call_code = 133
Expand Down
2 changes: 1 addition & 1 deletion sys/linux/bpf_amd64.const
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ BPF_XOR0 = 10
BTF_MAGIC = 60319
BTF_VERSION = 1
MAX_BPF_REG = 11
__BPF_FUNC_MAX_ID = 93
__BPF_FUNC_MAX_ID = 98
__MAX_BPF_REG = 11
__NR_bpf = 321
bpf_call_code = 133
Expand Down
2 changes: 1 addition & 1 deletion sys/linux/bpf_arm.const
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ BPF_XOR0 = 10
BTF_MAGIC = 60319
BTF_VERSION = 1
MAX_BPF_REG = 11
__BPF_FUNC_MAX_ID = 93
__BPF_FUNC_MAX_ID = 98
__MAX_BPF_REG = 11
__NR_bpf = 386
bpf_call_code = 133
Expand Down
2 changes: 1 addition & 1 deletion sys/linux/bpf_arm64.const
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ BPF_XOR0 = 10
BTF_MAGIC = 60319
BTF_VERSION = 1
MAX_BPF_REG = 11
__BPF_FUNC_MAX_ID = 93
__BPF_FUNC_MAX_ID = 98
__MAX_BPF_REG = 11
__NR_bpf = 280
bpf_call_code = 133
Expand Down
2 changes: 1 addition & 1 deletion sys/linux/bpf_ppc64le.const
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ BPF_XOR0 = 10
BTF_MAGIC = 60319
BTF_VERSION = 1
MAX_BPF_REG = 11
__BPF_FUNC_MAX_ID = 93
__BPF_FUNC_MAX_ID = 98
__MAX_BPF_REG = 11
__NR_bpf = 361
bpf_call_code = 133
Expand Down
11 changes: 0 additions & 11 deletions sys/linux/fs_ioctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
include <uapi/linux/fiemap.h>
include <uapi/linux/fs.h>
include <uapi/linux/fsmap.h>
include <uapi/linux/fsverity.h>
include <linux/falloc.h>

ioctl$FIBMAP(fd fd, cmd const[FIBMAP], arg ptr[in, int32])
Expand All @@ -28,8 +27,6 @@ ioctl$FS_IOC_SET_ENCRYPTION_POLICY(fd fd, cmd const[FS_IOC_SET_ENCRYPTION_POLICY
ioctl$FS_IOC_GET_ENCRYPTION_POLICY(fd fd, cmd const[FS_IOC_GET_ENCRYPTION_POLICY], arg ptr[out, array[int8, 16]])
ioctl$FS_IOC_GET_ENCRYPTION_PWSALT(fd fd, cmd const[FS_IOC_GET_ENCRYPTION_PWSALT], arg ptr[out, fscrypt_policy])
ioctl$FS_IOC_GETFSMAP(fd fd, cmd const[FS_IOC_GETFSMAP], arg ptr[in, fsmap_head])
ioctl$FS_IOC_ENABLE_VERITY(fd fd, cmd const[FS_IOC_ENABLE_VERITY])
ioctl$FS_IOC_MEASURE_VERITY(fd fd, cmd const[FS_IOC_MEASURE_VERITY], arg ptr[inout, fsverity_digest])

fscrypt_policy {
version const[0, int8]
Expand All @@ -51,14 +48,6 @@ type fscrypt_policy_mode_t[CONTENTS, FILENAMES] {

fs_policy_flags = FS_POLICY_FLAGS_PAD_4, FS_POLICY_FLAGS_PAD_8, FS_POLICY_FLAGS_PAD_16

fsverity_digest_algorithm_flags = FS_VERITY_ALG_SHA256, FS_VERITY_ALG_SHA512, FS_VERITY_ALG_CRC32C

fsverity_digest {
digest_algorithm flags[fsverity_digest_algorithm_flags, int16]
digest_size len[digest, int16]
digest array[int8]
}

space_resv {
l_type const[0, int16]
l_whence flags[seek_whence, int16]
Expand Down
5 changes: 0 additions & 5 deletions sys/linux/fs_ioctl_386.const
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ FS_ENCRYPTION_MODE_AES_256_CTS = 4
FS_ENCRYPTION_MODE_AES_256_XTS = 1
FS_ENCRYPTION_MODE_SPECK128_256_CTS = 8
FS_ENCRYPTION_MODE_SPECK128_256_XTS = 7
FS_IOC_ENABLE_VERITY = 26245
FS_IOC_FIEMAP = 3223348747
FS_IOC_FSGETXATTR = 2149341215
FS_IOC_FSSETXATTR = 1075599392
Expand All @@ -23,7 +22,6 @@ FS_IOC_GETFSMAP = 3233830971
FS_IOC_GETVERSION = 2147776001
FS_IOC_GET_ENCRYPTION_POLICY = 1074554389
FS_IOC_GET_ENCRYPTION_PWSALT = 1074816532
FS_IOC_MEASURE_VERITY = 3221513862
FS_IOC_RESVSP = 1076647976
FS_IOC_SETFLAGS = 1074030082
FS_IOC_SETFSLABEL = 1090556978
Expand All @@ -33,7 +31,4 @@ FS_KEY_DESCRIPTOR_SIZE = 8
FS_POLICY_FLAGS_PAD_16 = 2
FS_POLICY_FLAGS_PAD_4 = 0
FS_POLICY_FLAGS_PAD_8 = 1
FS_VERITY_ALG_CRC32C = 3
FS_VERITY_ALG_SHA256 = 1
FS_VERITY_ALG_SHA512 = 2
__NR_ioctl = 54
5 changes: 0 additions & 5 deletions sys/linux/fs_ioctl_amd64.const
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ FS_ENCRYPTION_MODE_AES_256_CTS = 4
FS_ENCRYPTION_MODE_AES_256_XTS = 1
FS_ENCRYPTION_MODE_SPECK128_256_CTS = 8
FS_ENCRYPTION_MODE_SPECK128_256_XTS = 7
FS_IOC_ENABLE_VERITY = 26245
FS_IOC_FIEMAP = 3223348747
FS_IOC_FSGETXATTR = 2149341215
FS_IOC_FSSETXATTR = 1075599392
Expand All @@ -23,7 +22,6 @@ FS_IOC_GETFSMAP = 3233830971
FS_IOC_GETVERSION = 2148038145
FS_IOC_GET_ENCRYPTION_POLICY = 1074554389
FS_IOC_GET_ENCRYPTION_PWSALT = 1074816532
FS_IOC_MEASURE_VERITY = 3221513862
FS_IOC_RESVSP = 1076910120
FS_IOC_SETFLAGS = 1074292226
FS_IOC_SETFSLABEL = 1090556978
Expand All @@ -33,7 +31,4 @@ FS_KEY_DESCRIPTOR_SIZE = 8
FS_POLICY_FLAGS_PAD_16 = 2
FS_POLICY_FLAGS_PAD_4 = 0
FS_POLICY_FLAGS_PAD_8 = 1
FS_VERITY_ALG_CRC32C = 3
FS_VERITY_ALG_SHA256 = 1
FS_VERITY_ALG_SHA512 = 2
__NR_ioctl = 16
5 changes: 0 additions & 5 deletions sys/linux/fs_ioctl_arm.const
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ FS_ENCRYPTION_MODE_AES_256_CTS = 4
FS_ENCRYPTION_MODE_AES_256_XTS = 1
FS_ENCRYPTION_MODE_SPECK128_256_CTS = 8
FS_ENCRYPTION_MODE_SPECK128_256_XTS = 7
FS_IOC_ENABLE_VERITY = 26245
FS_IOC_FIEMAP = 3223348747
FS_IOC_FSGETXATTR = 2149341215
FS_IOC_FSSETXATTR = 1075599392
Expand All @@ -23,7 +22,6 @@ FS_IOC_GETFSMAP = 3233830971
FS_IOC_GETVERSION = 2147776001
FS_IOC_GET_ENCRYPTION_POLICY = 1074554389
FS_IOC_GET_ENCRYPTION_PWSALT = 1074816532
FS_IOC_MEASURE_VERITY = 3221513862
FS_IOC_RESVSP = 1076647976
FS_IOC_SETFLAGS = 1074030082
FS_IOC_SETFSLABEL = 1090556978
Expand All @@ -33,7 +31,4 @@ FS_KEY_DESCRIPTOR_SIZE = 8
FS_POLICY_FLAGS_PAD_16 = 2
FS_POLICY_FLAGS_PAD_4 = 0
FS_POLICY_FLAGS_PAD_8 = 1
FS_VERITY_ALG_CRC32C = 3
FS_VERITY_ALG_SHA256 = 1
FS_VERITY_ALG_SHA512 = 2
__NR_ioctl = 54
5 changes: 0 additions & 5 deletions sys/linux/fs_ioctl_arm64.const
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ FS_ENCRYPTION_MODE_AES_256_CTS = 4
FS_ENCRYPTION_MODE_AES_256_XTS = 1
FS_ENCRYPTION_MODE_SPECK128_256_CTS = 8
FS_ENCRYPTION_MODE_SPECK128_256_XTS = 7
FS_IOC_ENABLE_VERITY = 26245
FS_IOC_FIEMAP = 3223348747
FS_IOC_FSGETXATTR = 2149341215
FS_IOC_FSSETXATTR = 1075599392
Expand All @@ -23,7 +22,6 @@ FS_IOC_GETFSMAP = 3233830971
FS_IOC_GETVERSION = 2148038145
FS_IOC_GET_ENCRYPTION_POLICY = 1074554389
FS_IOC_GET_ENCRYPTION_PWSALT = 1074816532
FS_IOC_MEASURE_VERITY = 3221513862
FS_IOC_RESVSP = 1076910120
FS_IOC_SETFLAGS = 1074292226
FS_IOC_SETFSLABEL = 1090556978
Expand All @@ -33,7 +31,4 @@ FS_KEY_DESCRIPTOR_SIZE = 8
FS_POLICY_FLAGS_PAD_16 = 2
FS_POLICY_FLAGS_PAD_4 = 0
FS_POLICY_FLAGS_PAD_8 = 1
FS_VERITY_ALG_CRC32C = 3
FS_VERITY_ALG_SHA256 = 1
FS_VERITY_ALG_SHA512 = 2
__NR_ioctl = 29
5 changes: 0 additions & 5 deletions sys/linux/fs_ioctl_ppc64le.const
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ FS_ENCRYPTION_MODE_AES_256_CTS = 4
FS_ENCRYPTION_MODE_AES_256_XTS = 1
FS_ENCRYPTION_MODE_SPECK128_256_CTS = 8
FS_ENCRYPTION_MODE_SPECK128_256_XTS = 7
FS_IOC_ENABLE_VERITY = 536897157
FS_IOC_FIEMAP = 3223348747
FS_IOC_FSGETXATTR = 1075599391
FS_IOC_FSSETXATTR = 2149341216
Expand All @@ -23,7 +22,6 @@ FS_IOC_GETFSMAP = 3233830971
FS_IOC_GETVERSION = 1074296321
FS_IOC_GET_ENCRYPTION_POLICY = 2148296213
FS_IOC_GET_ENCRYPTION_PWSALT = 2148558356
FS_IOC_MEASURE_VERITY = 3221513862
FS_IOC_RESVSP = 2150651944
FS_IOC_SETFLAGS = 2148034050
FS_IOC_SETFSLABEL = 2164298802
Expand All @@ -33,7 +31,4 @@ FS_KEY_DESCRIPTOR_SIZE = 8
FS_POLICY_FLAGS_PAD_16 = 2
FS_POLICY_FLAGS_PAD_4 = 0
FS_POLICY_FLAGS_PAD_8 = 1
FS_VERITY_ALG_CRC32C = 3
FS_VERITY_ALG_SHA256 = 1
FS_VERITY_ALG_SHA512 = 2
__NR_ioctl = 54
16 changes: 16 additions & 0 deletions sys/linux/fsverity.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2019 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

include <uapi/linux/fs.h>
include <uapi/linux/fsverity.h>

ioctl$FS_IOC_ENABLE_VERITY(fd fd, cmd const[FS_IOC_ENABLE_VERITY])
ioctl$FS_IOC_MEASURE_VERITY(fd fd, cmd const[FS_IOC_MEASURE_VERITY], arg ptr[inout, fsverity_digest])

fsverity_digest_algorithm_flags = FS_VERITY_ALG_SHA256, FS_VERITY_ALG_SHA512, FS_VERITY_ALG_CRC32C

fsverity_digest {
digest_algorithm flags[fsverity_digest_algorithm_flags, int16]
digest_size len[digest, int16]
digest array[int8]
}
7 changes: 7 additions & 0 deletions sys/linux/fsverity_386.const
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AUTOGENERATED FILE
FS_IOC_ENABLE_VERITY = 26245
FS_IOC_MEASURE_VERITY = 3221513862
FS_VERITY_ALG_CRC32C = 3
FS_VERITY_ALG_SHA256 = 1
FS_VERITY_ALG_SHA512 = 2
__NR_ioctl = 54
7 changes: 7 additions & 0 deletions sys/linux/fsverity_amd64.const
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AUTOGENERATED FILE
FS_IOC_ENABLE_VERITY = 26245
FS_IOC_MEASURE_VERITY = 3221513862
FS_VERITY_ALG_CRC32C = 3
FS_VERITY_ALG_SHA256 = 1
FS_VERITY_ALG_SHA512 = 2
__NR_ioctl = 16
Loading

0 comments on commit 1e82084

Please sign in to comment.