Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1359896ybv; Thu, 6 Feb 2020 02:45:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwkmSCk99P0G2GMv7HaxqOIljIP2itc00MawGuDyynVZeoGjf2OFtSeAYhYuXZL61iex9M3 X-Received: by 2002:aca:814:: with SMTP id 20mr6543523oii.159.1580985917568; Thu, 06 Feb 2020 02:45:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580985917; cv=none; d=google.com; s=arc-20160816; b=utkN+cRczCNdffG0KAp45uiWT0/6pD6PRhZ4aWgiO385y0PRpwBwRL9DRzgWSIUVZg TzpSh5qeYJ76mJei3q43lkLLv5hL2q+0SGXcwoStTktAOhknZxKn8obZ9KGXE/hBxUDo AL2YE1Ha2AbmaXUyjp062wWwSk6Xf+NHBVTjd+mMLhHlKTXcjYX3kuAwpfjzXCS1bpwl YItUN7Q7oY7CSBD7PRP8czD5btRwtBkV1b8NnPDCSwW2eBg3O6PgzEnlCX2EabWfUe5t eLoGp8XBcFjtQ0wXuvlEl8iBCiOaF/zOibqoq6YScVLbx8iUa9ehylQiG87JWkozHkJA strA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1CpJKgsAjlSqoe4gELRsfhNNMyIPojRkXjDATWcGuu4=; b=GgxDxoiiP6yIVTW7TgGqfxFSoMFIdVV/f0KhTD+kzyWTEY/hTekDKKAjp6VpLbQP8w Ds+PMsI8WR00RKIjfNwk3Y+K3M8N+jxlfaUEZ/czDmUxTnCrNIrLHoCU4mM+WVMDnRXv MMtDM3/+Z47OwYHKIVwnM+ACjdiJ1EP0lVjLTovtLgT+7c9OuKG4cvH7QL+ljkCtGf8v v21Zx5jAIGmJhYaReUpqQ02GWobHY3XgbKp3E0hpqaRe8UD7yoAlf1nL+UtSVtvBgHrg WYvY2iDbKgGNYlp/wbhuHvfGOHuUuQE6gEEy4RxuCishN74obWXhvmi+b4ok8LP4BoRK N51Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GYL8bZM6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si1542236oth.15.2020.02.06.02.45.04; Thu, 06 Feb 2020 02:45:17 -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; dkim=pass header.i=@chromium.org header.s=google header.b=GYL8bZM6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728113AbgBFJNM (ORCPT + 99 others); Thu, 6 Feb 2020 04:13:12 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:37798 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727509AbgBFJNM (ORCPT ); Thu, 6 Feb 2020 04:13:12 -0500 Received: by mail-oi1-f196.google.com with SMTP id q84so3892491oic.4 for ; Thu, 06 Feb 2020 01:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1CpJKgsAjlSqoe4gELRsfhNNMyIPojRkXjDATWcGuu4=; b=GYL8bZM6NkTFf6TxXvu25c1GbCWB6hXWNKX734+SfLOA6BUhmqA8OgD+Zqpxp1Z1zN oWbkkotrLcWLHxhekWqahMoLG3W2ap0jg3hnncU5+sPs1DI1lM/qRzU4Z9I/onG39FHH U87i/i7nd8DXNiP/r/ZHnhm8XQwbuNmgflnjU= 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; bh=1CpJKgsAjlSqoe4gELRsfhNNMyIPojRkXjDATWcGuu4=; b=SR0J8E4dFzFZZzHiOF8BJW1UBP2UNB1+TRPvU5gn4/3gIK/oGjRZ7Yb8VmRPAWfy6Q i48KGPglQ6on5PzTTfKIUkmn/MlaSxQJOHSDZTiDCoOfekHspHZjFczAaMRpahyu8S9i /NauusW5LD3/adCUUBWhqMnC939e06MqwwQy16uftrdteWx/wOsdgiujGZ/LhchfxL9+ amMe1DoknRjctBVsBqQeQdGaheDm9jVt7q0Ey3MJKKtthHcUUGiIB/TYzA+hFEtbK1ii XeBRb1hligkL3X9/x3ysr1hzoG5wv5TJ/U2tXmdZjAQQZMD2SolUDKQL+b7zbJxrzWmP jk5w== X-Gm-Message-State: APjAAAVnod11uiG7Uh8hEwVSfu5WqAsBjUmm2aCMHB7Hhs4A96ar8Hkk Mi6HQ6RK9niQtBOsxdlkg2nP4bXMO2GzMQ== X-Received: by 2002:aca:cf12:: with SMTP id f18mr6247795oig.81.1580980391763; Thu, 06 Feb 2020 01:13:11 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a1sm913373oti.2.2020.02.06.01.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 01:13:10 -0800 (PST) Date: Thu, 6 Feb 2020 01:13:08 -0800 From: Kees Cook To: WeiXiong Liao Cc: Anton Vorontsov , Colin Cross , Tony Luck , Jonathan Corbet , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , Greg Kroah-Hartman , Jonathan Cameron , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v1 00/11] pstore: support crash log to block and mtd device Message-ID: <202002060108.7389A4C@keescook> References: <1579482233-2672-1-git-send-email-liaoweixiong@allwinnertech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1579482233-2672-1-git-send-email-liaoweixiong@allwinnertech.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 20, 2020 at 09:03:42AM +0800, WeiXiong Liao wrote: > Why do we need to log to block (mtd) device? > 1. Most embedded intelligent equipment have no persistent ram, which > increases costs. We perfer to cheaper solutions, like block devices. > 2. Do not any equipment have battery, which means that it lost all data > on general ram if power failure. Pstore has little to do for these > equipments. > > Why do we need mtdpstore instead of mtdoops? > 1. repetitive jobs between pstore and mtdoops > Both of pstore and mtdoops do the same jobs that store panic/oops log. > 2. do what a driver should do > To me, a driver should provide methods instead of policies. What MTD > should do is to provide read/write/erase operations, geting rid of codes > about chunk management, kmsg dumper and configuration. > 3. enhanced feature > Not only store log, but also show it as files. > Not only log, but also trigger time and trigger count. > Not only panic/oops log, but also log recorder for pmsg, console and > ftrace in the future. Hi! Sorry for the delay in my review of this series -- it's been a busy couple of weeks for me. :) I'm still travelling this week, but I want to give this a good review. I really like the idea of having a block device backend for pstore; I'm excited to get this feature landed. I think there may be a lot of redundancy between ramoops and the block code in this series, but I suspect the refactoring of that can happen at a later time. I'd like to get this reviewed and tested and see if I can land it in the v5.7 merge window. I hope to have time to focus on this next week once I'm back in my normal timezone. ;) Thanks again! -Kees -- Kees Cook