Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Long Wei" <longwei27@huawei.com>,
	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: Sun, 29 Nov 2026 07:27:49 +0000	[thread overview]
Message-ID: <sashiko-outbox-239362@kernel.org> (raw)
In-Reply-To: <20261128072444.1114964-3-longwei27@huawei.com>

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.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261128072444.1114964-1-longwei27@huawei.com?part=2


      reply	other threads:[~2026-11-29  7:27 UTC|newest]

Thread overview: 4+ 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 [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-239362@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hewenliang4@huawei.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=longwei27@huawei.com \
    --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