Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4275304yba; Tue, 7 May 2019 15:24:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAq8Hfyq4f2JN6ei6Ci5puFTGQZ9rJ7nRbTy6x57hJxx52MBTGAfaKnfivYuBLnQaRhj2p X-Received: by 2002:aa7:8383:: with SMTP id u3mr43656779pfm.245.1557267885855; Tue, 07 May 2019 15:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557267885; cv=none; d=google.com; s=arc-20160816; b=b0pRy30c02e6N5MsCWRBFirnFsv4rB4s5HNGP4vnDKu7yEe/yT1dPvjDFyoVxcrfZV OSCWwrOTV0brWgqB3jmcp2GKbt1SIKfU/oLS6LOKGIIKROwZNQog3+5GtTqXmfkKl//4 /gaM2iKoYVI2cE/Qs2hppZ67N7cqLVHAls2l5HjCHkkoPrLqVGvGHlLLcSOSxMVcM3H0 kFCu5E1c29mg/0A3Wa0Qn7Y3DKfJ8WtCMDYYyOddnCnaPT/RLcadmJQvm2Uv7RrJ+2OU 1LFv0q6H5JZWAYiBrdaXD38is8P0ojlRSSVDv2U8GqcVFG1NpODCF9QmJB99kQhPbMN4 Tn8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=JOHw2h4WyfdeqecBWC0/iiXTy8donTOhcpgp2J9sTnQ=; b=bzb0HJQghUKeFENWW//tbPfr4mQIMdfFA0bsAdZMot1YzE5RHCBronKwI8X+50kw9z 0gyOSVf48QPa9nvvhZhXz0zFoxYHSq5dYDrRNTplzfmaQQ/PpxsTi4W1RSDJ9VLyDiPp +h7gCce85++462IDVdn9/mritzNkp9yHbk8FWFHg5Cxl287Xv6S/KpQ1cOXOnOaq7FpZ llm8AIwvN0nr+oku+nbgpOmqLGhZRQh/h5hGFBxP1Y+kjSZhqw7WHFXkk/smz+DtkRCq bbKNZidv49emwFEIx2JkiJ4/NvTOaYCkoPNXBKspu2p5OfKbJbxWZSprdTR6w2RlxfON rCqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vSvIk4Ed; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si8559944pfd.79.2019.05.07.15.24.29; Tue, 07 May 2019 15:24:45 -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=@gmail.com header.s=20161025 header.b=vSvIk4Ed; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbfEGWXk (ORCPT + 99 others); Tue, 7 May 2019 18:23:40 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:41451 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfEGWXk (ORCPT ); Tue, 7 May 2019 18:23:40 -0400 Received: by mail-pl1-f195.google.com with SMTP id d9so8861494pls.8 for ; Tue, 07 May 2019 15:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JOHw2h4WyfdeqecBWC0/iiXTy8donTOhcpgp2J9sTnQ=; b=vSvIk4EdOijXKIbUmWx0TMPDlflej3piFu8e+Jx6PFhJP7+snSHmhTywYinYiI1BOa 46i1Qpw6NrvT603v7l2UA+0fKGbMpBLXH4jcipDVxzGQkwzZzjbW/hibxcFkQqZa4TIm 7aZyDt3A0UHKtygqFBRth3vQnGlxrE/kGvIYkEJ0PErZ4v7yZY1XXP3fU4UEOca2TauH v0AY2uwG8dXuefNsp6Pp47la9Hz55w8SmlX56BoQkiua+M2L62Vg4uvHYpTHCdKdpbLX Wjwy+NO3QfMblucBDT+6U1tCIekfLOI7Lz0ljDtivyeMYvE9uBLtk5fpKU+MWzgCOMOb rQsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JOHw2h4WyfdeqecBWC0/iiXTy8donTOhcpgp2J9sTnQ=; b=KU0G5TZhGnkJDggZVMmrguBx/eVnTy1hTDZLM+YbZ4uwUYHOV4YcSEY8oehhUrnthm oekuxsABG+u12noQisXNVxmzacOanmBifqVOmnqU1FZehViEhxjPg/viGxQNOv1485df rhWudObmqpYRSJl9TBQjNk68EZGbb6rh1WMcU8KY/4kDEHCRyhIX1OUv24k8KKaV+fdQ b+u9NalncxyQWIPquWjZE5uZzeionDDP9k1g4+H9eeYqddEVbe3mANBglKP/aqt75VLf 81gnRwRZ7YKN1+/s3Ul+gMgW+W4o4Aflp0wSnd2ToHEyYY6Vd1VCPsVJkGg1WMyoC7Ey IgYQ== X-Gm-Message-State: APjAAAWNCbFdYHrurizKFQu2AaSFEtP7fi6q9yWBrOwhwVRdcTyuBqQq 74QNM1ToMlEEJ0eP7tBuylU= X-Received: by 2002:a17:902:b614:: with SMTP id b20mr6128707pls.200.1557267819675; Tue, 07 May 2019 15:23:39 -0700 (PDT) Received: from [192.168.1.70] (c-24-6-192-50.hsd1.ca.comcast.net. [24.6.192.50]) by smtp.gmail.com with ESMTPSA id i1sm703349pgj.70.2019.05.07.15.23.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 15:23:39 -0700 (PDT) Subject: Re: [PATCH] pstore/ram: Improve backward compatibility with older Chromebooks To: Doug Anderson 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 References: <20190503174730.245762-1-dianders@chromium.org> <30361ae7-36a6-0858-77ec-40493ef44b98@gmail.com> From: Frank Rowand Message-ID: <90974ece-ab3a-7f5a-7d71-bd8a0d1d5aec@gmail.com> Date: Tue, 7 May 2019 15:23:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Doug, On 5/7/19 3:19 PM, Doug Anderson wrote: > 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. 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