Re: [PATCH v7 net-next 5/5] octeontx2-af: npc: Support for custom KPU profile from filesystem
From: Simon Horman
Date: Wed Mar 25 2026 - 12:46:20 EST
On Wed, Mar 25, 2026 at 08:44:30AM +0530, Ratheesh Kannoth wrote:
> On 2026-03-24 at 22:06:21, Simon Horman (horms@xxxxxxxxxx) wrote:
...
> > Perhaps it applies to the existing code as well. But I think
> > the new code to handle parsing images read from the file system
> > could benefit from bounds checking. Basically passing in the length
> > of the firmware image as an argument and ensuring that data beyond
> > that length isn't accessed.
> This is already done in both arms of the code.
>
> if (rvu->kpu_fwdata_sz < hdr_sz + offset) {
> dev_warn(rvu->dev,
> "Profile size mismatch on KPU%i parsing.\n",
> "profile size mismatch on kpu%i parsing.\n",
> kpu + 1);
> return -EINVAL;
>
> >
Sorry, somehow I missed that.