Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1539863

Re: [PATCH v3 00/15] livepatch: hybrid consistency model

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 00/15] livepatch: hybrid consistency model
Date 2016-12-10 18:20 +0100
Message-ID <sMTtv-51F-3@gated-at.bofh.it> (permalink)
References <sMbst-Yb-9@gated-at.bofh.it> <sMIHL-4E9-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Dec 10, 2016 at 04:46:17PM +1100, Balbir Singh wrote:
> On Thu, 2016-12-08 at 12:08 -0600, Josh Poimboeuf wrote:
> > Dusting the cobwebs off the consistency model again.  This is based on
> > linux-next/master.
> > 
> > v1 was posted on 2015-02-09:
> > 
> >   https://lkml.kernel.org/r/cover.1423499826.git.jpoimboe@redhat.com
> > 
> > v2 was posted on 2016-04-28:
> > 
> >   https://lkml.kernel.org/r/cover.1461875890.git.jpoimboe@redhat.com
> > 
> > The biggest issue from v2 was finding a decent way to detect preemption
> > and page faults on the stack of a sleeping task.  
> 
> Could you please elaborate on this? Preemption of a sleeping task and
> faults as in the future (time) preemption and faults?

The normal way for a task to go to sleep is to call schedule().  objtool
ensures the stack trace is reliable in that case, by making sure that
all functions save the frame pointer on the stack before calling out to
another function.

But a task can also go to sleep in a few other ways.  One way is by
preemption, where an interrupt handler interrupts the task and calls
preempt_schedule_irq().  Another way is by a page fault exception.  In
both cases, there's no guarantee that the interrupted function saved the
frame pointer on the stack beforehand.  So the stack trace might be
unreliable.  Fortunately, interrupts and exceptions leave evidence
behind on the stack.  So when walking the stack of a sleeping task, we
can detect when an IRQ or exception occurred, and consider such a stack
unreliable.

-- 
Josh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 00/15] livepatch: hybrid consistency model Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-08 19:20 +0100
  [PATCH v3 07/15] livepatch/s390: add TIF_PATCH_PENDING thread flag Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-08 19:20 +0100
  [PATCH v3 01/15] stacktrace/x86: add function for detecting reliable stack traces Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-08 19:20 +0100
    Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting  reliable stack traces Petr Mladek <pmladek@suse.com> - 2016-12-16 14:10 +0100
      Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting  reliable stack traces Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-16 23:20 +0100
    Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting  reliable stack traces Miroslav Benes <mbenes@suse.cz> - 2016-12-19 17:30 +0100
      Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting  reliable stack traces Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-19 18:30 +0100
        Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting  reliable stack traces Miroslav Benes <mbenes@suse.cz> - 2016-12-19 19:30 +0100
        Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting  reliable stack traces Petr Mladek <pmladek@suse.com> - 2016-12-20 10:40 +0100
          Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting  reliable stack traces Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-20 22:30 +0100
  [PATCH v3 15/15] livepatch: allow removal of a disabled patch Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-08 19:20 +0100
    Re: [PATCH v3 15/15] livepatch: allow removal of a disabled patch Petr Mladek <pmladek@suse.com> - 2016-12-21 15:50 +0100
  [PATCH v3 14/15] livepatch: add /proc/<pid>/patch_state Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-08 19:20 +0100
    Re: [PATCH v3 14/15] livepatch: add /proc/<pid>/patch_state Petr Mladek <pmladek@suse.com> - 2016-12-21 12:30 +0100
  Re: [PATCH v3 00/15] livepatch: hybrid consistency model Balbir Singh <bsingharora@gmail.com> - 2016-12-10 06:50 +0100
    Re: [PATCH v3 00/15] livepatch: hybrid consistency model Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-10 18:20 +0100
      Re: [PATCH v3 00/15] livepatch: hybrid consistency model Balbir Singh <bsingharora@gmail.com> - 2016-12-11 03:10 +0100
        Re: [PATCH v3 00/15] livepatch: hybrid consistency model Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-12 15:10 +0100
  Re: [PATCH v3 13/15] livepatch: change to a per-task consistency  model Petr Mladek <pmladek@suse.com> - 2016-12-20 18:40 +0100
    Re: [PATCH v3 13/15] livepatch: change to a per-task consistency  model Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-21 22:30 +0100
      Re: [PATCH v3 13/15] livepatch: change to a per-task consistency  model Petr Mladek <pmladek@suse.com> - 2016-12-22 15:40 +0100
        Re: [PATCH v3 13/15] livepatch: change to a per-task consistency  model Josh Poimboeuf <jpoimboe@redhat.com> - 2016-12-22 19:40 +0100
      Re: [PATCH v3 13/15] livepatch: change to a per-task consistency  model Miroslav Benes <mbenes@suse.cz> - 2016-12-23 10:30 +0100
        Re: [PATCH v3 13/15] livepatch: change to a per-task consistency  model Petr Mladek <pmladek@suse.com> - 2016-12-23 11:20 +0100

csiph-web