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  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:   Thu, 23 Sep 2021 22:45:49 +0300
From:   Mike Rapoport <>
To:     Linus Torvalds <>
Cc:     Mike Rapoport <>,
        Andrew Morton <>,
        devicetree <>,
        iommu <>,
        kasan-dev <>,
        KVM list <>,
        alpha <>,
        Linux ARM <>,
        linux-efi <>,
        Linux Kernel Mailing List <>,
        "open list:BROADCOM NVRAM DRIVER" <>,
        Linux-MM <>,
        linux-riscv <>,
        linux-s390 <>,
        Linux-sh list <>,
        "open list:SYNOPSYS ARC ARCHITECTURE" 
        linux-um <>,,
        linuxppc-dev <>,
        linux-sparc <>,
Subject: Re: [PATCH 0/3] memblock: cleanup memblock_free interface

Hi Linus,

On Thu, Sep 23, 2021 at 09:01:46AM -0700, Linus Torvalds wrote:
> On Thu, Sep 23, 2021 at 12:43 AM Mike Rapoport <> wrote:
> >
> You need to be a LOT more careful.
> From a trivial check - exactly because I looked at doing it with a
> script, and decided it's not so easy - I found cases like this:
> -               memblock_free(__pa(paca_ptrs) + new_ptrs_size,
> +               memblock_free(paca_ptrs + new_ptrs_size,
> which is COMPLETELY wrong.

I did use a coccinelle script that's slightly more robust that a sed you've
sent, but then I did a manual review, hence the two small patches with
fixes. Indeed I missed this one, so to be on the safe side I'll rename only
the obvious cases where coccinelle can be used reliably and leave all the
rest as it's now. If somebody cares enough they can update it later.
> And no, making the scripting just replace '__pa(x)' with '(void *)(x)'

These were actually manual and they are required for variables that
used as virtual addresses but have unsigned long type, like e.g.
initrd_start. So it's either __pa(x) or (void *).

Sincerely yours,

Powered by blists - more mailing lists