Received: by 10.223.176.5 with SMTP id f5csp2601318wra; Thu, 1 Feb 2018 03:06:07 -0800 (PST) X-Google-Smtp-Source: AH8x2252eYYDzUueZorIxMDHazjrr4pG/0cYa9xfL8tlhveuQPBqfJhTqJPrl6cIPozx8hn7JdSy X-Received: by 2002:a17:902:7d8b:: with SMTP id a11-v6mr30891794plm.216.1517483167692; Thu, 01 Feb 2018 03:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517483167; cv=none; d=google.com; s=arc-20160816; b=fA3WxPT0tKxBFD2hO1tFxrUa8Euh4Cz65NRgrec6wsTe5bdzLNxDRArKt77DBk2UBS dYzV9BlDEGdBPr736fJmNl2pLYPsjdnMXB368Ttt+294uDNUNd6xQS1Xj7/pbE1N4idb eC/44FhtaNUwzo2Y2kBPVvALeWTVBW4Kb1bXotlkjM9/X34bUk/BHysVE4WMHLJil5xM 7zpj4rAkSua5ZgR7rVg0QOlxh41rsf4fxiO7QXB/nrFnfqxe1nKZqVwfPdou3HOjjaXa eRYCepWmY8V/xNP/2hrCuzmn8pemEYpaXn/gjMBXHbdd/jryqvvpGyUT9mEa/5SVmdnL WH7A== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=4Lw/z82KU1MXsXfvN4bTwkp9G/sNEcWmjv6ebf7abfI=; b=TaH5h9Lz2uUDiJJSNFtWauJYDweyfg8C3kqE29T35r0OW/6kvC3eiix8vUn1xpB0qy bUVFA1CqY3I10iazC7OlTEGXj77+gFgSu+w8+8azSgmq12Kh0IurQ7AjxxuqSPCMj6Qm ehGvNJ1CCqDMTnzvkSmkXv3rAhRlj1s+Bx4BapdJjrDlDHWusX8daxHseSmu8P5oY/ON ZOLwPaXxGxpwmgaDwE6NVD1hVkhA5xpMQ+R9ApYGO+J9odb1F0dhlUpkCb4arOtm9uSF eZ22Wi2MDKBeEO8iM4fl1mFebZr3cSizsYGh9z041SnL8QWaxhC9mknSdRMFhI17eotz diKQ== 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si15905345pld.389.2018.02.01.03.05.52; Thu, 01 Feb 2018 03:06:07 -0800 (PST) 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752134AbeBALF0 (ORCPT + 99 others); Thu, 1 Feb 2018 06:05:26 -0500 Received: from mout.web.de ([212.227.15.14]:55286 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbeBALFX (ORCPT ); Thu, 1 Feb 2018 06:05:23 -0500 Received: from [192.168.1.2] ([77.182.97.34]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MBkal-1eZC6k2UeF-00AkQi; Thu, 01 Feb 2018 12:00:13 +0100 Subject: Re: Coccinelle: zalloc-simple: Delete function "kmem_cache_alloc" from SmPL rules To: Julia Lawall , cocci@systeme.lip6.fr Cc: Gilles Muller , Himanshu Jha , Masahiro Yamada , Michal Marek , Nicolas Palix , LKML , kernel-janitors@vger.kernel.org References: <6bee0e11-59ef-b7b1-886e-7abaa30887f2@users.sourceforge.net> <22276745-4723-4391-4460-07f0820ae85b@users.sourceforge.net> From: SF Markus Elfring Message-ID: Date: Thu, 1 Feb 2018 12:00:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:2tj4IDMaRt2ISt50WRNHPEfhQMWQXfylbQtsgU7Q9fwk5G2cMwx pU7YSHUtVq2MgqDABWodbX6jSu3aOMiCAfZD3bJPXoFrDuIcuU5jy6M22iZfmfqJ6qhWuLt 4Ua43vW4ztvFK1iDTGp2SyBJu4VpEHEYR/XDBaJhCaQMc4Szhwzk3+mjsn5NQ+EaLAKZo45 v7BiYrqU9IHqnqWQc2QQA== X-UI-Out-Filterresults: notjunk:1;V01:K0:GQAuekyevaM=:AMkEC/yCAg+gdSuo4czhxZ GIVQrb+SXle68+sgcMLSZQqScfngHDK0kZ/8nOSQIFJoGBpVt9BzCE3qsVXg9a/j6bPvtaAYl mCtAcfLlQ/xLfhqVFbS6VaXae5h8YLgW+w5rIkJvljylVXvC7KcDHN9MmcC0yobMeOwWcFFiy SQsT9AwfQp4B6bGn1HfoXKYkAqh7rHe6KWOpE27A4PF1dq3Qnr2lz+zLqLS8jx21qODSJTxXh oa5DGqJfgI2Ce1j2FD9hGH0IBQFvouPMcsZIB/8vnrx3vFd569HgcBU1EuFbuAv7VIERuK26l JDZ9DIuSbxtsJUfpN+E1ELVEN9oYteHo8izlsvB6BKzIMBdTq768Rgb9o4GGikwxYpSv4mO30 imgdStZ3qU59A/1pyx5k2dyaciK/LxVgXqmswVup4Qxk9uwcfr/ea5+AQD20Ifp/Er1MYrmbI 1jR7qzhjZIn/bcgzh16QEgaY8XjMuecIjA2TcYzMQjQM5ZBQ54dVAj9NbtbF0eJgYNNl7e7Vk jBd5LTc/G4Bz4z/AE2AvX3WpbUpW9gH3NrpDb+RixBmdSWhCKXMRA+zv5VN/25z8J3PMQsjyN jJE/AfsTvGzeXUNYKGXgB1eMSzJ3f/zLTIPXFsm6Z9l1ldrdoW92tjpygPfn3iyZvfX8UZi4a GV0Hk+i7FhXRWmcKq57StL5l7ql0LDjFHvJoI0AekffcNaABCtm0CfjmV6liMnaOWsqsHBYO4 AJD9wUqA1xhPUhe5qK3Qw+UaZ0bI7toAbot1kITeoTAJgjY2cy5nCECBxVpH2rQ6f3+5iTMY9 4vR/YR9skjlN1oSl5AgJ2cpuy2a8w1SlZaLR6JeqcaCCcyCfPg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> * Do we agree that a proper size determination is essential for every >> condition in the discussed SmPL rules together with forwarding >> this information? > > No. I don't mind a few false positives. I have got other source code analysis expectations there. This SmPL script contains the tag “Confidence: High”. > The user can look at the answer and see if it is a false positive or not. The situation is questionable because of a specific software design detail. Unsafe source code search patterns could be stored under other script names (or even different directories). How do you think about to move the SmPL code (which I proposed for deletion) to another script if you would insist to preserve it? > Furthermore, I told you how to address this function so that the size > issue would be taken care of. You offered another bit of information. I find your interpretation of this aspect also unclear at the moment. > That is the patch that I would accept. Are there any better development solutions left over? >> * How can a name be ever relevant (within the published SmPL approach) >> for a function when it was designed in the way that it should generally >> work without a size parameter? > > No idea what this means. I am trying again to resolve corresponding communication difficulties. Thus I suggest to take another look at the following SmPL code fragment. … kmalloc_node(E1, ...)\|kmem_cache_alloc(...)\|kmem_alloc(E1, ...)\| … * memset((T2)x,0,E1); … How many constraints should be considered for function parameters here? Regards, Markus