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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 13 Sep 2017 08:14:30 +0200
From:   Jiri Slaby <jslaby@...e.cz>
To:     Jibin Xu <jibin.xu@...driver.com>, gregkh@...uxfoundation.org
Cc:     rmk+kernel@...linux.org.uk, mingo@...e.hu,
        linux-arm-kernel@...ts.infradead.org, riel@...hat.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sysrq : fix Show Regs call trace on ARM

On 09/13/2017, 08:04 AM, Jiri Slaby wrote:
> On 09/11/2017, 01:22 PM, Jibin Xu wrote:
>> Hi,Jiri: 
>>
>> I tested get_irq_regs() behave in the softirq context,
>> I called get_irq_regs() by a tasklet, It returns NULL.My understanding is get_irq_regs() can return the right result
>> only in hardware IRQ,otherwise it returns NULL.
>> So I think in_irq() would be better.
> 
> Hi,
> 
> tasklets are run in the process context (in a kthread). But what about
> timers? HARDIRQ is decremented, SOFTIRQ remains set and sysrq handlers
> are called in such conditions (in_interrupt() is true, in_irq() is
> false). At that moment, irq_regs are still set and valid IMO.
> 
> But I would believe for now that sysrq handlers are not invoked from
> softirq context. AFAIK they are called only from hardirq (serial port or
> keyboard IRQ handler) or process context (write to /proc/sysrq-trigger).
> So this change *should* be safe unless someone else objects there are
> some kgdb special cases or something.

Oops, serial8250_timeout actually can do so. So yes, sysrq handlers can
be invoked from softirq (timer) context and they still should print the
registers at best.

I have to leave now, will look into it later if someone (you :)) doesn't
beat me to it.

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ