05 Jul, 2021

1 commit

  • Pull KCSAN updates from Paul McKenney.

    * 'kcsan.2021.05.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
    kcsan: Use URL link for pointing access-marking.txt
    kcsan: Document "value changed" line
    kcsan: Report observed value changes
    kcsan: Remove kcsan_report_type
    kcsan: Remove reporting indirection
    kcsan: Refactor access_info initialization
    kcsan: Fold panic() call into print_report()
    kcsan: Refactor passing watchpoint/other_info
    kcsan: Distinguish kcsan_report() calls
    kcsan: Simplify value change detection
    kcsan: Add pointer to access-marking.txt to data_race() bullet

    Linus Torvalds
     

03 Jul, 2021

1 commit

  • …/linux/kernel/git/shuah/linux-kselftest

    Pull KUnit update from Shuah Khan:
    "Fixes and features:

    - add support for skipped tests

    - introduce kunit_kmalloc_array/kunit_kcalloc() helpers

    - add gnu_printf specifiers

    - add kunit_shutdown

    - add unit test for filtering suites by names

    - convert lib/test_list_sort.c to use KUnit

    - code organization moving default config to tools/testing/kunit

    - refactor of internal parser input handling

    - cleanups and updates to documentation

    - code cleanup related to casts"

    * tag 'linux-kselftest-kunit-fixes-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (29 commits)
    kunit: add unit test for filtering suites by names
    kasan: test: make use of kunit_skip()
    kunit: test: Add example tests which are always skipped
    kunit: tool: Support skipped tests in kunit_tool
    kunit: Support skipped tests
    thunderbolt: test: Reinstate a few casts of bitfields
    kunit: tool: internal refactor of parser input handling
    lib/test: convert lib/test_list_sort.c to use KUnit
    kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers
    kunit: Remove the unused all_tests.config
    kunit: Move default config from arch/um -> tools/testing/kunit
    kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default
    kunit: Add gnu_printf specifiers
    lib/cmdline_kunit: Remove a cast which are no-longer required
    kernel/sysctl-test: Remove some casts which are no-longer required
    thunderbolt: test: Remove some casts which are no longer required
    mmc: sdhci-of-aspeed: Remove some unnecessary casts from KUnit tests
    iio: Remove a cast in iio-test-format which is no longer required
    device property: Remove some casts in property-entry-test
    Documentation: kunit: Clean up some string casts in examples
    ...

    Linus Torvalds
     

30 Jun, 2021

2 commits

  • Merge misc updates from Andrew Morton:
    "191 patches.

    Subsystems affected by this patch series: kthread, ia64, scripts,
    ntfs, squashfs, ocfs2, kernel/watchdog, and mm (gup, pagealloc, slab,
    slub, kmemleak, dax, debug, pagecache, gup, swap, memcg, pagemap,
    mprotect, bootmem, dma, tracing, vmalloc, kasan, initialization,
    pagealloc, and memory-failure)"

    * emailed patches from Andrew Morton : (191 commits)
    mm,hwpoison: make get_hwpoison_page() call get_any_page()
    mm,hwpoison: send SIGBUS with error virutal address
    mm/page_alloc: split pcp->high across all online CPUs for cpuless nodes
    mm/page_alloc: allow high-order pages to be stored on the per-cpu lists
    mm: replace CONFIG_FLAT_NODE_MEM_MAP with CONFIG_FLATMEM
    mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA
    docs: remove description of DISCONTIGMEM
    arch, mm: remove stale mentions of DISCONIGMEM
    mm: remove CONFIG_DISCONTIGMEM
    m68k: remove support for DISCONTIGMEM
    arc: remove support for DISCONTIGMEM
    arc: update comment about HIGHMEM implementation
    alpha: remove DISCONTIGMEM and NUMA
    mm/page_alloc: move free_the_page
    mm/page_alloc: fix counting of managed_pages
    mm/page_alloc: improve memmap_pages dbg msg
    mm: drop SECTION_SHIFT in code comments
    mm/page_alloc: introduce vm.percpu_pagelist_high_fraction
    mm/page_alloc: limit the number of pages on PCP lists when reclaim is active
    mm/page_alloc: scale the number of pages that are batch freed
    ...

    Linus Torvalds
     
  • The KUNIT_EXPECT_KASAN_FAIL() macro currently uses KUNIT_EXPECT_EQ() to
    compare fail_data.report_expected and fail_data.report_found. This always
    gave a somewhat useless error message on failure, but the addition of
    extra compile-time checking with READ_ONCE() has caused it to get much
    longer, and be truncated before anything useful is displayed.

    Instead, just check fail_data.report_found by hand (we've just set
    report_expected to 'true'), and print a better failure message with
    KUNIT_FAIL(). Because of this, report_expected is no longer used
    anywhere, and can be removed.

    Beforehand, a failure in:
    KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)area)[3100]);
    would have looked like:
    [22:00:34] [FAILED] vmalloc_oob
    [22:00:34] # vmalloc_oob: EXPECTATION FAILED at lib/test_kasan.c:991
    [22:00:34] Expected ({ do { extern void __compiletime_assert_705(void) __attribute__((__error__("Unsupported access size for {READ,WRITE}_ONCE()."))); if (!((sizeof(fail_data.report_expected) == sizeof(char) || sizeof(fail_data.repp
    [22:00:34] not ok 45 - vmalloc_oob

    With this change, it instead looks like:
    [22:04:04] [FAILED] vmalloc_oob
    [22:04:04] # vmalloc_oob: EXPECTATION FAILED at lib/test_kasan.c:993
    [22:04:04] KASAN failure expected in "((volatile char *)area)[3100]", but none occurred
    [22:04:04] not ok 45 - vmalloc_oob

    Also update the example failure in the documentation to reflect this.

    Link: https://lkml.kernel.org/r/20210606005531.165954-1-davidgow@google.com
    Signed-off-by: David Gow
    Reviewed-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Acked-by: Brendan Higgins
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Cc: Daniel Axtens
    Cc: David Gow
    Cc: Jonathan Corbet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gow
     

24 Jun, 2021

3 commits

  • The default .kunitconfig file is currently kept in
    arch/um/configs/kunit_defconfig, but -- with the impending QEMU patch
    -- will no-longer be exclusively used for UML-based kernels.

    Move it alongside the other KUnit configs in
    tools/testing/kunit/configs, and give it a name which matches the
    existing all_tests.config and broken_on_uml.config files.

    Also update the Getting Started documentation to point to the new file.

    Signed-off-by: David Gow
    Reviewed-by: Brendan Higgins
    Signed-off-by: Shuah Khan

    David Gow
     
  • As the type checking is no longer excessively strict, get rid of the
    unsightly (char*) casts -- and comment discussing them -- from the KUnit
    usage page.

    Signed-off-by: David Gow
    Reviewed-by: Daniel Latypov
    Acked-by: Brendan Higgins
    Signed-off-by: Shuah Khan

    David Gow
     
  • We'll be replacing :doc:`foo` references to
    Documentation/foo.rst. Yet, here it happens inside a table.
    Doing a search-and-replace would break it.

    Yet, as there's no good reason to use a table there,
    let's just convert it into a list.

    Reviewed-by: David Gow
    Acked-by: Brendan Higgins
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Shuah Khan

    Mauro Carvalho Chehab
     

18 Jun, 2021

3 commits

  • The :doc:`foo` tag is auto-generated via automarkup.py.
    So, use the filename at the sources, instead of :doc:`foo`.

    Reviewed-by: David Gow
    Acked-by: Brendan Higgins
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/6fde409079959a95b62b9b2692503608d7ff0dbd.1623824363.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • The :doc:`foo` tag is auto-generated via automarkup.py.
    So, use the filename at the sources, instead of :doc:`foo`.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/6bbecd4170ee08f36f8060b0719a46c64a21aefc.1623824363.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • We'll be replacing :doc:`foo` references to
    Documentation/foo.rst. Yet, here it happens inside a table.
    Doing a search-and-replace would break it.

    Yet, as there's no good reason to use a table there,
    let's just convert it into a list.

    Reviewed-by: David Gow
    Acked-by: Brendan Higgins
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/07d3a8ccafbb6345d6e78fb090290859e84361a1.1623824363.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

15 Jun, 2021

1 commit

  • Add and document more checkpatch message types. About 50% of all
    message types are documented now.

    In addition to this:

    - Create a new subsection 'Indentation and Line Breaks'.
    - Rename subsection 'Comment style' to simply 'Comments'.
    - Refactor some of the existing types to appropriate subsections.

    Reviewed-by: Lukas Bulwahn
    Tested-by: Lukas Bulwahn
    Signed-off-by: Dwaipayan Ray
    Link: https://lore.kernel.org/r/20210614141132.6881-1-dwaipayanray1@gmail.com
    Signed-off-by: Jonathan Corbet

    Dwaipayan Ray
     

12 Jun, 2021

1 commit


22 May, 2021

2 commits

  • The kunit_tool documentation page was pretty minimal, and a bit
    outdated. Update it and flesh it out a bit.

    In particular,
    - Mention that .kunitconfig is now in the build directory
    - Describe the use of --kunitconfig to specify a different config
    framgent
    - Mention the split functionality (i.e., commands other than 'run')
    - Describe --raw_output and kunit.py parse
    - Mention the globbing support
    - Provide a quick overview of other options, including --build_dir and
    --alltests

    Note that this does overlap a little with the new running_tips page. I
    don't think it's a problem having both: this page is supposed to be a
    bit more of a reference, rather than a list of useful tips, so the fact
    that they both describe the same features isn't a problem.

    Signed-off-by: David Gow
    Reviewed-by: Daniel Latypov
    Signed-off-by: Shuah Khan

    David Gow
     
  • This is long overdue.

    There are several things that aren't nailed down (in-tree
    .kunitconfig's), or partially broken (GCOV on UML), but having them
    documented, warts and all, is better than having nothing.

    This covers a bunch of the more recent features
    * kunit_filter_glob
    * kunit.py run --kunitconfig
    * slightly more detail on building tests as modules
    * CONFIG_KUNIT_DEBUGFS

    By my count, the only headline features now not mentioned are the KASAN
    integration and KernelCI json output support (kunit.py run --json).

    And then it also discusses how to get code coverage reports under UML
    and non-UML since this is a question people have repeatedly asked.

    Non-UML coverage collection is no different from normal, but we should
    probably explicitly call this out.

    As for UML, I was able to get it working again with two small hacks.*
    E.g. with CONFIG_KUNIT=y && CONFIG_KUNIT_ALL_TESTS=y
    Overall coverage rate:
    lines......: 15.1% (18294 of 120776 lines)
    functions..: 16.8% (1860 of 11050 functions)

    Note: this doesn't document --alltests since this is not stable yet.
    Hopefully being run more frequently as part of KernelCI will help...

    *Using gcc/gcov-6 and not using uml_abort() in os_dump_core().
    I've documented these hacks in "Notes" but left TODOs for
    brendanhiggins@google.com who tracked down the runtime issue in GCC.
    To be clear: these are not issues specific to KUnit, but rather to UML.

    Signed-off-by: Daniel Latypov
    Reviewed-by: David Gow
    Reviewed-by: Brendan Higgins
    Signed-off-by: Shuah Khan

    Daniel Latypov
     

21 May, 2021

2 commits

  • While include/linux/bitops.h brings in the BIT() macro, it was moved to
    include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic:
    Move some macros from to a new file").

    Since that commit BIT() has moved again into include/vdso/bits.h via
    commit 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO").

    I think the move to the vDSO header can be considered an implementation
    detail, so for now update the checkpatch documentation to recommend use
    of include/linux/bits.h.

    Signed-off-by: Andrew Jeffery
    Acked-by: Jiri Slaby
    Acked-by: Lukas Bulwahn
    Acked-by: Dwaipayan Ray
    Cc: Jiri Slaby
    Link: https://lore.kernel.org/r/20210520093949.511471-1-andrew@aj.id.au
    Signed-off-by: Jonathan Corbet

    Andrew Jeffery
     
  • - Document a couple of more checkpatch message types.
    - Add a blank line before all `See:` lines to improve the
    rst output.
    - Create a new subsection `Permissions` and move a few types
    to it.

    Signed-off-by: Dwaipayan Ray
    Acked-by: Lukas Bulwahn
    Link: https://lore.kernel.org/r/20210515132348.19082-1-dwaipayanray1@gmail.com
    Signed-off-by: Jonathan Corbet

    Dwaipayan Ray
     

19 May, 2021

3 commits


07 May, 2021

2 commits

  • arm64 uses SP_EL0 to save the current task_struct address. While running
    in EL0, SP_EL0 is clobbered by userspace. So if the upper bit is not 1
    (not TTBR1), the current address is invalid. This patch checks the upper
    bit of SP_EL0, if the upper bit is 1, lx_current() of arm64 will return
    the derefrence of current task. Otherwise, lx_current() will tell users
    they are running in userspace(EL0).

    While arm64 is running in EL0, it is actually pointless to print current
    task as the memory of kernel space is not accessible in EL0.

    Link: https://lkml.kernel.org/r/20210314203444.15188-3-song.bao.hua@hisilicon.com
    Signed-off-by: Barry Song
    Cc: Jan Kiszka
    Cc: Jonathan Corbet
    Cc: Kieran Bingham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Barry Song
     
  • Patch series "scripts/gdb: clarify the platforms supporting lx_current and add arm64 support", v2.

    lx_current depends on per_cpu current_task variable which exists on x86
    only. so it actually works on x86 only. the 1st patch documents this
    clearly; the 2nd patch adds support for arm64.

    This patch (of 2):

    x86 is the only architecture which has per_cpu current_task:

    arch$ git grep current_task | grep -i per_cpu
    x86/include/asm/current.h:DECLARE_PER_CPU(struct task_struct *, current_task);
    x86/kernel/cpu/common.c:DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned =
    x86/kernel/cpu/common.c:EXPORT_PER_CPU_SYMBOL(current_task);
    x86/kernel/cpu/common.c:DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
    x86/kernel/cpu/common.c:EXPORT_PER_CPU_SYMBOL(current_task);
    x86/kernel/smpboot.c: per_cpu(current_task, cpu) = idle;

    On other architectures, lx_current() will lead to a python exception:

    (gdb) p $lx_current().pid
    Python Exception No symbol "current_task" in current context.:
    Error occurred in Python: No symbol "current_task" in current context.

    To avoid more people struggling and wasting time in other architectures,
    document it.

    Link: https://lkml.kernel.org/r/20210314203444.15188-1-song.bao.hua@hisilicon.com
    Link: https://lkml.kernel.org/r/20210314203444.15188-2-song.bao.hua@hisilicon.com
    Signed-off-by: Barry Song
    Cc: Jan Kiszka
    Cc: Kieran Bingham
    Cc: Jonathan Corbet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Barry Song
     

01 May, 2021

11 commits

  • Update the "Tests" section in KASAN documentation:

    - Add an introductory sentence.

    - Add proper indentation for the list of ways to run KUnit tests.

    - Punctuation, readability, and other minor clean-ups.

    Link: https://lkml.kernel.org/r/fb08845e25c8847ffda271fa19cda2621c04a65b.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Ignoring accesses" section in KASAN documentation:

    - Mention __no_sanitize_address/noinstr.

    - Mention kasan_disable/enable_current().

    - Mention kasan_reset_tag()/page_kasan_tag_reset().

    - Readability and punctuation clean-ups.

    Link: https://lkml.kernel.org/r/4531ba5f3eca61f6aade863c136778cc8c807a64.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Shadow memory" section in KASAN documentation:

    - Rearrange the introduction paragraph do it doesn't give a
    "KASAN has an issue" impression.

    - Update the list of architectures with vmalloc support.

    - Punctuation, readability, and other minor clean-ups.

    Link: https://lkml.kernel.org/r/00f8c38b0fd5290a3f4dced04eaba41383e67e14.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Implementation details" section for HW_TAGS KASAN:

    - Punctuation, readability, and other minor clean-ups.

    Link: https://lkml.kernel.org/r/ee2caf4c138cc1fd239822c2abefd5af6c057744.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Implementation details" section for SW_TAGS KASAN:

    - Clarify the introduction sentence.

    - Punctuation, readability, and other minor clean-ups.

    Link: https://lkml.kernel.org/r/69b9b2e49d8cf789358fa24558be3fc0ce4ee32c.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Implementation details" section for generic KASAN:

    - Don't mention kmemcheck, it's not present in the kernel anymore.

    - Don't mention GCC as the only supported compiler.

    - Update kasan_mem_to_shadow() definition to match actual code.

    - Punctuation, readability, and other minor clean-ups.

    Link: https://lkml.kernel.org/r/f2f35fdab701f8c709f63d328f98aec2982c8acc.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Boot parameters" section in KASAN documentation:

    - Mention panic_on_warn.

    - Mention kasan_multi_shot and its interaction with panic_on_warn.

    - Clarify kasan.fault=panic interaction with panic_on_warn.

    - A readability clean-up.

    Link: https://lkml.kernel.org/r/01364952f15789948f0627d6733b5cdf5209f83a.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Error reports" section in KASAN documentation:

    - Mention that bug titles are best-effort.

    - Move and reword the part about auxiliary stacks from "Implementation
    details".

    - Punctuation, readability, and other minor clean-ups.

    Link: https://lkml.kernel.org/r/3531e8fe6972cf39d1954e3643237b19eb21227e.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Usage" section in KASAN documentation:

    - Add inline code snippet markers.

    - Reword the part about stack traces for clarity.

    - Other minor clean-ups.

    Link: https://lkml.kernel.org/r/48427809cd4b8b5d6bc00926cbe87e2b5081df17.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update the "Overview" section in KASAN documentation:

    - Outline main use cases for each mode.

    - Mention that HW_TAGS mode need compiler support too.

    - Move the part about SLUB/SLAB support from "Usage" to "Overview".

    - Punctuation, readability, and other minor clean-ups.

    Link: https://lkml.kernel.org/r/1486fba8514de3d7db2f47df2192db59228b0a7b.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • Update KASAN documentation:

    - Give some sections clearer names.

    - Remove unneeded subsections in the "Tests" section.

    - Move the "For developers" section and split into subsections.

    Link: https://lkml.kernel.org/r/c2bbb56eaea80ad484f0ee85bb71959a3a63f1d7.1615559068.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Reviewed-by: Marco Elver
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     

29 Apr, 2021

1 commit

  • Pull locking updates from Ingo Molnar:

    - rtmutex cleanup & spring cleaning pass that removes ~400 lines of
    code

    - Futex simplifications & cleanups

    - Add debugging to the CSD code, to help track down a tenacious race
    (or hw problem)

    - Add lockdep_assert_not_held(), to allow code to require a lock to not
    be held, and propagate this into the ath10k driver

    - Misc LKMM documentation updates

    - Misc KCSAN updates: cleanups & documentation updates

    - Misc fixes and cleanups

    - Fix locktorture bugs with ww_mutexes

    * tag 'locking-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits)
    kcsan: Fix printk format string
    static_call: Relax static_call_update() function argument type
    static_call: Fix unused variable warn w/o MODULE
    locking/rtmutex: Clean up signal handling in __rt_mutex_slowlock()
    locking/rtmutex: Restrict the trylock WARN_ON() to debug
    locking/rtmutex: Fix misleading comment in rt_mutex_postunlock()
    locking/rtmutex: Consolidate the fast/slowpath invocation
    locking/rtmutex: Make text section and inlining consistent
    locking/rtmutex: Move debug functions as inlines into common header
    locking/rtmutex: Decrapify __rt_mutex_init()
    locking/rtmutex: Remove pointless CONFIG_RT_MUTEXES=n stubs
    locking/rtmutex: Inline chainwalk depth check
    locking/rtmutex: Move rt_mutex_debug_task_free() to rtmutex.c
    locking/rtmutex: Remove empty and unused debug stubs
    locking/rtmutex: Consolidate rt_mutex_init()
    locking/rtmutex: Remove output from deadlock detector
    locking/rtmutex: Remove rtmutex deadlock tester leftovers
    locking/rtmutex: Remove rt_mutex_timed_lock()
    MAINTAINERS: Add myself as futex reviewer
    locking/mutex: Remove repeated declaration
    ...

    Linus Torvalds
     

28 Apr, 2021

2 commits

  • …/kernel/git/shuah/linux-kselftest

    Pull KUnit updates from Shuah Khan:
    "Several fixes and a new feature to support failure from dynamic
    analysis tools such as UBSAN and fake ops for testing.

    - a fake ops struct for testing a "free" function to complain if it
    was called with an invalid argument, or caught a double-free. Most
    return void and have no normal means of signalling failure (e.g.
    super_operations, iommu_ops, etc.)"

    * tag 'linux-kselftest-kunit-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
    Documentation: kunit: add tips for using current->kunit_test
    kunit: fix -Wunused-function warning for __kunit_fail_current_test
    kunit: support failure from dynamic analysis tools
    kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment
    kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals
    kunit: Match parenthesis alignment to improve code readability

    Linus Torvalds
     
  • …kernel/git/shuah/linux-kselftest

    Pull Kselftest updates from Shuah Khan:

    - fixes and updates to resctrl test from Fenghua Yu and Reinette Chatre

    - fixes to Kselftest documentation, framework

    - minor spelling correction in timers test

    * tag 'linux-kselftest-next-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (25 commits)
    selftests/resctrl: Change a few printed messages
    Documentation: kselftest: fix path to test module files
    selftests/resctrl: Create .gitignore to include resctrl_tests
    selftests/resctrl: Fix checking for < 0 for unsigned values
    selftests/resctrl: Fix incorrect parsing of iMC counters
    selftests/resctrl: Fix unmount resctrl FS
    selftests/resctrl: Skip the test if requested resctrl feature is not supported
    selftests/resctrl: Modularize resctrl test suite main() function
    selftests/resctrl: Don't hard code value of "no_of_bits" variable
    selftests/resctrl: Fix MBA/MBM results reporting format
    selftests/resctrl: Use resctrl/info for feature detection
    selftests/resctrl: Check for resctrl mount point only if resctrl FS is supported
    selftests/resctrl: Add config dependencies
    selftests/resctrl: Fix a printed message
    selftests/resctrl: Share show_cache_info() by CAT and CMT tests
    selftests/resctrl: Call kselftest APIs to log test results
    selftests/resctrl: Rename CQM test as CMT test
    selftests/resctrl: Fix missing options "-n" and "-p"
    selftests/resctrl: Ensure sibling CPU is not same as original CPU
    selftests/resctrl: Clean up resctrl features check
    ...

    Linus Torvalds
     

27 Apr, 2021

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle in docsland, though more than
    usually well contained to Documentation/ itself. Highlights include:

    - The Chinese translators have been busy and show no signs of
    stopping anytime soon. Italian has also caught up.

    - Aditya Srivastava has been working on improvements to the
    kernel-doc script.

    - Thorsten continues his work on reporting-issues.rst and related
    documentation around regression reporting.

    - Lots of documentation updates, typo fixes, etc. as usual"

    * tag 'docs-5.13' of git://git.lwn.net/linux: (139 commits)
    docs/zh_CN: add openrisc translation to zh_CN index
    docs/zh_CN: add openrisc index.rst translation
    docs/zh_CN: add openrisc todo.rst translation
    docs/zh_CN: add openrisc openrisc_port.rst translation
    docs/zh_CN: add core api translation to zh_CN index
    docs/zh_CN: add core-api index.rst translation
    docs/zh_CN: add core-api irq index.rst translation
    docs/zh_CN: add core-api irq irqflags-tracing.rst translation
    docs/zh_CN: add core-api irq irq-domain.rst translation
    docs/zh_CN: add core-api irq irq-affinity.rst translation
    docs/zh_CN: add core-api irq concepts.rst translation
    docs: sphinx-pre-install: don't barf on beta Sphinx releases
    scripts: kernel-doc: improve parsing for kernel-doc comments syntax
    docs/zh_CN: two minor fixes in zh_CN/doc-guide/
    Documentation: dev-tools: Add Testing Overview
    docs/zh_CN: add translations in zh_CN/dev-tools/gcov
    docs: reporting-issues: make people CC the regressions list
    MAINTAINERS: add regressions mailing list
    doc:it_IT: align Italian documentation
    docs/zh_CN: sync reporting-issues.rst
    ...

    Linus Torvalds
     

16 Apr, 2021

1 commit

  • The kernel now has a number of testing and debugging tools, and we've
    seen a bit of confusion about what the differences between them are.

    Add a basic documentation outlining the testing tools, when to use each,
    and how they interact.

    This is a pretty quick overview rather than the idealised "kernel
    testing guide" that'd probably be optimal, but given the number of times
    questions like "When do you use KUnit and when do you use Kselftest?"
    are being asked, it seemed worth at least having something. Hopefully
    this can form the basis for more detailed documentation later.

    Signed-off-by: David Gow
    Reviewed-by: Marco Elver
    Reviewed-by: Daniel Latypov
    Link: https://lore.kernel.org/r/20210415054036.581117-1-davidgow@google.com
    Signed-off-by: Jonathan Corbet

    David Gow
     

11 Apr, 2021

1 commit

  • Architectures supported by KASAN_HW_TAGS can provide a sync or async mode
    of execution. On an MTE enabled arm64 hw for example this can be identified
    with the synchronous or asynchronous tagging mode of execution.
    In synchronous mode, an exception is triggered if a tag check fault occurs.
    In asynchronous mode, if a tag check fault occurs, the TFSR_EL1 register is
    updated asynchronously. The kernel checks the corresponding bits
    periodically.

    KASAN requires a specific kernel command line parameter to make use of this
    hw features.

    Add KASAN HW execution mode kernel command line parameter.

    Note: This patch adds the kasan.mode kernel parameter and the
    sync/async kernel command line options to enable the described features.

    [ Add a new var instead of exposing kasan_arg_mode to be consistent with
    flags for other command line arguments. ]

    Cc: Dmitry Vyukov
    Cc: Andrey Ryabinin
    Cc: Alexander Potapenko
    Cc: Andrey Konovalov
    Reviewed-by: Andrey Konovalov
    Acked-by: Catalin Marinas
    Acked-by: Andrey Konovalov
    Tested-by: Andrey Konovalov
    Signed-off-by: Vincenzo Frascino
    Signed-off-by: Andrey Konovalov
    Link: https://lore.kernel.org/r/20210315132019.33202-3-vincenzo.frascino@arm.com
    Signed-off-by: Catalin Marinas

    Vincenzo Frascino
     

09 Apr, 2021

1 commit


08 Apr, 2021

1 commit

  • As of commit 359a376081d4 ("kunit: support failure from dynamic analysis
    tools"), we can use current->kunit_test to find the current kunit test.

    Mention this in tips.rst and give an example of how this can be used in
    conjunction with `test->priv` to pass around state and specifically
    implement something like mocking.
    There's a lot more we could go into on that topic, but given that
    example is already longer than every other "tip" on this page, we just
    point to the API docs and leave filling in the blanks as an exercise to
    the reader.

    Also give an example of kunit_fail_current_test().

    Signed-off-by: Daniel Latypov
    Reviewed-by: Brendan Higgins
    Signed-off-by: Shuah Khan

    Daniel Latypov