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: <d399e354-6d42-488e-a0b7-fe8d08b9bf34@acm.org>
Date: Thu, 22 Jan 2026 08:28:44 -0800
From: Bart Van Assche <bvanassche@....org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: elver@...gle.com, linux-kernel@...r.kernel.org, bigeasy@...utronix.de,
 mingo@...nel.org, tglx@...utronix.de, will@...nel.org, boqun.feng@...il.com,
 longman@...hat.com, hch@....de, rostedt@...dmis.org, llvm@...ts.linux.dev
Subject: Re: [RFC][PATCH 0/4] locking: Add/convert context analysis bits

On 1/22/26 1:04 AM, Peter Zijlstra wrote:
> I'm having trouble reproducing :-(

Hi Peter,

With this patch applied:

diff --git a/scripts/context-analysis-suppression.txt 
b/scripts/context-analysis-suppression.txt
index fd8951d06706..1c51b6153f08 100644
--- a/scripts/context-analysis-suppression.txt
+++ b/scripts/context-analysis-suppression.txt
@@ -24,6 +24,7 @@ src:*include/linux/mutex*.h=emit
  src:*include/linux/rcupdate.h=emit
  src:*include/linux/refcount.h=emit
  src:*include/linux/rhashtable.h=emit
+src:*include/linux/rtmutex*.h=emit
  src:*include/linux/rwlock*.h=emit
  src:*include/linux/rwsem.h=emit
  src:*include/linux/sched*=emit

and if I run the following commands:

build-kernel-with-clang allmodconfig
build-kernel-with-clang kernel/locking/mutex.o

then the following output appears:

   CALL    scripts/checksyscalls.sh
   DESCEND objtool
   INSTALL libsubcmd_headers
   CC      kernel/locking/mutex.o
In file included from kernel/locking/mutex.c:22:
In file included from ./include/linux/ww_mutex.h:21:
./include/linux/rtmutex.h:44:25: error: reading variable 'owner' requires
       holding raw_spinlock '&rt_mutex_base::wait_lock'
       [-Werror,-Wthread-safety-analysis]
    44 |         return READ_ONCE(lock->owner) != NULL;
       |                                ^
./include/linux/rtmutex.h:52:56: error: reading variable 'owner' requires
       holding raw_spinlock '&rt_mutex_base::wait_lock'
       [-Werror,-Wthread-safety-analysis]
    52 |         unsigned long owner = (unsigned long) 
READ_ONCE(lock->owner);
       |                                                               ^
2 errors generated.

The build-kernel-with-clang script is as follows (this may not be the
recommended way to build the kernel with clang):

#!/bin/bash
export CC=clang
export LD=ld.lld      # Use LLVM's linker (optional but recommended)
export AR=llvm-ar
export NM=llvm-nm
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export STRIP=llvm-strip
export READELF=llvm-readelf
make LLVM=1 CC=clang "$@"

Please let me know if you need more information.

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ