Home
last modified time | relevance | path

Searched hist:"3 e826100" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/arch/s390/boot/
H A Dvmem.c3e826100 Fri May 26 07:30:30 CDT 2023 Alexander Gordeev <agordeev@linux.ibm.com> s390/kasan: avoid short by one page shadow memory

Kernel Address Sanitizer uses 3 bits per byte to
encode memory. That is the number of bits the start
and end address of a memory range is shifted right
when the corresponding shadow memory is created for
that memory range.

The used memory mapping routine expects page-aligned
addresses, while the above described 3-bit shift might
turn the shadow memory range start and end boundaries
into non-page-aligned in case the size of the original
memory range is less than (PAGE_SIZE << 3). As result,
the resulting shadow memory range could be short on one
page.

Align on page boundary the start and end addresses when
mapping a shadow memory range and avoid the described
issue in the future.

Note, that does not fix a real problem, since currently
no virtual regions of size less than (PAGE_SIZE << 3)
exist.

Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>