qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3]  TSA: make sure QEMU compiles when using clang TSA
@ 2023-01-17 13:52 Emanuele Giuseppe Esposito
  2023-01-17 13:52 ` [PATCH 1/3] util/qemu-thread-posix: use TSA_NO_TSA to suppress clang TSA warnings Emanuele Giuseppe Esposito
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Emanuele Giuseppe Esposito @ 2023-01-17 13:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Warner Losh, Kyle Evans, Kevin Wolf, Stefan Hajnoczi,
	Paolo Bonzini, Alex Bennée, Thomas Huth, Richard Henderson,
	Emanuele Giuseppe Esposito

This serie aims to enable clang Thread Safety Analysis (TSA) in QEMU.
The goal is to use it for our multiqueue project aiming to replace the
block layer AioContext lock with a rwlock and make sure the lock is taken
correctly everywhere [1].

By default, TSA covers pthread mutexes, therefore when added in QEMU it
immediately detects some wrappers using pthread_mutex_lock/unlock without
using the proper TSA macros. Since adding such macro requires scanning all
possible callers of the affected wrapper, simply use TSA_NO_TSA to suppress
the warnings.

[1] = https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg00903.html

Emanuele Giuseppe Esposito (2):
  util/qemu-thread-posix: use TSA_NO_TSA to suppress clang TSA warnings
  bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings

Kevin Wolf (1):
  configure: Enable -Wthread-safety if present

 configure                |  1 +
 bsd-user/qemu.h          |  5 +++--
 include/exec/exec-all.h  |  5 +++--
 include/qemu/thread.h    | 14 +++++++++-----
 util/qemu-thread-posix.c |  2 +-
 5 files changed, 17 insertions(+), 10 deletions(-)

-- 
2.39.0



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-02-13 10:45 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 13:52 [PATCH 0/3] TSA: make sure QEMU compiles when using clang TSA Emanuele Giuseppe Esposito
2023-01-17 13:52 ` [PATCH 1/3] util/qemu-thread-posix: use TSA_NO_TSA to suppress clang TSA warnings Emanuele Giuseppe Esposito
2023-01-17 14:33   ` Philippe Mathieu-Daudé
2023-01-17 14:43     ` Emanuele Giuseppe Esposito
2023-01-17 15:49       ` Philippe Mathieu-Daudé
2023-01-17 13:52 ` [PATCH 2/3] bsd-user/mmap: " Emanuele Giuseppe Esposito
2023-01-17 16:16   ` Warner Losh
2023-01-17 16:21     ` Emanuele Giuseppe Esposito
2023-01-17 16:25     ` Kevin Wolf
2023-01-17 16:43       ` Warner Losh
2023-01-17 17:17         ` Kevin Wolf
2023-01-17 20:43           ` Stefan Hajnoczi
2023-01-18  9:14             ` Kevin Wolf
2023-01-18 12:31               ` Stefan Hajnoczi
2023-01-18 15:12           ` Emanuele Giuseppe Esposito
2023-01-18 15:24             ` Stefan Hajnoczi
2023-01-18 17:35             ` Warner Losh
2023-01-17 16:32   ` Stefan Hajnoczi
2023-01-17 13:52 ` [PATCH 3/3] configure: Enable -Wthread-safety if present Emanuele Giuseppe Esposito
2023-01-17 14:02   ` Daniel P. Berrangé
2023-01-17 14:41     ` Emanuele Giuseppe Esposito
2023-01-17 15:01       ` Daniel P. Berrangé
2023-01-17 15:59         ` Kevin Wolf
2023-01-17 16:22 ` [PATCH 0/3] TSA: make sure QEMU compiles when using clang TSA Stefan Hajnoczi
2023-02-13 10:44 ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).