From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 689A0C4345F for ; Thu, 11 Apr 2024 19:37:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C27FD6B007B; Thu, 11 Apr 2024 15:37:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB1776B0082; Thu, 11 Apr 2024 15:37:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A51A56B0083; Thu, 11 Apr 2024 15:37:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 86A2B6B007B for ; Thu, 11 Apr 2024 15:37:38 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 4775CA0B66 for ; Thu, 11 Apr 2024 19:37:38 +0000 (UTC) X-FDA: 81998260596.20.A73BBEE Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf09.hostedemail.com (Postfix) with ESMTP id 35D3F14000C for ; Thu, 11 Apr 2024 19:37:35 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of "SRS0=4yp4=LQ=goodmis.org=rostedt@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=4yp4=LQ=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712864256; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tqfOp41QoPdynRKifjyO8xtINpuCUHnUtqsb5UJEQxE=; b=5pvwa+hMI3KwojbjIGDGINtrJQj+d0M1mQEh0FxbLPkCfvELzgBcux3xViev5Ix0y50MiN 5COHIZpWvN/+zGDgHwG7WNQwKe3oD72MHU1K+yOetdWpG4Tmlxrljcj6Oix+wLispM5cgW gPjU7niRWcxTafAYAzCM037Od5t/KyE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712864256; a=rsa-sha256; cv=none; b=vQErtnYAtk4gtN8MWRbTKmoTWAQLxl+TRUOat7EMLZBwBZy5LCEuW3vcQZHcdorvZkIR0Z hljF/OuXCYzQllmSVdbTMTds40aGOkc8IZ2Ug6r0hWR1aT+dkqtB1IKAaKRBXBV9ls4itl k7DPcgXrT6Ho7Tovx1DXKqqibTx1Rio= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of "SRS0=4yp4=LQ=goodmis.org=rostedt@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=4yp4=LQ=goodmis.org=rostedt@kernel.org"; dmarc=none Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id ED8C6CE21B9; Thu, 11 Apr 2024 19:37:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30E0DC113CE; Thu, 11 Apr 2024 19:37:28 +0000 (UTC) Date: Thu, 11 Apr 2024 15:40:07 -0400 From: Steven Rostedt To: "Guilherme G. Piccoli" Cc: "Luck, Tony" , Kees Cook , Joel Fernandes , "linux-kernel@vger.kernel.org" , "linux-trace-kernel@vger.kernel.org" , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , "linux-mm@kvack.org" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "x86@kernel.org" , "H. Peter Anvin" , Peter Zijlstra , "linux-hardening@vger.kernel.org" , Guenter Roeck , Ross Zwisler , "wklin@google.com" , Vineeth Remanan Pillai , Suleiman Souhlal , Linus Torvalds , Catalin Marinas , Will Deacon Subject: Re: [POC][RFC][PATCH 0/2] pstore/mm/x86: Add wildcard memmap to map pstore consistently Message-ID: <20240411154007.5bdf8d95@gandalf.local.home> In-Reply-To: <3391c693-cf54-526b-79a8-d565e7140947@igalia.com> References: <20240409210254.660888920@goodmis.org> <20240409172358.34ea19f0@gandalf.local.home> <202404091519.B7B2221@keescook> <3391c693-cf54-526b-79a8-d565e7140947@igalia.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 35D3F14000C X-Rspam-User: X-Stat-Signature: mqn64ccoim1zjo9aryd31y7a7bf5qm61 X-Rspamd-Server: rspam03 X-HE-Tag: 1712864255-50950 X-HE-Meta: U2FsdGVkX1+q6urDA50CdB6+e0BrJd3aDBhaC5QnW3foUQuiMHuQgb/w4HZUowdFZWeWuUZzAD+Q7y+KfzBce81/FbOlyYgWfGgCo+IQEGyn85s8gdEKARs8O/vQI2GzaDdygj1VhtjZrIW7IMpwi32ANi3SVboNxcimHy9yMa001ykCWxwnPCw6dr2rSkaOmyrLFzZd8f6b+fAzgrpZe4gEz/9Nf0HepMu9Y9rhgBGjbzWTNn03Pf1/0lYBu8fwngJA3pN8CFCKy6wAEA/be/WIPLZwRWfe7kMRbkn0cTLb3ecEnhqygkzVgm/LdIcdWieuA3aPlhiKyQQ8N3CwwTyj9tssobhysqM9JZXO3SwHzePy+fym/BKwizpgYIAIRgRNI1l5iHhF4IEueTEQm1HVWia/vL6iDbuvYgKpN0gmp7NoDaFvRWpqS1M5f5s/2y3cO0TbS+hhgrNTxj3YkG/I7XJA9x5zkPc3QVBVF2ETBsectNkOQwFpvzsaSGZWkMHSRXALns2aZgBBnUZW7A3ep3heB1sNvzHI6jAhe8qJFXeEDOkGQi2nbECaCJBFOaIfTrxui/yICFAe6K/Sk6Yox+Qn6Bo2nVR6H41t+P41aZUOBUvx2KqSqYbSMUNYsB7tIsm+9b3QJ9M8ugb2g7CTPxEgN9Mm52jSg6850OgfSWdqfHlUnowP7dqbaMtZLVw4mP03MMmKb0E1wHfuaYmbVHuiJht37EI48wEJzorNItlbfbtiPUXrhL7jJ6weLF85efIA1OnPLTAmxjHaIGTMY8TbXmydcnSqU6KwALz+pirj6BIEermuwMcJUWjZp+fCTSs30gh49JD50iqNJ8mixZBWSLeL7/jsLgOY4BmEfFltL+B3Y62ySv5GiVcmVAnMcgPRAcLCvV/+zMUXTXytVLUPI0otUUyLhsaRchCowq+cZhm6p9ZjgsVMJSiCjITU66ikmPMqT9b2evs 9uHgHYKF kYoU7/1cGc9Gj+EZdJE17q0JdDeOxxeqh8xqfQ3d3BKNrgeKxjANRpEc6GFpe8AvfjYAWjRhyWsGpgDHCxi/YBNYAZX8ToP+dIyorb9v1RsGet38mROfNRZqTm/VXdYFGttvY7NxuB81DT6lIh27BW+P1t1qgKwZBUMuzdsA6HKD86jBySn4Y/EJyEWk8Fp6BdE7R+5HtP8UkSESHLEsbcnf9Kx+6qrwC+9GSnDLgu/TI3/zrDwXm/nlA1ocLWdxo9nmdVyWq9n/3OtsBwWiijy7cJJNPj0RtoZJf9940IKzSa4IyhHf/fmD+6Ah5uK4vprinceVsjSVE2rUL2rNb1WpqMJi3dAiYL9ka X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, 11 Apr 2024 16:11:55 -0300 "Guilherme G. Piccoli" wrote: > Thanks Steve! Like Kees, I've been wanting a consistent way of mapping > some RAM for pstore for a while, without resorting to platform drivers > like Chromebooks do... Great! > > The idea seems very interesting and helpful, I'll test it here. My only > concern / "complain" is that it's currently only implemented for builtin > ramoops, which is not the default in many distros (like Arch, Ubuntu, > Debian). I read patch 2 (and discussion), so I think would be good to > have that builtin helper implemented upfront to allow modular usage of > ramoops. What I think I could do is to have a check after memory is allocated to copy the table mapping (in the heap) if it is filled. The reason I did it this way was because it was the easiest way to save the label to address memory before memory is initialized. I use a __initdata array (why waste memory if it's hardly ever used). But, after memory is initialized, we can check if the table has content, and if so allocate a copy and store it there and use that table instead. That would give modules a way to find the address as well. -- Steve