Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp635859ybb; Sat, 28 Mar 2020 06:55:38 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvpQSRUnryXSKj0NQQiU03zT1zO4gmFtNOig8NHa8SI8oIeCHD4M+buH6j+UUCjMiwapnOn X-Received: by 2002:aca:4e08:: with SMTP id c8mr2409511oib.143.1585403738304; Sat, 28 Mar 2020 06:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585403738; cv=none; d=google.com; s=arc-20160816; b=jVV6j5h7pJqdCGvCoz71rs9eetzq7DTWVvk5L9kdKGSHMp1kE9RcSUsjbE3egtRYLu suKWhmomjUsV7fmx9NXeDwNq4nWH9XsFvS7O6sqpz0cTJL05QefrK5VgaRZIGtm0KM32 cE0V4P9Av9yMSfAYE2nomYX7wz4T//kaHeqsZeQJJ6Z48MEUUz2xLLfVJHbNzA8dS7Un w4w3KTff4FEjwfcfFxu2L8y02yMzEgHI1sdLXeWtUoi2z1deHC+TF+USfaiVd7KLMXeU xkfkp/LWjU2/xCdYPcW3e6RIOBnOT/w7axmMiYLduZqw3XPSnwI1u1L4Hwmamf3TTgrv ImYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=9uETiNmmqFMh+3N6lwOc+tWb2CNjcOPR1Ew3l6F61Ds=; b=F2u7QIkq9z2Kr2sCPyzA7IBXGwg4jrcgVNVfM/Vi31aOAooLVSbpIU1dqwOefHQkEJ kfzN3xcHKuNwsSGXIg+kCTDIS+vFYdZ0dZLJDkLAxcF6DuZe8hawvCPpPTD9lBgnBCEF hjyWdb8yf5MU7in/Tmwxr1LR0kEG8DZDdOH6m4RYwk64J7WDnor4i4ZUjfdqtpgm/3Xa 0lD14POIu0sCef5sbcQXkm81l3bG+dxDJ71kPC+hq6ZlnsphffrTMkzYOgXE8pJbgNli iFcK5hc7IpqEbaREBhAkctv+9E51/I/OtcEJuZ2o9GYNsCxfZkalh8qxaibXmHvZULTU jbDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z22si3841752oto.237.2020.03.28.06.55.25; Sat, 28 Mar 2020 06:55:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbgC1Nxn (ORCPT + 99 others); Sat, 28 Mar 2020 09:53:43 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:40257 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbgC1Nxn (ORCPT ); Sat, 28 Mar 2020 09:53:43 -0400 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 8BIT 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=69c5eea3128e775fd3c70ecf0098105d96dee330#n34 > > // deleted part > static void __kprobes __do_page_fault(struct pt_regs *regs, unsigned long write, > unsigned long address) > { > struct vm_area_struct * vma = NULL; > struct task_struct *tsk = current; > struct mm_struct *mm = tsk->mm; > // 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@Sonne:~/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@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--