qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Make coroutine annotations ready for static analysis
@ 2022-12-16 11:07 Paolo Bonzini
  2022-12-16 11:07 ` [PATCH v2 1/2] coroutine: annotate coroutine_fn for libclang Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Paolo Bonzini @ 2022-12-16 11:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: afaria, qemu-block, kwolf

Clang has a generic __annotate__ attribute that can be used by
static analyzers to understand properties of functions and
analyze the control flow.

Unlike TSA annotations, the __annotate__ attribute applies to function
pointers as well, which is very fortunate because many BlockDriver
function driver run in coroutines.

Paolo

v1->v2: improved comments for patch 2

Alberto Faria (2):
  block: Add no_coroutine_fn and coroutine_mixed_fn marker
  coroutine: annotate coroutine_fn for libclang

 include/block/block-common.h | 11 +++++----
 include/qemu/coroutine.h     | 43 ++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 4 deletions(-)

-- 
2.38.1



^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 0/2] Make coroutine annotations ready for static analysis
@ 2022-12-15 17:44 Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2022-12-15 17:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: afaria, qemu-block, kwolf

Clang has a generic __annotate__ attribute that can be used by
static analyzers to understand properties of functions and
analyze the control flow.

Unlike TSA annotations, the __annotate__ attribute applies to function
pointers as well, which is very fortunate because many BlockDriver
function driver run in coroutines.

Paolo

Alberto Faria (2):
  coroutine: annotate coroutine_fn for libclang
  block: Add no_coroutine_fn and coroutine_mixed_fn marker

 include/block/block-common.h | 11 +++++++----
 include/qemu/coroutine.h     | 37 ++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 4 deletions(-)

-- 
2.38.1



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

end of thread, other threads:[~2023-01-17 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 11:07 [PATCH 0/2] Make coroutine annotations ready for static analysis Paolo Bonzini
2022-12-16 11:07 ` [PATCH v2 1/2] coroutine: annotate coroutine_fn for libclang Paolo Bonzini
2022-12-16 11:07 ` [PATCH v2 2/2] block: Add no_coroutine_fn and coroutine_mixed_fn marker Paolo Bonzini
2023-01-17 15:41 ` [PATCH 0/2] Make coroutine annotations ready for static analysis Kevin Wolf
  -- strict thread matches above, loose matches on Subject: below --
2022-12-15 17:44 Paolo Bonzini

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).