From: SF Markus Elfring <elfring@users.sourceforge.net> To: Julia Lawall <julia.lawall@lip6.fr>, Kees Cook <keescook@chromium.org>, linux-mm@kvack.org, kernel-hardening@lists.openwall.com Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, Matthew Wilcox <willy@infradead.org>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Linus Torvalds <torvalds@linux-foundation.org> Subject: Re: [PATCH v3 12/16] treewide: Use array_size() for kmalloc()-family Date: Sun, 1 Jul 2018 11:22:36 +0200 [thread overview] Message-ID: <a98a68c8-8b08-b3e9-da7b-ff57a2614f96@users.sourceforge.net> (raw) In-Reply-To: <alpine.DEB.2.20.1807011100110.2748@hadrien> >> * 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
WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net> To: Julia Lawall <julia.lawall@lip6.fr>, Kees Cook <keescook@chromium.org>, linux-mm@kvack.org, kernel-hardening@lists.openwall.com Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, Matthew Wilcox <willy@infradead.org>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Linus Torvalds <torvalds@linux-foundation.org> Subject: Re: [PATCH v3 12/16] treewide: Use array_size() for kmalloc()-family Date: Sun, 01 Jul 2018 09:22:36 +0000 [thread overview] Message-ID: <a98a68c8-8b08-b3e9-da7b-ff57a2614f96@users.sourceforge.net> (raw) In-Reply-To: <alpine.DEB.2.20.1807011100110.2748@hadrien> >> * 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
next prev parent reply other threads:[~2018-07-01 9:23 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-01 0:42 [PATCH v3 00/16] Provide saturating helpers for allocation Kees Cook 2018-06-01 0:42 ` [PATCH v3 01/16] compiler.h: enable builtin overflow checkers and add fallback code Kees Cook 2018-06-01 0:42 ` [PATCH v3 02/16] lib: add runtime test of check_*_overflow functions Kees Cook 2018-06-01 0:42 ` [PATCH v3 03/16] lib: overflow: Report test failures Kees Cook 2018-06-01 0:42 ` [PATCH v3 04/16] overflow.h: Add allocation size calculation helpers Kees Cook 2018-06-01 0:42 ` [PATCH v3 05/16] lib: overflow: Add memory allocation overflow tests Kees Cook 2018-06-01 10:18 ` Andy Shevchenko 2018-06-01 0:42 ` [PATCH v3 06/16] mm: Use overflow helpers in kmalloc_array*() Kees Cook 2018-06-01 0:42 ` [PATCH v3 07/16] mm: Use overflow helpers in kvmalloc() Kees Cook 2018-06-01 0:42 ` [PATCH v3 08/16] device: Use overflow helpers for devm_kmalloc() Kees Cook 2018-06-01 0:42 ` [PATCH v3 09/16] treewide: Use struct_size() for kmalloc()-family Kees Cook 2018-06-01 0:42 ` [PATCH v3 10/16] treewide: Use struct_size() for vmalloc()-family Kees Cook 2018-06-01 0:42 ` [PATCH v3 11/16] treewide: Use struct_size() for devm_kmalloc() and friends Kees Cook 2018-06-01 0:42 ` [PATCH v3 12/16] treewide: Use array_size() for kmalloc()-family Kees Cook 2018-07-01 8:46 ` SF Markus Elfring 2018-07-01 8:46 ` SF Markus Elfring 2018-07-01 8:46 ` SF Markus Elfring 2018-07-01 9:03 ` Julia Lawall 2018-07-01 9:03 ` Julia Lawall 2018-07-01 9:03 ` Julia Lawall 2018-07-01 9:22 ` SF Markus Elfring [this message] 2018-07-01 9:22 ` SF Markus Elfring 2018-06-01 0:42 ` [PATCH v3 13/16] treewide: Use array_size() for kmalloc()-family, leftovers Kees Cook 2018-06-01 0:42 ` [PATCH v3 14/16] treewide: Use array_size() for vmalloc() Kees Cook 2018-06-01 0:42 ` [PATCH v3 15/16] treewide: Use array_size() for devm_*alloc()-like Kees Cook 2018-06-01 0:42 ` [PATCH v3 16/16] treewide: Use array_size() for devm_*alloc()-like, leftovers Kees Cook 2018-06-01 0:54 ` [PATCH v3 00/16] Provide saturating helpers for allocation Linus Torvalds 2018-06-01 4:18 ` Kees Cook
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=a98a68c8-8b08-b3e9-da7b-ff57a2614f96@users.sourceforge.net \ --to=elfring@users.sourceforge.net \ --cc=julia.lawall@lip6.fr \ --cc=keescook@chromium.org \ --cc=kernel-hardening@lists.openwall.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux@rasmusvillemoes.dk \ --cc=torvalds@linux-foundation.org \ --cc=willy@infradead.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.