Received: by 2002:a05:7208:2202:b0:86:316c:7444 with SMTP id s2csp2382233rbb; Tue, 4 Jun 2024 03:57:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhg9OF8ndk2rphsde+/PpOZzv2m2qWYTLTUBUyFv9XVoR6uZl8Dg2EXUgOu3zzNftGMWOESsQ0cMj/4a3sEPxV7WVEV5SYjh/qDbaS9A== X-Google-Smtp-Source: AGHT+IE7xr6eAyOily54vJmdT9VwB19sl04fm8hBa0pyhwaTLFwKZgSQCZjJgU0WhSA7dW0no7/L X-Received: by 2002:a05:6a20:4391:b0:1b1:f0d4:71b6 with SMTP id adf61e73a8af0-1b26f29ddc7mr13225037637.54.1717498667193; Tue, 04 Jun 2024 03:57:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717498667; cv=pass; d=google.com; s=arc-20160816; b=QjQBKC8eyyVW6fwkVnJLxgR6M+KR23umggOFQ71duO11JV7opkslgqsdaxLlU6oWGL 5Mm9u6kGKTRHrBAIpB4c/wrEUbXznvk7ikka7f8u7lCb4MYS+sZlbu5xJ9Y5V7Svr28L QTI8bSb9NEmb5jNiBFmheo15MN1UG8ItIiht0bCemACiBCEJAL0z3PX+Taee3OjN1pZy u5j4rHdKfafaji5Pm0nHdJHxI9TSSMMl7yaxo/cP7mKHCWD+x8rlsw8zGHbpE9EkJfTK opvSoOcioCi9TpGAMfRK01107wa28u1zDUugaVLtqKpCCBmzzGEpJ/Xb1QUkJJUqyLT+ CGkQ== 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=e92duVq4F4AYMkgjar/7miaFTUlabeXAU70P2rCxEIg=; fh=uoASZsbZKqDw8L5uurFo+4p6vcJ5FVyNUavTSaVwPSA=; b=Yfb/7NfsAjJytMNMcr52SdP9sbn0OOHXrQump18BFog1wH/TMfrbzTGuKisvzGi0xl 2W5W0B8dIvC84nOHAJLTKMxL7JcpNG1njgOfdezII2ESKRsF5UedEM8RJwZFKHSLnxYr zWsSWn15H/z3rpXmZeyIYlDCXoikWnt6w17G68eZSMF+adLRR8Q6Xk12BAP/U+KDE1Q1 bnR3A+vEgv3c3uAhleK6q4wCXjiGrNotUwY9pDChTdlXkg2qFAaMcZXB1zg2jIFApca6 J5R1NQ3Q89s/WZsIupTw99NYGSdZGksBLeroPQ1pr/N/R30mwEP4y0UfKS67KLrSyDGG zRig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-200479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200479-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c359e09a6csi8020266a12.400.2024.06.04.03.57.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 03:57:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-200479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200479-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 63443B2142F for ; Tue, 4 Jun 2024 10:57:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF6A1145336; Tue, 4 Jun 2024 10:57:33 +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 6B67D38B; Tue, 4 Jun 2024 10:57:32 +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=1717498653; cv=none; b=JtvbER1DByY38H9VxeHEtkHi25T7fBbKv+nmCQ2jAOFnm7TwOMP7RjEsF+/P0+/iocFE4+rqAPl3CIQJlfivCEKkggETl2o+mEwZTKbHSU8FSZwANV0c6IIVRhg/0d37M3oo9fnnfuSY/a3jvNlJkgVWsqfQf5RSNasG0l1RxdI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717498653; c=relaxed/simple; bh=pDzZuelRd9zkUjP+3rv7hlwEiVL1Kt7S4rapZBl5Ko0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C0nBRLr8I/Ulzman+lXZoQplMz6K909UCxWGkCmhGt6yoT5YQQDrHFdtS/ynnH8DZShy1c3RZ8QsWciVEggVuu5Wlbejuw12IIklp99LsrN29k2lr0c4IGz+BYNnsnAM3S12GUFrv5SvljltHgMxTucl6R3oUDnbO0QtfmL1WjE= 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 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) 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: quoted-printable 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