From: Tom Rix <trix@redhat.com>
To: Pavel Skripkin <paskripkin@gmail.com>,
mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
cai.huoqing@linux.dev, xose.vazquez@gmail.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: stkwebcam: move stk_camera_read_reg() scratch buffer to struct stk_camera
Date: Sun, 13 Mar 2022 08:35:40 -0700 [thread overview]
Message-ID: <b5711870-b047-d1cb-d272-b193175d6238@redhat.com> (raw)
In-Reply-To: <0d8dfedb-1c2c-1a70-18dc-0c4439cf4bda@gmail.com>
On 3/13/22 8:11 AM, Pavel Skripkin wrote:
> Hi Tom,
>
> On 3/13/22 02:48, Tom Rix wrote:
>> These do show up in my usual static analysis and it why I was looking at
>> this file.
>>
>> And was sidetracked by the short malloc.
>>
>> Unfortunately I looked and there are many other similar instances
>> treewide ~100
>>
>
> Most of them are in very old drivers and I don't think they ever be
> fixed. I've looked into one bug reported by syzkaller and there was
> like 30 calls w/o proper error handling in one driver. Redoing whole
> driver logic without access to hw seems dangerous :))
From the checkpatch change below, there are about 150 dinky allocs treewide
Here is a refactoring
https://lore.kernel.org/lkml/20220313141008.1503638-1-trix@redhat.com/
>
>
>> These aren't caught in checkpatch, so working on that..
>>
>
> I think, it's not checkpath responsibility. Maybe it worth adding such
> check to smatch. I tried to implement such checker, but never finished
> it :(
>
>
Poking new development to not do dinky allocs I think is worth it, here
is my checkpatch patch
https://lore.kernel.org/lkml/20220313140827.1503359-1-trix@redhat.com/
steal the regex for smatch.
Tom
>
> With regards,
> Pavel Skripkin
>
next prev parent reply other threads:[~2022-03-13 15:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-12 17:30 trix
2022-03-12 19:50 ` Pavel Skripkin
2022-03-12 19:58 ` Pavel Skripkin
2022-03-12 23:48 ` Tom Rix
2022-03-13 15:11 ` Pavel Skripkin
2022-03-13 15:35 ` Tom Rix [this message]
2022-04-27 5:38 ` Hans Verkuil
2022-04-27 19:03 ` Tom Rix
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=b5711870-b047-d1cb-d272-b193175d6238@redhat.com \
--to=trix@redhat.com \
--cc=cai.huoqing@linux.dev \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=paskripkin@gmail.com \
--cc=xose.vazquez@gmail.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®