From nobody Sat Jul 25 06:09:49 2026 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 066DB25CC79 for ; Fri, 17 Jul 2026 03:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784257413; cv=none; b=rG+AoXhuwxOznmEdR1SdE9/7ch9jShLOoJgqfzyN5Dq9WoN3djFEg21vv6ObdH3vI8bx6gNJf0f6LaMNMeF2Kv1//+lSBD6ssITXtBCwp5B5k49wC6A3gDvGsgOs/LibXhbMPOkYnxvc2oFloSBpDeqsegjJXlRdmWKPAxfB1PQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784257413; c=relaxed/simple; bh=r7HxD8Mwlgo+W19r+jRvAf86LOeMX9H2ujbJZD+T1hg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PAnPNTa4NfYY09fibJlSSJ+A/Uc5WUBnJyxYa+7QBzZJnc1YifHwSSzuITbnTghVZBGIAcqGn5GD33XCv5oGVEV6MpRRYErb/Swlnw1UFzfGPXB2zUfUf6ooqRYkyN4l2Zl8XWY2zhhWJySclkzbSAGNEdW0cVcRoTo7kvHpLZ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 136ac1f6818c11f1aa26b74ffac11d73-20260717 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.12,REQID:ad252ab9-877f-4000-8262-19d99b269e31,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:e7bac3a,CLOUDID:8d6ce536896b87b49f2a8bfee7645658,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:102|850|865|898,TC:nil,Content:0|15|50,E DM:-3,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA :0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 136ac1f6818c11f1aa26b74ffac11d73-20260717 X-User: yanlonglong@kylinos.cn Received: from localhost.localdomain [(10.44.16.150)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 1415036839; Fri, 17 Jul 2026 11:03:24 +0800 From: longlong yan To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Cc: longlong yan Subject: [PATCH] um: use ARRAY_SIZE macro in stub_exe.c Date: Fri, 17 Jul 2026 11:03:08 +0800 Message-ID: <20260717030308.996-1-yanlonglong@kylinos.cn> X-Mailer: git-send-email 2.47.1.windows.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ARRAY_SIZE macro is more compact and more formal in linux source. Fixes: 406d17c6c370 ("um: Implement kernel side of SECCOMP based process ha= ndling") Signed-off-by: longlong yan --- arch/um/kernel/skas/stub_exe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/skas/stub_exe.c b/arch/um/kernel/skas/stub_exe.c index cbafaa684e66..2b89acbcbad8 100644 --- a/arch/um/kernel/skas/stub_exe.c +++ b/arch/um/kernel/skas/stub_exe.c @@ -7,6 +7,7 @@ #include #include #include +#include =20 void _start(void); =20 @@ -193,7 +194,7 @@ noinline static void real_init(void) BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW), }; struct sock_fprog prog =3D { - .len =3D sizeof(filter) / sizeof(filter[0]), + .len =3D ARRAY_SIZE(filter), .filter =3D filter, }; =20 --=20 2.43.0