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 94F87C4345F for ; Thu, 11 Apr 2024 19:12:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D6F8F6B0087; Thu, 11 Apr 2024 15:12:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF8706B0089; Thu, 11 Apr 2024 15:12:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBFC36B008A; Thu, 11 Apr 2024 15:12:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9B9246B0087 for ; Thu, 11 Apr 2024 15:12:55 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5018FA18EB for ; Thu, 11 Apr 2024 19:12:55 +0000 (UTC) X-FDA: 81998198310.19.E27729F Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf19.hostedemail.com (Postfix) with ESMTP id 9DAEA1A0008 for ; Thu, 11 Apr 2024 19:12:51 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=RaPvBAkF; spf=pass (imf19.hostedemail.com: domain of gpiccoli@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=gpiccoli@igalia.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712862773; 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:dkim-signature; bh=fZ3fmdT9oUgO2wmrYEOWhcDcwgmf7m8Sawtw85kAd7M=; b=iw0Ef0KnTAVfHmNIePd13JqBkvm6znrRJ0xZgSW8zjtyAf8EDlk2wTe33PFLGQG3kLB99X QgXXJB+yZJaGFwkIauWLby9sFuK2tpfO+ejo6a9dWcA/qSduJCRA/uAhPwlwmCVcwnfLa4 l3vDN/+iTMjwkLAnlR+2Y9deJZpgwEc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712862773; a=rsa-sha256; cv=none; b=ALAej7GgcZtyNMmm/eKdnfKaM//siXJjLeciNXE+I+YXM4FUAshtgEJq5YPbuZ06P1Echg 6wZFhOMqnS/Z604y1ZTLlp/FcJ0nU0et+O9JlJzAhGpOQZ6g8J5K2IFqq6MX1ZNMmzepjx k48Jw/owW58sb8WEUIQzUnIrzAxXnHE= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=RaPvBAkF; spf=pass (imf19.hostedemail.com: domain of gpiccoli@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=gpiccoli@igalia.com; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fZ3fmdT9oUgO2wmrYEOWhcDcwgmf7m8Sawtw85kAd7M=; b=RaPvBAkFj96SS8PNgIcab5bNln 3MSQA3IrTG4mjLcalN1p4H35xpSgRoOH8L3SuVARRMo9Q003N7Mib3bUjFLFEcwYXSti+ZhXsbU96 MVNJ4chMCGpxKX57ohtCn6HvvvHaZnn5mHAdauSGAJMVDUNciWMBXKr0OZH4/IqTNTV6S6wri8aZq FsHSb5lxoaV0gtog+4ARjnfeEgD12MOWIyqo9RAS634XncuQCIdxWUDGfW7/C/mTo3Zag10UnUaWD YmNliruWvoTA2d9kXnCXM8DpWeIoclQqaaS9nkDsNeersLgA0I0+uYPKAVBvS6N1HfBqHsRQsO29t 6aK39wcQ==; Received: from [189.111.43.233] (helo=[192.168.1.60]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1ruzqC-003fQg-MV; Thu, 11 Apr 2024 21:12:08 +0200 Message-ID: <3391c693-cf54-526b-79a8-d565e7140947@igalia.com> Date: Thu, 11 Apr 2024 16:11:55 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [POC][RFC][PATCH 0/2] pstore/mm/x86: Add wildcard memmap to map pstore consistently To: "Luck, Tony" , Kees Cook , Steven Rostedt , Joel Fernandes Cc: "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 References: <20240409210254.660888920@goodmis.org> <20240409172358.34ea19f0@gandalf.local.home> <202404091519.B7B2221@keescook> Content-Language: en-US From: "Guilherme G. Piccoli" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Stat-Signature: 5syt9a1ujsfk9ofowxyh345k8hq3h8fn X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 9DAEA1A0008 X-Rspam-User: X-HE-Tag: 1712862771-899234 X-HE-Meta: U2FsdGVkX1+JRn/fmp6mI+BiuE3PLYY6y0ZOE/a9R0x4FZwLx3irDZh1hkDTxKGHERSI3b4xq6TgQ3ieWD5kJmvtMsH7AEu4ampGocjMf/yeP7Ccx8z3CcDx+rlY4xD8+I4oaribtbJFiI0ujV7YJMZObFwfpo8OKD1+msrElKjJcn9UDhqqulhwE7Ba6Iyo04JgDf+Vk6zu/oHoadIMIuaEwKJoeYiDpfHAfb459ZM2+fehj0hP+SXSI7AL2q7v3ksWQlFD0yykLI3CKNOPhbexwOb94BTd5+z6/K0VjXEFLcMCJ9yjahYEYGoy3pQ8uE+yx++HSb5rpnLf0Kp9fo0noFL+j6XX+3WIAKmVx6WIFbyGF2yIs85rdbIr/ctuifk1wvJkHrhHZoSBhJJDEz01C9j+6mlDYdIhBI4CivnurQ4FsKc7xuCL++vlgD/eXBG+sQmr+08mFO9NtyaOAtDh1KxrwDv1cYIKl+KabK+SsrpQILMgvr86dP6pN6KXXaygDnNKh92DeUnV+rGWZ5GsKWpQifLlGC6hGTQul0boELPmLM0ZbI6q4/z/s2h+1RkTWzeoaDmRNeknRNMfGRo4MHBtdOhFs2rWVRHGSwK2g2LCJ1bXBbUUOpDnG1foV/GY+si90vtbCvZcutDxozRiahqj+T+eoYbsl5NkDB0xZ1A7kh8dl4hzfeGNoEVBizZNKfHI5fXPaXEE84hLsP49IBImEig06BKgO2bbHeBkdoUfbjOxAv3QQTB6kAbztrGoRbb3t8P5RT98eY+ej3PcBhVlF3m4jWXzgxPjfwJUgTuMdFDirQKi96ODDC6y7cHdFOq7iTjTDZ04caIT8eZSrtF1zJMo55cxIQLPi7qn2B6jqdjyYTqDAafxToegqWL8KSn7ubXjyFuOK3XR98aZLommfMtg 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 09/04/2024 19:25, Luck, Tony wrote: >>> I forgot to mention that this makes it trivial for any machine that doesn't >>> clear memory on soft-reboot, to enable console ramoops (to have access to >>> the last boot dmesg without needing serial). >>> >>> I tested this on a couple of my test boxes and on QEMU, and it works rather >>> well. >> >> I've long wanted a "stable for this machine and kernel" memory region >> like this for pstore. It would make testing much easier. > > Which systems does this work on? I'd assume that servers (and anything > else with ECC memory) would nuke contents while resetting ECC to clean > state. > > -Tony 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... 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. Now, responding to Tony: Steam Deck also uses pstore/ram to store logs, and I've tested in my AMD desktop, it does work. Seems disabling memory retraining in BIOS (to speedup boot?) is somewhat common, not sure for servers though. As Joel mentioned as well, quite common to use pstore/ram in ARM embedded world. Cheers, Guilherme