Uh oh!
There was an error while loading. Please reload this page.
Rewrite Linux syscalls generation - #24702
Conversation
Uh oh!
There was an error while loading. Please reload this page.
2edf0e8 to
3157f22CompareI've modified the tool again to consolidate all the logic into one table and restored the order of the emitted variables for easier diffing. This should fix the |
29ee317 to
89a1d94CompareUh oh!
There was an error while loading. Please reload this page.
rootbeer
left a comment
There was a problem hiding this comment.
A couple minor comments after looking this over again. The core of the change looks great, and the code seems much simpler now.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f707ada to
7f49b6cComparealexrp
commented
Aug 9, 2025
Failures look to be #24754. |
d2bfd3d to
66af692CompareThe-King-of-Toasters
commented
Aug 12, 2025
Fixing the merge conflict, but FYI the CI is all green. |
66af692 to
1d68ccdCompare
rootbeer
left a comment
There was a problem hiding this comment.
Something I just noticed while looking at this again. Not something to hold up any merges for.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
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 ziglang#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.
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 ziglang#4726. See also ziglang#21440 for prior art.
1d68ccd to
6080f2dCompareThe-King-of-Toasters
commented
Aug 15, 2025
Any more changes needed or does it lgtm? |
alexrp
commented
Aug 15, 2025
Looks good, thanks! |
Uh oh!
There was an error while loading. Please reload this page.
Reloaded version of #21440 post writergate. Original description below:
Changes by Arnd Bergmann have migrated all supported architectures to use a table for their syscall lists. This removes the need of calling a C pre-processor and simplifies the logic dramatically.
The side effect is the number of names changed on targets that use the "generic" table. That list (located under scripts/syscall.tbl) adds the _time64 suffix to syscalls taking a timespec64 on 32-bit targets. Similarly, the _time32 suffix has been removed.
The result is a lot of breakage in our Linux wrappers, which makes me worried that the logic for determining the proper timespec to use was subtly broken all this time. Should be a good chance to finish #4726 - we only have
1412 years after all...CC @alexrp if things break.