Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp28595lqn; Thu, 11 Apr 2024 12:41:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCNnvADUnLwTqMwb6N0AUhob71ojO6lWc8iwQ8vsdg6w8Hapvmdh4znbH8V18g9q4/lUhTRsp5xY/iFLiRRIvjYN9Gs3kcB65VaXbC4g== X-Google-Smtp-Source: AGHT+IF58Vol0wjm9vgCpgZ+sUGfcAtgDNpqMIk9yD6wOroE4iLhT7TTbl6gk/RkyB8efpdwSpBI X-Received: by 2002:a17:906:2988:b0:a52:2486:299f with SMTP id x8-20020a170906298800b00a522486299fmr320461eje.71.1712864494483; Thu, 11 Apr 2024 12:41:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712864494; cv=pass; d=google.com; s=arc-20160816; b=DL1vPYiP4A6AmyuyOQUaosqep5mEbM4tCVSmPIpKVGj3agFoABPBZecuTRfZGsReNd smTGKlZZLK1pdM4uyBcxc2s4tP3YXrGIiNm0BMLeji8d1crjMepc8ycWn+rMCe53knu4 KAKw1ur5AUvdifMsKdxILxrkSMwOunlLN94QMkmtqrlYeIzSnGTeyy1OILJskTqgB2VP oCOgNeOpk/tw47nwf7LBsOOKki1dw3AZvNgr3+Mbsn10hggz5OrgUB1h+14DdqZGedqa uOlLTJHUp2CL9xHVu+b8Hpma+0dtJG0Xx86t4qWsRuQfsgKGKseSpBObXrxHF6YYq/kG 0dog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=fZ3fmdT9oUgO2wmrYEOWhcDcwgmf7m8Sawtw85kAd7M=; fh=Dpe8gdT7v1N+lbnLLc/FLKR78ZgGaAQ5eEMU+ry8oPk=; b=x1YVRB56XooghScfDU/fdW7YX9WL/SMdD0ka/Mnpla7Gn6ttDY2TDMSM1VI/snTa+d gc6rikKOskWGjzUezw/FXYYsioZ42rovbuoWHM/6HivAaG2C1Xlg6JkanGSXggtIYCrC T28l677/K30DA5EqlcQJBaLF7b3Snbtd3tJr7dXGI/asSF2GlJ/7HERu5W7AS5DgFxrW OpHIfx3+8xeus8GRxexiWbe5IyCQEWMl1qIx8wU/deYEjKtrxLwFiFSIKEBcIV0tjWVy 0HmhP++dCEtdW5BfioWWPlOJv0Zx9IICL7VKDF4bO9MlLOuLBh0YZC0MrXhpjukMKm4+ X44Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=RaPvBAkF; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-141541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141541-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qb2-20020a1709077e8200b00a4e2a10b9d9si1007127ejc.91.2024.04.11.12.41.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 12:41:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=RaPvBAkF; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-141541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141541-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 753901F28600 for ; Thu, 11 Apr 2024 19:35:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42AA91756A; Thu, 11 Apr 2024 19:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="RaPvBAkF" Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D78417559; Thu, 11 Apr 2024 19:35:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.60.130.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712864145; cv=none; b=HQExBJoWoRY5eRuBKM12FPutgKlMWHSz/GoVdpEFC4HyIMduNWtwx1qxdlWcDzl6Kv3PnVtWo8XVcHn/x99VgYkrmngJcqPgzwyJChkTh5MTbPBqUVe3y3Jirs0D0fpdrorUAsJ59047JYZa/X268pwmrLqbFv8MXmABSMGlUn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712864145; c=relaxed/simple; bh=hCrHI3N1KKEbZ9Ju9XCvyw4U1X4GrngN7equ1CZR5RQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dBYadDCbOrpHX64Alr+pAKCsndwYr4iB+HbG5WWTyw5HnbDgXFgTKnCrN92uUfJezFqjZaHYK08rpvwez/w5exDMDZfHYPWoo4w4uKB4UryphE3mOh4rpWvUiO6TX7iF2FbgiX5DjnT1Ts+1f462/TCkJfDqAU1BzSd3+aAE4Kk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=RaPvBAkF; arc=none smtp.client-ip=178.60.130.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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