From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xenproject.org,
ross.lagerwall@citrix.com
Subject: Re: [PATCH v7 1/5] livepatch: Disallow applying after an revert
Date: Thu, 22 Sep 2016 06:16:09 -0400 [thread overview]
Message-ID: <20160922101608.GD5975@localhost.localdomain> (raw)
In-Reply-To: <57E3BE9C0200007800111719@prv-mh.provo.novell.com>
On Thu, Sep 22, 2016 at 03:21:00AM -0600, Jan Beulich wrote:
> >>> On 21.09.16 at 18:57, <konrad.wilk@oracle.com> wrote:
> > @@ -325,8 +327,13 @@ static int move_payload(struct payload *payload, struct livepatch_elf *elf)
> > * and .shstrtab. For the non-relocate we allocate and copy these
> > * via other means - and the .rel we can ignore as we only use it
> > * once during loading.
> > + *
> > + * Also ignore sections with zero size. Those can be .data, or .bss.
>
> Or any others. Please make this apparent by adding "e.g." or some
> such.
<nods>
>
> > + *
> > + * This logic must MATCH what is done in livepatch_elf_resolve_symbols.
>
> Instead of such a comment, is it perhaps worth making an inline
> function or macro to cover the three instances where these
> checks need to match up?
Yes. That would be much simpler.
>
> > @@ -374,14 +381,18 @@ static int move_payload(struct payload *payload, struct livepatch_elf *elf)
> >
> > for ( i = 1; i < elf->hdr->e_shnum; i++ )
> > {
> > - if ( elf->sec[i].sec->sh_flags & SHF_ALLOC )
> > + if ( elf->sec[i].sec->sh_flags & SHF_ALLOC && elf->sec[i].sec->sh_size )
>
> Please parenthesize the & in cases like this.
>
> Jan
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-22 10:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 16:57 [PATCH v7] Livepatch fixes and general features for Xen 4.8 Konrad Rzeszutek Wilk
2016-09-21 16:57 ` [PATCH v7 1/5] livepatch: Disallow applying after an revert Konrad Rzeszutek Wilk
2016-09-22 9:21 ` Jan Beulich
2016-09-22 10:16 ` Konrad Rzeszutek Wilk [this message]
2016-09-22 23:55 ` Konrad Rzeszutek Wilk
2016-09-23 6:18 ` Jan Beulich
2016-09-21 16:57 ` [PATCH v7 2/5] livepatch: Add limit of 2MB to payload .bss sections Konrad Rzeszutek Wilk
2016-09-22 9:21 ` Jan Beulich
2016-09-21 16:57 ` [PATCH v7 3/5] livepatch: NOP if func->new_addr is zero Konrad Rzeszutek Wilk
2016-09-22 9:23 ` Jan Beulich
2016-09-21 16:57 ` [PATCH v7 4/5] livepatch: Drop _jmp from arch_livepatch_[apply, revert]_jmp Konrad Rzeszutek Wilk
2016-09-22 9:24 ` Ross Lagerwall
2016-09-21 16:57 ` [PATCH v7 5/5] 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=20160922101608.GD5975@localhost.localdomain \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.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.