Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1667692ybt; Mon, 15 Jun 2020 06:31:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRohDLYn/e+v7D8tW4yNWhqiQLO/eVFebt4sTerpwP5nawmMDOrp1ga+EuE4a4P1MUjnNv X-Received: by 2002:a17:906:8595:: with SMTP id v21mr24751601ejx.30.1592227873311; Mon, 15 Jun 2020 06:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592227873; cv=none; d=google.com; s=arc-20160816; b=OCm1Rs7VPSijCH0+ddgNplPS5m5Og5a/m3lugQHYgU2iASHqvh97E1+MXvYX/TZN5V GZ8ey/fMFW/XkhZxRaG9uWamCkh3GAaIq+EJrnPeX7IIkFFI045s0DthduGKLd2NWNfa z/f/OLuefCRhNzd0DJHrTYfq7otrjNVYWSzMUjeEZwIc6lWBJ2ztOYOlPYNoMHFDs8Wa DYtVwHXQUwK23SPuZSi99YsaIBMfDYk3mIT1NbH/yQ8qs7ytk9qsf7dvVX06e2ScM1dt 88N5BjPveECf2CfZO5FrX+R5Nu+O+g1xcT4PzweYW+09XLDov73wTuRTNNfwzE3Guzzx VWKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:autocrypt :to:from:subject:cc:dkim-signature; bh=CT9EZz9qeFP9Nkp4JHlL6N/kauDnErBrX+q8ocMX7gE=; b=uEuKzylZsC77JgjhoF3DLiaxXoiN/wTGlkRBeWO4pVqeF2GsE9mlaUYQPEDPqDlFD2 8GADfy/Y/+s0jBP/69PA6Nmyjr6k6NP+rimyVrICmVQVXkRaWE3yhjSstG3Pufjxuu5/ sMY/8zurTbWoNwrtIRQD5A4UkYmOlxNrzlzTVvciz800+rTKP7qk4MrcNX1Ae1Jwg3b1 65PVifR8akmWYKijNJcSJvpb93QztPDpm6IKYZSgrUFQPhALxagMMpSxJSHn5U0SWLHQ uwcMK4qkksqFVk+ZhnX+MFGdsgs5KGVvAlQtUhD0spfrQYSOVeZO9rqJpQqSftJSYcne R5+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=YHoIaWVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm15si9953123ejc.728.2020.06.15.06.30.50; Mon, 15 Jun 2020 06:31:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=YHoIaWVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730411AbgFON06 (ORCPT + 99 others); Mon, 15 Jun 2020 09:26:58 -0400 Received: from mout.web.de ([217.72.192.78]:44431 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730155AbgFON0z (ORCPT ); Mon, 15 Jun 2020 09:26:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1592227605; bh=yAKWgp/Tvaiw5OQKWpFzUE0F/BMcjcnPIYvMRZeg5QA=; h=X-UI-Sender-Class:Cc:Subject:From:To:Date; b=YHoIaWVirvDxZJTUaDvamyB975dT8z34Xk6KOJqyQH2zkymHev45fSd/Qho3UKM3z xnG7+Aqh7DJw9exnGzdgJ4WrSWxZqpRayctjwaXVDmdAMUXjNO8l58GV0KiOAO63F8 1ef+r2IGG0UE1yXykTpvCfSuCB/dBw6MljWplMGU= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.2] ([78.49.107.236]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1My6pZ-1iykt00ufH-00zVfy; Mon, 15 Jun 2020 15:26:45 +0200 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] coccinelle: api: add kzfree script From: Markus Elfring To: Denis Efremov , Coccinelle , Gilles Muller , Julia Lawall , Masahiro Yamada , Michal Marek , Nicolas Palix Autocrypt: addr=Markus.Elfring@web.de; prefer-encrypt=mutual; keydata= mQINBFg2+xABEADBJW2hoUoFXVFWTeKbqqif8VjszdMkriilx90WB5c0ddWQX14h6w5bT/A8 +v43YoGpDNyhgA0w9CEhuwfZrE91GocMtjLO67TAc2i2nxMc/FJRDI0OemO4VJ9RwID6ltwt mpVJgXGKkNJ1ey+QOXouzlErVvE2fRh+KXXN1Q7fSmTJlAW9XJYHS3BDHb0uRpymRSX3O+E2 lA87C7R8qAigPDZi6Z7UmwIA83ZMKXQ5stA0lhPyYgQcM7fh7V4ZYhnR0I5/qkUoxKpqaYLp YHBczVP+Zx/zHOM0KQphOMbU7X3c1pmMruoe6ti9uZzqZSLsF+NKXFEPBS665tQr66HJvZvY GMDlntZFAZ6xQvCC1r3MGoxEC1tuEa24vPCC9RZ9wk2sY5Csbva0WwYv3WKRZZBv8eIhGMxs rcpeGShRFyZ/0BYO53wZAPV1pEhGLLxd8eLN/nEWjJE0ejakPC1H/mt5F+yQBJAzz9JzbToU 5jKLu0SugNI18MspJut8AiA1M44CIWrNHXvWsQ+nnBKHDHHYZu7MoXlOmB32ndsfPthR3GSv jN7YD4Ad724H8fhRijmC1+RpuSce7w2JLj5cYj4MlccmNb8YUxsE8brY2WkXQYS8Ivse39MX BE66MQN0r5DQ6oqgoJ4gHIVBUv/ZwgcmUNS5gQkNCFA0dWXznQARAQABtCZNYXJrdXMgRWxm cmluZyA8TWFya3VzLkVsZnJ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ANC8cWzHpWaHmSuU3JSAMB/N+yQjIad2ztTckZY pwT6oxng29LzZspTYUEzMz3wK2jQHw+U66qBFk8whA7B2uAU1QdGyPgahLYSOa4XAEGb6wbI FEE= Message-ID: Date: Mon, 15 Jun 2020 15:26:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:/b4Ia59bBSMcrMDs43+fJ6k7vf7kjhSkOQx7bo8OBNwNrZoQ+lB rwB4iPY8PGA86WfqZQdJ+G/aEDqERtWZxaJqcfC9w7YXFctf5VFfNGBKNSYzM4kwdjnMkui apFmordzThiX0VQWSxZKtorYZyavtE18AGyr9Kkf3MoQnRxUX6d1kQV7Bkl87UvmHjrTG3z IQH96dNfnGEm2d/+NHcrw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:MdkxZBBFxJc=:klYJ+Q9XiVvPxdzbm0WtFL pXYbJy5+gSNAY+inWrSfy//afYzlGY4/A+RmX5IINaY4BQc3apSFYtzH/lOYPJVA6KnKASBjd swRtayiY98AZCoLwM95DPImiwGLWbgnJX6Q+DHCldovSAOcZ57C57RVxZfQuBfLUZtdbXbyIG n5v75sQhF29kpT46JbLpW9uMiWzFyK/tyirH8tgHlfOvS4n08PwEdHoC6qBbBajLdZ4AtY7pJ h79WjBQ297GWABXMQfBpwxIetJ8TEcCzMTs9uI26Hju+iCvlzbHWW42w4NMxMaYZDt+ZDoOLR FBcamsBhCnyhv1wnvhduDJprT2Deu2LLUxRfb08Zu/+98TxZ6MU1yV+IciCk9YzrPgBz5ozii 19ws3oPG3+DQF9xemXyaEOW2qO3dZC9bY276ScdiXoUUR9HXmP6LEvQl3txWZ5kekJnECQe5J tYcPCAs0he6ImZU4uXjelGyJXLnEOwQS9f34MZX2ojHDZeLhZwsO8Zi1q60nVt788T5XqPmEf ukspI21XxufI25vR2EY/4wlR25r4m1J+TdRKprfAm+G6qIQqJ6EusyEdgIDoBxx9yjgjZ5dVF k8jpgv2X/wTRoZjf2yiXkHr1uVgQs4gqgqnKItx7znXAiCIPmCI7UEVRclFwlwJdwQc8alNxH YC84KkHIXh3QPyRzw64XERLZMAJ4LpXuOGrDj3uuC1SHYiikF1f4NZtKWpdaCmfuzdsa1nGc6 zXz6LfIky19D36IHlK0N4LnX9zOzyf20G3j3G5avValzpcHWA8Oyfm35yOFkkbRQf/ppg3T9c 5R12u8uftmPejrhh4qSW9gasNaul+Pn5YNX9IpxtrWpW3YMZqXZTjuhPAjQeACR9VCCPdnlWo HeyfiERs0JdPQJYeDILGWUOyOi7T1zLgRt2fdWuwbmyR61CaD3nwactmOIiVDr2sR6XWWFXyK gspk4/UnNouwkD9Sm4UIJcH2sPS2bkbFyu6uVehBZeKo88iE8ZZJc4clFghuYA4Qxp88sH7Ci t2XSDD3lvkZ+QRN/yXPFEwdEMLYkZWyHZL5vF/UD+Z0uvRc/IgV2SIKmgfOaQMVkkk7UxmSj4 QKIoLNiRMJ2sTGW2WTA6/2kklI7lDSg3k8TCiVlcOGcDQ3JZFEGlxbwW3ztXbSZeJyH4vfsH1 eBSMvKVD2rj1ExUHnn7P4J6YXUrk3QL9m1qFbkyJxFpuAiJ91fPpUSCtchI74DlHXGSl6cgXy DRWoRanyG6yZ/+Oc4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E2=80=A6 > +virtual context > +virtual patch > +virtual org > +virtual report +virtual context, patch, org, report Is such a SmPL code variant more succinct? =E2=80=A6 > +if (...) > + \(memset@ok\|memzero_explicit@ok\)(...); Would you like to tolerate any extra source code around such a function ca= ll in an if branch? =E2=80=A6 > +( > +* memset@m((T)E, 0, ...); > +| > +* memzero_explicit@m((T)E, ...); > +) =E2=80=A6 I suggest to move a semicolon. +( +*memset@m((T)E, 0, ...) +| +*memzero_explicit@m((T)E, ...) +); =E2=80=A6 > +- \(kfree\|vfree\|kvfree\)(E); > ++ kvfree_sensitive(E, size); =E2=80=A6 Would you like to increase the precision a bit for the change specificatio= n? +-\(kfree\|vfree\|kvfree\) ++kvfree_sensitive + (E ++ , size + ); =E2=80=A6 > +( > +- kfree(E); > ++ kzfree(E); > +| > +- \(vfree\|kvfree\)(E); > ++ kvfree_sensitive(E, size); > +) =E2=80=A6 +( +-kfree ++kzfree + (E) +| +-\(vfree\|kvfree\) ++kvfree_sensitive + (E ++ , size + ) +); =E2=80=A6 > +coccilib.org.print_todo(p[0], > + "WARNING: opportunity for kzfree/kvfree_sensitive") I suggest to align the second function parameter. +coccilib.org.print_todo(p[0], + "WARNING: opportunity for kzfree/kvfree_sensitive= ") Regards, Markus