Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp108446lqe; Tue, 9 Apr 2024 16:41:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTx/edAQw+2nsk6GhUmvRZcEXHQDVLTLALcgREmcTJLLnT0JrT7LxVLsxy6Ea+22j3AljTp9bqWbfrkYvu+UZdA7SthzcgM5iyheYyig== X-Google-Smtp-Source: AGHT+IEgmtPRp52OySWVVatWEWgGJNEjcXbDjRw3T0Oydcl5sxS3fCsURUgF711iDCpV1+uIpijl X-Received: by 2002:a17:903:1112:b0:1e2:a31e:2062 with SMTP id n18-20020a170903111200b001e2a31e2062mr1541238plh.53.1712706095662; Tue, 09 Apr 2024 16:41:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712706095; cv=pass; d=google.com; s=arc-20160816; b=Qb6C7asqitMHY7zAPA9m4d4lav0GhTHbUln2CPi3s/NwhZ1ZcSIsk4kn370W7kshDB wJkMUmCicWuUpQRTxweVoHUvnogpMe20ZbEVhP/OwItCDi6VScr4KrRlWZTsVPcFakYJ MmB2oR8JJGU0PdPrMXub95f7qFZ4VGUcbgoKrb7fgRU0t6XGf74hCr9DYCr1iBDQTPBg WpDM6/Kaf4eKv+kogq6z2ei31R/hYv334uZO7HRmOgPhpApsJVea/pg5S+NMcmH1EtS3 c1nYtwDB51j8tjaH7lVFBhzmXf7afzsfsM3zWMeqNDK/2+bXfMaFRxy13bZNSeI0Yf/k Owpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=az80y3cRpLeKTQubgh3fpGGNWsXUAJ+YmKoEHWsOqi0=; fh=k4SlrlEGTrHOMVXoccoVazQgKvryFofHyZeMb03is4E=; b=vS7g5Kp8yL8P8pTdxY43UHLoLklCbi0ILkCpHjky6ExkyqnEBo/PdTfxXfQ1yNS5b1 v2fTbaJxuTovPjBBeQzdBy6UIT3jr+Eor7883XZs6uWnQp6sAAOqNDEyKiQ9b8F+B9b1 q43Bmg4dRM54agoYFQNDex9mBbEuSHV2FuZ+r1mT8a7by8HKju0wmBqjscp0em/nszIl ROY9p3D4A4czuIFr1MY+e2Yb+nX/ODDit7vrE3M6N358SqRbpslaIlE9K8EzvnHwJh7i oMKYhjF/9b8aM7QuQyK1Uq7dA1ZwE5mqJQErHy3G1rl8k9TqXWqzz1il7RgpXBXxYNM6 KY8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hqexQfx3; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-137704-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u7-20020a170903124700b001e2a43e6246si9616942plh.179.2024.04.09.16.41.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 16:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137704-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hqexQfx3; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-137704-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 538BC2832AF for ; Tue, 9 Apr 2024 23:41:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54A55158DD3; Tue, 9 Apr 2024 23:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hqexQfx3" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40635158D6F for ; Tue, 9 Apr 2024 23:41:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712706088; cv=none; b=OxgWYYVgGrYuk3UYkfyGHUs3rLvwPIHSCQIEoFrx/GLUVgBFyTnHmP0cflkJTc8lCA7nOOgBjHRlpkzdBuH+e1eMa7r/r8DvxMZWhf73BJF49X02AExB39JBaImFw7WyPY6/stvExKu5xKxAF4RPw1TXmgXi8VkMHptBbcfUcwM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712706088; c=relaxed/simple; bh=PNy0mBQjw8E74b5RpE2uI+eSralfxKJ9opohJxEN5zs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AR1DLcAJBR0rjIw/iOx3lEYAgc48lt4GhE1ZzJmRjrHIYKhYUuBI9AB6oQbnWUfkXEELmwbYK88G1FHDeTZhy2yj+Kat+gpij5pFQdNFN2uIC2/4BrpArGYsEYQI69JdISfu40lkwWOv+UdEtTgc6L1czkDxuCKU96nDZ3pgrnY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=hqexQfx3; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1e419d203bdso19137825ad.1 for ; Tue, 09 Apr 2024 16:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712706085; x=1713310885; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=az80y3cRpLeKTQubgh3fpGGNWsXUAJ+YmKoEHWsOqi0=; b=hqexQfx3TXWIybb0PG+TlGC4BL56oWeQxCwLNoaRJrD358ZJ+3Dg+rn3/l2g0wGHT3 VaJ2nI6OucpsafkPcxU9dQb912NbDVISiC6YWdcvhFwsHK4mRXWuVPXv/0fnjxklBUEh z/Xn5agxzzBNh29ohDarnfTFTm/D4/25nUGwU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712706085; x=1713310885; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=az80y3cRpLeKTQubgh3fpGGNWsXUAJ+YmKoEHWsOqi0=; b=JuyRAE5In3lQXQ4Ix+gb5DyjUWvQ6C0eatMIkBKsar9JxHkap/NvvRpkO+rzzn2vEJ LcPZef0Tr8pyKcl+P/yJMu07451WO0+TuIYabJuHru69kVWPPJLm+paMDCHM8QI9sKK/ J+01B6NSaBUMdPk4ABn/oFvlynhmpkr1CLfg3o9hsqZvUGk3vOMvpfjOdhybybSeTr2o L25cu4u1MMRe7r/FP8StmC7GQHk1fBT+JYgbI8ppLO3L+vrgoJIEqwxtQd9z0d4Nuz4F Ciyq/TyEUMDpZ+2A/FoA48PFiH7/ASBjx/ngTT6hThvL2YvNKWcLEmvv/35uudjIRJg7 5wwg== X-Gm-Message-State: AOJu0YzElpE4cVMW/6dsi5VoqZDv4qs8l2GTW/brqPaw7kmfg7PBZRtK qjgDSVyqEXiA/L+WSsLGfAjz853cwqsntcrNmmI0tIwQiIpVOw6kFKDKxZvJ/g== X-Received: by 2002:a17:903:98d:b0:1e1:214:1b7d with SMTP id mb13-20020a170903098d00b001e102141b7dmr1718191plb.61.1712706085513; Tue, 09 Apr 2024 16:41:25 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id e6-20020a17090301c600b001e43a00ee07sm4255351plh.211.2024.04.09.16.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 16:41:25 -0700 (PDT) Date: Tue, 9 Apr 2024 16:41:24 -0700 From: Kees Cook To: Steven Rostedt 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 , 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 Subject: Re: [POC][RFC][PATCH 1/2] mm/x86: Add wildcard * option as memmap=nn*align:name Message-ID: <202404091638.2F98764A41@keescook> References: <20240409210254.660888920@goodmis.org> <20240409211351.075320273@goodmis.org> <202404091521.B63E85D@keescook> <20240409191156.5f92a15c@gandalf.local.home> 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-Disposition: inline In-Reply-To: <20240409191156.5f92a15c@gandalf.local.home> On Tue, Apr 09, 2024 at 07:11:56PM -0400, Steven Rostedt wrote: > On Tue, 9 Apr 2024 15:23:07 -0700 > Kees Cook wrote: > > > Do we need to involve e820 at all? I think it might be possible to just > > have pstore call request_mem_region() very early? Or does KASLR make > > that unstable? > > Yeah, would that give the same physical memory each boot, and can we > guarantee that KASLR will not map the kernel over the previous location? Hm, no, for physical memory it needs to get excluded very early, which means e820. So, yeah, your proposal makes sense. I'm not super excited about this be x86-only though. What does arm64 for for memmap? -- Kees Cook