Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4066165imu; Sat, 19 Jan 2019 01:29:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7okH5zs/OcvHN/+Koxkdccv5En+j76yn8j3jAckfdXiNNMioyJ/kbzZ6Tx7/+98UGvDEi7 X-Received: by 2002:a63:86c1:: with SMTP id x184mr20725610pgd.305.1547890187175; Sat, 19 Jan 2019 01:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547890187; cv=none; d=google.com; s=arc-20160816; b=wjE2j1jmPfAzjHKyYT8vaKvb2ddz6t6bybhXskiwh22oMxmB84A4RvP7c2A00klmB1 yNQbHxKvRl1kl7d6LQ84mhtDCc0BG2rnjIt/6HN5QRAMaDD+hq5F1u5+eWC3CNfZKtMi 62KHmMFcF6xHzEcQdvp3CISLoorMR27S0LYXV/sB4Fv23bLuOQ7Eq8cRTp5QgkR0vAtj xGBfRGgGM9v2L2ytmGt4G3/TR58HIpm3lqy1X9KPBG5Wp00Jry9zEOJ5OJokx4Lq3iQR PAc1Hh765BBx4H1b3rNHJ1RZdNLhbYa0WnnNWG/QMRFge6kQsExKyArvexBH8kBk5I9p XSCw== 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:references:cc:to:subject:from; bh=VKoQISRWfCuCFs0j4R1meq3NWRzvr7GJ768m5NzvxAQ=; b=Nz6YOVoIhtFqfe1hGOJAVbP1tYASki5YfY+PRJd+809v9dUKSfjsIk4RmwdebiKeFc CS0i1KeP/vJ4YjnyR77NytGut9llHlLxurfrj2CNGU7Otw5S3pmaq2IgS9UIFXSIhrjL LucoeCtNe+4hjgNTZDtTQVaDVdifHiPobjDjyNK9tuswPtmBxBtcGZPrLyv0lnJpKARp m45sitJ/yFkcUDo3OoAWN0iickSbDQeeCaLOJdraV3Mzv7gNLCpXj2h/kdOyZEnaSDIp FSHwUQfV0cNS5V7mhIQr2TfW+by/EZ9rztltyDdCv6GA40mVUMe2og5QUpi2/VnK9xQB 6yag== 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 w22si6287272plp.301.2019.01.19.01.29.28; Sat, 19 Jan 2019 01:29:47 -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 S1727729AbfASJ2N (ORCPT + 99 others); Sat, 19 Jan 2019 04:28:13 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:33370 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727646AbfASJ2N (ORCPT ); Sat, 19 Jan 2019 04:28:13 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.09240498|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01e01454;MF=liaoweixiong@allwinnertech.com;NM=1;PH=DS;RN=13;RT=13;SR=0;TI=SMTPD_---.Dnpj7IF_1547890080; Received: from 172.16.10.102(mailfrom:liaoweixiong@allwinnertech.com fp:SMTPD_---.Dnpj7IF_1547890080) by smtp.aliyun-inc.com(10.147.43.230); Sat, 19 Jan 2019 17:28:01 +0800 From: liaoweixiong 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> Message-ID: <665538df-98c4-b09e-565e-424a3551332c@allwinnertech.com> Date: Sat, 19 Jan 2019 17:28:03 +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 resend this email. 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 >