linux_dsm_epyc7002/drivers/net/ethernet
Marc Zyngier f0212a5ebf net: stmmac: dwmac-meson8b: Add missing boundary to RGMII TX clock array
Running with KASAN on a VIM3L systems leads to the following splat
when probing the Ethernet device:

==================================================================
BUG: KASAN: global-out-of-bounds in _get_maxdiv+0x74/0xd8
Read of size 4 at addr ffffa000090615f4 by task systemd-udevd/139
CPU: 1 PID: 139 Comm: systemd-udevd Tainted: G            E     5.7.0-rc1-00101-g8624b7577b9c #781
Hardware name: amlogic w400/w400, BIOS 2020.01-rc5 03/12/2020
Call trace:
 dump_backtrace+0x0/0x2a0
 show_stack+0x20/0x30
 dump_stack+0xec/0x148
 print_address_description.isra.12+0x70/0x35c
 __kasan_report+0xfc/0x1d4
 kasan_report+0x4c/0x68
 __asan_load4+0x9c/0xd8
 _get_maxdiv+0x74/0xd8
 clk_divider_bestdiv+0x74/0x5e0
 clk_divider_round_rate+0x80/0x1a8
 clk_core_determine_round_nolock.part.9+0x9c/0xd0
 clk_core_round_rate_nolock+0xf0/0x108
 clk_hw_round_rate+0xac/0xf0
 clk_factor_round_rate+0xb8/0xd0
 clk_core_determine_round_nolock.part.9+0x9c/0xd0
 clk_core_round_rate_nolock+0xf0/0x108
 clk_core_round_rate_nolock+0xbc/0x108
 clk_core_set_rate_nolock+0xc4/0x2e8
 clk_set_rate+0x58/0xe0
 meson8b_dwmac_probe+0x588/0x72c [dwmac_meson8b]
 platform_drv_probe+0x78/0xd8
 really_probe+0x158/0x610
 driver_probe_device+0x140/0x1b0
 device_driver_attach+0xa4/0xb0
 __driver_attach+0xcc/0x1c8
 bus_for_each_dev+0xf4/0x168
 driver_attach+0x3c/0x50
 bus_add_driver+0x238/0x2e8
 driver_register+0xc8/0x1e8
 __platform_driver_register+0x88/0x98
 meson8b_dwmac_driver_init+0x28/0x1000 [dwmac_meson8b]
 do_one_initcall+0xa8/0x328
 do_init_module+0xe8/0x368
 load_module+0x3300/0x36b0
 __do_sys_finit_module+0x120/0x1a8
 __arm64_sys_finit_module+0x4c/0x60
 el0_svc_common.constprop.2+0xe4/0x268
 do_el0_svc+0x98/0xa8
 el0_svc+0x24/0x68
 el0_sync_handler+0x12c/0x318
 el0_sync+0x158/0x180

The buggy address belongs to the variable:
 div_table.63646+0x34/0xfffffffffffffa40 [dwmac_meson8b]

Memory state around the buggy address:
 ffffa00009061480: fa fa fa fa 00 00 00 01 fa fa fa fa 00 00 00 00
 ffffa00009061500: 05 fa fa fa fa fa fa fa 00 04 fa fa fa fa fa fa
>ffffa00009061580: 00 03 fa fa fa fa fa fa 00 00 00 00 00 00 fa fa
                                                             ^
 ffffa00009061600: fa fa fa fa 00 01 fa fa fa fa fa fa 01 fa fa fa
 ffffa00009061680: fa fa fa fa 00 01 fa fa fa fa fa fa 04 fa fa fa
==================================================================

Digging into this indeed shows that the clock divider array is
lacking a final fence, and that the clock subsystems goes in the
weeds. Oh well.

Let's add the empty structure that indicates the end of the array.

Fixes: bd6f48546b ("net: stmmac: dwmac-meson8b: Fix the RGMII TX delay on Meson8b/8m2 SoCs")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-20 11:10:06 -07:00
..
3com net: typhoon: Add required whitespace after keywords 2020-03-23 22:10:28 -07:00
8390
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon net: ena: Make some functions static 2020-03-30 10:53:40 -07:00
amd amd-xgbe: Use __napi_schedule() in BH context 2020-04-16 13:59:53 -07:00
apm
apple
aquantia net: atlantic: fix missing | operator when assigning rec->llc 2020-04-02 06:50:59 -07:00
arc
atheros atl2: remove unused variable 'atl2_driver_string' 2020-03-26 11:22:20 -07:00
aurora
broadcom net: systemport: Omit superfluous error message in bcm_sysport_probe() 2020-04-20 11:05:24 -07:00
brocade net: bna: reject unsupported coalescing params 2020-03-10 16:28:53 -07:00
cadence net: macb: Fix handling of fixed-link node 2020-03-31 10:06:27 -07:00
calxeda
cavium net: cavium: Fix build errors due to 'imply CAVIUM_PTP' 2020-04-02 07:01:31 -07:00
chelsio net/cxgb4: Check the return from t4_query_params properly 2020-04-14 16:44:54 -07:00
cirrus
cisco
cortina net: gemini: reject unsupported coalescing params 2020-03-10 16:28:53 -07:00
davicom
dec net: tulip: make early_486_chipsets static 2020-04-15 16:22:14 -07:00
dlink
emulex net: be2net: reject unsupported coalescing params 2020-03-12 11:32:35 -07:00
ezchip
faraday net/faraday: fix grammar in function ftgmac100_setup_clk() in ftgmac100.c 2020-04-01 11:23:45 -07:00
freescale net: fec: set GPR bit on suspend by DT configuration. 2020-04-07 18:23:37 -07:00
fujitsu
google
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-30 20:48:43 -07:00
huawei hinic: fix wrong value of MIN_SKB_LEN 2020-03-21 19:44:16 -07:00
i825xx
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-12 22:34:48 -07:00
intel pci-v5.7-changes 2020-04-03 14:25:02 -07:00
marvell net: mvneta: Fix a typo 2020-04-12 21:20:27 -07:00
mediatek net: ethernet: mediatek: move mt7623 settings out off the mt7530 2020-04-07 18:28:28 -07:00
mellanox net/mlx4_en: avoid indirect call in TX completion 2020-04-18 15:30:22 -07:00
micrel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2020-03-29 21:25:29 -07:00
microchip
moxa
mscc net: mscc: ocelot: fix untagged packet drops when enslaving to vlan aware bridge 2020-04-15 12:27:35 -07:00
myricom net: myri10ge: reject unsupported coalescing params 2020-03-14 21:13:54 -07:00
natsemi
neterion net: neterion: remove redundant assignment to variable tmp64 2020-04-12 11:44:02 -07:00
netronome net: sched: expose HW stats types per action used by drivers 2020-03-30 11:06:49 -07:00
ni net: nixge: let core reject the unsupported coalescing parameters 2020-03-14 21:13:54 -07:00
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: fix unused assignment 2020-04-14 16:30:14 -07:00
qlogic qed: remove redundant assignment to variable 'rc' 2020-04-06 10:22:09 -07:00
qualcomm net: qualcomm: rmnet: Allow configuration updates to existing devices 2020-04-02 06:50:04 -07:00
rdc
realtek r8169: change back SG and TSO to be disabled by default 2020-04-06 10:09:58 -07:00
renesas
rocker
samsung net: sxgbe: reject unsupported coalescing params 2020-03-14 21:13:55 -07:00
seeq
sfc sfc: falcon: convert to use i2c_new_client_device() 2020-03-26 19:31:21 -07:00
sgi
silan
sis
smsc
socionext net: socionext: reject unsupported coalescing params 2020-03-17 20:56:57 -07:00
stmicro net: stmmac: dwmac-meson8b: Add missing boundary to RGMII TX clock array 2020-04-20 11:10:06 -07:00
sun
synopsys net: dwc-xlgmac: let core reject the unsupported coalescing parameters 2020-03-17 20:56:57 -07:00
tehuti net: tehuti: reject unsupported coalescing params 2020-03-17 20:56:57 -07:00
ti net: ethernet: ti: Add missing '\n' in log messages 2020-04-12 11:44:39 -07:00
toshiba
tundra
via net: via: reject unsupported coalescing params 2020-03-14 21:13:55 -07:00
wiznet
xilinx net: axienet: Allow DMA to beyond 4GB 2020-03-24 16:33:05 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: reject unsupported coalescing params 2020-03-14 21:13:54 -07:00
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile