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: <CAL_JsqK6UJxvGt3_y5T+VMxpr7G=PCmQ_Nx0QW-EfeTHOCDMKQ@mail.gmail.com>
Date:	Tue, 27 Oct 2015 15:46:45 -0500
From:	Rob Herring <robh@...nel.org>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
	Frank Rowand <frowand.list@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>,
	Ley Foon Tan <lftan@...era.com>
Subject: Re: [PATCH] of/fdt: fix error checking for earlycon address

On Fri, Oct 23, 2015 at 8:15 AM, Peter Hurley <peter@...leysoftware.com> wrote:
> Hi Masahiro,
>
> On 10/23/2015 07:47 AM, Masahiro Yamada wrote:
>> fdt_translate_address() returns OF_BAD_ADDR on error.  It is defined as
>> a u64 value, so the variable "addr" should be defined as u64 as well.
>
> Good catch.
>
> I would prefer if fdt_translate_address() returned resource_size_t (which
> is the proper type for handling addresses as integers) and that type
> was propagated through early_init_dt_scan_chosen_serial => of_setup_earlycon.

That can be problematic in the DT code. The size of resource_size_t
can vary on 32-bit as it is based on phys_addr_t which in turn is
based on CONFIG_LPAE setting. However, the address sizes in DT are
fixed and may be 64-bit. So we stick with u64 in the DT code.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ