From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63D38C43331 for ; Sat, 28 Mar 2020 13:53:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 22E0720716 for ; Sat, 28 Mar 2020 13:53:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22E0720716 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CCA1D6B0036; Sat, 28 Mar 2020 09:53:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C78CC6B0037; Sat, 28 Mar 2020 09:53:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDDBE6B006C; Sat, 28 Mar 2020 09:53:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id A62A06B0036 for ; Sat, 28 Mar 2020 09:53:43 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 174472826 for ; Sat, 28 Mar 2020 13:53:43 +0000 (UTC) X-FDA: 76644913926.27.limit08_5a927c911050f X-HE-Tag: limit08_5a927c911050f X-Filterd-Recvd-Size: 4492 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Sat, 28 Mar 2020 13:53:42 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.72,316,1580770800"; d="scan'208";a="442757694" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2020 14:53:40 +0100 Date: Sat, 28 Mar 2020 14:53:40 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: Michel Lespinasse , Coccinelle , linux-mm@kvack.org, Davidlohr Bueso , Peter Zijlstra , Hugh Dickins , LKML , Liam Howlett , Jason Gunthorpe , Matthew Wilcox , Ying Han , David Rientjes , Andrew Morton , Laurent Dufour , Vlastimil Babka Subject: Re: [Cocci] [v3 05/10] mmap locking API: Checking the Coccinelle software In-Reply-To: <590dbec7-341a-3480-dd47-cb3c65b023c7@web.de> Message-ID: References: <20200327225102.25061-1-walken@google.com> <20200327225102.25061-6-walken@google.com> <3c222f3c-c8e2-660a-a348-5f3583e7e036@web.de> <590dbec7-341a-3480-dd47-cb3c65b023c7@web.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-495123161-1585403621=:3005" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-495123161-1585403621=:3005 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, 28 Mar 2020, Markus Elfring wrote: > >> How will corresponding software development resources evolve? > > > > I don't think I understand the question, or, actually, are you asking > > me or the coccinelle developers ? > > I hope that another communication approach can eventually increase > the chances for a better common understanding of development challenges= . > > The code from a mentioned source file can be reduced to the following > test file. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /arch/mips/mm/fault.c?id=3D69c5eea3128e775fd3c70ecf0098105d96dee330#n34 > > // deleted part > static void __kprobes __do_page_fault(struct pt_regs *regs, unsigned lo= ng write, > unsigned long address) > { > struct vm_area_struct * vma =3D NULL; > struct task_struct *tsk =3D current; > struct mm_struct *mm =3D tsk->mm; > // deleted part > retry: > down_read(&mm->mmap_sem); > vma =3D find_vma(mm, address); > if (!vma) > goto bad_area; > // deleted part > } > // deleted part > > > Application of the software =E2=80=9CCoccinelle 1.0.8-00029-ga549b9f0=E2= =80=9D (OCaml 4.10.0) > > elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-c do_page_fau= lt-excerpt3.c > =E2=80=A6 > NB total files =3D 1; perfect =3D 1; pbs =3D 0; timeout =3D 0; =3D=3D=3D= =3D=3D=3D=3D=3D=3D> 100% > nb good =3D 15, nb passed =3D 1 =3D=3D=3D=3D=3D=3D=3D=3D=3D> 6.25% pas= sed > nb good =3D 15, nb bad =3D 0 =3D=3D=3D=3D=3D=3D=3D=3D=3D> 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@Sonne:~/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 is due to a preceding goto where the destination is expressed as a macro name. Maybe there should be a warning in this case. julia > > Regards, > Markus > _______________________________________________ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci > --8323329-495123161-1585403621=:3005--