smatch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Reshetova, Elena" <elena.reshetova@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "smatch@vger.kernel.org" <smatch@vger.kernel.org>
Subject: RE: [PATCH] smatch_kernel_host_data: enable additional debug
Date: Tue, 28 Jun 2022 08:27:09 +0000	[thread overview]
Message-ID: <DM8PR11MB5750F0B17A16FDDBC66E1AEFE7B89@DM8PR11MB5750.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220627143943.GK11460@kadam>

> Hey Elena,
> 
> I've pushed some changes to smatch_kernel_host_data.c and
> smatch_points_to_host_data.c.  It hopefully just brings that code more
> in line with the user_data code.

Hi Dan, 

Thank you very much for the fixes!

I am actually still planning to work on this further, especially I need to finish
re-writing the new pattern that produces the warning list for all host
input processing done in the code (we use this as a basis for our fuzzing coverage
analysis). 

> 
> The main thing is that smatch_points_to_host_data.c didn't differentiate
> between when the function gets host data from the user vs when it is
> passed in.  That means if you have function:
> 
> int *frob(int *x)
> {
> 	return x;
> }
> 
> And one caller passes in host data then all of them get host data back.
> So then now we're passing host data pointers to even more functions and
> the problem gets worse and worse over time.

Yes, makes sense, I didn’t realize that this was happening with the previous code. 

> 
> Which is maybe not a huge deal in terms of the warnings generated, but
> it was taking 8GB of data in my database.

Oh, this is really bad for the database. I am sorry about this!

Best Regards,
Elena.

> 
> regards,
> dan carpenter

      reply	other threads:[~2022-06-28  8:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  8:07 [PATCH] smatch_kernel_host_data: enable additional debug Elena Reshetova
2022-05-18  8:29 ` Dan Carpenter
2022-05-18 10:03   ` Reshetova, Elena
2022-06-27 14:39     ` Dan Carpenter
2022-06-28  8:27       ` Reshetova, Elena [this message]

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=DM8PR11MB5750F0B17A16FDDBC66E1AEFE7B89@DM8PR11MB5750.namprd11.prod.outlook.com \
    --to=elena.reshetova@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=smatch@vger.kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).