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]
Message-Id: <1636155848.5e41htngh5.astroid@bobo.none>
Date:   Sat, 06 Nov 2021 09:48:09 +1000
From:   Nicholas Piggin <npiggin@...il.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     Laurent
 Dufour <ldufour@...ux.ibm.com>,
        linux-kernel@...r.kernel.org, Petr Mladek <pmladek@...e.com>
Subject: Re: Removal of printk safe buffers delays NMI context printk

Excerpts from John Ogness's message of November 5, 2021 11:57 pm:
> On 2021-11-05, Nicholas Piggin <npiggin@...il.com> wrote:
>>> What was removed from 93d102f094b was irq_work triggering on all
>>> CPUs.
>>
>> No, it was the caller executing the flush for all remote CPUs itself.
>> irq work was not involved (and irq work can't be raised in a remote
>> CPU from NMI context).
> 
> Maybe I am missing something. In 93d102f094b~1 I see:
> 
> watchdog_smp_panic
>   printk_safe_flush
>     __printk_safe_flush
>       printk_safe_flush_buffer
>         printk_safe_flush_line
>           printk_deferred
>             vprintk_deferred
>               vprintk_emit (but no direct printing)
>               defer_console_output
>                 irq_work_queue

Oh I thought you meant irq_work triggering on all CPUs (i.e., including
remote CPUs) was the key.

> AFAICT, using defer_console_output() instead of your new printk_flush()
> should cause the exact behavior as before.

It does.

>> but we do need that printk flush capability back there and for
>> nmi_backtrace.
> 
> Agreed. I had not considered this necessary side-effect when I removed
> the NMI safe buffers.
> 
> I am just wondering if we should fix the regression by going back to
> using irq_work (such as defer_console_output()) or if we want to
> introduce something new that introduces direct printing.

irq_work works for this situation so for a minimal fix I think it's 
fine. When you do the big rework it would be okay to do it directly
if you have such a facility for other reaons.

Thanks,
Nick

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ