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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180401085622.7754-3-richard@nod.at>
Date:   Sun,  1 Apr 2018 10:56:22 +0200
From:   Richard Weinberger <richard@....at>
To:     linux-kernel@...r.kernel.org
Cc:     rostedt@...dmis.org, pantelis.antoniou@...sulko.com,
        mark.rutland@....com, pmladek@...e.com,
        andriy.shevchenko@...ux.intel.com, joe@...ches.com, corbet@....net,
        me@...in.cc, sergey.senozhatsky@...il.com,
        Richard Weinberger <richard@....at>
Subject: [PATCH 2/2] printk: Use %pCOW for kmsg

...userspace likes eye candy.

Signed-off-by: Richard Weinberger <richard@....at>
---
 kernel/printk/printk.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f274fbef821d..42ea0a18081d 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -815,7 +815,10 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
 		}
 	}
 
-	printk_emit(facility, level, NULL, 0, "%s", line);
+	if (line[len - 1] == '\n')
+		line[len - 1] = '\0';
+
+	printk_emit(facility, level, NULL, 0, "%pCOW", line);
 	kfree(buf);
 	return ret;
 }
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ