Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=113.46.200.227 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796002875; b=tkDHwp2qCGT7EstID4VMvnGCFXvburyjiMATtrdAIO1EU/DpDsOwcTeJgqgGjGD0r2fa WuFawURenD4B1+CMqzWgMuQnZb4H/o8iuAGMjq9U3fQqrexutxTCSaGdNlCbTDAPDvm9T ELUS3307MxEJnGqJ7fBNTimogSL+peG2U29E2K1bTrxk/bIguC6eemit0wzOVuNC8yKyo gaP1bjB8MtJ7hjOXle0z2IepJwBlP1velx9nqmZcx8XxoYnznRly7KenZlSPB81ufZBlq qXINEpYZzxUxcGmjM5nQzhSdM4lbUCuHXTkVFdffDJs6vYa2sjllE+3oSHqwAWwHCAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796002875; h=DMARC-Filter:dkim-signature:Received:Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:CC:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Originating-IP: X-ClientProxiedBy; bh=5p++3BbZOLiKFbBt2uiAD5N5qNjI2HzPqHxBDD9tzVM=; b=olRY13onqQZK6EU+PioQYZaXzgx0N2jXA3y6REPRv0OpBCGwWDH1m2lGm2J5oQhGHrf/ IiqO4P2reeWXTAxY/n0YUKjLazFReiHDh7WTSKdPClFCylNlggYrKXJqsGr47NDMXDiqI XgXyVJjxa5rQCdewrg34cPZYy/qsDY6RicR1bsMhVq63G6CwzIYm8XoE+dQnMxYMFDc7y hkAk1FrFJE4Gnz9w88Ldn/ei0k1gO00OfPzzC2J8v3E+a30ASlHW5I0lYVPYK27ZsjHBV DzZZ/tkNLbnKy1rC+MWsDTPm9d99rZ69dfolqpY6ip0AzRPv/ty+yKW+8U70ycH3eyA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=VkZWYolL; arc=none smtp.remote-ip=113.46.200.227 Received: from canpmsgout12.his.huawei.com (canpmsgout12.his.huawei.com [113.46.200.227]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B8DF606A31C for ; Mon, 30 Nov 2026 01:41:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3B8DF606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=VkZWYolL dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=5p++3BbZOLiKFbBt2uiAD5N5qNjI2HzPqHxBDD9tzVM=; b=VkZWYolL02ByufeWnvE9r7iABd+JU4XlDkQhLHOSTErLZpTvjq8z2wnPI3elMHn1D+HXM/pvT 701zkhz8mqS+DenX3TWIQ/GXiHi7ga3ihpWbDn3llWT/eKXitPj2d+L4iBegbU+Tp4hCgB9R2bv aIEcStDHTnUGpD34crCAm8A= Received: from mail.maildlp.com (unknown [172.19.163.163]) by canpmsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4jd6Cj4XWsznTZb; Mon, 30 Nov 2026 09:40:17 +0800 (CST) Received: from kwepemo200009.china.huawei.com (unknown [7.202.195.26]) by mail.maildlp.com (Postfix) with ESMTPS id EA88D4057A; Mon, 30 Nov 2026 09:41:03 +0800 (CST) Received: from [10.174.185.4] (10.174.185.4) by kwepemo200009.china.huawei.com (7.202.195.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Mon, 30 Nov 2026 09:41:03 +0800 Message-ID: Date: Mon, 30 Nov 2026 09:41:02 +0800 X-Mailing-List: sashiko-reviews@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] selftests/liveupdate: add seal-after-preserve kexec test To: , , , CC: , , , , References: <20261128072444.1114964-1-longwei27@huawei.com> <20261128072444.1114964-3-longwei27@huawei.com> From: "longwei (I)" In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemo200009.china.huawei.com (7.202.195.26) Thanks for the review. This is a valid point =E2=80=94 32-bit architectur= es 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. =E5=9C=A8 2026/11/29 15:27, sashiko-bot@kernel.org =E5=86=99=E9=81=93: > 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 > -- >=20 > commit b099e7f10e3cdd248ce57bd488ae708e0afbe3d7 > Author: Long Wei >=20 > selftests/liveupdate: add seal-after-preserve kexec test >=20 > This commit adds a kexec selftest that preserves an unsealed memfd, add= s > F_SEAL_GROW after preservation, and verifies that both the memfd conten= ts > and the seal survive across a kexec reboot. >=20 >> diff --git a/tools/testing/selftests/liveupdate/luo_seal_after_preserv= e.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 >=20 > [Severity: Medium] > Does LUO_FCNTL_NR fail to compile on 32-bit architectures that use the > generic syscall table? >=20 > In include/uapi/asm-generic/unistd.h, __NR_fcntl is only defined when > __BITS_PER_LONG =3D=3D 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. >=20