-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Open
Labels
area: XtensaXtensa ArchitectureXtensa ArchitecturebugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bug
Description
Describe the bug
Allocation at
zephyr/arch/xtensa/core/ptables.c
Line 1081 in c3190d3
| l2_table = dup_l2_table(src_l2_table, action); |
Further, if a new domain with a new L1 page table has been allocated with no mappings, then memory gets mapped so that that new domain is also updated, this line
zephyr/arch/xtensa/core/ptables.c
Line 1072 in c3190d3
| src_l2_table = (uint32_t *)PTE_PPN_GET(l1_table[l1_pos]); |
NULL which then also will lead to an exception. When that is fixed by
@@ -1136,6 +1136,8 @@ static void dup_l2_table_if_needed(uint32_t *l1_table, uint32_t l1_pos)
uint32_t *l2_table, *src_l2_table;
src_l2_table = (uint32_t *)PTE_PPN_GET(l1_table[l1_pos]);
+ if (!src_l2_table)
+ return;
if (l2_page_tables_counter[l2_table_to_counter_pos(src_l2_table)] == 1) {
/* Only one user of L2 table, no need to duplicate. */
another exception occurs later when unmapping that memory
Regression
- This is a regression.
Steps to reproduce
No response
Relevant log output
Impact
Major – Severely degrades functionality; workaround is difficult or unavailable.
Environment
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
area: XtensaXtensa ArchitectureXtensa ArchitecturebugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bug