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()
This commit is contained in:
@ -846,7 +846,7 @@ trace_initcall_start_cb(void *data, initcall_t fn)
|
||||
{
|
||||
ktime_t *calltime = (ktime_t *)data;
|
||||
|
||||
printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current));
|
||||
printk(KERN_DEBUG "calling %pS @ %i\n", fn, task_pid_nr(current));
|
||||
*calltime = ktime_get();
|
||||
}
|
||||
|
||||
@ -860,7 +860,7 @@ trace_initcall_finish_cb(void *data, initcall_t fn, int ret)
|
||||
rettime = ktime_get();
|
||||
delta = ktime_sub(rettime, *calltime);
|
||||
duration = (unsigned long long) ktime_to_ns(delta) >> 10;
|
||||
printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n",
|
||||
printk(KERN_DEBUG "initcall %pS returned %d after %lld usecs\n",
|
||||
fn, ret, duration);
|
||||
}
|
||||
|
||||
@ -917,7 +917,7 @@ int __init_or_module do_one_initcall(initcall_t fn)
|
||||
strlcat(msgbuf, "disabled interrupts ", sizeof(msgbuf));
|
||||
local_irq_enable();
|
||||
}
|
||||
WARN(msgbuf[0], "initcall %pF returned with %s\n", fn, msgbuf);
|
||||
WARN(msgbuf[0], "initcall %pS returned with %s\n", fn, msgbuf);
|
||||
|
||||
add_latent_entropy();
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user