mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dongliang Mu <dzm91@hust.edu.cn>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Dan Carpenter <error27@gmail.com>
Cc: Vicki Pfau <vi@endrift.com>,
	kernel-janitors@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Pavel Rojtberg <rojtberg@gmail.com>, Nate Yocom <nate@yocom.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	John Butler <radon86dev@gmail.com>,
	Matthias Benkmann <matthias.benkmann@gmail.com>,
	Christopher Crockett <chaorace@gmail.com>,
	Santosh De Massari <s.demassari@gmail.com>,
	hust-os-kernel-patches@googlegroups.com,
	syzbot+a3f758b8d8cb7e49afec@syzkaller.appspotmail.com,
	"Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: xpad - fix GPF in xpad_probe
Date: Sun, 23 Apr 2023 10:33:29 +0800	[thread overview]
Message-ID: <f71f3012-916c-5271-b908-feeee5a85a46@hust.edu.cn> (raw)
In-Reply-To: <d49bb5a2-ed78-4b16-b7ea-b9c7748ca0e4@kili.mountain>


On 2023/4/23 03:48, Dan Carpenter wrote:
> The warnings from this are quite promising.
>
> When you're writing a check, you start with a simple idea and then try
> it and then filter out the common false positives.
>
> The first 10 warnings are from loops like:
>
> 	p = NULL;
>
> 	for (i = 0; i < limit; i++) {
> 		if (i == 0)
> 			p = non_null();
> 		else
> 			*p = something();
> 	}
>
> Smatch doesn't handle loops correctly.  (I know how to fix this but I've
> never gotten around to it because it would make Smatch slow)...
>
> So instead of that maybe I would do a hack to silence this type of
> warning.  Not sure what...
>
> drivers/usb/gadget/udc/amd5536udc_pci.c:61 udc_pci_remove() warn: pointer dereferenced without being set '&udc->gadget'
> This one is interesting.  Seems like a real bug.
>
> drivers/mtd/ubi/block.c:391 ubiblock_create() warn: pointer dereferenced without being set 'dev->gd'
>
> This one too.  So maybe we could make this a separate warning where
> NULL dereferences happen on error paths.  Or maybe when they happen in
> printks.
>
> So there are ways to take this first draft and massage it and get
> fewer false positives, by filtering false positives or taking things
> which work and creating new checks instead.

Hi Dan,

thanks for your efforts. After finishing the current task list, we can 
first ask senior students to check this result quickly and then assign 
highly-to-be True Positive to students.

BTW, do you have any plans to improve the code readability, directory 
orgranization, documentation etc. of Smatch? It's hard even for senior 
students to start with.

> Anyway, results attached.
>
> regards,
> dan carpenter
>

  parent reply	other threads:[~2023-04-23  2:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 12:55 Dongliang Mu
2023-04-17  9:25 ` Dan Carpenter
     [not found]   ` <99794af0-7367-acff-357d-1cd4fa7f832e@hust.edu.cn>
2023-04-17 10:24     ` Vicki Pfau
     [not found]       ` <57577302-8d18-231f-062b-b1d262720943@hust.edu.cn>
2023-04-17 11:07         ` Vicki Pfau
2023-04-17 11:15           ` Dongliang Mu
2023-04-17 10:42   ` Dan Carpenter
2023-04-20 11:07     ` Dan Carpenter
2023-04-22 19:48       ` Dan Carpenter
2023-04-22 19:56         ` Dan Carpenter
2023-04-23  2:33         ` Dongliang Mu [this message]
2023-05-02 10:34           ` Dan Carpenter
2023-08-14 21:12 Claudia De-Massari

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=f71f3012-916c-5271-b908-feeee5a85a46@hust.edu.cn \
    --to=dzm91@hust.edu.cn \
    --cc=chaorace@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=error27@gmail.com \
    --cc=hust-os-kernel-patches@googlegroups.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.benkmann@gmail.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=nate@yocom.org \
    --cc=pgriffais@valvesoftware.com \
    --cc=radon86dev@gmail.com \
    --cc=rojtberg@gmail.com \
    --cc=s.demassari@gmail.com \
    --cc=syzbot+a3f758b8d8cb7e49afec@syzkaller.appspotmail.com \
    --cc=vi@endrift.com \
    /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

all inboxes | Powered by JetHome®