Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp779600ybt; Wed, 17 Jun 2020 13:53:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJXue3c5p45x42/fHOoojR9l5g8lbNN4HXriUwT6yQhvhtHebZmhmyoMNhNGTRX2voA1xw X-Received: by 2002:a17:906:1c02:: with SMTP id k2mr945723ejg.37.1592427206462; Wed, 17 Jun 2020 13:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592427206; cv=none; d=google.com; s=arc-20160816; b=ReyWUen9kbJP0g94tHytzUbjoh038SDT0ea1J3g96eDp7y8MbofbqziGcEgddp+Gj8 pUsb5QArJ4OWPBbJ+xQH7MAfK2Fc0hp2mYrAjemTmq8CgZAJ3Y+rykD4PmfO4ugc6LJC i1Qx7SizmAHpZLyWTUfzx1oi3ajPbrE/6cAHkklmiyWC5Zgbin8f5MC0zDyZEf01MM0c /JUlXWZY7LUDxonrR5OipBgJCFbaMeK75TXTj4n/8+kRCN6kqHLQ8uMpCDva1B/FcZlN NJ9j2RhuXCA2bVKWrL1PIOV1+3K5/F5DE+A9nKMzryfYI/tJSswsukew7yCZeXofsRBX VFpA== 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:autocrypt:from:references:cc:to:subject; bh=R+dO6lRqS1PqrSqM52LBt9VsranfNdzbtSbVVQr3dFw=; b=AWN0T8zzGC/LGIM+vusLVzgDEwsanaAvnCW9Z3/3prJSbOzGEwiTNh9ygIWYjXsIpS mzG+pQdP5p7DMpSMGCGs3Q9YzgLTvZxGJiOFKavWRmnKNqzPSdKqkqEhRXKUmPjh4nbU 7DLBsGJdjdfc7OPxzNceXCVq8dov6NJZzR48dlRXDEp9nsf8tyjB2XGqv/QHtI7YE8y9 bZeRohC4KLj0QA0JrPz32m8Hhs/Lm64tlfNRSCa3hjH47q7XRy3IEXEkh6IPNuH92Nk2 jAGEB+HEaF3dzRwbG16jTqyVHj+lmuq1Da3AE2hzbBYNJyVUTsF6YP1XMV/hpHiucPFk xyBQ== ARC-Authentication-Results: i=1; mx.google.com; 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 e7si602004ejc.314.2020.06.17.13.53.02; Wed, 17 Jun 2020 13:53:26 -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; 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 S1726905AbgFQUug (ORCPT + 99 others); Wed, 17 Jun 2020 16:50:36 -0400 Received: from mail-lj1-f178.google.com ([209.85.208.178]:37930 "EHLO mail-lj1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbgFQUuf (ORCPT ); Wed, 17 Jun 2020 16:50:35 -0400 Received: by mail-lj1-f178.google.com with SMTP id 9so4596960ljv.5 for ; Wed, 17 Jun 2020 13:50:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=R+dO6lRqS1PqrSqM52LBt9VsranfNdzbtSbVVQr3dFw=; b=pceJSjIWhRUw+Fg4TUXtLrYOxu/4fH1L/rZ9sm6b5i9VEcqLG0Z0enyvhNyxF4RNd9 ZCeO1cijAzMHqumN1BAV6g1pTDtEj4ksPX4KlUyEUipplZ+30iXpw9uesH//koKkn+hL oFhaLTYsS+ultyxn5omuWR+Jq77PocgcF8GSQh6WR3zmFWXH0QklXB6JRvd/HGkk+yUh g71cB7u1TdjGQU8JuX7I9zUuCFQ9Xcyd/Awu0v3JggRZIJ2IqUNnljcZB84Ip3RpRvZX KawLJj/g01Qu18ofIrr7CkJ0T+ucML/ZTzTY85lhpgkdRWSSA4IPjusim9bxfE97nANY Cmew== X-Gm-Message-State: AOAM531JzvDtlDnDHdVZvuUqMFuUQTGfgMaAvF+gEvYgx3pfZWfjIsEi H9TENTjbcdDZC2z2ddbF2V9NRGxYLcg= X-Received: by 2002:a2e:7e08:: with SMTP id z8mr482595ljc.339.1592427033193; Wed, 17 Jun 2020 13:50:33 -0700 (PDT) Received: from [192.168.1.8] ([213.87.137.195]) by smtp.gmail.com with ESMTPSA id m11sm189850lfl.70.2020.06.17.13.50.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Jun 2020 13:50:32 -0700 (PDT) Subject: Re: [Cocci] [PATCH] coccinelle: misc: add array_size_dup script to detect missed overlow checks To: Julia Lawall Cc: Kees Cook , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org References: <20200615102045.4558-1-efremov@linux.com> From: Denis Efremov Autocrypt: addr=efremov@linux.com; keydata= mQINBFsJUXwBEADDnzbOGE/X5ZdHqpK/kNmR7AY39b/rR+2Wm/VbQHV+jpGk8ZL07iOWnVe1 ZInSp3Ze+scB4ZK+y48z0YDvKUU3L85Nb31UASB2bgWIV+8tmW4kV8a2PosqIc4wp4/Qa2A/ Ip6q+bWurxOOjyJkfzt51p6Th4FTUsuoxINKRMjHrs/0y5oEc7Wt/1qk2ljmnSocg3fMxo8+ y6IxmXt5tYvt+FfBqx/1XwXuOSd0WOku+/jscYmBPwyrLdk/pMSnnld6a2Fp1zxWIKz+4VJm QEIlCTe5SO3h5sozpXeWS916VwwCuf8oov6706yC4MlmAqsQpBdoihQEA7zgh+pk10sCvviX FYM4gIcoMkKRex/NSqmeh3VmvQ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vfWyEhJT+CS3JJyP8BmmSgPa0Adlp6Do+pRsOO1YNNO78SYABhMi3fEa7X37 WxL31TrNCPnIauTgZtf/KCFQJpKaakC3ffEkPhyTjEl7oOE9xccNjccZraadi+2uHV0ULA1m ycHhb817A03n1I00QwLf2wOkckdqTqRbFFI/ik69hF9hemK/BmAHpShI+z1JsYT9cSs8D7wb aF/jQVy4URensgAPkgXsRiboqOj/rTz9F5mpd/gPU/IOUPFEMoo4TInt/+dEVECHioU3RRrW EahrGMfRngbdp/mKs9aBR56ECMfFFUPyI3VJsNbgpcIJjV/0N+JdJKQpJ/4uQ2zNm0wH/RU8 CRJvEwtKemX6fp/zLI36Gvz8zJIjSBIEqCb7vdgvWarksrhmi6/Jay5zRZ03+k6YwiqgX8t7 ANwvYa1h1dQ36OiTqm1cIxRCGl4wrypOVGx3OjCar7sBLD+NkwO4RaqFvdv0xuuy4x01VnOF Message-ID: <7c7b22f8-722c-60f5-db5d-290bea2b499c@linux.com> Date: Wed, 17 Jun 2020 23:50:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/17/20 11:30 PM, Julia Lawall wrote: > > > On Mon, 15 Jun 2020, Denis Efremov wrote: > >> Detect an opencoded expression that is used before or after >> array_size()/array3_size()/struct_size() to compute the same size. > > This would benefit from the assignemnt operator metavariables as well. > > Also, it could be better to put the python rules up next the SmPL pattern > matching rules that they are associated with. > Thanks, I will send v2. Here is the KSPP ticket with patches https://github.com/KSPP/linux/issues/83