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:   Mon, 8 Feb 2021 19:38:10 +0100
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Willy Tarreau <w@....eu>
Subject: Re: [PATCH] auxdisplay: Remove in_interrupt() usage.

Hi Sebastian,

On Mon, Feb 8, 2021 at 6:59 PM Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
>
> charlcd_write() is invoked as a VFS->write() callback and as such it is
> always invoked from preemptible context and may sleep.
>
> charlcd_puts() is invoked from register/unregister callback which is
> preemtible. The reboot notifier callback is also invoked from

preemtible -> preemptible

> preemptible context.
>
> Therefore there is no need to use `in_interrupt()' to figure out if it
> is save to sleep because it always is.

save -> safe

Does it hurt to have `in_interrupt()`? Future patches could make it so
that it is no longer a preemptible context. Should it be moved to e.g.
a `WARN_ON()` instead?

> Using `schedule()' to schedule (an be friendly to others) is

an -> and

> discouraged and `cond_resched()' should be used instead.
>
> Remove `in_interrupt()' and use `cond_resched()' to schedule every 32
> iteration if needed.
>
> Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>

Cc'ing Geert and Willy too.

Thanks for the patch!

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ