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: <20190225155119.GA7654@latitude>
Date:   Mon, 25 Feb 2019 16:51:19 +0100
From:   Jonathan Neuschäfer <j.neuschaefer@....net>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Jonathan Neuschäfer <j.neuschaefer@....net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Linux-Arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH] div64.h: Fix description of do_div parameter

On Mon, Feb 25, 2019 at 04:19:02PM +0100, Geert Uytterhoeven wrote:
> Hi Jonathan,
> 
> On Mon, Feb 25, 2019 at 3:05 PM Jonathan Neuschäfer
> <j.neuschaefer@....net> wrote:
> > Contrary to the description, the first parameter (n) should not be
> > passed as a pointer, but directly as an lvalue. This is possible because
> > do_div is a macro.
> >
> > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@....net>
> 
> Thanks for your patch!
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> 
> Shouldn't the "semantics" at the top of include/asm-generic/div64.h be
> updated, too?

Arguably, it's semantically close enough. I'm not sure.

> As this can't be expressed in a C function, perhaps that should be done
> using C++ syntax, like
> 
>     uint32_t do_div(uint64_t &n, uint32_t base)
>     {
>         ...
>     }

That might confuse some people who aren't expecting C++ syntax.
I'll leave this as is, because I can't decide wether this is an
improvement.


Thanks,
Jonathan Neuschäfer

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ