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

Hans Zhang
2024-12-19T12:28:52Z

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

>
>> 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?

Regards
Hans