Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312255
| From | Shannon Zhao <shannon.zhao@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Xen-devel] [PATCH v2 14/16] Xen: EFI: Parse DT parameters for Xen specific UEFI |
| Date | 2016-01-19 14:50 +0100 |
| Message-ID | <qSEPw-8d-27@gated-at.bofh.it> (permalink) |
| References | <qR6wx-2kF-3@gated-at.bofh.it> <qR6wy-2kF-25@gated-at.bofh.it> <qSke6-2DG-17@gated-at.bofh.it> <qSEwa-8rZ-15@gated-at.bofh.it> <qSEPw-8d-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016/1/19 21:43, Mark Rutland wrote:
> On Tue, Jan 19, 2016 at 09:19:05PM +0800, Shannon Zhao wrote:
>>
>>
>> On 2016/1/18 23:41, Stefano Stabellini wrote:
>>> CC'ing Matt Fleming
>>>
>>> On Fri, 15 Jan 2016, Shannon Zhao wrote:
>>>> From: Shannon Zhao <shannon.zhao@linaro.org>
>>>> @@ -520,15 +531,28 @@ static int __init fdt_find_uefi_params(unsigned long node, const char *uname,
>>>> int depth, void *data)
>>>> {
>>>> struct param_info *info = data;
>>>> + struct params *dt_params;
>>>> + unsigned int size;
>>>> const void *prop;
>>>> void *dest;
>>>> u64 val;
>>>> int i, len;
>>>>
>>>> - if (depth != 1 || strcmp(uname, "chosen") != 0)
>>>> - return 0;
>>>> + if (efi_enabled(EFI_PARAVIRT)) {
>>>> + if (depth != 2 || strcmp(uname, "uefi") != 0)
>>>
>>> You are already introducing this check in the previous patch when
>>> setting EFI_PARAVIRT, why do this again now? But if we need to do this
>>> check again, then, like Mark suggested, it should be done against the
>>> full path.
>>>
>> This check just wants to confirm that the current node is the "uefi"
>> node and we can parse it with xen_fdt_params now.
>
> There is no single "uefi" node as many nodes can share that name. There
> is at most a single, /hypervisor/uefi node, as that is qualified by a
> full path.
>
Sure, I will check it by full path.
> Checking the leaf node name, as above, is insufficient. For example, the
> below will be accepted:
>
> * /chosen/uefi
> * /foo/uefi
> * /not-a-hypervisor/uefi
>
> Any of these could exist in addition to a /hypervisor/uefi node, and
> could appear ealier or later in the DTB.
>
> There may be reasons to add such nodes in future, and regardless we
> should not read properties from an invalid/wrong node.
>
> Thanks,
> Mark.
>
--
Shannon
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [Xen-devel] [PATCH v2 14/16] Xen: EFI: Parse DT parameters for Xen specific UEFI Stefano Stabellini <stefano.stabellini@eu.citrix.com> - 2016-01-18 16:50 +0100
Re: [Xen-devel] [PATCH v2 14/16] Xen: EFI: Parse DT parameters for Xen specific UEFI Shannon Zhao <shannon.zhao@linaro.org> - 2016-01-19 14:30 +0100
Re: [Xen-devel] [PATCH v2 14/16] Xen: EFI: Parse DT parameters for Xen specific UEFI Mark Rutland <mark.rutland@arm.com> - 2016-01-19 14:50 +0100
Re: [Xen-devel] [PATCH v2 14/16] Xen: EFI: Parse DT parameters for Xen specific UEFI Shannon Zhao <shannon.zhao@linaro.org> - 2016-01-19 14:50 +0100
csiph-web