Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp40889lqn; Thu, 11 Apr 2024 13:07:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiamcOcWrslpCqq4KZ5mN0vafIPibyPik4ff804FxbOJBTseJGJJkz/5S7uN5MIbzRFRkJS5GkUZaq6+Vwi9wCN1NBjtASn58Tu4kOPw== X-Google-Smtp-Source: AGHT+IF7j2aErQ51zORTTH6TjZk2hAqlNssZ8zAUWeZsQBIROlf7zcfvpjo5k4TUTkaA+WSQCaSw X-Received: by 2002:a05:6a00:1255:b0:6ed:d68d:948a with SMTP id u21-20020a056a00125500b006edd68d948amr824191pfi.23.1712866067289; Thu, 11 Apr 2024 13:07:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712866067; cv=pass; d=google.com; s=arc-20160816; b=qOj2KdA8GlOOCgz85ccE68G497SP7Y3QXoycfaILZQQpfJ3htoTzB4lBuXA+HVudVj SkUQjb52NZJme+95kSVjsLbEhwahyI1f73UsiYnW5GfXe83wenJj8UDRmIyqu8BIjE8G T/eqgVV+JhaYT08a7N3Av5BMml19kltKnd7GxoYMRm9iviwevksB1vxvkLDvPkOxxmS2 tyfhTMMLGmbBn0Fx698Wskr1+apBjqLC9lO2hfvwHUkR5XOoFB1/dP2qZ0Hk0ZTqN1jh JD7rmdFIxhkBM1HcdqmPp/N4N97g5iOMLG2t+sFPH+FiLokGIppI4aEzO0W8D0odDMQN eITg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=tqfOp41QoPdynRKifjyO8xtINpuCUHnUtqsb5UJEQxE=; fh=MoZyV+euipI8XTETvVwSKlfeTtJOYwtulmyqaD27NVw=; b=cCHd+h7Mrgj96OChYvUNDsdXrvHcZQOetNknfNE2gwQ4qgN3kxtZLd2G4VzHXWQLnf ZL5JH1mmj7it8MDRvoa/Tn4YgKMrXfrza6q96HxYW/RB49UgBsYlWnInBrQVwR9CgGxK HB9fD1oyhBeERMT95SoIzJCmmrgliZ/sp3f+A2RQEX6gq5aI+/DRutjQKr7BqaKr5/ZS 6ZlQRBW+sr4wDPUWObL4yfPfcMm0gzAkUFzLjJ4IE7BdXQssWNTS4UameylNxcJL3hk/ IOihoajjJeTqqs2RyZX9g8bX5cfsNi0K2bevPdx6BMywdCVWDXBbvy5HvTCrxYqRwDW6 OXvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-141543-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141543-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id fx15-20020a056a00820f00b006ecf01a3292si1875146pfb.208.2024.04.11.13.07.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 13:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141543-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-141543-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141543-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 53A48B24275 for ; Thu, 11 Apr 2024 19:37:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34E7B17C8D; Thu, 11 Apr 2024 19:37:32 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A597B15E8C; Thu, 11 Apr 2024 19:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712864251; cv=none; b=cz6UTOYMnOSIqPRYCDrayoghOZ/8zQXvjVpIpzVGblXTUvR2uxMgNPFvq0xtPyjvrtMwnvJE7av+ceFm+wAh4/t0ZoXVUc612aK6PrS0MSjCDq8lt59qvUvyB0QKRfFzj+uaFA8MjwH4oTqvWRPolZLqAXMZGBqj1+KTyLrLx7Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712864251; c=relaxed/simple; bh=MXL82c3Ra7Fc5A+1JlTwaXt8dbnThnQlOzHp9LZiTAA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=itwcf6jAMXR6HlWCv3/oIsxD5QnzbYZwEMbJbWVlyPizIhvGpNqnRBVGfxyvtauo0zdw0XUx6VTK5JZjGPXopk9Ji7bAxMvlr1pSQRCr/nbagGHrafRGibPhuVNbWA6tDphUaaFdPqOgAn5D36J+KOg+117Cfbmo1gk87NLipqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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