Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4272302yba; Tue, 7 May 2019 15:21:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzduKau2YMXdIjxAYU1dm2KPyRDMRxbWlsE81gMz2WUk/ibHh4jW24qUdQ74wx4uHxqGPz1 X-Received: by 2002:a63:1d4f:: with SMTP id d15mr41380320pgm.347.1557267678916; Tue, 07 May 2019 15:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557267678; cv=none; d=google.com; s=arc-20160816; b=RiYG1Y1TAkibvvkH0ADakeG4a3VW1vJq0/zXInvhxxLITbCNhBa2tWanhBubGI58ZH eo+6ynmUD2yj+auKfKBaye15tA7fjMyZMumNtyH6dyits5FZNuOdDurns22bQMJ6nYxV iNaZNaZYKJDxHKgeqFbw5NJqrTab7pXhh7nFjok9xTgFRPUumfOK2MzQn2Bp1v13W2Kz wqxEhnSzg686aDKwbQNw9YwbFd+RgZZ95BvMHBIEhlio0d8wgWSDmlc6xp3BK3aMZPTJ tSLfE13J6d6RR6Ld5GKbYgkSOdqG7G3PjUooDVlwookrjAX1DGPTsDU+Q54nUx3y/yHi IFWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HUjfyo9IQTfykk5cP53qZuYE6lGqJDNLu8EMt8QFItw=; b=xZjfjqYmaBwIfq2w/DH4wqeeuhop1AyUDP8BHJYYRyi0dtnOFvid4bbBRgAUHqn3rD zh2DOqq2BTBqUBhVjsicANPK2qUk5as9bEsMo+Sw8eUSKgK8c2kAkdt8FpcISImFJCUj ua3oJ6PZFrVg87WCnpc2sObjTVR41UnX/7axl7gm9U1x0BhXGgf1cx/4xXmyUpvOA2o6 ByUdLPWWN3c3eLFCUWU9DhhUIqX/I77/EU2CIxIWf149SmtM98LrO2vNoou+FrbMWt0g mwMiApli8Kozy6B8azfmR0XGBxhcOoxMTLu42huk3DJYuK5Hnzm1oSyNRWK9yvCY1jO9 7BjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TSXgJ56l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si21363179pge.593.2019.05.07.15.21.02; Tue, 07 May 2019 15:21:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TSXgJ56l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726335AbfEGWUI (ORCPT + 99 others); Tue, 7 May 2019 18:20:08 -0400 Received: from mail-ua1-f68.google.com ([209.85.222.68]:34233 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbfEGWUH (ORCPT ); Tue, 7 May 2019 18:20:07 -0400 Received: by mail-ua1-f68.google.com with SMTP id f9so6646815ual.1 for ; Tue, 07 May 2019 15:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HUjfyo9IQTfykk5cP53qZuYE6lGqJDNLu8EMt8QFItw=; b=TSXgJ56lkLW5XfW25fRGLAlniT3SnPiOpDt0bxqpL6M7cykHIMW9neXmDgJf6V2dqR Vupz/lhWiW/uvls/Gsv3WjxSLSGlRB+iy4ypPmFktGqIDCFQ3ud95rW7JvxCgEm3u40k hHQWi6r9pIY2HBwhsxA6Ci0Gk+aZcoCnsGYaA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HUjfyo9IQTfykk5cP53qZuYE6lGqJDNLu8EMt8QFItw=; b=neR8z49PxM6rOEfo1ltQsayIZnW05I+gboUhMPBWXyqE+68hghICkpqKY004nS/e3l D8PZMM7MQEyLqtaoG0T9BzOOyxYmLPjURv7g6G9Nb83w+/Gp56VL+OpzbE7MCQePbU7v U9Fy/CbM8KN/qpO806WJtFpld9yfqGF3IVFxL7fC6KDRcakCFl+ReHc+BFnETZgD4PGK 7U6BAxULuGdLXr05BQdmpmHSugR02wtudyAu2a91hzfLQ0WqTywgXHteV4BdvcHiHq2v V7wEyphOmyXNuP+MSMQbMAlO54ceg0K9rcux2z5TTMNrt1tb1K1odM7EhZBVZwoHxPyy 6Saw== X-Gm-Message-State: APjAAAV1oUZZPjU0XVtBZrP6PYXuEDatDKtePq5xt8u5/VDv+vDBhIp/ 8ugakW3VNHVHX30obJ3sW6P+U3D+qO0= X-Received: by 2002:ab0:3351:: with SMTP id h17mr11622872uap.123.1557267605991; Tue, 07 May 2019 15:20:05 -0700 (PDT) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com. [209.85.222.50]) by smtp.gmail.com with ESMTPSA id a184sm4586205vkb.28.2019.05.07.15.20.04 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 15:20:04 -0700 (PDT) Received: by mail-ua1-f50.google.com with SMTP id p13so6622915uaa.11 for ; Tue, 07 May 2019 15:20:04 -0700 (PDT) X-Received: by 2002:ab0:2709:: with SMTP id s9mr16511621uao.21.1557267604203; Tue, 07 May 2019 15:20:04 -0700 (PDT) MIME-Version: 1.0 References: <20190503174730.245762-1-dianders@chromium.org> <30361ae7-36a6-0858-77ec-40493ef44b98@gmail.com> In-Reply-To: <30361ae7-36a6-0858-77ec-40493ef44b98@gmail.com> From: Doug Anderson Date: Tue, 7 May 2019 15:19:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pstore/ram: Improve backward compatibility with older Chromebooks To: Frank Rowand Cc: Kees Cook , Rob Herring , Anton Vorontsov , "open list:ARM/Rockchip SoC..." , Julius Werner , Guenter Roeck , Matthias Kaehlcke , Brian Norris , Colin Cross , Tony Luck , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, May 7, 2019 at 3:17 PM Frank Rowand wrote: > > On 5/6/19 4:58 PM, Doug Anderson wrote: > > Hi, > > > > On Mon, May 6, 2019 at 2:10 PM Kees Cook wrote: > >> > >> From: Douglas Anderson > >> Date: Fri, May 3, 2019 at 10:48 AM > >> To: Kees Cook, Anton Vorontsov > >> Cc: , , > >> , , , > >> Douglas Anderson, Colin Cross, Tony Luck, > >> > >> > >>> 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 > >>> ("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 > >> > >> 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. -Doug