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] [day] [month] [year] [list]
Date:   Mon, 14 Feb 2022 17:15:38 +0100
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        "Theodore Ts'o" <tytso@....edu>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        Sultan Alsawaf <sultan@...neltoast.com>,
        Dominik Brodowski <linux@...inikbrodowski.net>
Subject: Re: [PATCH v2] random: set fast pool count to zero in cpuhp teardown

Hi Sebastian,

On Mon, Feb 14, 2022 at 4:17 PM Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
> > I'd like to do only one method here, so we can set those fields in
> > startup, provided it happens early enough.
> > > > So I think it seems better to keep it before CPUHP_TIMERS_PREPARE, but
> > > > do it on startup rather than teardown. Seem reasonable? Would that
> > > > mean we zero out before IRQs are enabled?
> > > I would only zero it if the upper-most bit is there.
> >
> > I still don't quite understand: why can't we just unconditionally
> > zero, always, before CPUHP_TIMERS_PREPARE?
>
> If you have a rollback before CPUHP_TIMERS_PREPARE you don't notice it
> and your worker may have skipped this work because it run on the wrong
> CPU. Also, I *think* that if you happen to have 64 interrupts between
>    CPUHP_AP_ONLINE_IDLE … CPUHP_AP_WORKQUEUE_ONLINE
>
> then the scheduled worker is unbound and may run on the "wrong" CPU.

I'm talking about in the context of unconditionally zeroing during
*startup*, just before CPUHP_TIMERS_PREPARE. That's what I sent in
this patch series:
https://lore.kernel.org/lkml/20220214151415.1108141-1-Jason@zx2c4.com/t/#u

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ