25 Apr, 2018

7 commits

  • To get rid of the variable length arrays on stack in the RS decoder it's
    necessary to allocate the decoder buffers per control structure instance.

    All usage sites have been checked for potential parallel decoder usage and
    fixed where necessary. Kees confirmed that the pstore decoding is strictly
    single threaded so there should be no surprises.

    Allocate them in the rs control structure sized depending on the number of
    roots for the chosen codec and adapt the decoder code to make use of them.

    Document the fact that decode operations based on a particular rs control
    instance cannot run in parallel and the caller has to ensure that as it's
    not possible to provide a proper locking construct which fits all use
    cases.

    Signed-off-by: Thomas Gleixner
    Acked-by: Kees Cook
    Cc: Boris Brezillon
    Cc: Tony Luck
    Cc: Segher Boessenkool
    Cc: Kernel Hardening
    Cc: Richard Weinberger
    Cc: Mike Snitzer
    Cc: Anton Vorontsov
    Cc: Colin Cross
    Cc: Andrew Morton
    Cc: David Woodhouse
    Cc: Alasdair Kergon
    Signed-off-by: Kees Cook

    Thomas Gleixner
     
  • 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
    Acked-by: Boris Brezillon
    Cc: Tony Luck
    Cc: Kees Cook
    Cc: Segher Boessenkool
    Cc: Kernel Hardening
    Cc: Richard Weinberger
    Cc: Mike Snitzer
    Cc: Anton Vorontsov
    Cc: Colin Cross
    Cc: Andrew Morton
    Cc: David Woodhouse
    Cc: Alasdair Kergon
    Signed-off-by: Kees Cook

    Thomas Gleixner
     
  • Now that SPDX identifiers are in place, remove the GPL boiler plate
    text. Leave the notices which document that Phil Karn granted permission in
    place (encode/decode source code). The modified files are code written for
    the kernel by me.

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Kate Stewart
    Reviewed-by: Greg Kroah-Hartman
    Cc: Boris Brezillon
    Cc: Tony Luck
    Cc: Kees Cook
    Cc: Segher Boessenkool
    Cc: Kernel Hardening
    Cc: Richard Weinberger
    Cc: Mike Snitzer
    Cc: Anton Vorontsov
    Cc: Colin Cross
    Cc: Andrew Morton
    Cc: David Woodhouse
    Cc: Alasdair Kergon
    Signed-off-by: Kees Cook

    Thomas Gleixner
     
  • The Reed-Solomon library is based on code from Phil Karn who granted
    permission to import it into the kernel under the GPL V2.

    See commit 15b5423757a7 ("Shared Reed-Solomon ECC library") in the history
    git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git

    ...
    The encoder/decoder code is lifted from the GPL'd userspace RS-library
    written by Phil Karn. I modified/wrapped it to provide the different
    functions which we need in the MTD/NAND code.
    ...
    Signed-Off-By: Thomas Gleixner
    Signed-Off-By: David Woodhouse
    "No objections at all. Just keep the authorship notices." -- Phil Karn

    Add the proper SPDX identifiers according to
    Documentation/process/license-rules.rst.

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Kate Stewart
    Reviewed-by: Greg Kroah-Hartman
    Cc: Boris Brezillon
    Cc: Tony Luck
    Cc: Kees Cook
    Cc: Segher Boessenkool
    Cc: Kernel Hardening
    Cc: Richard Weinberger
    Cc: Mike Snitzer
    Cc: Anton Vorontsov
    Cc: Colin Cross
    Cc: Andrew Morton
    Cc: David Woodhouse
    Cc: Alasdair Kergon
    Signed-off-by: Kees Cook

    Thomas Gleixner
     
  • File references and stale CVS ids are really not useful.

    Signed-off-by: Thomas Gleixner
    Cc: Boris Brezillon
    Cc: Tony Luck
    Cc: Kees Cook
    Cc: Segher Boessenkool
    Cc: Kernel Hardening
    Cc: Richard Weinberger
    Cc: Mike Snitzer
    Cc: Anton Vorontsov
    Cc: Colin Cross
    Cc: Andrew Morton
    Cc: David Woodhouse
    Cc: Alasdair Kergon
    Signed-off-by: Kees Cook

    Thomas Gleixner
     
  • Instead of mixing the whitespace cleanup into functional changes, mop it up
    first.

    Signed-off-by: Thomas Gleixner
    Cc: Boris Brezillon
    Cc: Tony Luck
    Cc: Kees Cook
    Cc: Segher Boessenkool
    Cc: Kernel Hardening
    Cc: Richard Weinberger
    Cc: Mike Snitzer
    Cc: Anton Vorontsov
    Cc: Colin Cross
    Cc: Andrew Morton
    Cc: David Woodhouse
    Cc: Alasdair Kergon
    Signed-off-by: Kees Cook

    Thomas Gleixner
     
  • The rslib usage in dm/verity_fec is broken because init_rs() can nest in
    GFP_NOIO mempool allocations as init_rs() is invoked from the mempool alloc
    callback.

    Provide a variant which takes gfp_t flags as argument.

    Signed-off-by: Thomas Gleixner
    Cc: Mike Snitzer
    Cc: Alasdair Kergon
    Cc: Neil Brown
    Signed-off-by: Kees Cook

    Thomas Gleixner
     

02 May, 2007

1 commit


07 Nov, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds