Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2647782imm; Sun, 1 Jul 2018 02:24:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUFYRruOYrdBQcrJaLMDnO5N3TXyeCdwCn3TgXc7u2i72PRBEMdDqcj1z4Dc3dCcr/vAjn X-Received: by 2002:a62:9f16:: with SMTP id g22-v6mr20730224pfe.207.1530437048135; Sun, 01 Jul 2018 02:24:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530437048; cv=none; d=google.com; s=arc-20160816; b=PDPwckegttepIo8WXRDLZAX4sAGfJbcgpiC0mHQNcDyWUDGaCZle9c2+LMqXF7ETLk vyONKtAPLrl3cewHJAODQdHVmgRwv6vBb6y7qumPHVOTa6Rlg3Pg40qAhe0DK2WkN+ft HbeDjflbwzkluu6rNtayFP+BpBMAEH12ZAUekD20gh4EqCZMk9sYXMA8qNsxj1IBmoAs j21m+a1HoNUxt1LONkkVFXJyb/caw3d4d+ge10S9OdJ+LTvMXuoa8as3QaIrW+NhZ95a ZqXJdqfMF7iiIkl1mP3QiqYRbbr7sEdOG9LJQi8hZ3GBX7dxlMlSzgcq42nt7+u2iG/J gSeA== 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=ZrWFl9sHFY1BH+2suIsENikyt6E8Krf8xv2mxKsURoo=; b=vSL4AG7mfDtVpkRgAmZ+dIX4zBUshuwYye/VGeCG97K83eE7cT7FSu6XwGJxWq7yi8 /GVy6QBnZ6n020ma11hQeUi64binnqEyL9gPTaoVZncjiQJMB+HUJrTJ+sCYUwMl3tju a/gD5MphmQybWerBywRg6KKduTFhZXmTO19xhzqMdURD77KP4dlZvFplXJ1I4mTHdnpv fTPnn1YY/PC1LjSaWyFyuNUzdE8lG+CslxyzNgMtIryPUB7h2i9NbH2iMs2z8BOOeYr9 dzCBBKt6Tvy8b1ySJPEqQIZ37O8YMakfgGhzpTinF1r9QoBNqi791CwT2t5gqQSjY/8o hh8A== 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 y2-v6si13728471plk.473.2018.07.01.02.23.52; Sun, 01 Jul 2018 02:24:08 -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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752075AbeGAJXM (ORCPT + 99 others); Sun, 1 Jul 2018 05:23:12 -0400 Received: from mout.web.de ([212.227.15.4]:36363 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbeGAJXJ (ORCPT ); Sun, 1 Jul 2018 05:23:09 -0400 Received: from [192.168.1.3] ([77.181.193.101]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MhDRB-1fn54z0Kzx-00MITK; Sun, 01 Jul 2018 11:22:40 +0200 Subject: Re: [PATCH v3 12/16] treewide: Use array_size() for kmalloc()-family To: Julia Lawall , Kees Cook , linux-mm@kvack.org, kernel-hardening@lists.openwall.com Cc: kernel-janitors@vger.kernel.org, LKML , Matthew Wilcox , Rasmus Villemoes , Linus Torvalds References: <20180601004233.37822-13-keescook@chromium.org> From: SF Markus Elfring Message-ID: Date: Sun, 1 Jul 2018 11:22:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:nhphkcdQ4vZGS50OQT1JOSEEpeAuBXy0hOC+wFrNXWn1CKSKUQP sU+CUVHX/z5sOG4JiEWt+4BsbY8Bp1fnXUdZz9F53knUsp8+5OQw7r3E60zvDIDwd358yCr 9dV+a3iCByIX2HVd8BXxRia/P10oyVHmYYy2HTMBHrpTc4BjvTmQuZPES4wkr201FzeHFzs VDNZmX6aHNuFA5noC500w== X-UI-Out-Filterresults: notjunk:1;V01:K0:N1G1Wk93Sg8=:uo3QLi3cBDf89j1OCISRd4 k7iGS5cgXCxXh8QkUhaGMPJB7X7h1eSwSO2M43fgVdqfDjambpkGdoSTvuXeJhdLlWSM3OIQY SNn2DFNP4wfjIvG2QOjVbjfiG1TzLI1dWhL6uG19Ofrwn+Mpu4WJvamCgKbWXiklM5RfUbgqI m4nZJfM/QGWAZbGKaeH+YD9oVt/QKVse5AT5cUgZSZszOxCrlNyhv4z0kdGGJa+1VSlV+tEVc uRGwrNW1Qg4WLe6KVw3I6d9XX+OLLff6KT93i8vYI8b8zGJ3WiZjWlZubTwSq7FLubu6GY7lI uBLXdjgORzEYkjd6F9S+8OjtGMqRPARJ2aRkXhLm+Ydzw7xTwY5QWGs1+Hp2NB/1XDD1lhxOi tAlZ+7FfI7VJbsYl3/s2zWO15r2HfdaQe4EALrOJt2TF0J3SPO9Mz7u+ur2T4tDdMjKyPiKzJ KkKdBZqvwcTUtLOXfx5QPzqWRMfepwsvsLQzqeH1f4zIkN1jBZy3he72detWty9KhhW2IbZiB 1rIB+zJ5BOJRRnfPrd7YHTit8hryQzGaUa3G5Eo2G167D6UwfmFJw0xEcohU8j2bP932fI3lb qgFtB7QxY9rMvdUV9ONP8dOypIjdtWkAgvQ9oAEI1FUc48Nx+Wgn3KXoDyaN3M27PP5l6+wq0 YnlcfOwFek0ivl6FGFUjINaIHrHiny6Pv+QhbvcEke8VBZyEOr39T4HPYSqa/3kOP3qB7PXJv Ldy91LCo3ZuLolwY9yijPh9m08/tDTXCdkBqHHbEsrq9RrcZJpAxtySJSNtUX4nzXwSjjr2cx F0g7B2a Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> * The repetition of such a constraint in subsequent SmPL rules could be avoided >> if inheritance will be used for this metavariable. > > This is quite incorrect. I suggest to consider additional software design options. > Inheritance is only possible when a match of the previous rule has succeeded. I agree with this information. > If a rule never applies in a given file, the rules that inherit from it > won't apply either. I would like to point the possibility out to specify a source code search which will find interesting function calls at least by an inital SmPL rule. > Furthermore, what is inherited is the value, not the constraint. This technical detail can be fine. > If the original binding of alloc only ever matches kmalloc, > then the inherited references will only match kmalloc too. Can the desired search pattern be extended in significant ways? Regards, Markus