mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: "Leizhen (ThunderTown)" <thunder.leizhen@huaweicloud.com>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Ogness <john.ogness@linutronix.de>,
	linux-kernel@vger.kernel.org,
	Zhen Lei <thunder.leizhen@huawei.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3 2/2] hexdump: add a new dump prefix DUMP_PREFIX_CUSTOM
Date: Wed, 16 Aug 2023 12:34:18 +0900	[thread overview]
Message-ID: <20230816033418.GD681074@google.com> (raw)
In-Reply-To: <167a4aee-7a9d-a024-7594-97b84146196c@huaweicloud.com>

On (23/08/16 11:20), Leizhen (ThunderTown) wrote:
> > IMHO, this is pretty bad interface.
> > 
> >   + From the user POV:
> > 
> >     It is far from clear what values will be passed for the given
> >     printf format. It can be docummented but...
> > 
> > 
> >   + From the security POV:
> > 
> >     The compiler could not check if the printk() parameters
> >     match the format. I mean if the number of types of
> >     the parameters are correct.
> 
> Yes, it has these problems. So, back to v2, how about add DUMP_PREFIX_ADDRESS_LOW16?
> Or named DUMP_PREFIX_ADDR16 or others. Or change the format of DUMP_PREFIX_ADDRESS
> from "%p" to "%px",Or add DUMP_PREFIX_RAWADDR. Or keep the status quo.

Linus quite likely will dislike (with passion) the idea of using %px.

  reply	other threads:[~2023-08-16  3:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  7:49 [PATCH v3 0/2] hexdump: minimize the output width of address and offset thunder.leizhen
2023-08-11  7:49 ` [PATCH v3 1/2] hexdump: minimize the output width of the offset thunder.leizhen
2023-08-11  7:49 ` [PATCH v3 2/2] hexdump: add a new dump prefix DUMP_PREFIX_CUSTOM thunder.leizhen
2023-08-15 14:30   ` Petr Mladek
2023-08-16  3:20     ` Leizhen (ThunderTown)
2023-08-16  3:34       ` Sergey Senozhatsky [this message]
2023-08-16  6:32         ` Leizhen (ThunderTown)
2023-08-16  9:04       ` Petr Mladek
2023-08-16 11:24         ` Leizhen (ThunderTown)

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=20230816033418.GD681074@google.com \
    --to=senozhatsky@chromium.org \
    --cc=john.ogness@linutronix.de \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=thunder.leizhen@huawei.com \
    --cc=thunder.leizhen@huaweicloud.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

all inboxes | Powered by JetHome®