xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Wieczorkiewicz, Pawel" <wipawel@amazon.de>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: Wei Liu <wl@xen.org>, Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel <xen-devel@lists.xen.org>,
	"Pohlack, Martin" <mpohlack@amazon.de>,
	"Wieczorkiewicz, Pawel" <wipawel@amazon.de>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [livepatch: independ. modules 3/3] python: Add XC binding for Xen build ID
Date: Tue, 20 Aug 2019 11:04:13 +0000	[thread overview]
Message-ID: <BF511E1D-FB7E-4616-AD0C-F74159F09809@amazon.com> (raw)
In-Reply-To: <20190819204055.GC1457@mail-itl>


> On 19. Aug 2019, at 22:40, Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> wrote:
> 
> On Thu, Aug 15, 2019 at 09:44:00AM +0000, Pawel Wieczorkiewicz wrote:
>> Extend the list of xc() object methods with additional one to display
>> Xen's buildid. The implementation follows the libxl implementation
>> (e.g. max buildid size assumption being XC_PAGE_SIZE).
>> 
>> Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
>> Reviewed-by: Martin Mazein <amazein@amazon.de>
>> Reviewed-by: Andra-Irina Paraschiv <andraprs@amazon.com>
>> Reviewed-by: Norbert Manthey <nmanthey@amazon.de>
>> ---
>> v2:
>> 
…snip...
>> 
>> +static PyObject *pyxc_xenbuildid(XcObject *self)
>> +{
>> +    xen_build_id_t *buildid;
>> +    int i, r;
>> +    char *str;
>> +
>> +    buildid = alloca(sizeof(buildid->len) + XC_PAGE_SIZE);
>> +    buildid->len = XC_PAGE_SIZE - sizeof(*buildid);
> 
> Those doesn't match. You allocated XC_PAGE_SIZE in addition to
> sizeof(buildid->len). I'd change to alloca(XC_PAGE_SIZE) - it is
> unlikely that izeof(buildid->len) would be larger than XC_PAGE_SIZE and
> we do assume it in other places anyway.

ACK. Will fix.

> 
>> +
>> +    r = xc_version(self->xc_handle, XENVER_build_id, buildid);
>> +    if ( r <= 0 )
>> +        return pyxc_error_to_exception(self->xc_handle);
>> +
>> 

…snip...

> 
> -- 
> Best Regards,
> Marek Marczykowski-Górecki
> Invisible Things Lab
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?


Best Regards,
Pawel Wieczorkiewicz






Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879


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

  reply	other threads:[~2019-08-20 11:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 12:58 [livepatch: independ. modules 1/3] livepatch: Always check hypervisor build ID upon hotpatch upload Pawel Wieczorkiewicz
2019-04-16 12:58 ` [livepatch: independ. modules 2/3] livepatch: Allow to override inter-modules buildid dependency Pawel Wieczorkiewicz
2019-08-20 13:28   ` [Xen-devel] [livepatch: independ. modules v2 " Pawel Wieczorkiewicz
2019-08-20 13:35     ` Julien Grall
2019-08-20 14:09       ` Wieczorkiewicz, Pawel
2019-08-20 14:28         ` Julien Grall
2019-08-20 14:52           ` Wieczorkiewicz, Pawel
2019-08-20 15:11             ` Julien Grall
2019-04-16 12:58 ` [livepatch: independ. modules 3/3] python: Add XC binding for Xen build ID Pawel Wieczorkiewicz
2019-08-15  9:44   ` [Xen-devel] " Pawel Wieczorkiewicz
2019-08-16 12:47     ` Wei Liu
2019-08-16 12:52       ` Wieczorkiewicz, Pawel
2019-08-19 20:40     ` Marek Marczykowski-Górecki
2019-08-20 11:04       ` Wieczorkiewicz, Pawel [this message]
2019-08-20 12:51     ` [Xen-devel] [livepatch: independ. modules v3 " Pawel Wieczorkiewicz
2019-08-20 13:00       ` Marek Marczykowski-Górecki
2019-04-23 15:47 ` [livepatch: independ. modules 1/3] livepatch: Always check hypervisor build ID upon hotpatch upload Konrad Rzeszutek Wilk
2019-04-29  9:46 ` [livepatch: independ. modules v2 " Pawel Wieczorkiewicz

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=BF511E1D-FB7E-4616-AD0C-F74159F09809@amazon.com \
    --to=wipawel@amazon.de \
    --cc=ian.jackson@eu.citrix.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=mpohlack@amazon.de \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xen.org \
    --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).