summaryrefslogtreecommitdiff
path: root/components/lwp
AgeCommit message (Collapse)Author
2024-09-11[components][lwp]remove extra check in sys_bindzms123456
2024-09-01fixup: ptyfs: CI reported snprintf type issuesShell
2024-08-25【修复】修复link系统调用返回值问题zhuzhuzhu
2024-08-25【修复】修复rmdir系统调用返回值不符合用户预期问题zhuzhuzhu
2024-08-25【修复】修复symlink系统调用返回值不是预期问题zhuzhuzhu
2024-08-24fixup: uninitialized argument vector elementShell
This patch addresses the potential issue of uninitialized elements in the argument vector returned by `lwp_get_command_line_args()`. The previous implementation could leave `argv` in an inconsistent state if certain errors occurred, leading to possible undefined behavior. Changes: - Replaced `rt_malloc()` with `rt_calloc()` to ensure `argv` is properly initialized. - Added a consistent error handling path using `goto error_exit` to handle memory allocation failures and string copy errors. - Ensured `lwp_free_command_line_args()` is called before returning on error, preventing potential memory leaks. Signed-off-by: Shell <[email protected]>
2024-08-24fix_return_errzhujiale
2024-08-22[lwp] Implementation of setpgrp and fix mmap2 problems (#9308)rcitachi
* mmap2 failure handling 当传入一个非常大的地址时,offset会计算得到一个值,又因为传入的地址错误,rc会得到错误码,结合offset会得到一个很奇怪的值。 * Implementation of setpgrp 执行setpgrp会走到这一步,在执行getpgrp无法得到创建的group的值 * Modify the return method of mmap
2024-08-22[lwp][tid]add error log when tid depleted, and return correct errno when ↵zms123456
clone failed (#9327) add error log when tid depleted, and return correct errno when clone failed
2024-08-22[components][lwp]fix mount param issue (#9333)zms123456
fix mount param issue
2024-07-29fixup: compiler warning on cvitek risc-v cause by unsupport vDSO on rv64Shell
Signed-off-by: Shell <[email protected]>
2024-07-24Merge pull request #9212 from polarvid/shell/opt-gctxBernard Xiong
[libcpu] trimming ARM64 general context
2024-07-18[libcpu/arm64] feat: Trimming General ContextShell
This patch focuses on the ARM64 general context handling code. The modifications are aimed at enhancing performance by simplifying context save/restore operations. Changes include: - Adjusted stack alignment in `arch_set_thread_context` function. - Updated `lwp_gcc.S` to reset frame pointer and link register. - Refined `rt_hw_backtrace_frame_unwind` to handle user space address checks. - Added `GET_THREAD_SELF` macro in `asm-generic.h`. - Simplified context saving/restoring in `context_gcc.h` and related files. - Optimized `rt_hw_context_switch_interrupt` and related assembly routines. Signed-off-by: Shell <[email protected]>
2024-07-18fix exec and mount error codezhao maosheng
2024-07-16[smart] feat: add unmap for null mapper (#9186)Shell
Do unmap before shrink so we don't see mapped entry on page table insertion, which is not acceptable for riscv implementation of architecture porting. Changes: - add un-mapping of pte on `_null_shrink()` Signed-off-by: Shell <[email protected]>
2024-07-15[lwp][vdso] Add VDSO functionality under the aarch64 architecture (#9176)rcitachi
Add VDSO functionality under the aarch64 architecture
2024-06-28[format] cleanup libcpu/aarch64 (#8950)Shell
* [dfs] fixup compiler warning Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: separate context switching codes Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: separate vector Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: separate context_gcc.S Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: moving headers to include directory Signed-off-by: Shell <[email protected]> * style: replace tab with space --------- Signed-off-by: Shell <[email protected]>
2024-06-24[rv]修正signal退出后用户态sp少8的问题 (#9080)heyuanjie87
2024-06-22[smart] add mprotect config (#9082)Shell
Signed-off-by: Shell <[email protected]>
2024-06-21[rv]信号处理进入用户态前恢复gp (#9072)heyuanjie87
* [rv/virt/stackframe.h]添加GP寄存器保存偏移量宏 * 【rv/c906/stackframe.h]定义GP寄存器存储偏移量 * [rv]信号处理切换到用户态前恢复gp
2024-06-20除了bsp之外的Kconfig使用rsource替代sourcelatercomer
2024-06-18[libcpu] rv64: support for ARCH_REMAP_KERNEL (#9067)Shell
* [libcpu] support for ARCH_REMAP_KERNEL These changes introduce support for the ARCH_REMAP_KERNEL configuration, which isolates kernel space in high virtual address regions. This feature is necessary to enhance memory protection and management by segregating user and kernel spaces more effectively. Changes: - Updated conditional macros to check for ARCH_REMAP_KERNEL instead of ARCH_KERNEL_IN_HIGH_VA in board initialization files to reflect the new configuration option. - Modified qemu-virt64-riscv Kconfig and SConstruct files to include and utilize ARCH_REMAP_KERNEL. - Created a new linker script `link_smart.lds` for smart linking in qemu-virt64-riscv. - Updated rtconfig.py to use a more flexible execution path setup. - Enhanced user address space definitions in `lwp_arch.h` to support the new virtual address mappings. - Adjusted kernel memory initialization and mapping logic in `c906/mmu.c` and `virt64/mmu.c` to account for high virtual address regions. - Added Kconfig option to enable ARCH_REMAP_KERNEL for RISCV64 architectures. - Enhanced memory setup functions to support new mapping scheme, including updates to early page table setup and address relocation logic. These modifications ensure that the system can utilize high memory addresses for the kernel, improving memory isolation and system stability. Signed-off-by: Shell <[email protected]> * fixup: CI run failed * bsp: default config without using smart * fixup: static checks * restore rt_hw_mmu_kernel_map_init for D1 --------- Signed-off-by: Shell <[email protected]>
2024-06-07[mm] precise & readable mm fault type (#9047)Shell
* [smart] fixup: precise mm fault type Also, fixup arm64 read access fault * arm64: using meaningful macro on trap * fixup: renaming macro
2024-06-04[smart] add CPU/thread usage tracing config (#8947)Shell
* [smart] add CPU usage tracing config This patch introduces following features: - Added CPU usage tracing functionality, enabled by default, for applications like 'top' - update time as smart independent Signed-off-by: Shell <[email protected]> * fixup: add ump idle thread --------- Signed-off-by: Shell <[email protected]>
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-31[lwp]list_process can print tid (#8991)rcitachi
* list_process can print tid * fix-ci * update list_process * Update lwp_pid.c
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-05-29[lwp/riscv]进入libc前初始化用户态sp (#8997)heyuanjie87
2024-05-28[smart] add FIONREAD ioctl support for tty (#8996)Shell
Signed-off-by: Shell <[email protected]>
2024-05-26[libcpu] arm: fixup signal handling (#8988)Shell
Signed-off-by: Shell <[email protected]>
2024-05-26[libcpu] discard rt_current_thread (#8976)Shell
* [libcpu] rv64: discard rt_current_thread * arm: using rt_thread_self to fetch current TCB
2024-05-21[quality] fixup compiler warning (#8961)Shell
Signed-off-by: Shell <[email protected]>
2024-05-17[smart] select console device dynamically (#8949)Shell
* [smart] select console device dynamically - Fixed compiler warning on terminal subsystem for `components/lwp/terminal/terminal.h` - Updated default console setup to dynamically select an appropriate tty device based on the configured console device name. Signed-off-by: Shell <[email protected]> * fixup: remove useless codes --------- Signed-off-by: Shell <[email protected]>
2024-05-10[smart] fixup arm64 aspace switch (#8925)Shell
* [smart] fixup arm64 aspace switch Signed-off-by: Shell <[email protected]> * fixup: arm add arch_kernel_mmu_table_get --------- Signed-off-by: Shell <[email protected]>
2024-04-29fix baudrate error (#8873)xiao-mang
* fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error
2024-04-25fix sys_getcwd (#8852)xiao-mang
2024-04-15[smart] fixup devfs porting layer of terminal (#8797)Shell
Signed-off-by: Shell <[email protected]>
2024-04-09[drivers/serial] Introduce hooker for TTY (#8733)Shell
In this patch, a hook list has been introduced to address the concerns regarding coupling issues arising from modifications to the serial code for integrating TTY logic. Signed-off-by: Shell <[email protected]>
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-02-20[ci] open ci check with function declaration warning (#8546)Yuqiang Wang
2024-02-20[ci] fix errors under strick compiling modeMeco Man
2024-01-26[sys_bind] [signalfd] update (#8507)rcitachi
2024-01-02[kernel] Add hook for malloc servicesShell
Including the patch for memory allocation, testsuites and fixups of static analysis. Signed-off-by: Shell <[email protected]>
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