Re: v5.19-rc2-rt3: nouveau might sleep splat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022-07-25, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:
> I remember asking why it is needed to disable interrupts across
> vsnprintf(). John, can I take this as-it or are you sending a new
> batch?

Mike's patch only addresses the vsnprintf() to print the prefix and get
the message length. There is also a vscnprintf() for the message itself,
which is still happening with interrupts disabled (see
printk_sprint()). I suppose this patch side-steps the splat because the
first vsnprintf() already triggered the random bytes for the pointer
hash.

I am preparing a new series that addresses this by completely removing
interrupt disabling from the printk() path. This required changes to the
printk_enter() macro, recursion handling, and the printk-ringbuffer
itself.

The focus of my new series are the various non-RT issues reported during
the early 5.19-rc cycles. I still need more time to get the series into
shape for LKML.

If Mike's patch is reliably side-stepping the issue, feel free to take
it.

>> Bandaid:
>> 
>> printk: fix RT vprintk_store() might sleep splat
>> 
>> RT can't call vsnprintf() with IRQs disabled, so disable migration
>> and move the printk_enter_irqsave() call down to where it's needed.

It might be worth mentioning that vscnprintf() is called later in
vprintk_store() when interrupts are disabled, but since it is s-printing
the same string (and probably the same values), new random bytes are not
required. (But someone should verify the reasoning here. I am not really
familiar with the crng code.)

John Ogness



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux