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: <87r1j0vdev.ffs@nanos.tec.linutronix.de>
Date:   Sat, 24 Apr 2021 00:34:00 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     André Almeida <andrealmeid@...labora.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Adhemerval Zanella <adhemerval.zanella@...aro.org>,
        Lukasz Majewski <lukma@...x.de>,
        Florian Weimer <fweimer@...hat.com>,
        Carlos O'Donell <carlos@...hat.com>,
        "Michael Kerrisk \(man-pages\)" <mtk.manpages@...il.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Ingo Molnar <mingo@...nel.org>,
        Darren Hart <dvhart@...radead.org>,
        Andrei Vagin <avagin@...il.com>,
        Kurt Kanzenbach <kurt@...utronix.de>, kernel@...labora.com
Subject: Re: [patch 3/6] futex: Get rid of the val2 conditional dance

On Fri, Apr 23 2021 at 18:40, André Almeida wrote:
>>   
>> -	return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);
>> +	return do_futex(uaddr, op, val, tp, uaddr2, (unsigned long)utime, val3);
>
> Given do_futex()'s type signature, I think it makes more sense to cast 
> utime to u32.

It's a pointer which you better force cast to unsigned long first.

So the explicit thing would be '(u32)(unsigned long) utime' which is
what the val2 dance stupidly did with 'int'

		val2 = (int) (unsigned long) utime;

But with doing it at function call argument it's implicit, because the

  unsigned long  to u32 conversion is well defined

while

  (u32)ptr

is only well defined on 32bit.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ