From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v4 1/9] livepatch: Clear .bss when payload is reverted
Date: Fri, 9 Sep 2016 09:50:19 -0400 [thread overview]
Message-ID: <20160909135019.GC18325@char.us.oracle.com> (raw)
In-Reply-To: <b8f0abcb-1ce3-c6d7-f0a3-4d64b66c01d3@citrix.com>
On Fri, Sep 09, 2016 at 02:33:18PM +0100, Ross Lagerwall wrote:
> On 08/24/2016 03:22 AM, Konrad Rzeszutek Wilk wrote:
> > So that when we apply the patch again the .bss is cleared.
> > Otherwise we may find some variables containing old values.
> >
> > The payloads may contain various .bss - especially if -fdata-sections
> > is used which can create .bss.<name> sections.
> >
>
> After having thought about this again, I'm not sure it makes much sense. Any
> data sections in the payload are not reset to their initial values, so
> resetting the bss only may result in an unexpected combination of new & old
> data/bss.
Regardless of that I think clearing the .bss upon applying the livepatch is
still the right thing to do.
Regarding of the .data - we could have a copy of the .data the first time
we load - and then during application copy over it from the original one?.
>
> Perhaps it just needs to be documented that a payload's bss/data is
> untouched across revert/apply?
It really cuts down on bugs if we clear the .bss. It is kind of ingrained in every
developer that the .bss is zero-ed out at startup.
>
> --
> Ross Lagerwall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-09 13:50 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 2:22 [PATCH v4] Livepatch fixes and features for v4.8 Konrad Rzeszutek Wilk
2016-08-24 2:22 ` [PATCH v4 1/9] livepatch: Clear .bss when payload is reverted Konrad Rzeszutek Wilk
2016-08-24 8:55 ` Jan Beulich
2016-08-25 16:08 ` Andrew Cooper
2016-09-06 16:51 ` Konrad Rzeszutek Wilk
2016-09-07 9:18 ` Jan Beulich
2016-09-06 16:47 ` Konrad Rzeszutek Wilk
2016-09-07 8:02 ` Jan Beulich
2016-09-08 9:25 ` Konrad Rzeszutek Wilk
2016-09-09 13:33 ` Ross Lagerwall
2016-09-09 13:50 ` Konrad Rzeszutek Wilk [this message]
2016-09-09 13:58 ` Ross Lagerwall
2016-09-09 15:28 ` Jan Beulich
2016-08-24 2:22 ` [PATCH v4 2/9] livepatch: Deal with payloads without any .text Konrad Rzeszutek Wilk
2016-08-24 2:22 ` [PATCH v4 3/9] version/livepatch: Move xen_build_id_check to version.h Konrad Rzeszutek Wilk
2016-08-24 2:22 ` [PATCH v4 4/9] version: Print build-id at bootup Konrad Rzeszutek Wilk
2016-08-24 8:58 ` Jan Beulich
2016-09-06 16:57 ` Konrad Rzeszutek Wilk
2016-09-07 8:03 ` Jan Beulich
2016-09-09 13:37 ` Ross Lagerwall
2016-08-24 2:22 ` [PATCH v4 5/9] livepatch: Move code from prepare_payload to own routine Konrad Rzeszutek Wilk
2016-08-25 16:02 ` Ross Lagerwall
2016-08-24 2:22 ` [PATCH v4 6/9] livepatch: Add parsing for the symbol+0x<offset> Konrad Rzeszutek Wilk
2016-08-24 9:08 ` Jan Beulich
2016-09-06 19:56 ` Konrad Rzeszutek Wilk
2016-09-07 8:10 ` Jan Beulich
2016-09-08 9:22 ` Konrad Rzeszutek Wilk
2016-09-08 10:01 ` Jan Beulich
2016-09-09 14:28 ` Ross Lagerwall
2016-08-24 2:22 ` [PATCH v4 7/9] livepatch: NOP if func->new_[addr] is zero Konrad Rzeszutek Wilk
2016-08-24 9:13 ` Jan Beulich
2016-09-06 20:05 ` Konrad Rzeszutek Wilk
2016-09-07 8:13 ` Jan Beulich
2016-08-24 2:22 ` [PATCH v4 8/9] symbols: Generate an xen-sym.map Konrad Rzeszutek Wilk
2016-08-24 9:16 ` Jan Beulich
2016-09-09 13:43 ` Ross Lagerwall
2016-08-24 2:22 ` [PATCH v4 9/9] livepach: Add .livepatch.hooks functions and test-case Konrad Rzeszutek Wilk
2016-09-06 17:22 ` Konrad Rzeszutek Wilk
2016-09-06 18:25 ` Andrew Cooper
2016-09-08 1:18 ` Konrad Rzeszutek Wilk
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=20160909135019.GC18325@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=jbeulich@suse.com \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xenproject.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).