[PATCH v3 4/4] tools/kselftest: add MTE_STORE_ONLY feature hwcap test

Yeoreum Yun posted 4 patches 8 months, 1 week ago
There is a newer version of this series
[PATCH v3 4/4] tools/kselftest: add MTE_STORE_ONLY feature hwcap test
Posted by Yeoreum Yun 8 months, 1 week ago
add MTE_STORE_ONLY feature hwcap test.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/arm64/abi/hwcap.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
index a539eeb0bfc0..32385f67498e 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -1104,6 +1104,12 @@ static const struct hwcap_data {
 		.hwcap_bit = HWCAP3_MTE_FAR,
 		.cpuinfo = "mte_far",
 	},
+	{
+		.name = "MTE_STOREONLY",
+		.at_hwcap = AT_HWCAP3,
+		.hwcap_bit = HWCAP3_MTE_STORE_ONLY,
+		.cpuinfo = "mte_store_only",
+	},
 };

 typedef void (*sighandler_fn)(int, siginfo_t *, void *);
--
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
Re: [PATCH v3 4/4] tools/kselftest: add MTE_STORE_ONLY feature hwcap test
Posted by Catalin Marinas 7 months, 2 weeks ago
On Thu, Apr 10, 2025 at 09:07:23AM +0100, Yeoreum Yun wrote:
> add MTE_STORE_ONLY feature hwcap test.
> 
> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> Reviewed-by: Mark Brown <broonie@kernel.org>
> ---
>  tools/testing/selftests/arm64/abi/hwcap.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
> index a539eeb0bfc0..32385f67498e 100644
> --- a/tools/testing/selftests/arm64/abi/hwcap.c
> +++ b/tools/testing/selftests/arm64/abi/hwcap.c
> @@ -1104,6 +1104,12 @@ static const struct hwcap_data {
>  		.hwcap_bit = HWCAP3_MTE_FAR,
>  		.cpuinfo = "mte_far",
>  	},
> +	{
> +		.name = "MTE_STOREONLY",
> +		.at_hwcap = AT_HWCAP3,
> +		.hwcap_bit = HWCAP3_MTE_STORE_ONLY,
> +		.cpuinfo = "mte_store_only",
> +	},
>  };

Please also add checks to tools/testing/selftests/arm64/mte/ to verify
that read tag check faults are ignored when this is enabled.

-- 
Catalin
Re: [PATCH v3 4/4] tools/kselftest: add MTE_STORE_ONLY feature hwcap test
Posted by Yeoreum Yun 7 months, 2 weeks ago
Hi Catalin,

> On Thu, Apr 10, 2025 at 09:07:23AM +0100, Yeoreum Yun wrote:
> > add MTE_STORE_ONLY feature hwcap test.
> >
> > Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> > Reviewed-by: Mark Brown <broonie@kernel.org>
> > ---
> >  tools/testing/selftests/arm64/abi/hwcap.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
> > index a539eeb0bfc0..32385f67498e 100644
> > --- a/tools/testing/selftests/arm64/abi/hwcap.c
> > +++ b/tools/testing/selftests/arm64/abi/hwcap.c
> > @@ -1104,6 +1104,12 @@ static const struct hwcap_data {
> >  		.hwcap_bit = HWCAP3_MTE_FAR,
> >  		.cpuinfo = "mte_far",
> >  	},
> > +	{
> > +		.name = "MTE_STOREONLY",
> > +		.at_hwcap = AT_HWCAP3,
> > +		.hwcap_bit = HWCAP3_MTE_STORE_ONLY,
> > +		.cpuinfo = "mte_store_only",
> > +	},
> >  };
>
> Please also add checks to tools/testing/selftests/arm64/mte/ to verify
> that read tag check faults are ignored when this is enabled.

Okay, I'll add related test cases in check_mmap_options and
check_user_mem.

--
Sincerely,
Yeoreum Yun