Fix aarch64 syscall numbers for inotify_add_watch and inotify_rm_watch#1492
Open
igravious wants to merge 1 commit into
Open
Fix aarch64 syscall numbers for inotify_add_watch and inotify_rm_watch#1492igravious wants to merge 1 commit into
igravious wants to merge 1 commit into
Conversation
The aarch64 Linux syscall numbers were incorrectly set to 4095 (placeholder) instead of the correct values: - inotify_add_watch: 27 (was 4095) - inotify_rm_watch: 28 (was 4095) These syscalls have been supported on aarch64 Linux since the architecture was introduced. The inotify_init1 syscall already had the correct value (26), confirming this was an oversight during the initial aarch64 port. Verified against Linux kernel syscall tables: - https://gpages.juszkiewicz.com.pl/syscalls-table/syscalls.html - https://arm64.syscall.sh/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix incorrect aarch64 Linux syscall numbers for
inotify_add_watchandinotify_rm_watch. These were set to the placeholder value4095instead of the correct Linux syscall numbers27and28.Problem
On aarch64 Linux, calling
inotify_add_watch()orinotify_rm_watch()would fail because the syscall numbers were incorrectly set to4095(placeholder for "not implemented") instead of the actual Linux syscall numbers.The Fix
Changed the
arm_linuxparameter in the.scallmacro from4095to the correct values:inotify_add_watch:4095→27(0x1b)inotify_rm_watch:4095→28(0x1c)Also updated the
.sysconconstants in__NR_inotify_*.Sto match.Verification
Verified against official Linux kernel syscall tables:
include/uapi/asm-generic/unistd.hinotify_init1already had the correct value (26), confirming this was an oversight, not intentionalFiles Changed
libc/sysv/calls/sys_inotify_add_watch.Slibc/sysv/calls/sys_inotify_rm_watch.Slibc/sysv/consts/__NR_inotify_add_watch.Slibc/sysv/consts/__NR_inotify_rm_watch.S