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: <CAH4c4jJ8VywRUfn2z8HnA73vNxviZ53DZttcR3JaPULF3JFkQA@mail.gmail.com>
Date: Wed, 6 Aug 2025 21:15:50 +0530
From: Pranav Tyagi <pranav.tyagi03@...il.com>
To: akpm@...ux-foundation.org, peterx@...hat.com, shuah@...nel.org, 
	linux-mm@...ck.org, linux-kselftest@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Cc: linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] selftests/mm: use __auto_type in swap() macro

On Wed, Jul 30, 2025 at 7:53 PM Pranav Tyagi <pranav.tyagi03@...il.com> wrote:
>
> Replace typeof() with __auto_type in the swap() macro in uffd-stress.c.
> __auto_type was introduced in GCC 4.9 and reduces the compile time for
> all compilers. No functional changes intended.
>
> Signed-off-by: Pranav Tyagi <pranav.tyagi03@...il.com>
> ---
>  tools/testing/selftests/mm/uffd-stress.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c
> index 40af7f67c407..c0f64df5085c 100644
> --- a/tools/testing/selftests/mm/uffd-stress.c
> +++ b/tools/testing/selftests/mm/uffd-stress.c
> @@ -51,7 +51,7 @@ static char *zeropage;
>  pthread_attr_t attr;
>
>  #define swap(a, b) \
> -       do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
> +       do { __auto_type __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
>
>  const char *examples =
>         "# Run anonymous memory test on 100MiB region with 99999 bounces:\n"
> --
> 2.49.0
>

Hi,

Just a gentle follow-up on this cleanup patch. From what I could find,
this is the only use of
typeof() left in the mm selftests, so this should be the only instance
needing this change.

Thanks for considering!

Regards
Pranav Tyagi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ