Re: [PATCH] net: cxgb4: avoid memcpy beyond end of source buffer

2018-02-02 Thread David Miller
From: Arnd Bergmann Date: Fri, 2 Feb 2018 16:18:37 +0100 > Building with link-time-optimizations revealed that the cxgb4 driver does > a fixed-size memcpy() from a variable-length constant string into the > network interface name: > > In function 'memcpy', > inlined from 'cfg_queues_uld.con

RE: [PATCH] net: cxgb4: avoid memcpy beyond end of source buffer

2018-02-02 Thread David Laight
From: Arnd Bergmann > Sent: 02 February 2018 15:19 > > Building with link-time-optimizations revealed that the cxgb4 driver does > a fixed-size memcpy() from a variable-length constant string into the > network interface name: ... > I can see two equally workable solutions: either we use a strncpy

[PATCH] net: cxgb4: avoid memcpy beyond end of source buffer

2018-02-02 Thread Arnd Bergmann
Building with link-time-optimizations revealed that the cxgb4 driver does a fixed-size memcpy() from a variable-length constant string into the network interface name: In function 'memcpy', inlined from 'cfg_queues_uld.constprop' at drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:335:2, in