All of lore.kernel.org
 help / color / mirror / Atom feed
* Version Detection
@ 2007-06-18 18:32 Quang Ngo
  2007-06-19 10:58 ` Petersson, Mats
  0 siblings, 1 reply; 4+ messages in thread
From: Quang Ngo @ 2007-06-18 18:32 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 348 bytes --]

Given the /boot/xen-gz and /vmlinuz files, how do you detect which version of XEN and Linux kernel these files are? Basically, I need to parse their contents and check for their signatures and embedded version strings, if any. Unfortunately, I'm unable to find information on the formats of these files.Any help would be appreciated.
Thanks,Quang 

[-- Attachment #1.2: Type: text/html, Size: 523 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Version Detection
  2007-06-18 18:32 Quang Ngo
@ 2007-06-19 10:58 ` Petersson, Mats
  0 siblings, 0 replies; 4+ messages in thread
From: Petersson, Mats @ 2007-06-19 10:58 UTC (permalink / raw)
  To: Quang Ngo, xen-devel

 

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com 
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Quang Ngo
> Sent: 18 June 2007 19:32
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] Version Detection
> 
> Given the /boot/xen-gz and /vmlinuz files, how do you detect 
> which version of XEN and Linux kernel these files are? 
> Basically, I need to parse their contents and check for their 
> signatures and embedded version strings, if any. 
> Unfortunately, I'm unable to find information on the formats 
> of these files.

For the standard build of Xen, examining the binaries will not trivially
tell which version of Xen it is. There are functions in
.../xen/common/version.c, but those return one small part of the whole
version numbegr (eg 3.1.0 is major = 3, minor=1, extra="0") as integers
and strings respectively.

There is no "encoded" version numbers in some header or datablock that
you can search for, as far as I can see. 

Of course, "xm info" once the binary is booted would give you all the
info you need and more. 

I haven't looked at the "vmlinuz" if it's got any version info. 

--
Mats
> 
> Any help would be appreciated.
> 
> Thanks,
> Quang 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Version Detection
@ 2007-06-19 15:47 Quang Ngo
  2007-06-19 16:15 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Quang Ngo @ 2007-06-19 15:47 UTC (permalink / raw)
  To: Petersson, Mats, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1763 bytes --]

Mats,
 
Thanks for your response.  It would be nice if there is some sort of version info in the XEN vmlinuz image.  Regular vmlinuz has signature at offset 0x202 ("HdrS") and kernel info at an offset (specified at 0x20e) + 0x200.
 
Also, I wish there is version info in /proc/xen.
 
If you find a way to find version info for a XEN vmlinuz image please let me know.
 
Thanks,
Quang
 



> Date: Tue, 19 Jun 2007 12:58:48 +0200> From: Mats.Petersson@amd.com> To: quang4ngo@hotmail.com; xen-devel@lists.xensource.com> Subject: RE: [Xen-devel] Version Detection> > -----Original Message-----> > From: xen-devel-bounces@lists.xensource.com > > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Quang Ngo> > Sent: 18 June 2007 19:32> > To: xen-devel@lists.xensource.com> > Subject: [Xen-devel] Version Detection> > > > Given the /boot/xen-gz and /vmlinuz files, how do you detect > > which version of XEN and Linux kernel these files are? > > Basically, I need to parse their contents and check for their > > signatures and embedded version strings, if any. > > Unfortunately, I'm unable to find information on the formats > > of these files.> > For the standard build of Xen, examining the binaries will not trivially> tell which version of Xen it is. There are functions in> .../xen/common/version.c, but those return one small part of the whole> version numbegr (eg 3.1.0 is major = 3, minor=1, extra="0") as integers> and strings respectively.> > There is no "encoded" version numbers in some header or datablock that> you can search for, as far as I can see. > > Of course, "xm info" once the binary is booted would give you all the> info you need and more. > > I haven't looked at the "vmlinuz" if it's got any version info. > > --> Mats

[-- Attachment #1.2: Type: text/html, Size: 2298 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Version Detection
  2007-06-19 15:47 Version Detection Quang Ngo
@ 2007-06-19 16:15 ` Keir Fraser
  0 siblings, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2007-06-19 16:15 UTC (permalink / raw)
  To: Quang Ngo, Petersson, Mats, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1082 bytes --]

On 19/6/07 16:47, "Quang Ngo" <quang4ngo@hotmail.com> wrote:

> Thanks for your response.  It would be nice if there is some sort of version
> info in the XEN vmlinuz image.  Regular vmlinuz has signature at offset 0x202
> ("HdrS") and kernel info at an offset (specified at 0x20e) + 0x200.
>  
> Also, I wish there is version info in /proc/xen.
>  
> If you find a way to find version info for a XEN vmlinuz image please let me
> know.

We could add something quite easily for Xen itself, although bear in mind
that both xen-syms and xen.gz are Elf files, so putting info at a fixed
offset won¹t work. We could put the info at a fixed offset into the text
segment (e.g., immediately before or after the multiboot header).

Doing the same for vmlinux files is a bit tricky. There are lots of Xen
repositories maintained independently now, and getting everyone to agree on
versioning information would likely be tricky. And soon enough Xen support
will be in mainline, and discussions on image format and boot protocol are
still in progress there.

 -- Keir


[-- Attachment #1.2: Type: text/html, Size: 1545 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-19 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-19 15:47 Version Detection Quang Ngo
2007-06-19 16:15 ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2007-06-18 18:32 Quang Ngo
2007-06-19 10:58 ` Petersson, Mats

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.