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:   Thu, 22 Dec 2016 14:57:07 -0600
From:   Rob Herring <robh+dt@...nel.org>
To:     Serge Semin <fancer.lancer@...il.com>
Cc:     Ralf Baechle <ralf@...ux-mips.org>,
        Paul Burton <paul.burton@...tec.com>, rabinv@...s.com,
        matt.redfearn@...tec.com, James Hogan <james.hogan@...tec.com>,
        Alexander Sverdlin <alexander.sverdlin@...ia.com>,
        Frank Rowand <frowand.list@...il.com>,
        Sergey.Semin@...latforms.ru,
        Linux-MIPS <linux-mips@...ux-mips.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/21] MIPS memblock: Unpin dts memblock sanity check method

On Sun, Dec 18, 2016 at 8:07 PM, Serge Semin <fancer.lancer@...il.com> wrote:
> It's necessary to check whether retrieved from dts memory regions
> fits to page alignment and limits restrictions. Sometimes it is
> necessary to perform the same checks, but ito add the memory regions

s/ito/to/

> into a different subsystem. MIPS is going to be that case.
>
> Signed-off-by: Serge Semin <fancer.lancer@...il.com>
> ---
>  drivers/of/fdt.c       | 47 +++++++++++++++++++++++---------
>  include/linux/of_fdt.h |  1 +
>  2 files changed, 35 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 1f98156..1ee958f 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -983,44 +983,65 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
>  #define MAX_MEMBLOCK_ADDR      ((phys_addr_t)~0)
>  #endif
>
> -void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
> +int __init sanity_check_dt_memory(phys_addr_t *out_base,
> +                                 phys_addr_t *out_size)

As kbuild robot found, you don't want to use phys_addr_t here.
phys_addr_t varies with kernel config such as LPAE on ARM and the DT
does not.

>  {
> +       phys_addr_t base = *out_base, size = *out_size;
>         const u64 phys_offset = MIN_MEMBLOCK_ADDR;
>
>         if (!PAGE_ALIGNED(base)) {
>                 if (size < PAGE_SIZE - (base & ~PAGE_MASK)) {
> -                       pr_warn("Ignoring memory block 0x%llx - 0x%llx\n",
> +                       pr_err("Memblock 0x%llx - 0x%llx isn't page aligned\n",

These are not errors. The page alignment is an OS restriction. h/w
(which the DT describes) generally has little concept of page size
outside the MMUs.

Too many unrelated changes in this patch. Add the error return only
and make anything else a separate patch (though I would just drop
everything else).

I've not looked at the rest of the series, but why can't MIPS migrate
to using memblock directly and using the default DT functions using
memblock?

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ