public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Donnellan <ajd@linux.ibm.com>
To: Benjamin Gray <bgray@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] init/initramfs: Fix argument forwarding to panic() in panic_show_mem()
Date: Wed, 22 Mar 2023 16:29:13 +1100	[thread overview]
Message-ID: <7582f7bcd123f88d267a26bcd15a94aeeb238474.camel@linux.ibm.com> (raw)
In-Reply-To: <20230320230534.50174-1-bgray@linux.ibm.com>

On Tue, 2023-03-21 at 10:05 +1100, Benjamin Gray wrote:
> Forwarding variadic argument lists can't be done by passing a va_list
> to a function with signature foo(...) (as panic() has). It ends up
> interpreting the va_list itself as a single argument instead of
> iterating it. printf() happily accepts it of course, leading to
> corrupt
> output.
> 
> Convert panic_show_mem() to a macro to allow forwarding the
> arguments.
> The function is trivial enough that it's easier than trying to
> introduce
> a vpanic() variant.
> 
> Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>

Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>

-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd@linux.ibm.com   IBM Australia Limited

  reply	other threads:[~2023-03-22  5:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 23:05 [PATCH] init/initramfs: Fix argument forwarding to panic() in panic_show_mem() Benjamin Gray
2023-03-22  5:29 ` Andrew Donnellan [this message]
2023-04-16  8:45 ` Masahiro Yamada

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=7582f7bcd123f88d267a26bcd15a94aeeb238474.camel@linux.ibm.com \
    --to=ajd@linux.ibm.com \
    --cc=bgray@linux.ibm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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