Re: [PATCH] misc: pci_endpoint_test: fixed pci_resource_len return value out of bounds.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 19 Dec 2024, Hans Zhang wrote:
> On 12/18/24 10:00, Ilpo Järvinen wrote:
> 
> > I'm not sure how out-of-bounds access would happen. On which line you see
> > that possibility?
> Please see #L291
> https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/misc/pci_endpoint_test.c#L291

Ah, so this was just a language confusion (understandable, we're not 
perfect in expressing ourselves in English, me included).

So you didn't mean "out-of-bound access" at all but that the value is too 
large to fit the int sized variable.

Could you please try to phrase it better so it's clear what you mean with 
it. And it feels that said multiple times as there's also the 2G thing 
mentioned elsewhere in the changelog. It would be nice if you could try to 
avoid such duplication. So try to structure changelog so that you first 
describe the problem and its impact. And the how the patch solves the 
issue.

> > > If the bar size of the EP device exceeds
> > 
> > BAR size
> > 
> > > 4G, this bar_Size will be equal to 0.
> > 
> > bar_size
> > 
> > I think bar0 and bar1 information could simply be dropped since they're
> > unrelated. I think this would be enough information:
> > 
> > With 8GB BAR2, running pcitest -b 2 fails with "TEST FAILED".
> > 
> 
> Do I need to add the patch version?

Yes, when you change the patch in anyway, please create a new version.

-- 
 i.

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux