From: Dan Carpenter <dan.carpenter@oracle.com>
To: ChiYuan Huang <u0084500@gmail.com>
Cc: Lee Jones <lee@kernel.org>, ChiYuan Huang <cy_huang@richtek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
ChiaEn Wu <chiaen_wu@richtek.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH resend] mfd: mt6370: add bounds checking to regmap_read/write functions
Date: Wed, 26 Oct 2022 11:50:47 +0300 [thread overview]
Message-ID: <Y1j058PsWYj0MQrC@kadam> (raw)
In-Reply-To: <20221026072444.GA24881@cyhuang-hp-elitebook-840-g3.rt>
On Wed, Oct 26, 2022 at 03:24:48PM +0800, ChiYuan Huang wrote:
> 2) normal register access with negative length
> Unable to handle kernel paging request at virtual address ffffffc009cefff2
> pc : __memcpy+0x1dc/0x260
> lr : _regmap_raw_write_impl+0x6d4/0x828
> Call trace:
> __memcpy+0x1dc/0x260
> _regmap_raw_write+0xb4/0x130a
> regmap_raw_write+0x74/0xb0
>
>
> After applying the patch, the first case is cleared.
> But for the case 2, the root cause is not the mt6370_regmap_write() size
> check. It's in __memcpy() before mt6370_regmap_write().
>
> I'm wondering 'is it reasonable to give the negative value as the size?'
>
Thanks for testing!
I'm not sure I understand exactly which code you're talking about.
Could you just create a diff with the check for negative just so I can
understand where the issue is? We can re-work it into a proper patch
from there.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: ChiYuan Huang <u0084500@gmail.com>
Cc: Lee Jones <lee@kernel.org>, ChiYuan Huang <cy_huang@richtek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
ChiaEn Wu <chiaen_wu@richtek.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH resend] mfd: mt6370: add bounds checking to regmap_read/write functions
Date: Wed, 26 Oct 2022 11:50:47 +0300 [thread overview]
Message-ID: <Y1j058PsWYj0MQrC@kadam> (raw)
In-Reply-To: <20221026072444.GA24881@cyhuang-hp-elitebook-840-g3.rt>
On Wed, Oct 26, 2022 at 03:24:48PM +0800, ChiYuan Huang wrote:
> 2) normal register access with negative length
> Unable to handle kernel paging request at virtual address ffffffc009cefff2
> pc : __memcpy+0x1dc/0x260
> lr : _regmap_raw_write_impl+0x6d4/0x828
> Call trace:
> __memcpy+0x1dc/0x260
> _regmap_raw_write+0xb4/0x130a
> regmap_raw_write+0x74/0xb0
>
>
> After applying the patch, the first case is cleared.
> But for the case 2, the root cause is not the mt6370_regmap_write() size
> check. It's in __memcpy() before mt6370_regmap_write().
>
> I'm wondering 'is it reasonable to give the negative value as the size?'
>
Thanks for testing!
I'm not sure I understand exactly which code you're talking about.
Could you just create a diff with the check for negative just so I can
understand where the issue is? We can re-work it into a proper patch
from there.
regards,
dan carpenter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-26 8:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 12:18 [PATCH resend] mfd: mt6370: add bounds checking to regmap_read/write functions Dan Carpenter
2022-10-24 12:18 ` Dan Carpenter
2022-10-26 7:24 ` ChiYuan Huang
2022-10-26 7:24 ` ChiYuan Huang
2022-10-26 8:50 ` Dan Carpenter [this message]
2022-10-26 8:50 ` Dan Carpenter
2022-10-26 9:05 ` ChiYuan Huang
2022-10-26 9:05 ` ChiYuan Huang
2022-10-27 1:59 ` ChiYuan Huang
2022-10-27 1:59 ` ChiYuan Huang
2022-10-27 13:59 ` Dan Carpenter
2022-10-27 13:59 ` Dan Carpenter
2022-10-27 14:28 ` ChiYuan Huang
2022-10-27 14:28 ` ChiYuan Huang
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=Y1j058PsWYj0MQrC@kadam \
--to=dan.carpenter@oracle.com \
--cc=andy.shevchenko@gmail.com \
--cc=chiaen_wu@richtek.com \
--cc=cy_huang@richtek.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=u0084500@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 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.