Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453211

Re: [PATCH] arm64: fix address fault during mapping fdt region

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm64: fix address fault during mapping fdt region
Date 2016-08-01 15:40 +0200
Message-ID <s1lBL-6Wv-7@gated-at.bofh.it> (permalink)
References <s1i1c-4yM-25@gated-at.bofh.it> <s1iaS-4Cd-33@gated-at.bofh.it> <s1jgB-5wi-13@gated-at.bofh.it> <s1jzX-5Fk-9@gated-at.bofh.it> <s1lip-6Ns-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 01, 2016 at 09:17:09PM +0800, zijun_hu wrote:
> On 08/01/2016 07:24 PM, Mark Rutland wrote:
> > On Mon, Aug 01, 2016 at 06:59:50PM +0800, zijun_hu wrote:
> >> 2,it is more portable; we only need to call fdt_check_header() and don't
> >> care about fdt header filed layout; moreover,fdt module is another independent
> >> module and arm64 only uses it and should not depend on more details of fdt
> >> such as size and magic fields locate within the first MIN_FDT_ALIGN bytes;
> >> the decision whether a fdt header is corrupted should be left to fdt team
> > 
> > While it's true that we assume knowledge of the FDT format, and ideally
> > we'd leave this to common code, we do so regardless by requiring the
> > header size. So both approaches assume details regarding the FDT format.
> > 
> okay, the only thing my solution is depends on is the fdt header struct name
> which maybe remain unchanged in further fdt source modification
> regardless of fields layout or position or header size;
> 
> by the way, my solution only maps more one SWAPPER_BLOCK_SIZE at extreme condition
> (offset + sizeof(struct fdt_header)) > SWAPPER_BLOCK_SIZE, it can occurs very rarely,
> even it happens, it is no matter due to the fast mapping operations
> 
> That all said, ard.biesheuvel's can resolves address fault too, you can decide which
> solution to used, maybe ask fdt team for some advisements

As a member of the "fdt team" (at least for bindings and the spec), I'm
happy with Ard's patch. ;)

Regardless, many thanks for the report, and the proposed fix!

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] arm64: fix address fault during mapping fdt region zijun_hu <zijun_hu@zoho.com> - 2016-08-01 11:50 +0200
  Re: [PATCH] arm64: fix address fault during mapping fdt region Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-08-01 12:00 +0200
    Re: [PATCH] arm64: fix address fault during mapping fdt region zijun_hu <zijun_hu@zoho.com> - 2016-08-01 13:10 +0200
      Re: [PATCH] arm64: fix address fault during mapping fdt region Mark Rutland <mark.rutland@arm.com> - 2016-08-01 13:30 +0200
        Re: [PATCH] arm64: fix address fault during mapping fdt region zijun_hu <zijun_hu@zoho.com> - 2016-08-01 15:20 +0200
          Re: [PATCH] arm64: fix address fault during mapping fdt region Mark Rutland <mark.rutland@arm.com> - 2016-08-01 15:40 +0200
    Re: [PATCH] arm64: fix address fault during mapping fdt region Mark Rutland <mark.rutland@arm.com> - 2016-08-01 13:20 +0200
  Re: [PATCH] arm64: fix address fault during mapping fdt region Greg KH <gregkh@linuxfoundation.org> - 2016-08-01 14:30 +0200

csiph-web