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: <CANpmjNMNC=3FiBB0aVVP9LXA9-03ug-sE4CqgJu2-sjdxA14TQ@mail.gmail.com>
Date:   Tue, 16 Nov 2021 11:24:54 +0100
From:   Marco Elver <elver@...gle.com>
To:     "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Cc:     syzkaller-bugs@...glegroups.com,
        syzbot <syzbot+5f47a8cea6a12b77a876@...kaller.appspotmail.com>,
        gregkh@...uxfoundation.org, jirislaby@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [syzbot] BUG: sleeping function called from invalid context in __might_resched

On Tue, 16 Nov 2021 at 08:57, Fabio M. De Francesco
<fmdefrancesco@...il.com> wrote:
[...]
> I think that this is more readable and comprehensible.
>
> Therefore, if I'm not wrong, Marco's "!preemptible()", that is "if (!
> (preempt_count() == 0 && !irqs_disabled())", might be rewritten to an easier
> to understand "if (preempt_count() || irqs_disabled())".
>
> Am I wrong? Let's test it...

It's right, but why not use preemptible()? The definition of
preemptible() might change and then you'd have to fix the code again.

I actually find (preempt_count() || irqs_disabled()) tells me less of
what your intent here is vs. just writing !preemptible().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ