lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <GV1PR08MB105215BEA5D230BFB36D86FDAFB75A@GV1PR08MB10521.eurprd08.prod.outlook.com>
Date: Wed, 11 Jun 2025 12:23:26 +0000
From: Yeo Reum Yun <YeoReum.Yun@....com>
To: Mark Brown <broonie@...nel.org>
CC: Catalin Marinas <Catalin.Marinas@....com>, "pcc@...gle.com"
	<pcc@...gle.com>, "will@...nel.org" <will@...nel.org>, Anshuman Khandual
	<Anshuman.Khandual@....com>, Joey Gouly <Joey.Gouly@....com>, Yury Khrustalev
	<Yury.Khrustalev@....com>, "maz@...nel.org" <maz@...nel.org>,
	"oliver.upton@...ux.dev" <oliver.upton@...ux.dev>, "frederic@...nel.org"
	<frederic@...nel.org>, "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>, "surenb@...gle.com" <surenb@...gle.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-doc@...r.kernel.org"
	<linux-doc@...r.kernel.org>
Subject: Re: [PATCH v6 5/9] kselftest/arm64/mte: check MTE_FAR feature is
 supported

Hi Mark,

> >  #include <unistd.h>
>
> Not sure why we'd be including time.h here?

As you mention, This is my bad for wrong plcae .. Sorry

> > +bool mtefar_support;
>
> This is a non-static variable so won't have a defined default value...

Right, at the first write, I declare this with static.
But forgetting when changing more....

> > +
> >        if (mode == MTE_SYNC_ERR)
> >                cur_mte_cxt.trig_si_code = SEGV_MTESERR;
> >      else if (mode == MTE_ASYNC_ERR)
>
> Unrelated whitespace change.

Thanks.

> ...this will only set mtefar_support if the hwcap is present, leaving it
> 
> undefined if not.  If you just make this
> 
>      mtefar_support = hwcap3 & HWCAP3_MTE_FAR
> that should avoid the issue.

Thanks for catching this.
I'll change.

--  
Sincerely,
Yeoreum Yun




________________________________________
From: Mark Brown
Sent: Wednesday, June 11, 2025 12:52
To: Yeo Reum Yun
Cc: Catalin Marinas; pcc@...gle.com; will@...nel.org; Anshuman Khandual; Joey Gouly; Yury Khrustalev; maz@...nel.org; oliver.upton@...ux.dev; frederic@...nel.org; akpm@...ux-foundation.org; surenb@...gle.com; linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; linux-doc@...r.kernel.org
Subject: Re: [PATCH v6 5/9] kselftest/arm64/mte: check MTE_FAR feature is supported


On Wed, Jun 11, 2025 at 10:41:03AM +0100, Yeoreum Yun wrote:

> --- a/tools/testing/selftests/arm64/mte/mte_common_util.c

> +++ b/tools/testing/selftests/arm64/mte/mte_common_util.c

> @@ -6,6 +6,7 @@

>  #include <signal.h>

>  #include <stdio.h>

>  #include <stdlib.h>

> +#include <time.h>

>  #include <unistd.h>



Not sure why we'd be including time.h here?



> 

>  #include <linux/auxvec.h>

> @@ -26,6 +27,7 @@

>  #define INIT_BUFFER_SIZE       256

> 

>  struct mte_fault_cxt cur_mte_cxt;

> +bool mtefar_support;



This is a non-static variable so won't have a defined default value...



> @@ -273,6 +275,7 @@ void mte_initialize_current_context(int mode, uintptr_t ptr, ssize_t range)

>        cur_mte_cxt.fault_valid = false;

>        cur_mte_cxt.trig_addr = ptr;

>        cur_mte_cxt.trig_range = range;

> +

>        if (mode == MTE_SYNC_ERR)

>                cur_mte_cxt.trig_si_code = SEGV_MTESERR;

>        else if (mode == MTE_ASYNC_ERR)



Unrelated whitespace change.



>        if (!(hwcaps2 & HWCAP2_MTE))

>                ksft_exit_skip("MTE features unavailable\n");

> 

> +     if (hwcaps3 & HWCAP3_MTE_FAR)

> +             mtefar_support = true;

> +



...this will only set mtefar_support if the hwcap is present, leaving it

undefined if not.  If you just make this



        mtefar_support = hwcap3 & HWCAP3_MTE_FAR



that should avoid the issue.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ