public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
To: Kay Sievers <kay@vrfy.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Tejun Heo <tj@kernel.org>,
	yrl.pp-manager.tt@hitachi.com,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Joe Perches <joe@perches.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Subject: Re: Re: Re: [PATCH 0/2] [BUGFIX] printk: Fix message continuation breakage involved with structured printk
Date: Tue, 24 Dec 2013 13:54:12 +0900	[thread overview]
Message-ID: <52B91374.9000307@hitachi.com> (raw)
In-Reply-To: <CAPXgP11FbLbWs3GoHpYngAGJ+whe8PZ=5dXqR8ufdMkLT5AX0Q@mail.gmail.com>

(2013/12/24 12:00), Kay Sievers wrote:
> On Tue, Dec 24, 2013 at 3:50 AM, Yoshihiro YUNOMAE
> <yoshihiro.yunomae.ez@hitachi.com> wrote:
>> (2013/12/20 20:29), Kay Sievers wrote:
>>>
>>> On Fri, Dec 20, 2013 at 10:41 AM, Yoshihiro YUNOMAE
>>> <yoshihiro.yunomae.ez@hitachi.com> wrote:
>>>
>>>> This patch set fixes message continuation breakage involved with
>>>> structured
>>>> printk. A SCSI driver may output two continuation error messages like
>>>>       scmd_printk("foo");
>>>>       printf("bar\n");
>>>
>>>
>>> Which is the absolutely wrong thing to do. Structured logging and racy
>>> printk continuation must never be mixed. Userspace needs to be sure
>>> that dictionary entries are not subject to racy continuation hackery,
>>> and that these mwssages atomic, whole and intact.
>>
>>
>> I see.
>> As you say, user tools need to support messages output in multiple lines
>> for SMP environments even if this patch set is introduced.
>
> They cannot really, they can try to re-construct, but Information and
> context is sometimes lost with  the use of continuation lines.
> Structured logging need to be reliable and trustable, and it it is not
> "best effort", hence it cannot use continuation lines.
>
> Continuation lines are a nice debugging tool for humans only.
> Structured logging carries the human readable string but also
> machine-readable context and that alwasy needs to be safely
> machine-readable and recognizable.

I understand. I think if we make machine(user tools) handle important
messages, those messages need to be output in single line even if those
are not structured printk.

>>> Please do not mix the both and do not apply these patches.
>>
>> OK, I'll make important messages with KERN_CONT or no-prefix printk()
>> output those in single line.
>
> Yes, it should use the plain printk versions and not the one which add
> structured data.
>
> If structured logging is really wanted for more complex continuation
> lines, it might be the simplest to buffer the line locally, instead of
> the single printk-owned buffer, before the line is emitted to printk.

Yes, I'll do that.

Thanks,
Yoshihiro YUNOMAE

-- 
Yoshihiro YUNOMAE
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: yoshihiro.yunomae.ez@hitachi.com



      reply	other threads:[~2013-12-24  4:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  9:41 [PATCH 0/2] [BUGFIX] printk: Fix message continuation breakage involved with structured printk Yoshihiro YUNOMAE
2013-12-20  9:41 ` [PATCH 1/2] printk: Add dictionary information in structure cont Yoshihiro YUNOMAE
2013-12-20 11:32   ` Kay Sievers
2013-12-20  9:41 ` [PATCH 2/2] printk: Delete LOG_NEWLINE flag for structured printk Yoshihiro YUNOMAE
2013-12-20 11:36   ` Kay Sievers
2013-12-20 11:29 ` [PATCH 0/2] [BUGFIX] printk: Fix message continuation breakage involved with " Kay Sievers
2013-12-24  2:50   ` Yoshihiro YUNOMAE
2013-12-24  3:00     ` Kay Sievers
2013-12-24  4:54       ` Yoshihiro YUNOMAE [this message]

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=52B91374.9000307@hitachi.com \
    --to=yoshihiro.yunomae.ez@hitachi.com \
    --cc=akpm@linux-foundation.org \
    --cc=eiichi.tsukata.xh@hitachi.com \
    --cc=fweisbec@gmail.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=joe@perches.com \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=tj@kernel.org \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /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