On Wed, 2018-01-03 at 10:42 -0500, Dennis Dalessandro wrote: > On 1/3/2018 10:27 AM, Leon Romanovsky wrote: > > On Wed, Jan 03, 2018 at 10:05:56AM -0500, Dennis Dalessandro wrote: > > > On 12/20/2017 3:25 AM, Leon Romanovsky wrote: > > > > On Mon, Dec 18, 2017 at 07:56:23PM -0800, Dennis Dalessandro wrote: > > > > > The call to strchr in our counter initialization does not check the return > > > > > value before attempting to use the pointer. In theory this should not > > > > > happen given the way the code is structured but do the smart thing and > > > > > check the value anyway to harden the code. > > > > > > > > The smartest way is to get rid of the whole "\n"<->"\0" logic and > > > > copy/paste mlx5 implementation which does the same thing but statically > > > > and much safer than here. > > > > > > > > Thanks > > > > > > > > > > Not sure I'd agree. Is there something unsafe about the code here? The hole > > > is plugged. Changing the entire implementation for a copy/paste job doesn't > > > seem like a good thing to me. > > > > The names are static and can't be changed. IMHO, the whole > > implementation is overkill. > > Now that I do agree with. It is certainly an area that needs improved upon. As there is a better solution on the table, and, as you point out in the original patch, this shouldn't happen, I'm dropping this patch and will wait for the better solution to come along. -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Attachment:
signature.asc
Description: This is a digitally signed message part