Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp470528imd; Fri, 26 Oct 2018 11:22:59 -0700 (PDT) X-Google-Smtp-Source: AJdET5elE2H8QxTGaGH2O9HMoIIs1eFcTrsMf/0prEHLmjXR1hdprDsSLXu5UHNJfYoSUgpZ3n6k X-Received: by 2002:a63:36c8:: with SMTP id d191-v6mr4423675pga.404.1540578179118; Fri, 26 Oct 2018 11:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540578179; cv=none; d=google.com; s=arc-20160816; b=0V0Qhv9oavRMKfWRe+ODShctfgol4UyCJ/Ztta07y1dQoS2vAzPA9OPtwezoHGq0us 5txhhX61Z0ex0DXCdcQU1HfvH+cmdu9nq50mR0tLT55hzyn5Wf+R7HOqCD1k/LigwYeC 6wnbldv9KxeFOfyPWY2oCZf/vEn9pXeSgMGiYB6W1fjb9y69wVrcWYw9ziOszbFYfVMC 03l+nc7O/a0qf4fuTTWa43efM+N8rYt16VNREFWHbAZPp+xKtgbzPobxLBcBmSTPRKEL 40DmGYkGIyWhDmb+vD3jYNzC5ODQIYFhRb89HET1S+JwcZ/MF1Oifmojkfa/XepOqqKh A3Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dPkVkEIpK+5pbXWFCO64RlYk5FcCpaa9dN09DMSorR4=; b=rAoXduFR9d+UIun5ZkHIoLgx6PY8AR3VmxnUDoaZWnxB703zVe+sLFnnlb2+kGstP4 Zf2H/ebOEm2vbw85VilueSyWjlhlpOzlMyz2Sngugizc8hu0WhZhVu3q3OGzeMwptHJu IfJjHOA61Q3NBZIv760jgyXf64WOQonbTg7Mvk89h9RszUtca4evHWoELaRpjqQRBwZt NXsHZ6AKGjtVtZSUcBrGLftHwZMfI/2Nps5UUodUJ5hXDJjdjB8wyCR0Tr4izcS1bO9a SQ2SyEbo7qwDfvCCs/qeHCKyIl2RMKfpLlyFvMgxuBze0YuzrOn1JiofzQd8Qius6j/Y Mw8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=iI2f9sfv; 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 w20-v6si11205893pll.89.2018.10.26.11.22.42; Fri, 26 Oct 2018 11:22:59 -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=iI2f9sfv; 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 S1727848AbeJ0DAZ (ORCPT + 99 others); Fri, 26 Oct 2018 23:00:25 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40567 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727741AbeJ0DAY (ORCPT ); Fri, 26 Oct 2018 23:00:24 -0400 Received: by mail-pf1-f194.google.com with SMTP id g21-v6so940323pfi.7 for ; Fri, 26 Oct 2018 11:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dPkVkEIpK+5pbXWFCO64RlYk5FcCpaa9dN09DMSorR4=; b=iI2f9sfv+dB6oBmEdmfCJ5tk8ChIcyXiwBbFlb4+IVao6zmXUXaw0iZ0kYMHjnZnmW 7p301FDTnC0Nrj4tVci27oLwmRuyXkZHi9u8X7orMyIr8lz/QQs/sv9Tw+w5HCCEqwvW di7X3qNTenVYJWbpI0B0uYVjaok6/eU0+GxyE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dPkVkEIpK+5pbXWFCO64RlYk5FcCpaa9dN09DMSorR4=; b=thg/Oll1hjuJQaaIgGSrjav1Ivp5imPXuRPpnyhjIw3lBhmPWUgEV105AcZoClslkl PFLld8DxdPG0A9Q232L23KRVhoyBiF3+voyyvU7KkBAjKE5WdEh5iCFr/yAwJLb/S+kA 612ZJbVeA7iXhp+eLrnbeC/xLlA/xAsNYHUmM6IWSihFovRXHVow89+CAPEV/EkKifVz llZcBMMnS0XeTWRB5EE9fGLLOl75M/6mcqNya9o7ghrCR0+EIWwGR5CYvNFzjaLWwTeD H2ZtzV3Xh+K1jYoMAmKtLaTzDxJpScu3h2QSWsoMdWPvgbN2B11tG6vkCWbmMAZaLn4p DTnw== X-Gm-Message-State: AGRZ1gKTUqnFD18ScvZO4b+8kJBjeVA91YfAqHJf3kRX60UuDXDCFXBW reiCkmBNwOK22k6czMsGOvr9sg/+hig= X-Received: by 2002:a63:1444:: with SMTP id 4mr4278247pgu.430.1540578140697; Fri, 26 Oct 2018 11:22:20 -0700 (PDT) Received: from localhost ([2620:0:1000:1601:3aef:314f:b9ea:889f]) by smtp.gmail.com with ESMTPSA id p64-v6sm9899373pfi.22.2018.10.26.11.22.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 11:22:19 -0700 (PDT) Date: Fri, 26 Oct 2018 11:22:18 -0700 From: Joel Fernandes To: Kees Cook Cc: LKML , kernel-team@android.com, Anton Vorontsov , Colin Cross , Tony Luck Subject: Re: [RFC 6/6] Revert "pstore/ram_core: Do not reset restored zone's position and size" Message-ID: <20181026182218.GB187415@joelaf.mtv.corp.google.com> References: <20181026180042.52199-1-joel@joelfernandes.org> <20181026180042.52199-6-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 07:16:28PM +0100, Kees Cook wrote: > 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. Oh, ok. Hence the RFC tag ;-) We can drop this one then. I forgot that unlinking was another way to clear the logs. thanks! - Joel