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] [day] [month] [year] [list]
Message-Id: <21C8794F-EA8A-4C4C-A51D-DA7D6900CC74@toblux.com>
Date: Wed, 3 Jul 2024 12:02:39 -0700
From: Thorsten Blum <thorsten.blum@...lux.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
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()

On 2. Jul 2024, at 00:21, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> 
> 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.

Thank you for explaining this. I was already wondering why I couldn't 
find the function definition.

Thorsten

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ