1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net
Gustavo A. R. Silva cc727b6418 usbnet: gl620a: Replace one-element array with flexible-array member
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

This issue was found with the help of Coccinelle and audited and fixed,
manually.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20220221173415.GA1149599@embeddedor
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-02-22 17:00:54 -08:00
..
appletalk net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
arcnet
bonding bonding: add new option ns_ip6_target 2022-02-21 12:13:45 +00:00
caif virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
can can: flexcan: mark RX via mailboxes as supported on MCF5441X 2022-01-24 18:27:43 +01:00
dsa net: dsa: microchip: ksz9477: reduce polling interval for statistics 2022-02-22 16:54:24 -08:00
ethernet net: dm9051: Fix use after free in dm9051_loop_tx() 2022-02-21 20:55:16 -08:00
fddi net:Remove initialization of static variables to 0 2021-12-27 14:53:00 +00:00
fjes drivers: net: Replace acpi_bus_get_device() 2022-02-02 08:05:06 -08:00
hamradio yam: fix a memory leak in yam_siocdevprivate() 2022-01-25 11:04:55 +00:00
hippi net: hippi: use dev_addr_set() 2021-10-22 10:16:09 -07:00
hyperv Netvsc: Call hv_unmap_memory() in the netvsc_device_remove() 2022-02-09 11:54:05 +00:00
ieee802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-17 11:44:20 -08:00
ipa net: ipa: determine replenish doorbell differently 2022-02-04 10:16:08 +00:00
ipvlan ipvlan: Remove redundant if statements 2021-12-02 13:07:38 +00:00
mctp mctp i2c: MCTP I2C binding driver 2022-02-19 16:18:49 +00:00
mdio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-10 17:29:56 -08:00
netdevsim ipv6: fix data-race in fib6_info_hw_flags_set / fib6_purge_rt 2022-02-17 09:48:24 -08:00
pcs net: stmmac/xpcs: convert to pcs_validate() 2022-01-26 11:20:37 +00:00
phy net: phy: phylink: fix DSA mac_select_pcs() introduction 2022-02-22 16:57:08 -08:00
plip net: plip: use eth_hw_addr_set() 2021-10-22 10:16:14 -07:00
ppp TTY/Serial driver updates for 5.17-rc1 2022-01-12 11:21:52 -08:00
slip Merge 5.16-rc4 into tty-next 2021-12-06 09:32:47 +01:00
team teaming: deliver link-local packets with the link they arrive on 2022-02-18 11:40:52 +00:00
usb usbnet: gl620a: Replace one-element array with flexible-array member 2022-02-22 17:00:54 -08:00
vmxnet3 vmxnet3: Remove useless DMA-32 fallback configuration 2022-01-09 16:52:19 -08:00
wan net: wan/lmc: fix spelling of "its" 2021-12-24 10:23:47 +00:00
wireguard lib/crypto: blake2s: move hmac construction into wireguard 2022-01-18 13:03:55 +01:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-17 11:44:20 -08:00
wwan net: wwan: iosm: drop debugfs dev reference 2022-02-14 14:09:59 +00:00
xen-netback xen/netback: don't queue unlimited number of packages 2021-12-16 08:43:12 +01:00
amt.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
bareudp.c bareudp: Add extack support to bareudp_configure() 2021-12-14 12:39:17 +00:00
dummy.c
eql.c net: eql: add net device refcount tracker 2021-12-07 20:44:58 -08:00
geneve.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
gtp.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
ifb.c net: ifb: support ethtools stats 2021-11-29 20:15:03 -08:00
Kconfig lib/crypto: blake2s: include as built-in 2022-01-07 00:25:25 +01:00
LICENSE.SRC
loopback.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
macsec.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
macvlan.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
macvtap.c
Makefile amt: add control plane of amt interface 2021-11-01 13:36:08 +00:00
mdio.c
mhi_net.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
mii.c
net_failover.c
netconsole.c netpoll: add net device refcount tracker to struct netpoll 2021-12-06 16:06:02 -08:00
nlmon.c
ntb_netdev.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
rionet.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
sb1000.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
Space.c
sungem_phy.c net: sungem_phy: fix code indentation 2021-11-09 11:45:54 +00:00
tap.c
thunderbolt.c net: thunderbolt: use eth_hw_addr_set() 2021-10-27 17:13:36 -07:00
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-31 14:35:40 +00:00
veth.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
virtio_net.c virtio_net: Fix code indent error 2022-02-15 14:27:17 +00:00
vrf.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
vsockmon.c
vxlan.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-31 14:35:40 +00:00