xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH 3/3] Update README.md
Date: Tue, 14 Jun 2016 11:36:21 -0400	[thread overview]
Message-ID: <20160614153621.GF9456@char.us.oracle.com> (raw)
In-Reply-To: <1465556565-26403-3-git-send-email-ross.lagerwall@citrix.com>

On Fri, Jun 10, 2016 at 12:02:45PM +0100, Ross Lagerwall wrote:
> Update the example and project status. Add Contributing and Maintainers
> sections.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> ---
>  README.md | 76 ++++++++++++++++++++++++++++++++++++++++++++-------------------
>  1 file changed, 53 insertions(+), 23 deletions(-)
> 
> diff --git a/README.md b/README.md
> index 9fb709f..653c624 100644
> --- a/README.md
> +++ b/README.md
> @@ -2,27 +2,34 @@ livepatch-build
>  =============
>  
>  livepatch-build is a tool for building LivePatch patches from source code
> -patches.  It takes as input, a Xen tree and a patch and outputs an
> +patches.  It takes as input, a Xen tree and a patch and outputs a
>  `.livepatch` module containing containing the live patch.
>  
>  Quick start
>  -----------
>  First checkout the code, and then run `make` to build it.
>  
> -Here is an example of building a patch for XSA-106:
> +Here is an example of building a live patch for Xen for some XSA.
> +First build Xen, install it on a host somewhere and reboot:
> +```
> +$ cp -r ~/src/xen ~/src/xenbuild
> +$ cd ~/src/xen/xen
> +$ make nconfig # Make sure to set CONFIG_LIVEPATCH=y
> +$ make
> +$ BUILDID=$(readelf -Wn xen-syms | awk '/Build ID:/ {print $3}')
> +```
> +
> +Next, build a live patch, using a patch and the source, build ID, and
> +.config from the original build:
>  ```
> -$ cd ~/src/xen
> -$ git reset --hard
> -$ git clean -x -f -d
> -$ git checkout 346d4545569928b652c40c7815c1732676f8587c^
>  $ cd ~/src/livepatch-build
> -$ wget -q 'http://xenbits.xen.org/xsa/xsa106.patch'
> -$ ./livepatch-build --xen-debug -s ~/src/xen -p xsa106.patch -o out
> -Building LivePatch patch: xsa106
> +$ ./livepatch-build -s ~/src/xenbuild -p ~/src/xsa.patch -o out \
> +    -c ~/src/xen/xen/.config --depends $BUILDID
> +Building LivePatch patch: xsa
>  
> -Xen directory: /home/ross/src/xen
> -Patch file: /home/ross/src/livepatch-build/xsa106.patch
> -Output directory: /home/ross/src/livepatch-build/out
> +Xen directory: /home/ross/src/xenbuild
> +Patch file: /home/ross/src/xsa.patch
> +Output directory: /home/ross/src/livepatch-build-tools/out
>  ================================================
>  
>  Testing patch file...
> @@ -32,22 +39,45 @@ Unapply patch and build with 4 CPU(s)...
>  Extracting new and modified ELF sections...
>  Processing xen/arch/x86/x86_emulate.o
>  Creating patch module...
> -xsa106.livepatch created successfully
> +xsa.livepatch created successfully
>  
> -$ ls -lh out/xsa106.livepatch
> --rw-rw-r--. 1 ross ross 418K Oct 12 12:02 out/xsa106.livepatch
> +$ ls -lh out/xsa.livepatch
> +-rwxrwxr-x. 1 ross ross 135K Jun 10 09:32 out/xsa.livepatch
> +```
> +
> +Finally, copy the live patch to the host and load it:
> +```
> +$ scp out/xsa.livepatch myhost:
> +$ ssh myhost 'xen-livepatch load xsa.livepatch'
> +Uploading xsa.livepatch (135840 bytes)
> +Performing apply:. completed
> +$ ssh myhost 'xen-livepatch list'
> + ID                                     | status
> +----------------------------------------+------------
> +xsa                                     | APPLIED
>  ```
>  
>  Project Status
>  --------------
> -This is prototype code:
> - * There's no way to apply built patches
> - * Patches cannot be built for some source patches
> - * The output format does not correspond to the latest LivePatch design
> -
> -With no source patch modifications, live patches can be built for every
> -XSA that applies to x86 back to XSA-90 except for XSA-97, XSA-111,
> -XSA-112, and XSA-114 (83% success rate).
> +Live patches can be built and applied for many changes, including most
> +XSAs; however, there are still some cases which require changing the
> +source patch to allow it to be built as a live patch.
> +
> +This tool currently supports x86 only.
> +
> +It is intended that some or all of this project will merge back into
> +kpatch-build rather being maintained as a fork.
> +
> +Contributing
> +------------
> +Please send patches created with `git-format-patch` and an appropriate
> +Signed-off-by: line to <xen-devel@lists.xen.org>, CCing the maintainers
> +listed below.
> +
> +Maintainers
> +-----------
> +* Ross Lagerwall <ross.lagerwall@citrix.com>
> +* Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>  
>  License
>  -------
> -- 
> 2.4.11
> 

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

  reply	other threads:[~2016-06-14 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 11:02 [PATCH 1/3] Don't accept fuzz when patching Ross Lagerwall
2016-06-10 11:02 ` [PATCH 2/3] Update to use a .config file Ross Lagerwall
2016-06-14 15:35   ` Konrad Rzeszutek Wilk
2016-06-15  8:08     ` Ross Lagerwall
2016-06-15 14:00       ` Konrad Rzeszutek Wilk
2016-07-14  8:05         ` Ross Lagerwall
2016-07-15 13:36           ` Konrad Rzeszutek Wilk
2016-07-16  1:55             ` Konrad Rzeszutek Wilk
2016-07-18  9:33               ` Ross Lagerwall
2016-07-18 10:28                 ` Konrad Rzeszutek Wilk
2016-06-10 11:02 ` [PATCH 3/3] Update README.md Ross Lagerwall
2016-06-14 15:36   ` Konrad Rzeszutek Wilk [this message]
2016-06-13 10:08 ` [PATCH 1/3] Don't accept fuzz when patching George Dunlap
2016-06-13 10:16   ` Andrew Cooper
2016-06-13 10:57     ` George Dunlap
2016-06-13 10:23   ` Ross Lagerwall
2016-06-14 15:33 ` 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=20160614153621.GF9456@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=xen-devel@lists.xen.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).