Re: [PATCH 2/4] selftest/arm64: Treat KSM merge_across_nodes as optional

Mark Brown <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, Aug 20, 2026 at 04:33:24PM +0100, Muhammad Usama Anjum wrote:
> The MTE KSM test unconditionally saves, enables and restores the
> merge_across_nodes sysfs attribute. The kernel only creates this
> attribute when CONFIG_NUMA=y. A non-NUMA kernel consequently prints the
> following message three times even though all KSM subtests pass:

>  static void mte_ksm_setup(void)
>  {
> -	ksm_sysfs[0] = read_sysfs(PATH_KSM "merge_across_nodes");
> -	write_sysfs(PATH_KSM "merge_across_nodes", 1);
> +	has_merge_across_nodes = !access(PATH_KSM "merge_across_nodes", F_OK);

Don't we need the file to be readable and writable, not just extant?
Looking quickly at the test I'm actually not spotting where it checks
that it's running as root which I think it needs in general.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqHJrEACgkQJNaLcl1U
h9CRtAf/dyOLasDZacxDjlmySBh2HEYjNXwXJeIGcQ8gG9GMFwXWGrxOVczxxSAv
mqf+XwBC9/i0Xzz5JFO5siZtAAOCk6b738U8MIgtDrIRGsZWvyTus+8NSEfe/3VY
SC50yUo4Wrn+gukRlg+KXu02ICnaNE2I0pXuvz2lVVF7TUXPFPqi7xg8IAHQp55p
xAQV7Jm6TqNb5jxysQCAu0pQrOECafJ1eSwynrBmrVWL96SB+uNy/zrD5QaUj5MG
CwPFnP8j+yk3PicAyblJ7YZXKGVpED+CWFik7KVqqwDbZ6WcMvU0C2M7h3MkKtDL
DpA9SeO0GAKiQtggMv+VAKxrKER9yQ==
=ONOg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.