Live Patching
 help / color / mirror / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Petr Mladek <pmladek@suse.com>,
	jpoimboe@kernel.org, jikos@kernel.org,  joe.lawrence@redhat.com,
	live-patching@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode
Date: Fri, 31 Jan 2025 14:18:24 +0100 (CET)	[thread overview]
Message-ID: <alpine.LSU.2.21.2501311414281.10231@pobox.suse.cz> (raw)
In-Reply-To: <CALOAHbBZc6ORGzXwBRwe+rD2=YGf1jub5TEr989_GpK54P2o1A@mail.gmail.com>

> >
> >   + What exactly is meant by frequent replacements (busy loop?, once a minute?)
> 
> The script:
> 
> #!/bin/bash
> while true; do
>         yum install -y ./kernel-livepatch-6.1.12-0.x86_64.rpm
>         ./apply_livepatch_61.sh # it will sleep 5s
>         yum erase -y kernel-livepatch-6.1.12-0.x86_64
>         yum install -y ./kernel-livepatch-6.1.6-0.x86_64.rpm
>         ./apply_livepatch_61.sh  # it will sleep 5s
> done
 
A live patch application is a slowpath. It is expected not to run 
frequently (in a relative sense). If you stress it like this, it is quite 
expected that it will have an impact. Especially on a large busy system.

> >
> > > Other potential risks may also arise
> > >   due to inconsistencies or race conditions during transitions.
> >
> > What inconsistencies and race conditions you have in mind, please?
> 
> I have explained it at
> https://lore.kernel.org/live-patching/Z5DHQG4geRsuIflc@pathway.suse.cz/T/#m5058583fa64d95ef7ac9525a6a8af8ca865bf354
> 
>  klp_ftrace_handler
>       if (unlikely(func->transition)) {
>           WARN_ON_ONCE(patch_state == KLP_UNDEFINED);
>   }
> 
> Why is WARN_ON_ONCE() placed here? What issues have we encountered in the past
> that led to the decision to add this warning?

A safety measure for something which really should not happen.

> > The main advantage of the atomic replace is simplify the maintenance
> > and debugging.
> 
> Is it worth the high overhead on production servers?

Yes, because the overhead once a live patch is applied is negligible.

> Can you provide examples of companies that use atomic replacement at
> scale in their production environments?

At least SUSE uses it as a solution for its customers. No many problems 
have been reported since we started ~10 years ago.

Regards,
Miroslav

  reply	other threads:[~2025-01-31 13:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27  6:35 [RFC PATCH 0/2] livepatch: Add support for hybrid mode Yafang Shao
2025-01-27  6:35 ` [RFC PATCH 1/2] livepatch: Add replaceable attribute Yafang Shao
2025-01-27  6:35 ` [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode Yafang Shao
2025-01-27 14:31   ` Petr Mladek
2025-01-27 15:34     ` Yafang Shao
2025-02-04 13:21       ` Petr Mladek
2025-02-05  2:54         ` Yafang Shao
2025-02-05 16:03           ` Petr Mladek
2025-02-06  2:35             ` Yafang Shao
2025-02-07 13:58               ` Petr Mladek
2025-02-08  3:08                 ` Yafang Shao
2025-02-07  2:31   ` Josh Poimboeuf
2025-02-07  3:16     ` Yafang Shao
2025-02-07  9:36       ` Petr Mladek
2025-02-08  2:14         ` Yafang Shao
2025-02-07 16:59       ` Josh Poimboeuf
2025-02-08  3:38         ` Yafang Shao
2025-01-27 13:46 ` [RFC PATCH 0/2] livepatch: Add support for " Petr Mladek
2025-01-27 14:22   ` Yafang Shao
2025-01-31 13:18     ` Miroslav Benes [this message]
2025-02-03  9:44       ` Yafang Shao
2025-02-03 21:53         ` Song Liu
2025-02-05 14:42           ` Yafang Shao
2025-02-05 17:59             ` Song Liu
2025-02-06  2:54               ` Yafang Shao
2025-02-06 18:00                 ` Song Liu
2025-02-08  6:41                   ` Yafang Shao
2025-02-08 15:47                     ` Alexei Starovoitov
2025-02-08 19:32                       ` Josh Poimboeuf
2025-02-09  3:56                         ` Alexei Starovoitov
2025-02-10  2:39                           ` Yafang Shao
2025-02-04 13:05         ` Petr Mladek
2025-02-05  6:16           ` Yafang Shao
2025-02-07 11:00             ` Petr Mladek
2025-02-08  2:49               ` Yafang Shao
2025-02-10  2:50                 ` Yafang Shao

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=alpine.LSU.2.21.2501311414281.10231@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=pmladek@suse.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