linux-stable/arch/s390
Alexander Gordeev ef0d6a9b44 s390/boot: cleanup number of page table levels setup
[ Upstream commit 8ddccc8a7d ]

The separate vmalloc area size check against _REGION2_SIZE
is needed in case user provided insanely large value using
vmalloc= kernel command line parameter. That could lead to
overflow and selecting 3 page table levels instead of 4.

Use size_add() for the overflow check and get rid of the
extra vmalloc area check.

With the current values of CONFIG_MAX_PHYSMEM_BITS and
PAGES_PER_SECTION the sum of maximal possible size of
identity mapping and vmemmap area (derived from these
macros) plus modules area size MODULES_LEN can not
overflow. Thus, that sum is used as first addend while
vmalloc area size is second addend for size_add().

Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 11:14:18 +02:00
..
appldata s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
boot s390/boot: cleanup number of page table levels setup 2023-09-23 11:14:18 +02:00
configs s390 fixes for 6.5-rc5 2023-08-03 09:06:38 -07:00
crypto s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs 2023-09-13 09:53:00 +02:00
hypfs s390/hypfs: remove unused info_blk_hdr__pcpus() function 2022-11-23 16:24:07 +01:00
include s390/pkey: fix PKEY_TYPE_EP11_AES handling for sysfs attributes 2023-09-13 09:53:00 +02:00
kernel s390/ipl: add missing secure/has_secure file to ipl type 'unknown' 2023-09-13 09:53:55 +02:00
kvm KVM: s390: fix sthyi error handling 2023-07-29 14:56:41 +02:00
lib s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
mm 18 hotfixes. 13 are cc:stable and the remainder pertain to post-6.4 issues 2023-08-25 11:44:43 -07:00
net s390/bpf: Pass through tail call counter in trampolines 2023-09-19 12:30:20 +02:00
pci s390: fix various typos 2023-07-03 11:19:42 +02:00
purgatory s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
tools KVM: s390: Add facility 197 to the allow list 2022-07-13 15:25:25 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390 updates for 6.5 merge window 2023-06-27 15:49:10 -07:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390/decompressor: fix misaligned symbol build error 2023-06-28 13:57:09 +02:00