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: <CAMuHMdVTqsqrDTKGTGoLd_3FPk9S6wX-qXYzipJ+6yW0q0L11w@mail.gmail.com>
Date: Tue, 2 Jul 2024 09:21:26 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Thorsten Blum <thorsten.blum@...lux.com>
Cc: gerg@...inux.org, dhowells@...hat.com, linux-m68k@...ts.linux-m68k.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68k: cmpxchg: Fix return value for default case in __arch_xchg()

Hi Thorsten,

On Tue, Jul 2, 2024 at 5:42 AM Thorsten Blum <thorsten.blum@...lux.com> wrote:
> The return value of __invalid_xchg_size() is assigned to tmp instead of
> the return variable x. Assign it to x instead.

Thanks for your patch!

> Fixes: 803f69144f0d ("Disintegrate asm/system.h for M68K")

That is not the right commit.  The issue was introduced before:
Fixes: 2501cf768e4009a0 ("m68k: Fix xchg/cmpxchg to fail to link if
given an inappropriate pointer")

> Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>

> --- a/arch/m68k/include/asm/cmpxchg.h
> +++ b/arch/m68k/include/asm/cmpxchg.h
> @@ -32,7 +32,7 @@ static inline unsigned long __arch_xchg(unsigned long x, volatile void * ptr, in
>                 x = tmp;
>                 break;
>         default:
> -               tmp = __invalid_xchg_size(x, ptr, size);
> +               x = __invalid_xchg_size(x, ptr, size);
>                 break;
>         }

Although this was not a real bug (__invalid_xchg_size() does not exist,
but is referenced to cause a deliberate link error), it is good to
clean this up.

Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
i.e. will queue in the m68k tree for v6.11.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ