Re: [PATCH 6/6] usbip: vhci_sysfs: Use safer strscpy() instead of strcpy()

From: Dan Carpenter

Date: Wed Mar 25 2026 - 07:15:40 EST


On Tue, Mar 24, 2026 at 03:34:03PM -0600, Shuah Khan wrote:
> On 3/11/26 01:22, Dan Carpenter wrote:
> > On Tue, Mar 10, 2026 at 04:10:20PM -0600, Shuah Khan wrote:
> > > On 3/10/26 03:44, Ai Chao wrote:
> > > > Use a safer function strscpy() instead of strcpy() for copying to
> > > > arrays.
> > > >
> > > > Only idiomatic code replacement, and no functional changes.
> > >
> > > It is a functional change since it calls a new routine. Get rid
> > > of this line from change log.
> > >
> > > How did you test this patch? I am curious because of you are
> > > describing the change as "idiomatic code replacement"
> > >
> >
> > I liked the commit message... To me it says that patch affect
> > runtime. It doesn' fix any bugs or introduce any bugs. Too often
> > these changes are sold as a "potential" bugfix, which means people
> > haven't bothered to check whether it fixes a bug or not.
> >
> > It's the right thing to add a note under the --- cut off that the
> > patch hasn't been tested. Testing isn't required for this sort
> > of patch but a note is good so reviewers will know to be careful.
>
> I would like to see some sort of testing for patches like this one.
> It isn't hard to test this change.

It would take me a while to figure out how to test this. :P Presumably,
it's:

sudo ./tools/testing/selftests/drivers/usb/usbip/usbip_test.sh -b<busid> -p tools/usb/usbip/

but I couldn't figure out what to supply for a busid... Does
kernel-ci do usbip testing?

regards,
dan carpenter