[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2003281459020.3005@hadrien>
Date: Sat, 28 Mar 2020 15:00:00 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Markus Elfring <Markus.Elfring@....de>
cc: Michel Lespinasse <walken@...gle.com>,
Coccinelle <cocci@...teme.lip6.fr>, linux-mm@...ck.org,
Davidlohr Bueso <dave@...olabs.net>,
Peter Zijlstra <peterz@...radead.org>,
Hugh Dickins <hughd@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
Liam Howlett <Liam.Howlett@...cle.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Matthew Wilcox <willy@...radead.org>,
Ying Han <yinghan@...gle.com>,
David Rientjes <rientjes@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Laurent Dufour <ldufour@...ux.ibm.com>,
Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [Cocci] [v3 05/10] mmap locking API: Checking the Coccinelle
software
> // deleted part
> retry:
> down_read(&mm->mmap_sem);
> vma = find_vma(mm, address);
> if (!vma)
> goto bad_area;
> // deleted part
> }
> // deleted part
>
>
> Application of the software “Coccinelle 1.0.8-00029-ga549b9f0” (OCaml 4.10.0)
>
> elfring@...ne:~/Projekte/Coccinelle/Probe> spatch --parse-c do_page_fault-excerpt3.c
> …
> NB total files = 1; perfect = 1; pbs = 0; timeout = 0; =========> 100%
> nb good = 15, nb passed = 1 =========> 6.25% passed
> nb good = 15, nb bad = 0 =========> 100.00% good or passed
>
>
> The discussed transformation approach can also be reduced for a test
> to the following script for the semantic patch language.
>
> @replacement@
> expression x;
> @@
> -down_read
> +mmap_read_lock
> (
> - &
> x
> - ->mmap_sem
> )
>
>
> elfring@...ne:~/Projekte/Coccinelle/Probe> spatch use_mmap_locking_API_3.cocci do_page_fault-excerpt3.c
>
>
> The desired diff is not generated so far.
> How would you like to fix this situation?
The problem can be seen with the --debug option:
FLOW: can't jump to VMALLOC_FAULT_TARGET: because we can't find this label
It's not apparent with the --parse-c option because it's not a parsing
problem.
julia
Powered by blists - more mailing lists