Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "longwei (I)" <longwei27@huawei.com>
To: <sashiko-reviews@lists.linux.dev>, <rppt@kernel.org>,
	<pasha.tatashin@soleen.com>, <pratyush@kernel.org>
Cc: <shuah@kernel.org>, <akpm@linux-foundation.org>,
	<linux-mm@kvack.org>, <kexec@lists.infradead.org>,
	<hewenliang4@huawei.com>
Subject: Re: [PATCH 2/2] selftests/liveupdate: add seal-after-preserve kexec test
Date: Mon, 30 Nov 2026 09:41:02 +0800	[thread overview]
Message-ID: <f1a2bae7-eacf-47d2-928f-a801fd7374f6@huawei.com> (raw)
In-Reply-To: <sashiko-outbox-239362@kernel.org>

Thanks for the review. This is a valid point — 32-bit architectures
using the generic syscall table (riscv32, csky, nios2, ...) only define
__NR_fcntl64, not __NR_fcntl. I'll send a v2 of this selftest patch with
the fcntl64 fallback added.

在 2026/11/29 15:27, sashiko-bot@kernel.org 写道:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] selftests/liveupdate: missing __NR_fcntl64 fallback in
>   LUO_FCNTL_NR
> --
> 
> commit b099e7f10e3cdd248ce57bd488ae708e0afbe3d7
> Author: Long Wei <longwei27@huawei.com>
> 
> selftests/liveupdate: add seal-after-preserve kexec test
> 
> This commit adds a kexec selftest that preserves an unsealed memfd, adds
> F_SEAL_GROW after preservation, and verifies that both the memfd contents
> and the seal survive across a kexec reboot.
> 
>> diff --git a/tools/testing/selftests/liveupdate/luo_seal_after_preserve.c b/tools/testing/selftests/liveupdate/luo_seal_after_preserve.c
>> new file mode 100644
>> index 0000000000000..12e6731c9235a
>> --- /dev/null
>> +++ b/tools/testing/selftests/liveupdate/luo_seal_after_preserve.c
>> @@ -0,0 +1,170 @@
> [ ... ]
>> +/*
>> + * Prefer SYS_fcntl when the libc defines it (glibc, musl); fall back to
>> + * __NR_fcntl which is the only name nolibc provides.
>> + */
>> +#ifdef SYS_fcntl
>> +#define LUO_FCNTL_NR SYS_fcntl
>> +#else
>> +#define LUO_FCNTL_NR __NR_fcntl
>> +#endif
> 
> [Severity: Medium]
> Does LUO_FCNTL_NR fail to compile on 32-bit architectures that use the
> generic syscall table?
> 
> In include/uapi/asm-generic/unistd.h, __NR_fcntl is only defined when
> __BITS_PER_LONG == 64; 32-bit targets such as riscv32 only define
> __NR_fcntl64 (and SYS_fcntl64 in libc), as seen in
> tools/include/nolibc/sys.h:_sys_dup2().  Without falling back to
> SYS_fcntl64 or __NR_fcntl64, building kselftests on those architectures
> fails with an undeclared __NR_fcntl identifier.
> 



      reply	other threads:[~2026-11-30  1:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28  7:24 [PATCH 0/2] mm: memfd_luo: pick up seals added after preserve at freeze Long Wei
2026-11-28  7:24 ` [PATCH 1/2] " Long Wei
2026-11-28  7:24 ` [PATCH 2/2] selftests/liveupdate: add seal-after-preserve kexec test Long Wei
2026-11-29  7:27   ` sashiko-bot
2026-11-30  1:41     ` longwei (I) [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=f1a2bae7-eacf-47d2-928f-a801fd7374f6@huawei.com \
    --to=longwei27@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=hewenliang4@huawei.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shuah@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