From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: qemu-devel@nongnu.org, x86@kernel.org,
linux-kernel@vger.kernel.org,
"Dov Murik" <dovmurik@linux.ibm.com>,
"Tom Lendacky" <thomas.lendacky@amd.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"H . Peter Anvin" <hpa@zytor.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Borislav Petkov" <bp@alien8.de>,
"Eric Biggers" <ebiggers@kernel.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Eduardo Habkost" <eduardo@habkost.net>
Subject: Re: [PATCH RFC 6/7] Revert "x86: return modified setup_data only if read as memory, not as file"
Date: Fri, 10 Feb 2023 11:31:54 +0000 [thread overview]
Message-ID: <Y+YrKouh3IIL4cXK@redhat.com> (raw)
In-Reply-To: <Y+UWwJRY/ejrIqv7@zx2c4.com>
On Thu, Feb 09, 2023 at 04:52:32PM +0100, Jason A. Donenfeld wrote:
> On Wed, Feb 08, 2023 at 04:12:51PM -0500, Michael S. Tsirkin wrote:
> > This reverts commit e935b735085dfa61d8e6d276b6f9e7687796a3c7.
> >
> > Fixes: e935b73508 ("x86: return modified setup_data only if read as memory, not as file")
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > include/hw/nvram/fw_cfg.h | 22 -------------------
> > hw/i386/x86.c | 46 +++++++++------------------------------
> > hw/nvram/fw_cfg.c | 12 +++++-----
> > 3 files changed, 16 insertions(+), 64 deletions(-)
> >
> > diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
> > index 2e503904dc..c1f81a5f13 100644
> > --- a/include/hw/nvram/fw_cfg.h
> > +++ b/include/hw/nvram/fw_cfg.h
> > @@ -117,28 +117,6 @@ struct FWCfgMemState {
> > */
> > void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, void *data, size_t len);
> >
> > -/**
> > - * fw_cfg_add_bytes_callback:
> > - * @s: fw_cfg device being modified
> > - * @key: selector key value for new fw_cfg item
> > - * @select_cb: callback function when selecting
> > - * @write_cb: callback function after a write
> > - * @callback_opaque: argument to be passed into callback function
> > - * @data: pointer to start of item data
> > - * @len: size of item data
> > - * @read_only: is file read only
> > - *
> > - * Add a new fw_cfg item, available by selecting the given key, as a raw
> > - * "blob" of the given size. The data referenced by the starting pointer
> > - * is only linked, NOT copied, into the data structure of the fw_cfg device.
> > - */
> > -void fw_cfg_add_bytes_callback(FWCfgState *s, uint16_t key,
> > - FWCfgCallback select_cb,
> > - FWCfgWriteCallback write_cb,
> > - void *callback_opaque,
> > - void *data, size_t len,
> > - bool read_only);
> > -
> > /**
> > * fw_cfg_add_string:
> > * @s: fw_cfg device being modified
> > diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> > index a00881bc64..29a5bef1d5 100644
> > --- a/hw/nvram/fw_cfg.c
> > +++ b/hw/nvram/fw_cfg.c
> > @@ -693,12 +693,12 @@ static const VMStateDescription vmstate_fw_cfg = {
> > }
> > };
> >
> > -void fw_cfg_add_bytes_callback(FWCfgState *s, uint16_t key,
> > - FWCfgCallback select_cb,
> > - FWCfgWriteCallback write_cb,
> > - void *callback_opaque,
> > - void *data, size_t len,
> > - bool read_only)
> > +static void fw_cfg_add_bytes_callback(FWCfgState *s, uint16_t key,
> > + FWCfgCallback select_cb,
> > + FWCfgWriteCallback write_cb,
> > + void *callback_opaque,
> > + void *data, size_t len,
> > + bool read_only)
> > {
> > int arch = !!(key & FW_CFG_ARCH_LOCAL);
>
> Could you leave these snippets in? This function is useful and will be
> needed in the reprise.
IMHO it is better to do a full clean revert of the patches.
Switching this one function from static to public is trivial
enough that it is not burden to do in a new impl of the RNG
seed work.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2023-02-10 11:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 21:12 [PATCH RFC 0/7] revert RNG seed mess Michael S. Tsirkin
2023-02-08 21:12 ` [PATCH RFC 1/7] Revert "x86: don't let decompressed kernel image clobber setup_data" Michael S. Tsirkin
2023-02-14 16:36 ` Daniel P. Berrangé
2023-02-08 21:12 ` [PATCH RFC 2/7] Revert "x86: do not re-randomize RNG seed on snapshot load" Michael S. Tsirkin
2023-02-14 16:36 ` Daniel P. Berrangé
2023-02-08 21:12 ` [PATCH RFC 3/7] Revert "x86: re-initialize RNG seed when selecting kernel" Michael S. Tsirkin
2023-02-14 16:37 ` Daniel P. Berrangé
2023-02-08 21:12 ` [PATCH RFC 4/7] Revert "x86: reinitialize RNG seed on system reboot" Michael S. Tsirkin
2023-02-14 16:37 ` Daniel P. Berrangé
2023-02-08 21:12 ` [PATCH RFC 5/7] Revert "x86: use typedef for SetupData struct" Michael S. Tsirkin
2023-02-09 7:41 ` Michael S. Tsirkin
2023-02-14 16:37 ` Daniel P. Berrangé
2023-02-08 21:12 ` [PATCH RFC 6/7] Revert "x86: return modified setup_data only if read as memory, not as file" Michael S. Tsirkin
2023-02-09 15:52 ` Jason A. Donenfeld
2023-02-10 11:31 ` Daniel P. Berrangé [this message]
2023-02-14 16:38 ` Daniel P. Berrangé
2023-02-08 21:12 ` [PATCH RFC 7/7] Revert "hw/i386: pass RNG seed via setup_data entry" Michael S. Tsirkin
2023-02-14 16:45 ` Daniel P. Berrangé
2023-02-14 18:03 ` Michael S. Tsirkin
2023-02-09 6:03 ` [PATCH RFC 0/7] revert RNG seed mess Dov Murik
2023-02-09 6:34 ` Dov Murik
2023-02-09 15:46 ` Nathan Chancellor
2023-02-10 11:32 ` Daniel P. Berrangé
2023-02-20 10:48 ` Daniel P. Berrangé
2023-02-20 11:54 ` Michael S. Tsirkin
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=Y+YrKouh3IIL4cXK@redhat.com \
--to=berrange@redhat.com \
--cc=Jason@zx2c4.com \
--cc=bp@alien8.de \
--cc=dovmurik@linux.ibm.com \
--cc=ebiggers@kernel.org \
--cc=eduardo@habkost.net \
--cc=hpa@zytor.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=nathan@kernel.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thomas.lendacky@amd.com \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).