Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp467090imd; Fri, 26 Oct 2018 11:19:18 -0700 (PDT) X-Google-Smtp-Source: AJdET5fezlxLSxLZpMkCToUg9dm+a10vEcdhCegSqRljXjpLWESYmV/dAYBY6fHm31vh/DkLsvRD X-Received: by 2002:a63:41c2:: with SMTP id o185-v6mr4449815pga.11.1540577958351; Fri, 26 Oct 2018 11:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540577958; cv=none; d=google.com; s=arc-20160816; b=Roke7C4/rU2YBwvSv8YkIgagMvaX/OFYfoAZYryz7UPE2Vwa3+rSC+L3ms3MDdY4Wn 42kGd7AhMkV7bSzDBc8C/kDsWOoFUOHrjsINvYo+6gxWixnALZJCqxeLp3ILC57/aSZ8 P64p+x8iGwQNzwnX9Lo9A4qiCsnIHXtwLTynAlWOGSYEjZaGRPpb7L8TyroHVOVN/zX4 jedHjf4Ukfg8WU3jL8VZ2gMiN+RdQHlc9RVdPrvjuFcVg0aj5HL0w9n7FExHiZney7c2 lp4+WYdj54dVgVKNHoRL6v4xLabBt4FozZVGKajRCdW2EyiIJjH5DX4TH2M1rY5aJAWE RJkQ== 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 :references:in-reply-to:mime-version:dkim-signature; bh=yf7DqgBDjc5eKjcfXpp44fPgr0t6IX2VVgWR7XrQPzk=; b=ZGn2lKdNwU10QWdAqTEafOXlMBr40tFHazMnQwHO1/2xjQud/qtI1QE7RyzQe0A6sY zQ0HzsjKhE+nrDASxE5dGBQE7rEirAwi0zZrHt+Zs0O5OcLNh2wmSi4MWlHj0F/aeMxR aD1ScejbklDudftfe57vpnxxHMl9pEX1byJEP12Llpa/QRcmXNXoCGZjfpT6hjQus5Ja mb1wLSwry6O0hqkh8op1wFzIcQ02/t2rb+LWzFJ5AwwjDYodZSSaqBWndk/jL+LbF0XK pHltQ4QSnkqLcbwyBttQpVxlJ7WegXUBvzWo7ydYU5bxUH4T4rS2jm9CABqwoDSNFono JYMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aar8VF0m; 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 s12-v6si11119708plr.307.2018.10.26.11.19.01; Fri, 26 Oct 2018 11:19: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=aar8VF0m; 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 S1727954AbeJ0Cyg (ORCPT + 99 others); Fri, 26 Oct 2018 22:54:36 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:43382 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727595AbeJ0Cyf (ORCPT ); Fri, 26 Oct 2018 22:54:35 -0400 Received: by mail-yw1-f68.google.com with SMTP id j75-v6so817456ywj.10 for ; Fri, 26 Oct 2018 11:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yf7DqgBDjc5eKjcfXpp44fPgr0t6IX2VVgWR7XrQPzk=; b=aar8VF0mXWazgpilcLVzVswKwj7nXcoSl1bUCJTrM4RxDiG5x2XbW+xeQ9BDfquCt/ RDs9pPklzfhJJZZM/WXXJT7JAu1pePaylvbhJ3Hm+asXcOn3gGgnhLYVaDzhkeOog+15 0/ZzyRIYl4BV8Nw+Oz2djLbGrYVk63v2Y0d64= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yf7DqgBDjc5eKjcfXpp44fPgr0t6IX2VVgWR7XrQPzk=; b=Xuk0lrpx5Z+a1KqJXb4a1VB1/UP4E+sRTWdQq5fwNR5ERE/hPUWQ6pxgzI4HpVap2C PrJ6C1vl06+kdX0+S+0W+TMnTBj+DGPCNBNe3XBzFnzE9B3rq3pbHJrf9BDGbDE4VcPS C0wPVbeuo5ty+M8v3zdEjQ+hdZDgSuYFnmQVXiHM1jGRpD8RUx7hsj3W+C5TCNO7U6PR z0vmUfmS3xWFXgk5o6/eXDp3W8MeZsj2wIAblG0XaRVOFgUX1qsqLGco/UiKKmZwFrdq 7RdOLXXo2y15J3oc4gsRTAWls76gMugMFvwUEqcEC6qncJA3ogcDndLUgi22AxiKrhrr mieg== X-Gm-Message-State: AGRZ1gJsYet5WaVHSR3M3u59bagwwbyJ5Hz7ZZL+DH4sJJ3UJ31hZ9ne X2sfYGEtX1WRETqiKOJHntGE4BqAFc5JWQ== X-Received: by 2002:a0d:fa47:: with SMTP id k68-v6mr2573725ywf.468.1540577792402; Fri, 26 Oct 2018 11:16:32 -0700 (PDT) Received: from mail-yw1-f51.google.com (mail-yw1-f51.google.com. [209.85.161.51]) by smtp.gmail.com with ESMTPSA id g5-v6sm521794ywa.39.2018.10.26.11.16.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 11:16:31 -0700 (PDT) Received: by mail-yw1-f51.google.com with SMTP id v199-v6so830586ywg.1 for ; Fri, 26 Oct 2018 11:16:30 -0700 (PDT) X-Received: by 2002:a81:2953:: with SMTP id p80-v6mr4731276ywp.407.1540577790204; Fri, 26 Oct 2018 11:16:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3990:0:0:0:0:0 with HTTP; Fri, 26 Oct 2018 11:16:28 -0700 (PDT) In-Reply-To: <20181026180042.52199-6-joel@joelfernandes.org> References: <20181026180042.52199-1-joel@joelfernandes.org> <20181026180042.52199-6-joel@joelfernandes.org> From: Kees Cook Date: Fri, 26 Oct 2018 19:16:28 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 6/6] Revert "pstore/ram_core: Do not reset restored zone's position and size" To: "Joel Fernandes (Google)" Cc: LKML , kernel-team@android.com, Anton Vorontsov , Colin Cross , Tony Luck 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 On Fri, Oct 26, 2018 at 7:00 PM, Joel Fernandes (Google) wrote: > This reverts commit 25b63da64708212985c06c7f8b089d356efdd9cf. > > Due to the commit which is being reverted here, it is not possible to > know if pstore's messages were from a previous boot, or from very old > boots. This creates an awkard situation where its unclear if crash or > other logs are from the previous boot or from very old boots. Also > typically we dump the pstore buffers after one reboot and are interested > in only the previous boot's crash so let us reset the buffer after we > save them. > > Lastly, if we don't zap them, then I think it is possible that part of > the buffer will be from this boot and the other parts will be from > previous boots. So this revert fixes all of this by calling > persistent_ram_zap always. I like the other patches (comments coming), but not this one: it's very intentional to keep all crashes around until they're explicitly unlinked from the pstore filesystem from userspace. Especially true for catching chains of kernel crashes, or a failed log collection, etc. Surviving multiple reboots is the expected behavior on Chrome OS too. -- Kees Cook