Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3299569yba; Mon, 6 May 2019 21:52:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBzHOn3oo/Fjqz0Zticu5Y2yoOJP2YnP3A+vIIlKmhKbjOifnMg2AkSZDuGqGijykwoDQ4 X-Received: by 2002:aa7:810e:: with SMTP id b14mr39551526pfi.112.1557204761182; Mon, 06 May 2019 21:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557204761; cv=none; d=google.com; s=arc-20160816; b=hUWZCSmjyK88AQiwXmR+hwM7kjryzEmRvrBcI/DJR3yP19ZttV0UKlQ1YcHhk1SRMD JPNDzRiitg7XpWbdOkua2v7tImxRi6Z99eHkfoP6qRAgAts0cnT7QWE1PxyHNBrcoZuN 5a2wkxd6RDaP1oY73gcaGSNqDA9bG8kT9EDhokCFiocXFCkQZYSClA7v9GkzGsfzy8ju Xh87xSwUBI7R4ZCCExNawkT+k4ypkcwt2Q7Qo0Oj4+SHH9yVeOZdbPS8a7iAqB79IWWz G75K2/dCUvh36IJORskHN1sJ/M2q0NTc6oadltj1aKlS2SfRUZ39qCEf7T0dteSvVLUj bqVg== 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=X6LuiDNx04tqP5yfdc2qbmlwjeob10O4SM7rIq3ikqs=; b=Yknf0pRA/P3FQyLRnPJEEKw8VFgqRq7A6WM5g1adTHdzJ89qQ6O3wcj4uX92Nm1trK WEGSXPBei4KuTRFExHV2cNitD/6pGQG21M8LkMRqAPGZEQ2C9TI4dQp6KwwZeiZJcsJI gWJbJQs8S8AXUQ/MnXn+VCmxPBSzC0umvVJwK9wIYvmDzcy/nOomNK7DLceiSEBTk2Ps rj2wz2ct0dyf9l8Mm5TxIdBY7BR1Zq4Lv2QLXx5yyH6xzi7Qd7SGIUROk+M3U5o8Mf8o YRKzBrckfyzIikiP/BE4hI5SJNDIXwZ9s8v/ghB0c2F3WWiCyT1zBTf8Ag2sJqR8dOpU QmhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SRUggtVm; 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 y20si12509394pgj.578.2019.05.06.21.52.25; Mon, 06 May 2019 21:52:41 -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=SRUggtVm; 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 S1726276AbfEGEvg (ORCPT + 99 others); Tue, 7 May 2019 00:51:36 -0400 Received: from mail-vk1-f196.google.com ([209.85.221.196]:42244 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbfEGEvg (ORCPT ); Tue, 7 May 2019 00:51:36 -0400 Received: by mail-vk1-f196.google.com with SMTP id u131so3726025vke.9 for ; Mon, 06 May 2019 21:51:35 -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=X6LuiDNx04tqP5yfdc2qbmlwjeob10O4SM7rIq3ikqs=; b=SRUggtVmJcYwtmhLPmHly4X8QR3bVq2tyyxSAMdeVDE8KlSjalza9otjVaeOabJfCz WlHbVUTq2EDvuC+7v55hM1jB6lHvB2hnuUg2vGh3+JpGUxpAluBtwY8WG4kqmJIeSmqW D1/PltZ7N+0URekiaUlcAd4pAEZOOnHQOHxjI= 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=X6LuiDNx04tqP5yfdc2qbmlwjeob10O4SM7rIq3ikqs=; b=A+PLpBIgq5KdOL8FxhXF/moBbL1XKCq1JzUqezvc3VlQ4bGzI54X2/Y2L2zcnO7dOs GQYNutcNQ/iVjAoeyor3YfTz/Upe5ImsNfWVdLok8aHdqIbC1e0ualiZQhmATEZSAkIm bCQY/aVBtYAmDmYw+D8wW8bxhqE0rRSdrWcU+kvdFpRVilk/FoW67XoLvTsMYlIMFd7O jW3zfpMw9mEquaUSqe7HmuSgvjVE/yguBJ2ZSL2Wzv/Q+QNOiyq+r7i1ctZB+XHS/vMr RYialJjYYlUJy/uIPZq6XyV19kxlLKOm/lIsZ/PaBJIwRIA1kWvbtn5XFnCOBodfEegM 5wmA== X-Gm-Message-State: APjAAAW0IdeAFtnSvR6iyMnu/AEM1CQYt2h1Qs+OxSWiHTo0tlBIuUUU mxo3i5QvxZQUB27QL+W+dDLeKsutAKU= X-Received: by 2002:a1f:9ad6:: with SMTP id c205mr15428905vke.1.1557204694744; Mon, 06 May 2019 21:51:34 -0700 (PDT) Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com. [209.85.222.46]) by smtp.gmail.com with ESMTPSA id v17sm3156756vsc.18.2019.05.06.21.51.33 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 06 May 2019 21:51:33 -0700 (PDT) Received: by mail-ua1-f46.google.com with SMTP id o33so5512848uae.12 for ; Mon, 06 May 2019 21:51:33 -0700 (PDT) X-Received: by 2002:ab0:2709:: with SMTP id s9mr13716726uao.21.1557204692851; Mon, 06 May 2019 21:51:32 -0700 (PDT) MIME-Version: 1.0 References: <20190503174730.245762-1-dianders@chromium.org> In-Reply-To: From: Doug Anderson Date: Mon, 6 May 2019 21:51:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pstore/ram: Improve backward compatibility with older Chromebooks To: 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 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 Mon, May 6, 2019 at 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 > > I'm unfortunately out of time for now, but I'll post a v2 within the next day. OK, it needs this to land first: https://lore.kernel.org/lkml/20190507044801.250396-1-dianders@chromium.org/T/#u I thought it'd be OK to just send a separate patch. -Doug