lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 May 2020 09:37:44 +0800
From:   root <>
        汪勇10269566 <>
Subject: [PATCH] [PATCH]Fixed: line break of pr_cont not take effect in linux-rt

From: 汪勇10269566 <>

Line break of pr_cont not take effect.
Use several pr_cont to print continuous paragraph, it is expected to
have line break when line ends up with  '\n', however the paragraph
does not have line break
-printk_kthread_func will not print info before log_store insert msg
 into printk_rb, and pr_cont calls cont_add to keep data in buffer.
 cont_add only when the following conditions are met insert msg to
 1.cpu != c->cpu_owner || !(flags & LOG_CONT)
 2.c->len + len > sizeof(c->buf)

Signed-off-by: 汪勇10269566 <>
 kernel/printk/printk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 0605a74..d898f50 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1871,6 +1871,7 @@ static void cont_add(int ctx, int cpu, u32 caller_id, int facility, int level,
 	// but later continuations can add a newline.
 	if (flags & LOG_NEWLINE) {
 		c->flags |= LOG_NEWLINE;
+		cont_flush(ctx);

Powered by blists - more mailing lists