Merge tag 'printk-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 May 2019 16:18:12 +0000 (09:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 May 2019 16:18:12 +0000 (09:18 -0700)
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()

21 files changed:
1  2 
arch/alpha/kernel/pci_iommu.c
drivers/acpi/device_pm.c
drivers/base/power/main.c
drivers/block/drbd/drbd_receiver.c
drivers/cpufreq/cpufreq.c
drivers/nvdimm/dimm_devs.c
drivers/pci/pci-driver.c
drivers/pci/quirks.c
fs/f2fs/f2fs.h
include/trace/events/sunrpc.h
init/main.c
kernel/events/uprobes.c
kernel/irq/manage.c
kernel/rcu/tree.c
kernel/time/sched_clock.c
kernel/time/timer.c
kernel/workqueue.c
lib/test_printf.c
mm/memblock.c
mm/memory.c
mm/vmscan.c

Simple merge
Simple merge
index 43e863cc0c1b82e5d8d3b69c7416f813ef0d5738,c88f56b9ae5ba74dea6d68fe51f99eea9799a6ad..10528a7747bf93a7e1b01e938f2870b968b5de55
@@@ -2051,7 -2062,7 +2051,7 @@@ EXPORT_SYMBOL_GPL(dpm_suspend_start)
  void __suspend_report_result(const char *function, void *fn, int ret)
  {
        if (ret)
-               pr_err("%s(): %pF returns %d\n", function, fn, ret);
 -              printk(KERN_ERR "%s(): %pS returns %d\n", function, fn, ret);
++              pr_err("%s(): %pS returns %d\n", function, fn, ret);
  }
  EXPORT_SYMBOL_GPL(__suspend_report_result);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/f2fs/f2fs.h
Simple merge
index 7e899e635d33abaecc009af281be99f7475f5d85,7b8b987d332ee2242e63fd218c1b441bf85da21d..f0a6f0c5549cc15b793fac1e534c5c32b8569b23
@@@ -146,10 -102,10 +146,10 @@@ DECLARE_EVENT_CLASS(rpc_task_running
                __entry->flags = task->tk_flags;
                ),
  
-       TP_printk("task:%u@%d flags=%s runstate=%s status=%d action=%pf",
 -      TP_printk("task:%u@%d flags=%4.4x state=%4.4lx status=%d action=%ps",
++      TP_printk("task:%u@%d flags=%s runstate=%s status=%d action=%ps",
                __entry->task_id, __entry->client_id,
 -              __entry->flags,
 -              __entry->runstate,
 +              rpc_show_task_flags(__entry->flags),
 +              rpc_show_runstate(__entry->runstate),
                __entry->status,
                __entry->action
                )
diff --cc init/main.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/memblock.c
Simple merge
diff --cc mm/memory.c
Simple merge
diff --cc mm/vmscan.c
Simple merge