From: Breno Leitao <leitao@debian.org>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: SJ Park <sj@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-riscv@lists.infradead.org, kernel-team@meta.com,
Andrew Morton <akpm@linux-foundation.org>,
Naoya Horiguchi <nao.horiguchi@gmail.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
david@kernel.org
Subject: Re: [PATCH v2] tools/mm: add hwpoison-panic tool
Date: Thu, 13 Aug 2026 03:19:26 -0700 [thread overview]
Message-ID: <an2Yr4n6ahggXKo1@gmail.com> (raw)
In-Reply-To: <be68a841-a326-4826-8e02-5148736dd356@huawei.com>
Hello Miaohe,
First of all, thanks for looking at this one.
On Thu, Aug 13, 2026 at 03:32:34PM +0800, Miaohe Lin wrote:
> On 2026/8/3 19:31, Breno Leitao wrote:
> > +static int pick_kpageflags_phys_addr(uint64_t want, uint64_t *phys_addr)
> > +{
> > + uint64_t pfn = (16UL << 20) / page_size;
>
> Could we use SZ_16M macro here?
Sure, for that I will include ../../include/linux/sizes.h in the next
version.
> > +/* hard_offline_page() injects with MF_SW_SIMULATED, so unpoison is allowed. */
> > +static void unpoison_pfn(uint64_t pfn)
> > +{
> > + char path[PATH_MAX], buf[32];
> > + const char *debugfs;
> > + int fd, len;
> > +
> > + debugfs = debugfs__mount();
>
> I might be miss something but I can't find the implementation of debugfs__mount.
It is an ugly macro declared in tools/lib/api/fs/fs.h:
#define FS(name) \
const char *name##__mountpoint(void); \
const char *name##__mount(void); \
bool name##__configured(void);
And then:
FS(debugfs)
> > + if (access(INJECT_PATH, W_OK))
> > + fatal("%s not present (no MEMORY_HOTPLUG?)\n", INJECT_PATH);
>
> MEMORY_HOTPLUG?
lol. it should be MEMORY_FAILURE
I will get these points fixed and respin.
--breno
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2026-08-13 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 11:31 [PATCH v2] tools/mm: add hwpoison-panic tool Breno Leitao
2026-08-13 7:32 ` Miaohe Lin
2026-08-13 10:19 ` Breno Leitao [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=an2Yr4n6ahggXKo1@gmail.com \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=david@kernel.org \
--cc=kernel-team@meta.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=nao.horiguchi@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=sj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox