On Fri, Jan 29, 2021 at 01:51:55PM +0530, Kumar Kartikeya Dwivedi wrote:
> [Forgot to reply-all]
> 
> On 0129, Greg Kroah-Hartman wrote:
> > On Fri, Jan 29, 2021 at 12:15:23PM +0530, Kumar Kartikeya Dwivedi wrote:
> > > Fixes checkpatch warnings for usage of strlcpy.
> > 
> > What warning would that be?
> > 
> 
> 5dbdb2d87c294401a22e6a6002f08ebc9fbea38b
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5dbdb2d87c294401a22e6a6002f08ebc9fbea38b

Hint, in the future, write the above as: 5dbdb2d87c29 ("checkpatch:
prefer strscpy to strlcpy").  The documentation has examples of how to
do this easily.

And yes, I know that checkpatch says that, but I need to know how you
know this is the correct change.

> > And if we could just search/replace for this, why hasn't that already
> > happened for the whole tree?
> >
> 
> I think that's because it is hard to tell whether truncation is expected at 
> the
> call site or not, so each change needs to be audited manually (to check the
> return value or not). In cases where it's just a safe strcpy, strscpy is a
> relatively better choice (due to not reading the entire source string).

Did you do that auditing?  I need to know that you did and that this is
fine, or that maybe, this isn't needed at all?  All of that information
needs to go in the changelog.

thanks,

greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to