1. 27 2月, 2022 1 次提交
  2. 30 1月, 2022 1 次提交
  3. 15 1月, 2022 2 次提交
  4. 21 11月, 2021 1 次提交
  5. 07 11月, 2021 2 次提交
  6. 07 10月, 2021 1 次提交
  7. 04 9月, 2021 6 次提交
  8. 03 8月, 2021 1 次提交
    • M
      arm64: kasan: mte: remove redundant mte_report_once logic · 76721503
      Mark Rutland 提交于
      We have special logic to suppress MTE tag check fault reporting, based
      on a global `mte_report_once` and `reported` variables. These can be
      used to suppress calling kasan_report() when taking a tag check fault,
      but do not prevent taking the fault in the first place, nor does they
      affect the way we disable tag checks upon taking a fault.
      
      The core KASAN code already defaults to reporting a single fault, and
      has a `multi_shot` control to permit reporting multiple faults. The only
      place we transiently alter `mte_report_once` is in lib/test_kasan.c,
      where we also the `multi_shot` state as the same time. Thus
      `mte_report_once` and `reported` are redundant, and can be removed.
      
      When a tag check fault is taken, tag checking will be disabled by
      `do_tag_recovery` and must be explicitly re-enabled if desired. The test
      code does this by calling kasan_enable_tagging_sync().
      
      This patch removes the redundant mte_report_once() logic and associated
      variables.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Konovalov <andreyknvl@gmail.com>
      Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: NAndrey Konovalov <andreyknvl@gmail.com>
      Tested-by: NAndrey Konovalov <andreyknvl@gmail.com>
      Link: https://lore.kernel.org/r/20210714143843.56537-4-mark.rutland@arm.comSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      76721503
  9. 09 7月, 2021 1 次提交
  10. 30 6月, 2021 1 次提交
    • D
      kasan: test: improve failure message in KUNIT_EXPECT_KASAN_FAIL() · 3ff16d30
      David Gow 提交于
      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.comSigned-off-by: NDavid Gow <davidgow@google.com>
      Reviewed-by: NAndrey Konovalov <andreyknvl@gmail.com>
      Reviewed-by: NMarco Elver <elver@google.com>
      Acked-by: NBrendan Higgins <brendanhiggins@google.com>
      Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Daniel Axtens <dja@axtens.net>
      Cc: David Gow <davidgow@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3ff16d30
  11. 26 6月, 2021 1 次提交
  12. 15 5月, 2021 1 次提交
  13. 01 5月, 2021 2 次提交
  14. 11 4月, 2021 2 次提交
  15. 27 2月, 2021 2 次提交
  16. 25 2月, 2021 11 次提交
  17. 23 12月, 2020 1 次提交
  18. 03 11月, 2020 1 次提交
  19. 14 10月, 2020 2 次提交