From: Miroslav Benes <mbenes@suse.cz>
To: Petr Mladek <pmladek@suse.com>
Cc: jpoimboe@redhat.com, jeyu@redhat.com, jikos@kernel.org,
corbet@lwn.net, live-patching@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation/livepatch: remove the limitation for schedule() patching
Date: Fri, 6 Jan 2017 16:10:50 +0100 (CET) [thread overview]
Message-ID: <alpine.LSU.2.20.1701061609470.16024@pobox.suse.cz> (raw)
In-Reply-To: <20170106150140.GX14894@pathway.suse.cz>
On Fri, 6 Jan 2017, Petr Mladek wrote:
> On Fri 2017-01-06 15:00:45, Miroslav Benes wrote:
> > The Limitations section of the documentation describes the impossibility
> > to livepatch anything that is inlined to __schedule() function. This had
> > been true till 4.9 kernel came. Thanks to commit 0100301bfdf5
> > ("sched/x86: Rewrite the switch_to() code") from Brian Gerst there is
> > __switch_to_asm function now (implemented in assembly) called properly
> > from context_switch(). RIP is thus saved on the stack and a task would
> > return to proper version of __schedule() et al. functions.
> >
> > Of course __switch_to_asm() is not patchable for the reason described in
> > the section. But there is no __fentry__ call and I cannot imagine a
> > reason to do it anyway.
> >
> > Therefore, remove the paragraphs from the section.
> >
> > Signed-off-by: Miroslav Benes <mbenes@suse.cz>
>
> It is great to get a feature for free ;-)
>
> Reviewed-by: Petr Mladek <pmladek@suse.com>
>
> Best Regards,
> Petr
>
> ---
> > FWIW, I also tested this to be sure on top of the consistency model
> > patch set. I patched schedule() function which calls __schedule() (it is
> > impossible to patch it directly due to notrace attribute). It works well
> > except...
> >
> > 1. the patching process does not finish, because many tasks sleep in
> > schedule. STOP/CONT signal does not help. I'll investigate.
>
> Are these userspace processes or kthreads? Kthreads would cause
> problems because they do not handle signals.
Userspace processes, but I take it back. Stupid typo in my script. It
works as expected. Kthreads sleeping in schedule() are of course there and
a signal does not help.
Miroslav
next prev parent reply other threads:[~2017-01-06 15:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 14:00 Miroslav Benes
2017-01-06 15:01 ` Petr Mladek
2017-01-06 15:10 ` Miroslav Benes [this message]
2017-01-06 19:13 ` Josh Poimboeuf
2017-01-09 12:50 ` Miroslav Benes
2017-01-09 14:54 ` Josh Poimboeuf
2017-01-10 10:32 ` Miroslav Benes
2017-01-11 1:33 ` Jiri Kosina
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.20.1701061609470.16024@pobox.suse.cz \
--to=mbenes@suse.cz \
--cc=corbet@lwn.net \
--cc=jeyu@redhat.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-doc@vger.kernel.org \
--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
all inboxes | Powered by JetHome®