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]
Date:   Tue, 19 Jul 2022 14:48:22 +0100
From:   Edward Cree <ecree.xilinx@...il.com>
To:     Pu Lehui <pulehui@...wei.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:     bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH bpf-next v2 0/5] cleanup for data casting

>> On Mon, Jul 18, 2022 at 5:59 AM Pu Lehui <pulehui@...wei.com> wrote:
>>> Previously, we found that memory address casting in libbpf
>>> was not appropriate [0]. Memory addresses are conceptually
>>> unsigned, (unsigned long) casting makes more sense. With the
>>> suggestion of Daniel, we applied this cleanup to the entire
>>> bpf, and there is no functional change.
Fwiw, pointers in C aren't necessarily unsigned; some versions of
 gcc have treated them as signed and — if no object can straddle
 the sign boundary — it's even allowed by the standard. [1]
(And at a hardware level, a memory address is just a pattern of
 bits on an address bus, which isn't arithmetic at all.)

-ed

[1]: https://yarchive.net/comp/linux/signed_pointers.html

Powered by blists - more mailing lists