live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
To: Peter Swain <swine@pobox.com>
Cc: live-patching@vger.kernel.org, madvenka@linux.microsoft.com
Subject: Re: announcing LLpatch: arch-independent live-patch creation
Date: Sat, 28 Aug 2021 09:04:24 +0300	[thread overview]
Message-ID: <b8995525-022c-7293-f306-a56f1c8ef074@virtuozzo.com> (raw)
In-Reply-To: <CABFpvm1D41RJfYsk4M6SCfogUUZnvuiZ0Xs+CQkr6Zjb1J7u5Q@mail.gmail.com>

On 27.08.2021 21:33, Peter Swain wrote:
> (apologies for re-post, having trouble enforcing no-HTML mode in gmail)
> 
> On Fri, Aug 27, 2021 at 9:08 AM Evgenii Shatokhin <eshatokhin@virtuozzo.com>
> wrote:
>> LLpatch requires a pre-built kernel tree ("repository"), right?
> Yes.
> It doesn't rebuild existing *.o as a pre-image of the patched code, as
> kpatch does.
> But LLpatch does use the dependency analysis the previous make left in
> *.o.cmd, although the same information could also be extracted by "make -n
> -W changed_file ..."
> 
>> Does that mean that the kernel should be built with clang first?
>> Or, perhaps, clang is only used when building the patch itself, while
>> the kernel can be built with GCC or other compiler used by the given
>> Linux distro?
> We haven't explored this deeply, as all our kernels are clang-built.
> In principle this should work with gcc-built kernels, as long as the
> particular change doesn't intersect with some feature which is expressed
> differently between the gcc/clang worlds, such as some ELF section names.
> But as there are so many such potential incompatibilities, we do not
> recommend this.

I see. Yes, it is safer to use the same toolchain both for the kernel 
and for the patch.

> As a precondition for LLpatch-patchable kernels, I would recommend moving
> to clang-built base kernels

This is not always an option ;-) For example, the kernels in our 
(Virtuozzo) Linux distros are based on those from RHEL. We try to change 
only what we really need to, otherwise we lose the benefits of a 
well-tested code base. So, the compiler and even its version are 
basically fixed for us.

Thanks, anyway.
> .
> 

Regards,
Evgenii


      reply	other threads:[~2021-08-28  6:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 22:34 announcing LLpatch: arch-independent live-patch creation Peter Swain
2021-08-27  2:01 ` Madhavan T. Venkataraman
2021-08-27 16:08 ` Evgenii Shatokhin
2021-08-27 18:33   ` Peter Swain
2021-08-28  6:04     ` Evgenii Shatokhin [this message]

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=b8995525-022c-7293-f306-a56f1c8ef074@virtuozzo.com \
    --to=eshatokhin@virtuozzo.com \
    --cc=live-patching@vger.kernel.org \
    --cc=madvenka@linux.microsoft.com \
    --cc=swine@pobox.com \
    /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).