summaryrefslogtreecommitdiff
path: root/components/lwp
AgeCommit message (Collapse)Author
7 days[ARCH/RISC-V] Next RISC-V (#10320)GUI
* [libcpu][risc-v] Refactor the RISC-V architecture port Introduce an opt-in unified RISC-V common layer for RV32 and RV64 while keeping existing BSPs on the legacy implementation during migration. - use ARCH_RISCV and ARCH_CPU_64BIT for architecture and XLEN selection - unify context, trap, MMU, cache, timer, SBI, SMP and ISA handling - add PLIC, CLIC, ACLINT, APLIC and IMSIC support - map physical hart IDs to contiguous logical CPU IDs - add T-Head vendor overrides while preserving legacy ports - migrate qemu-virt64-riscv with RV32 and RV64 support - update clock_time, MM, LWP, OFW, PCI and Rust integration Existing BSPs continue using legacy_common or common64 unless they select RT_USING_RISCV_NEW_COMMON. Signed-off-by: GuEe-GUI <[email protected]> * [libcpu][risc-v] skip disabled CPU nodes in early FDT walk Rbb666 noted that rt_hw_fdt_install_early() walked every /cpus child without checking status, so disabled cores still joined hart registration and MMU capability probing. Skip nodes that are not okay/ok via rt_fdt_device_is_available() before reading reg or mmu-type. Signed-off-by: seteiro <[email protected]> * [libcpu][risc-v] Fix per-CPU page table mapping - reuse existing non-leaf page table entries when mapping per-CPU areas - reject leaf entry conflicts instead of overwriting mappings Signed-off-by: GuEe-GUI <[email protected]> --------- Signed-off-by: GuEe-GUI <[email protected]> Signed-off-by: seteiro <[email protected]> Co-authored-by: seteiro <[email protected]>
2026-09-03[components][lwp] Remove terminal/ from global CPPPATHTTLLDD
The terminal subsystem's own headers (terminal.h, tty_config.h, ...) are resolved by the compiler's quoted-include directory lookup for sources inside components/lwp/terminal; nothing else depends on the path. Stop polluting the global CPPPATH with this internal directory, following the convention discussed in #10980.
2026-08-30[dfs][procfs] Fix Linux-compatible procfs fieldsbernard
Grow maps without a 256 VMA cap, skip RSS walks for maps, report matching status text, real RSS/statm, MemAvailable after page-pool free pages, load averages plus last PID, cumulative processes, RV32 cpuinfo, and per-character mount escaping.
2026-08-30[libc][posix] Fix epoll waiters and LWP syscall copiesbernard
修复 epoll waiter 生命周期,避免等待队列节点在回调后失效。 整理 LWP POSIX syscall 的用户空间拷贝和错误返回路径。
2026-08-30[dfs][posix] Add record locks, fchmod, and tmpfs metadatabernard
为 DFS v2 增加 POSIX 记录锁、fchmod,以及 tmpfs 的权限和时间元数据。 进程退出时通过 dfs_fdtable_drop_fd 释放文件描述符和记录锁。
2026-08-21[kernel][ipc] Fix timeout wakeup ownership raceari.liu
Keep thread timer ownership when timer stop races with an in-flight timeout callback, and consume IPC resources only after a waiter is resumed successfully. Complete ownership cleanup in the generic and RT-Smart channel timeout callbacks. Add deterministic scheduler and LWP regressions for Event, Semaphore, Mailbox, Message Queue, sender, and receiver paths.
2026-08-17Add AF_UNIX sockets implementation (#11681)Bernard Xiong
* components/dfs: support unix socket nodes AF_UNIX pathname binding and descriptor passing require DFSv2 socket nodes and retained open file descriptions across fd tables. Add socket-node creation for tmpfs and devtmpfs, fd reference helpers, and socket F_SETFL forwarding. Impact: DFSv2 socket nodes and descriptor reference handling. Validation: git diff --cached --check. * components/net/sal: support local protocol providers Local IPC protocol families do not have a backing network device. Store the selected provider in each SAL socket and add a local provider registry while preserving netdev checks for Internet sockets. Handle DFSv2 close semantics, socketpair flags, and MSG_CTRUNC for AF_UNIX integration. Impact: SAL protocol dispatch for all socket families. Validation: git diff --cached --check. * components/lwp: support unix socket messages Musl AF_UNIX addresses and ancillary data require explicit ABI and user-memory conversion at the LWP syscall boundary. Add the musl msghdr layout, bounded address and message copying, control-message level conversion, and MSG_CTRUNC translation. Correct receive buffer allocation and copy lengths while handling messages. Impact: LWP socket syscalls when SAL is enabled. Validation: git diff --cached --check. * components/net/af_unix: add local sockets Add an opt-in AF_UNIX provider for pathname-based local IPC without a synthetic network device. Support datagram and stream sockets, blocking and nonblocking I/O, timeouts, poll, socketpair, and SCM_RIGHTS descriptor passing. Include bounded Kconfig settings, component documentation, and utest coverage. Impact: enabled only by RT_USING_AF_UNIX and requires SAL POSIX with DFSv2. Validation: git diff --cached --check. * Fix AF_UNIX CI checks Apply the repository clang-format rules to the affected source lines. Suppress the cppcheck false positive for the devtmpfs list iterator. No functional behavior is changed. * components/lwp: preserve NULL optional msghdr buffers When msg_name or msg_control is NULL, keep the kernel pointer NULL instead of substituting an uninitialized buffer. Reject a NULL control buffer with a nonzero length as EFAULT. Impact: LWP sendmsg/recvmsg conversion on MMU targets. Validation: git diff --cached --check. * components/net/af_unix: fix poll UAF, namespace leak, and SCM_RIGHTS cycles Poll only the local wait queue and wake writers from the receiver. Free namespace entries on detach, and reject AF_UNIX descriptors in SCM_RIGHTS until cycle collection exists. Impact: AF_UNIX poll, bind lifetime, and descriptor passing. Validation: git diff --cached --check. * components/dfs: add DFSv2 AF_UNIX utest suite Add opt-in tests under dfs/utest/v2/af_unix for socket nodes, IPC, poll peer-close, namespace cleanup, and SCM_RIGHTS rejection. Sources are built only when RT_UTEST_TC_USING_DFS_V2_AF_UNIX and the selected test groups are enabled. Impact: DFS utest menu and build; no production AF_UNIX behavior change. Validation: git diff --cached --check.
2026-07-22lwp: copy timeout into kernel space in sys_select()yi chen
sys_select() passed the raw user-space timeout pointer straight through to select(), unlike readfds/writefds/exceptfds which are all validated with lwp_user_accessable() and copied into kernel memory first. A malicious or buggy user thread could pass a timeout pointing at unmapped or otherwise invalid memory, which select() would then dereference directly (timeout->tv_sec / timeout->tv_usec) without any check, from kernel context. Validate and copy it into a kernel-local struct timeval the same way the fd_set arguments already are, before it reaches select(). Fixes #10298 Signed-off-by: yi chen <[email protected]>
2026-06-16fix: move tty_ptmx regression test to utest frameworkOrbisAI Security
The previous commit placed the test in a new top-level tests/ directory that does not exist in the RT-Thread repo structure and used the external check library. Move the test to examples/utest/testcases/lwp/ and rewrite it using RT-Thread's native utest framework, add a Kconfig symbol (RT_UTEST_LWP_TTY_PTMX), and wire it into Kconfig.utestcases. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-16fix: V-004 security vulnerabilityorbisai0security
Automated security fix generated by OrbisAI Security
2026-06-12utest: move lwp testcases to components/lwpCYFS
Signed-off-by: CYFS <[email protected]>
2026-05-26lwp: fix pid leak on exec failure before task startupyang.zhang
When msh tries to execute a non-ELF path, lwp_execve() may allocate a PID before lwp_load() fails. The old error path only dropped the LWP reference, leaving the PID tree entry pointing to a freed LWP. In an init-less boot flow, this can poison pid 1 after a failed command from msh. A later LWP launch may then treat the stale pid 1 entry as a valid parent LWP, resulting in invalid pgrp/session state and a job-control assertion during process exit. Add lwp_pid_rollback() for exec/spawn failures before the process becomes runnable. Unlike lwp_pid_put(), it always releases the PID lock and does not enter the "no more pid allocation" state when the PID tree becomes empty. Use the rollback helper in lwp_execve() failure paths after PID allocation. Signed-off-by: zhangyang <[email protected]>
2026-04-30完善版权信息rcitach
2026-04-30修改用户态 data 页权限为 ROrcitach
2026-04-30修改锁为 rt_spinlockrcitach
2026-04-30更新 vdso img 校验rcitach
2026-04-30适配 arm 架构rcitach
2026-04-30删除无用函数声明rcitach
2026-04-30添加 vdso readtime 更新逻辑rcitach
2026-04-30style: format code with clang-format [skip ci]rcitach
2026-04-30解决 base_time 和 counter_last 采样不同步产生固定偏差rcitach
2026-04-30更新 vdso 框架rcitach
2026-04-01fix(lwp): reject wrapped user copy rangesAFWEF_147
2026-03-31style: format code with clang-format [skip ci]Telecaster2147
2026-03-31fix(lwp): validate thread priority in sched syscallsAFWEF_147
2026-03-12[lwp/aarch64] Fix macro definition style in reloc.chuangshuhua
Split the merged #define macros on line 13 into separate lines to comply with coding standards and avoid potential preprocessor issues.
2026-02-13chore: fix typo in components and libcputheqengineer
2026-01-31[components][clock_time] Refactor time subsystem around clock_time (#11111)Bernard Xiong
* [components][clock_time] Refactor time subsystem around clock_time Introduce the clock_time core with clock source/event separation, high-resolution scheduling, and boot-time helpers, plus clock_timer adapters for timer peripherals. Remove legacy ktime/cputime/hwtimer implementations and migrate arch and BSP time paths to the new subsystem while keeping POSIX time integration functional. Update drivers, Kconfig/SConscript wiring, documentation, and tests; add clock_time overview docs and align naming to clock_boottime/clock_hrtimer/clock_timer. * [components][clock_time] Use BSP-provided clock timer frequency on riscv64 * [risc-v] Use runtime clock timer frequency for tick and delays * [bsp] Add clock timer frequency hooks for riscv64 boards * [bsp] Update Renesas RA driver doc clock_timer link * [bsp] Sync zynqmp-r5-axu4ev rtconfig after config refresh * [bsp][rk3500] Update rk3500 clock configuration * [bsp][hpmicro] Add rt_hw_us_delay hook and update board delays * [bsp][stm32l496-st-nucleo] enable clock_time for hwtimer sample in ci * [bsp][hpmicro] Fix rtconfig include scope for hpm6750evk Move rtconfig.h include outside the ENET_MULTIPLE_PORT guard for hpm6750evk and hpm6750evk2 so configuration macros are available regardless of ENET settings. * [bsp][raspi3] select clock time for systimer * [bsp][hpm5300evk] Trim trailing blank line * [bsp][hpm5301evklite] Trim trailing blank line * [bsp][hpm5e00evk] Trim trailing blank line * [bsp][hpm6200evk] Trim trailing blank line * [bsp][hpm6300evk] Trim trailing blank line * [bsp][hpm6750evk] Trim trailing blank line * [bsp][hpm6750evk2] Trim trailing blank line * [bsp][hpm6750evkmini] Trim trailing blank line * [bsp][hpm6800evk] Trim trailing blank line * [bsp][hpm6e00evk] Trim trailing blank line * [bsp][nxp] switch lpc178x to gcc and remove mcx timer source * [bsp][stm32] fix the CONFIG_RT_USING_CLOCK_TIME issue. * [docs][clock_time] add clock time documentation * [docs][clock_time] Update clock time subsystem documentation - Update device driver index to use correct page reference - Clarify upper layer responsibilities in architecture overview - Update README to describe POSIX/libc, Soft RTC, and device driver usage - Refine architecture diagram with improved layout and color scheme - Remove obsolete clock_timer.md file * [kernel][utest] Trim trailing space * [clock_time] Fix hrtimer wrap handling * [clock_time] fix the static rt_inline issue * [clock_time] fix the rt_clock_hrtimer_control result issue
2025-11-15doxygen: add comments for lwp shared memory APIsibvqeibob
Add Doxygen-style comments for the lwp shared memory public APIs in components/lwp/lwp_shm.c and the related control structure. This change is documentation-only and does not modify any runtime behavior or logic. Signed-off-by: ibvqeibob <[email protected]>
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