Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp125963imu; Thu, 3 Jan 2019 15:35:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Jk5VWTl4Z5jxDQDu3bIakVVezKMcDdEJE904m44ZJ0KEnlqCeIhiB51ObXk5kI0acONh0 X-Received: by 2002:a17:902:4:: with SMTP id 4mr49093417pla.20.1546558507055; Thu, 03 Jan 2019 15:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546558507; cv=none; d=google.com; s=arc-20160816; b=Fpw/cnuLE/QNqvil/tBzzyvjMOCtIrBftLscpmyVcfVggW6Abo2n6ZZKJ1tK/efubn RLpSHSqfXBHM0vj4m4DcF3y2Wh+2psvdoS/z7utoIx7HcIcrNR6F4bHeuqvEXOAGUs+Z nMU3FKQidesueZKG4Fhz2QrC7HhlGLG7meKqYs8rEaq6dI4n10rgzX+tj/44+gdjtalN 9G3axB+/e9JwBHPPw4zNBOb/3DzOwvrmALV6xgh0feganDvaEwujfHDDP1Lp4RIVpzGH SmXh9qMK8uuF9zjTcU2Ic0zlaZq1weAK8Ivfd1zG1FHmOJd2FG8m+Gx1D+MW3kPxc+Ro FXUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=9bqtw+qaZAGh4lBjZNqOvLa2Iw1YaJByrhRmo+gaFVY=; b=rstsHc0Rj6uJO7syhLvj91YH+1yG5ovAM0nrFl/yNy715Hl6wBkgX7rYfb2EYdYW5B Mqyv5xMAfD7qAVzweUq4bhwQ/bgj2yUORnBol7NNPpDkkQZ7RdHjHINj5s0TnUDbEMDN hFXDf3673Ch9n8i1OP3BlQ0AWnDLhQ/2Hwe3xWds827z9FQzPQqxzqhptZuD+f9X8wNz EPf6yxYu67jMvxsJmz3bS/B2DbVLHRg+tszFgUax6wVpLj+HTEgH6uDLRdBKJMocpOm3 Bc4SUJoiiRw0dBvF/dbUxcYpAKg1fpXiS+iwLzkeQxFVJBQk9+iZRBGXcWZQ3pdTBrzp 9D7A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g59si54613762plb.302.2019.01.03.15.34.52; Thu, 03 Jan 2019 15:35:07 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732557AbfACRSv convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Jan 2019 12:18:51 -0500 Received: from mga04.intel.com ([192.55.52.120]:47092 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732548AbfACRSv (ORCPT ); Thu, 3 Jan 2019 12:18:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2019 09:18:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,435,1539673200"; d="scan'208";a="115225824" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga003.jf.intel.com with ESMTP; 03 Jan 2019 09:18:50 -0800 Received: from orsmsx152.amr.corp.intel.com (10.22.226.39) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 3 Jan 2019 09:18:50 -0800 Received: from orsmsx110.amr.corp.intel.com ([169.254.10.158]) by ORSMSX152.amr.corp.intel.com ([169.254.8.53]) with mapi id 14.03.0415.000; Thu, 3 Jan 2019 09:18:50 -0800 From: "Luck, Tony" To: liaoweixiong , Kees Cook , Anton Vorontsov , Colin Cross CC: "linux-kernel@vger.kernel.org" Subject: RE: [RFC v4 0/3] pstore/rom: new support logger for block devices Thread-Topic: [RFC v4 0/3] pstore/rom: new support logger for block devices Thread-Index: AQHUozhqO1w/2T4wnE2emvMOu7brUqWdyBJA Date: Thu, 3 Jan 2019 17:18:49 +0000 Message-ID: <3908561D78D1C84285E8C5FCA982C28F7D4B623C@ORSMSX110.amr.corp.intel.com> References: <1546501533-1855-1-git-send-email-liaoweixiong@allwinnertech.com> In-Reply-To: <1546501533-1855-1-git-send-email-liaoweixiong@allwinnertech.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjU0YzA2N2EtNWY1NS00MGNlLWFhMWUtZWVmZDRmMTM1ZDJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWEU0XC9xMnZXZm5TcmhqWUV0K05sTmMxd0RHWVlzdU5vQWdhOXhVQW1wR3NSTStmRlBpMWxaZk05K3NWRXpCQkUifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm curious why you call this "pstore/rom" rather than the more descriptive "pstore/block". It looks to be a really good idea. I think you need to document how the "write" function for the block device must be written. Since pstore calls this at "panic" time, the write path: + Cannot allocate any memory + Must be polled, not interrupt driven + Cannot take any locks that may be held by regular code + ... perhaps other restrictions that I can't think of right now The memory allocation restriction is likely easy to get around. Just allocate anything you need at pstore "init" time rather than waiting until the panic. -Tony