From: Jackie Liu <liu.yun@linux.dev>
To: glider@google.com
Cc: dvyukov@google.com, elver@google.com, pjw@kernel.org,
alex@ghiti.fr, aou@eecs.berkeley.edu,
linux-riscv@lists.infradead.org, linux-mm@kvack.org,
kasan-dev@googlegroups.com, muchun.song@linux.dev,
liu.yun@linux.dev
Subject: [PATCH v2 0/3] kfence: fix pool allocation failure handling
Date: Thu, 29 Oct 2026 10:57:40 +0800 [thread overview]
Message-ID: <cover.1793242457.git.liuyun01@kylinos.cn> (raw)
From: Jackie Liu <liuyun01@kylinos.cn>
Fix the cleanup address and page reuse window in failed late KFENCE
initialization. Also let RISC-V boot if the early pool reservation fails.
Patch 2 depends on patch 1. Patch 3 can be applied independently.
Changes in v2:
- Add Marco Elver's Reviewed-by to patches 1 and 2; their code is unchanged.
- Drop the unused asm/kfence.h include from patch 3. Sashiko reported that
its unconditional inclusion breaks RV32 and NOMMU builds.
- Credit Sashiko and kernel test robot with Reported-by and Closes tags
in patch 3.
v1: https://lore.kernel.org/all/cover.1793017073.git.liuyun01@kylinos.cn/
Reports:
https://sashiko.dev/#/patchset/cover.1793017073.git.liuyun01@kylinos.cn?part=3
https://lore.kernel.org/all/sashiko-outbox-186543@kernel.org/
https://lore.kernel.org/oe-kbuild-all/202610290904.wbrEL97y-lkp@intel.com/
Validation on AArch64 Linux with Clang 17.0.6 and GNU ld 2.40:
- RV32 and NOMMU: reproduced v1 failures; v2 init.o builds successfully.
- RV64 defconfig with CONFIG_KFENCE=y: init.o, mm/kfence/core.o, and the
full Image build pass without warnings.
The existing NOMMU warning in include/asm-generic/io.h is identical to
that from the unpatched base. No boot or failure-injection tests were run.
All three patches pass checkpatch.pl --strict and git diff --check.
OpenAI Codex assisted with review, adaptation, wording, and validation.
Jackie Liu (3):
kfence: fix pool cleanup on metadata allocation failure
kfence: clear the pool pointer before freeing pages
riscv: keep booting if KFENCE pool reservation fails
arch/riscv/include/asm/kfence.h | 4 +++-
arch/riscv/mm/init.c | 18 ++++++++++++++----
mm/kfence/core.c | 6 ++++--
3 files changed, 21 insertions(+), 7 deletions(-)
base-commit: 7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614
--
2.56.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Jackie Liu <liu.yun@linux.dev>
To: glider@google.com
Cc: dvyukov@google.com, elver@google.com, pjw@kernel.org,
alex@ghiti.fr, aou@eecs.berkeley.edu,
linux-riscv@lists.infradead.org, linux-mm@kvack.org,
kasan-dev@googlegroups.com, muchun.song@linux.dev,
liu.yun@linux.dev
Subject: [PATCH v2 0/3] kfence: fix pool allocation failure handling
Date: Thu, 29 Oct 2026 10:57:40 +0800 [thread overview]
Message-ID: <cover.1793242457.git.liuyun01@kylinos.cn> (raw)
From: Jackie Liu <liuyun01@kylinos.cn>
Fix the cleanup address and page reuse window in failed late KFENCE
initialization. Also let RISC-V boot if the early pool reservation fails.
Patch 2 depends on patch 1. Patch 3 can be applied independently.
Changes in v2:
- Add Marco Elver's Reviewed-by to patches 1 and 2; their code is unchanged.
- Drop the unused asm/kfence.h include from patch 3. Sashiko reported that
its unconditional inclusion breaks RV32 and NOMMU builds.
- Credit Sashiko and kernel test robot with Reported-by and Closes tags
in patch 3.
v1: https://lore.kernel.org/all/cover.1793017073.git.liuyun01@kylinos.cn/
Reports:
https://sashiko.dev/#/patchset/cover.1793017073.git.liuyun01@kylinos.cn?part=3
https://lore.kernel.org/all/sashiko-outbox-186543@kernel.org/
https://lore.kernel.org/oe-kbuild-all/202610290904.wbrEL97y-lkp@intel.com/
Validation on AArch64 Linux with Clang 17.0.6 and GNU ld 2.40:
- RV32 and NOMMU: reproduced v1 failures; v2 init.o builds successfully.
- RV64 defconfig with CONFIG_KFENCE=y: init.o, mm/kfence/core.o, and the
full Image build pass without warnings.
The existing NOMMU warning in include/asm-generic/io.h is identical to
that from the unpatched base. No boot or failure-injection tests were run.
All three patches pass checkpatch.pl --strict and git diff --check.
OpenAI Codex assisted with review, adaptation, wording, and validation.
Jackie Liu (3):
kfence: fix pool cleanup on metadata allocation failure
kfence: clear the pool pointer before freeing pages
riscv: keep booting if KFENCE pool reservation fails
arch/riscv/include/asm/kfence.h | 4 +++-
arch/riscv/mm/init.c | 18 ++++++++++++++----
mm/kfence/core.c | 6 ++++--
3 files changed, 21 insertions(+), 7 deletions(-)
base-commit: 7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614
--
2.56.0
next reply other threads:[~2026-10-29 2:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 2:57 Jackie Liu [this message]
2026-10-29 2:57 ` [PATCH v2 0/3] kfence: fix pool allocation failure handling Jackie Liu
2026-10-29 2:57 ` [PATCH v2 1/3] kfence: fix pool cleanup on metadata allocation failure Jackie Liu
2026-10-29 2:57 ` Jackie Liu
2026-10-29 2:57 ` [PATCH v2 2/3] kfence: clear the pool pointer before freeing pages Jackie Liu
2026-10-29 2:57 ` Jackie Liu
2026-10-29 2:57 ` [PATCH v2 3/3] riscv: keep booting if KFENCE pool reservation fails Jackie Liu
2026-10-29 2:57 ` Jackie Liu
2026-10-30 2:58 ` sashiko-bot
2026-10-30 1:26 ` [PATCH v2 0/3] kfence: fix pool allocation failure handling Andrew Morton
2026-10-30 1:26 ` Andrew Morton
2026-10-30 5:55 ` Jackie Liu
2026-10-30 5:55 ` Jackie Liu
2026-10-30 6:55 ` Andrew Morton
2026-10-30 6:55 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1793242457.git.liuyun01@kylinos.cn \
--to=liu.yun@linux.dev \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=muchun.song@linux.dev \
--cc=pjw@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.