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:   Thu, 8 Sep 2022 02:54:33 -0400
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     Boqun Feng <boqun.feng@...il.com>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Waiman Long <longman@...hat.com>,
        Will Deacon <will@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] locking: Detect includes rwlock.h outside of spinlock.h

On Thu, Sep 08, 2022 at 08:37:38AM +0200, Sebastian Andrzej Siewior wrote:
> On 2022-08-25 18:08:59 [+0200], To linux-kernel@...r.kernel.org wrote:
> > From: Michael S. Tsirkin <mst@...hat.com>
> > 
> > The check for __LINUX_SPINLOCK_H within rwlock.h (and other files)
> > detects the direct include of the header file if it is at the very
> > beginning of the include section.
> > If it is listed later then chances are high that spinlock.h was already
> > included (including rwlock.h) and the additional listing of rwlock.h
> > will not cause any failure.
> > 
> > On PREEMPT_RT this additional rwlock.h will lead to compile failures
> > since it uses a different rwlock implementation.
> > 
> > Add __LINUX_INSIDE_SPINLOCK_H to spinlock.h and check for this instead
> > of __LINUX_SPINLOCK_H to detect wrong includes. This will help detect
> > direct includes of rwlock.h with without PREEMPT_RT enabled.
> > 
> > [ bigeasy: add remaining __LINUX_SPINLOCK_H user and rewrite
> >   commit description. ]
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> > ---
> > 
> > This is to avoid patches like
> >    https://lkml.kernel.org/r/20220816074816.173227-1-bigeasy@linutronix.de
> > 
> > in the future which is not the first I sent…
> 
> polite *ping*
> 
> Sebastian

This needs to be merged by locking maintainers IMHO, not by me.

-- 
MST

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ