[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 6/7] Revert "x86: return modified setup_data only if read
From: |
Daniel P . Berrangé |
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 |
User-agent: |
Mutt/2.2.9 (2022-11-12) |
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 :|
- [PATCH RFC 1/7] Revert "x86: don't let decompressed kernel image clobber setup_data", (continued)
- [PATCH RFC 1/7] Revert "x86: don't let decompressed kernel image clobber setup_data", Michael S. Tsirkin, 2023/02/08
- [PATCH RFC 2/7] Revert "x86: do not re-randomize RNG seed on snapshot load", Michael S. Tsirkin, 2023/02/08
- [PATCH RFC 3/7] Revert "x86: re-initialize RNG seed when selecting kernel", Michael S. Tsirkin, 2023/02/08
- [PATCH RFC 4/7] Revert "x86: reinitialize RNG seed on system reboot", Michael S. Tsirkin, 2023/02/08
- [PATCH RFC 6/7] Revert "x86: return modified setup_data only if read as memory, not as file", Michael S. Tsirkin, 2023/02/08
- [PATCH RFC 5/7] Revert "x86: use typedef for SetupData struct", Michael S. Tsirkin, 2023/02/08
- [PATCH RFC 7/7] Revert "hw/i386: pass RNG seed via setup_data entry", Michael S. Tsirkin, 2023/02/08
- Re: [PATCH RFC 0/7] revert RNG seed mess, Dov Murik, 2023/02/09
- Re: [PATCH RFC 0/7] revert RNG seed mess, Nathan Chancellor, 2023/02/09