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: <CAGM2reZ1RWcUT67cTGcyB6UzUftyMyG7GTfp=XjNo5CN2=c_bg@mail.gmail.com>
Date:   Tue, 3 Jul 2018 13:22:52 -0400
From:   Pavel Tatashin <pasha.tatashin@...cle.com>
To:     rppt@...ux.vnet.ibm.com
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>, mhocko@...nel.org,
        willy@...radead.org
Subject: Re: [PATCH] mm/memblock: replace u64 with phys_addr_t where appropriate

On Tue, Jul 3, 2018 at 1:05 PM Mike Rapoport <rppt@...ux.vnet.ibm.com> wrote:
>
> Most functions in memblock already use phys_addr_t to represent a physical
> address with __memblock_free_late() being an exception.
>
> This patch replaces u64 with phys_addr_t in __memblock_free_late() and
> switches several format strings from %llx to %pa to avoid casting from
> phys_addr_t to u64.
>
> CC: Michal Hocko <mhocko@...nel.org>
> CC: Matthew Wilcox <willy@...radead.org>
> Signed-off-by: Mike Rapoport <rppt@...ux.vnet.ibm.com>

Looks good.

Reviewed-by: Pavel Tatashin <pasha.tatashin@...cle.com>

One minor thing that I would like to change in memblock.c is the
useage phys_addr_t for size. I understand the reasoning behind this
choice, but could we do something like:

typedef phys_addr_t phys_size_t;
It would be similar to resource_size_t. I just think the code and
function prototypes would look better with proper typing.

Thank you,
Pavel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ