Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4065741imu; Sat, 19 Jan 2019 01:29:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN7A3+TwGmbgkZjG1mXINyTZjbWZ2NfXAnfzo6ypvfWe1rna8oxRZJcG+T9kMVYNownWUj0N X-Received: by 2002:a63:8ac4:: with SMTP id y187mr21143118pgd.446.1547890140755; Sat, 19 Jan 2019 01:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547890140; cv=none; d=google.com; s=arc-20160816; b=p6Zvy4/EWDIfKRYsI5Xb2iaI44u9taL8j29yZOS3KaS1FLgbhF20f4KdfCAf3yJHrQ wBq2keB5CoJLsinGkRhIt6LOpoN2/kVCnNNWIFH48aWwt0dIw35t2/88tmdMTp3jF4rS Eoz0TKu7RmvGerE992hVHzmU6+lSJcY5+Avx0bGyPfNcrIK1RznfdFUhh95+Z+14j3KA nFxdSTMCHPsOqG02r4HwQEc2IisrfI0MXoplUVMsVE9jvLfJgBjnOLq4j/TNyYMtkUkY BlEJtvxNtVVQ7x8o0yByk8+msTQa0KUrSz/qBHDbKq2htfuotvC/8ZDMFhAu8M8IMIIJ I0bw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=SPJdD9HfBEyuv9Seqnp0w+4bX/py3Cbkpl1bSar9AhY=; b=O2M2wVDiQ9xzjC5UX25t6eYptWs9lGd3QdWUrlgDfkJLbcfcb3FrSzN+m5SqzSZUEq ArqXBbjzdH2iop/JapKkahuo03avOuubqaKFzfT+Wcyi+WiyMAxg169NlzM1IqDvVkaq 7gr7fXUvc0sQPCaSHdWwAc4QjRVBVI9BW07VyU0b9rd8wSXp9PteTGYyxAuSvErBnCx1 i+60AP7tW97eLOhW3zjpP/Ao9DFU2nruBSIUZLTHrPLpzEZKmT9w1Tgr/+I58bzJ0D93 tR+tMlBzfEvvD1nhlYe2QUzPC33hizchzzTpc5shuxk3ORp/+5XZxd59mhjBREagT+fh EhPw== ARC-Authentication-Results: i=1; mx.google.com; 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 19si7063166pgp.186.2019.01.19.01.28.42; Sat, 19 Jan 2019 01:29:00 -0800 (PST) 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; 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 S1727709AbfASJ0N (ORCPT + 99 others); Sat, 19 Jan 2019 04:26:13 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:38601 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727646AbfASJ0M (ORCPT ); Sat, 19 Jan 2019 04:26:12 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.09436148|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01l04364;MF=liaoweixiong@allwinnertech.com;NM=1;PH=DS;RN=13;RT=13;SR=0;TI=SMTPD_---.DnpjTRx_1547889964; Received: from 172.16.10.102(mailfrom:liaoweixiong@allwinnertech.com fp:SMTPD_---.DnpjTRx_1547889964) by smtp.aliyun-inc.com(10.147.40.200); Sat, 19 Jan 2019 17:26:04 +0800 Subject: Re: [RFC v5 2/4] pstore/blk: add sample for pstore_blk To: Kees Cook Cc: Anton Vorontsov , Colin Cross , Tony Luck , Jonathan Corbet , Mauro Carvalho Chehab , Greg Kroah-Hartman , "David S. Miller" , Andrew Morton , Nicolas Ferre , Arnd Bergmann , "open list:DOCUMENTATION" , LKML References: <1546862462-19640-1-git-send-email-liaoweixiong@allwinnertech.com> <1546862462-19640-3-git-send-email-liaoweixiong@allwinnertech.com> From: =?UTF-8?B?5buW5aiB6ZuE?= Message-ID: <6f61bd6c-a274-92ae-75df-83a2265d3338@allwinnertech.com> Date: Sat, 19 Jan 2019 17:26:06 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-01-18 08:21, Kees Cook wrote: > On Thu, Jan 17, 2019 at 4:15 PM Kees Cook wrote: >> >> On Mon, Jan 7, 2019 at 4:01 AM liaoweixiong >> wrote: >>> >>> It is a sample for pstore_blk, using general ram rather than block device. >>> According to pstore_blk, the data will be saved to ram buffer if not >>> register device path and apis for panic. So, it can only used to dump >>> Oops and some things will not reboot. >> >> I'm not sure I see the purpose of this implementation? Doesn't this >> just cause all the pstore machinery to skip any actions? i.e. without >> bzinfo->part_path, won't blkz_sample_write() just return -EINVAL, etc? > > Say, instead of a no-op driver, can you build something like the how > ramoops processes module parameters, so that a person can define an > arbitrary device at boot time for blkoops? This also allows for easier > runtime testing too. Sure, i will do it in next version. But it can only use for oops, excluding panic. I have no idea how to pass panic operation parameters. > > This all looks good, with some minor tweaks as mentioned. And on > closer review, yeah, it doesn't look like it shares much with ramoops. > :) > > Thanks for sending this series; I look forward to the next version. :) > > -Kees >