lists.openwall.net   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  linux-cve-announce  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:	Wed, 1 Jan 2014 17:44:06 +0530
From:	Arun KS <arunks.linux@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Andrew Morton <akpm@...ux-foundation.org>, joe@...ches.com,
	tj@...nel.org, fweisbec@...il.com, paul.gortmaker@...driver.com
Subject: [PATCH] printk: flush conflicting continuation line

>From d751f9a0cb6329ae3171f6e1cb85e4a3aa792d73 Mon Sep 17 00:00:00 2001
From: Arun KS <arun.ks@...adcom.com>
Date: Wed, 1 Jan 2014 17:24:46 +0530
Subject: printk: flush conflicting continuation line

An earlier newline was missing and current print is from different task.
In this scenario flush the continuation line and store this line seperatly.

This patch fix the below scenario of timestamp interleaving,
<6>[   28.154370 ] read_word_reg : reg[0x 3], reg[0x 4]  data [0x 642]
<6>[   28.155428 ] uart disconnect
<6>[   31.947341 ] dvfs[cpufreq.c<275>]:plug-in cpu<1> done
<4>[   28.155445 ] UART detached : send switch state 201
<6>[   32.014112 ] read_reg : reg[0x 3] data[0x21]

Signed-off-by: Arun KS <getarunks@...il.com>
Signed-off-by: Arun KS <arun.ks@...adcom.com>
---
 kernel/printk/printk.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index be7c86b..65ccaeb 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1604,7 +1604,10 @@ asmlinkage int vprintk_emit(int facility, int level,
  if (!(lflags & LOG_PREFIX))
  stored = cont_add(facility, level, text, text_len);
  cont_flush(LOG_NEWLINE);
- }
+ /* Flush conflicting buffer. An earlier newline was missing
+ * and current print is from different task */
+ } else if (cont.len && cont.owner != current)
+ cont_flush(LOG_NEWLINE);

  if (!stored)
  log_store(facility, level, lflags, 0,
-- 
1.7.6

Download attachment "0001-printk-flush-conflicting-continuation-line.patch" of type "application/octet-stream" (1477 bytes)

Powered by blists - more mailing lists