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 B334FC25B78 for ; Tue, 4 Jun 2024 10:57:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 343FC6B00B7; Tue, 4 Jun 2024 06:57:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F4D06B00BA; Tue, 4 Jun 2024 06:57:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1BBBD6B00BC; Tue, 4 Jun 2024 06:57:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id EC7356B00B7 for ; Tue, 4 Jun 2024 06:57:39 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9C7EAA24B0 for ; Tue, 4 Jun 2024 10:57:39 +0000 (UTC) X-FDA: 82192905438.20.C26AFD5 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf19.hostedemail.com (Postfix) with ESMTP id 8C6CF1A0003 for ; Tue, 4 Jun 2024 10:57:37 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of "SRS0=dfpp=NG=goodmis.org=rostedt@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=dfpp=NG=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=1717498658; 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=e92duVq4F4AYMkgjar/7miaFTUlabeXAU70P2rCxEIg=; b=pLdmrE8n0clGU7lLysUVOnKhuYe8qbtEc//QaXC7gxLk51uofgVBFoyU2WciXbU4KqgMzB FzB/fqOixC2/Q1dgovPQvYCtmaNeOWnirHoREL7Huov4I25uoCXc7jH+t5kE1jaF8W4Du6 Ery5i8gyg1WmDJPTW0IKgA6RR7ue7s4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717498658; a=rsa-sha256; cv=none; b=aBQzzdg83zaF7anFIA1C6Q4tLU2P04gcbuabz0KaZSMFI6g9jbMdENDROJrL6aGOllpvb5 SIdYC8SoN9NR5DMbRmM5/RXypKjQ2I7uFxYDr0Jf883q+CZJajCd0NxbjhBxTF1nZyCZC+ mY17NvqpEWfoR/TYIrdpTFx6ys1cfIc= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of "SRS0=dfpp=NG=goodmis.org=rostedt@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=dfpp=NG=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 DAD43CE0B53; Tue, 4 Jun 2024 10:57:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17DD4C2BBFC; Tue, 4 Jun 2024 10:57:27 +0000 (UTC) Date: Tue, 4 Jun 2024 06:57:27 -0400 From: Steven Rostedt To: Kees Cook 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 , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , linux-hardening@vger.kernel.org, Guenter Roeck , Ross Zwisler , wklin@google.com, Vineeth Remanan Pillai , Joel Fernandes , Suleiman Souhlal , Linus Torvalds , Catalin Marinas , Will Deacon , Mike Rapoport , ardb@kernel.org Subject: Re: [PATCH 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up Message-ID: <20240604065727.4deefc04@gandalf.local.home> In-Reply-To: <5DAB46F6-F415-4C2B-AA6A-E0049CF6270C@kernel.org> References: <20240603233330.801075898@goodmis.org> <20240603233631.452433539@goodmis.org> <5DAB46F6-F415-4C2B-AA6A-E0049CF6270C@kernel.org> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 8C6CF1A0003 X-Rspam-User: X-Stat-Signature: ermsqenwq1cokax6smga9543ph4b6gmz X-HE-Tag: 1717498657-203689 X-HE-Meta: U2FsdGVkX1/+sKDwZ/gj+PXsa2PLdaoiRQeOD9/GfB6J6YqMG8XHKsbNHJGpbDKESfXYIfW7VJOIgOS8Ud7PbRO4mbHrRXy3fSryenZHj2wg4bTUKXVVmbc853iaB9w7U2Ecgwatl4myT1sre9ljCZ3zVNA+eHl+/yY0QAeqsb3hwctmf0SuKh8G+4YYwrL+s1uTb6fE6++4pvuLRhEsHeZFd9QKbRuOZs/Knepvxya/30tfL1BLOkCtWaeIMFNS7IA8/rEaI4VKQDIn+h2kvHKr3PuRdXnpWN6LiMMbqz0MMvUGyNkkJeXQfxRPb9LKoVtS/GoncM9VX3myigUPxcrMcjQ8GlSZF0f08K4O/0vfWZ65mkE5rbeVTYDHQGn0eVBCCx+65ugV+xALG76HjExJNIWpYrs56ArFrbo9XjelxxoB4RQZGBcFryul4Ty8g9XciHcDCr4J2lT5X83qH9AOrY5qK4QzAUx+kz72BZYpZpD7WmxLOwOs9F3m84EN3XdYu5GlA28Xv/dgvv66xP9+PO9sqS5rq8jS05QhLhDhatkL+hs+6W2ensvF0m9X1Ayj8v5jJ1x+hRANWvC1tKrPH0yMUvAyTKgV8I6bz2EFpFEDEoDmZsJbkiavm88i64YUKKCmwqf2EUpWuPbqWEku9dyBR/xCju5SAa6oHQzdB8CRo3Vouv1PIpSbrJmHZwiGV+NCROmhVcYpClFZhM0cuVMvNHGSMRASdYSMBjltwZIb/0H511wLNTPS8tttTcdvgs0b6jHqrfY/6axqBQrF5ZJJ8Jop5aew6dd8TW0zyLoDG23L8z2w7CoYsJ/eF2iSFcrp//xzsPKcOsh8Kwg8WbcUHH/zcy+YIvQie18p+n6oK1fI90MZ1cH9gZKrD9Ol7ib9JN76uYCLu7fR+RpolifRUBKn3B4NZZ3ZmzvvZ5aJ/NPj6CxMGyzQPa6VlJI7wtZ0m5yq49xWnw+ keKWfhvt tQCglHqtPQUcpxnCEyzhwdMdcscJSJDuMaAyS9OTeC3+2ts+bna0Pd/UpP+QVKZS/ebU+Ku6dfFDn2AmoNVtQVMkIOz96J3rYaAEI7KJqFSYUVV8r8N0SOtiYZsT+NCt+V/utLr7edeaoclEGEBJi+9trpjymNMEjBRIcIYCLaHLIQ+Kr35M03pUiAvLw2ReF4f9UOxcgZSI061/Ch58XQi/oDpq6hi13SJFpPxMcsuv8ya+Co+rKrZQX9VZ2QgVR1Immss+PmiascUkmjuiShd7/xs4Uu2U0BPw8fsgB/vYt0XM+zkEDURRR9lNfH+3A1E6lSPjQLH0sY7Rr9siquM6uGt+FE5LrLPFXviIn2RUhK3vLuL+xdKbytTTV30odF8ornFGWf+GrCpDASCIR4SIzW+bDvEO5mvO2 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 Mon, 03 Jun 2024 22:52:37 -0700 Kees Cook wrote: > On June 3, 2024 4:33:31 PM PDT, Steven Rostedt wrot= e: > >From: "Steven Rostedt (Google)" > > > >In order to allow for requesting a memory region that can be used for > >things like pstore on multiple machines where the memory layout is not t= he > >same, add a new option to the kernel command line called "reserve_mem". > > > >The format is: reserve_mem=3Dnn:align:name > > > >Where it will find nn amount of memory at the given alignment of align. > >The name field is to allow another subsystem to retrieve where the memory > >was found. For example: > > > > reserve_mem=3D12M:4096:oops ramoops.mem_name=3Doops =20 >=20 > How does this interact with KASLR? It has chosen its physical location > before this parsing happens, so I'd expect this to fail once in a while, > unless the size/alignment is lucky enough that KASLR never uses that > portion of the physical memory... >=20 =46rom looking at the KASLR code, it looks to me that it picks from 100 different locations. I could be wrong, but if you have sufficient memory, I'm thinking that it should not conflict. But if it does, yes, it will fail to pick the same location. -- Steve