forked from cmatthew/Lind-GlibC
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix shmctl error return #78
Merged
Merged
Conversation
This file contains 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
A breif note, I checked the normal glibc code where if the buf is null, it still return the call to shmctl syscall using buf as an parameter, this means if buf is null, it will eventually return an error. So, yeah, I think this modification makes sense, and is in align with original glibc. |
RusherRG
approved these changes
Oct 19, 2023
rennergade
added a commit
that referenced
this pull request
Feb 27, 2024
* adding fchmod to glibc (#62) Co-authored-by: lind <lind@nyu.edu> * Libc xid faking (#63) * umask all * umask all * umask all * umask all * umask all * umask all * chown * setgid/uid * setuid test * setuid test * setuid test * setuid test * setuid test * setuid test * setuid test * comments * comments * comments * Removed unused lind_lock stuff, made mutex impl more sane (#64) * Removed unused lind_lock stuff, made mutex impl more sane * Added space between if and parens * Added in truncate and ftruncate system calls (#65) * Added Mknod and Fchdir (#68) Co-authored-by: lind <lind@nyu.edu> * Removing mknod syscall (#70) * Added Mknod and Fchdir * Remove mknod Syscall --------- Co-authored-by: lind <lind@nyu.edu> * fix errno link/unlink/poll (#71) * fix errno link/unlink/poll * fix errno open * fix errno open * fix errno open * Fixed libc errno returns (#72) * fix socket/bind/listen/connect/send/sendto/recv * fix renmae/mkdir/rmdir/close/fstatfs/statfs/access/truncate/ftruncate * fix stat/fstat/lstat/rmdir * Fix libc errno returns (#74) * fix epoll_ctl/epoll_create/epoll_wait * fix epoll * fix epoll * fix gpn * fix getpeer/getsockname/get-setsockopt * fix sendto/shutdown * Fix libc errno returns (#75) * fix read/write/pread/pwrite/seek * fix write * fix getifaddrs * Semaphores (#76) * attempt irt.h * add sempost * add sempost * add sempost * add other signatures * add other signatures * add other signatures * add semwait seminit * add other semfuncs * add other semfuncs * add other semfuncs * add irt.h * add irt.h * add irt.h * add irt.h * add irt.h * add irt.h * add irt.h * add irt.h * add irt.h * add irt.h * add irt.h * Lseek revert (#77) * revert lseek * revert lseek * Fix shmctl error return (#78) * add ptr check IPC_STAT * check nacl_buf * check nacl_buf * check nacl_buf * check nacl_buf * check nacl_buf * Fix libc errno returns (#79) * update shmdt/shmctl/munmap/mprotect * Remove blank file * Adding fdatasync and fsync system calls (#81) * Adding fsync * Adding fdatasync --------- Co-authored-by: lind <lind@nyu.edu> * Adding sync_file_range Syscall (#82) * Adding fsync * Adding fdatasync * Adding sync_file_range * Change as an off_t * Necessary changes for sync_file_range * Update sysdep.h * Update sysdep.h * Update irt_syscalls.c --------- Co-authored-by: lind <lind@nyu.edu> * Signals (#80) * [WIP]Add sigaction syscall * Fix weak alias in sigaction.c * Remove stub warning * Fix errno * Add kill syscall * Fix weak alias * Convert struct sigaction to struct nacl_abi_sigaction * Cast sa_handler to and from uint32_t * Add sigprocmask syscall * Ensure to cover every signal during conversions between sigset_t and uint64_t * Disallow blocking SIGKILL and SIGSTOP and add comments * [WIP]Make sigset in sigaction struct uint64_t(BUGGY) * Include nacl_sigprocmask.h in sigaction.c * Combine nacl_sigprocmask.h and nacl_sigaction.h into nacl_signal.h * Move the definitions of functions converting between sigset_t and uint64_t to sigaction.c * Convert nacl_oact back to oact only after success result * Add alarm syscall * Add lindsetitimer * Remove redundant code for alarm * Uncomment stub warning * Add Sigprocmask Syscall (#66) * Add sigprocmask syscall * Ensure to cover every signal during conversions between sigset_t and uint64_t * Disallow blocking SIGKILL and SIGSTOP and add comments * [WIP]Make sigset in sigaction struct uint64_t(BUGGY) * Include nacl_sigprocmask.h in sigaction.c * Combine nacl_sigprocmask.h and nacl_sigaction.h into nacl_signal.h * Move the definitions of functions converting between sigset_t and uint64_t to sigaction.c * Convert nacl_oact back to oact only after success result * Added entry for signal dispatch * merge sigalrm * merge sigalrm * fix poll errno * fix define comments --------- Co-authored-by: lind <lind@nyu.edu> Co-authored-by: Tian(Maxwell) Yang <maxwell_yang@outlook.com> Co-authored-by: Tian Yang <31149339+AlpacaMax@users.noreply.github.com> Co-authored-by: jesings <34111484+jesings@users.noreply.github.com> --------- Co-authored-by: Justin Koe <100324413+justyoyo123@users.noreply.github.com> Co-authored-by: lind <lind@nyu.edu> Co-authored-by: jesings <34111484+jesings@users.noreply.github.com> Co-authored-by: kuzeyardabulut <54737933+kuzeyardabulut@users.noreply.github.com> Co-authored-by: Alice W <40227173+Yaxuan-w@users.noreply.github.com> Co-authored-by: Tian(Maxwell) Yang <maxwell_yang@outlook.com> Co-authored-by: Tian Yang <31149339+AlpacaMax@users.noreply.github.com>
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.
Description
Fixes #317
Type of change
As
cmd
is set toIPC_STAT
,shmctl
should return errno=EFAULT when the address pointed to bybuf
isn't accessible.Before modification, lind will display
*** signal 11...
, and after repair, it will return to err=14 normally.How Has This Been Tested?
Run
/lind/lind_project/tests/testcases/testshmctl.c
Checklist: