1. 20 5月, 2020 1 次提交
  2. 08 4月, 2020 3 次提交
    • Q
    • K
      lib/test_lockup: test module to generate lockups · 30428ef5
      Konstantin Khlebnikov 提交于
      CONFIG_TEST_LOCKUP=m adds module "test_lockup" that helps to make sure
      that watchdogs and lockup detectors are working properly.
      
      Depending on module parameters test_lockup could emulate soft or hard
      lockup, "hung task", hold arbitrary lock, allocate bunch of pages.
      
      Also it could generate series of lockups with cooling-down periods, in
      this way it could be used as "ping" for locks or page allocator.  Loop
      checks signals between iteration thus could be stopped by ^C.
      
      # modinfo test_lockup
      ...
      parm:           time_secs:lockup time in seconds, default 0 (uint)
      parm:           time_nsecs:nanoseconds part of lockup time, default 0 (uint)
      parm:           cooldown_secs:cooldown time between iterations in seconds, default 0 (uint)
      parm:           cooldown_nsecs:nanoseconds part of cooldown, default 0 (uint)
      parm:           iterations:lockup iterations, default 1 (uint)
      parm:           all_cpus:trigger lockup at all cpus at once (bool)
      parm:           state:wait in 'R' running (default), 'D' uninterruptible, 'K' killable, 'S' interruptible state (charp)
      parm:           use_hrtimer:use high-resolution timer for sleeping (bool)
      parm:           iowait:account sleep time as iowait (bool)
      parm:           lock_read:lock read-write locks for read (bool)
      parm:           lock_single:acquire locks only at one cpu (bool)
      parm:           reacquire_locks:release and reacquire locks/irq/preempt between iterations (bool)
      parm:           touch_softlockup:touch soft-lockup watchdog between iterations (bool)
      parm:           touch_hardlockup:touch hard-lockup watchdog between iterations (bool)
      parm:           call_cond_resched:call cond_resched() between iterations (bool)
      parm:           measure_lock_wait:measure lock wait time (bool)
      parm:           lock_wait_threshold:print lock wait time longer than this in nanoseconds, default off (ulong)
      parm:           disable_irq:disable interrupts: generate hard-lockups (bool)
      parm:           disable_softirq:disable bottom-half irq handlers (bool)
      parm:           disable_preempt:disable preemption: generate soft-lockups (bool)
      parm:           lock_rcu:grab rcu_read_lock: generate rcu stalls (bool)
      parm:           lock_mmap_sem:lock mm->mmap_sem: block procfs interfaces (bool)
      parm:           lock_rwsem_ptr:lock rw_semaphore at address (ulong)
      parm:           lock_mutex_ptr:lock mutex at address (ulong)
      parm:           lock_spinlock_ptr:lock spinlock at address (ulong)
      parm:           lock_rwlock_ptr:lock rwlock at address (ulong)
      parm:           alloc_pages_nr:allocate and free pages under locks (uint)
      parm:           alloc_pages_order:page order to allocate (uint)
      parm:           alloc_pages_gfp:allocate pages with this gfp_mask, default GFP_KERNEL (uint)
      parm:           alloc_pages_atomic:allocate pages with GFP_ATOMIC (bool)
      parm:           reallocate_pages:free and allocate pages between iterations (bool)
      
      Parameters for locking by address are unsafe and taints kernel. With
      CONFIG_DEBUG_SPINLOCK=y they at least check magics for embedded spinlocks.
      
      Examples:
      
      task hang in D-state:
      modprobe test_lockup time_secs=1 iterations=60 state=D
      
      task hang in io-wait D-state:
      modprobe test_lockup time_secs=1 iterations=60 state=D iowait
      
      softlockup:
      modprobe test_lockup time_secs=1 iterations=60 state=R
      
      hardlockup:
      modprobe test_lockup time_secs=1 iterations=60 state=R disable_irq
      
      system-wide hardlockup:
      modprobe test_lockup time_secs=1 iterations=60 state=R \
       disable_irq all_cpus
      
      rcu stall:
      modprobe test_lockup time_secs=1 iterations=60 state=R \
       lock_rcu touch_softlockup
      
      lock mmap_sem / block procfs interfaces:
      modprobe test_lockup time_secs=1 iterations=60 state=S lock_mmap_sem
      
      lock tasklist_lock for read / block forks:
      TASKLIST_LOCK=$(awk '$3 == "tasklist_lock" {print "0x"$1}' /proc/kallsyms)
      modprobe test_lockup time_secs=1 iterations=60 state=R \
       disable_irq lock_read lock_rwlock_ptr=$TASKLIST_LOCK
      
      lock namespace_sem / block vfs mount operations:
      NAMESPACE_SEM=$(awk '$3 == "namespace_sem" {print "0x"$1}' /proc/kallsyms)
      modprobe test_lockup time_secs=1 iterations=60 state=S \
       lock_rwsem_ptr=$NAMESPACE_SEM
      
      lock cgroup mutex / block cgroup operations:
      CGROUP_MUTEX=$(awk '$3 == "cgroup_mutex" {print "0x"$1}' /proc/kallsyms)
      modprobe test_lockup time_secs=1 iterations=60 state=S \
       lock_mutex_ptr=$CGROUP_MUTEX
      
      ping cgroup_mutex every second and measure maximum lock wait time:
      modprobe test_lockup cooldown_secs=1 iterations=60 state=S \
       lock_mutex_ptr=$CGROUP_MUTEX reacquire_locks measure_lock_wait
      
      [linux@roeck-us.net: rename disable_irq to fix build error]
        Link: http://lkml.kernel.org/r/20200317133614.23152-1-linux@roeck-us.netSigned-off-by: NKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Sasha Levin <sashal@kernel.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Link: http://lkml.kernel.org/r/158132859146.2797.525923171323227836.stgit@buzzSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      30428ef5
    • M
      compiler: remove CONFIG_OPTIMIZE_INLINING entirely · 889b3c12
      Masahiro Yamada 提交于
      Commit ac7c3e4f ("compiler: enable CONFIG_OPTIMIZE_INLINING
      forcibly") made this always-on option. We released v5.4 and v5.5
      including that commit.
      
      Remove the CONFIG option and clean up the code now.
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      Reviewed-by: NNathan Chancellor <natechancellor@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: David Miller <davem@davemloft.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20200220110807.32534-2-masahiroy@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      889b3c12
  3. 03 4月, 2020 1 次提交
  4. 21 3月, 2020 1 次提交
    • P
      lockdep: Introduce wait-type checks · de8f5e4f
      Peter Zijlstra 提交于
      Extend lockdep to validate lock wait-type context.
      
      The current wait-types are:
      
      	LD_WAIT_FREE,		/* wait free, rcu etc.. */
      	LD_WAIT_SPIN,		/* spin loops, raw_spinlock_t etc.. */
      	LD_WAIT_CONFIG,		/* CONFIG_PREEMPT_LOCK, spinlock_t etc.. */
      	LD_WAIT_SLEEP,		/* sleeping locks, mutex_t etc.. */
      
      Where lockdep validates that the current lock (the one being acquired)
      fits in the current wait-context (as generated by the held stack).
      
      This ensures that there is no attempt to acquire mutexes while holding
      spinlocks, to acquire spinlocks while holding raw_spinlocks and so on. In
      other words, its a more fancy might_sleep().
      
      Obviously RCU made the entire ordeal more complex than a simple single
      value test because RCU can be acquired in (pretty much) any context and
      while it presents a context to nested locks it is not the same as it
      got acquired in.
      
      Therefore its necessary to split the wait_type into two values, one
      representing the acquire (outer) and one representing the nested context
      (inner). For most 'normal' locks these two are the same.
      
      [ To make static initialization easier we have the rule that:
        .outer == INV means .outer == .inner; because INV == 0. ]
      
      It further means that its required to find the minimal .inner of the held
      stack to compare against the outer of the new lock; because while 'normal'
      RCU presents a CONFIG type to nested locks, if it is taken while already
      holding a SPIN type it obviously doesn't relax the rules.
      
      Below is an example output generated by the trivial test code:
      
        raw_spin_lock(&foo);
        spin_lock(&bar);
        spin_unlock(&bar);
        raw_spin_unlock(&foo);
      
       [ BUG: Invalid wait context ]
       -----------------------------
       swapper/0/1 is trying to lock:
       ffffc90000013f20 (&bar){....}-{3:3}, at: kernel_init+0xdb/0x187
       other info that might help us debug this:
       1 lock held by swapper/0/1:
        #0: ffffc90000013ee0 (&foo){+.+.}-{2:2}, at: kernel_init+0xd1/0x187
      
      The way to read it is to look at the new -{n,m} part in the lock
      description; -{3:3} for the attempted lock, and try and match that up to
      the held locks, which in this case is the one: -{2,2}.
      
      This tells that the acquiring lock requires a more relaxed environment than
      presented by the lock stack.
      
      Currently only the normal locks and RCU are converted, the rest of the
      lockdep users defaults to .inner = INV which is ignored. More conversions
      can be done when desired.
      
      The check for spinlock_t nesting is not enabled by default. It's a separate
      config option for now as there are known problems which are currently
      addressed. The config option allows to identify these problems and to
      verify that the solutions found are indeed solving them.
      
      The config switch will be removed and the checks will permanently enabled
      once the vast majority of issues has been addressed.
      
      [ bigeasy: Move LD_WAIT_FREE,… out of CONFIG_LOCKDEP to avoid compile
      	   failure with CONFIG_DEBUG_SPINLOCK + !CONFIG_LOCKDEP]
      [ tglx: Add the config option ]
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/20200321113242.427089655@linutronix.de
      de8f5e4f
  5. 12 3月, 2020 1 次提交
  6. 07 3月, 2020 1 次提交
    • D
      serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE · 68af4317
      Dmitry Safonov 提交于
      Many embedded boards have a disconnected TTL level serial which can
      generate some garbage that can lead to spurious false sysrq detects.
      
      Currently, sysrq can be either completely disabled for serial console
      or always disabled (with CONFIG_MAGIC_SYSRQ_SERIAL), since
      commit 732dbf3a ("serial: do not accept sysrq characters via serial port")
      
      At Arista, we have such boards that can generate BREAK and random
      garbage. While disabling sysrq for serial console would solve
      the problem with spurious false sysrq triggers, it's also desirable
      to have a way to enable sysrq back.
      
      As a measure of balance between on and off options, add
      MAGIC_SYSRQ_SERIAL_SEQUENCE which is a string sequence that can enable
      sysrq if it follows BREAK on a serial line. The longer the string - the
      less likely it may be in the garbage.
      
      Having the way to enable sysrq was beneficial to debug lockups with
      a manual investigation in field and on the other side preventing false
      sysrq detections.
      Based-on-patch-by: NVasiliy Khoruzhick <vasilykh@arista.com>
      Signed-off-by: NDmitry Safonov <dima@arista.com>
      Link: https://lore.kernel.org/r/20200302175135.269397-3-dima@arista.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      68af4317
  7. 06 3月, 2020 1 次提交
  8. 02 3月, 2020 1 次提交
  9. 13 2月, 2020 1 次提交
  10. 10 1月, 2020 1 次提交
    • A
      kunit: allow kunit tests to be loaded as a module · c475c77d
      Alan Maguire 提交于
      As tests are added to kunit, it will become less feasible to execute
      all built tests together.  By supporting modular tests we provide
      a simple way to do selective execution on a running system; specifying
      
      CONFIG_KUNIT=y
      CONFIG_KUNIT_EXAMPLE_TEST=m
      
      ...means we can simply "insmod example-test.ko" to run the tests.
      
      To achieve this we need to do the following:
      
      o export the required symbols in kunit
      o string-stream tests utilize non-exported symbols so for now we skip
        building them when CONFIG_KUNIT_TEST=m.
      o drivers/base/power/qos-test.c contains a few unexported interface
        references, namely freq_qos_read_value() and freq_constraints_init().
        Both of these could be potentially defined as static inline functions
        in include/linux/pm_qos.h, but for now we simply avoid supporting
        module build for that test suite.
      o support a new way of declaring test suites.  Because a module cannot
        do multiple late_initcall()s, we provide a kunit_test_suites() macro
        to declare multiple suites within the same module at once.
      o some test module names would have been too general ("test-test"
        and "example-test" for kunit tests, "inode-test" for ext4 tests);
        rename these as appropriate ("kunit-test", "kunit-example-test"
        and "ext4-inode-test" respectively).
      
      Also define kunit_test_suite() via kunit_test_suites()
      as callers in other trees may need the old definition.
      Co-developed-by: NKnut Omang <knut.omang@oracle.com>
      Signed-off-by: NKnut Omang <knut.omang@oracle.com>
      Signed-off-by: NAlan Maguire <alan.maguire@oracle.com>
      Reviewed-by: NBrendan Higgins <brendanhiggins@google.com>
      Acked-by: Theodore Ts'o <tytso@mit.edu> # for ext4 bits
      Acked-by: David Gow <davidgow@google.com> # For list-test
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      c475c77d
  11. 18 12月, 2019 1 次提交
  12. 08 12月, 2019 11 次提交
  13. 22 11月, 2019 1 次提交
  14. 14 11月, 2019 1 次提交
    • M
      kbuild: move headers_check rule to usr/include/Makefile · 7ecaf069
      Masahiro Yamada 提交于
      Currently, some sanity checks for uapi headers are done by
      scripts/headers_check.pl, which is wired up to the 'headers_check'
      target in the top Makefile.
      
      It is true compiling headers has better test coverage, but there
      are still several headers excluded from the compile test. I like
      to keep headers_check.pl for a while, but we can delete a lot of
      code by moving the build rule to usr/include/Makefile.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      7ecaf069
  15. 02 11月, 2019 1 次提交
    • D
      lib/list-test: add a test for the 'list' doubly linked list · ea2dd7c0
      David Gow 提交于
      Add a KUnit test for the kernel doubly linked list implementation in
      include/linux/list.h
      
      Each test case (list_test_x) is focused on testing the behaviour of the
      list function/macro 'x'. None of the tests pass invalid lists to these
      macros, and so should behave identically with DEBUG_LIST enabled and
      disabled.
      
      Note that, at present, it only tests the list_ types (not the
      singly-linked hlist_), and does not yet test all of the
      list_for_each_entry* macros (and some related things like
      list_prepare_entry).
      
      Ignoring checkpatch.pl spurious errors related to its handling of for_each
      and other list macros. checkpatch.pl expects anything with for_each in its
      name to be a loop and expects that the open brace is placed on the same
      line as for a for loop. In this case, test case naming scheme includes
      name of the macro it is testing, which results in the spurious errors.
      Commit message updated by Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: NDavid Gow <davidgow@google.com>
      Reviewed-by: NBrendan Higgins <brendanhiggins@google.com>
      Tested-by: NBrendan Higgins <brendanhiggins@google.com>
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      ea2dd7c0
  16. 17 10月, 2019 1 次提交
    • R
      printf: add support for printing symbolic error names · 57f5677e
      Rasmus Villemoes 提交于
      It has been suggested several times to extend vsnprintf() to be able
      to convert the numeric value of ENOSPC to print "ENOSPC". This
      implements that as a %p extension: With %pe, one can do
      
        if (IS_ERR(foo)) {
          pr_err("Sorry, can't do that: %pe\n", foo);
          return PTR_ERR(foo);
        }
      
      instead of what is seen in quite a few places in the kernel:
      
        if (IS_ERR(foo)) {
          pr_err("Sorry, can't do that: %ld\n", PTR_ERR(foo));
          return PTR_ERR(foo);
        }
      
      If the value passed to %pe is an ERR_PTR, but the library function
      errname() added here doesn't know about the value, the value is simply
      printed in decimal. If the value passed to %pe is not an ERR_PTR, we
      treat it as an ordinary %p and thus print the hashed value (passing
      non-ERR_PTR values to %pe indicates a bug in the caller, but we can't
      do much about that).
      
      With my embedded hat on, and because it's not very invasive to do,
      I've made it possible to remove this. The errname() function and
      associated lookup tables take up about 3K. For most, that's probably
      quite acceptable and a price worth paying for more readable
      dmesg (once this starts getting used), while for those that disable
      printk() it's of very little use - I don't see a
      procfs/sysfs/seq_printf() file reasonably making use of this - and
      they clearly want to squeeze vmlinux as much as possible. Hence the
      default y if PRINTK.
      
      The symbols to include have been found by massaging the output of
      
        find arch include -iname 'errno*.h' | xargs grep -E 'define\s*E'
      
      In the cases where some common aliasing exists
      (e.g. EAGAIN=EWOULDBLOCK on all platforms, EDEADLOCK=EDEADLK on most),
      I've moved the more popular one (in terms of 'git grep -w Efoo | wc)
      to the bottom so that one takes precedence.
      
      Link: http://lkml.kernel.org/r/20191015190706.15989-1-linux@rasmusvillemoes.dk
      To: "Jonathan Corbet" <corbet@lwn.net>
      To: linux-kernel@vger.kernel.org
      Cc: "Andy Shevchenko" <andy.shevchenko@gmail.com>
      Cc: "Andrew Morton" <akpm@linux-foundation.org>
      Cc: "Joe Perches" <joe@perches.com>
      Cc: linux-doc@vger.kernel.org
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Acked-by: NUwe Kleine-König <uwe@kleine-koenig.org>
      Reviewed-by: NPetr Mladek <pmladek@suse.com>
      [andy.shevchenko@gmail.com: use abs()]
      Acked-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      57f5677e
  17. 01 10月, 2019 2 次提交
  18. 26 9月, 2019 1 次提交
  19. 25 9月, 2019 3 次提交
  20. 12 9月, 2019 1 次提交
  21. 18 7月, 2019 1 次提交
    • M
      kbuild: create *.mod with full directory path and remove MODVERDIR · b7dca6dd
      Masahiro Yamada 提交于
      While descending directories, Kbuild produces objects for modules,
      but do not link final *.ko files; it is done in the modpost.
      
      To keep track of modules, Kbuild creates a *.mod file in $(MODVERDIR)
      for every module it is building. Some post-processing steps read the
      necessary information from *.mod files. This avoids descending into
      directories again. This mechanism was introduced in 2003 or so.
      
      Later, commit 551559e1 ("kbuild: implement modules.order") added
      modules.order. So, we can simply read it out to know all the modules
      with directory paths. This is easier than parsing the first line of
      *.mod files.
      
      $(MODVERDIR) has a flat directory structure, that is, *.mod files
      are named only with base names. This is based on the assumption that
      the module name is unique across the tree. This assumption is really
      fragile.
      
      Stephen Rothwell reported a race condition caused by a module name
      conflict:
      
        https://lkml.org/lkml/2019/5/13/991
      
      In parallel building, two different threads could write to the same
      $(MODVERDIR)/*.mod simultaneously.
      
      Non-unique module names are the source of all kind of troubles, hence
      commit 3a48a919 ("kbuild: check uniqueness of module names")
      introduced a new checker script.
      
      However, it is still fragile in the build system point of view because
      this race happens before scripts/modules-check.sh is invoked. If it
      happens again, the modpost will emit unclear error messages.
      
      To fix this issue completely, create *.mod with full directory path
      so that two threads never attempt to write to the same file.
      
      $(MODVERDIR) is no longer needed.
      
      Since modules with directory paths are listed in modules.order, Kbuild
      is still able to find *.mod files without additional descending.
      
      I also killed cmd_secanalysis; scripts/mod/sumversion.c computes MD4 hash
      for modules with MODULE_VERSION(). When CONFIG_DEBUG_SECTION_MISMATCH=y,
      it occurs not only in the modpost stage, but also during directory
      descending, where sumversion.c may parse stale *.mod files. It would emit
      'No such file or directory' warning when an object consisting a module is
      renamed, or when a single-obj module is turned into a multi-obj module or
      vice versa.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NNicolas Pitre <nico@fluxnic.net>
      b7dca6dd
  22. 17 7月, 2019 1 次提交
  23. 15 7月, 2019 1 次提交
    • M
      docs: locking: convert docs to ReST and rename to *.rst · 387b1468
      Mauro Carvalho Chehab 提交于
      Convert the locking documents to ReST and add them to the
      kernel development book where it belongs.
      
      Most of the stuff here is just to make Sphinx to properly
      parse the text file, as they're already in good shape,
      not requiring massive changes in order to be parsed.
      
      The conversion is actually:
        - add blank lines and identation in order to identify paragraphs;
        - fix tables markups;
        - add some lists markups;
        - mark literal blocks;
        - adjust title markups.
      
      At its new index.rst, let's add a :orphan: while this is not linked to
      the main index.rst file, in order to avoid build warnings.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Acked-by: NFederico Vaga <federico.vaga@vaga.pv.it>
      387b1468
  24. 02 7月, 2019 1 次提交
  25. 26 6月, 2019 1 次提交
    • F
      rslib: Add tests for the encoder and decoder · 4b4f3acc
      Ferdinand Blomqvist 提交于
      A Reed-Solomon code with minimum distance d can correct any error and
      erasure pattern that satisfies 2 * #error + #erasures < d. If the
      error correction capacity is exceeded, then correct decoding cannot be
      guaranteed. The decoder must, however, return a valid codeword or report
      failure.
      
      There are two main tests:
      
      - Check for correct behaviour up to the error correction capacity
      - Check for correct behaviour beyond error corrupted capacity
      
      Both tests are simple:
      
      1. Generate random data
      2. Encode data with the chosen code
      3. Add errors and erasures to data
      4. Decode the corrupted word
      5. Check for correct behaviour
      
      When testing up to capacity we test for:
      
      - Correct decoding
      - Correct return value (i.e. the number of corrected symbols)
      - That the returned error positions are correct
      
      There are two kinds of erasures; the erased symbol can be corrupted or
      not. When counting the number of corrected symbols, erasures without
      symbol corruption should not be counted. Similarly, the returned error
      positions should only include positions where a correction is necessary.
      
      We run the up to capacity tests for three different interfaces of
      decode_rs:
      
      - Use the correction buffers
      - Use the correction buffers with syndromes provided by the caller
      - Error correction in place (does not check the error positions)
      
      When testing beyond capacity test for silent failures. A silent failure is
      when the decoder returns success but the returned word is not a valid
      codeword.
      
      There are a couple of options for the tests:
      
      - Verbosity.
      
      - Whether to test for correct behaviour beyond capacity. Default is to
        test beyond capacity.
      
      - Whether to allow erasures without symbol corruption. Defaults to yes.
      
      Note that the tests take a couple of minutes to complete.
      Signed-off-by: NFerdinand Blomqvist <ferdinand.blomqvist@gmail.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/20190620141039.9874-2-ferdinand.blomqvist@gmail.com
      4b4f3acc