Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2625262imd; Fri, 2 Nov 2018 14:52:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5dObHwn3IXfV5lgLb1UynrtdCOdJzZGxOLmt5fYlVPCRaykut38BcFkgC2/Mr8Yu3xvD3BZ X-Received: by 2002:a63:3f44:: with SMTP id m65mr12676094pga.115.1541195555509; Fri, 02 Nov 2018 14:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541195555; cv=none; d=google.com; s=arc-20160816; b=Nf/PhiXbEnZLx4U/WrcJfY8Uxt0opL0ludds9y3W0FQZ/kvRWAFISEgl+psmSdXvia ALkZeyiy+GC5EkAmOu2CuMI5WCW8s6lwYj1ujdSD4QLNP8U5QKX/SOz7oncW7EHXYLi7 KEaQYdgA6NzCbq+7ccAlRIXtTRf5101Qk8VGZ3sB5IbtF6ZuQ8/FHISuPVQ+fQ3edQSr bi+qsFIymD48cMnwGg/OuoG6cAygcp/indM06zQs7iIEkd6iQl0ze4vLnlmpJF2zaWVA Uya25nOQnI4YPaYpur2CvcnlGJSgxAWHSEDjl2QJbijx9hbRtbIzSY8Fw1M0mZrN5KNk gZLQ== 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=KtknSZMVwbqRe2epToELUMXm1/RPnXkthtqb+Nt1VuM=; b=dpGwnfhQu+JnaZhuOIPfC/WZEzcQOdltPlZRw2kU/IMr3A7AF7RZw5r69C5WYsHJ72 PbHTPlOoRhs/5R5HIj3pRocqJK21FG9noMzQ1Iaw803nXsao5vk9uaHpu0CtQyfo+uiL 7ZS+1Oav3H+hVsWOY0H6c2BT7YVWfiGrOtGyfRU7RyoHLwGdFMHlJjRiVppQS2jhckkZ IYd+cemT16sqUFsSmg1QxFWrc34tOm49w2jdh3XT42nGTeVI93uG7r4DSaSIJVd13DPP i98GNP1wFA3FcVc7k6YG6JRZhxDvFYzJyrYZJnjA7u6cwi8x3hWCdPBKYnIKWP6gncBG MNLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=gz2DKQ3J; 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 p13-v6si8947442plr.271.2018.11.02.14.52.20; Fri, 02 Nov 2018 14:52:35 -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=gz2DKQ3J; 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 S1728289AbeKCG71 (ORCPT + 99 others); Sat, 3 Nov 2018 02:59:27 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34412 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbeKCG70 (ORCPT ); Sat, 3 Nov 2018 02:59:26 -0400 Received: by mail-pl1-f195.google.com with SMTP id f12-v6so396635plo.1 for ; Fri, 02 Nov 2018 14:50:36 -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=KtknSZMVwbqRe2epToELUMXm1/RPnXkthtqb+Nt1VuM=; b=gz2DKQ3JEX2TfV/zi9yIkS1EnWUS/o47uiUzui3bRLsekuzZyu6VkMlUC4uSyGoMcL b4uup+p7QcVh7uhTZYmGh8PkJsjtv8rQAZEfBeY6t4wgJRm1fYspCLmvq+bTznUjwLDs e5VojFkv44+zzMsLv9CSKu9dViEkOqHpSunJo= 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=KtknSZMVwbqRe2epToELUMXm1/RPnXkthtqb+Nt1VuM=; b=N2Tk00PU0keNzyUntWnpig7rDaHemuHrlpU+86Q9aPCU5xTePRG76QaNONDPSpw45K c4iJ8fkaN/8wYT9DCNAyg18Q1c10v0kbAdgTblE8m9XR7nQyW2Nj4nvLLoY/k9+6vQbZ ebyQeKSi+sWuJv+7e2bc7F5tVLwobyTtfYNSTqSewMo9+X26AGR5iEt0DnaiQOPySUXR dLtEuht0a/ZROBaYegTFCoWS+3Z6IRj6W++HtiL/nyyrNR6C/hQWc/ntM7C0lALLCW1d 7LsRFTl3c/fg5mT+vPy1WDHqKUtaHw+C/+xFK6P7/7KrxpzV6OkUGUIuy1RdClr95s02 apdQ== X-Gm-Message-State: AGRZ1gIMwEpjPtwrwAwCJ1hT6exA8FXFkfa4AFiyz4i80/lc+mRuhoom 9U929E8jB5WQjx5CzJDh+0XeNg== X-Received: by 2002:a17:902:7c87:: with SMTP id y7-v6mr13273468pll.232.1541195435762; Fri, 02 Nov 2018 14:50:35 -0700 (PDT) Received: from localhost ([2620:0:1000:1601:3aef:314f:b9ea:889f]) by smtp.gmail.com with ESMTPSA id 126-v6sm40486891pff.105.2018.11.02.14.50.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 14:50:34 -0700 (PDT) Date: Fri, 2 Nov 2018 14:50:33 -0700 From: Joel Fernandes To: Kees Cook Cc: LKML , Anton Vorontsov , Colin Cross , Tony Luck Subject: Re: [PATCH 7/8] pstore: Remove needless lock during console writes Message-ID: <20181102215033.GA99294@google.com> References: <20181101235200.28584-1-keescook@chromium.org> <20181101235200.28584-8-keescook@chromium.org> <20181102183204.GC14942@google.com> 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, Nov 02, 2018 at 01:40:06PM -0700, Kees Cook wrote: > On Fri, Nov 2, 2018 at 11:32 AM, Joel Fernandes wrote: > > On Thu, Nov 01, 2018 at 04:51:59PM -0700, Kees Cook wrote: > >> Since commit 70ad35db3321 ("pstore: Convert console write to use > >> ->write_buf"), the console writer does not use the preallocated crash > >> dump buffer any more, so there is no reason to perform locking around it. > > > > Out of curiosity, what was the reason for having this preallocated crash > > buffer in the first place? I thought the 'console' type only did regular > > kernel console logging, not crash dumps. > > The primary reason is that the dumper needs to write to somewhere and > we don't know the state of the system (memory allocation may not work > for example). > > The other frontends tend to run at "sane" locations in the kernel. The > dumper, however, is quite fragile. Makes sense. thanks. > > Also I wonder if Namhyung is still poking around that virtio pstore driver he > > mentioned in the commit mentioned above. :) > > Did that never land? I thought it mostly had to happen at the qemu end? > > With nvdimm emulation, we can just use ramoops. :) > Yes it seems like it never landed: https://lwn.net/Articles/694742/ One of the nice thing about his virtio set though, vs the nvdimm way is that he actually gets a directory on the host instead of a backing memory file. Then he can just list this directory and see all the pstore files as he shows in his example. I guess it should not be too hard to write a tool to post-process the nvdimm images and convert it to files anyway :) thanks, - Joel