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: <ZQru4sOkaxR_aMC6@alley>
Date:   Wed, 20 Sep 2023 15:08:50 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     Sergey Senozhatsky <senozhatsky@...omium.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] printk/nbcon: Add assert that CPU migration is disabled
 when calling nbcon_context_try_acquire()

On Wed 2023-09-20 15:06:08, John Ogness wrote:
> On 2023-09-20, Petr Mladek <pmladek@...e.com> wrote:
> > The nbcon console is locked when the 'prio' and 'cpu' fields in
> > console->nbcon_state stay the same. The locking algorithm would
> > break when the locked context got migrated to another CPU.
> >
> > Add assert into nbcon_context_try_acquire(). It would warn when
> > the function is called in a context where the CPU migration
> > is possible.
> 
> static bool nbcon_context_try_acquire(struct nbcon_context *ctxt)
> {
>         unsigned int cpu = smp_processor_id();
> 
> Doesn't smp_processor_id() already provide the necessary checking and
> warning?

Ah, I have missed it. Please, forgot this patch.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ