From: Joe Perches <joe@perches.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
linux-kbuild <linux-kbuild@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: Regression: Spurious "^A" in UML output
Date: Thu, 16 Aug 2012 06:50:49 -0700 [thread overview]
Message-ID: <1345125049.26882.16.camel@joe2Laptop> (raw)
In-Reply-To: <CAMuHMdVEKpVYn+Yr5rzdOvV5zUWrD12Fas197Mn2oVDC5YgVgw@mail.gmail.com>
On Thu, 2012-08-16 at 15:17 +0200, Geert Uytterhoeven wrote:
> In v3.6-rc1 UML, I see spurious "^A" (ASCII 1, SOH) characters in some kernel
> messages:
>
> Calibrating delay loop... 4640.76 BogoMIPS (lpj=23203840)
> pid_max: default: 32768 minimum: 301
> Mount-cache hash table entries: 256
> ^AChecking that host ptys support output SIGIO...Yes
> ^AChecking that host ptys support SIGIO on close...No, enabling workaround
> ^AUsing 2.6 host AIO
> NET: Registered protocol family 16
> bio: create slab <bio-0> at 0
> Switching to clocksource itimer
>
> This happens for all output using the "printk(UM_KERN_XXX ...)" idiom.
Were these emitted with "KERN_<LEVEL>" string constants
before this change (not <[0-7]>", but the string text
KERN_INFO, KERN_WARNING, etc...)?
> The "UM_KERN_XXX" defines are generated from the KERN_XXX defines in
> arch/um/include/shared/common-offsets.h using:
>
> DEFINE_STR(UM_KERN_EMERG, KERN_EMERG);
[]
> I.e. only the SOH character is retained in the actual define, the remainder ends
> up in the comment.
>
> Apparently the combo of DEFINE_STR() in
> arch/x86/um/shared/sysdep/kernel-offsets.h
> and sed-y in Kbuild doesn't support string constants consisting of
> multiple parts.
>
> A quick fix is the (whitespace-damaged) patch below, but this would reduce
> readability. And I'm afraid my sed-foo is not good enough to fix it better.
> Any takers?
Perhaps it's better to change the um STR macro instead
$ git grep -w DEFINE_STR
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_EMERG, KERN_EMERG);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_ALERT, KERN_ALERT);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_CRIT, KERN_CRIT);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_ERR, KERN_ERR);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_WARNING, KERN_WARNING);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_INFO, KERN_INFO);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG);
arch/um/include/shared/common-offsets.h:DEFINE_STR(UM_KERN_CONT, KERN_CONT);
arch/x86/um/shared/sysdep/kernel-offsets.h:#define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " STR(val) " " #val: : )
$ git grep -w STR arch/x86/um/shared/
arch/x86/um/shared/sysdep/kernel-offsets.h:#define STR(x) #x
arch/x86/um/shared/sysdep/kernel-offsets.h:#define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " STR(val) " " #val: : )
next prev parent reply other threads:[~2012-08-16 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 13:17 Regression: Spurious "^A" in UML output Geert Uytterhoeven
2012-08-16 13:50 ` Joe Perches [this message]
2012-08-16 14:31 ` Andreas Schwab
2012-08-16 15:03 ` Geert Uytterhoeven
2012-08-16 18:15 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345125049.26882.16.camel@joe2Laptop \
--to=joe@perches.com \
--cc=geert@linux-m68k.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox