summaryrefslogtreecommitdiff
path: root/components/lwp
AgeCommit message (Collapse)Author
2025-10-20Fix comment for address_search_head field of lwp structure.ligr
2025-10-20Align annotations of struct fields.ligr
2025-10-20fix structure comments according to doxygen spec.ligr
2025-10-20[components/lwp]add doxygen comment for lwp.c with lwp.h.ligr
2025-10-04[components/lwp]add doxygen comment for lwp futex. (#10763)Guorui Li
2025-09-26[components/lwp]add doxygen comment for lwp_dbg.c.ligr
2025-09-25[components/lwp]add doxygen comment for lwp avl implementation.ligr
2025-09-24[components/lwp]add doxygen comment for lwp_tid.ligr
2025-09-24RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead ↵Yonggang Luo
int/rt_int32_t
2025-09-19[components/lwp]add doxygen comment for lwp_pid. #10702Guorui Li
2025-09-14[components/lwp]add doxygen comment for lwp_args. (#10696)Guorui Li
2025-07-23[lwp][rv64] riscv: fix potential signal handler infinite loopYulong Wang
2025-07-23[lwp][rv64] restore tp register in arch_thread_signal_enter to fix user-mode ↵Yulong Wang
memory access
2025-07-07[smart] Optimize error handling after command executionbernard
2025-07-07[smart] rename the Group name to 'lwProcess' and optimize the error handling ↵bernard
for vDSO building.
2025-06-30[vdso] fix the arch/abi flag issue.bernard
2025-06-30[vdso] use the default arch/abi flags in risc-v vDSO building.BernardXiong
2025-05-19[smart] Fix parameter issue when calling the __arch_get_hw_counter function.bernard
2025-05-19[smart] Enhance build script with additional cleanup stepsbernard
2025-05-19[smart] Fix typo in vDSO Kconfig.bernard
2025-05-19[smart] move vdso.c to arch/common folder.bernard
2025-05-19[smart] Add vDSO support for RISC-V architecture and refactor related componentsbernard
- Implemented vDSO functionality for the RISC-V architecture, including the necessary source files and linker scripts. - Introduced a new `vdso_sys.c` file for RISC-V, containing functions to handle time retrieval using the vDSO mechanism. - Created architecture-specific linker scripts (`vdso.lds.S`) for both AArch64 and RISC-V. - Updated the build system to support vDSO compilation for RISC-V, including necessary adjustments in `SConstruct` files. - Refactored existing vDSO code to improve compatibility and maintainability across architectures. - Adjusted the maximum number of PTY devices in the terminal configuration from 64 to 32 for better resource management. - Fixed minor issues in existing code, including correcting the path for the vDSO shared library and ensuring proper function definitions.
2025-05-09[component/lwp]add annotation for lwp elf. (#10230)Guorui Li
* [component/lwp]add annotation for lwp elf. * Update components/lwp/lwp_elf.c Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
2025-04-13add RT_THREAD_CTRL_SET_PRIORITYwycwyhwyq
2025-04-13add RT_THREAD_CTRL_SET_PRIORITYwycwyhwyq
2025-02-25feat: mm: added affinity pages allocatorShell
This patch introduces a tagged pages allocator to address the existing problems of page aliasing on specific platforms and the requirement of page coloring. It implements an affinity-id aware page manager by separating the runtime page list into two types: a normal single linked-list and a multi-dimensional affinity-list. Changes: - Introduced tagged pages allocator and managing algorithm for affinity pages list - Modified components to support affinity-id list management - Updated page allocation and freeing functions to handle tagged pages - Added configuration options for page affinity block size and debugging - Modified mmap and elf loading to respect affinity settings - Enhanced page list management to support multi-dimensional affinity-list Signed-off-by: Shell <[email protected]>
2025-02-24[lwp/riscv]修正用户态参数空间占用堆地址空间的问题 (#10014)heyuanjie87
* [lwp/riscv]修正用户态参数空间占用堆空间的问题
2025-02-18[lwp]add comments for lwp system calls. (#9934)Guorui Li
2025-02-18[lwp]检查killpg的signo参数的有效性 (#9981)heyuanjie87
* [lwp]对检查killpg的signo参数的有效性
2025-02-08[lwp]修正kill(pid < -1)时的返回值错误heyuanjie87
2025-01-21[lwp]修正无法通过文件名查找pid的问题 (#9935)heyuanjie87
2025-01-16lwp: Kconfig: LWP_DEBUG default as n (#9921)Chen Wang
LWP_DEBUG is debugging related, should be disabled by default. Signed-off-by: Chen Wang <[email protected]>
2025-01-08fix: add \n for addr2line hintMeco Man
2025-01-06feat: add support for dfs remount functionalityShell
This patch introduces a remount feature for the DFS, allowing for the modification of mount parameters without unmounting the filesystem, the remount functionality helps modify certain mount flags (like `MS_RDONLY`) without requiring an unmount, providing more control over mounted filesystems in the system. The updates is essential for user space init proc to cleanup the runtime resource, ensuring clean handling of cached data and enhancing system robustness during power down processing. Changes: - Defined new constants for remount flags in `dfs_fs.h`. - Added the `dfs_remount()` function in `dfs_fs.c` to handle remount operations. - Introduced a check for unsupported flags and handle error conditions such as invalid paths or non-directory targets. - Updated the `dfs_mnt` structure in `dfs_mnt.h` to include a read-only flag (`MNT_RDONLY`). - The `dfs_remount()` function allows changing the read-only status of a mounted filesystem. - Added `MNT_LAZY_UMNT` and `MNT_RDONLY` flags to `dfs_mnt` structure. - Introduced `dfs_mnt_setflags` function for dynamic flag management. - Updated `dfs_remount` to utilize `dfs_mnt_setflags` for flag setting. - Enhanced unmount operations with `dfs_mnt_umount_iter` and lazy unmounting. - Added `dfs_pcache_clean` to handle cache cleanup for read-only mounts. - Improved error reporting in `dfs_umount` for better user feedback. - Refactored `sys_mount` to streamline parameter handling and support remounts. - Introduced `_cp_from_usr_string` helper for user-space string operations. - Updated internal APIs to ensure consistency in reference count management. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add system reboot and process teardown supportShell
The patch introduces support for system reboot functionality and process teardown, allowing for a clean shutdown and unmounting of the root filesystem. This is necessary for ensuring a proper system shutdown process, especially when dealing with resource cleanup and ensuring that all processes have exited before system shutdown. Changes: - Added `lwp_teardown()` function to handle process cleanup and system teardown. - Introduced `lwp_pid_wait_for_empty()` to wait for process ID table emptiness before proceeding with shutdown. - Updated `dfs_mnt_unref()` to trigger callbacks when unmounting a filesystem. - Added new reboot types (`RB_AUTOBOOT`, `RB_POWER_OFF`) and implemented their corresponding actions, including cleanup of processes and unmounting root filesystem. - Extended `sys_reboot()` to handle reboot and power off types with appropriate callbacks for process and filesystem teardown. - Introduced callback mechanism for root filesystem unmount notifications. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add universal process runtime serviceShell
This change introduces the `lwp_runtime.c` component, which provides the necessary runtime environment for the init process, including boot scripts, shutdown, and poweroff functionalities. The initialization logic has been moved from `lwp.c` to this new file, enhancing modularity and flexibility in handling LWP runtime tasks. Changes: - Moved the `lwp_startup` function from `lwp.c` to `lwp_runtime.c` to handle system initialization and runtime environment setup. - Added `lwp_teardown` placeholder for system shutdown and cleanup tasks in the future (though not yet implemented). - Introduced the `LWP_USING_RUNTIME` configuration option in `Kconfig` to conditionally enable the runtime environment. - Updated the `SConscript` to conditionally include `lwp_runtime.c` based on the `LWP_USING_RUNTIME` configuration. - Removed the old `lwp_startup` code from `lwp.c`, simplifying the file. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add signal kill all functionalityShell
This change introduces the `lwp_signal_kill_all` function, which allows a signal to be sent to all processes in the system. The function iterates over all PIDs and sends the specified signal to each process, except those that are protected from signals. This enhancement provides a convenient way to broadcast signals across all processes in the system. Changes: - Added `lwp_signal_kill_all` function in `lwp_signal.c` to broadcast a signal to all processes by iterating over all PIDs using the existing `lwp_pid_for_each` function. - Introduced a new `kill_all_param` structure to encapsulate the signal information needed for killing processes. - Added internal `_kill_each` helper function for sending the signal to each PID. - Updated `lwp_signal.h` with the new function prototype for `lwp_signal_kill_all`. - Modified `sys_kill` in `lwp_syscall.c` to call `lwp_signal_kill_all` when a process is not specified. Signed-off-by: Shell <[email protected]>
2025-01-06feat: support PID iterationShell
This change introduces the `lwp_pid_for_each` function, which provides a convenient and thread-safe method for iterating over PIDs with a user- defined callback. This addition is necessary to support cases where operations must be performed on each PID in the balanced tree, enhancing flexibility and modularity for PID management. Changes: - Added `lwp_pid_for_each` function in `lwp_pid.c` to allow iteration over PIDs using a callback function and optional data parameter. - Defined a new internal `pid_foreach_param` structure to encapsulate the callback and data for the iteration. - Added `_before_cb` helper function for executing the callback on each PID node during AVL traversal. - Ensured thread safety by acquiring and releasing the PID lock around the AVL traversal within `lwp_pid_for_each`. - Updated `lwp_pid.h` with the `lwp_pid_for_each` function prototype and included `rtthread.h` for necessary types. Signed-off-by: Shell <[email protected]>
2024-12-20kernel: cleanup debug APIsChen Wang
- `dbg_log` is a “NOT RECOMMENDED API”, convert the calling of this API to LOG_x and remove this API. - `dbg_here`/`dbg_enter`/`dbg_exit`: no one use these APIs, remove them directly. Signed-off-by: Chen Wang <[email protected]>
2024-12-17[serial] add bypass testcase in utestzhujiale
2024-12-12[lwp] fix TTYSUP_CFLAG did not include CBAUD flagzhujiale
2024-11-17Modify the position of libc_rent definitionrcitachi
2024-11-12fixup: smart: uninitialized buffer on mount(2) (#9636)Shell
The `struct stat` object used inside mount(2) is uninitialized, which can lead to undefined behavior during running Changes: - Set zero to buffer before calling to stat() Signed-off-by: Shell <[email protected]>
2024-11-01[libc] modify function names to resolve naming conflictsrcitachi
2024-10-21fixup: smart: sys_mount: UAF vulnerabilityShell
This patch addresses a use-after-free (UAF) vulnerability in the sys_mount. The issue occurred due to improper handling of memory deallocation, which could lead to crashes or undefined behavior on user request of mounting. Changes made: - Moved the `rt_free(copy_source)` function call to occur after the necessary operations are completed, preventing premature deallocation of memory. Signed-off-by: Shell <[email protected]>
2024-09-19feat: smart: user space context optimizationShell
This patch optimizes the user-space context handling in the ARM64 architecture, specifically improving how the context is saved and restored during system calls and interrupts. The changes make the code more efficient and easier to maintain, while ensuring proper preservation of user context during system transitions. Changes: - Introduced a parameter for context saving to improve flexibility. - Replaced hardcoded stack pointer operations with frame-relative references for better readability and code reuse. - Simplified context restoration, removing redundant operations like loading/storing floating-point registers. Signed-off-by: Shell <[email protected]>
2024-09-19fixup: pty: possible memory leaking on close()Shell
The ref_count of the vnode is NOT bound to the resource reference counts of the ptm device created by opening `dev/ptmx`, so the conditional release of resource may end up by memory leaking if the multiple user have open the `dev/ptmx`. Changes: - Removed conditional branch on recycling resource Signed-off-by: Shell <[email protected]>
2024-09-14fixup: smart: remove unnecessary Kconfig optionShell
The `LWP_CONSOLE_INPUT_BUFFER_SIZE` is a legacy config option for TTY driver used in smart. Since the driver is updated, there's no dependency of this option any more. Changes: - Removed unused Kconfig option `LWP_CONSOLE_INPUT_BUFFER_SIZE` Signed-off-by: Shell <[email protected]>
2024-09-13[component][net]add more socket flagzms123456
2024-09-13[lwp] 取消脚本中限制rv的具体cpu类别heyuanjie87
此目录中为rv64通用代码