summaryrefslogtreecommitdiff
path: root/components/lwp/lwp_syscall.c
AgeCommit message (Collapse)Author
2024-05-31[smart] fixup of script execution (#9009)Shell
This patch fixup the script execution capabilities on argv passing and adds support for arguments larger than 4k. According to POSIX, the script parameter is quiet different from the current implementation. Especially on the way it inserts the path of executables. At the end, when you execute a script from `$PATH`, it always fails. For the script, interpreter will be invoked with the following arguments: `{interpreter [optional-arg] pathname arg...}` where pathname is the pathname of the file specified as the first argument of execve(), and arg... is the series of words pointed to by the argv argument of execve(), starting at argv[1]. Note that there is no way to get the argv[0] that was passed to the execve() call. The changes include: - Separating argument, environment variable, and auxiliary vector processing into a new lwp_args.c file. - Fixing bugs in script argument processing and supporting arguments larger than 4k. - Updating lwp_execve to use the new argscopy function and removing the old lwp_argscopy function. - Making various modifications to lwp_load and elf_aux_fill to work with the new argument processing. - Removing unnecessary code related to dynamic loading and interpreter scripts. Signed-off-by: Shell <[email protected]>
2024-05-29[smart] fixup errno passing on sys_mkdir() (#9007)Shell
Use _SYS_WRAP to fetch errno on return of mkdir to avoiding overriding of it on other system APIs. Signed-off-by: Shell <[email protected]>
2024-05-29[smart] update sched_setaffinity() to use thread(task) ID (#9004)Shell
Correct `sched_setaffinity()` to use the thread IDs (TIDs) instead of process IDs (PIDs). The previous implementation used PIDs, which caused issues since affinity settings need to be applied at the thread level. As the manual documented, the signature is: > int sched_setaffinity(pid_t pid, size_t cpusetsize, > const cpu_set_t *mask); Yes, it's tricky, the identification passing in is called **'PID'**. But when we talk about 'pid' from GNU libc, it's the **'task-id'**, aka, `thread->tid` known in kernel. Changes were made by updating the function signatures and logic in `lwp.h`, `lwp_pid.c`, and `lwp_syscall.c` to accept TIDs. Specifically, the `lwp_setaffinity` function and related internal functions now operate using thread IDs and adjust thread affinity settings accordingly Signed-off-by: Shell <[email protected]>
2024-04-25fix sys_getcwd (#8852)xiao-mang
2024-03-30[fixup] aarch64 UMP compiler error (#8677)Shell
Signed-off-by: Shell <[email protected]>
2024-03-28sync smart & dfs (#8672)Shell
Signed-off-by: xqyjlj <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-02-23🎯 Sync smart & scheduler codes (#8537)Shell
Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-01-26[sys_bind] [signalfd] update (#8507)rcitachi
2023-12-16dfsv2 code tidy. (#8374)geniusgogo
2023-12-06Updated issues related to uds capacity and eventfd macro redefinition (#8329)zmq810150896
2023-12-02[AF_UNIX] Update AF_UNIX bind, connect entry (#8314)rcitachi
2023-11-29修复 #8293 问题 (#8307)rcitachi
2023-11-28fix dfs path name overflow. (#8305)geniusgogo
2023-11-28[SAL] Update SAL,Add socketpair sendmsg recvmsg function (#8293)rcitachi
2023-11-02🐞 fix: fix taskset (#8211)xqyjlj
2023-11-02[smart] fixup of lwp recycling and mm varea (#8206)Shell
Signed-off-by: shell <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2023-10-25🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)xqyjlj
Signed-off-by: Shell <[email protected]> Co-authored-by: Shell <[email protected]>
2023-10-25[smart] replace varea pgmgr and fixup of dfs mmap (#8184)Shell
Signed-off-by: shell <[email protected]> Signed-off-by: Shell <[email protected]>
2023-10-17Sync dfs lwp (#8123)geniusgogo
2023-10-14[smart] fixup: syscall.c (#8131)Shell
Signed-off-by: shell <[email protected]>
2023-10-14[smart] Replace irq disable/enable codes in futex (#7941)Shell
Signed-off-by: Shell <[email protected]>
2023-10-13add sys_utimensat (#8124)xiao-mang
2023-10-11[smart] split out part of lwp_new() to lwp_create()Shell
Prev implementation of lwp_new() including the create of lwp object and the pid allocation. But not every lwp object need a pid. So this patch split out the business of lwp_new() to improve the maintainability. Signed-off-by: Shell <[email protected]>
2023-10-08add sys_setitimer syscall (#8096)skychen123
2023-09-23Add the system call timerfd and update SConscript for signalfd (#8067)zmq810150896
2023-09-23[smart] Updated the API for kernel access to user address issues and for ↵zmq810150896
calculating string length (#8058)
2023-09-15[smart] fix rt_memcpy to lwp_memcpy in smart source (#8033)Shell
2023-09-11Add the system call signalfd (#8001)zmq810150896
2023-09-09[smart/syscall] fix exit(2) and add exit_group(2) (#8005)Shell
Signed-off-by: shell <[email protected]> Signed-off-by: shell <[email protected]> Signed-off-by: Shell <[email protected]>
2023-09-06[rtdef] rename RT_CTASSERT to RT_STATIC_ASSERTMeco Man
2023-08-30[smart][fix] lwp fork with data copyxyz
2023-08-16[components/mm] add unmap page API (#7834)Shell
Signed-off-by: Shell <[email protected]>
2023-08-07update components & lwp. (#7888)geniusgogo
2023-08-03[smart] Fix bugs on lwp kill (#7892)Shell
Signed-off-by: Shell <[email protected]>
2023-08-01Add the system call epoll (#7893)zmq810150896
2023-07-27Add the system call eventfd (#7835)zmq810150896
2023-07-27[syscall][socket]fix socket addr bug (#7876)Tennn11
2023-07-25[smart] fix the setup of fake lwp in sys_execve (#7855)Shell
2023-07-20[component/lwp] support more feature of signal from IEEE Std 1003.1-2017 (#7828)Shell
Signed-off-by: Shell <[email protected]>
2023-07-03execute elf add executable permissions check. (#7769)geniusgogo
2023-06-10[dfs] Add DFS v2.0 (#7606)Bernard Xiong
2023-05-23add lstat&sysinfo....syscall. (#7555)geniusgogo
2023-05-17[component] add sys_mount and umount2 (#7516)xiao-mang
2023-05-15[component] add openat syscall. (#7488)geniusgogo
2023-05-05[components][posix] 完善 posix 接口消息队列 (#7395)zhkag
2023-04-28fix lwp _load_script. (#7405)geniusgogo
2023-04-26[syscall] lwp_syscall 中 rt_err_t 改为 sysret_t (#7374)zhkag
2023-04-26fork子进程时,lwp_struct_copy函数增加拷贝working_directory功能 ↵xiao-mang
(#7380)
2023-04-22[components/mm] support for scalable memory management (#7277)Shell
* [mm/page] multi-list page manager [mm/page] page debugger [libcpu/aarch64] hugepage support * [quality] remove void-arith * [format] remove kasan codes
2023-04-08[DFS] prepare for dfs_v2.0 (#7200)Bernard Xiong
* [DFS] prepare for dfs_v2. dfs_fd -> dfs_file; dfs_fnode -> dfs_vnode. * [BSP] fix code analysis warning * [smart] fix the pointer overflow. * code format * [smart] fix the lwp->lwp_obj checking.