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

On Thu, Aug 25, 2022 at 06:08:56PM +0200, Sebastian Andrzej Siewior 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>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ