Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp448352imd; Fri, 26 Oct 2018 11:01:44 -0700 (PDT) X-Google-Smtp-Source: AJdET5fXfmcKE56DgdzK9bz/iICM9VUZ1x99cj9Y/DWVLetOpFxZUIgKHLMOiktP9FbS6S/ioVOX X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr4494249plk.64.1540576904396; Fri, 26 Oct 2018 11:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540576904; cv=none; d=google.com; s=arc-20160816; b=RxP1wL6AAE04Dvk4qpVgd4NfiBR5DVG8EsTwrQC5qBf/D3K9KVArWcZG8NB0hkANLe sjrOFC11hh+GvgoQU/837GBhOTzq+H2cQZOYy0Jr/mN6a/sw/YUDu4Bp33ty/3oMPI6o x3CiJFRuMHf4UYBREpK/pJsjt2jyRbc/IMXZUxWUz3DPEe1JgQD/cUIAo2c0/OMT3sVP YmPl1g3duAe7sF2atAnhHGKOda/E99ByN3Cy5SdDyAb1mQDzLUAMx91uSZaxbHc3XyFS XB6X3PrssD0uSTYSZdvLtJx0YHVfSCRE72guGrcAmEtqYbNLig2Q4KS4Da+4+Ab/ucrK vk7Q== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lqM+s1uaAengxOHgYO4et7nZ7c51ospkJSWuhz4cWTA=; b=Y93cpFIcJzNXQHgjvVlCkme5JI6y1xZ5uw48bitrcIxD7CM5q9MsBdm0BBfJHJ+TH0 25ofCscBqFFx/morvs76zRc73to+90haBTitXPo6giGstkifGayajT7ZyBWY6/OF4cGN gHnl/z6I2bVmet8LKsS9FJeKA5P1TecV5+ZCKtifPu8f9l4CIdk1g9/9hIAJ6uMRAuvi D29Dj0InUr1kmBvxawaUx+kp+LlHsgyuE+3yFBrv2s7qzlCyUyTyc+jwpRNQKfT0XKd7 FCjpCx3AJKIwootFfteuCtLQG+tMYJ4SoyDhUslEAI9KH6+PVfzvhZS9E/hZklXpW05P MSbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=VWYC4dAo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8-v6si11909820pls.13.2018.10.26.11.01.29; Fri, 26 Oct 2018 11:01:44 -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=@joelfernandes.org header.s=google header.b=VWYC4dAo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbeJ0Ci6 (ORCPT + 99 others); Fri, 26 Oct 2018 22:38:58 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40043 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727450AbeJ0Ci6 (ORCPT ); Fri, 26 Oct 2018 22:38:58 -0400 Received: by mail-pl1-f195.google.com with SMTP id b9-v6so850229pls.7 for ; Fri, 26 Oct 2018 11:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lqM+s1uaAengxOHgYO4et7nZ7c51ospkJSWuhz4cWTA=; b=VWYC4dAo/W9SAnb6iGTRhAWPGoxa29EHquegrpVnUmqhjCU9wpcdhRUJzs2WCusre8 GYOfXA6FAA2eWw3JIKlMm50mLHoJ+SPUEzlnjZ0LS8sIrR27Gi9tKCqbLuw6WCg1q9yc AzwS/Ir7AXgeU0GJoIxb+ZPRiW/65Rkp6pt3g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lqM+s1uaAengxOHgYO4et7nZ7c51ospkJSWuhz4cWTA=; b=B6Fg6rukjhf7UV5t7q0bSleFs9LtosxnFBp9ksI3XwFaOu/teSS5of9VC7l9qKtCNT ZjAFK5EK8uEriaHsEk8sG/rjPNHz8N+zk9EIJwMyxtBWFlvoi6bAWORH3d84Tq15+uLq Pg9gBKva/VzVvWzkzYhJH5uyeIMN6+3rAE5PCinl+5ZMCgWqDtNwDVADWsqDtUDllTSj 7Ldgx48oZGdiR5AuyV18HMMIRpIOECuLk78kmABjbtooDQVgPgC+B35QTYfFLM66Qh/F yo04Yi0188n2p4XiNKocLuSWx5r13YIMX8/91CAPEJKeTtGWowyU9q+ppNrkdf+tYPeL +rNQ== X-Gm-Message-State: AGRZ1gJpXXzrXNyW5WpVa3lIsUgS5DCy9OleTjqqf5QjTvihzAoCrONb hiX7Y15dQTlFQp/b9ZZpBeb7dm7RQ1E= X-Received: by 2002:a17:902:9a44:: with SMTP id x4-v6mr4413506plv.121.1540576858926; Fri, 26 Oct 2018 11:00:58 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1601:3aef:314f:b9ea:889f]) by smtp.gmail.com with ESMTPSA id v5-v6sm17521243pfd.64.2018.10.26.11.00.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 11:00:57 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, "Joel Fernandes (Google)" , Anton Vorontsov , Colin Cross , Kees Cook , Tony Luck Subject: [RFC 6/6] Revert "pstore/ram_core: Do not reset restored zone's position and size" Date: Fri, 26 Oct 2018 11:00:42 -0700 Message-Id: <20181026180042.52199-6-joel@joelfernandes.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181026180042.52199-1-joel@joelfernandes.org> References: <20181026180042.52199-1-joel@joelfernandes.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Joel Fernandes (Google) --- fs/pstore/ram_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 1299aa3ea734..67d74dd97da1 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -504,7 +504,6 @@ static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig, pr_debug("found existing buffer, size %zu, start %zu\n", buffer_size(prz), buffer_start(prz)); persistent_ram_save_old(prz); - return 0; } } else { pr_debug("no valid data in buffer (sig = 0x%08x)\n", -- 2.19.1.568.g152ad8e336-goog