You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/18 03:02:25 UTC
[nuttx] branch master updated (b3360e4da9 -> fb12b6e3a9)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
from b3360e4da9 mpfs/knsh: Enable SHMFS
new 6a026382f0 group_leave: Don't instantiate address environment prior to destroying it
new 201a55c7cb arm/addrenv_utils: Don't touch L1 mappings in addrenv_destroy()
new fb12b6e3a9 libelf/elf_addrenv_free(): Don't instantiate address environment prior to destroying it
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/arm/src/armv7-a/arm_addrenv_utils.c | 4 ----
binfmt/libelf/libelf_addrenv.c | 2 --
sched/group/group_leave.c | 9 ---------
3 files changed, 15 deletions(-)
[nuttx] 01/03: group_leave: Don't instantiate address environment prior to destroying it
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 6a026382f03712cbf7afe336d4f62519ba8d97e7
Author: Ville Juven <vi...@unikie.com>
AuthorDate: Tue Jan 17 16:20:19 2023 +0200
group_leave: Don't instantiate address environment prior to destroying it
This is just unnecessary, a process cannot be destroyed by another
process in any case, every time this is executed the active address
environment is the process getting destroyed.
Even in the hypothetical case this was possible, the system would
crash at once if a context switch happens between "select()" and
"restore()", which is possible as the granule allocator is protected by
a semaphore (which is a synchronization point).
---
sched/group/group_leave.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/sched/group/group_leave.c b/sched/group/group_leave.c
index 16d92caf1e..9ae913073d 100644
--- a/sched/group/group_leave.c
+++ b/sched/group/group_leave.c
@@ -129,7 +129,6 @@ static void group_remove(FAR struct task_group_s *group)
static inline void group_release(FAR struct task_group_s *group)
{
#ifdef CONFIG_ARCH_ADDRENV
- save_addrenv_t oldenv;
int i;
#endif
@@ -203,10 +202,6 @@ static inline void group_release(FAR struct task_group_s *group)
#endif
#ifdef CONFIG_ARCH_ADDRENV
- /* Switch the addrenv and also save the current addrenv */
-
- up_addrenv_select(&group->tg_addrenv, &oldenv);
-
/* Destroy the group address environment */
up_addrenv_destroy(&group->tg_addrenv);
@@ -220,10 +215,6 @@ static inline void group_release(FAR struct task_group_s *group)
g_group_current[i] = NULL;
}
}
-
- /* Restore the previous addrenv */
-
- up_addrenv_restore(&oldenv);
#endif
#if defined(CONFIG_SCHED_WAITPID) && !defined(CONFIG_SCHED_HAVE_PARENT)
[nuttx] 02/03: arm/addrenv_utils: Don't touch L1 mappings in addrenv_destroy()
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 201a55c7cbb7e7af81abc70069eea28314f84d93
Author: Ville Juven <vi...@unikie.com>
AuthorDate: Tue Jan 17 16:03:32 2023 +0200
arm/addrenv_utils: Don't touch L1 mappings in addrenv_destroy()
This is unnecessary, the address environment is getting wiped anyway,
there is no need to remove the L1 references because they will get
wiped when the page directory is changed
---
arch/arm/src/armv7-a/arm_addrenv_utils.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm/src/armv7-a/arm_addrenv_utils.c b/arch/arm/src/armv7-a/arm_addrenv_utils.c
index 19f6b5cb68..2433ab5f89 100644
--- a/arch/arm/src/armv7-a/arm_addrenv_utils.c
+++ b/arch/arm/src/armv7-a/arm_addrenv_utils.c
@@ -171,10 +171,6 @@ void arm_addrenv_destroy_region(uintptr_t **list, unsigned int listlen,
for (i = 0; i < listlen; vaddr += SECTION_SIZE, i++)
{
- /* Unhook the L2 page table from the L1 page table */
-
- mmu_l1_clrentry(vaddr);
-
/* Has this page table been allocated? */
paddr = (uintptr_t)list[i];
[nuttx] 03/03: libelf/elf_addrenv_free(): Don't instantiate address environment prior to destroying it
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit fb12b6e3a99f038bc7a36d96adb394041a34e845
Author: Ville Juven <vi...@unikie.com>
AuthorDate: Tue Jan 17 17:53:53 2023 +0200
libelf/elf_addrenv_free(): Don't instantiate address environment prior to destroying it
Same as with group_free(), there is no need to instantiate the address
environment to destroy it.
The only problem was the ARM implementation modified the L1 mappings
in up_addrenv_destroy(), which it no longer does.
---
binfmt/libelf/libelf_addrenv.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/binfmt/libelf/libelf_addrenv.c b/binfmt/libelf/libelf_addrenv.c
index 035e498ade..3e44d2eab0 100644
--- a/binfmt/libelf/libelf_addrenv.c
+++ b/binfmt/libelf/libelf_addrenv.c
@@ -259,9 +259,7 @@ void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo)
/* Free the address environment */
- elf_addrenv_select(loadinfo);
ret = up_addrenv_destroy(&loadinfo->addrenv);
- elf_addrenv_restore(loadinfo);
if (ret < 0)
{
berr("ERROR: up_addrenv_destroy failed: %d\n", ret);