zephyr/kernel
Daniel Leung 100eacca07 kernel: mmu: fix potential running out of virtual memory space
In z_phys_unmap(), the call to virt_region_free() is not using
aligned virtual address and space. This can result in freeing
smaller region that allocated given that inputs to z_phys_unmap()
may not be aligned. So use the already calculated aligned
virtual address and size as input to virt_region_free().

Note that the assertion and if-block in virt_region_free() to
check whether the to-be-unmapped region is within the virtual
memory region needs to be trimmed by one byte at the end.
The assertion and if-block are checking against the region
end address but (start + size) is just one byte over the end.
So subtract one.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-11-17 15:56:04 +00:00
..
include smp: Move arrays to use CONFIG_MP_MAX_NUM_CPUS 2022-10-17 14:40:12 +09:00
paging arch/kernel/soc/samples: use unsigned int for irq_lock() 2022-07-14 14:37:13 -05:00
CMakeLists.txt cache: Fix cache API calling from userspace 2022-08-23 10:14:17 +02:00
Kconfig kernel: boot: add BOOT_DELAY dependency 2022-10-28 18:38:06 -04:00
Kconfig.vm
atomic_c.c
banner.c kernel: banner: cleanup `#ifdef`'s 2022-10-28 18:38:06 -04:00
compiler_stack_protect.c
condvar.c
device.c kernel: move z_sys_init_run_level to init.c 2022-10-12 18:49:12 +09:00
errno.c
events.c kernel: Add k_event_set_masked primitive 2022-07-25 15:24:32 -04:00
fatal.c
futex.c
idle.c kernel: idle: fix -Werror=misleading-indentation 2022-10-12 18:43:15 +02:00
init.c kernel: Add C++ main() support 2022-11-05 16:41:45 +09:00
kheap.c kernel: kheap: fix k_heap_aligned_alloc handling of K_FOREVER 2022-09-29 10:39:12 -05:00
mailbox.c
main_weak.c kernel: Add C++ main() support 2022-11-05 16:41:45 +09:00
mem_domain.c
mem_slab.c
mempool.c
mmu.c kernel: mmu: fix potential running out of virtual memory space 2022-11-17 15:56:04 +00:00
msg_q.c
mutex.c kernel: mutex: fix races when lock timeout 2022-08-12 17:40:20 +02:00
pipes.c kernel: allow k_poll to wait on pipes 2022-08-24 17:49:20 +00:00
poll.c kernel: allow k_poll to wait on pipes 2022-08-24 17:49:20 +00:00
queue.c
sched.c kernel: Convert away from CONFIG_MP_NUM_CPUS 2022-10-31 17:09:14 +01:00
sem.c
smp.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
stack.c
system_work_q.c
thread.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
timeout.c kernel: Fixes sys_clock_tick_get() 2022-08-04 05:32:11 -04:00
timer.c tracing: ctf: add timer support 2022-08-31 16:04:01 -04:00
usage.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
userspace.c kernel: pipes: rewrite pipes implementation 2022-08-17 19:31:25 +02:00
userspace_handler.c
version.c
work.c
xip.c