rslib: Cleanup and VLA removal
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest10 patches 4 repliesIn review
- v28 patches 11 repliesSuperseded
- v18 patches 6 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | rslib: Add GFP aware init functioninclude/ lib/ | +43 | 3 replies | |
| 2/10 | dm/verity_fec: Use GFP aware reed solomon initdrivers/ | +1 | 0 replies | |
| 3/10 | rslib: Cleanup whitespace damageinclude/ lib/ | +12 | 0 replies | |
| 4/10 | rslib: Cleanup top level commentsinclude/ lib/ lib/ +1 more | +6 | 0 replies | |
| 5/10 | rslib: Add SPDX identifiersinclude/ lib/ lib/ +1 more | +4 | 0 replies | |
| 6/10 | rslib: Remove GPL boilerplateinclude/ lib/ | +0 | 0 replies | |
| 7/10 | rslib: Simplify error pathlib/ | +6 | 0 replies | |
| 8/10 | rslib: Split rs control structdrivers/ drivers/ include/ +3 more | +100 | 0 replies | |
| 9/10 | mtd: rawnand: diskonchip: Allocate rs control per instancedrivers/ | +27 | 0 replies | |
| 10/10 | rslib: Allocate decoder buffers to avoid VLAsinclude/ lib/ lib/ | +44 | 0 replies |
Reviews trailers per patch
5 of 10 patches have a Reviewed-by or Acked-by.
| Patch | Kate Stewart | Greg Kroah-Hartman | Boris Brezillon | Kees Cook |
|---|---|---|---|---|
| 1/10 | ||||
| 2/10 | ||||
| 3/10 | ||||
| 4/10 | ||||
| 5/10 | R-b | R-b | ||
| 6/10 | R-b | R-b | ||
| 7/10 | ||||
| 8/10 | A-b | |||
| 9/10 | A-b | |||
| 10/10 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [patch V3 00/10] rslib: Cleanup and VLA removal
Kees tried to get rid of the Variable Length Arrays in the Reed-Solomon library by replacing them with fixed length arrays on stack. Though they are rather large and Andrew did not fall in love with that solution.
This series addresses that in a different way by splitting the rs control structure up, so that each invocation of rs_init() returns a new instance in which the decoder buffers are allocated. The polynom tables which build the base for the RS codecs are still shareable between the instances to avoid large allocations and initializations of the same data over and over.
The usage sites have been audited and fixed up where necessary to accomodate the decoder change which forbids parallel decoder invocation for a particular rs control instance to prevent buffer corruption.
While at it the patch set tidies up the code and converts the related files over to use SPDX license identifiers.
Changes since V2:
Provide a gfp aware variant of init_rs and use it in the alloc callback of the dm/verity_fec rs_pool mempool allocations
Picked up Reviewed/Acked-by tags and fixed the subject line for the MTD specific patch.
Changes since V1:
Simplify error path in the diskonchip code and use the proper function to free the decoder.
As this spawns multiple subsystems it should either go through Andrews tree or Kees can route it with his other hardening stuff.
Thanks,
tglx
8<---------------
drivers/md/dm-verity-fec.c | 2 drivers/mtd/nand/raw/cafe_nand.c | 7 - drivers/mtd/nand/raw/diskonchip.c | 67 +++++----- include/linux/rslib.h | 71 +++++++---- lib/reed_solomon/decode_rs.c | 34 ++--- lib/reed_solomon/encode_rs.c | 15 -- lib/reed_solomon/reed_solomon.c | 233 ++++++++++++++++++++++---------------- 7 files changed, 237 insertions(+), 192 deletions(-)