linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Kees Cook <keescook@chromium.org>, Rob Herring <robh@kernel.org>,
	Anton Vorontsov <anton@enomsg.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Julius Werner <jwerner@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Brian Norris <briannorris@chromium.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pstore/ram: Improve backward compatibility with older Chromebooks
Date: Tue, 7 May 2019 15:23:38 -0700	[thread overview]
Message-ID: <90974ece-ab3a-7f5a-7d71-bd8a0d1d5aec@gmail.com> (raw)
In-Reply-To: <CAD=FV=U5heONCv=W5x6cL_JAmJaeDrjMa0CnQ=UVu+DTZZBNKQ@mail.gmail.com>

Hi Doug,

On 5/7/19 3:19 PM, Doug Anderson wrote:
> Hi,
> 
> On Tue, May 7, 2019 at 3:17 PM Frank Rowand <frowand.list@gmail.com> wrote:
>>
>> On 5/6/19 4:58 PM, Doug Anderson wrote:
>>> Hi,
>>>
>>> On Mon, May 6, 2019 at 2:10 PM Kees Cook <keescook@chromium.org> wrote:
>>>>
>>>> From: Douglas Anderson <dianders@chromium.org>
>>>> Date: Fri, May 3, 2019 at 10:48 AM
>>>> To: Kees Cook, Anton Vorontsov
>>>> Cc: <linux-rockchip@lists.infradead.org>, <jwerner@chromium.org>,
>>>> <groeck@chromium.org>, <mka@chromium.org>, <briannorris@chromium.org>,
>>>> Douglas Anderson, Colin Cross, Tony Luck,
>>>> <linux-kernel@vger.kernel.org>
>>>>
>>>>> When you try to run an upstream kernel on an old ARM-based Chromebook
>>>>> you'll find that console-ramoops doesn't work.
>>>>>
>>>>> Old ARM-based Chromebooks, before <https://crrev.com/c/439792>
>>>>> ("ramoops: support upstream {console,pmsg,ftrace}-size properties")
>>>>> used to create a "ramoops" node at the top level that looked like:
>>>>>
>>>>> / {
>>>>>   ramoops {
>>>>>     compatible = "ramoops";
>>>>>     reg = <...>;
>>>>>     record-size = <...>;
>>>>>     dump-oops;
>>>>>   };
>>>>> };
>>>>>
>>>>> ...and these Chromebooks assumed that the downstream kernel would make
>>>>> console_size / pmsg_size match the record size.  The above ramoops
>>>>> node was added by the firmware so it's not easy to make any changes.
>>>>>
>>>>> Let's match the expected behavior, but only for those using the old
>>>>> backward-compatible way of working where ramoops is right under the
>>>>> root node.
>>>>>
>>>>> NOTE: if there are some out-of-tree devices that had ramoops at the
>>>>> top level, left everything but the record size as 0, and somehow
>>>>> doesn't want this behavior, we can try to add more conditions here.
>>>>>
>>>>> Signed-off-by: Douglas Anderson <dianders@chromium.org>
>>>>
>>>> I like this; thanks! Rob is this okay by you? I just want to
>>>> double-check since it's part of the DT parsing logic.
>>>>
>>>> I'll pick it up and add a Cc: stable.
>>>
>>> Hold off a second--I may need to send out a v2 but out of time for the
>>> day.  I think I need a #include file to fix errors on x86:
>>>
>>>> implicit declaration of function 'of_node_is_root' [-Werror,-Wimplicit-function-declaration
>>
>> Instead of checking "of_node_is_root(parent_node)" the patch could check
>> for parent_node not "/reserved-memory".  Then the x86 error would not
>> occur.
>>
>> The check I am suggesting is not as precise, but it should be good enough
>> for this case, correct?
> 
> Sure, there are a million different ways to slice it.  If you prefer
> that instead of adding a dummy of_node_is_root() I'm happy to do that.

Yes, I would prefer to avoid adding a dummy of_node_is_root() if the
alternative is reasonable (and if I understand, you are saying the
alternative is reasonable).

Thanks,

Frank


  reply	other threads:[~2019-05-07 22:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 17:47 [PATCH] pstore/ram: Improve backward compatibility with older Chromebooks Douglas Anderson
2019-05-03 19:06 ` Guenter Roeck
2019-05-06 21:09 ` Kees Cook
2019-05-06 21:33   ` Rob Herring
2019-05-06 23:58   ` Doug Anderson
2019-05-07  4:51     ` Doug Anderson
2019-05-07 22:17     ` Frank Rowand
2019-05-07 22:19       ` Doug Anderson
2019-05-07 22:23         ` Frank Rowand [this message]
2019-05-06 21:40 ` Brian Norris
2019-05-07 16:25   ` Doug Anderson
2019-05-07 16:48     ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90974ece-ab3a-7f5a-7d71-bd8a0d1d5aec@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=anton@enomsg.org \
    --cc=briannorris@chromium.org \
    --cc=ccross@android.com \
    --cc=dianders@chromium.org \
    --cc=groeck@chromium.org \
    --cc=jwerner@chromium.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mka@chromium.org \
    --cc=robh@kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).