printk.c (9c35baf6cee9a5745d55de6f9995916dde642517) printk.c (692f66f26a4c19d73249736aa973c13a1521b387)
1/*
2 * linux/kernel/printk.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * Modified to make sys_syslog() more flexible: added commands to
7 * return the last 4k of kernel messages, regardless of whether
8 * they've been read or not. Added option to suppress kernel printk's

--- 18 unchanged lines hidden (view full) ---

27#include <linux/module.h>
28#include <linux/moduleparam.h>
29#include <linux/delay.h>
30#include <linux/smp.h>
31#include <linux/security.h>
32#include <linux/bootmem.h>
33#include <linux/memblock.h>
34#include <linux/syscalls.h>
1/*
2 * linux/kernel/printk.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * Modified to make sys_syslog() more flexible: added commands to
7 * return the last 4k of kernel messages, regardless of whether
8 * they've been read or not. Added option to suppress kernel printk's

--- 18 unchanged lines hidden (view full) ---

27#include <linux/module.h>
28#include <linux/moduleparam.h>
29#include <linux/delay.h>
30#include <linux/smp.h>
31#include <linux/security.h>
32#include <linux/bootmem.h>
33#include <linux/memblock.h>
34#include <linux/syscalls.h>
35#include <linux/kexec.h>
35#include <linux/crash_core.h>
36#include <linux/kdb.h>
37#include <linux/ratelimit.h>
38#include <linux/kmsg_dump.h>
39#include <linux/syslog.h>
40#include <linux/cpu.h>
41#include <linux/notifier.h>
42#include <linux/rculist.h>
43#include <linux/poll.h>

--- 953 unchanged lines hidden (view full) ---

997 .open = devkmsg_open,
998 .read = devkmsg_read,
999 .write_iter = devkmsg_write,
1000 .llseek = devkmsg_llseek,
1001 .poll = devkmsg_poll,
1002 .release = devkmsg_release,
1003};
1004
36#include <linux/kdb.h>
37#include <linux/ratelimit.h>
38#include <linux/kmsg_dump.h>
39#include <linux/syslog.h>
40#include <linux/cpu.h>
41#include <linux/notifier.h>
42#include <linux/rculist.h>
43#include <linux/poll.h>

--- 953 unchanged lines hidden (view full) ---

997 .open = devkmsg_open,
998 .read = devkmsg_read,
999 .write_iter = devkmsg_write,
1000 .llseek = devkmsg_llseek,
1001 .poll = devkmsg_poll,
1002 .release = devkmsg_release,
1003};
1004
1005#ifdef CONFIG_KEXEC_CORE
1005#ifdef CONFIG_CRASH_CORE
1006/*
1007 * This appends the listed symbols to /proc/vmcore
1008 *
1009 * /proc/vmcore is used by various utilities, like crash and makedumpfile to
1010 * obtain access to symbols that are otherwise very difficult to locate. These
1011 * symbols are specifically used so that utilities can access and extract the
1012 * dmesg log from a vmcore file after a crash.
1013 */
1006/*
1007 * This appends the listed symbols to /proc/vmcore
1008 *
1009 * /proc/vmcore is used by various utilities, like crash and makedumpfile to
1010 * obtain access to symbols that are otherwise very difficult to locate. These
1011 * symbols are specifically used so that utilities can access and extract the
1012 * dmesg log from a vmcore file after a crash.
1013 */
1014void log_buf_kexec_setup(void)
1014void log_buf_vmcoreinfo_setup(void)
1015{
1016 VMCOREINFO_SYMBOL(log_buf);
1017 VMCOREINFO_SYMBOL(log_buf_len);
1018 VMCOREINFO_SYMBOL(log_first_idx);
1019 VMCOREINFO_SYMBOL(clear_idx);
1020 VMCOREINFO_SYMBOL(log_next_idx);
1021 /*
1022 * Export struct printk_log size and field offsets. User space tools can

--- 2126 unchanged lines hidden ---
1015{
1016 VMCOREINFO_SYMBOL(log_buf);
1017 VMCOREINFO_SYMBOL(log_buf_len);
1018 VMCOREINFO_SYMBOL(log_first_idx);
1019 VMCOREINFO_SYMBOL(clear_idx);
1020 VMCOREINFO_SYMBOL(log_next_idx);
1021 /*
1022 * Export struct printk_log size and field offsets. User space tools can

--- 2126 unchanged lines hidden ---