linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Raphael Gianotti <raphgi@linux.microsoft.com>
To: linux-kernel@vger.kernel.org
Subject: How to extract linux kernel version information from a kernel image?
Date: Fri, 18 Sep 2020 12:47:13 -0700	[thread overview]
Message-ID: <b8e9ee52-c0fd-a6cf-3054-4220636a60e9@linux.microsoft.com> (raw)

Hi,

I have been investigating a way to extract the version strong from a 
kernel image (e.g., vmlinux). The version string I've been looking at is 
essentially the linux_banner symbol.

We'll use IMA to measure the version string on the kexec system call, 
providing a way for an attestation service, for instance, to attest to 
what version of the kernel is running on the client.

I haven't found a way to extract the version from the image that isn't 
simply searching the whole image for it. I was hoping someone here may 
be able to point me to a better approach to retrieve the linux_banner 
symbol value from an image or  any existing kernel code that does 
similar parsing.

If that matters for any suggestions, my current focus is on ARM64 images 
(if the code ends up having to be arch specific).

Thanks,

-Raphael


                 reply	other threads:[~2020-09-18 19:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=b8e9ee52-c0fd-a6cf-3054-4220636a60e9@linux.microsoft.com \
    --to=raphgi@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.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).