Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbdGUFsE (ORCPT ); Fri, 21 Jul 2017 01:48:04 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:38762 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751709AbdGUFsD (ORCPT ); Fri, 21 Jul 2017 01:48:03 -0400 MIME-Version: 1.0 In-Reply-To: <20170721015941.GB9355@yexl-desktop> References: <20170720014238.GH27396@yexl-desktop> <20170721015941.GB9355@yexl-desktop> From: Kees Cook Date: Thu, 20 Jul 2017 22:48:01 -0700 X-Google-Sender-Auth: ODrR2dKiHWfaZ20HWgChwvFvSus Message-ID: Subject: Re: [lkp-robot] [include/linux/string.h] 6974f0c455: kernel_BUG_at_lib/string.c To: Ye Xiaolong Cc: Linus Torvalds , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , Masami Hiramatsu , Daniel Micay , Arnd Bergmann , Mark Rutland , Daniel Axtens , Rasmus Villemoes , Andy Shevchenko , Chris Metcalf , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Andrew Morton , LKML , LKP Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1899 Lines: 57 On Thu, Jul 20, 2017 at 6:59 PM, Ye Xiaolong wrote: > On 07/19, Linus Torvalds wrote: >>Hmm. I wonder why the kernel test robot ends up having that annoying >>line doubling for the dmesg. >> > > Hmm, this line doubling issue should be caused by we set both > 'earlyprintk=ttyS0,115200' and 'console=ttyS0,115200' in cmdline, after I > remove any of it, this issue is gone, is it an inappropriate setting? This is a weird behavior. Normally the boot console (in this case "earlyser0") should be disabled when the regular console starts. In your dmesg I see: [ 0.000000] bootconsole [earlyser0] enabled ... [ 0.003333] console [ttyS0] enabled [ 0.003333] console [ttyS0] enabled This is where repeating starts, and I would have expected to see: [ 0.000000] bootconsole [earlyser0] enabled ... [ 0.000000] console [ttyS0] enabled [ 0.000000] console [ttyS0] enabled [ 0.000000] bootconsole [earlyser0] disabled [ 0.000000] bootconsole [earlyser0] disabled And that would be the end of doubling. Actually, with your command-line ("earlyprintk=ttyS0,115200 console=ttyS0,115200 console=tty0") I would expect: [ 0.000000] console [tty0] enabled [ 0.000000] bootconsole [earlyser0] disabled [ 0.000000] console [ttyS0] enabled I don't see any mention of tty0, though. I wonder if that is confusing the disable code. The only way I would normally expect the boot console not to get unregistered is if ",keep" was appended to it... The code is in kernel/printk/printk.c, FWIW. Also, it looks like your kernel command line is cut off: ... earlyprintk=ttyS0,115200 console=ttyS0,115200 console=tty0 vga= With your script showing "... vga=normal ..." That's only 968 characters, well shy of x86's 2048 limit. Is this a line length issue with qemu output, or does /proc/cmdline report the same truncation? -Kees -- Kees Cook Pixel Security