rt-thread-official/components/lwp
Shell e5cf86267b
[smart] fixup of script execution (#9009)
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 <smokewood@qq.com>
2024-05-31 17:32:19 +08:00
..
arch [lwp/riscv]进入libc前初始化用户态sp (#8997) 2024-05-29 06:52:38 +08:00
terminal [smart] add FIONREAD ioctl support for tty (#8996) 2024-05-28 09:56:10 +08:00
Kconfig [drivers/serial] Introduce hooker for TTY (#8733) 2024-04-09 21:36:16 +08:00
SConscript sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
libc_musl.h sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp.c [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp.h [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp_arch_comm.h sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_args.c [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp_args.h [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp_avl.c [rtdef] use lower-case to define attributes (#6728) 2022-12-11 13:12:03 -05:00
lwp_avl.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
lwp_dbg.c sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
lwp_dbg.h [component/lwp] support more feature of signal from IEEE Std 1003.1-2017 (#7828) 2023-07-20 00:02:41 +08:00
lwp_elf.c [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp_elf.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
lwp_futex.c sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_futex_internal.h 🎯 Sync smart & scheduler codes (#8537) 2024-02-23 17:49:15 +08:00
lwp_futex_table.c 🎯 Sync smart & scheduler codes (#8537) 2024-02-23 17:49:15 +08:00
lwp_internal.c [fixup] aarch64 UMP compiler error (#8677) 2024-03-30 17:58:38 +08:00
lwp_internal.h [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp_ipc.c 🎯 Sync smart & scheduler codes (#8537) 2024-02-23 17:49:15 +08:00
lwp_ipc.h fix rt_channel lock. (#8244) 2023-11-10 21:37:07 +08:00
lwp_ipc_internal.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
lwp_itimer.c 🎯 Sync smart & scheduler codes (#8537) 2024-02-23 17:49:15 +08:00
lwp_jobctrl.c sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_mm.c sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
lwp_mm.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
lwp_pgrp.c sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_pid.c [lwp]list_process can print tid (#8991) 2024-05-31 17:30:46 +08:00
lwp_pid.h sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_session.c sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_shm.c Sync dfs lwp (#8123) 2023-10-17 13:07:59 +08:00
lwp_shm.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
lwp_signal.c sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_signal.h sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_sys_socket.h sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_syscall.c [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp_syscall.h sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_tid.c sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
lwp_user_mm.c [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
lwp_user_mm.h [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
page.h [rt-smart] kernel virtual memory management layer (#6809) 2023-01-08 21:08:55 -05:00
syscall_generic.h Sync dfs lwp (#8123) 2023-10-17 13:07:59 +08:00