Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4270121yba; Tue, 7 May 2019 15:18:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWkZCJkV2PY+2PcMxoov8egDtlb0lNonADa21keLSjQRryQLpfEo5c438XDLkGhBZmoRum X-Received: by 2002:a17:902:100c:: with SMTP id b12mr20435015pla.230.1557267536097; Tue, 07 May 2019 15:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557267536; cv=none; d=google.com; s=arc-20160816; b=GIcXhgRBYN4El+R/AP2QAyv8SU+Psf33zkTpGCShEputIXJW6x0K+U4lDlqhpw7ByG sACo0qkBUcw6l/kWcHmr/f1slDU3caZFfindUlF5dC6av6rlluGMmLvFD3jq7qEZL3h5 fsvewikMFEQgEaE30U+//1aukSBpTJxs1LfbekMuKuKJ7NNU2HPfddBBvr+alJvKCPva ot3TxxWprDN/+s9oRh4QtCBGLWVLamB/jzlbICptD+lY9N6X6+8s9W42mc5KYqHT8Yqc ef1vH6D+Fo1KPZHyyI3RXw4upVMlzWuCF+ML/e83lHMsGqhGVMCtWqXmqQxE60136FmT GOzg== 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=110XxIZf7ROUEfUSzklwiJI5L7urbcXK4X6uNMzpVGE=; b=G9B5XvEW6r0H0cmAy76u7SPuWldXK6YjAPxbJ8KJgmryaxGYsoyZNK5ATlawXJ4jOh DmWQ3+tGfmfbz7e0T2XgTkgdWZbwV4EkBq22WkOmjpSqU/BGu7U9ZWdzRRjlYzD2cPRK Fhs7MXZnXWJODHTyfJwkL7GKASDR4d7kpPvdH3DXS/KjL/sf6bY4ir0vxeU62NfsOhfM 1BLTpGYfJ31+TIu6saRLXtU6dofl5hTBG0pR0mcDVNnH43iPEDV3v9ZZzQRij9SEl1R/ 04hCD4ak/wMtYZ/WNoz6HclXzd6zqM79xS6rRFvbtlZxFFr1hubq0k5echbw4F0mvibK RK6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PjfzsWfx; 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 44si21044099plc.134.2019.05.07.15.18.40; Tue, 07 May 2019 15:18:56 -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=PjfzsWfx; 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 S1726495AbfEGWRl (ORCPT + 99 others); Tue, 7 May 2019 18:17:41 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34976 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbfEGWRl (ORCPT ); Tue, 7 May 2019 18:17:41 -0400 Received: by mail-pf1-f195.google.com with SMTP id t87so8794131pfa.2 for ; Tue, 07 May 2019 15:17:40 -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=110XxIZf7ROUEfUSzklwiJI5L7urbcXK4X6uNMzpVGE=; b=PjfzsWfxbR/DNi/xzPYZpmyRAEaAi7Goo6jksrwdZdU1hpa2OT78WNgDKfVRHO8JVu HrX7aDHflMAinidKfihXRKFJRoUQ8k7PWP7g7upZqqguFQn4QZsR2Im6kH8Dvd/hdksp QQ4hPUOXyvOI2zeiCMNMNwq5jFhoKIG3NdhzE01GG3nyHvDKopIR/GVuRNUleaoPvGyw bLgmPYzmSCYXhRqenSAWjnvSDHTZY7dhYVS5hmpqFxVIids35u12sO47XOL6frLe451t wRsM2YZxYB3Ou1PoANxyAGnFLmrKe6+kAS9RHU0GNU6t38Ggt6QYDF3skw3b85z8vN3C qfUQ== 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=110XxIZf7ROUEfUSzklwiJI5L7urbcXK4X6uNMzpVGE=; b=PGvOHbHEjA7R5Mf9fdT4nmPeINhHDm4+IdDvX6oTPfcsitkgoDAK1POJDMwyFLMeH7 /8bFee3y/hr1+KpQ394LFzD2dPdbox80q5I9o3hPu439vDte6OrW+eqblV8JcCMY9WPq WIZxK8TVfi15bjavj4RPw15kRrPpNHh5QY+qt1aAn9sv0uugXc2mm84pUzvRRaN+IHyW VRtrgWXFKjZzHhKo2Nfx1T9YBQp11jn6N5cbVeUKJi989kW2onKZsbx6ezhOsLHtCH6V ql+GRqbSDeNL4/Pph7umw5Mw8ewsZ0HVxJyt5SlFk07VdWx+tmfemPpGYrZ3UAZs5FWj e4gQ== X-Gm-Message-State: APjAAAUi1CZ6bQvwjvJioNaasHPaMBstPQiFYT69FOwv+MrEpy3K9trL dcyz/NLKiLdfmxXmlXcnPtg= X-Received: by 2002:aa7:8046:: with SMTP id y6mr45044759pfm.251.1557267460394; Tue, 07 May 2019 15:17:40 -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 132sm9044957pga.79.2019.05.07.15.17.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 15:17:39 -0700 (PDT) Subject: Re: [PATCH] pstore/ram: Improve backward compatibility with older Chromebooks To: Doug Anderson , Kees Cook Cc: 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> From: Frank Rowand Message-ID: <30361ae7-36a6-0858-77ec-40493ef44b98@gmail.com> Date: Tue, 7 May 2019 15:17: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 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? -Frank > > I'm unfortunately out of time for now, but I'll post a v2 within the next day. > > > -Doug >