linux/drivers/net/ethernet/ibm/emac
Kees Cook ee4fccbee7 net/ibm/emac: Remove VLA usage
In the quest to remove all stack VLA usage from the kernel[1], this
removes the VLA used for the emac xaht registers size. Since the size
of registers can only ever be 4 or 8, as detected in emac_init_config(),
the max can be hardcoded and a runtime test added for robustness.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christian Lamparter <chunkeey@gmail.com>
Cc: Ivan Mikhaylov <ivan@de.ibm.com>
Cc: netdev@vger.kernel.org
Co-developed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-13 16:53:24 -07:00
..
core.c net/ibm/emac: Remove VLA usage 2018-09-13 16:53:24 -07:00
core.h net/ibm/emac: Remove VLA usage 2018-09-13 16:53:24 -07:00
debug.h net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
emac.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-24 23:44:15 -05:00
Kconfig net: emac: add support for device-tree based PHY discovery and setup 2017-02-22 15:36:47 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mal.c net: emac: Fix napi poll list corruption 2017-09-19 16:20:25 -07:00
mal.h net: ethernet: Use DIV_ROUND_UP instead of reimplementing its function 2018-09-12 20:34:47 -07:00
phy.c net: ibm: emac: replace custom PHY_MODE_* macros 2017-12-21 13:09:41 -05:00
phy.h
rgmii.c net: ibm: emac: support RGMII-[RX|TX]ID phymode 2017-12-21 13:09:41 -05:00
rgmii.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00
tah.c net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
tah.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00
zmii.c net: ibm: emac: replace custom PHY_MODE_* macros 2017-12-21 13:09:41 -05:00
zmii.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00