LKML Archive on
help / color / mirror / Atom feed
From: Kees Cook <>
To: Thomas Gleixner <>
Cc: LKML <>,
	Segher Boessenkool <>,
	Kernel Hardening <>,
	Andrew Morton <>,
	Boris Brezillon <>,
	Richard Weinberger <>,
	David Woodhouse <>,
	Alasdair Kergon <>,
	Mike Snitzer <>,
	Anton Vorontsov <>,
	Colin Cross <>, Tony Luck <>
Subject: Re: [patch V3 00/10] rslib: Cleanup and VLA removal
Date: Tue, 24 Apr 2018 09:42:22 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, Apr 22, 2018 at 9:23 AM, Thomas Gleixner <> wrote:
> 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.

Excellent, thanks!

> 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.

I'll create a VLA sub-tree to my KSPP stuff and start collecting this
and other VLA fixes that maintainers haven't taken yet. Once
build-testing finishes, I'll push it out for -next.


Kees Cook
Pixel Security

      parent reply	other threads:[~2018-04-24 16:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-22 16:23 Thomas Gleixner
2018-04-22 16:23 ` [patch V3 01/10] rslib: Add GFP aware init function Thomas Gleixner
2018-04-25  1:16   ` Stephen Rothwell
2018-04-25  2:45     ` Kees Cook
2018-04-25  8:59       ` Thomas Gleixner
2018-04-22 16:23 ` [patch V3 02/10] dm/verity_fec: Use GFP aware reed solomon init Thomas Gleixner
2018-04-22 16:23 ` [patch V3 03/10] rslib: Cleanup whitespace damage Thomas Gleixner
2018-04-22 16:23 ` [patch V3 04/10] rslib: Cleanup top level comments Thomas Gleixner
2018-04-22 16:23 ` [patch V3 05/10] rslib: Add SPDX identifiers Thomas Gleixner
2018-04-22 16:23 ` [patch V3 06/10] rslib: Remove GPL boilerplate Thomas Gleixner
2018-04-22 16:23 ` [patch V3 07/10] rslib: Simplify error path Thomas Gleixner
2018-04-22 16:23 ` [patch V3 08/10] rslib: Split rs control struct Thomas Gleixner
2018-04-22 16:23 ` [patch V3 09/10] mtd: rawnand: diskonchip: Allocate rs control per instance Thomas Gleixner
2018-04-22 16:23 ` [patch V3 10/10] rslib: Allocate decoder buffers to avoid VLAs Thomas Gleixner
2018-04-24 16:42 ` Kees Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [patch V3 00/10] rslib: Cleanup and VLA removal' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).