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: <CAD=hENcu4wKELCt61O+p-RtOpaHHoaAQhr7Ygt9pdr9Hc4s2Wg@mail.gmail.com>
Date:   Mon, 28 Aug 2023 18:15:42 +0800
From:   Zhu Yanjun <zyjzyj2000@...il.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     Zhu Yanjun <yanjun.zhu@...ux.dev>,
        Li Zhijian <lizhijian@...itsu.com>, linux-rdma@...r.kernel.org,
        "pmladek@...e.com" <pmladek@...e.com>,
        "senozhatsky@...omium.org" <senozhatsky@...omium.org>,
        Steven Rostedt <rostedt@...dmis.org>, jgg@...pe.ca,
        leon@...nel.org, linux-kernel@...r.kernel.org,
        rpearsonhpe@...il.com,
        Daisuke Matsuda <matsuda-daisuke@...itsu.com>
Subject: Re: [PATCH v2 1/2] RDMA/rxe: Improve newline in printing messages

On Mon, Aug 28, 2023 at 4:56 PM John Ogness <john.ogness@...utronix.de> wrote:
>
> Hi Zhu,
>
> On 2023-08-23, Zhu Yanjun <yanjun.zhu@...ux.dev> wrote:
> >> Previously rxe_{dbg,info,err}() macros are appened built-in newline,
> >> sut some users will add redundent newline some times. So remove the
> >> built-int newline for this macros.
> >
> > This commit is based on this statement "A newline help flushing
> > message out.".
> >
> > All the rxe_xxx log functions will finally call printk.
> >
> > To pirntk, there is no such statement in kernel document. Not sure if
> > Jason and Leon can decide this statement correct or not.
>
> I also could not find any documentation explaining the semantics of
> printk with regard to LOG_CONT and "\n". I suppose this should be added
> somewhere.
>
> However, the above statement is correct. You can see this in the code
> [0]. All printk messages should have a trailing newline unless it is
> only a partial message that will be appended.

Thanks a lot.
Do you mean "a newline can help flushing messages out"?
That is, in printk, the message will be buffered until it is full or
it meets a newline?

Zhu Yanjun


>
> John Ogness
>
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/printk/printk.c?h=v6.5#n2254

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ