From: "Mohammed Billoo" <mab@mab-labs.com>
To: Mohammed Billoo <mab@mab-labs.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>, linux-safety@lists.elisa.tech
Subject: Re: [linux-safety] [PATCH] coccinelle: misc: Check for hard-coded constants
Date: Thu, 13 Aug 2020 10:45:37 -0400 [thread overview]
Message-ID: <CALkjhPpmHusUTaY1dbohM_Fc7UrGSXUav=evqg+6rauBdaVemA@mail.gmail.com> (raw)
In-Reply-To: <162ADAEB16525C4A.3117@lists.elisa.tech>
[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]
I also had a few more questions regarding the overall format:
1. Is the header format in the semantic patch acceptable (i.e. referencing
the CWE that this particular semantic patch aims to address)?
2. Should we create a separate directory for ELISA within coccinelle?
Thanks
Mohammed
On Thu, Aug 13, 2020 at 10:42 AM Mohammed Billoo via lists.elisa.tech
<mab=mab-labs.com@lists.elisa.tech> wrote:
> Shuah,
>
> Apologies for the spam. I didn't format the initial correctly and needed
> two more tries to get it right (according to the kernel
> standard/best-practice). I can resubmit this patch.
>
> Thanks
>
> On Thu, Aug 13, 2020 at 10:39 AM Shuah Khan <skhan@linuxfoundation.org>
> wrote:
>
>> Hi Mohammed,
>>
>> Thanks for your patch.
>>
>> On 8/12/20 5:43 PM, Mohammed Billoo wrote:
>> > This semantic patch looks for variables that are initialized to
>> > constants, arrays that are both declared and indexed with constants.
>> > A false positive will occur when a variable is initialized to 0, which
>> > must happen for auto variables. This will be resolved in a future patch.
>> >
>> > The patch was tested against the following snippet:
>> >
>> > int main()
>> > {
>> > int iarr[54]; /* instance 1 */
>> > int j = 0; /* instance 2 */
>> > int i = 1; /* instance 3 */
>> > iarr[0] = 3; /* instance 4 */
>> > return 0;
>> > }
>> >
>> > and it correctly identified instances 1, 3, and 4. It incorrectly
>> > identified instance 2, which will be addressed in a future patch.
>>
>> Please include the output from the tool that corresponds to your
>> changes to the script in the commit log on a kernel file.
>>
>> Also I see 3 patches with incremental changes to the script. Please
>> make this a patch series which will make it easier for reviewers.
>>
>> thanks,
>> -- Shuah
>>
>
>
> --
> Mohammed A Billoo
> Founder
> MAB Labs, LLC
> www.mab-labs.com
> 201-338-2022
>
>
>
--
Mohammed A Billoo
Founder
MAB Labs, LLC
www.mab-labs.com
201-338-2022
[-- Attachment #2: Type: text/html, Size: 3137 bytes --]
next prev parent reply other threads:[~2020-08-13 14:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 23:43 [PATCH] coccinelle: misc: Check for hard-coded constants Mohammed Billoo
2020-08-13 14:39 ` [linux-safety] " Shuah Khan
2020-08-13 14:41 ` Mohammed Billoo
[not found] ` <162ADAEB16525C4A.3117@lists.elisa.tech>
2020-08-13 14:45 ` Mohammed Billoo [this message]
2020-08-13 15:16 Lukas Bulwahn
2020-08-13 15:23 ` Mohammed Billoo
2020-08-13 15:33 ` Lukas Bulwahn
2020-08-13 15:41 ` Sudip Mukherjee
2020-08-13 17:02 ` Shuah Khan
[not found] ` <162AE2925F9D984B.16363@lists.elisa.tech>
2020-08-13 19:43 ` Shuah Khan
2020-08-13 15:45 Lukas Bulwahn
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='CALkjhPpmHusUTaY1dbohM_Fc7UrGSXUav=evqg+6rauBdaVemA@mail.gmail.com' \
--to=mab@mab-labs.com \
--cc=linux-safety@lists.elisa.tech \
--cc=skhan@linuxfoundation.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).