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: <20220509222956.2886-4-palmer@rivosinc.com>
Date:   Mon,  9 May 2022 15:29:52 -0700
From:   Palmer Dabbelt <palmer@...osinc.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     guoren@...nel.org, peterz@...radead.org, mingo@...hat.com,
        Will Deacon <will@...nel.org>, longman@...hat.com,
        boqun.feng@...il.com, jonas@...thpole.se,
        stefan.kristiansson@...nalahti.fi, shorne@...il.com,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>, aou@...s.berkeley.edu,
        Arnd Bergmann <arnd@...db.de>, macro@...am.me.uk,
        Greg KH <gregkh@...uxfoundation.org>,
        sudipm.mukherjee@...il.com, jszhang@...nel.org,
        linux-csky@...r.kernel.org, linux-kernel@...r.kernel.org,
        openrisc@...ts.librecores.org, linux-riscv@...ts.infradead.org,
        linux-arch@...r.kernel.org, linux-riscv@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Palmer Dabbelt <palmer@...osinc.com>
Subject: [PATCH v5 3/7] asm-generic: qrwlock: Document the spinlock fairness requirements

From: Palmer Dabbelt <palmer@...osinc.com>

I could only find the fairness requirements documented as the C code,
this calls them out in a comment just to be a bit more explicit.

Reviewed-by: Arnd Bergmann <arnd@...db.de
Signed-off-by: Palmer Dabbelt <palmer@...osinc.com>
---
 include/asm-generic/qrwlock.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/asm-generic/qrwlock.h b/include/asm-generic/qrwlock.h
index 7ae0ece07b4e..24ae09c1db9f 100644
--- a/include/asm-generic/qrwlock.h
+++ b/include/asm-generic/qrwlock.h
@@ -2,6 +2,10 @@
 /*
  * Queue read/write lock
  *
+ * These use generic atomic and locking routines, but depend on a fair spinlock
+ * implementation in order to be fair themselves.  The implementation in
+ * asm-generic/spinlock.h meets these requirements.
+ *
  * (C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.
  *
  * Authors: Waiman Long <waiman.long@...com>
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ