diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 12:18:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 12:18:12 -0400 |
commit | 0968621917add2e0d60c8fbc4e24c670cb14319c (patch) | |
tree | 79fc122606717ebcf0bbc8b2a986f2a0999a9c61 /mm/memblock.c | |
parent | 573de2a6e844cb230c4483833f29b8344a6a17cc (diff) | |
parent | 0f46c78391e1348fe45af86a0cd52795726695af (diff) |
Merge tag 'printk-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk
Pull printk updates from Petr Mladek:
- Allow state reset of printk_once() calls.
- Prevent crashes when dereferencing invalid pointers in vsprintf().
Only the first byte is checked for simplicity.
- Make vsprintf warnings consistent and inlined.
- Treewide conversion of obsolete %pf, %pF to %ps, %pF printf
modifiers.
- Some clean up of vsprintf and test_printf code.
* tag 'printk-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
lib/vsprintf: Make function pointer_string static
vsprintf: Limit the length of inlined error messages
vsprintf: Avoid confusion between invalid address and value
vsprintf: Prevent crash when dereferencing invalid pointers
vsprintf: Consolidate handling of unknown pointer specifiers
vsprintf: Factor out %pO handler as kobject_string()
vsprintf: Factor out %pV handler as va_format()
vsprintf: Factor out %p[iI] handler as ip_addr_string()
vsprintf: Do not check address of well-known strings
vsprintf: Consistent %pK handling for kptr_restrict == 0
vsprintf: Shuffle restricted_pointer()
printk: Tie printk_once / printk_deferred_once into .data.once for reset
treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively
lib/test_printf: Switch to bitmap_zalloc()
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index e7665cf914b1..a48f520c2d01 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -702,7 +702,7 @@ int __init_memblock memblock_add(phys_addr_t base, phys_addr_t size) | |||
702 | { | 702 | { |
703 | phys_addr_t end = base + size - 1; | 703 | phys_addr_t end = base + size - 1; |
704 | 704 | ||
705 | memblock_dbg("memblock_add: [%pa-%pa] %pF\n", | 705 | memblock_dbg("memblock_add: [%pa-%pa] %pS\n", |
706 | &base, &end, (void *)_RET_IP_); | 706 | &base, &end, (void *)_RET_IP_); |
707 | 707 | ||
708 | return memblock_add_range(&memblock.memory, base, size, MAX_NUMNODES, 0); | 708 | return memblock_add_range(&memblock.memory, base, size, MAX_NUMNODES, 0); |
@@ -821,7 +821,7 @@ int __init_memblock memblock_free(phys_addr_t base, phys_addr_t size) | |||
821 | { | 821 | { |
822 | phys_addr_t end = base + size - 1; | 822 | phys_addr_t end = base + size - 1; |
823 | 823 | ||
824 | memblock_dbg(" memblock_free: [%pa-%pa] %pF\n", | 824 | memblock_dbg(" memblock_free: [%pa-%pa] %pS\n", |
825 | &base, &end, (void *)_RET_IP_); | 825 | &base, &end, (void *)_RET_IP_); |
826 | 826 | ||
827 | kmemleak_free_part_phys(base, size); | 827 | kmemleak_free_part_phys(base, size); |
@@ -832,7 +832,7 @@ int __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size) | |||
832 | { | 832 | { |
833 | phys_addr_t end = base + size - 1; | 833 | phys_addr_t end = base + size - 1; |
834 | 834 | ||
835 | memblock_dbg("memblock_reserve: [%pa-%pa] %pF\n", | 835 | memblock_dbg("memblock_reserve: [%pa-%pa] %pS\n", |
836 | &base, &end, (void *)_RET_IP_); | 836 | &base, &end, (void *)_RET_IP_); |
837 | 837 | ||
838 | return memblock_add_range(&memblock.reserved, base, size, MAX_NUMNODES, 0); | 838 | return memblock_add_range(&memblock.reserved, base, size, MAX_NUMNODES, 0); |
@@ -1447,7 +1447,7 @@ void * __init memblock_alloc_try_nid_raw( | |||
1447 | { | 1447 | { |
1448 | void *ptr; | 1448 | void *ptr; |
1449 | 1449 | ||
1450 | memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pF\n", | 1450 | memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pS\n", |
1451 | __func__, (u64)size, (u64)align, nid, &min_addr, | 1451 | __func__, (u64)size, (u64)align, nid, &min_addr, |
1452 | &max_addr, (void *)_RET_IP_); | 1452 | &max_addr, (void *)_RET_IP_); |
1453 | 1453 | ||
@@ -1483,7 +1483,7 @@ void * __init memblock_alloc_try_nid( | |||
1483 | { | 1483 | { |
1484 | void *ptr; | 1484 | void *ptr; |
1485 | 1485 | ||
1486 | memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pF\n", | 1486 | memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pS\n", |
1487 | __func__, (u64)size, (u64)align, nid, &min_addr, | 1487 | __func__, (u64)size, (u64)align, nid, &min_addr, |
1488 | &max_addr, (void *)_RET_IP_); | 1488 | &max_addr, (void *)_RET_IP_); |
1489 | ptr = memblock_alloc_internal(size, align, | 1489 | ptr = memblock_alloc_internal(size, align, |
@@ -1508,7 +1508,7 @@ void __init __memblock_free_late(phys_addr_t base, phys_addr_t size) | |||
1508 | phys_addr_t cursor, end; | 1508 | phys_addr_t cursor, end; |
1509 | 1509 | ||
1510 | end = base + size - 1; | 1510 | end = base + size - 1; |
1511 | memblock_dbg("%s: [%pa-%pa] %pF\n", | 1511 | memblock_dbg("%s: [%pa-%pa] %pS\n", |
1512 | __func__, &base, &end, (void *)_RET_IP_); | 1512 | __func__, &base, &end, (void *)_RET_IP_); |
1513 | kmemleak_free_part_phys(base, size); | 1513 | kmemleak_free_part_phys(base, size); |
1514 | cursor = PFN_UP(base); | 1514 | cursor = PFN_UP(base); |