From a6192c28a3dd3ed39925714f87a5c144052a6581 Mon Sep 17 00:00:00 2001 From: kdrag0n Date: Sun, 7 Oct 2018 17:16:40 -0700 Subject: [PATCH] printk: silence TEE logs from userspace - Spams logs, pushing out useful messages - Reduces security because it exposes internal information Signed-off-by: kdrag0n --- kernel/printk/printk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index a5ca293a2755..9c74dca54d82 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -818,7 +818,8 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from) } } - if (strncmp("healthd", line, 7) == 0) { + if (unlikely(strncmp("healthd", line, 7) == 0 || strncmp("Trustonic TEE", line, 13) == 0)) + { return len; }