Re: [PATCH 2/2] MIPS: store the appended dtb address in a variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

On 17 June 2016 at 18:56, Daniel Gimpelevich
<daniel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 2016-06-17 at 14:07 +0200, Jonas Gorski wrote:
>> +++ b/arch/mips/pic32/pic32mzda/init.c
>> @@ -33,8 +33,8 @@ static ulong get_fdtaddr(void)
>>  {
>>         ulong ftaddr = 0;
>>
>> -       if ((fw_arg0 == -2) && fw_arg1 && !fw_arg2 && !fw_arg3)
>> -               return (ulong)fw_arg1;
>> +       if (fw_passed_dtb && !fw_arg2 && !fw_arg3)
>> +               return (ulong)fw_passed_dtb;
>
> This part potentially violates the UHI spec. If fw_passed_dtb is valid
> but fw_arg0 > 0, fw_arg2 may still be a valid envp. Comparing otherwise
> undefined values to zero is also incorrect.

That was true before and is still true after my changes, so nothing
added by me. This would be something for the pic32 maintainers (or
users) to comment on/fix.


Jonas




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux