All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xenproject.org,
	ross.lagerwall@citrix.com
Subject: Re: [PATCH v5 1/4] livepatch/docs: Document .bss not being cleared, and .data potentially having changed values
Date: Tue, 13 Sep 2016 10:12:07 -0600	[thread overview]
Message-ID: <57D84177020000780010E7FC@prv-mh.provo.novell.com> (raw)
In-Reply-To: <20160913155919.GA3326@char.us.oracle.com>

>>> On 13.09.16 at 17:59, <konrad.wilk@oracle.com> wrote:
> On Mon, Sep 12, 2016 at 01:49:51AM -0600, Jan Beulich wrote:
>> >>> On 11.09.16 at 17:48, <konrad.wilk@oracle.com> wrote:
>> > --- a/docs/misc/livepatch.markdown
>> > +++ b/docs/misc/livepatch.markdown
>> > @@ -875,6 +875,12 @@ section and the new function will reference the new string in the new
>> >  
>> >  This is implemented in the Xen Project hypervisor.
>> >  
>> > +Note that the .bss section is only cleared when the ELF payload is uploaded.
>> > +Subsequent apply/revert/apply operation do no clear the .bss (or reset the
>> > +.data to what it was when loaded). Hence it is the responsibility of the
>> > +creator of the payload to reset these values to known good state if they
>> > +depend on them having certain values at apply/revert states.
>> 
>> Was it, as an alternative, considered to disallow re-applying a
>> reverted patch without re-uploading?
> 
> I was thinking about it but not exactly sure of the ramifications.
> 
> That is if you go this route - revert a patch - we could go the
> next step and just unload it. But that puts some question on how
> to schedule that without corruption - say we have payload A,B and we
> are replacing A,B with C. A,B should be reverted and unloaded..
> 
> That means some form of list .. Ugh.
> 
> We could do a simpler way (which is what I think inline with your
> suggestion). This does the trick (and needs to be split up obviously)
> and also handles the case where you only have .text changes (like
> for NOPs).

At least that draft patch looks reasonable at a first glance.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-09-13 16:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-11 15:48 [PATCH v5] Livepatch fixes and general features for Xen 4.8 Konrad Rzeszutek Wilk
2016-09-11 15:48 ` [PATCH v5 1/4] livepatch/docs: Document .bss not being cleared, and .data potentially having changed values Konrad Rzeszutek Wilk
2016-09-12  7:49   ` Jan Beulich
2016-09-13 15:59     ` Konrad Rzeszutek Wilk
2016-09-13 16:12       ` Jan Beulich [this message]
2016-09-11 15:48 ` [PATCH v5 2/4] livepatch: Add limit of 2MB to payload .bss sections Konrad Rzeszutek Wilk
2016-09-12  7:56   ` Jan Beulich
2016-09-13 16:04   ` Ross Lagerwall
2016-09-11 15:48 ` [PATCH v5 3/4] livepatch: NOP if func->new_addr is zero Konrad Rzeszutek Wilk
2016-09-12  8:04   ` Jan Beulich
2016-09-11 15:48 ` [PATCH v5 4/4] livepach: Add .livepatch.hooks functions and test-case 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=57D84177020000780010E7FC@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=konrad.wilk@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.