linux-stable/drivers/mtd/nand/raw
Thomas Gleixner 2163398192 rslib: Split rs control struct
The decoder library uses variable length arrays on stack. To get rid of
them it would be simple to allocate fixed length arrays on stack, but those
might become rather large. The other solution is to allocate the buffers in
the rs control structure, but this cannot be done as long as the structure
can be shared by several users. Sharing is desired because the RS polynom
tables are large and initialization is time consuming.

To solve this split the codec information out of the control structure and
have a pointer to a shared codec in it. Instantiate the control structure
for each user, create a new codec if no shareable is avaiable yet.  Adjust
all affected usage sites to the new scheme.

This allows to add per instance decoder buffers to the control structure
later on.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Andrew Morton <akpm@linuxfoundation.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alasdair Kergon <agk@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
2018-04-24 19:50:08 -07:00
..
atmel
bcm47xxnflash
brcmnand
gpmi-nand
ams-delta.c
au1550nd.c
cafe_nand.c
cmx270_nand.c
cs553x_nand.c
davinci_nand.c
denali.c
denali.h
denali_dt.c
denali_pci.c
diskonchip.c rslib: Split rs control struct 2018-04-24 19:50:08 -07:00
docg4.c
fsl_elbc_nand.c
fsl_ifc_nand.c
fsl_upm.c
fsmc_nand.c
gpio.c
hisi504_nand.c
jz4740_nand.c
jz4780_bch.c
jz4780_bch.h
jz4780_nand.c
Kconfig
lpc32xx_mlc.c
lpc32xx_slc.c
Makefile
marvell_nand.c
mpc5121_nfc.c
mtk_ecc.c
mtk_ecc.h
mtk_nand.c
mxc_nand.c
nand_amd.c
nand_base.c
nand_bbt.c
nand_bch.c
nand_ecc.c
nand_hynix.c
nand_ids.c
nand_macronix.c
nand_micron.c
nand_samsung.c
nand_timings.c
nand_toshiba.c
nandsim.c
ndfc.c
nuc900_nand.c
omap2.c
omap_elm.c
orion_nand.c
oxnas_nand.c
pasemi_nand.c
plat_nand.c
qcom_nandc.c
r852.c
r852.h
s3c2410.c
sh_flctl.c
sharpsl.c
sm_common.c
sm_common.h
socrates_nand.c
sunxi_nand.c
tango_nand.c
tmio_nand.c
txx9ndfmc.c
vf610_nfc.c
xway_nand.c