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:   Wed, 31 May 2023 12:17:35 +0200
From:   Frederic Weisbecker <frederic@...nel.org>
To:     "Paul E . McKenney" <paulmck@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        rcu <rcu@...r.kernel.org>, Uladzislau Rezki <urezki@...il.com>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        Giovanni Gherdovich <ggherdovich@...e.cz>
Subject: [PATCH 8/9] rcu: Make segcblist flags test strict

While testing several flags at once, make sure that all of them verify
the test. This will be necessary to check if an rdp is (de-)offloading.

Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
---
 kernel/rcu/rcu_segcblist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/rcu_segcblist.h b/kernel/rcu/rcu_segcblist.h
index 620ca48e782b..36245efdf800 100644
--- a/kernel/rcu/rcu_segcblist.h
+++ b/kernel/rcu/rcu_segcblist.h
@@ -70,7 +70,7 @@ static inline void rcu_segcblist_clear_flags(struct rcu_segcblist *rsclp,
 static inline bool rcu_segcblist_test_flags(struct rcu_segcblist *rsclp,
 					    int flags)
 {
-	return READ_ONCE(rsclp->flags) & flags;
+	return (READ_ONCE(rsclp->flags) & flags) == flags;
 }
 
 /*
-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ