From c5f10a3f7dc9705ffcc7868c3362fa77c7803585 Mon Sep 17 00:00:00 2001 From: Stephen Gregoratto Date: Tue, 5 Aug 2025 21:16:46 +1000 Subject: [PATCH 1/3] Rewrite `generate_linux_syscalls` to be completely table based Changes by Arnd Bergmann have migrated all supported architectures to use a table for their syscall lists. This removes the need to use the C pre-processor and simplifies the logic considerably. All currently supported architectures have been added, with the ones Zig doesn't support being commented out. Speaking of; OpenRisc has been enabled for generation. --- tools/generate_linux_syscalls.zig | 864 +++++++----------------------- 1 file changed, 196 insertions(+), 668 deletions(-) diff --git a/tools/generate_linux_syscalls.zig b/tools/generate_linux_syscalls.zig index 60a529847738..f89691832ea3 100644 --- a/tools/generate_linux_syscalls.zig +++ b/tools/generate_linux_syscalls.zig @@ -2,12 +2,18 @@ //! //! This tool extracts the Linux syscall numbers from the Linux source tree //! directly, and emits an enumerated list per supported Zig arch. +//! +//! As of kernel version 6.11, all supported architectures have their syscalls +//! defined in files with the following tabular format: +//! +//! # Comment +//! ... +//! +//! Everything after `name` is ignored for the purposes of this tool. const std = @import("std"); +const Io = std.Io; const mem = std.mem; -const fmt = std.fmt; -const zig = std.zig; -const fs = std.fs; const stdlib_renames = std.StaticStringMap([]const u8).initComptime(.{ // Remove underscore prefix. @@ -22,702 +28,224 @@ const stdlib_renames = std.StaticStringMap([]const u8).initComptime(.{ // ARM EABI/Thumb. .{ "arm_sync_file_range", "sync_file_range" }, .{ "arm_fadvise64_64", "fadvise64_64" }, - // ARC and Hexagon. - .{ "mmap_pgoff", "mmap2" }, -}); - -// Only for newer architectures where we use the C preprocessor. -const stdlib_renames_new = std.StaticStringMap([]const u8).initComptime(.{ - .{ "newuname", "uname" }, - .{ "umount", "umount2" }, }); -// We use this to deal with the fact that multiple syscalls can be mapped to sys_ni_syscall. -// Thankfully it's only 2 well-known syscalls in newer kernel ports at the moment. -fn getOverridenNameNew(value: []const u8) ?[]const u8 { - if (mem.eql(u8, value, "18")) { - return "sys_lookup_dcookie"; - } else if (mem.eql(u8, value, "42")) { - return "sys_nfsservctl"; - } else { - return null; - } -} - -fn isReservedNameOld(name: []const u8) bool { - return std.mem.startsWith(u8, name, "available") or - std.mem.startsWith(u8, name, "reserved") or - std.mem.startsWith(u8, name, "unused"); +/// Filter syscalls that aren't actually syscalls. +fn isReserved(name: []const u8) bool { + return mem.startsWith(u8, name, "available") or + mem.startsWith(u8, name, "reserved") or + mem.startsWith(u8, name, "unused"); } -const default_args: []const []const u8 = &.{ - "-E", - // -dM is cleaner, but -dD preserves iteration order. - "-dD", - // No need for line-markers. - "-P", - "-nostdinc", - // Using -I=[dir] includes the zig linux headers, which we don't want. - "-Itools/include", - "-Itools/include/uapi", - // Output the syscall in a format we can easily recognize. - "-D __SYSCALL(nr, nm)=zigsyscall nm nr", +/// Values of the `abi` field in use by the syscall tables. +/// +/// Since c. 2012, all new Linux architectures use the same numbers for their syscalls. +/// Before kernel 6.11, the source of truth for this list was the arch-specific `uapi` headers. +/// The 6.11 release converted this into a unified table with the same format as the older archs. +/// For these targets, syscalls are enabled/disabled based on the `abi` field. +/// These fields are sourced from the respective `arch/{arch}/kernel/Makefile.syscalls` +/// files in the kernel source tree. +/// Architecture-specific syscalls between [244...259] are also enabled by adding the arch name as an abi. +const Abi = enum { + /// Syscalls common to two or more sub-targets. + /// Often used for single targets in lieu of a nil value. + common, + /// Syscalls using 64-bit types on 32-bit targets. + @"32", + /// 64-bit native syscalls. + @"64", + /// 32-bit time syscalls. + time32, + /// Supports the older renameat syscall along with renameat2. + renameat, + /// Supports the fstatat64 syscall. + stat64, + /// Supports the {get,set}rlimit syscalls. + rlimit, + /// Implements `memfd_secret` and friends. + memfd_secret, + // Architecture-specific syscalls. + x32, + eabi, + nospu, + arc, + csky, + nios2, + or1k, + riscv, }; -const ProcessPreprocessedFileFn = *const fn (bytes: []const u8, writer: anytype) anyerror!void; -const ProcessTableBasedArchFileFn = *const fn ( - bytes: []const u8, - filters: Filters, - writer: anytype, - optional_writer: anytype, -) anyerror!void; - -const FlowControl = enum { - @"break", - @"continue", - none, -}; - -const AbiCheckParams = struct { abi: []const u8, flow: FlowControl }; - -const Filters = struct { - abiCheckParams: ?AbiCheckParams, - fixedName: ?*const fn (name: []const u8) []const u8, - isReservedNameOld: ?*const fn (name: []const u8) bool, -}; - -fn abiCheck(abi: []const u8, params: *const AbiCheckParams) FlowControl { - if (mem.eql(u8, abi, params.abi)) return params.flow; - return .none; -} - -fn fixedName(name: []const u8) []const u8 { - return if (stdlib_renames.get(name)) |fixed| fixed else name; -} - -const ArchInfo = union(enum) { - table: struct { - name: []const u8, - enum_name: []const u8, - file_path: []const u8, - header: ?[]const u8, - extra_values: ?[]const u8, - process_file: ProcessTableBasedArchFileFn, - filters: Filters, - additional_enum: ?[]const u8, - }, - preprocessor: struct { - name: []const u8, - enum_name: []const u8, - file_path: []const u8, - child_options: struct { - comptime additional_args: ?[]const []const u8 = null, - target: []const u8, - - pub inline fn getArgs(self: *const @This(), zig_exe: []const u8, file_path: []const u8) []const []const u8 { - const additional_args: []const []const u8 = self.additional_args orelse &.{}; - return .{ zig_exe, "cc" } ++ additional_args ++ .{ "-target", self.target } ++ default_args ++ .{file_path}; - } - }, - header: ?[]const u8, - extra_values: ?[]const u8, - process_file: ProcessPreprocessedFileFn, - additional_enum: ?[]const u8, - }, +const __X32_SYSCALL_BIT: u32 = 0x40000000; +const __NR_Linux_O32: u32 = 4000; +const __NR_Linux_N64: u32 = 5000; +const __NR_Linux_N32: u32 = 6000; + +const Arch = struct { + /// Name for the generated enum variable. + @"var": []const u8, + /// Location of the table if this arch doesn't use the generic one. + table: union(enum) { generic: void, specific: []const u8 }, + /// List of abi features to filter on. + /// An empty list implies the abi field is a constant value, thus skipping validation. + abi: []const Abi = &.{}, + /// Some architectures need special handling: + /// - x32 system calls must have their number OR'ed with + /// `__X32_SYSCALL_BIT` to distinguish them against the regular x86_64 calls. + /// - Mips systems calls are offset by a set number based on the ABI. + /// + /// Because the `__X32_SYSCALL_BIT` mask is so large, we can turn the OR into a + /// normal addition and apply a base offset for all targets, defaulting to 0. + offset: u32 = 0, + header: ?[]const u8 = null, + footer: ?[]const u8 = null, + + fn get(self: Arch, line: []const u8) ?struct { []const u8, u32 } { + var iter = mem.tokenizeAny(u8, line, " \t"); + const num_str = iter.next() orelse @panic("Bad field"); + const abi = iter.next() orelse @panic("Bad field"); + const name = iter.next() orelse @panic("Bad field"); + + // Filter out syscalls that aren't actually syscalls. + if (isReserved(name)) return null; + // Check abi field matches + const abi_match: bool = if (self.abi.len == 0) true else blk: { + for (self.abi) |a| + if (mem.eql(u8, @tagName(a), abi)) break :blk true; + break :blk false; + }; + if (!abi_match) return null; + + var num = std.fmt.parseInt(u32, num_str, 10) catch @panic("Bad syscall number"); + num += self.offset; + + return .{ name, num }; + } }; -const arch_infos = [_]ArchInfo{ - .{ - // These architectures have their syscall definitions generated from a TSV - // file, processed via scripts/syscallhdr.sh. - .table = .{ - .name = "x86", - .enum_name = "X86", - .file_path = "arch/x86/entry/syscalls/syscall_32.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - .abiCheckParams = null, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "x64", - .enum_name = "X64", - .file_path = "arch/x86/entry/syscalls/syscall_64.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - // The x32 abi syscalls are always at the end. - .abiCheckParams = .{ .abi = "x32", .flow = .@"break" }, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "x32", - .enum_name = "X32", - .file_path = "arch/x86/entry/syscalls/syscall_64.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - .abiCheckParams = .{ .abi = "64", .flow = .@"continue" }, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "arm", - .enum_name = "Arm", - .file_path = "arch/arm/tools/syscall.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - .abiCheckParams = .{ .abi = "oabi", .flow = .@"continue" }, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = " const arm_base = 0x0f0000;\n\n", - // TODO: maybe extract these from arch/arm/include/uapi/asm/unistd.h - .extra_values = - \\ - \\ breakpoint = arm_base + 1, - \\ cacheflush = arm_base + 2, - \\ usr26 = arm_base + 3, - \\ usr32 = arm_base + 4, - \\ set_tls = arm_base + 5, - \\ get_tls = arm_base + 6, - \\ - , - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "sparc", - .enum_name = "Sparc", - .file_path = "arch/sparc/kernel/syscalls/syscall.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - .abiCheckParams = .{ .abi = "64", .flow = .@"continue" }, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, +const architectures: []const Arch = &.{ + .{ .@"var" = "X86", .table = .{ .specific = "arch/x86/entry/syscalls/syscall_32.tbl" } }, + .{ .@"var" = "X64", .table = .{ .specific = "arch/x86/entry/syscalls/syscall_64.tbl" }, .abi = &.{ .common, .@"64" } }, + .{ .@"var" = "X32", .table = .{ .specific = "arch/x86/entry/syscalls/syscall_64.tbl" }, .abi = &.{ .common, .x32 }, .offset = __X32_SYSCALL_BIT }, .{ - .table = .{ - .name = "sparc64", - .enum_name = "Sparc64", - .file_path = "arch/sparc/kernel/syscalls/syscall.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - .abiCheckParams = .{ .abi = "32", .flow = .@"continue" }, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "m68k", - .enum_name = "M68k", - .file_path = "arch/m68k/kernel/syscalls/syscall.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - // abi is always common - .abiCheckParams = null, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "mips_o32", - .enum_name = "MipsO32", - .file_path = "arch/mips/kernel/syscalls/syscall_o32.tbl", - .process_file = &processMipsBasedArch, - .filters = .{ - // abi is always o32 - .abiCheckParams = null, - .fixedName = &fixedName, - .isReservedNameOld = &isReservedNameOld, - }, - .header = " const linux_base = 4000;\n\n", - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "mips_n64", - .enum_name = "MipsN64", - .file_path = "arch/mips/kernel/syscalls/syscall_n64.tbl", - .process_file = &processMipsBasedArch, - .filters = .{ - // abi is always n64 - .abiCheckParams = null, - .fixedName = &fixedName, - .isReservedNameOld = &isReservedNameOld, - }, - .header = " const linux_base = 5000;\n\n", - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "mips_n32", - .enum_name = "MipsN32", - .file_path = "arch/mips/kernel/syscalls/syscall_n32.tbl", - .process_file = &processMipsBasedArch, - .filters = .{ - // abi is always n32 - .abiCheckParams = null, - .fixedName = &fixedName, - .isReservedNameOld = &isReservedNameOld, - }, - .header = " const linux_base = 6000;\n\n", - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "powerpc", - .enum_name = "PowerPC", - .file_path = "arch/powerpc/kernel/syscalls/syscall.tbl", - .process_file = &processPowerPcBasedArch, - .filters = .{ - .abiCheckParams = null, - .fixedName = null, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = "PowerPC64", - }, - }, - .{ - .table = .{ - .name = "s390x", - .enum_name = "S390x", - .file_path = "arch/s390/kernel/syscalls/syscall.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - // 32-bit s390 support in linux is deprecated - .abiCheckParams = .{ .abi = "32", .flow = .@"continue" }, - .fixedName = &fixedName, - .isReservedNameOld = null, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .table = .{ - .name = "xtensa", - .enum_name = "Xtensa", - .file_path = "arch/xtensa/kernel/syscalls/syscall.tbl", - .process_file = &processTableBasedArch, - .filters = .{ - // abi is always common - .abiCheckParams = null, - .fixedName = fixedName, - .isReservedNameOld = &isReservedNameOld, - }, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .preprocessor = .{ - .name = "arm64", - .enum_name = "Arm64", - .file_path = "arch/arm64/include/uapi/asm/unistd.h", - .child_options = .{ - .additional_args = null, - .target = "aarch64-freestanding-none", - }, - .process_file = &processPreprocessedFile, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .preprocessor = .{ - .name = "riscv32", - .enum_name = "RiscV32", - .file_path = "arch/riscv/include/uapi/asm/unistd.h", - .child_options = .{ - .additional_args = null, - .target = "riscv32-freestanding-none", - }, - .process_file = &processPreprocessedFile, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .preprocessor = .{ - .name = "riscv64", - .enum_name = "RiscV64", - .file_path = "arch/riscv/include/uapi/asm/unistd.h", - .child_options = .{ - .additional_args = null, - .target = "riscv64-freestanding-none", - }, - .process_file = &processPreprocessedFile, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .preprocessor = .{ - .name = "loongarch", - .enum_name = "LoongArch64", - .file_path = "arch/loongarch/include/uapi/asm/unistd.h", - .child_options = .{ - .additional_args = null, - .target = "loongarch64-freestanding-none", - }, - .process_file = &processPreprocessedFile, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .preprocessor = .{ - .name = "arc", - .enum_name = "Arc", - .file_path = "arch/arc/include/uapi/asm/unistd.h", - .child_options = .{ - .additional_args = null, - .target = "arc-freestanding-none", - }, - .process_file = &processPreprocessedFile, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .preprocessor = .{ - .name = "csky", - .enum_name = "CSky", - .file_path = "arch/csky/include/uapi/asm/unistd.h", - .child_options = .{ - .additional_args = null, - .target = "csky-freestanding-none", - }, - .process_file = &processPreprocessedFile, - .header = null, - .extra_values = null, - .additional_enum = null, - }, - }, - .{ - .preprocessor = .{ - .name = "hexagon", - .enum_name = "Hexagon", - .file_path = "arch/hexagon/include/uapi/asm/unistd.h", - .child_options = .{ - .additional_args = null, - .target = "hexagon-freestanding-none", - }, - .process_file = &processPreprocessedFile, - .header = null, - .extra_values = null, - .additional_enum = null, - }, + .@"var" = "Arm", + .table = .{ .specific = "arch/arm/tools/syscall.tbl" }, + .abi = &.{ .common, .eabi }, + // These values haven't been brought over from `arch/arm/include/uapi/asm/unistd.h`, + // so we are forced to add them ourselves. + .header = " const arm_base = 0x0f0000;\n\n", + .footer = + \\ + \\ breakpoint = arm_base + 1, + \\ cacheflush = arm_base + 2, + \\ usr26 = arm_base + 3, + \\ usr32 = arm_base + 4, + \\ set_tls = arm_base + 5, + \\ get_tls = arm_base + 6, + \\ + , }, + .{ .@"var" = "Sparc", .table = .{ .specific = "arch/sparc/kernel/syscalls/syscall.tbl" }, .abi = &.{ .common, .@"32" } }, + .{ .@"var" = "Sparc64", .table = .{ .specific = "arch/sparc/kernel/syscalls/syscall.tbl" }, .abi = &.{ .common, .@"64" } }, + .{ .@"var" = "M68k", .table = .{ .specific = "arch/m68k/kernel/syscalls/syscall.tbl" } }, + // For Mips, the abi for these tables is always o32/n64/n32. + .{ .@"var" = "MipsO32", .table = .{ .specific = "arch/mips/kernel/syscalls/syscall_o32.tbl" }, .offset = __NR_Linux_O32 }, + .{ .@"var" = "MipsN64", .table = .{ .specific = "arch/mips/kernel/syscalls/syscall_n64.tbl" }, .offset = __NR_Linux_N64 }, + .{ .@"var" = "MipsN32", .table = .{ .specific = "arch/mips/kernel/syscalls/syscall_n32.tbl" }, .offset = __NR_Linux_N32 }, + .{ .@"var" = "PowerPC", .table = .{ .specific = "arch/powerpc/kernel/syscalls/syscall.tbl" }, .abi = &.{ .common, .@"32", .nospu } }, + .{ .@"var" = "PowerPC64", .table = .{ .specific = "arch/powerpc/kernel/syscalls/syscall.tbl" }, .abi = &.{ .common, .@"64", .nospu } }, + .{ .@"var" = "S390x", .table = .{ .specific = "arch/s390/kernel/syscalls/syscall.tbl" }, .abi = &.{ .common, .@"64" } }, + .{ .@"var" = "Xtensa", .table = .{ .specific = "arch/xtensa/kernel/syscalls/syscall.tbl" } }, + .{ .@"var" = "Arm64", .table = .generic, .abi = &.{ .common, .@"64", .renameat, .rlimit, .memfd_secret } }, + .{ .@"var" = "RiscV32", .table = .generic, .abi = &.{ .common, .@"32", .riscv, .memfd_secret } }, + .{ .@"var" = "RiscV64", .table = .generic, .abi = &.{ .common, .@"64", .riscv, .rlimit, .memfd_secret } }, + .{ .@"var" = "LoongArch64", .table = .generic, .abi = &.{ .common, .@"64" } }, + .{ .@"var" = "Arc", .table = .generic, .abi = &.{ .common, .@"32", .arc, .time32, .renameat, .stat64, .rlimit } }, + .{ .@"var" = "CSky", .table = .generic, .abi = &.{ .common, .@"32", .csky, .time32, .stat64, .rlimit } }, + .{ .@"var" = "Hexagon", .table = .generic, .abi = &.{ .common, .@"32", .time32, .stat64, .rlimit, .renameat } }, + .{ .@"var" = "OpenRisc", .table = .generic, .abi = &.{ .common, .@"32", .or1k, .time32, .stat64, .rlimit, .renameat } }, + // .{ .@"var" = "Nios2", .table = .generic, .abi = &.{ .common, .@"32", .nios2, .time32, .stat64, .rlimit, .renameat } }, + // .{ .@"var" = "Parisc", .table = .{ .specific = "arch/parisc/kernel/syscalls/syscall.tbl" }, .abi = &.{ .common, .@"32" } }, + // .{ .@"var" = "Parisc64", .table = .{ .specific = "arch/parisc/kernel/syscalls/syscall.tbl" }, .abi = &.{ .common, .@"64" } }, + // .{ .@"var" = "Sh", .table = .{ .specific = "arch/sh/kernel/syscalls/syscall.tbl" } }, + // .{ .@"var" = "Microblaze", .table = .{ .specific = "arch/microblaze/kernel/syscalls/syscall.tbl" } }, }; -fn processPreprocessedFile( - bytes: []const u8, - writer: anytype, -) !void { - var lines = mem.tokenizeScalar(u8, bytes, '\n'); - while (lines.next()) |line| { - var fields = mem.tokenizeAny(u8, line, " "); - const prefix = fields.next() orelse return error.Incomplete; - - if (!mem.eql(u8, prefix, "zigsyscall")) continue; - - const sys_name = fields.next() orelse return error.Incomplete; - const value = fields.rest(); - const name = (getOverridenNameNew(value) orelse sys_name)["sys_".len..]; - const fixed_name = if (stdlib_renames_new.get(name)) |f| f else if (stdlib_renames.get(name)) |f| f else name; - - try writer.print(" {f} = {s},\n", .{ zig.fmtId(fixed_name), value }); - } -} - -fn processTableBasedArch( - bytes: []const u8, - filters: Filters, - writer: anytype, - optional_writer: anytype, -) !void { - _ = optional_writer; - - var lines = mem.tokenizeScalar(u8, bytes, '\n'); - while (lines.next()) |line| { - if (line[0] == '#') continue; - - var fields = mem.tokenizeAny(u8, line, " \t"); - const number = fields.next() orelse return error.Incomplete; - - const abi = fields.next() orelse return error.Incomplete; - if (filters.abiCheckParams) |*params| { - switch (abiCheck(abi, params)) { - .none => {}, - .@"break" => break, - .@"continue" => continue, - } - } - const name = fields.next() orelse return error.Incomplete; - if (filters.isReservedNameOld) |isReservedNameOldFn| { - if (isReservedNameOldFn(name)) continue; - } - const fixed_name = if (filters.fixedName) |fixedNameFn| fixedNameFn(name) else name; - - try writer.print(" {f} = {s},\n", .{ zig.fmtId(fixed_name), number }); - } -} - -fn processMipsBasedArch( - bytes: []const u8, - filters: Filters, - writer: anytype, - optional_writer: anytype, -) !void { - _ = optional_writer; - - var lines = mem.tokenizeScalar(u8, bytes, '\n'); - while (lines.next()) |line| { - if (line[0] == '#') continue; - - var fields = mem.tokenizeAny(u8, line, " \t"); - const number = fields.next() orelse return error.Incomplete; - - const abi = fields.next() orelse return error.Incomplete; - if (filters.abiCheckParams) |*params| { - switch (abiCheck(abi, params)) { - .none => {}, - .@"break" => break, - .@"continue" => continue, - } - } - const name = fields.next() orelse return error.Incomplete; - if (filters.isReservedNameOld) |isReservedNameOldFn| { - if (isReservedNameOldFn(name)) continue; - } - const fixed_name = if (filters.fixedName) |fixedNameFn| fixedNameFn(name) else name; - - try writer.print(" {f} = linux_base + {s},\n", .{ zig.fmtId(fixed_name), number }); - } -} - -fn processPowerPcBasedArch( - bytes: []const u8, - filters: Filters, - writer: anytype, - optional_writer: anytype, -) !void { - _ = filters; - var lines = mem.tokenizeScalar(u8, bytes, '\n'); - - while (lines.next()) |line| { - if (line[0] == '#') continue; - - var fields = mem.tokenizeAny(u8, line, " \t"); - const number = fields.next() orelse return error.Incomplete; - const abi = fields.next() orelse return error.Incomplete; - const name = fields.next() orelse return error.Incomplete; - const fixed_name = if (stdlib_renames.get(name)) |fixed| fixed else name; - - if (mem.eql(u8, abi, "spu")) { - continue; - } else if (mem.eql(u8, abi, "32")) { - try writer.print(" {f} = {s},\n", .{ zig.fmtId(fixed_name), number }); - } else if (mem.eql(u8, abi, "64")) { - try optional_writer.?.print(" {f} = {s},\n", .{ zig.fmtId(fixed_name), number }); - } else { // common/nospu - try writer.print(" {f} = {s},\n", .{ zig.fmtId(fixed_name), number }); - try optional_writer.?.print(" {f} = {s},\n", .{ zig.fmtId(fixed_name), number }); - } - } -} - -fn generateSyscallsFromTable( - allocator: std.mem.Allocator, - buf: []u8, - linux_dir: std.fs.Dir, - writer: anytype, - _arch_info: *const ArchInfo, -) !void { - std.debug.assert(_arch_info.* == .table); - - const arch_info = _arch_info.table; - - const table = try linux_dir.readFile(arch_info.file_path, buf); - - var optional_array_list: ?std.array_list.Managed(u8) = if (arch_info.additional_enum) |_| std.array_list.Managed(u8).init(allocator) else null; - const optional_writer = if (optional_array_list) |_| optional_array_list.?.writer() else null; - - try writer.print("pub const {s} = enum(usize) {{\n", .{arch_info.enum_name}); - - if (arch_info.header) |header| { - try writer.writeAll(header); - } - - try arch_info.process_file(table, arch_info.filters, writer, optional_writer); - - if (arch_info.extra_values) |extra_values| { - try writer.writeAll(extra_values); - } - try writer.writeAll("};"); - - if (arch_info.additional_enum) |additional_enum| { - try writer.writeAll("\n\n"); - try writer.print("pub const {s} = enum(usize) {{\n", .{additional_enum}); - try writer.writeAll(optional_array_list.?.items); - try writer.writeAll("};"); - } -} - -fn generateSyscallsFromPreprocessor( - allocator: std.mem.Allocator, - linux_dir: std.fs.Dir, - linux_path: []const u8, - zig_exe: []const u8, - writer: anytype, - _arch_info: *const ArchInfo, -) !void { - std.debug.assert(_arch_info.* == .preprocessor); - - const arch_info = _arch_info.preprocessor; - - const child_result = try std.process.Child.run(.{ - .allocator = allocator, - .argv = arch_info.child_options.getArgs(zig_exe, arch_info.file_path), - .cwd = linux_path, - .cwd_dir = linux_dir, - }); - if (child_result.stderr.len > 0) std.debug.print("{s}\n", .{child_result.stderr}); - - const defines = switch (child_result.term) { - .Exited => |code| if (code == 0) child_result.stdout else { - std.debug.print("zig cc exited with code {d}\n", .{code}); - std.process.exit(1); - }, - else => { - std.debug.print("zig cc crashed\n", .{}); - std.process.exit(1); - }, - }; - - try writer.print("pub const {s} = enum(usize) {{\n", .{arch_info.enum_name}); - if (arch_info.header) |header| { - try writer.writeAll(header); - } - - try arch_info.process_file(defines, writer); - - if (arch_info.extra_values) |extra_values| { - try writer.writeAll(extra_values); - } - - try writer.writeAll("};"); -} - pub fn main() !void { var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); defer arena.deinit(); - const allocator = arena.allocator(); + const gpa = arena.allocator(); - const args = try std.process.argsAlloc(allocator); - if (args.len < 3 or mem.eql(u8, args[1], "--help")) { + const args = try std.process.argsAlloc(gpa); + if (args.len < 2 or mem.eql(u8, args[1], "--help")) { usage(std.debug.lockStderrWriter(&.{}), args[0]) catch std.process.exit(2); std.process.exit(1); } - const zig_exe = args[1]; - const linux_path = args[2]; + const linux_path = args[1]; - var stdout_buffer: [2000]u8 = undefined; + var stdout_buffer: [2048]u8 = undefined; var stdout_writer = std.fs.File.stdout().writerStreaming(&stdout_buffer); - const writer = &stdout_writer.interface; + const stdout = &stdout_writer.interface; var linux_dir = try std.fs.cwd().openDir(linux_path, .{}); defer linux_dir.close(); - try writer.writeAll( - \\// This file is automatically generated. + // As of 6.11, the largest table is 24195 bytes. + // 32k should be enough for now. + const buf = try gpa.alloc(u8, 1 << 15); + defer gpa.free(buf); + + // Fetch the kernel version from the Makefile variables. + const version = blk: { + const head = try linux_dir.readFile("Makefile", buf[0..128]); + var lines = mem.tokenizeScalar(u8, head, '\n'); + _ = lines.next(); // Skip SPDX identifier + + var ver = mem.zeroes(std.SemanticVersion); + inline for (.{ "major", "minor", "patch" }, .{ "VERSION", "PATCHLEVEL", "SUBLEVEL" }) |field, make_var| { + const line = lines.next() orelse @panic("Bad line"); + const offset = (make_var ++ " = ").len; + @field(ver, field) = try std.fmt.parseInt(usize, line[offset..], 10); + } + + break :blk ver; + }; + + try Io.Writer.print(stdout, + \\// This file is automatically generated, DO NOT edit it manually. \\// See tools/generate_linux_syscalls.zig for more info. + \\// This list current as of kernel: {f} \\ \\ - ); - - // As of 5.17.1, the largest table is 23467 bytes. - // 32k should be enough for now. - const buf = try allocator.alloc(u8, 1 << 15); - defer allocator.free(buf); - - inline for (arch_infos, 0..) |arch_info, i| { - switch (arch_info) { - .table => try generateSyscallsFromTable( - allocator, - buf, - linux_dir, - writer, - &arch_info, - ), - .preprocessor => try generateSyscallsFromPreprocessor( - allocator, - linux_dir, - linux_path, - zig_exe, - writer, - &arch_info, - ), - } - if (i < arch_infos.len - 1) { - try writer.writeAll("\n\n"); - } else { - try writer.writeAll("\n"); + , .{version}); + + for (architectures, 0..) |arch, i| { + const table = try linux_dir.readFile(switch (arch.table) { + .generic => "scripts/syscall.tbl", + .specific => |f| f, + }, buf); + + try Io.Writer.print(stdout, "pub const {s} = enum(usize) {{\n", .{arch.@"var"}); + if (arch.header) |h| + try Io.Writer.writeAll(stdout, h); + + var lines = mem.tokenizeScalar(u8, table, '\n'); + while (lines.next()) |line| { + if (line[0] == '#') continue; + if (arch.get(line)) |res| { + const name, const num = res; + const final_name = stdlib_renames.get(name) orelse name; + try Io.Writer.print(stdout, " {f} = {d},\n", .{ std.zig.fmtId(final_name), num }); + } } + + if (arch.footer) |f| + try Io.Writer.writeAll(stdout, f); + try Io.Writer.writeAll(stdout, "};\n"); + if (i != architectures.len - 1) + try Io.Writer.writeByte(stdout, '\n'); } - try writer.flush(); + try Io.Writer.flush(stdout); } fn usage(w: *std.io.Writer, arg0: []const u8) std.io.Writer.Error!void { From 6f60c8eca786e67d9a6dfb75de9e6c8f10d0f189 Mon Sep 17 00:00:00 2001 From: Stephen Gregoratto Date: Tue, 5 Aug 2025 21:27:38 +1000 Subject: [PATCH 2/3] Linux: Update syscall list for 6.16 The generic syscall table has different names for syscalls that take a timespec64 on 32-bit targets, in that it adds the `_time64` suffix. Similarly, the `_time32` suffix has been removed. I'm not sure if the existing logic for determining the proper timespec struct to use was subtly broken, but it should be a good chance to finish #4726 - we only have 12 years after all... As for the changes since 6.11..6.16: 6.11: - x86_64 gets `uretprobe`, a syscall to speed up returning BPF probes. - Hexagon gets `clone3`, but don't be fooled: it just returns ENOSYS. 6.13: - The `*xattr` family of syscalls have been enhanced with new `*xattrat` versions, similar to the other file-based `at` calls. 6.15: - Atomically create a detached mount tree and set mount options on it. Finally, this commit also adds the syscall numbers for OpenRISC and maps it to the `or1k` cpu. --- lib/std/os/linux.zig | 1 + lib/std/os/linux/syscalls.zig | 4009 ++++++++++++++++++--------------- 2 files changed, 2231 insertions(+), 1779 deletions(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 9242c33ecefd..6cb325a5ea95 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -144,6 +144,7 @@ pub const SYS = switch (@import("builtin").cpu.arch) { else => syscalls.X64, }, .xtensa => syscalls.Xtensa, + .or1k => syscalls.OpenRisc, else => @compileError("The Zig Standard Library is missing syscall definitions for the target CPU architecture"), }; diff --git a/lib/std/os/linux/syscalls.zig b/lib/std/os/linux/syscalls.zig index fbf3aada02aa..58005cfa359d 100644 --- a/lib/std/os/linux/syscalls.zig +++ b/lib/std/os/linux/syscalls.zig @@ -1,5 +1,6 @@ -// This file is automatically generated. +// This file is automatically generated, DO NOT edit it manually. // See tools/generate_linux_syscalls.zig for more info. +// This list current as of kernel: 6.16.0 pub const X86 = enum(usize) { restart_syscall = 0, @@ -454,6 +455,11 @@ pub const X86 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const X64 = enum(usize) { @@ -792,6 +798,7 @@ pub const X64 = enum(usize) { statx = 332, io_pgetevents = 333, rseq = 334, + uretprobe = 335, pidfd_send_signal = 424, io_uring_setup = 425, io_uring_enter = 426, @@ -831,372 +838,383 @@ pub const X64 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const X32 = enum(usize) { - read = 0, - write = 1, - open = 2, - close = 3, - stat = 4, - fstat = 5, - lstat = 6, - poll = 7, - lseek = 8, - mmap = 9, - mprotect = 10, - munmap = 11, - brk = 12, - rt_sigprocmask = 14, - pread64 = 17, - pwrite64 = 18, - access = 21, - pipe = 22, - select = 23, - sched_yield = 24, - mremap = 25, - msync = 26, - mincore = 27, - madvise = 28, - shmget = 29, - shmat = 30, - shmctl = 31, - dup = 32, - dup2 = 33, - pause = 34, - nanosleep = 35, - getitimer = 36, - alarm = 37, - setitimer = 38, - getpid = 39, - sendfile = 40, - socket = 41, - connect = 42, - accept = 43, - sendto = 44, - shutdown = 48, - bind = 49, - listen = 50, - getsockname = 51, - getpeername = 52, - socketpair = 53, - clone = 56, - fork = 57, - vfork = 58, - exit = 60, - wait4 = 61, - kill = 62, - uname = 63, - semget = 64, - semop = 65, - semctl = 66, - shmdt = 67, - msgget = 68, - msgsnd = 69, - msgrcv = 70, - msgctl = 71, - fcntl = 72, - flock = 73, - fsync = 74, - fdatasync = 75, - truncate = 76, - ftruncate = 77, - getdents = 78, - getcwd = 79, - chdir = 80, - fchdir = 81, - rename = 82, - mkdir = 83, - rmdir = 84, - creat = 85, - link = 86, - unlink = 87, - symlink = 88, - readlink = 89, - chmod = 90, - fchmod = 91, - chown = 92, - fchown = 93, - lchown = 94, - umask = 95, - gettimeofday = 96, - getrlimit = 97, - getrusage = 98, - sysinfo = 99, - times = 100, - getuid = 102, - syslog = 103, - getgid = 104, - setuid = 105, - setgid = 106, - geteuid = 107, - getegid = 108, - setpgid = 109, - getppid = 110, - getpgrp = 111, - setsid = 112, - setreuid = 113, - setregid = 114, - getgroups = 115, - setgroups = 116, - setresuid = 117, - getresuid = 118, - setresgid = 119, - getresgid = 120, - getpgid = 121, - setfsuid = 122, - setfsgid = 123, - getsid = 124, - capget = 125, - capset = 126, - rt_sigsuspend = 130, - utime = 132, - mknod = 133, - personality = 135, - ustat = 136, - statfs = 137, - fstatfs = 138, - sysfs = 139, - getpriority = 140, - setpriority = 141, - sched_setparam = 142, - sched_getparam = 143, - sched_setscheduler = 144, - sched_getscheduler = 145, - sched_get_priority_max = 146, - sched_get_priority_min = 147, - sched_rr_get_interval = 148, - mlock = 149, - munlock = 150, - mlockall = 151, - munlockall = 152, - vhangup = 153, - modify_ldt = 154, - pivot_root = 155, - prctl = 157, - arch_prctl = 158, - adjtimex = 159, - setrlimit = 160, - chroot = 161, - sync = 162, - acct = 163, - settimeofday = 164, - mount = 165, - umount2 = 166, - swapon = 167, - swapoff = 168, - reboot = 169, - sethostname = 170, - setdomainname = 171, - iopl = 172, - ioperm = 173, - init_module = 175, - delete_module = 176, - quotactl = 179, - getpmsg = 181, - putpmsg = 182, - afs_syscall = 183, - tuxcall = 184, - security = 185, - gettid = 186, - readahead = 187, - setxattr = 188, - lsetxattr = 189, - fsetxattr = 190, - getxattr = 191, - lgetxattr = 192, - fgetxattr = 193, - listxattr = 194, - llistxattr = 195, - flistxattr = 196, - removexattr = 197, - lremovexattr = 198, - fremovexattr = 199, - tkill = 200, - time = 201, - futex = 202, - sched_setaffinity = 203, - sched_getaffinity = 204, - io_destroy = 207, - io_getevents = 208, - io_cancel = 210, - lookup_dcookie = 212, - epoll_create = 213, - remap_file_pages = 216, - getdents64 = 217, - set_tid_address = 218, - restart_syscall = 219, - semtimedop = 220, - fadvise64 = 221, - timer_settime = 223, - timer_gettime = 224, - timer_getoverrun = 225, - timer_delete = 226, - clock_settime = 227, - clock_gettime = 228, - clock_getres = 229, - clock_nanosleep = 230, - exit_group = 231, - epoll_wait = 232, - epoll_ctl = 233, - tgkill = 234, - utimes = 235, - mbind = 237, - set_mempolicy = 238, - get_mempolicy = 239, - mq_open = 240, - mq_unlink = 241, - mq_timedsend = 242, - mq_timedreceive = 243, - mq_getsetattr = 245, - add_key = 248, - request_key = 249, - keyctl = 250, - ioprio_set = 251, - ioprio_get = 252, - inotify_init = 253, - inotify_add_watch = 254, - inotify_rm_watch = 255, - migrate_pages = 256, - openat = 257, - mkdirat = 258, - mknodat = 259, - fchownat = 260, - futimesat = 261, - fstatat64 = 262, - unlinkat = 263, - renameat = 264, - linkat = 265, - symlinkat = 266, - readlinkat = 267, - fchmodat = 268, - faccessat = 269, - pselect6 = 270, - ppoll = 271, - unshare = 272, - splice = 275, - tee = 276, - sync_file_range = 277, - utimensat = 280, - epoll_pwait = 281, - signalfd = 282, - timerfd_create = 283, - eventfd = 284, - fallocate = 285, - timerfd_settime = 286, - timerfd_gettime = 287, - accept4 = 288, - signalfd4 = 289, - eventfd2 = 290, - epoll_create1 = 291, - dup3 = 292, - pipe2 = 293, - inotify_init1 = 294, - perf_event_open = 298, - fanotify_init = 300, - fanotify_mark = 301, - prlimit64 = 302, - name_to_handle_at = 303, - open_by_handle_at = 304, - clock_adjtime = 305, - syncfs = 306, - setns = 308, - getcpu = 309, - kcmp = 312, - finit_module = 313, - sched_setattr = 314, - sched_getattr = 315, - renameat2 = 316, - seccomp = 317, - getrandom = 318, - memfd_create = 319, - kexec_file_load = 320, - bpf = 321, - userfaultfd = 323, - membarrier = 324, - mlock2 = 325, - copy_file_range = 326, - pkey_mprotect = 329, - pkey_alloc = 330, - pkey_free = 331, - statx = 332, - io_pgetevents = 333, - rseq = 334, - pidfd_send_signal = 424, - io_uring_setup = 425, - io_uring_enter = 426, - io_uring_register = 427, - open_tree = 428, - move_mount = 429, - fsopen = 430, - fsconfig = 431, - fsmount = 432, - fspick = 433, - pidfd_open = 434, - clone3 = 435, - close_range = 436, - openat2 = 437, - pidfd_getfd = 438, - faccessat2 = 439, - process_madvise = 440, - epoll_pwait2 = 441, - mount_setattr = 442, - quotactl_fd = 443, - landlock_create_ruleset = 444, - landlock_add_rule = 445, - landlock_restrict_self = 446, - memfd_secret = 447, - process_mrelease = 448, - futex_waitv = 449, - set_mempolicy_home_node = 450, - cachestat = 451, - fchmodat2 = 452, - map_shadow_stack = 453, - futex_wake = 454, - futex_wait = 455, - futex_requeue = 456, - statmount = 457, - listmount = 458, - lsm_get_self_attr = 459, - lsm_set_self_attr = 460, - lsm_list_modules = 461, - mseal = 462, - rt_sigaction = 512, - rt_sigreturn = 513, - ioctl = 514, - readv = 515, - writev = 516, - recvfrom = 517, - sendmsg = 518, - recvmsg = 519, - execve = 520, - ptrace = 521, - rt_sigpending = 522, - rt_sigtimedwait = 523, - rt_sigqueueinfo = 524, - sigaltstack = 525, - timer_create = 526, - mq_notify = 527, - kexec_load = 528, - waitid = 529, - set_robust_list = 530, - get_robust_list = 531, - vmsplice = 532, - move_pages = 533, - preadv = 534, - pwritev = 535, - rt_tgsigqueueinfo = 536, - recvmmsg = 537, - sendmmsg = 538, - process_vm_readv = 539, - process_vm_writev = 540, - setsockopt = 541, - getsockopt = 542, - io_setup = 543, - io_submit = 544, - execveat = 545, - preadv2 = 546, - pwritev2 = 547, + read = 1073741824, + write = 1073741825, + open = 1073741826, + close = 1073741827, + stat = 1073741828, + fstat = 1073741829, + lstat = 1073741830, + poll = 1073741831, + lseek = 1073741832, + mmap = 1073741833, + mprotect = 1073741834, + munmap = 1073741835, + brk = 1073741836, + rt_sigprocmask = 1073741838, + pread64 = 1073741841, + pwrite64 = 1073741842, + access = 1073741845, + pipe = 1073741846, + select = 1073741847, + sched_yield = 1073741848, + mremap = 1073741849, + msync = 1073741850, + mincore = 1073741851, + madvise = 1073741852, + shmget = 1073741853, + shmat = 1073741854, + shmctl = 1073741855, + dup = 1073741856, + dup2 = 1073741857, + pause = 1073741858, + nanosleep = 1073741859, + getitimer = 1073741860, + alarm = 1073741861, + setitimer = 1073741862, + getpid = 1073741863, + sendfile = 1073741864, + socket = 1073741865, + connect = 1073741866, + accept = 1073741867, + sendto = 1073741868, + shutdown = 1073741872, + bind = 1073741873, + listen = 1073741874, + getsockname = 1073741875, + getpeername = 1073741876, + socketpair = 1073741877, + clone = 1073741880, + fork = 1073741881, + vfork = 1073741882, + exit = 1073741884, + wait4 = 1073741885, + kill = 1073741886, + uname = 1073741887, + semget = 1073741888, + semop = 1073741889, + semctl = 1073741890, + shmdt = 1073741891, + msgget = 1073741892, + msgsnd = 1073741893, + msgrcv = 1073741894, + msgctl = 1073741895, + fcntl = 1073741896, + flock = 1073741897, + fsync = 1073741898, + fdatasync = 1073741899, + truncate = 1073741900, + ftruncate = 1073741901, + getdents = 1073741902, + getcwd = 1073741903, + chdir = 1073741904, + fchdir = 1073741905, + rename = 1073741906, + mkdir = 1073741907, + rmdir = 1073741908, + creat = 1073741909, + link = 1073741910, + unlink = 1073741911, + symlink = 1073741912, + readlink = 1073741913, + chmod = 1073741914, + fchmod = 1073741915, + chown = 1073741916, + fchown = 1073741917, + lchown = 1073741918, + umask = 1073741919, + gettimeofday = 1073741920, + getrlimit = 1073741921, + getrusage = 1073741922, + sysinfo = 1073741923, + times = 1073741924, + getuid = 1073741926, + syslog = 1073741927, + getgid = 1073741928, + setuid = 1073741929, + setgid = 1073741930, + geteuid = 1073741931, + getegid = 1073741932, + setpgid = 1073741933, + getppid = 1073741934, + getpgrp = 1073741935, + setsid = 1073741936, + setreuid = 1073741937, + setregid = 1073741938, + getgroups = 1073741939, + setgroups = 1073741940, + setresuid = 1073741941, + getresuid = 1073741942, + setresgid = 1073741943, + getresgid = 1073741944, + getpgid = 1073741945, + setfsuid = 1073741946, + setfsgid = 1073741947, + getsid = 1073741948, + capget = 1073741949, + capset = 1073741950, + rt_sigsuspend = 1073741954, + utime = 1073741956, + mknod = 1073741957, + personality = 1073741959, + ustat = 1073741960, + statfs = 1073741961, + fstatfs = 1073741962, + sysfs = 1073741963, + getpriority = 1073741964, + setpriority = 1073741965, + sched_setparam = 1073741966, + sched_getparam = 1073741967, + sched_setscheduler = 1073741968, + sched_getscheduler = 1073741969, + sched_get_priority_max = 1073741970, + sched_get_priority_min = 1073741971, + sched_rr_get_interval = 1073741972, + mlock = 1073741973, + munlock = 1073741974, + mlockall = 1073741975, + munlockall = 1073741976, + vhangup = 1073741977, + modify_ldt = 1073741978, + pivot_root = 1073741979, + prctl = 1073741981, + arch_prctl = 1073741982, + adjtimex = 1073741983, + setrlimit = 1073741984, + chroot = 1073741985, + sync = 1073741986, + acct = 1073741987, + settimeofday = 1073741988, + mount = 1073741989, + umount2 = 1073741990, + swapon = 1073741991, + swapoff = 1073741992, + reboot = 1073741993, + sethostname = 1073741994, + setdomainname = 1073741995, + iopl = 1073741996, + ioperm = 1073741997, + init_module = 1073741999, + delete_module = 1073742000, + quotactl = 1073742003, + getpmsg = 1073742005, + putpmsg = 1073742006, + afs_syscall = 1073742007, + tuxcall = 1073742008, + security = 1073742009, + gettid = 1073742010, + readahead = 1073742011, + setxattr = 1073742012, + lsetxattr = 1073742013, + fsetxattr = 1073742014, + getxattr = 1073742015, + lgetxattr = 1073742016, + fgetxattr = 1073742017, + listxattr = 1073742018, + llistxattr = 1073742019, + flistxattr = 1073742020, + removexattr = 1073742021, + lremovexattr = 1073742022, + fremovexattr = 1073742023, + tkill = 1073742024, + time = 1073742025, + futex = 1073742026, + sched_setaffinity = 1073742027, + sched_getaffinity = 1073742028, + io_destroy = 1073742031, + io_getevents = 1073742032, + io_cancel = 1073742034, + lookup_dcookie = 1073742036, + epoll_create = 1073742037, + remap_file_pages = 1073742040, + getdents64 = 1073742041, + set_tid_address = 1073742042, + restart_syscall = 1073742043, + semtimedop = 1073742044, + fadvise64 = 1073742045, + timer_settime = 1073742047, + timer_gettime = 1073742048, + timer_getoverrun = 1073742049, + timer_delete = 1073742050, + clock_settime = 1073742051, + clock_gettime = 1073742052, + clock_getres = 1073742053, + clock_nanosleep = 1073742054, + exit_group = 1073742055, + epoll_wait = 1073742056, + epoll_ctl = 1073742057, + tgkill = 1073742058, + utimes = 1073742059, + mbind = 1073742061, + set_mempolicy = 1073742062, + get_mempolicy = 1073742063, + mq_open = 1073742064, + mq_unlink = 1073742065, + mq_timedsend = 1073742066, + mq_timedreceive = 1073742067, + mq_getsetattr = 1073742069, + add_key = 1073742072, + request_key = 1073742073, + keyctl = 1073742074, + ioprio_set = 1073742075, + ioprio_get = 1073742076, + inotify_init = 1073742077, + inotify_add_watch = 1073742078, + inotify_rm_watch = 1073742079, + migrate_pages = 1073742080, + openat = 1073742081, + mkdirat = 1073742082, + mknodat = 1073742083, + fchownat = 1073742084, + futimesat = 1073742085, + fstatat64 = 1073742086, + unlinkat = 1073742087, + renameat = 1073742088, + linkat = 1073742089, + symlinkat = 1073742090, + readlinkat = 1073742091, + fchmodat = 1073742092, + faccessat = 1073742093, + pselect6 = 1073742094, + ppoll = 1073742095, + unshare = 1073742096, + splice = 1073742099, + tee = 1073742100, + sync_file_range = 1073742101, + utimensat = 1073742104, + epoll_pwait = 1073742105, + signalfd = 1073742106, + timerfd_create = 1073742107, + eventfd = 1073742108, + fallocate = 1073742109, + timerfd_settime = 1073742110, + timerfd_gettime = 1073742111, + accept4 = 1073742112, + signalfd4 = 1073742113, + eventfd2 = 1073742114, + epoll_create1 = 1073742115, + dup3 = 1073742116, + pipe2 = 1073742117, + inotify_init1 = 1073742118, + perf_event_open = 1073742122, + fanotify_init = 1073742124, + fanotify_mark = 1073742125, + prlimit64 = 1073742126, + name_to_handle_at = 1073742127, + open_by_handle_at = 1073742128, + clock_adjtime = 1073742129, + syncfs = 1073742130, + setns = 1073742132, + getcpu = 1073742133, + kcmp = 1073742136, + finit_module = 1073742137, + sched_setattr = 1073742138, + sched_getattr = 1073742139, + renameat2 = 1073742140, + seccomp = 1073742141, + getrandom = 1073742142, + memfd_create = 1073742143, + kexec_file_load = 1073742144, + bpf = 1073742145, + userfaultfd = 1073742147, + membarrier = 1073742148, + mlock2 = 1073742149, + copy_file_range = 1073742150, + pkey_mprotect = 1073742153, + pkey_alloc = 1073742154, + pkey_free = 1073742155, + statx = 1073742156, + io_pgetevents = 1073742157, + rseq = 1073742158, + uretprobe = 1073742159, + pidfd_send_signal = 1073742248, + io_uring_setup = 1073742249, + io_uring_enter = 1073742250, + io_uring_register = 1073742251, + open_tree = 1073742252, + move_mount = 1073742253, + fsopen = 1073742254, + fsconfig = 1073742255, + fsmount = 1073742256, + fspick = 1073742257, + pidfd_open = 1073742258, + clone3 = 1073742259, + close_range = 1073742260, + openat2 = 1073742261, + pidfd_getfd = 1073742262, + faccessat2 = 1073742263, + process_madvise = 1073742264, + epoll_pwait2 = 1073742265, + mount_setattr = 1073742266, + quotactl_fd = 1073742267, + landlock_create_ruleset = 1073742268, + landlock_add_rule = 1073742269, + landlock_restrict_self = 1073742270, + memfd_secret = 1073742271, + process_mrelease = 1073742272, + futex_waitv = 1073742273, + set_mempolicy_home_node = 1073742274, + cachestat = 1073742275, + fchmodat2 = 1073742276, + map_shadow_stack = 1073742277, + futex_wake = 1073742278, + futex_wait = 1073742279, + futex_requeue = 1073742280, + statmount = 1073742281, + listmount = 1073742282, + lsm_get_self_attr = 1073742283, + lsm_set_self_attr = 1073742284, + lsm_list_modules = 1073742285, + mseal = 1073742286, + setxattrat = 1073742287, + getxattrat = 1073742288, + listxattrat = 1073742289, + removexattrat = 1073742290, + open_tree_attr = 1073742291, + rt_sigaction = 1073742336, + rt_sigreturn = 1073742337, + ioctl = 1073742338, + readv = 1073742339, + writev = 1073742340, + recvfrom = 1073742341, + sendmsg = 1073742342, + recvmsg = 1073742343, + execve = 1073742344, + ptrace = 1073742345, + rt_sigpending = 1073742346, + rt_sigtimedwait = 1073742347, + rt_sigqueueinfo = 1073742348, + sigaltstack = 1073742349, + timer_create = 1073742350, + mq_notify = 1073742351, + kexec_load = 1073742352, + waitid = 1073742353, + set_robust_list = 1073742354, + get_robust_list = 1073742355, + vmsplice = 1073742356, + move_pages = 1073742357, + preadv = 1073742358, + pwritev = 1073742359, + rt_tgsigqueueinfo = 1073742360, + recvmmsg = 1073742361, + sendmmsg = 1073742362, + process_vm_readv = 1073742363, + process_vm_writev = 1073742364, + setsockopt = 1073742365, + getsockopt = 1073742366, + io_setup = 1073742367, + io_submit = 1073742368, + execveat = 1073742369, + preadv2 = 1073742370, + pwritev2 = 1073742371, }; pub const Arm = enum(usize) { @@ -1617,6 +1635,11 @@ pub const Arm = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, breakpoint = arm_base + 1, cacheflush = arm_base + 2, @@ -2058,6 +2081,11 @@ pub const Sparc = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const Sparc64 = enum(usize) { @@ -2455,6 +2483,11 @@ pub const Sparc64 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const M68k = enum(usize) { @@ -2892,1201 +2925,1215 @@ pub const M68k = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const MipsO32 = enum(usize) { - const linux_base = 4000; - - syscall = linux_base + 0, - exit = linux_base + 1, - fork = linux_base + 2, - read = linux_base + 3, - write = linux_base + 4, - open = linux_base + 5, - close = linux_base + 6, - waitpid = linux_base + 7, - creat = linux_base + 8, - link = linux_base + 9, - unlink = linux_base + 10, - execve = linux_base + 11, - chdir = linux_base + 12, - time = linux_base + 13, - mknod = linux_base + 14, - chmod = linux_base + 15, - lchown = linux_base + 16, - @"break" = linux_base + 17, - lseek = linux_base + 19, - getpid = linux_base + 20, - mount = linux_base + 21, - umount = linux_base + 22, - setuid = linux_base + 23, - getuid = linux_base + 24, - stime = linux_base + 25, - ptrace = linux_base + 26, - alarm = linux_base + 27, - pause = linux_base + 29, - utime = linux_base + 30, - stty = linux_base + 31, - gtty = linux_base + 32, - access = linux_base + 33, - nice = linux_base + 34, - ftime = linux_base + 35, - sync = linux_base + 36, - kill = linux_base + 37, - rename = linux_base + 38, - mkdir = linux_base + 39, - rmdir = linux_base + 40, - dup = linux_base + 41, - pipe = linux_base + 42, - times = linux_base + 43, - prof = linux_base + 44, - brk = linux_base + 45, - setgid = linux_base + 46, - getgid = linux_base + 47, - signal = linux_base + 48, - geteuid = linux_base + 49, - getegid = linux_base + 50, - acct = linux_base + 51, - umount2 = linux_base + 52, - lock = linux_base + 53, - ioctl = linux_base + 54, - fcntl = linux_base + 55, - mpx = linux_base + 56, - setpgid = linux_base + 57, - ulimit = linux_base + 58, - umask = linux_base + 60, - chroot = linux_base + 61, - ustat = linux_base + 62, - dup2 = linux_base + 63, - getppid = linux_base + 64, - getpgrp = linux_base + 65, - setsid = linux_base + 66, - sigaction = linux_base + 67, - sgetmask = linux_base + 68, - ssetmask = linux_base + 69, - setreuid = linux_base + 70, - setregid = linux_base + 71, - sigsuspend = linux_base + 72, - sigpending = linux_base + 73, - sethostname = linux_base + 74, - setrlimit = linux_base + 75, - getrlimit = linux_base + 76, - getrusage = linux_base + 77, - gettimeofday = linux_base + 78, - settimeofday = linux_base + 79, - getgroups = linux_base + 80, - setgroups = linux_base + 81, - symlink = linux_base + 83, - readlink = linux_base + 85, - uselib = linux_base + 86, - swapon = linux_base + 87, - reboot = linux_base + 88, - readdir = linux_base + 89, - mmap = linux_base + 90, - munmap = linux_base + 91, - truncate = linux_base + 92, - ftruncate = linux_base + 93, - fchmod = linux_base + 94, - fchown = linux_base + 95, - getpriority = linux_base + 96, - setpriority = linux_base + 97, - profil = linux_base + 98, - statfs = linux_base + 99, - fstatfs = linux_base + 100, - ioperm = linux_base + 101, - socketcall = linux_base + 102, - syslog = linux_base + 103, - setitimer = linux_base + 104, - getitimer = linux_base + 105, - stat = linux_base + 106, - lstat = linux_base + 107, - fstat = linux_base + 108, - iopl = linux_base + 110, - vhangup = linux_base + 111, - idle = linux_base + 112, - vm86 = linux_base + 113, - wait4 = linux_base + 114, - swapoff = linux_base + 115, - sysinfo = linux_base + 116, - ipc = linux_base + 117, - fsync = linux_base + 118, - sigreturn = linux_base + 119, - clone = linux_base + 120, - setdomainname = linux_base + 121, - uname = linux_base + 122, - modify_ldt = linux_base + 123, - adjtimex = linux_base + 124, - mprotect = linux_base + 125, - sigprocmask = linux_base + 126, - create_module = linux_base + 127, - init_module = linux_base + 128, - delete_module = linux_base + 129, - get_kernel_syms = linux_base + 130, - quotactl = linux_base + 131, - getpgid = linux_base + 132, - fchdir = linux_base + 133, - bdflush = linux_base + 134, - sysfs = linux_base + 135, - personality = linux_base + 136, - afs_syscall = linux_base + 137, - setfsuid = linux_base + 138, - setfsgid = linux_base + 139, - llseek = linux_base + 140, - getdents = linux_base + 141, - newselect = linux_base + 142, - flock = linux_base + 143, - msync = linux_base + 144, - readv = linux_base + 145, - writev = linux_base + 146, - cacheflush = linux_base + 147, - cachectl = linux_base + 148, - sysmips = linux_base + 149, - getsid = linux_base + 151, - fdatasync = linux_base + 152, - sysctl = linux_base + 153, - mlock = linux_base + 154, - munlock = linux_base + 155, - mlockall = linux_base + 156, - munlockall = linux_base + 157, - sched_setparam = linux_base + 158, - sched_getparam = linux_base + 159, - sched_setscheduler = linux_base + 160, - sched_getscheduler = linux_base + 161, - sched_yield = linux_base + 162, - sched_get_priority_max = linux_base + 163, - sched_get_priority_min = linux_base + 164, - sched_rr_get_interval = linux_base + 165, - nanosleep = linux_base + 166, - mremap = linux_base + 167, - accept = linux_base + 168, - bind = linux_base + 169, - connect = linux_base + 170, - getpeername = linux_base + 171, - getsockname = linux_base + 172, - getsockopt = linux_base + 173, - listen = linux_base + 174, - recv = linux_base + 175, - recvfrom = linux_base + 176, - recvmsg = linux_base + 177, - send = linux_base + 178, - sendmsg = linux_base + 179, - sendto = linux_base + 180, - setsockopt = linux_base + 181, - shutdown = linux_base + 182, - socket = linux_base + 183, - socketpair = linux_base + 184, - setresuid = linux_base + 185, - getresuid = linux_base + 186, - query_module = linux_base + 187, - poll = linux_base + 188, - nfsservctl = linux_base + 189, - setresgid = linux_base + 190, - getresgid = linux_base + 191, - prctl = linux_base + 192, - rt_sigreturn = linux_base + 193, - rt_sigaction = linux_base + 194, - rt_sigprocmask = linux_base + 195, - rt_sigpending = linux_base + 196, - rt_sigtimedwait = linux_base + 197, - rt_sigqueueinfo = linux_base + 198, - rt_sigsuspend = linux_base + 199, - pread64 = linux_base + 200, - pwrite64 = linux_base + 201, - chown = linux_base + 202, - getcwd = linux_base + 203, - capget = linux_base + 204, - capset = linux_base + 205, - sigaltstack = linux_base + 206, - sendfile = linux_base + 207, - getpmsg = linux_base + 208, - putpmsg = linux_base + 209, - mmap2 = linux_base + 210, - truncate64 = linux_base + 211, - ftruncate64 = linux_base + 212, - stat64 = linux_base + 213, - lstat64 = linux_base + 214, - fstat64 = linux_base + 215, - pivot_root = linux_base + 216, - mincore = linux_base + 217, - madvise = linux_base + 218, - getdents64 = linux_base + 219, - fcntl64 = linux_base + 220, - gettid = linux_base + 222, - readahead = linux_base + 223, - setxattr = linux_base + 224, - lsetxattr = linux_base + 225, - fsetxattr = linux_base + 226, - getxattr = linux_base + 227, - lgetxattr = linux_base + 228, - fgetxattr = linux_base + 229, - listxattr = linux_base + 230, - llistxattr = linux_base + 231, - flistxattr = linux_base + 232, - removexattr = linux_base + 233, - lremovexattr = linux_base + 234, - fremovexattr = linux_base + 235, - tkill = linux_base + 236, - sendfile64 = linux_base + 237, - futex = linux_base + 238, - sched_setaffinity = linux_base + 239, - sched_getaffinity = linux_base + 240, - io_setup = linux_base + 241, - io_destroy = linux_base + 242, - io_getevents = linux_base + 243, - io_submit = linux_base + 244, - io_cancel = linux_base + 245, - exit_group = linux_base + 246, - lookup_dcookie = linux_base + 247, - epoll_create = linux_base + 248, - epoll_ctl = linux_base + 249, - epoll_wait = linux_base + 250, - remap_file_pages = linux_base + 251, - set_tid_address = linux_base + 252, - restart_syscall = linux_base + 253, - fadvise64 = linux_base + 254, - statfs64 = linux_base + 255, - fstatfs64 = linux_base + 256, - timer_create = linux_base + 257, - timer_settime = linux_base + 258, - timer_gettime = linux_base + 259, - timer_getoverrun = linux_base + 260, - timer_delete = linux_base + 261, - clock_settime = linux_base + 262, - clock_gettime = linux_base + 263, - clock_getres = linux_base + 264, - clock_nanosleep = linux_base + 265, - tgkill = linux_base + 266, - utimes = linux_base + 267, - mbind = linux_base + 268, - get_mempolicy = linux_base + 269, - set_mempolicy = linux_base + 270, - mq_open = linux_base + 271, - mq_unlink = linux_base + 272, - mq_timedsend = linux_base + 273, - mq_timedreceive = linux_base + 274, - mq_notify = linux_base + 275, - mq_getsetattr = linux_base + 276, - vserver = linux_base + 277, - waitid = linux_base + 278, - add_key = linux_base + 280, - request_key = linux_base + 281, - keyctl = linux_base + 282, - set_thread_area = linux_base + 283, - inotify_init = linux_base + 284, - inotify_add_watch = linux_base + 285, - inotify_rm_watch = linux_base + 286, - migrate_pages = linux_base + 287, - openat = linux_base + 288, - mkdirat = linux_base + 289, - mknodat = linux_base + 290, - fchownat = linux_base + 291, - futimesat = linux_base + 292, - fstatat64 = linux_base + 293, - unlinkat = linux_base + 294, - renameat = linux_base + 295, - linkat = linux_base + 296, - symlinkat = linux_base + 297, - readlinkat = linux_base + 298, - fchmodat = linux_base + 299, - faccessat = linux_base + 300, - pselect6 = linux_base + 301, - ppoll = linux_base + 302, - unshare = linux_base + 303, - splice = linux_base + 304, - sync_file_range = linux_base + 305, - tee = linux_base + 306, - vmsplice = linux_base + 307, - move_pages = linux_base + 308, - set_robust_list = linux_base + 309, - get_robust_list = linux_base + 310, - kexec_load = linux_base + 311, - getcpu = linux_base + 312, - epoll_pwait = linux_base + 313, - ioprio_set = linux_base + 314, - ioprio_get = linux_base + 315, - utimensat = linux_base + 316, - signalfd = linux_base + 317, - timerfd = linux_base + 318, - eventfd = linux_base + 319, - fallocate = linux_base + 320, - timerfd_create = linux_base + 321, - timerfd_gettime = linux_base + 322, - timerfd_settime = linux_base + 323, - signalfd4 = linux_base + 324, - eventfd2 = linux_base + 325, - epoll_create1 = linux_base + 326, - dup3 = linux_base + 327, - pipe2 = linux_base + 328, - inotify_init1 = linux_base + 329, - preadv = linux_base + 330, - pwritev = linux_base + 331, - rt_tgsigqueueinfo = linux_base + 332, - perf_event_open = linux_base + 333, - accept4 = linux_base + 334, - recvmmsg = linux_base + 335, - fanotify_init = linux_base + 336, - fanotify_mark = linux_base + 337, - prlimit64 = linux_base + 338, - name_to_handle_at = linux_base + 339, - open_by_handle_at = linux_base + 340, - clock_adjtime = linux_base + 341, - syncfs = linux_base + 342, - sendmmsg = linux_base + 343, - setns = linux_base + 344, - process_vm_readv = linux_base + 345, - process_vm_writev = linux_base + 346, - kcmp = linux_base + 347, - finit_module = linux_base + 348, - sched_setattr = linux_base + 349, - sched_getattr = linux_base + 350, - renameat2 = linux_base + 351, - seccomp = linux_base + 352, - getrandom = linux_base + 353, - memfd_create = linux_base + 354, - bpf = linux_base + 355, - execveat = linux_base + 356, - userfaultfd = linux_base + 357, - membarrier = linux_base + 358, - mlock2 = linux_base + 359, - copy_file_range = linux_base + 360, - preadv2 = linux_base + 361, - pwritev2 = linux_base + 362, - pkey_mprotect = linux_base + 363, - pkey_alloc = linux_base + 364, - pkey_free = linux_base + 365, - statx = linux_base + 366, - rseq = linux_base + 367, - io_pgetevents = linux_base + 368, - semget = linux_base + 393, - semctl = linux_base + 394, - shmget = linux_base + 395, - shmctl = linux_base + 396, - shmat = linux_base + 397, - shmdt = linux_base + 398, - msgget = linux_base + 399, - msgsnd = linux_base + 400, - msgrcv = linux_base + 401, - msgctl = linux_base + 402, - clock_gettime64 = linux_base + 403, - clock_settime64 = linux_base + 404, - clock_adjtime64 = linux_base + 405, - clock_getres_time64 = linux_base + 406, - clock_nanosleep_time64 = linux_base + 407, - timer_gettime64 = linux_base + 408, - timer_settime64 = linux_base + 409, - timerfd_gettime64 = linux_base + 410, - timerfd_settime64 = linux_base + 411, - utimensat_time64 = linux_base + 412, - pselect6_time64 = linux_base + 413, - ppoll_time64 = linux_base + 414, - io_pgetevents_time64 = linux_base + 416, - recvmmsg_time64 = linux_base + 417, - mq_timedsend_time64 = linux_base + 418, - mq_timedreceive_time64 = linux_base + 419, - semtimedop_time64 = linux_base + 420, - rt_sigtimedwait_time64 = linux_base + 421, - futex_time64 = linux_base + 422, - sched_rr_get_interval_time64 = linux_base + 423, - pidfd_send_signal = linux_base + 424, - io_uring_setup = linux_base + 425, - io_uring_enter = linux_base + 426, - io_uring_register = linux_base + 427, - open_tree = linux_base + 428, - move_mount = linux_base + 429, - fsopen = linux_base + 430, - fsconfig = linux_base + 431, - fsmount = linux_base + 432, - fspick = linux_base + 433, - pidfd_open = linux_base + 434, - clone3 = linux_base + 435, - close_range = linux_base + 436, - openat2 = linux_base + 437, - pidfd_getfd = linux_base + 438, - faccessat2 = linux_base + 439, - process_madvise = linux_base + 440, - epoll_pwait2 = linux_base + 441, - mount_setattr = linux_base + 442, - quotactl_fd = linux_base + 443, - landlock_create_ruleset = linux_base + 444, - landlock_add_rule = linux_base + 445, - landlock_restrict_self = linux_base + 446, - process_mrelease = linux_base + 448, - futex_waitv = linux_base + 449, - set_mempolicy_home_node = linux_base + 450, - cachestat = linux_base + 451, - fchmodat2 = linux_base + 452, - map_shadow_stack = linux_base + 453, - futex_wake = linux_base + 454, - futex_wait = linux_base + 455, - futex_requeue = linux_base + 456, - statmount = linux_base + 457, - listmount = linux_base + 458, - lsm_get_self_attr = linux_base + 459, - lsm_set_self_attr = linux_base + 460, - lsm_list_modules = linux_base + 461, - mseal = linux_base + 462, + syscall = 4000, + exit = 4001, + fork = 4002, + read = 4003, + write = 4004, + open = 4005, + close = 4006, + waitpid = 4007, + creat = 4008, + link = 4009, + unlink = 4010, + execve = 4011, + chdir = 4012, + time = 4013, + mknod = 4014, + chmod = 4015, + lchown = 4016, + @"break" = 4017, + lseek = 4019, + getpid = 4020, + mount = 4021, + umount = 4022, + setuid = 4023, + getuid = 4024, + stime = 4025, + ptrace = 4026, + alarm = 4027, + pause = 4029, + utime = 4030, + stty = 4031, + gtty = 4032, + access = 4033, + nice = 4034, + ftime = 4035, + sync = 4036, + kill = 4037, + rename = 4038, + mkdir = 4039, + rmdir = 4040, + dup = 4041, + pipe = 4042, + times = 4043, + prof = 4044, + brk = 4045, + setgid = 4046, + getgid = 4047, + signal = 4048, + geteuid = 4049, + getegid = 4050, + acct = 4051, + umount2 = 4052, + lock = 4053, + ioctl = 4054, + fcntl = 4055, + mpx = 4056, + setpgid = 4057, + ulimit = 4058, + umask = 4060, + chroot = 4061, + ustat = 4062, + dup2 = 4063, + getppid = 4064, + getpgrp = 4065, + setsid = 4066, + sigaction = 4067, + sgetmask = 4068, + ssetmask = 4069, + setreuid = 4070, + setregid = 4071, + sigsuspend = 4072, + sigpending = 4073, + sethostname = 4074, + setrlimit = 4075, + getrlimit = 4076, + getrusage = 4077, + gettimeofday = 4078, + settimeofday = 4079, + getgroups = 4080, + setgroups = 4081, + symlink = 4083, + readlink = 4085, + uselib = 4086, + swapon = 4087, + reboot = 4088, + readdir = 4089, + mmap = 4090, + munmap = 4091, + truncate = 4092, + ftruncate = 4093, + fchmod = 4094, + fchown = 4095, + getpriority = 4096, + setpriority = 4097, + profil = 4098, + statfs = 4099, + fstatfs = 4100, + ioperm = 4101, + socketcall = 4102, + syslog = 4103, + setitimer = 4104, + getitimer = 4105, + stat = 4106, + lstat = 4107, + fstat = 4108, + iopl = 4110, + vhangup = 4111, + idle = 4112, + vm86 = 4113, + wait4 = 4114, + swapoff = 4115, + sysinfo = 4116, + ipc = 4117, + fsync = 4118, + sigreturn = 4119, + clone = 4120, + setdomainname = 4121, + uname = 4122, + modify_ldt = 4123, + adjtimex = 4124, + mprotect = 4125, + sigprocmask = 4126, + create_module = 4127, + init_module = 4128, + delete_module = 4129, + get_kernel_syms = 4130, + quotactl = 4131, + getpgid = 4132, + fchdir = 4133, + bdflush = 4134, + sysfs = 4135, + personality = 4136, + afs_syscall = 4137, + setfsuid = 4138, + setfsgid = 4139, + llseek = 4140, + getdents = 4141, + newselect = 4142, + flock = 4143, + msync = 4144, + readv = 4145, + writev = 4146, + cacheflush = 4147, + cachectl = 4148, + sysmips = 4149, + getsid = 4151, + fdatasync = 4152, + sysctl = 4153, + mlock = 4154, + munlock = 4155, + mlockall = 4156, + munlockall = 4157, + sched_setparam = 4158, + sched_getparam = 4159, + sched_setscheduler = 4160, + sched_getscheduler = 4161, + sched_yield = 4162, + sched_get_priority_max = 4163, + sched_get_priority_min = 4164, + sched_rr_get_interval = 4165, + nanosleep = 4166, + mremap = 4167, + accept = 4168, + bind = 4169, + connect = 4170, + getpeername = 4171, + getsockname = 4172, + getsockopt = 4173, + listen = 4174, + recv = 4175, + recvfrom = 4176, + recvmsg = 4177, + send = 4178, + sendmsg = 4179, + sendto = 4180, + setsockopt = 4181, + shutdown = 4182, + socket = 4183, + socketpair = 4184, + setresuid = 4185, + getresuid = 4186, + query_module = 4187, + poll = 4188, + nfsservctl = 4189, + setresgid = 4190, + getresgid = 4191, + prctl = 4192, + rt_sigreturn = 4193, + rt_sigaction = 4194, + rt_sigprocmask = 4195, + rt_sigpending = 4196, + rt_sigtimedwait = 4197, + rt_sigqueueinfo = 4198, + rt_sigsuspend = 4199, + pread64 = 4200, + pwrite64 = 4201, + chown = 4202, + getcwd = 4203, + capget = 4204, + capset = 4205, + sigaltstack = 4206, + sendfile = 4207, + getpmsg = 4208, + putpmsg = 4209, + mmap2 = 4210, + truncate64 = 4211, + ftruncate64 = 4212, + stat64 = 4213, + lstat64 = 4214, + fstat64 = 4215, + pivot_root = 4216, + mincore = 4217, + madvise = 4218, + getdents64 = 4219, + fcntl64 = 4220, + gettid = 4222, + readahead = 4223, + setxattr = 4224, + lsetxattr = 4225, + fsetxattr = 4226, + getxattr = 4227, + lgetxattr = 4228, + fgetxattr = 4229, + listxattr = 4230, + llistxattr = 4231, + flistxattr = 4232, + removexattr = 4233, + lremovexattr = 4234, + fremovexattr = 4235, + tkill = 4236, + sendfile64 = 4237, + futex = 4238, + sched_setaffinity = 4239, + sched_getaffinity = 4240, + io_setup = 4241, + io_destroy = 4242, + io_getevents = 4243, + io_submit = 4244, + io_cancel = 4245, + exit_group = 4246, + lookup_dcookie = 4247, + epoll_create = 4248, + epoll_ctl = 4249, + epoll_wait = 4250, + remap_file_pages = 4251, + set_tid_address = 4252, + restart_syscall = 4253, + fadvise64 = 4254, + statfs64 = 4255, + fstatfs64 = 4256, + timer_create = 4257, + timer_settime = 4258, + timer_gettime = 4259, + timer_getoverrun = 4260, + timer_delete = 4261, + clock_settime = 4262, + clock_gettime = 4263, + clock_getres = 4264, + clock_nanosleep = 4265, + tgkill = 4266, + utimes = 4267, + mbind = 4268, + get_mempolicy = 4269, + set_mempolicy = 4270, + mq_open = 4271, + mq_unlink = 4272, + mq_timedsend = 4273, + mq_timedreceive = 4274, + mq_notify = 4275, + mq_getsetattr = 4276, + vserver = 4277, + waitid = 4278, + add_key = 4280, + request_key = 4281, + keyctl = 4282, + set_thread_area = 4283, + inotify_init = 4284, + inotify_add_watch = 4285, + inotify_rm_watch = 4286, + migrate_pages = 4287, + openat = 4288, + mkdirat = 4289, + mknodat = 4290, + fchownat = 4291, + futimesat = 4292, + fstatat64 = 4293, + unlinkat = 4294, + renameat = 4295, + linkat = 4296, + symlinkat = 4297, + readlinkat = 4298, + fchmodat = 4299, + faccessat = 4300, + pselect6 = 4301, + ppoll = 4302, + unshare = 4303, + splice = 4304, + sync_file_range = 4305, + tee = 4306, + vmsplice = 4307, + move_pages = 4308, + set_robust_list = 4309, + get_robust_list = 4310, + kexec_load = 4311, + getcpu = 4312, + epoll_pwait = 4313, + ioprio_set = 4314, + ioprio_get = 4315, + utimensat = 4316, + signalfd = 4317, + timerfd = 4318, + eventfd = 4319, + fallocate = 4320, + timerfd_create = 4321, + timerfd_gettime = 4322, + timerfd_settime = 4323, + signalfd4 = 4324, + eventfd2 = 4325, + epoll_create1 = 4326, + dup3 = 4327, + pipe2 = 4328, + inotify_init1 = 4329, + preadv = 4330, + pwritev = 4331, + rt_tgsigqueueinfo = 4332, + perf_event_open = 4333, + accept4 = 4334, + recvmmsg = 4335, + fanotify_init = 4336, + fanotify_mark = 4337, + prlimit64 = 4338, + name_to_handle_at = 4339, + open_by_handle_at = 4340, + clock_adjtime = 4341, + syncfs = 4342, + sendmmsg = 4343, + setns = 4344, + process_vm_readv = 4345, + process_vm_writev = 4346, + kcmp = 4347, + finit_module = 4348, + sched_setattr = 4349, + sched_getattr = 4350, + renameat2 = 4351, + seccomp = 4352, + getrandom = 4353, + memfd_create = 4354, + bpf = 4355, + execveat = 4356, + userfaultfd = 4357, + membarrier = 4358, + mlock2 = 4359, + copy_file_range = 4360, + preadv2 = 4361, + pwritev2 = 4362, + pkey_mprotect = 4363, + pkey_alloc = 4364, + pkey_free = 4365, + statx = 4366, + rseq = 4367, + io_pgetevents = 4368, + semget = 4393, + semctl = 4394, + shmget = 4395, + shmctl = 4396, + shmat = 4397, + shmdt = 4398, + msgget = 4399, + msgsnd = 4400, + msgrcv = 4401, + msgctl = 4402, + clock_gettime64 = 4403, + clock_settime64 = 4404, + clock_adjtime64 = 4405, + clock_getres_time64 = 4406, + clock_nanosleep_time64 = 4407, + timer_gettime64 = 4408, + timer_settime64 = 4409, + timerfd_gettime64 = 4410, + timerfd_settime64 = 4411, + utimensat_time64 = 4412, + pselect6_time64 = 4413, + ppoll_time64 = 4414, + io_pgetevents_time64 = 4416, + recvmmsg_time64 = 4417, + mq_timedsend_time64 = 4418, + mq_timedreceive_time64 = 4419, + semtimedop_time64 = 4420, + rt_sigtimedwait_time64 = 4421, + futex_time64 = 4422, + sched_rr_get_interval_time64 = 4423, + pidfd_send_signal = 4424, + io_uring_setup = 4425, + io_uring_enter = 4426, + io_uring_register = 4427, + open_tree = 4428, + move_mount = 4429, + fsopen = 4430, + fsconfig = 4431, + fsmount = 4432, + fspick = 4433, + pidfd_open = 4434, + clone3 = 4435, + close_range = 4436, + openat2 = 4437, + pidfd_getfd = 4438, + faccessat2 = 4439, + process_madvise = 4440, + epoll_pwait2 = 4441, + mount_setattr = 4442, + quotactl_fd = 4443, + landlock_create_ruleset = 4444, + landlock_add_rule = 4445, + landlock_restrict_self = 4446, + process_mrelease = 4448, + futex_waitv = 4449, + set_mempolicy_home_node = 4450, + cachestat = 4451, + fchmodat2 = 4452, + map_shadow_stack = 4453, + futex_wake = 4454, + futex_wait = 4455, + futex_requeue = 4456, + statmount = 4457, + listmount = 4458, + lsm_get_self_attr = 4459, + lsm_set_self_attr = 4460, + lsm_list_modules = 4461, + mseal = 4462, + setxattrat = 4463, + getxattrat = 4464, + listxattrat = 4465, + removexattrat = 4466, + open_tree_attr = 4467, }; pub const MipsN64 = enum(usize) { - const linux_base = 5000; - - read = linux_base + 0, - write = linux_base + 1, - open = linux_base + 2, - close = linux_base + 3, - stat = linux_base + 4, - fstat = linux_base + 5, - lstat = linux_base + 6, - poll = linux_base + 7, - lseek = linux_base + 8, - mmap = linux_base + 9, - mprotect = linux_base + 10, - munmap = linux_base + 11, - brk = linux_base + 12, - rt_sigaction = linux_base + 13, - rt_sigprocmask = linux_base + 14, - ioctl = linux_base + 15, - pread64 = linux_base + 16, - pwrite64 = linux_base + 17, - readv = linux_base + 18, - writev = linux_base + 19, - access = linux_base + 20, - pipe = linux_base + 21, - newselect = linux_base + 22, - sched_yield = linux_base + 23, - mremap = linux_base + 24, - msync = linux_base + 25, - mincore = linux_base + 26, - madvise = linux_base + 27, - shmget = linux_base + 28, - shmat = linux_base + 29, - shmctl = linux_base + 30, - dup = linux_base + 31, - dup2 = linux_base + 32, - pause = linux_base + 33, - nanosleep = linux_base + 34, - getitimer = linux_base + 35, - setitimer = linux_base + 36, - alarm = linux_base + 37, - getpid = linux_base + 38, - sendfile = linux_base + 39, - socket = linux_base + 40, - connect = linux_base + 41, - accept = linux_base + 42, - sendto = linux_base + 43, - recvfrom = linux_base + 44, - sendmsg = linux_base + 45, - recvmsg = linux_base + 46, - shutdown = linux_base + 47, - bind = linux_base + 48, - listen = linux_base + 49, - getsockname = linux_base + 50, - getpeername = linux_base + 51, - socketpair = linux_base + 52, - setsockopt = linux_base + 53, - getsockopt = linux_base + 54, - clone = linux_base + 55, - fork = linux_base + 56, - execve = linux_base + 57, - exit = linux_base + 58, - wait4 = linux_base + 59, - kill = linux_base + 60, - uname = linux_base + 61, - semget = linux_base + 62, - semop = linux_base + 63, - semctl = linux_base + 64, - shmdt = linux_base + 65, - msgget = linux_base + 66, - msgsnd = linux_base + 67, - msgrcv = linux_base + 68, - msgctl = linux_base + 69, - fcntl = linux_base + 70, - flock = linux_base + 71, - fsync = linux_base + 72, - fdatasync = linux_base + 73, - truncate = linux_base + 74, - ftruncate = linux_base + 75, - getdents = linux_base + 76, - getcwd = linux_base + 77, - chdir = linux_base + 78, - fchdir = linux_base + 79, - rename = linux_base + 80, - mkdir = linux_base + 81, - rmdir = linux_base + 82, - creat = linux_base + 83, - link = linux_base + 84, - unlink = linux_base + 85, - symlink = linux_base + 86, - readlink = linux_base + 87, - chmod = linux_base + 88, - fchmod = linux_base + 89, - chown = linux_base + 90, - fchown = linux_base + 91, - lchown = linux_base + 92, - umask = linux_base + 93, - gettimeofday = linux_base + 94, - getrlimit = linux_base + 95, - getrusage = linux_base + 96, - sysinfo = linux_base + 97, - times = linux_base + 98, - ptrace = linux_base + 99, - getuid = linux_base + 100, - syslog = linux_base + 101, - getgid = linux_base + 102, - setuid = linux_base + 103, - setgid = linux_base + 104, - geteuid = linux_base + 105, - getegid = linux_base + 106, - setpgid = linux_base + 107, - getppid = linux_base + 108, - getpgrp = linux_base + 109, - setsid = linux_base + 110, - setreuid = linux_base + 111, - setregid = linux_base + 112, - getgroups = linux_base + 113, - setgroups = linux_base + 114, - setresuid = linux_base + 115, - getresuid = linux_base + 116, - setresgid = linux_base + 117, - getresgid = linux_base + 118, - getpgid = linux_base + 119, - setfsuid = linux_base + 120, - setfsgid = linux_base + 121, - getsid = linux_base + 122, - capget = linux_base + 123, - capset = linux_base + 124, - rt_sigpending = linux_base + 125, - rt_sigtimedwait = linux_base + 126, - rt_sigqueueinfo = linux_base + 127, - rt_sigsuspend = linux_base + 128, - sigaltstack = linux_base + 129, - utime = linux_base + 130, - mknod = linux_base + 131, - personality = linux_base + 132, - ustat = linux_base + 133, - statfs = linux_base + 134, - fstatfs = linux_base + 135, - sysfs = linux_base + 136, - getpriority = linux_base + 137, - setpriority = linux_base + 138, - sched_setparam = linux_base + 139, - sched_getparam = linux_base + 140, - sched_setscheduler = linux_base + 141, - sched_getscheduler = linux_base + 142, - sched_get_priority_max = linux_base + 143, - sched_get_priority_min = linux_base + 144, - sched_rr_get_interval = linux_base + 145, - mlock = linux_base + 146, - munlock = linux_base + 147, - mlockall = linux_base + 148, - munlockall = linux_base + 149, - vhangup = linux_base + 150, - pivot_root = linux_base + 151, - sysctl = linux_base + 152, - prctl = linux_base + 153, - adjtimex = linux_base + 154, - setrlimit = linux_base + 155, - chroot = linux_base + 156, - sync = linux_base + 157, - acct = linux_base + 158, - settimeofday = linux_base + 159, - mount = linux_base + 160, - umount2 = linux_base + 161, - swapon = linux_base + 162, - swapoff = linux_base + 163, - reboot = linux_base + 164, - sethostname = linux_base + 165, - setdomainname = linux_base + 166, - create_module = linux_base + 167, - init_module = linux_base + 168, - delete_module = linux_base + 169, - get_kernel_syms = linux_base + 170, - query_module = linux_base + 171, - quotactl = linux_base + 172, - nfsservctl = linux_base + 173, - getpmsg = linux_base + 174, - putpmsg = linux_base + 175, - afs_syscall = linux_base + 176, - gettid = linux_base + 178, - readahead = linux_base + 179, - setxattr = linux_base + 180, - lsetxattr = linux_base + 181, - fsetxattr = linux_base + 182, - getxattr = linux_base + 183, - lgetxattr = linux_base + 184, - fgetxattr = linux_base + 185, - listxattr = linux_base + 186, - llistxattr = linux_base + 187, - flistxattr = linux_base + 188, - removexattr = linux_base + 189, - lremovexattr = linux_base + 190, - fremovexattr = linux_base + 191, - tkill = linux_base + 192, - futex = linux_base + 194, - sched_setaffinity = linux_base + 195, - sched_getaffinity = linux_base + 196, - cacheflush = linux_base + 197, - cachectl = linux_base + 198, - sysmips = linux_base + 199, - io_setup = linux_base + 200, - io_destroy = linux_base + 201, - io_getevents = linux_base + 202, - io_submit = linux_base + 203, - io_cancel = linux_base + 204, - exit_group = linux_base + 205, - lookup_dcookie = linux_base + 206, - epoll_create = linux_base + 207, - epoll_ctl = linux_base + 208, - epoll_wait = linux_base + 209, - remap_file_pages = linux_base + 210, - rt_sigreturn = linux_base + 211, - set_tid_address = linux_base + 212, - restart_syscall = linux_base + 213, - semtimedop = linux_base + 214, - fadvise64 = linux_base + 215, - timer_create = linux_base + 216, - timer_settime = linux_base + 217, - timer_gettime = linux_base + 218, - timer_getoverrun = linux_base + 219, - timer_delete = linux_base + 220, - clock_settime = linux_base + 221, - clock_gettime = linux_base + 222, - clock_getres = linux_base + 223, - clock_nanosleep = linux_base + 224, - tgkill = linux_base + 225, - utimes = linux_base + 226, - mbind = linux_base + 227, - get_mempolicy = linux_base + 228, - set_mempolicy = linux_base + 229, - mq_open = linux_base + 230, - mq_unlink = linux_base + 231, - mq_timedsend = linux_base + 232, - mq_timedreceive = linux_base + 233, - mq_notify = linux_base + 234, - mq_getsetattr = linux_base + 235, - vserver = linux_base + 236, - waitid = linux_base + 237, - add_key = linux_base + 239, - request_key = linux_base + 240, - keyctl = linux_base + 241, - set_thread_area = linux_base + 242, - inotify_init = linux_base + 243, - inotify_add_watch = linux_base + 244, - inotify_rm_watch = linux_base + 245, - migrate_pages = linux_base + 246, - openat = linux_base + 247, - mkdirat = linux_base + 248, - mknodat = linux_base + 249, - fchownat = linux_base + 250, - futimesat = linux_base + 251, - fstatat64 = linux_base + 252, - unlinkat = linux_base + 253, - renameat = linux_base + 254, - linkat = linux_base + 255, - symlinkat = linux_base + 256, - readlinkat = linux_base + 257, - fchmodat = linux_base + 258, - faccessat = linux_base + 259, - pselect6 = linux_base + 260, - ppoll = linux_base + 261, - unshare = linux_base + 262, - splice = linux_base + 263, - sync_file_range = linux_base + 264, - tee = linux_base + 265, - vmsplice = linux_base + 266, - move_pages = linux_base + 267, - set_robust_list = linux_base + 268, - get_robust_list = linux_base + 269, - kexec_load = linux_base + 270, - getcpu = linux_base + 271, - epoll_pwait = linux_base + 272, - ioprio_set = linux_base + 273, - ioprio_get = linux_base + 274, - utimensat = linux_base + 275, - signalfd = linux_base + 276, - timerfd = linux_base + 277, - eventfd = linux_base + 278, - fallocate = linux_base + 279, - timerfd_create = linux_base + 280, - timerfd_gettime = linux_base + 281, - timerfd_settime = linux_base + 282, - signalfd4 = linux_base + 283, - eventfd2 = linux_base + 284, - epoll_create1 = linux_base + 285, - dup3 = linux_base + 286, - pipe2 = linux_base + 287, - inotify_init1 = linux_base + 288, - preadv = linux_base + 289, - pwritev = linux_base + 290, - rt_tgsigqueueinfo = linux_base + 291, - perf_event_open = linux_base + 292, - accept4 = linux_base + 293, - recvmmsg = linux_base + 294, - fanotify_init = linux_base + 295, - fanotify_mark = linux_base + 296, - prlimit64 = linux_base + 297, - name_to_handle_at = linux_base + 298, - open_by_handle_at = linux_base + 299, - clock_adjtime = linux_base + 300, - syncfs = linux_base + 301, - sendmmsg = linux_base + 302, - setns = linux_base + 303, - process_vm_readv = linux_base + 304, - process_vm_writev = linux_base + 305, - kcmp = linux_base + 306, - finit_module = linux_base + 307, - getdents64 = linux_base + 308, - sched_setattr = linux_base + 309, - sched_getattr = linux_base + 310, - renameat2 = linux_base + 311, - seccomp = linux_base + 312, - getrandom = linux_base + 313, - memfd_create = linux_base + 314, - bpf = linux_base + 315, - execveat = linux_base + 316, - userfaultfd = linux_base + 317, - membarrier = linux_base + 318, - mlock2 = linux_base + 319, - copy_file_range = linux_base + 320, - preadv2 = linux_base + 321, - pwritev2 = linux_base + 322, - pkey_mprotect = linux_base + 323, - pkey_alloc = linux_base + 324, - pkey_free = linux_base + 325, - statx = linux_base + 326, - rseq = linux_base + 327, - io_pgetevents = linux_base + 328, - pidfd_send_signal = linux_base + 424, - io_uring_setup = linux_base + 425, - io_uring_enter = linux_base + 426, - io_uring_register = linux_base + 427, - open_tree = linux_base + 428, - move_mount = linux_base + 429, - fsopen = linux_base + 430, - fsconfig = linux_base + 431, - fsmount = linux_base + 432, - fspick = linux_base + 433, - pidfd_open = linux_base + 434, - clone3 = linux_base + 435, - close_range = linux_base + 436, - openat2 = linux_base + 437, - pidfd_getfd = linux_base + 438, - faccessat2 = linux_base + 439, - process_madvise = linux_base + 440, - epoll_pwait2 = linux_base + 441, - mount_setattr = linux_base + 442, - quotactl_fd = linux_base + 443, - landlock_create_ruleset = linux_base + 444, - landlock_add_rule = linux_base + 445, - landlock_restrict_self = linux_base + 446, - process_mrelease = linux_base + 448, - futex_waitv = linux_base + 449, - set_mempolicy_home_node = linux_base + 450, - cachestat = linux_base + 451, - fchmodat2 = linux_base + 452, - map_shadow_stack = linux_base + 453, - futex_wake = linux_base + 454, - futex_wait = linux_base + 455, - futex_requeue = linux_base + 456, - statmount = linux_base + 457, - listmount = linux_base + 458, - lsm_get_self_attr = linux_base + 459, - lsm_set_self_attr = linux_base + 460, - lsm_list_modules = linux_base + 461, - mseal = linux_base + 462, + read = 5000, + write = 5001, + open = 5002, + close = 5003, + stat = 5004, + fstat = 5005, + lstat = 5006, + poll = 5007, + lseek = 5008, + mmap = 5009, + mprotect = 5010, + munmap = 5011, + brk = 5012, + rt_sigaction = 5013, + rt_sigprocmask = 5014, + ioctl = 5015, + pread64 = 5016, + pwrite64 = 5017, + readv = 5018, + writev = 5019, + access = 5020, + pipe = 5021, + newselect = 5022, + sched_yield = 5023, + mremap = 5024, + msync = 5025, + mincore = 5026, + madvise = 5027, + shmget = 5028, + shmat = 5029, + shmctl = 5030, + dup = 5031, + dup2 = 5032, + pause = 5033, + nanosleep = 5034, + getitimer = 5035, + setitimer = 5036, + alarm = 5037, + getpid = 5038, + sendfile = 5039, + socket = 5040, + connect = 5041, + accept = 5042, + sendto = 5043, + recvfrom = 5044, + sendmsg = 5045, + recvmsg = 5046, + shutdown = 5047, + bind = 5048, + listen = 5049, + getsockname = 5050, + getpeername = 5051, + socketpair = 5052, + setsockopt = 5053, + getsockopt = 5054, + clone = 5055, + fork = 5056, + execve = 5057, + exit = 5058, + wait4 = 5059, + kill = 5060, + uname = 5061, + semget = 5062, + semop = 5063, + semctl = 5064, + shmdt = 5065, + msgget = 5066, + msgsnd = 5067, + msgrcv = 5068, + msgctl = 5069, + fcntl = 5070, + flock = 5071, + fsync = 5072, + fdatasync = 5073, + truncate = 5074, + ftruncate = 5075, + getdents = 5076, + getcwd = 5077, + chdir = 5078, + fchdir = 5079, + rename = 5080, + mkdir = 5081, + rmdir = 5082, + creat = 5083, + link = 5084, + unlink = 5085, + symlink = 5086, + readlink = 5087, + chmod = 5088, + fchmod = 5089, + chown = 5090, + fchown = 5091, + lchown = 5092, + umask = 5093, + gettimeofday = 5094, + getrlimit = 5095, + getrusage = 5096, + sysinfo = 5097, + times = 5098, + ptrace = 5099, + getuid = 5100, + syslog = 5101, + getgid = 5102, + setuid = 5103, + setgid = 5104, + geteuid = 5105, + getegid = 5106, + setpgid = 5107, + getppid = 5108, + getpgrp = 5109, + setsid = 5110, + setreuid = 5111, + setregid = 5112, + getgroups = 5113, + setgroups = 5114, + setresuid = 5115, + getresuid = 5116, + setresgid = 5117, + getresgid = 5118, + getpgid = 5119, + setfsuid = 5120, + setfsgid = 5121, + getsid = 5122, + capget = 5123, + capset = 5124, + rt_sigpending = 5125, + rt_sigtimedwait = 5126, + rt_sigqueueinfo = 5127, + rt_sigsuspend = 5128, + sigaltstack = 5129, + utime = 5130, + mknod = 5131, + personality = 5132, + ustat = 5133, + statfs = 5134, + fstatfs = 5135, + sysfs = 5136, + getpriority = 5137, + setpriority = 5138, + sched_setparam = 5139, + sched_getparam = 5140, + sched_setscheduler = 5141, + sched_getscheduler = 5142, + sched_get_priority_max = 5143, + sched_get_priority_min = 5144, + sched_rr_get_interval = 5145, + mlock = 5146, + munlock = 5147, + mlockall = 5148, + munlockall = 5149, + vhangup = 5150, + pivot_root = 5151, + sysctl = 5152, + prctl = 5153, + adjtimex = 5154, + setrlimit = 5155, + chroot = 5156, + sync = 5157, + acct = 5158, + settimeofday = 5159, + mount = 5160, + umount2 = 5161, + swapon = 5162, + swapoff = 5163, + reboot = 5164, + sethostname = 5165, + setdomainname = 5166, + create_module = 5167, + init_module = 5168, + delete_module = 5169, + get_kernel_syms = 5170, + query_module = 5171, + quotactl = 5172, + nfsservctl = 5173, + getpmsg = 5174, + putpmsg = 5175, + afs_syscall = 5176, + gettid = 5178, + readahead = 5179, + setxattr = 5180, + lsetxattr = 5181, + fsetxattr = 5182, + getxattr = 5183, + lgetxattr = 5184, + fgetxattr = 5185, + listxattr = 5186, + llistxattr = 5187, + flistxattr = 5188, + removexattr = 5189, + lremovexattr = 5190, + fremovexattr = 5191, + tkill = 5192, + futex = 5194, + sched_setaffinity = 5195, + sched_getaffinity = 5196, + cacheflush = 5197, + cachectl = 5198, + sysmips = 5199, + io_setup = 5200, + io_destroy = 5201, + io_getevents = 5202, + io_submit = 5203, + io_cancel = 5204, + exit_group = 5205, + lookup_dcookie = 5206, + epoll_create = 5207, + epoll_ctl = 5208, + epoll_wait = 5209, + remap_file_pages = 5210, + rt_sigreturn = 5211, + set_tid_address = 5212, + restart_syscall = 5213, + semtimedop = 5214, + fadvise64 = 5215, + timer_create = 5216, + timer_settime = 5217, + timer_gettime = 5218, + timer_getoverrun = 5219, + timer_delete = 5220, + clock_settime = 5221, + clock_gettime = 5222, + clock_getres = 5223, + clock_nanosleep = 5224, + tgkill = 5225, + utimes = 5226, + mbind = 5227, + get_mempolicy = 5228, + set_mempolicy = 5229, + mq_open = 5230, + mq_unlink = 5231, + mq_timedsend = 5232, + mq_timedreceive = 5233, + mq_notify = 5234, + mq_getsetattr = 5235, + vserver = 5236, + waitid = 5237, + add_key = 5239, + request_key = 5240, + keyctl = 5241, + set_thread_area = 5242, + inotify_init = 5243, + inotify_add_watch = 5244, + inotify_rm_watch = 5245, + migrate_pages = 5246, + openat = 5247, + mkdirat = 5248, + mknodat = 5249, + fchownat = 5250, + futimesat = 5251, + fstatat64 = 5252, + unlinkat = 5253, + renameat = 5254, + linkat = 5255, + symlinkat = 5256, + readlinkat = 5257, + fchmodat = 5258, + faccessat = 5259, + pselect6 = 5260, + ppoll = 5261, + unshare = 5262, + splice = 5263, + sync_file_range = 5264, + tee = 5265, + vmsplice = 5266, + move_pages = 5267, + set_robust_list = 5268, + get_robust_list = 5269, + kexec_load = 5270, + getcpu = 5271, + epoll_pwait = 5272, + ioprio_set = 5273, + ioprio_get = 5274, + utimensat = 5275, + signalfd = 5276, + timerfd = 5277, + eventfd = 5278, + fallocate = 5279, + timerfd_create = 5280, + timerfd_gettime = 5281, + timerfd_settime = 5282, + signalfd4 = 5283, + eventfd2 = 5284, + epoll_create1 = 5285, + dup3 = 5286, + pipe2 = 5287, + inotify_init1 = 5288, + preadv = 5289, + pwritev = 5290, + rt_tgsigqueueinfo = 5291, + perf_event_open = 5292, + accept4 = 5293, + recvmmsg = 5294, + fanotify_init = 5295, + fanotify_mark = 5296, + prlimit64 = 5297, + name_to_handle_at = 5298, + open_by_handle_at = 5299, + clock_adjtime = 5300, + syncfs = 5301, + sendmmsg = 5302, + setns = 5303, + process_vm_readv = 5304, + process_vm_writev = 5305, + kcmp = 5306, + finit_module = 5307, + getdents64 = 5308, + sched_setattr = 5309, + sched_getattr = 5310, + renameat2 = 5311, + seccomp = 5312, + getrandom = 5313, + memfd_create = 5314, + bpf = 5315, + execveat = 5316, + userfaultfd = 5317, + membarrier = 5318, + mlock2 = 5319, + copy_file_range = 5320, + preadv2 = 5321, + pwritev2 = 5322, + pkey_mprotect = 5323, + pkey_alloc = 5324, + pkey_free = 5325, + statx = 5326, + rseq = 5327, + io_pgetevents = 5328, + pidfd_send_signal = 5424, + io_uring_setup = 5425, + io_uring_enter = 5426, + io_uring_register = 5427, + open_tree = 5428, + move_mount = 5429, + fsopen = 5430, + fsconfig = 5431, + fsmount = 5432, + fspick = 5433, + pidfd_open = 5434, + clone3 = 5435, + close_range = 5436, + openat2 = 5437, + pidfd_getfd = 5438, + faccessat2 = 5439, + process_madvise = 5440, + epoll_pwait2 = 5441, + mount_setattr = 5442, + quotactl_fd = 5443, + landlock_create_ruleset = 5444, + landlock_add_rule = 5445, + landlock_restrict_self = 5446, + process_mrelease = 5448, + futex_waitv = 5449, + set_mempolicy_home_node = 5450, + cachestat = 5451, + fchmodat2 = 5452, + map_shadow_stack = 5453, + futex_wake = 5454, + futex_wait = 5455, + futex_requeue = 5456, + statmount = 5457, + listmount = 5458, + lsm_get_self_attr = 5459, + lsm_set_self_attr = 5460, + lsm_list_modules = 5461, + mseal = 5462, + setxattrat = 5463, + getxattrat = 5464, + listxattrat = 5465, + removexattrat = 5466, + open_tree_attr = 5467, }; pub const MipsN32 = enum(usize) { - const linux_base = 6000; - - read = linux_base + 0, - write = linux_base + 1, - open = linux_base + 2, - close = linux_base + 3, - stat = linux_base + 4, - fstat = linux_base + 5, - lstat = linux_base + 6, - poll = linux_base + 7, - lseek = linux_base + 8, - mmap = linux_base + 9, - mprotect = linux_base + 10, - munmap = linux_base + 11, - brk = linux_base + 12, - rt_sigaction = linux_base + 13, - rt_sigprocmask = linux_base + 14, - ioctl = linux_base + 15, - pread64 = linux_base + 16, - pwrite64 = linux_base + 17, - readv = linux_base + 18, - writev = linux_base + 19, - access = linux_base + 20, - pipe = linux_base + 21, - newselect = linux_base + 22, - sched_yield = linux_base + 23, - mremap = linux_base + 24, - msync = linux_base + 25, - mincore = linux_base + 26, - madvise = linux_base + 27, - shmget = linux_base + 28, - shmat = linux_base + 29, - shmctl = linux_base + 30, - dup = linux_base + 31, - dup2 = linux_base + 32, - pause = linux_base + 33, - nanosleep = linux_base + 34, - getitimer = linux_base + 35, - setitimer = linux_base + 36, - alarm = linux_base + 37, - getpid = linux_base + 38, - sendfile = linux_base + 39, - socket = linux_base + 40, - connect = linux_base + 41, - accept = linux_base + 42, - sendto = linux_base + 43, - recvfrom = linux_base + 44, - sendmsg = linux_base + 45, - recvmsg = linux_base + 46, - shutdown = linux_base + 47, - bind = linux_base + 48, - listen = linux_base + 49, - getsockname = linux_base + 50, - getpeername = linux_base + 51, - socketpair = linux_base + 52, - setsockopt = linux_base + 53, - getsockopt = linux_base + 54, - clone = linux_base + 55, - fork = linux_base + 56, - execve = linux_base + 57, - exit = linux_base + 58, - wait4 = linux_base + 59, - kill = linux_base + 60, - uname = linux_base + 61, - semget = linux_base + 62, - semop = linux_base + 63, - semctl = linux_base + 64, - shmdt = linux_base + 65, - msgget = linux_base + 66, - msgsnd = linux_base + 67, - msgrcv = linux_base + 68, - msgctl = linux_base + 69, - fcntl = linux_base + 70, - flock = linux_base + 71, - fsync = linux_base + 72, - fdatasync = linux_base + 73, - truncate = linux_base + 74, - ftruncate = linux_base + 75, - getdents = linux_base + 76, - getcwd = linux_base + 77, - chdir = linux_base + 78, - fchdir = linux_base + 79, - rename = linux_base + 80, - mkdir = linux_base + 81, - rmdir = linux_base + 82, - creat = linux_base + 83, - link = linux_base + 84, - unlink = linux_base + 85, - symlink = linux_base + 86, - readlink = linux_base + 87, - chmod = linux_base + 88, - fchmod = linux_base + 89, - chown = linux_base + 90, - fchown = linux_base + 91, - lchown = linux_base + 92, - umask = linux_base + 93, - gettimeofday = linux_base + 94, - getrlimit = linux_base + 95, - getrusage = linux_base + 96, - sysinfo = linux_base + 97, - times = linux_base + 98, - ptrace = linux_base + 99, - getuid = linux_base + 100, - syslog = linux_base + 101, - getgid = linux_base + 102, - setuid = linux_base + 103, - setgid = linux_base + 104, - geteuid = linux_base + 105, - getegid = linux_base + 106, - setpgid = linux_base + 107, - getppid = linux_base + 108, - getpgrp = linux_base + 109, - setsid = linux_base + 110, - setreuid = linux_base + 111, - setregid = linux_base + 112, - getgroups = linux_base + 113, - setgroups = linux_base + 114, - setresuid = linux_base + 115, - getresuid = linux_base + 116, - setresgid = linux_base + 117, - getresgid = linux_base + 118, - getpgid = linux_base + 119, - setfsuid = linux_base + 120, - setfsgid = linux_base + 121, - getsid = linux_base + 122, - capget = linux_base + 123, - capset = linux_base + 124, - rt_sigpending = linux_base + 125, - rt_sigtimedwait = linux_base + 126, - rt_sigqueueinfo = linux_base + 127, - rt_sigsuspend = linux_base + 128, - sigaltstack = linux_base + 129, - utime = linux_base + 130, - mknod = linux_base + 131, - personality = linux_base + 132, - ustat = linux_base + 133, - statfs = linux_base + 134, - fstatfs = linux_base + 135, - sysfs = linux_base + 136, - getpriority = linux_base + 137, - setpriority = linux_base + 138, - sched_setparam = linux_base + 139, - sched_getparam = linux_base + 140, - sched_setscheduler = linux_base + 141, - sched_getscheduler = linux_base + 142, - sched_get_priority_max = linux_base + 143, - sched_get_priority_min = linux_base + 144, - sched_rr_get_interval = linux_base + 145, - mlock = linux_base + 146, - munlock = linux_base + 147, - mlockall = linux_base + 148, - munlockall = linux_base + 149, - vhangup = linux_base + 150, - pivot_root = linux_base + 151, - sysctl = linux_base + 152, - prctl = linux_base + 153, - adjtimex = linux_base + 154, - setrlimit = linux_base + 155, - chroot = linux_base + 156, - sync = linux_base + 157, - acct = linux_base + 158, - settimeofday = linux_base + 159, - mount = linux_base + 160, - umount2 = linux_base + 161, - swapon = linux_base + 162, - swapoff = linux_base + 163, - reboot = linux_base + 164, - sethostname = linux_base + 165, - setdomainname = linux_base + 166, - create_module = linux_base + 167, - init_module = linux_base + 168, - delete_module = linux_base + 169, - get_kernel_syms = linux_base + 170, - query_module = linux_base + 171, - quotactl = linux_base + 172, - nfsservctl = linux_base + 173, - getpmsg = linux_base + 174, - putpmsg = linux_base + 175, - afs_syscall = linux_base + 176, - gettid = linux_base + 178, - readahead = linux_base + 179, - setxattr = linux_base + 180, - lsetxattr = linux_base + 181, - fsetxattr = linux_base + 182, - getxattr = linux_base + 183, - lgetxattr = linux_base + 184, - fgetxattr = linux_base + 185, - listxattr = linux_base + 186, - llistxattr = linux_base + 187, - flistxattr = linux_base + 188, - removexattr = linux_base + 189, - lremovexattr = linux_base + 190, - fremovexattr = linux_base + 191, - tkill = linux_base + 192, - futex = linux_base + 194, - sched_setaffinity = linux_base + 195, - sched_getaffinity = linux_base + 196, - cacheflush = linux_base + 197, - cachectl = linux_base + 198, - sysmips = linux_base + 199, - io_setup = linux_base + 200, - io_destroy = linux_base + 201, - io_getevents = linux_base + 202, - io_submit = linux_base + 203, - io_cancel = linux_base + 204, - exit_group = linux_base + 205, - lookup_dcookie = linux_base + 206, - epoll_create = linux_base + 207, - epoll_ctl = linux_base + 208, - epoll_wait = linux_base + 209, - remap_file_pages = linux_base + 210, - rt_sigreturn = linux_base + 211, - fcntl64 = linux_base + 212, - set_tid_address = linux_base + 213, - restart_syscall = linux_base + 214, - semtimedop = linux_base + 215, - fadvise64 = linux_base + 216, - statfs64 = linux_base + 217, - fstatfs64 = linux_base + 218, - sendfile64 = linux_base + 219, - timer_create = linux_base + 220, - timer_settime = linux_base + 221, - timer_gettime = linux_base + 222, - timer_getoverrun = linux_base + 223, - timer_delete = linux_base + 224, - clock_settime = linux_base + 225, - clock_gettime = linux_base + 226, - clock_getres = linux_base + 227, - clock_nanosleep = linux_base + 228, - tgkill = linux_base + 229, - utimes = linux_base + 230, - mbind = linux_base + 231, - get_mempolicy = linux_base + 232, - set_mempolicy = linux_base + 233, - mq_open = linux_base + 234, - mq_unlink = linux_base + 235, - mq_timedsend = linux_base + 236, - mq_timedreceive = linux_base + 237, - mq_notify = linux_base + 238, - mq_getsetattr = linux_base + 239, - vserver = linux_base + 240, - waitid = linux_base + 241, - add_key = linux_base + 243, - request_key = linux_base + 244, - keyctl = linux_base + 245, - set_thread_area = linux_base + 246, - inotify_init = linux_base + 247, - inotify_add_watch = linux_base + 248, - inotify_rm_watch = linux_base + 249, - migrate_pages = linux_base + 250, - openat = linux_base + 251, - mkdirat = linux_base + 252, - mknodat = linux_base + 253, - fchownat = linux_base + 254, - futimesat = linux_base + 255, - fstatat64 = linux_base + 256, - unlinkat = linux_base + 257, - renameat = linux_base + 258, - linkat = linux_base + 259, - symlinkat = linux_base + 260, - readlinkat = linux_base + 261, - fchmodat = linux_base + 262, - faccessat = linux_base + 263, - pselect6 = linux_base + 264, - ppoll = linux_base + 265, - unshare = linux_base + 266, - splice = linux_base + 267, - sync_file_range = linux_base + 268, - tee = linux_base + 269, - vmsplice = linux_base + 270, - move_pages = linux_base + 271, - set_robust_list = linux_base + 272, - get_robust_list = linux_base + 273, - kexec_load = linux_base + 274, - getcpu = linux_base + 275, - epoll_pwait = linux_base + 276, - ioprio_set = linux_base + 277, - ioprio_get = linux_base + 278, - utimensat = linux_base + 279, - signalfd = linux_base + 280, - timerfd = linux_base + 281, - eventfd = linux_base + 282, - fallocate = linux_base + 283, - timerfd_create = linux_base + 284, - timerfd_gettime = linux_base + 285, - timerfd_settime = linux_base + 286, - signalfd4 = linux_base + 287, - eventfd2 = linux_base + 288, - epoll_create1 = linux_base + 289, - dup3 = linux_base + 290, - pipe2 = linux_base + 291, - inotify_init1 = linux_base + 292, - preadv = linux_base + 293, - pwritev = linux_base + 294, - rt_tgsigqueueinfo = linux_base + 295, - perf_event_open = linux_base + 296, - accept4 = linux_base + 297, - recvmmsg = linux_base + 298, - getdents64 = linux_base + 299, - fanotify_init = linux_base + 300, - fanotify_mark = linux_base + 301, - prlimit64 = linux_base + 302, - name_to_handle_at = linux_base + 303, - open_by_handle_at = linux_base + 304, - clock_adjtime = linux_base + 305, - syncfs = linux_base + 306, - sendmmsg = linux_base + 307, - setns = linux_base + 308, - process_vm_readv = linux_base + 309, - process_vm_writev = linux_base + 310, - kcmp = linux_base + 311, - finit_module = linux_base + 312, - sched_setattr = linux_base + 313, - sched_getattr = linux_base + 314, - renameat2 = linux_base + 315, - seccomp = linux_base + 316, - getrandom = linux_base + 317, - memfd_create = linux_base + 318, - bpf = linux_base + 319, - execveat = linux_base + 320, - userfaultfd = linux_base + 321, - membarrier = linux_base + 322, - mlock2 = linux_base + 323, - copy_file_range = linux_base + 324, - preadv2 = linux_base + 325, - pwritev2 = linux_base + 326, - pkey_mprotect = linux_base + 327, - pkey_alloc = linux_base + 328, - pkey_free = linux_base + 329, - statx = linux_base + 330, - rseq = linux_base + 331, - io_pgetevents = linux_base + 332, - clock_gettime64 = linux_base + 403, - clock_settime64 = linux_base + 404, - clock_adjtime64 = linux_base + 405, - clock_getres_time64 = linux_base + 406, - clock_nanosleep_time64 = linux_base + 407, - timer_gettime64 = linux_base + 408, - timer_settime64 = linux_base + 409, - timerfd_gettime64 = linux_base + 410, - timerfd_settime64 = linux_base + 411, - utimensat_time64 = linux_base + 412, - pselect6_time64 = linux_base + 413, - ppoll_time64 = linux_base + 414, - io_pgetevents_time64 = linux_base + 416, - recvmmsg_time64 = linux_base + 417, - mq_timedsend_time64 = linux_base + 418, - mq_timedreceive_time64 = linux_base + 419, - semtimedop_time64 = linux_base + 420, - rt_sigtimedwait_time64 = linux_base + 421, - futex_time64 = linux_base + 422, - sched_rr_get_interval_time64 = linux_base + 423, - pidfd_send_signal = linux_base + 424, - io_uring_setup = linux_base + 425, - io_uring_enter = linux_base + 426, - io_uring_register = linux_base + 427, - open_tree = linux_base + 428, - move_mount = linux_base + 429, - fsopen = linux_base + 430, - fsconfig = linux_base + 431, - fsmount = linux_base + 432, - fspick = linux_base + 433, - pidfd_open = linux_base + 434, - clone3 = linux_base + 435, - close_range = linux_base + 436, - openat2 = linux_base + 437, - pidfd_getfd = linux_base + 438, - faccessat2 = linux_base + 439, - process_madvise = linux_base + 440, - epoll_pwait2 = linux_base + 441, - mount_setattr = linux_base + 442, - quotactl_fd = linux_base + 443, - landlock_create_ruleset = linux_base + 444, - landlock_add_rule = linux_base + 445, - landlock_restrict_self = linux_base + 446, - process_mrelease = linux_base + 448, - futex_waitv = linux_base + 449, - set_mempolicy_home_node = linux_base + 450, - cachestat = linux_base + 451, - fchmodat2 = linux_base + 452, - map_shadow_stack = linux_base + 453, - futex_wake = linux_base + 454, - futex_wait = linux_base + 455, - futex_requeue = linux_base + 456, - statmount = linux_base + 457, - listmount = linux_base + 458, - lsm_get_self_attr = linux_base + 459, - lsm_set_self_attr = linux_base + 460, - lsm_list_modules = linux_base + 461, - mseal = linux_base + 462, + read = 6000, + write = 6001, + open = 6002, + close = 6003, + stat = 6004, + fstat = 6005, + lstat = 6006, + poll = 6007, + lseek = 6008, + mmap = 6009, + mprotect = 6010, + munmap = 6011, + brk = 6012, + rt_sigaction = 6013, + rt_sigprocmask = 6014, + ioctl = 6015, + pread64 = 6016, + pwrite64 = 6017, + readv = 6018, + writev = 6019, + access = 6020, + pipe = 6021, + newselect = 6022, + sched_yield = 6023, + mremap = 6024, + msync = 6025, + mincore = 6026, + madvise = 6027, + shmget = 6028, + shmat = 6029, + shmctl = 6030, + dup = 6031, + dup2 = 6032, + pause = 6033, + nanosleep = 6034, + getitimer = 6035, + setitimer = 6036, + alarm = 6037, + getpid = 6038, + sendfile = 6039, + socket = 6040, + connect = 6041, + accept = 6042, + sendto = 6043, + recvfrom = 6044, + sendmsg = 6045, + recvmsg = 6046, + shutdown = 6047, + bind = 6048, + listen = 6049, + getsockname = 6050, + getpeername = 6051, + socketpair = 6052, + setsockopt = 6053, + getsockopt = 6054, + clone = 6055, + fork = 6056, + execve = 6057, + exit = 6058, + wait4 = 6059, + kill = 6060, + uname = 6061, + semget = 6062, + semop = 6063, + semctl = 6064, + shmdt = 6065, + msgget = 6066, + msgsnd = 6067, + msgrcv = 6068, + msgctl = 6069, + fcntl = 6070, + flock = 6071, + fsync = 6072, + fdatasync = 6073, + truncate = 6074, + ftruncate = 6075, + getdents = 6076, + getcwd = 6077, + chdir = 6078, + fchdir = 6079, + rename = 6080, + mkdir = 6081, + rmdir = 6082, + creat = 6083, + link = 6084, + unlink = 6085, + symlink = 6086, + readlink = 6087, + chmod = 6088, + fchmod = 6089, + chown = 6090, + fchown = 6091, + lchown = 6092, + umask = 6093, + gettimeofday = 6094, + getrlimit = 6095, + getrusage = 6096, + sysinfo = 6097, + times = 6098, + ptrace = 6099, + getuid = 6100, + syslog = 6101, + getgid = 6102, + setuid = 6103, + setgid = 6104, + geteuid = 6105, + getegid = 6106, + setpgid = 6107, + getppid = 6108, + getpgrp = 6109, + setsid = 6110, + setreuid = 6111, + setregid = 6112, + getgroups = 6113, + setgroups = 6114, + setresuid = 6115, + getresuid = 6116, + setresgid = 6117, + getresgid = 6118, + getpgid = 6119, + setfsuid = 6120, + setfsgid = 6121, + getsid = 6122, + capget = 6123, + capset = 6124, + rt_sigpending = 6125, + rt_sigtimedwait = 6126, + rt_sigqueueinfo = 6127, + rt_sigsuspend = 6128, + sigaltstack = 6129, + utime = 6130, + mknod = 6131, + personality = 6132, + ustat = 6133, + statfs = 6134, + fstatfs = 6135, + sysfs = 6136, + getpriority = 6137, + setpriority = 6138, + sched_setparam = 6139, + sched_getparam = 6140, + sched_setscheduler = 6141, + sched_getscheduler = 6142, + sched_get_priority_max = 6143, + sched_get_priority_min = 6144, + sched_rr_get_interval = 6145, + mlock = 6146, + munlock = 6147, + mlockall = 6148, + munlockall = 6149, + vhangup = 6150, + pivot_root = 6151, + sysctl = 6152, + prctl = 6153, + adjtimex = 6154, + setrlimit = 6155, + chroot = 6156, + sync = 6157, + acct = 6158, + settimeofday = 6159, + mount = 6160, + umount2 = 6161, + swapon = 6162, + swapoff = 6163, + reboot = 6164, + sethostname = 6165, + setdomainname = 6166, + create_module = 6167, + init_module = 6168, + delete_module = 6169, + get_kernel_syms = 6170, + query_module = 6171, + quotactl = 6172, + nfsservctl = 6173, + getpmsg = 6174, + putpmsg = 6175, + afs_syscall = 6176, + gettid = 6178, + readahead = 6179, + setxattr = 6180, + lsetxattr = 6181, + fsetxattr = 6182, + getxattr = 6183, + lgetxattr = 6184, + fgetxattr = 6185, + listxattr = 6186, + llistxattr = 6187, + flistxattr = 6188, + removexattr = 6189, + lremovexattr = 6190, + fremovexattr = 6191, + tkill = 6192, + futex = 6194, + sched_setaffinity = 6195, + sched_getaffinity = 6196, + cacheflush = 6197, + cachectl = 6198, + sysmips = 6199, + io_setup = 6200, + io_destroy = 6201, + io_getevents = 6202, + io_submit = 6203, + io_cancel = 6204, + exit_group = 6205, + lookup_dcookie = 6206, + epoll_create = 6207, + epoll_ctl = 6208, + epoll_wait = 6209, + remap_file_pages = 6210, + rt_sigreturn = 6211, + fcntl64 = 6212, + set_tid_address = 6213, + restart_syscall = 6214, + semtimedop = 6215, + fadvise64 = 6216, + statfs64 = 6217, + fstatfs64 = 6218, + sendfile64 = 6219, + timer_create = 6220, + timer_settime = 6221, + timer_gettime = 6222, + timer_getoverrun = 6223, + timer_delete = 6224, + clock_settime = 6225, + clock_gettime = 6226, + clock_getres = 6227, + clock_nanosleep = 6228, + tgkill = 6229, + utimes = 6230, + mbind = 6231, + get_mempolicy = 6232, + set_mempolicy = 6233, + mq_open = 6234, + mq_unlink = 6235, + mq_timedsend = 6236, + mq_timedreceive = 6237, + mq_notify = 6238, + mq_getsetattr = 6239, + vserver = 6240, + waitid = 6241, + add_key = 6243, + request_key = 6244, + keyctl = 6245, + set_thread_area = 6246, + inotify_init = 6247, + inotify_add_watch = 6248, + inotify_rm_watch = 6249, + migrate_pages = 6250, + openat = 6251, + mkdirat = 6252, + mknodat = 6253, + fchownat = 6254, + futimesat = 6255, + fstatat64 = 6256, + unlinkat = 6257, + renameat = 6258, + linkat = 6259, + symlinkat = 6260, + readlinkat = 6261, + fchmodat = 6262, + faccessat = 6263, + pselect6 = 6264, + ppoll = 6265, + unshare = 6266, + splice = 6267, + sync_file_range = 6268, + tee = 6269, + vmsplice = 6270, + move_pages = 6271, + set_robust_list = 6272, + get_robust_list = 6273, + kexec_load = 6274, + getcpu = 6275, + epoll_pwait = 6276, + ioprio_set = 6277, + ioprio_get = 6278, + utimensat = 6279, + signalfd = 6280, + timerfd = 6281, + eventfd = 6282, + fallocate = 6283, + timerfd_create = 6284, + timerfd_gettime = 6285, + timerfd_settime = 6286, + signalfd4 = 6287, + eventfd2 = 6288, + epoll_create1 = 6289, + dup3 = 6290, + pipe2 = 6291, + inotify_init1 = 6292, + preadv = 6293, + pwritev = 6294, + rt_tgsigqueueinfo = 6295, + perf_event_open = 6296, + accept4 = 6297, + recvmmsg = 6298, + getdents64 = 6299, + fanotify_init = 6300, + fanotify_mark = 6301, + prlimit64 = 6302, + name_to_handle_at = 6303, + open_by_handle_at = 6304, + clock_adjtime = 6305, + syncfs = 6306, + sendmmsg = 6307, + setns = 6308, + process_vm_readv = 6309, + process_vm_writev = 6310, + kcmp = 6311, + finit_module = 6312, + sched_setattr = 6313, + sched_getattr = 6314, + renameat2 = 6315, + seccomp = 6316, + getrandom = 6317, + memfd_create = 6318, + bpf = 6319, + execveat = 6320, + userfaultfd = 6321, + membarrier = 6322, + mlock2 = 6323, + copy_file_range = 6324, + preadv2 = 6325, + pwritev2 = 6326, + pkey_mprotect = 6327, + pkey_alloc = 6328, + pkey_free = 6329, + statx = 6330, + rseq = 6331, + io_pgetevents = 6332, + clock_gettime64 = 6403, + clock_settime64 = 6404, + clock_adjtime64 = 6405, + clock_getres_time64 = 6406, + clock_nanosleep_time64 = 6407, + timer_gettime64 = 6408, + timer_settime64 = 6409, + timerfd_gettime64 = 6410, + timerfd_settime64 = 6411, + utimensat_time64 = 6412, + pselect6_time64 = 6413, + ppoll_time64 = 6414, + io_pgetevents_time64 = 6416, + recvmmsg_time64 = 6417, + mq_timedsend_time64 = 6418, + mq_timedreceive_time64 = 6419, + semtimedop_time64 = 6420, + rt_sigtimedwait_time64 = 6421, + futex_time64 = 6422, + sched_rr_get_interval_time64 = 6423, + pidfd_send_signal = 6424, + io_uring_setup = 6425, + io_uring_enter = 6426, + io_uring_register = 6427, + open_tree = 6428, + move_mount = 6429, + fsopen = 6430, + fsconfig = 6431, + fsmount = 6432, + fspick = 6433, + pidfd_open = 6434, + clone3 = 6435, + close_range = 6436, + openat2 = 6437, + pidfd_getfd = 6438, + faccessat2 = 6439, + process_madvise = 6440, + epoll_pwait2 = 6441, + mount_setattr = 6442, + quotactl_fd = 6443, + landlock_create_ruleset = 6444, + landlock_add_rule = 6445, + landlock_restrict_self = 6446, + process_mrelease = 6448, + futex_waitv = 6449, + set_mempolicy_home_node = 6450, + cachestat = 6451, + fchmodat2 = 6452, + map_shadow_stack = 6453, + futex_wake = 6454, + futex_wait = 6455, + futex_requeue = 6456, + statmount = 6457, + listmount = 6458, + lsm_get_self_attr = 6459, + lsm_set_self_attr = 6460, + lsm_list_modules = 6461, + mseal = 6462, + setxattrat = 6463, + getxattrat = 6464, + listxattrat = 6465, + removexattrat = 6466, + open_tree_attr = 6467, }; pub const PowerPC = enum(usize) { @@ -4533,6 +4580,11 @@ pub const PowerPC = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const PowerPC64 = enum(usize) { @@ -4951,6 +5003,11 @@ pub const PowerPC64 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const S390x = enum(usize) { @@ -5335,6 +5392,11 @@ pub const S390x = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; pub const Xtensa = enum(usize) { @@ -5723,14 +5785,344 @@ pub const Xtensa = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, +}; + +pub const Arm64 = enum(usize) { + io_setup = 0, + io_destroy = 1, + io_submit = 2, + io_cancel = 3, + io_getevents = 4, + setxattr = 5, + lsetxattr = 6, + fsetxattr = 7, + getxattr = 8, + lgetxattr = 9, + fgetxattr = 10, + listxattr = 11, + llistxattr = 12, + flistxattr = 13, + removexattr = 14, + lremovexattr = 15, + fremovexattr = 16, + getcwd = 17, + lookup_dcookie = 18, + eventfd2 = 19, + epoll_create1 = 20, + epoll_ctl = 21, + epoll_pwait = 22, + dup = 23, + dup3 = 24, + fcntl = 25, + inotify_init1 = 26, + inotify_add_watch = 27, + inotify_rm_watch = 28, + ioctl = 29, + ioprio_set = 30, + ioprio_get = 31, + flock = 32, + mknodat = 33, + mkdirat = 34, + unlinkat = 35, + symlinkat = 36, + linkat = 37, + renameat = 38, + umount2 = 39, + mount = 40, + pivot_root = 41, + nfsservctl = 42, + statfs = 43, + fstatfs = 44, + truncate = 45, + ftruncate = 46, + fallocate = 47, + faccessat = 48, + chdir = 49, + fchdir = 50, + chroot = 51, + fchmod = 52, + fchmodat = 53, + fchownat = 54, + fchown = 55, + openat = 56, + close = 57, + vhangup = 58, + pipe2 = 59, + quotactl = 60, + getdents64 = 61, + lseek = 62, + read = 63, + write = 64, + readv = 65, + writev = 66, + pread64 = 67, + pwrite64 = 68, + preadv = 69, + pwritev = 70, + sendfile = 71, + pselect6 = 72, + ppoll = 73, + signalfd4 = 74, + vmsplice = 75, + splice = 76, + tee = 77, + readlinkat = 78, + fstatat64 = 79, + fstat = 80, + sync = 81, + fsync = 82, + fdatasync = 83, + sync_file_range = 84, + timerfd_create = 85, + timerfd_settime = 86, + timerfd_gettime = 87, + utimensat = 88, + acct = 89, + capget = 90, + capset = 91, + personality = 92, + exit = 93, + exit_group = 94, + waitid = 95, + set_tid_address = 96, + unshare = 97, + futex = 98, + set_robust_list = 99, + get_robust_list = 100, + nanosleep = 101, + getitimer = 102, + setitimer = 103, + kexec_load = 104, + init_module = 105, + delete_module = 106, + timer_create = 107, + timer_gettime = 108, + timer_getoverrun = 109, + timer_settime = 110, + timer_delete = 111, + clock_settime = 112, + clock_gettime = 113, + clock_getres = 114, + clock_nanosleep = 115, + syslog = 116, + ptrace = 117, + sched_setparam = 118, + sched_setscheduler = 119, + sched_getscheduler = 120, + sched_getparam = 121, + sched_setaffinity = 122, + sched_getaffinity = 123, + sched_yield = 124, + sched_get_priority_max = 125, + sched_get_priority_min = 126, + sched_rr_get_interval = 127, + restart_syscall = 128, + kill = 129, + tkill = 130, + tgkill = 131, + sigaltstack = 132, + rt_sigsuspend = 133, + rt_sigaction = 134, + rt_sigprocmask = 135, + rt_sigpending = 136, + rt_sigtimedwait = 137, + rt_sigqueueinfo = 138, + rt_sigreturn = 139, + setpriority = 140, + getpriority = 141, + reboot = 142, + setregid = 143, + setgid = 144, + setreuid = 145, + setuid = 146, + setresuid = 147, + getresuid = 148, + setresgid = 149, + getresgid = 150, + setfsuid = 151, + setfsgid = 152, + times = 153, + setpgid = 154, + getpgid = 155, + getsid = 156, + setsid = 157, + getgroups = 158, + setgroups = 159, + uname = 160, + sethostname = 161, + setdomainname = 162, + getrlimit = 163, + setrlimit = 164, + getrusage = 165, + umask = 166, + prctl = 167, + getcpu = 168, + gettimeofday = 169, + settimeofday = 170, + adjtimex = 171, + getpid = 172, + getppid = 173, + getuid = 174, + geteuid = 175, + getgid = 176, + getegid = 177, + gettid = 178, + sysinfo = 179, + mq_open = 180, + mq_unlink = 181, + mq_timedsend = 182, + mq_timedreceive = 183, + mq_notify = 184, + mq_getsetattr = 185, + msgget = 186, + msgctl = 187, + msgrcv = 188, + msgsnd = 189, + semget = 190, + semctl = 191, + semtimedop = 192, + semop = 193, + shmget = 194, + shmctl = 195, + shmat = 196, + shmdt = 197, + socket = 198, + socketpair = 199, + bind = 200, + listen = 201, + accept = 202, + connect = 203, + getsockname = 204, + getpeername = 205, + sendto = 206, + recvfrom = 207, + setsockopt = 208, + getsockopt = 209, + shutdown = 210, + sendmsg = 211, + recvmsg = 212, + readahead = 213, + brk = 214, + munmap = 215, + mremap = 216, + add_key = 217, + request_key = 218, + keyctl = 219, + clone = 220, + execve = 221, + mmap = 222, + fadvise64 = 223, + swapon = 224, + swapoff = 225, + mprotect = 226, + msync = 227, + mlock = 228, + munlock = 229, + mlockall = 230, + munlockall = 231, + mincore = 232, + madvise = 233, + remap_file_pages = 234, + mbind = 235, + get_mempolicy = 236, + set_mempolicy = 237, + migrate_pages = 238, + move_pages = 239, + rt_tgsigqueueinfo = 240, + perf_event_open = 241, + accept4 = 242, + recvmmsg = 243, + wait4 = 260, + prlimit64 = 261, + fanotify_init = 262, + fanotify_mark = 263, + name_to_handle_at = 264, + open_by_handle_at = 265, + clock_adjtime = 266, + syncfs = 267, + setns = 268, + sendmmsg = 269, + process_vm_readv = 270, + process_vm_writev = 271, + kcmp = 272, + finit_module = 273, + sched_setattr = 274, + sched_getattr = 275, + renameat2 = 276, + seccomp = 277, + getrandom = 278, + memfd_create = 279, + bpf = 280, + execveat = 281, + userfaultfd = 282, + membarrier = 283, + mlock2 = 284, + copy_file_range = 285, + preadv2 = 286, + pwritev2 = 287, + pkey_mprotect = 288, + pkey_alloc = 289, + pkey_free = 290, + statx = 291, + io_pgetevents = 292, + rseq = 293, + kexec_file_load = 294, + pidfd_send_signal = 424, + io_uring_setup = 425, + io_uring_enter = 426, + io_uring_register = 427, + open_tree = 428, + move_mount = 429, + fsopen = 430, + fsconfig = 431, + fsmount = 432, + fspick = 433, + pidfd_open = 434, + clone3 = 435, + close_range = 436, + openat2 = 437, + pidfd_getfd = 438, + faccessat2 = 439, + process_madvise = 440, + epoll_pwait2 = 441, + mount_setattr = 442, + quotactl_fd = 443, + landlock_create_ruleset = 444, + landlock_add_rule = 445, + landlock_restrict_self = 446, + memfd_secret = 447, + process_mrelease = 448, + futex_waitv = 449, + set_mempolicy_home_node = 450, + cachestat = 451, + fchmodat2 = 452, + map_shadow_stack = 453, + futex_wake = 454, + futex_wait = 455, + futex_requeue = 456, + statmount = 457, + listmount = 458, + lsm_get_self_attr = 459, + lsm_set_self_attr = 460, + lsm_list_modules = 461, + mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; -pub const Arm64 = enum(usize) { +pub const RiscV32 = enum(usize) { io_setup = 0, io_destroy = 1, io_submit = 2, io_cancel = 3, - io_getevents = 4, setxattr = 5, lsetxattr = 6, fsetxattr = 7, @@ -5751,7 +6143,7 @@ pub const Arm64 = enum(usize) { epoll_pwait = 22, dup = 23, dup3 = 24, - fcntl = 25, + fcntl64 = 25, inotify_init1 = 26, inotify_add_watch = 27, inotify_rm_watch = 28, @@ -5764,15 +6156,14 @@ pub const Arm64 = enum(usize) { unlinkat = 35, symlinkat = 36, linkat = 37, - renameat = 38, umount2 = 39, mount = 40, pivot_root = 41, nfsservctl = 42, - statfs = 43, - fstatfs = 44, - truncate = 45, - ftruncate = 46, + statfs64 = 43, + fstatfs64 = 44, + truncate64 = 45, + ftruncate64 = 46, fallocate = 47, faccessat = 48, chdir = 49, @@ -5788,7 +6179,7 @@ pub const Arm64 = enum(usize) { pipe2 = 59, quotactl = 60, getdents64 = 61, - lseek = 62, + llseek = 62, read = 63, write = 64, readv = 65, @@ -5798,23 +6189,16 @@ pub const Arm64 = enum(usize) { preadv = 69, pwritev = 70, sendfile64 = 71, - pselect6 = 72, - ppoll = 73, signalfd4 = 74, vmsplice = 75, splice = 76, tee = 77, readlinkat = 78, - fstatat64 = 79, - fstat64 = 80, sync = 81, fsync = 82, fdatasync = 83, sync_file_range = 84, timerfd_create = 85, - timerfd_settime = 86, - timerfd_gettime = 87, - utimensat = 88, acct = 89, capget = 90, capset = 91, @@ -5824,24 +6208,16 @@ pub const Arm64 = enum(usize) { waitid = 95, set_tid_address = 96, unshare = 97, - futex = 98, set_robust_list = 99, get_robust_list = 100, - nanosleep = 101, getitimer = 102, setitimer = 103, kexec_load = 104, init_module = 105, delete_module = 106, timer_create = 107, - timer_gettime = 108, timer_getoverrun = 109, - timer_settime = 110, timer_delete = 111, - clock_settime = 112, - clock_gettime = 113, - clock_getres = 114, - clock_nanosleep = 115, syslog = 116, ptrace = 117, sched_setparam = 118, @@ -5853,7 +6229,6 @@ pub const Arm64 = enum(usize) { sched_yield = 124, sched_get_priority_max = 125, sched_get_priority_min = 126, - sched_rr_get_interval = 127, restart_syscall = 128, kill = 129, tkill = 130, @@ -5863,7 +6238,6 @@ pub const Arm64 = enum(usize) { rt_sigaction = 134, rt_sigprocmask = 135, rt_sigpending = 136, - rt_sigtimedwait = 137, rt_sigqueueinfo = 138, rt_sigreturn = 139, setpriority = 140, @@ -5889,15 +6263,10 @@ pub const Arm64 = enum(usize) { uname = 160, sethostname = 161, setdomainname = 162, - getrlimit = 163, - setrlimit = 164, getrusage = 165, umask = 166, prctl = 167, getcpu = 168, - gettimeofday = 169, - settimeofday = 170, - adjtimex = 171, getpid = 172, getppid = 173, getuid = 174, @@ -5908,8 +6277,6 @@ pub const Arm64 = enum(usize) { sysinfo = 179, mq_open = 180, mq_unlink = 181, - mq_timedsend = 182, - mq_timedreceive = 183, mq_notify = 184, mq_getsetattr = 185, msgget = 186, @@ -5918,7 +6285,6 @@ pub const Arm64 = enum(usize) { msgsnd = 189, semget = 190, semctl = 191, - semtimedop = 192, semop = 193, shmget = 194, shmctl = 195, @@ -5948,7 +6314,7 @@ pub const Arm64 = enum(usize) { keyctl = 219, clone = 220, execve = 221, - mmap = 222, + mmap2 = 222, fadvise64_64 = 223, swapon = 224, swapoff = 225, @@ -5968,15 +6334,14 @@ pub const Arm64 = enum(usize) { move_pages = 239, rt_tgsigqueueinfo = 240, perf_event_open = 241, - accept4 = 242, - recvmmsg = 243, - wait4 = 260, + accept4 = 242, + riscv_hwprobe = 258, + riscv_flush_icache = 259, prlimit64 = 261, fanotify_init = 262, fanotify_mark = 263, name_to_handle_at = 264, open_by_handle_at = 265, - clock_adjtime = 266, syncfs = 267, setns = 268, sendmmsg = 269, @@ -6002,9 +6367,28 @@ pub const Arm64 = enum(usize) { pkey_alloc = 289, pkey_free = 290, statx = 291, - io_pgetevents = 292, rseq = 293, kexec_file_load = 294, + clock_gettime64 = 403, + clock_settime64 = 404, + clock_adjtime64 = 405, + clock_getres_time64 = 406, + clock_nanosleep_time64 = 407, + timer_gettime64 = 408, + timer_settime64 = 409, + timerfd_gettime64 = 410, + timerfd_settime64 = 411, + utimensat_time64 = 412, + pselect6_time64 = 413, + ppoll_time64 = 414, + io_pgetevents_time64 = 416, + recvmmsg_time64 = 417, + mq_timedsend_time64 = 418, + mq_timedreceive_time64 = 419, + semtimedop_time64 = 420, + rt_sigtimedwait_time64 = 421, + futex_time64 = 422, + sched_rr_get_interval_time64 = 423, pidfd_send_signal = 424, io_uring_setup = 425, io_uring_enter = 426, @@ -6044,13 +6428,19 @@ pub const Arm64 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; -pub const RiscV32 = enum(usize) { +pub const RiscV64 = enum(usize) { io_setup = 0, io_destroy = 1, io_submit = 2, io_cancel = 3, + io_getevents = 4, setxattr = 5, lsetxattr = 6, fsetxattr = 7, @@ -6071,7 +6461,7 @@ pub const RiscV32 = enum(usize) { epoll_pwait = 22, dup = 23, dup3 = 24, - fcntl64 = 25, + fcntl = 25, inotify_init1 = 26, inotify_add_watch = 27, inotify_rm_watch = 28, @@ -6088,10 +6478,10 @@ pub const RiscV32 = enum(usize) { mount = 40, pivot_root = 41, nfsservctl = 42, - statfs64 = 43, - fstatfs64 = 44, - truncate64 = 45, - ftruncate64 = 46, + statfs = 43, + fstatfs = 44, + truncate = 45, + ftruncate = 46, fallocate = 47, faccessat = 48, chdir = 49, @@ -6107,7 +6497,7 @@ pub const RiscV32 = enum(usize) { pipe2 = 59, quotactl = 60, getdents64 = 61, - llseek = 62, + lseek = 62, read = 63, write = 64, readv = 65, @@ -6116,17 +6506,24 @@ pub const RiscV32 = enum(usize) { pwrite64 = 68, preadv = 69, pwritev = 70, - sendfile64 = 71, + sendfile = 71, + pselect6 = 72, + ppoll = 73, signalfd4 = 74, vmsplice = 75, splice = 76, tee = 77, readlinkat = 78, + fstatat64 = 79, + fstat = 80, sync = 81, fsync = 82, fdatasync = 83, sync_file_range = 84, timerfd_create = 85, + timerfd_settime = 86, + timerfd_gettime = 87, + utimensat = 88, acct = 89, capget = 90, capset = 91, @@ -6136,16 +6533,24 @@ pub const RiscV32 = enum(usize) { waitid = 95, set_tid_address = 96, unshare = 97, + futex = 98, set_robust_list = 99, get_robust_list = 100, + nanosleep = 101, getitimer = 102, setitimer = 103, kexec_load = 104, init_module = 105, delete_module = 106, timer_create = 107, + timer_gettime = 108, timer_getoverrun = 109, + timer_settime = 110, timer_delete = 111, + clock_settime = 112, + clock_gettime = 113, + clock_getres = 114, + clock_nanosleep = 115, syslog = 116, ptrace = 117, sched_setparam = 118, @@ -6157,6 +6562,7 @@ pub const RiscV32 = enum(usize) { sched_yield = 124, sched_get_priority_max = 125, sched_get_priority_min = 126, + sched_rr_get_interval = 127, restart_syscall = 128, kill = 129, tkill = 130, @@ -6166,6 +6572,7 @@ pub const RiscV32 = enum(usize) { rt_sigaction = 134, rt_sigprocmask = 135, rt_sigpending = 136, + rt_sigtimedwait = 137, rt_sigqueueinfo = 138, rt_sigreturn = 139, setpriority = 140, @@ -6191,10 +6598,15 @@ pub const RiscV32 = enum(usize) { uname = 160, sethostname = 161, setdomainname = 162, + getrlimit = 163, + setrlimit = 164, getrusage = 165, umask = 166, prctl = 167, getcpu = 168, + gettimeofday = 169, + settimeofday = 170, + adjtimex = 171, getpid = 172, getppid = 173, getuid = 174, @@ -6205,6 +6617,8 @@ pub const RiscV32 = enum(usize) { sysinfo = 179, mq_open = 180, mq_unlink = 181, + mq_timedsend = 182, + mq_timedreceive = 183, mq_notify = 184, mq_getsetattr = 185, msgget = 186, @@ -6213,6 +6627,7 @@ pub const RiscV32 = enum(usize) { msgsnd = 189, semget = 190, semctl = 191, + semtimedop = 192, semop = 193, shmget = 194, shmctl = 195, @@ -6242,8 +6657,8 @@ pub const RiscV32 = enum(usize) { keyctl = 219, clone = 220, execve = 221, - mmap2 = 222, - fadvise64_64 = 223, + mmap = 222, + fadvise64 = 223, swapon = 224, swapoff = 225, mprotect = 226, @@ -6263,11 +6678,16 @@ pub const RiscV32 = enum(usize) { rt_tgsigqueueinfo = 240, perf_event_open = 241, accept4 = 242, + recvmmsg = 243, + riscv_hwprobe = 258, + riscv_flush_icache = 259, + wait4 = 260, prlimit64 = 261, fanotify_init = 262, fanotify_mark = 263, name_to_handle_at = 264, open_by_handle_at = 265, + clock_adjtime = 266, syncfs = 267, setns = 268, sendmmsg = 269, @@ -6293,28 +6713,9 @@ pub const RiscV32 = enum(usize) { pkey_alloc = 289, pkey_free = 290, statx = 291, + io_pgetevents = 292, rseq = 293, kexec_file_load = 294, - clock_gettime = 403, - clock_settime = 404, - clock_adjtime = 405, - clock_getres = 406, - clock_nanosleep = 407, - timer_gettime = 408, - timer_settime = 409, - timerfd_gettime = 410, - timerfd_settime = 411, - utimensat = 412, - pselect6 = 413, - ppoll = 414, - io_pgetevents = 416, - recvmmsg = 417, - mq_timedsend = 418, - mq_timedreceive = 419, - semtimedop = 420, - rt_sigtimedwait = 421, - futex = 422, - sched_rr_get_interval = 423, pidfd_send_signal = 424, io_uring_setup = 425, io_uring_enter = 426, @@ -6354,11 +6755,14 @@ pub const RiscV32 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, - riscv_flush_icache = (244 + 15), - riscv_hwprobe = (244 + 14), + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; -pub const RiscV64 = enum(usize) { +pub const LoongArch64 = enum(usize) { io_setup = 0, io_destroy = 1, io_submit = 2, @@ -6429,7 +6833,7 @@ pub const RiscV64 = enum(usize) { pwrite64 = 68, preadv = 69, pwritev = 70, - sendfile64 = 71, + sendfile = 71, pselect6 = 72, ppoll = 73, signalfd4 = 74, @@ -6438,7 +6842,7 @@ pub const RiscV64 = enum(usize) { tee = 77, readlinkat = 78, fstatat64 = 79, - fstat64 = 80, + fstat = 80, sync = 81, fsync = 82, fdatasync = 83, @@ -6521,8 +6925,6 @@ pub const RiscV64 = enum(usize) { uname = 160, sethostname = 161, setdomainname = 162, - getrlimit = 163, - setrlimit = 164, getrusage = 165, umask = 166, prctl = 167, @@ -6581,7 +6983,7 @@ pub const RiscV64 = enum(usize) { clone = 220, execve = 221, mmap = 222, - fadvise64_64 = 223, + fadvise64 = 223, swapon = 224, swapoff = 225, mprotect = 226, @@ -6660,7 +7062,6 @@ pub const RiscV64 = enum(usize) { landlock_create_ruleset = 444, landlock_add_rule = 445, landlock_restrict_self = 446, - memfd_secret = 447, process_mrelease = 448, futex_waitv = 449, set_mempolicy_home_node = 450, @@ -6676,11 +7077,14 @@ pub const RiscV64 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, - riscv_flush_icache = (244 + 15), - riscv_hwprobe = (244 + 14), + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; -pub const LoongArch64 = enum(usize) { +pub const Arc = enum(usize) { io_setup = 0, io_destroy = 1, io_submit = 2, @@ -6706,7 +7110,7 @@ pub const LoongArch64 = enum(usize) { epoll_pwait = 22, dup = 23, dup3 = 24, - fcntl = 25, + fcntl64 = 25, inotify_init1 = 26, inotify_add_watch = 27, inotify_rm_watch = 28, @@ -6719,14 +7123,15 @@ pub const LoongArch64 = enum(usize) { unlinkat = 35, symlinkat = 36, linkat = 37, + renameat = 38, umount2 = 39, mount = 40, pivot_root = 41, nfsservctl = 42, - statfs = 43, - fstatfs = 44, - truncate = 45, - ftruncate = 46, + statfs64 = 43, + fstatfs64 = 44, + truncate64 = 45, + ftruncate64 = 46, fallocate = 47, faccessat = 48, chdir = 49, @@ -6742,7 +7147,7 @@ pub const LoongArch64 = enum(usize) { pipe2 = 59, quotactl = 60, getdents64 = 61, - lseek = 62, + llseek = 62, read = 63, write = 64, readv = 65, @@ -6759,6 +7164,8 @@ pub const LoongArch64 = enum(usize) { splice = 76, tee = 77, readlinkat = 78, + fstatat64 = 79, + fstat64 = 80, sync = 81, fsync = 82, fdatasync = 83, @@ -6841,6 +7248,8 @@ pub const LoongArch64 = enum(usize) { uname = 160, sethostname = 161, setdomainname = 162, + getrlimit = 163, + setrlimit = 164, getrusage = 165, umask = 166, prctl = 167, @@ -6898,7 +7307,7 @@ pub const LoongArch64 = enum(usize) { keyctl = 219, clone = 220, execve = 221, - mmap = 222, + mmap2 = 222, fadvise64_64 = 223, swapon = 224, swapoff = 225, @@ -6920,6 +7329,11 @@ pub const LoongArch64 = enum(usize) { perf_event_open = 241, accept4 = 242, recvmmsg = 243, + cacheflush = 244, + arc_settls = 245, + arc_gettls = 246, + sysfs = 247, + arc_usr_cmpxchg = 248, wait4 = 260, prlimit64 = 261, fanotify_init = 262, @@ -6955,6 +7369,26 @@ pub const LoongArch64 = enum(usize) { io_pgetevents = 292, rseq = 293, kexec_file_load = 294, + clock_gettime64 = 403, + clock_settime64 = 404, + clock_adjtime64 = 405, + clock_getres_time64 = 406, + clock_nanosleep_time64 = 407, + timer_gettime64 = 408, + timer_settime64 = 409, + timerfd_gettime64 = 410, + timerfd_settime64 = 411, + utimensat_time64 = 412, + pselect6_time64 = 413, + ppoll_time64 = 414, + io_pgetevents_time64 = 416, + recvmmsg_time64 = 417, + mq_timedsend_time64 = 418, + mq_timedreceive_time64 = 419, + semtimedop_time64 = 420, + rt_sigtimedwait_time64 = 421, + futex_time64 = 422, + sched_rr_get_interval_time64 = 423, pidfd_send_signal = 424, io_uring_setup = 425, io_uring_enter = 426, @@ -6993,14 +7427,19 @@ pub const LoongArch64 = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; -pub const Arc = enum(usize) { +pub const CSky = enum(usize) { io_setup = 0, io_destroy = 1, io_submit = 2, io_cancel = 3, - io_getevents_time32 = 4, + io_getevents = 4, setxattr = 5, lsetxattr = 6, fsetxattr = 7, @@ -7034,7 +7473,6 @@ pub const Arc = enum(usize) { unlinkat = 35, symlinkat = 36, linkat = 37, - renameat = 38, umount2 = 39, mount = 40, pivot_root = 41, @@ -7068,8 +7506,8 @@ pub const Arc = enum(usize) { preadv = 69, pwritev = 70, sendfile64 = 71, - pselect6_time32 = 72, - ppoll_time32 = 73, + pselect6 = 72, + ppoll = 73, signalfd4 = 74, vmsplice = 75, splice = 76, @@ -7082,9 +7520,9 @@ pub const Arc = enum(usize) { fdatasync = 83, sync_file_range = 84, timerfd_create = 85, - timerfd_settime32 = 86, - timerfd_gettime32 = 87, - utimensat_time32 = 88, + timerfd_settime = 86, + timerfd_gettime = 87, + utimensat = 88, acct = 89, capget = 90, capset = 91, @@ -7094,24 +7532,24 @@ pub const Arc = enum(usize) { waitid = 95, set_tid_address = 96, unshare = 97, - futex_time32 = 98, + futex = 98, set_robust_list = 99, get_robust_list = 100, - nanosleep_time32 = 101, + nanosleep = 101, getitimer = 102, setitimer = 103, kexec_load = 104, init_module = 105, delete_module = 106, timer_create = 107, - timer_gettime32 = 108, + timer_gettime = 108, timer_getoverrun = 109, - timer_settime32 = 110, + timer_settime = 110, timer_delete = 111, - clock_settime32 = 112, - clock_gettime32 = 113, - clock_getres_time32 = 114, - clock_nanosleep_time32 = 115, + clock_settime = 112, + clock_gettime = 113, + clock_getres = 114, + clock_nanosleep = 115, syslog = 116, ptrace = 117, sched_setparam = 118, @@ -7123,7 +7561,7 @@ pub const Arc = enum(usize) { sched_yield = 124, sched_get_priority_max = 125, sched_get_priority_min = 126, - sched_rr_get_interval_time32 = 127, + sched_rr_get_interval = 127, restart_syscall = 128, kill = 129, tkill = 130, @@ -7133,7 +7571,7 @@ pub const Arc = enum(usize) { rt_sigaction = 134, rt_sigprocmask = 135, rt_sigpending = 136, - rt_sigtimedwait_time32 = 137, + rt_sigtimedwait = 137, rt_sigqueueinfo = 138, rt_sigreturn = 139, setpriority = 140, @@ -7167,7 +7605,7 @@ pub const Arc = enum(usize) { getcpu = 168, gettimeofday = 169, settimeofday = 170, - adjtimex_time32 = 171, + adjtimex = 171, getpid = 172, getppid = 173, getuid = 174, @@ -7178,8 +7616,8 @@ pub const Arc = enum(usize) { sysinfo = 179, mq_open = 180, mq_unlink = 181, - mq_timedsend_time32 = 182, - mq_timedreceive_time32 = 183, + mq_timedsend = 182, + mq_timedreceive = 183, mq_notify = 184, mq_getsetattr = 185, msgget = 186, @@ -7188,7 +7626,7 @@ pub const Arc = enum(usize) { msgsnd = 189, semget = 190, semctl = 191, - semtimedop_time32 = 192, + semtimedop = 192, semop = 193, shmget = 194, shmctl = 195, @@ -7239,14 +7677,16 @@ pub const Arc = enum(usize) { rt_tgsigqueueinfo = 240, perf_event_open = 241, accept4 = 242, - recvmmsg_time32 = 243, + recvmmsg = 243, + set_thread_area = 244, + cacheflush = 245, wait4 = 260, prlimit64 = 261, fanotify_init = 262, fanotify_mark = 263, name_to_handle_at = 264, open_by_handle_at = 265, - clock_adjtime32 = 266, + clock_adjtime = 266, syncfs = 267, setns = 268, sendmmsg = 269, @@ -7272,29 +7712,29 @@ pub const Arc = enum(usize) { pkey_alloc = 289, pkey_free = 290, statx = 291, - io_pgetevents_time32 = 292, + io_pgetevents = 292, rseq = 293, kexec_file_load = 294, - clock_gettime = 403, - clock_settime = 404, - clock_adjtime = 405, - clock_getres = 406, - clock_nanosleep = 407, - timer_gettime = 408, - timer_settime = 409, - timerfd_gettime = 410, - timerfd_settime = 411, - utimensat = 412, - pselect6 = 413, - ppoll = 414, - io_pgetevents = 416, - recvmmsg = 417, - mq_timedsend = 418, - mq_timedreceive = 419, - semtimedop = 420, - rt_sigtimedwait = 421, - futex = 422, - sched_rr_get_interval = 423, + clock_gettime64 = 403, + clock_settime64 = 404, + clock_adjtime64 = 405, + clock_getres_time64 = 406, + clock_nanosleep_time64 = 407, + timer_gettime64 = 408, + timer_settime64 = 409, + timerfd_gettime64 = 410, + timerfd_settime64 = 411, + utimensat_time64 = 412, + pselect6_time64 = 413, + ppoll_time64 = 414, + io_pgetevents_time64 = 416, + recvmmsg_time64 = 417, + mq_timedsend_time64 = 418, + mq_timedreceive_time64 = 419, + semtimedop_time64 = 420, + rt_sigtimedwait_time64 = 421, + futex_time64 = 422, + sched_rr_get_interval_time64 = 423, pidfd_send_signal = 424, io_uring_setup = 425, io_uring_enter = 426, @@ -7333,19 +7773,19 @@ pub const Arc = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, - cacheflush = (244 + 0), - arc_settls = (244 + 1), - arc_gettls = (244 + 2), - arc_usr_cmpxchg = (244 + 4), - sysfs = (244 + 3), + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; -pub const CSky = enum(usize) { +pub const Hexagon = enum(usize) { io_setup = 0, io_destroy = 1, io_submit = 2, io_cancel = 3, - io_getevents_time32 = 4, + io_getevents = 4, setxattr = 5, lsetxattr = 6, fsetxattr = 7, @@ -7379,6 +7819,7 @@ pub const CSky = enum(usize) { unlinkat = 35, symlinkat = 36, linkat = 37, + renameat = 38, umount2 = 39, mount = 40, pivot_root = 41, @@ -7412,8 +7853,8 @@ pub const CSky = enum(usize) { preadv = 69, pwritev = 70, sendfile64 = 71, - pselect6_time32 = 72, - ppoll_time32 = 73, + pselect6 = 72, + ppoll = 73, signalfd4 = 74, vmsplice = 75, splice = 76, @@ -7426,9 +7867,9 @@ pub const CSky = enum(usize) { fdatasync = 83, sync_file_range = 84, timerfd_create = 85, - timerfd_settime32 = 86, - timerfd_gettime32 = 87, - utimensat_time32 = 88, + timerfd_settime = 86, + timerfd_gettime = 87, + utimensat = 88, acct = 89, capget = 90, capset = 91, @@ -7438,24 +7879,24 @@ pub const CSky = enum(usize) { waitid = 95, set_tid_address = 96, unshare = 97, - futex_time32 = 98, + futex = 98, set_robust_list = 99, get_robust_list = 100, - nanosleep_time32 = 101, + nanosleep = 101, getitimer = 102, setitimer = 103, kexec_load = 104, init_module = 105, delete_module = 106, timer_create = 107, - timer_gettime32 = 108, + timer_gettime = 108, timer_getoverrun = 109, - timer_settime32 = 110, + timer_settime = 110, timer_delete = 111, - clock_settime32 = 112, - clock_gettime32 = 113, - clock_getres_time32 = 114, - clock_nanosleep_time32 = 115, + clock_settime = 112, + clock_gettime = 113, + clock_getres = 114, + clock_nanosleep = 115, syslog = 116, ptrace = 117, sched_setparam = 118, @@ -7467,7 +7908,7 @@ pub const CSky = enum(usize) { sched_yield = 124, sched_get_priority_max = 125, sched_get_priority_min = 126, - sched_rr_get_interval_time32 = 127, + sched_rr_get_interval = 127, restart_syscall = 128, kill = 129, tkill = 130, @@ -7477,7 +7918,7 @@ pub const CSky = enum(usize) { rt_sigaction = 134, rt_sigprocmask = 135, rt_sigpending = 136, - rt_sigtimedwait_time32 = 137, + rt_sigtimedwait = 137, rt_sigqueueinfo = 138, rt_sigreturn = 139, setpriority = 140, @@ -7511,7 +7952,7 @@ pub const CSky = enum(usize) { getcpu = 168, gettimeofday = 169, settimeofday = 170, - adjtimex_time32 = 171, + adjtimex = 171, getpid = 172, getppid = 173, getuid = 174, @@ -7522,8 +7963,8 @@ pub const CSky = enum(usize) { sysinfo = 179, mq_open = 180, mq_unlink = 181, - mq_timedsend_time32 = 182, - mq_timedreceive_time32 = 183, + mq_timedsend = 182, + mq_timedreceive = 183, mq_notify = 184, mq_getsetattr = 185, msgget = 186, @@ -7532,7 +7973,7 @@ pub const CSky = enum(usize) { msgsnd = 189, semget = 190, semctl = 191, - semtimedop_time32 = 192, + semtimedop = 192, semop = 193, shmget = 194, shmctl = 195, @@ -7583,14 +8024,14 @@ pub const CSky = enum(usize) { rt_tgsigqueueinfo = 240, perf_event_open = 241, accept4 = 242, - recvmmsg_time32 = 243, + recvmmsg = 243, wait4 = 260, prlimit64 = 261, fanotify_init = 262, fanotify_mark = 263, name_to_handle_at = 264, open_by_handle_at = 265, - clock_adjtime32 = 266, + clock_adjtime = 266, syncfs = 267, setns = 268, sendmmsg = 269, @@ -7616,29 +8057,29 @@ pub const CSky = enum(usize) { pkey_alloc = 289, pkey_free = 290, statx = 291, - io_pgetevents_time32 = 292, + io_pgetevents = 292, rseq = 293, kexec_file_load = 294, - clock_gettime = 403, - clock_settime = 404, - clock_adjtime = 405, - clock_getres = 406, - clock_nanosleep = 407, - timer_gettime = 408, - timer_settime = 409, - timerfd_gettime = 410, - timerfd_settime = 411, - utimensat = 412, - pselect6 = 413, - ppoll = 414, - io_pgetevents = 416, - recvmmsg = 417, - mq_timedsend = 418, - mq_timedreceive = 419, - semtimedop = 420, - rt_sigtimedwait = 421, - futex = 422, - sched_rr_get_interval = 423, + clock_gettime64 = 403, + clock_settime64 = 404, + clock_adjtime64 = 405, + clock_getres_time64 = 406, + clock_nanosleep_time64 = 407, + timer_gettime64 = 408, + timer_settime64 = 409, + timerfd_gettime64 = 410, + timerfd_settime64 = 411, + utimensat_time64 = 412, + pselect6_time64 = 413, + ppoll_time64 = 414, + io_pgetevents_time64 = 416, + recvmmsg_time64 = 417, + mq_timedsend_time64 = 418, + mq_timedreceive_time64 = 419, + semtimedop_time64 = 420, + rt_sigtimedwait_time64 = 421, + futex_time64 = 422, + sched_rr_get_interval_time64 = 423, pidfd_send_signal = 424, io_uring_setup = 425, io_uring_enter = 426, @@ -7677,16 +8118,19 @@ pub const CSky = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, - set_thread_area = (244 + 0), - cacheflush = (244 + 1), + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; -pub const Hexagon = enum(usize) { +pub const OpenRisc = enum(usize) { io_setup = 0, io_destroy = 1, io_submit = 2, io_cancel = 3, - io_getevents_time32 = 4, + io_getevents = 4, setxattr = 5, lsetxattr = 6, fsetxattr = 7, @@ -7754,8 +8198,8 @@ pub const Hexagon = enum(usize) { preadv = 69, pwritev = 70, sendfile64 = 71, - pselect6_time32 = 72, - ppoll_time32 = 73, + pselect6 = 72, + ppoll = 73, signalfd4 = 74, vmsplice = 75, splice = 76, @@ -7768,9 +8212,9 @@ pub const Hexagon = enum(usize) { fdatasync = 83, sync_file_range = 84, timerfd_create = 85, - timerfd_settime32 = 86, - timerfd_gettime32 = 87, - utimensat_time32 = 88, + timerfd_settime = 86, + timerfd_gettime = 87, + utimensat = 88, acct = 89, capget = 90, capset = 91, @@ -7780,24 +8224,24 @@ pub const Hexagon = enum(usize) { waitid = 95, set_tid_address = 96, unshare = 97, - futex_time32 = 98, + futex = 98, set_robust_list = 99, get_robust_list = 100, - nanosleep_time32 = 101, + nanosleep = 101, getitimer = 102, setitimer = 103, kexec_load = 104, init_module = 105, delete_module = 106, timer_create = 107, - timer_gettime32 = 108, + timer_gettime = 108, timer_getoverrun = 109, - timer_settime32 = 110, + timer_settime = 110, timer_delete = 111, - clock_settime32 = 112, - clock_gettime32 = 113, - clock_getres_time32 = 114, - clock_nanosleep_time32 = 115, + clock_settime = 112, + clock_gettime = 113, + clock_getres = 114, + clock_nanosleep = 115, syslog = 116, ptrace = 117, sched_setparam = 118, @@ -7809,7 +8253,7 @@ pub const Hexagon = enum(usize) { sched_yield = 124, sched_get_priority_max = 125, sched_get_priority_min = 126, - sched_rr_get_interval_time32 = 127, + sched_rr_get_interval = 127, restart_syscall = 128, kill = 129, tkill = 130, @@ -7819,7 +8263,7 @@ pub const Hexagon = enum(usize) { rt_sigaction = 134, rt_sigprocmask = 135, rt_sigpending = 136, - rt_sigtimedwait_time32 = 137, + rt_sigtimedwait = 137, rt_sigqueueinfo = 138, rt_sigreturn = 139, setpriority = 140, @@ -7853,7 +8297,7 @@ pub const Hexagon = enum(usize) { getcpu = 168, gettimeofday = 169, settimeofday = 170, - adjtimex_time32 = 171, + adjtimex = 171, getpid = 172, getppid = 173, getuid = 174, @@ -7864,8 +8308,8 @@ pub const Hexagon = enum(usize) { sysinfo = 179, mq_open = 180, mq_unlink = 181, - mq_timedsend_time32 = 182, - mq_timedreceive_time32 = 183, + mq_timedsend = 182, + mq_timedreceive = 183, mq_notify = 184, mq_getsetattr = 185, msgget = 186, @@ -7874,7 +8318,7 @@ pub const Hexagon = enum(usize) { msgsnd = 189, semget = 190, semctl = 191, - semtimedop_time32 = 192, + semtimedop = 192, semop = 193, shmget = 194, shmctl = 195, @@ -7925,14 +8369,15 @@ pub const Hexagon = enum(usize) { rt_tgsigqueueinfo = 240, perf_event_open = 241, accept4 = 242, - recvmmsg_time32 = 243, + recvmmsg = 243, + or1k_atomic = 244, wait4 = 260, prlimit64 = 261, fanotify_init = 262, fanotify_mark = 263, name_to_handle_at = 264, open_by_handle_at = 265, - clock_adjtime32 = 266, + clock_adjtime = 266, syncfs = 267, setns = 268, sendmmsg = 269, @@ -7958,29 +8403,29 @@ pub const Hexagon = enum(usize) { pkey_alloc = 289, pkey_free = 290, statx = 291, - io_pgetevents_time32 = 292, + io_pgetevents = 292, rseq = 293, kexec_file_load = 294, - clock_gettime = 403, - clock_settime = 404, - clock_adjtime = 405, - clock_getres = 406, - clock_nanosleep = 407, - timer_gettime = 408, - timer_settime = 409, - timerfd_gettime = 410, - timerfd_settime = 411, - utimensat = 412, - pselect6 = 413, - ppoll = 414, - io_pgetevents = 416, - recvmmsg = 417, - mq_timedsend = 418, - mq_timedreceive = 419, - semtimedop = 420, - rt_sigtimedwait = 421, - futex = 422, - sched_rr_get_interval = 423, + clock_gettime64 = 403, + clock_settime64 = 404, + clock_adjtime64 = 405, + clock_getres_time64 = 406, + clock_nanosleep_time64 = 407, + timer_gettime64 = 408, + timer_settime64 = 409, + timerfd_gettime64 = 410, + timerfd_settime64 = 411, + utimensat_time64 = 412, + pselect6_time64 = 413, + ppoll_time64 = 414, + io_pgetevents_time64 = 416, + recvmmsg_time64 = 417, + mq_timedsend_time64 = 418, + mq_timedreceive_time64 = 419, + semtimedop_time64 = 420, + rt_sigtimedwait_time64 = 421, + futex_time64 = 422, + sched_rr_get_interval_time64 = 423, pidfd_send_signal = 424, io_uring_setup = 425, io_uring_enter = 426, @@ -7992,6 +8437,7 @@ pub const Hexagon = enum(usize) { fsmount = 432, fspick = 433, pidfd_open = 434, + clone3 = 435, close_range = 436, openat2 = 437, pidfd_getfd = 438, @@ -8018,4 +8464,9 @@ pub const Hexagon = enum(usize) { lsm_set_self_attr = 460, lsm_list_modules = 461, mseal = 462, + setxattrat = 463, + getxattrat = 464, + listxattrat = 465, + removexattrat = 466, + open_tree_attr = 467, }; From 6080f2d5eaf4eee89fe86b5dc014d50f609df466 Mon Sep 17 00:00:00 2001 From: Stephen Gregoratto Date: Thu, 7 Aug 2025 18:00:26 +1000 Subject: [PATCH 3/3] Linux: Use time64 syscalls when available Newer 32-bit Linux targets like 32-bit RISC-V only use the 64-bit time ABI, with these syscalls having `time64` as their suffix. This is a stopgap solution in favor of a full audit of `std.os.linux` to prepare for #4726. See also #21440 for prior art. --- lib/std/os/linux.zig | 101 ++++++++++++++++++++++++++++++++----------- 1 file changed, 76 insertions(+), 25 deletions(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 6cb325a5ea95..eb9b98e6c5e8 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -644,7 +644,13 @@ pub fn futimens(fd: i32, times: ?*const [2]timespec) usize { } pub fn utimensat(dirfd: i32, path: ?[*:0]const u8, times: ?*const [2]timespec, flags: u32) usize { - return syscall4(.utimensat, @as(usize, @bitCast(@as(isize, dirfd))), @intFromPtr(path), @intFromPtr(times), flags); + return syscall4( + if (@hasField(SYS, "utimensat")) .utimensat else .utimensat_time64, + @as(usize, @bitCast(@as(isize, dirfd))), + @intFromPtr(path), + @intFromPtr(times), + flags, + ); } pub fn fallocate(fd: i32, mode: i32, offset: i64, length: i64) usize { @@ -686,19 +692,38 @@ pub const futex_param4 = extern union { /// The futex_op parameter is a sub-command and flags. The sub-command /// defines which of the subsequent paramters are relevant. pub fn futex(uaddr: *const anyopaque, futex_op: FUTEX_OP, val: u32, val2timeout: futex_param4, uaddr2: ?*const anyopaque, val3: u32) usize { - return syscall6(.futex, @intFromPtr(uaddr), @as(u32, @bitCast(futex_op)), val, @intFromPtr(val2timeout.timeout), @intFromPtr(uaddr2), val3); + return syscall6( + if (@hasField(SYS, "futex")) .futex else .futex_time64, + @intFromPtr(uaddr), + @as(u32, @bitCast(futex_op)), + val, + @intFromPtr(val2timeout.timeout), + @intFromPtr(uaddr2), + val3, + ); } /// Three-argument variation of the v1 futex call. Only suitable for a /// futex_op that ignores the remaining arguments (e.g., FUTUX_OP.WAKE). pub fn futex_3arg(uaddr: *const anyopaque, futex_op: FUTEX_OP, val: u32) usize { - return syscall3(.futex, @intFromPtr(uaddr), @as(u32, @bitCast(futex_op)), val); + return syscall3( + if (@hasField(SYS, "futex")) .futex else .futex_time64, + @intFromPtr(uaddr), + @as(u32, @bitCast(futex_op)), + val, + ); } /// Four-argument variation on the v1 futex call. Only suitable for /// futex_op that ignores the remaining arguments (e.g., FUTEX_OP.WAIT). pub fn futex_4arg(uaddr: *const anyopaque, futex_op: FUTEX_OP, val: u32, timeout: ?*const timespec) usize { - return syscall4(.futex, @intFromPtr(uaddr), @as(u32, @bitCast(futex_op)), val, @intFromPtr(timeout)); + return syscall4( + if (@hasField(SYS, "futex")) .futex else .futex_time64, + @intFromPtr(uaddr), + @as(u32, @bitCast(futex_op)), + val, + @intFromPtr(timeout), + ); } /// Given an array of `futex2_waitone`, wait on each uaddr. @@ -1054,28 +1079,32 @@ pub fn munlockall() usize { } pub fn poll(fds: [*]pollfd, n: nfds_t, timeout: i32) usize { - if (@hasField(SYS, "poll")) { - return syscall3(.poll, @intFromPtr(fds), n, @as(u32, @bitCast(timeout))); - } else { - return syscall5( - .ppoll, - @intFromPtr(fds), + return if (@hasField(SYS, "poll")) + return syscall3(.poll, @intFromPtr(fds), n, @as(u32, @bitCast(timeout))) + else + ppoll( + fds, n, - @intFromPtr(if (timeout >= 0) - ×pec{ + if (timeout >= 0) + @constCast(×pec{ .sec = @divTrunc(timeout, 1000), .nsec = @rem(timeout, 1000) * 1000000, - } + }) else - null), - 0, - NSIG / 8, + null, + null, ); - } } pub fn ppoll(fds: [*]pollfd, n: nfds_t, timeout: ?*timespec, sigmask: ?*const sigset_t) usize { - return syscall5(.ppoll, @intFromPtr(fds), n, @intFromPtr(timeout), @intFromPtr(sigmask), NSIG / 8); + return syscall5( + if (@hasField(SYS, "ppoll")) .ppoll else .ppoll_time64, + @intFromPtr(fds), + n, + @intFromPtr(timeout), + @intFromPtr(sigmask), + NSIG / 8, + ); } pub fn read(fd: i32, buf: [*]u8, count: usize) usize { @@ -1599,7 +1628,11 @@ pub fn clock_gettime(clk_id: clockid_t, tp: *timespec) usize { } } } - return syscall2(.clock_gettime, @intFromEnum(clk_id), @intFromPtr(tp)); + return syscall2( + if (@hasField(SYS, "clock_gettime")) .clock_gettime else .clock_gettime64, + @intFromEnum(clk_id), + @intFromPtr(tp), + ); } fn init_vdso_clock_gettime(clk: clockid_t, ts: *timespec) callconv(.c) usize { @@ -1613,16 +1646,24 @@ fn init_vdso_clock_gettime(clk: clockid_t, ts: *timespec) callconv(.c) usize { } pub fn clock_getres(clk_id: i32, tp: *timespec) usize { - return syscall2(.clock_getres, @as(usize, @bitCast(@as(isize, clk_id))), @intFromPtr(tp)); + return syscall2( + if (@hasField(SYS, "clock_getres")) .clock_getres else .clock_getres_time64, + @as(usize, @bitCast(@as(isize, clk_id))), + @intFromPtr(tp), + ); } pub fn clock_settime(clk_id: i32, tp: *const timespec) usize { - return syscall2(.clock_settime, @as(usize, @bitCast(@as(isize, clk_id))), @intFromPtr(tp)); + return syscall2( + if (@hasField(SYS, "clock_settime")) .clock_settime else .clock_settime64, + @as(usize, @bitCast(@as(isize, clk_id))), + @intFromPtr(tp), + ); } pub fn clock_nanosleep(clockid: clockid_t, flags: TIMER, request: *const timespec, remain: ?*timespec) usize { return syscall4( - .clock_nanosleep, + if (@hasField(SYS, "clock_nanosleep")) .clock_nanosleep else .clock_nanosleep_time64, @intFromEnum(clockid), @as(u32, @bitCast(flags)), @intFromPtr(request), @@ -2021,7 +2062,7 @@ pub fn recvmsg(fd: i32, msg: *msghdr, flags: u32) usize { pub fn recvmmsg(fd: i32, msgvec: ?[*]mmsghdr, vlen: u32, flags: u32, timeout: ?*timespec) usize { return syscall5( - .recvmmsg, + if (@hasField(SYS, "recvmmsg")) .recvmmsg else .recvmmsg_time64, @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(msgvec), vlen, @@ -2370,11 +2411,21 @@ pub const itimerspec = extern struct { }; pub fn timerfd_gettime(fd: i32, curr_value: *itimerspec) usize { - return syscall2(.timerfd_gettime, @bitCast(@as(isize, fd)), @intFromPtr(curr_value)); + return syscall2( + if (@hasField(SYS, "timerfd_gettime")) .timerfd_gettime else .timerfd_gettime64, + @bitCast(@as(isize, fd)), + @intFromPtr(curr_value), + ); } pub fn timerfd_settime(fd: i32, flags: TFD.TIMER, new_value: *const itimerspec, old_value: ?*itimerspec) usize { - return syscall4(.timerfd_settime, @bitCast(@as(isize, fd)), @as(u32, @bitCast(flags)), @intFromPtr(new_value), @intFromPtr(old_value)); + return syscall4( + if (@hasField(SYS, "timerfd_settime")) .timerfd_settime else .timerfd_settime64, + @bitCast(@as(isize, fd)), + @as(u32, @bitCast(flags)), + @intFromPtr(new_value), + @intFromPtr(old_value), + ); } // Flags for the 'setitimer' system call