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]
Date:   Fri, 10 Jan 2020 07:50:56 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Niu Xilei <niu_xilei@....com>
Cc:     davem@...emloft.net, tglx@...utronix.de, fw@...len.de,
        peterz@...radead.org, pabeni@...hat.com, anshuman.khandual@....com,
        linyunsheng@...wei.com, bigeasy@...utronix.de,
        jonathan.lemon@...il.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH]     pktgen: create packet use  IPv6 source address
 between src6_min and src6_max.

On Fri, 10 Jan 2020 18:28:42 +0800
Niu Xilei <niu_xilei@....com> wrote:

> +/* Kernel not implement __int128's divide and modulo operator. Implement these
> + * operation use shift-subtract division algorithm  adpater from
> + * https://chromium.googlesource.com/chromium/src/third_party/+/master/abseil-cpp/absl/numeric/int128.cc */

Some rewording of this comment is necessary to fix the English grammar.
And Linux style is not to put comment closing on same line.

Something like:

/* The Linux kernel does not implement 128 bit divide and modulus operations.
 * Implement these operations using shift-subtract division algorithm
 * from Chrome.
 * https://chromium.googlesource.com/chromium/src/third_party/+/master/abseil-cpp/absl/numeric/int128.cc
 */

Also, the int128 code you referenced is Apache licensed (not GPL-v2 like kernel).

For div128_u128 the function should be static to avoid name conflicts.

The declarations need to be in reverse christmas tree order as well.

It does seem a bit like overkill since doing source address over a 64 bit
range should be more than enough for any test in this decade.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ