Commit Graph

16 Commits

Author SHA1 Message Date
Ville Juven 4c1b66246d env_dup: Fix copying of env between address environments
If address environments are in use, it is not possible to simply
memcpy from from one process to another. The current implementation
of env_dup does precisely this and thus, it fails at once when it is
attempted between two user processes.

The solution is to use the kernel's heap as an intermediate buffer.
This is a simple, effective and common way to do a fork().

Obviously this is not needed for kernel processes.
2022-04-21 18:38:37 +08:00
Xiang Xiao 47e38eb70f binfmt: Decouple builtin from binfs file system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 09:35:35 -03:00
Xiang Xiao cf78a5b6cf binfmt: Move argv copy into exec_module
and remove the related fields from struct binary_s

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-02 15:20:38 +09:00
Xiang Xiao 8a14a13819 binfmt: Rename dump_module to binfmt_dumpmodule
follow other binfmt function naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:16:06 +09:00
Abdelatif Guettouche d85c432278 Few typos fixes in binfmt and libc/machine.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-11 10:35:40 +08:00
Alin Jerpelea f9fb182809 Author: Gregory Nutt: update licenses to Apache
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-05 12:15:56 -03:00
Xiang Xiao fe5cb9529d builtin: Remove HAVE_BUILTIN_CONTEXT macro
it's enough to decide which code should be compiled with CONFIG_BUILTIN and CONFIG_FS_BINFS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00
Alin Jerpelea 7ddf7c6c25 binfmt: nxstyle fixes
small nxstyle fixes for binfmt to avoid CI warnings

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-22 14:07:04 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Gregory Nutt dd97fb991b This commit moves shared builtin information out of binfmt/libbuiltin and into libs/libc/builtin where it can be shared. This should permit builtin application in the PROTECTED build where binfmt/libbuiltin is not available in user space.
Squashed commit of the following:

    Correct some additional compile-related issues.

    Move  include/nuttx/binfmt/builtin.h to include/nuttx/lib/builtin.h.  Move apps/builtin/lib_builtin_forindex.c to libs/libc/builtin/lib_builtin_forindex.c.

    Move binfmt/libbuiltin to libs/libc/builtin.  There are calls made directly from apps/nshlib into this logic and hence, must be part of a library that can be shared between the OS and applications.
2019-08-23 09:07:40 -06:00
Gregory Nutt 9546481054 Fix some typographical errors. 2018-09-14 06:55:45 -06:00
Gregory Nutt 20a86dfc1b binfmt/ and sched/group: Re-architect the way that loadable ELF or NXFLAT modules are unloaded. Memory resources must be recovered when the task loaded into memory exits. The originmal implementatino used the death-of-child SIGCHLD signal to perform the unload. There are several problems with this: It is overly complex, it requires that the parent task stay resident while the loaded task runs, and it has fatal logic flaws in the protected and kernel model builds because the user signal handler attempts to run in the kernel address space. This commit corrects with using a mindlessly simply BINFMT callback when the task exits. 2018-08-05 08:09:54 -06:00
Gregory Nutt 7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt 1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt 4a7fb2cbc1 binfmt: Cosmetic -- rename binfmt_internal.h to binfmt.h. Move related argument copy logic into new file, binfmt_copyargv.c 2015-11-14 07:29:47 -06:00