All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Add KFENCE support for LoongArch
@ 2023-07-19  8:27 Enze Li
  2023-07-19  8:27 ` [PATCH 1/4] LoongArch: mm: Add page table mapped mode support Enze Li
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Enze Li @ 2023-07-19  8:27 UTC (permalink / raw)
  To: chenhuacai, kernel, loongarch, glider, elver, akpm, kasan-dev, linux-mm
  Cc: zhangqing, yangtiezhu, dvyukov, Enze Li

Hi all,

This patchset adds KFENCE support on LoongArch.

To run the testcases, you will need to enable the following options,

-> Kernel hacking
   [*] Tracers
       [*] Support for tracing block IO actions (NEW)
   -> Kernel Testing and Coverage
      <*> KUnit - Enable support for unit tests

and then,

-> Kernel hacking
   -> Memory Debugging
      [*] KFENCE: low-overhead sampling-based memory safety error detector (NEW)
          <*> KFENCE integration test suite (NEW)

With these options enabled, KFENCE will be tested during kernel startup.
And normally, you might get the following feedback,

========================================================
[   35.326363 ] # kfence: pass:23 fail:0 skip:2 total:25
[   35.326486 ] # Totals: pass:23 fail:0 skip:2 total:25
[   35.326621 ] ok 1 kfence
========================================================

you might notice that 2 testcases have been skipped.  If you tend to run
all testcases, please enable CONFIG_INIT_ON_FREE_DEFAULT_ON, you can
find it here,

-> Security options
   -> Kernel hardening options
      -> Memory initialization
         [*] Enable heap memory zeroing on free by default

and you might get all testcases passed.
========================================================
[   35.531860 ] # kfence: pass:25 fail:0 skip:0 total:25
[   35.531999 ] # Totals: pass:25 fail:0 skip:0 total:25
[   35.532135 ] ok 1 kfence
========================================================

Thanks,
Enze

Enze Li (4):
  LoongArch: mm: Add page table mapped mode support
  LoongArch: Get stack without NMI when providing regs parameter
  KFENCE: Deferring the assignment of the local variable addr
  LoongArch: Add KFENCE support

 arch/loongarch/Kconfig               |  1 +
 arch/loongarch/include/asm/kfence.h  | 62 ++++++++++++++++++++++++++++
 arch/loongarch/include/asm/page.h    | 10 +++++
 arch/loongarch/include/asm/pgtable.h | 12 ++++++
 arch/loongarch/kernel/stacktrace.c   | 16 ++++---
 arch/loongarch/mm/fault.c            | 22 ++++++----
 arch/loongarch/mm/pgtable.c          | 25 +++++++++++
 mm/kfence/core.c                     |  5 ++-
 8 files changed, 137 insertions(+), 16 deletions(-)
 create mode 100644 arch/loongarch/include/asm/kfence.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-07-25  6:07 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19  8:27 [PATCH 0/4] Add KFENCE support for LoongArch Enze Li
2023-07-19  8:27 ` [PATCH 1/4] LoongArch: mm: Add page table mapped mode support Enze Li
2023-07-19 15:29   ` Huacai Chen
2023-07-21  2:12     ` Enze Li
2023-07-21  2:21       ` Huacai Chen
2023-07-23  7:17         ` Enze Li
2023-07-25  2:06           ` Huacai Chen
2023-07-25  6:07             ` Enze Li
2023-07-19  8:27 ` [PATCH 2/4] LoongArch: Get stack without NMI when providing regs parameter Enze Li
2023-07-19 15:17   ` Huacai Chen
2023-07-21  1:49     ` Enze Li
2023-07-21  2:17       ` Huacai Chen
2023-07-19  8:27 ` [PATCH 3/4] KFENCE: Deferring the assignment of the local variable addr Enze Li
2023-07-19 10:54   ` Marco Elver
2023-07-19 15:06     ` Huacai Chen
2023-07-19 15:08       ` Marco Elver
2023-07-19  8:27 ` [PATCH 4/4] LoongArch: Add KFENCE support Enze Li
2023-07-19 15:27   ` Huacai Chen
2023-07-21  3:13     ` Enze Li
2023-07-21  3:19       ` Huacai Chen
2023-07-23  7:34         ` Enze Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.