Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 's390-6.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Alexander Gordeev:

- Fix DirectMap accounting in /proc/meminfo file

- Fix strscpy() return code handling that led to "unsigned 'len' is
never less than zero" warning

- Fix the calculation determining whether to use three- or four-level
paging: account KMSAN modules metadata

* tag 's390-6.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/mm: Consider KMSAN modules metadata for paging levels
s390/ipl: Fix never less than zero warning
s390/mm: Fix DirectMap accounting

+6 -4
+2
arch/s390/boot/startup.c
··· 234 234 vsize = round_up(SZ_2G + max_mappable, rte_size) + 235 235 round_up(vmemmap_size, rte_size) + 236 236 FIXMAP_SIZE + MODULES_LEN + KASLR_LEN; 237 + if (IS_ENABLED(CONFIG_KMSAN)) 238 + vsize += MODULES_LEN * 2; 237 239 return size_add(vsize, vmalloc_size); 238 240 } 239 241
+3 -3
arch/s390/boot/vmem.c
··· 306 306 pages++; 307 307 } 308 308 } 309 - if (mode == POPULATE_DIRECT) 309 + if (mode == POPULATE_IDENTITY) 310 310 update_page_count(PG_DIRECT_MAP_4K, pages); 311 311 } 312 312 ··· 339 339 } 340 340 pgtable_pte_populate(pmd, addr, next, mode); 341 341 } 342 - if (mode == POPULATE_DIRECT) 342 + if (mode == POPULATE_IDENTITY) 343 343 update_page_count(PG_DIRECT_MAP_1M, pages); 344 344 } 345 345 ··· 372 372 } 373 373 pgtable_pmd_populate(pud, addr, next, mode); 374 374 } 375 - if (mode == POPULATE_DIRECT) 375 + if (mode == POPULATE_IDENTITY) 376 376 update_page_count(PG_DIRECT_MAP_2G, pages); 377 377 } 378 378
+1 -1
arch/s390/kernel/ipl.c
··· 270 270 if (len >= sizeof(_value)) \ 271 271 return -E2BIG; \ 272 272 len = strscpy(_value, buf, sizeof(_value)); \ 273 - if (len < 0) \ 273 + if ((ssize_t)len < 0) \ 274 274 return len; \ 275 275 strim(_value); \ 276 276 return len; \