From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Yuan Can <yuancan@huawei.com>,
cocci@inria.fr, Nicolas Palix <nicolas.palix@imag.fr>,
kernel-janitors@vger.kernel.org
Subject: Re: [cocci] [v3 1/2] coccinelle: locks: add missing_mutex_init.cocci script
Date: Fri, 23 Sep 2022 21:27:34 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2209232125480.2720@hadrien> (raw)
In-Reply-To: <2a8b2d3c-26cf-3aab-34b3-1ba402740111@web.de>
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]
On Fri, 23 Sep 2022, Markus Elfring wrote:
> >> # How do you think about the handling of multiple members within data structures?
> > There should be no problem with this.
>
>
> Would it be relevant to use the SmPL construct “<+... … ...+>”?
Not in a structure definition.
>
>
>
> >> # How much does it matter here that curly brackets are used for a proposed SmPL constraint?
> > I have no idea what "How much does it matter" mean. {} are used because
> > that's how struct types are declared.
>
>
> Please take another look at mentioned implementation details for
> the clarification of such communication difficulties.
>
> A)
> position p != {r2.p};
>
> B)
> position p != find_member.p;
OK, both are fine. If there are multiple positions that p should be
different from then the {} would be required.
>
>
> >> I got another development concern for the presented algorithm.
> >> Why is a data initialisation function call searched in the first SmPL rule at all?
> > Because he wants to find the fields for which mutex_init is already called
> > and to not report messages for them. That is the whole point of the
> > semantic patch.
>
>
> How do you think about an opposite source code search order?
>
> Would you like to search for function calls which require initialised
> data structures before any additional source code analysis?
It doesn't make much sense to have a mutex without initializing it.
julia
next prev parent reply other threads:[~2022-09-23 19:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 11:55 [cocci] [PATCH v3 0/2] coccinelle: Introduce cocci script to detect missing mutext and spin lock initialization Yuan Can
2022-09-22 11:55 ` [cocci] [PATCH v3 1/2] coccinelle: locks: add missing_mutex_init.cocci script Yuan Can
2022-09-22 18:11 ` Markus Elfring
2022-09-23 14:21 ` Julia Lawall
2022-09-23 17:02 ` [cocci] [v3 " Markus Elfring
2022-09-23 17:08 ` Julia Lawall
2022-09-23 17:47 ` Markus Elfring
2022-09-23 19:27 ` Julia Lawall [this message]
2022-09-24 8:15 ` Markus Elfring
2022-09-24 8:36 ` [cocci] [PATCH v3 " Markus Elfring
2022-09-24 15:40 ` Markus Elfring
2022-09-25 20:33 ` Markus Elfring
2022-09-22 11:55 ` [cocci] [PATCH v3 2/2] coccinelle: locks: add missing_spin_lock_init.cocci script Yuan Can
2022-09-22 17:19 ` [cocci] [PATCH v3 0/2] coccinelle: Introduce cocci script to detect missing mutext and spin lock initialization Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2209232125480.2720@hadrien \
--to=julia.lawall@inria.fr \
--cc=Markus.Elfring@web.de \
--cc=cocci@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=nicolas.palix@imag.fr \
--cc=yuancan@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.