From: sashiko-bot@kernel.org
To: "Eric Curtin" <ericcurtin17@gmail.com>
Cc: "Ryan Roberts" <ryan.roberts@arm.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Christian Brauner" <brauner@kernel.org>,
"Jan Kara" <jack@suse.cz>, "Kees Cook" <kees@kernel.org>,
linux-mm@kvack.org
Subject: Re: [RFC PATCH v2 21/22] coredump: Use PAGE_SIZE_MIN for the zero-fill buffer
Date: Thu, 03 Dec 2026 03:16:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-247068@kernel.org> (raw)
In-Reply-To: <20261202031533.1665444-22-ericcurtin17@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] coredump: undeclared PAGE_SIZE_MIN and
DEFINE_GLOBAL_PAGE_SIZE_VAR break build
--
commit 814f39fe7ab34dd716c7efe55a610f159148a21b
Author: Ryan Roberts <ryan.roberts@arm.com>
coredump: Use PAGE_SIZE_MIN for the zero-fill buffer
This commit reworks ELF_MIN_ALIGN, elf_format, and the __dump_skip()
zero-fill buffer to avoid relying on PAGE_SIZE as a compile-time constant.
> diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
> index bf7f8f47548d3..9adec104a2113 100644
> --- a/fs/binfmt_elf.c
> +++ b/fs/binfmt_elf.c
[ ... ]
> @@ -93,14 +90,14 @@ static bool elf_core_dump(struct coredump_params *cprm);
> #define ELF_PAGEOFFSET(_v) ((_v) & (ELF_MIN_ALIGN-1))
> #define ELF_PAGEALIGN(_v) (((_v) + ELF_MIN_ALIGN - 1) & ~(ELF_MIN_ALIGN - 1))
>
> -static struct linux_binfmt elf_format = {
> +static DEFINE_GLOBAL_PAGE_SIZE_VAR(struct linux_binfmt, elf_format, {
> .module = THIS_MODULE,
> .load_binary = load_elf_binary,
> #ifdef CONFIG_COREDUMP
> .core_dump = elf_core_dump,
> .min_coredump = ELF_EXEC_PAGESIZE,
> #endif
> -};
> +});
>
> #define BAD_ADDR(x) (unlikely((unsigned long)(x) >= TASK_SIZE))
>
> diff --git a/fs/coredump.c b/fs/coredump.c
> index 82ef9d115999a..e9658771c2173 100644
> --- a/fs/coredump.c
> +++ b/fs/coredump.c
> @@ -1442,7 +1442,7 @@ static void dump_end_record(struct coredump_params *cprm)
>
> static bool __dump_skip(struct coredump_params *cprm, size_t nr)
> {
> - static char zeroes[PAGE_SIZE];
> + static char zeroes[PAGE_SIZE_MIN];
> struct file *file = cprm->file;
>
> if (dump_sparse(cprm)) {
> @@ -1460,7 +1460,7 @@ static bool __dump_skip(struct coredump_params *cprm, size_t nr)
> }
>
> while (nr) {
> - size_t chunk = min_t(size_t, nr, PAGE_SIZE);
> + size_t chunk = min_t(size_t, nr, PAGE_SIZE_MIN);
>
> if (!__dump_emit(cprm, zeroes, chunk))
> return false;
[Severity: High]
Are the definitions for DEFINE_GLOBAL_PAGE_SIZE_VAR and PAGE_SIZE_MIN
missing from this tree? Neither symbol is defined in include/vdso/page.h
or any other header, so fs/binfmt_elf.c, fs/compat_binfmt_elf.c, and
fs/coredump.c fail to compile.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202031533.1665444-1-ericcurtin17@gmail.com?part=21
prev parent reply other threads:[~2026-12-03 3:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 3:15 [RFC PATCH v2 00/22] fs: Prepare for boot-time page size selection on arm64 Eric Curtin
2026-12-02 3:15 ` [RFC PATCH v2 21/22] coredump: Use PAGE_SIZE_MIN for the zero-fill buffer Eric Curtin
2026-12-03 3:16 ` sashiko-bot [this message]
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=sashiko-outbox-247068@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=brauner@kernel.org \
--cc=ericcurtin17@gmail.com \
--cc=jack@suse.cz \
--cc=kees@kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox