Skip to content

Commit 4079859

Browse files
committed
wip
1 parent d71486d commit 4079859

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

include/linux/syslog_namespace.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ struct syslog_namespace {
7575
};
7676

7777
extern struct syslog_namespace init_syslog_ns;
78+
extern struct printk_ringbuffer *init_prb;
79+
extern struct latched_seq init_clear_seq;
7880

7981
static inline struct syslog_namespace *current_syslog_ns(void)
8082
{

kernel/printk/printk.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,9 @@ void log_buf_vmcoreinfo_setup(void)
10151015
struct dev_printk_info *dev_info = NULL;
10161016
struct syslog_namespace *ns = &init_syslog_ns;
10171017

1018-
VMCOREINFO_SYMBOL(ns->prb);
1018+
VMCOREINFO_SYMBOL(init_prb);
10191019
VMCOREINFO_SYMBOL(printk_rb_static);
1020-
VMCOREINFO_SYMBOL(ns->clear_seq);
1020+
VMCOREINFO_SYMBOL(init_clear_seq);
10211021

10221022
/*
10231023
* Export struct size and field offsets. User space tools can
@@ -5016,6 +5016,14 @@ void console_try_replay_all(void)
50165016
}
50175017
}
50185018

5019+
struct printk_ringbuffer *init_prb = &printk_rb_static;
5020+
5021+
struct latched_seq init_clear_seq = {
5022+
.latch = SEQCNT_LATCH_ZERO(clear_seq.latch),
5023+
.val[0] = 0,
5024+
.val[1] = 0,
5025+
};
5026+
50195027
struct syslog_namespace init_syslog_ns = {
50205028
.user_ns = &init_user_ns,
50215029
.ucounts = NULL,

kernel/syslog_namespace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ int syslog_ns_setup_log_buf(struct syslog_namespace *ns,
6868
infos);
6969

7070
ns->prb = prb;
71+
init_prb = prb;
7172
return 0;
7273

7374
fail_free_descs:

0 commit comments

Comments
 (0)