lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 11 Dec 2016 13:08:33 +1100
From:   Balbir Singh <bsingharora@...il.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Jessica Yu <jeyu@...hat.com>, Jiri Kosina <jikos@...nel.org>,
        Miroslav Benes <mbenes@...e.cz>,
        Petr Mladek <pmladek@...e.com>, linux-s390@...r.kernel.org,
        Vojtech Pavlik <vojtech@...e.com>,
        Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...nel.org>,
        live-patching@...r.kernel.org, Jiri Slaby <jslaby@...e.cz>,
        linuxppc-dev@...ts.ozlabs.org, Ingo Molnar <mingo@...nel.org>,
        Chris J Arges <chris.j.arges@...onical.com>
Subject: Re: [PATCH v3 00/15] livepatch: hybrid consistency model



On 11/12/16 04:17, Josh Poimboeuf wrote:
> 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().

It's preempted, not sleeping. It's on_rq but not on_cpu.

  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.
> 

Thanks for the explanation. I presume a whole lot of this is arch specific
code? I'll look at the patches as well

Balbir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ