Skip to content

Commit a241d7f

Browse files
committed
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
2 parents ed90ed5 + 282da38 commit a241d7f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

arch/s390/boot/startup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ static unsigned long get_vmem_size(unsigned long identity_size,
234234
vsize = round_up(SZ_2G + max_mappable, rte_size) +
235235
round_up(vmemmap_size, rte_size) +
236236
FIXMAP_SIZE + MODULES_LEN + KASLR_LEN;
237+
if (IS_ENABLED(CONFIG_KMSAN))
238+
vsize += MODULES_LEN * 2;
237239
return size_add(vsize, vmalloc_size);
238240
}
239241

arch/s390/boot/vmem.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static void pgtable_pte_populate(pmd_t *pmd, unsigned long addr, unsigned long e
306306
pages++;
307307
}
308308
}
309-
if (mode == POPULATE_DIRECT)
309+
if (mode == POPULATE_IDENTITY)
310310
update_page_count(PG_DIRECT_MAP_4K, pages);
311311
}
312312

@@ -339,7 +339,7 @@ static void pgtable_pmd_populate(pud_t *pud, unsigned long addr, unsigned long e
339339
}
340340
pgtable_pte_populate(pmd, addr, next, mode);
341341
}
342-
if (mode == POPULATE_DIRECT)
342+
if (mode == POPULATE_IDENTITY)
343343
update_page_count(PG_DIRECT_MAP_1M, pages);
344344
}
345345

@@ -372,7 +372,7 @@ static void pgtable_pud_populate(p4d_t *p4d, unsigned long addr, unsigned long e
372372
}
373373
pgtable_pmd_populate(pud, addr, next, mode);
374374
}
375-
if (mode == POPULATE_DIRECT)
375+
if (mode == POPULATE_IDENTITY)
376376
update_page_count(PG_DIRECT_MAP_2G, pages);
377377
}
378378

arch/s390/kernel/ipl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \
270270
if (len >= sizeof(_value)) \
271271
return -E2BIG; \
272272
len = strscpy(_value, buf, sizeof(_value)); \
273-
if (len < 0) \
273+
if ((ssize_t)len < 0) \
274274
return len; \
275275
strim(_value); \
276276
return len; \

0 commit comments

Comments
 (0)