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 6AD95C021BB for ; Tue, 25 Feb 2025 22:31:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 05BD76B0085; Tue, 25 Feb 2025 17:31:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 00BED28000B; Tue, 25 Feb 2025 17:31:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E163F280002; Tue, 25 Feb 2025 17:31:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id BDD2D6B0085 for ; Tue, 25 Feb 2025 17:31:31 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6E18614045C for ; Tue, 25 Feb 2025 22:31:31 +0000 (UTC) X-FDA: 83159914782.30.54C63B5 Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) by imf08.hostedemail.com (Postfix) with ESMTP id 4ADD216000E for ; Tue, 25 Feb 2025 22:31:28 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="U5va/yVd"; spf=pass (imf08.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.161.47 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740522688; 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:dkim-signature; bh=VhVJnXoXNIW2rGxv8B6ZSncID97nXixrn2BTeKZTqPw=; b=cHj6vXPZTBERa7OmqizbcnkWUSzCvYQDg8xb5S6ZjxcPMG8YtvR/hCNMjxMp9cSNqUmSSL HoqKEiROq2r1OErRm1IHQe324+gqWjuREr6C7S+WmdTD8s3hMcCmOmTYrVZbRwDYndTF8V bUX88sXteS2cA/VMb0rVELvcPhsuHrs= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="U5va/yVd"; spf=pass (imf08.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.161.47 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740522688; a=rsa-sha256; cv=none; b=5tvdyIt8Lfwcb5Bz5xOX2F0WErfHX7O3aqaqiVSH6qZ1TpVfZd0mvQS47DAHkwxibIuNyp 3j4u4w4bsuIW5oQWHW0qkwvD0qsPtwcpXvIuebGxR9vd2Umi2YSC5oqMCd+SuH3bf/kaj3 N62UYXyPJJYNUtjdc9woClGCJrCAMxw= Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-5fd31d25ebaso318074eaf.1 for ; Tue, 25 Feb 2025 14:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1740522686; x=1741127486; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VhVJnXoXNIW2rGxv8B6ZSncID97nXixrn2BTeKZTqPw=; b=U5va/yVdR2Z/oPjQZlBlcgJqJNj1S9qfATrjXELXx5lyifs80hfjRM5UGT8+//Qyc7 EEIN7uAz92pjr6VpOVyLvCD7kLPKV0eXfLh5OHk2It5GgYfcXgQEbprWBV+JLIQqsXwc 6boyg7ANsbzg0fQZ8HrsOehfdwrpjotiYq+pU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740522686; x=1741127486; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VhVJnXoXNIW2rGxv8B6ZSncID97nXixrn2BTeKZTqPw=; b=rCM/FMScORSlBFgVzVrnIlr7aTJ/rc9xLpAXf/xTyychxhP5mPrNCqeug7tng5FCp6 uzdC8Nm1BvbtvqHlUDLUWqCmK2c1EjG1ZYtQ1tZGWdYGlV1J9AScu33V+9JWSWEcuQTJ UVoRC/3UkcP4XImn9CMPGa5HrptdP5HiEK19tPjU1hT+YzZLqm2vy0TKMZKB+vdWWaQS xR/KD1j+bCE1o48qoluzXdS3wh8EtHJC34jozEvF+T5hZBm5UgkWLTmM0Bl3sdRnekM4 wYwTt0whcSFajGHH1KuOxOFJoHBdXWsJCt9nERYuwGkA+DdwMO/eTTh5QIbSjAXY2//n uXIg== X-Forwarded-Encrypted: i=1; AJvYcCU4swgWDpBBkOIRRJGfHBANF5NhPtBqMGKkvrK5CtYfalrUwW+35ebGVJ/NGHJZxtd2P4xXYPYHQg==@kvack.org X-Gm-Message-State: AOJu0YxZkMAiudP7FfJAiZQgi4UqksQhyUY3rTCYwSPD+iB7B+KFCjsl BHtDNMrkmr/LNi8SvZIc2f0uTfQwU7/XBkoJ7qREAGIULc1cfS43bh/2m0W+YZM3+VHjoPCkhMa SYbh4ARR2D6Hb3NqB04OFyUesEVPb5BQLrVc4 X-Gm-Gg: ASbGncv1xdMrzC5eyQDaV1cHV8iNYxJFcXBDzwXT7rjHn4kqMiq11mH7PmlNoPk4M7q shdOLID1UbHT135aDKhDeJG4BmLTiU1EH//7wCqkkTL0NIRgBlrDWGzUgZBPsopZ9uBnYbaingn BNqVXFf+b/57M9Ub7iNshjHeizrZR3J+L8Jac= X-Google-Smtp-Source: AGHT+IHoaMAAgdkvcmv5t1AQw6jtQdqKZWncQLCcLVaz8sqam9zUFQ4TMcxQ/lXq3PaVotyYolINO/Z9y4l3VyM3fvQ= X-Received: by 2002:a4a:e9b0:0:b0:5fc:f416:e315 with SMTP id 006d021491bc7-5fd3c5e739cmr1951152eaf.0.1740522686604; Tue, 25 Feb 2025 14:31:26 -0800 (PST) MIME-Version: 1.0 References: <20250224174513.3600914-1-jeffxu@google.com> <20250224174513.3600914-8-jeffxu@google.com> <7e1bfbf2-3115-408d-a40c-ae51a7ffffe4@lucifer.local> In-Reply-To: <7e1bfbf2-3115-408d-a40c-ae51a7ffffe4@lucifer.local> From: Jeff Xu Date: Tue, 25 Feb 2025 14:31:15 -0800 X-Gm-Features: AQ5f1JoJSfGG8fQ3nGvTUL51w2Ec0D2tO9bUoVRzqnmWDbvkaEe5CXAEBzAgSss Message-ID: Subject: Re: [PATCH v6 7/7] mseal, system mappings: update mseal.rst To: Lorenzo Stoakes Cc: akpm@linux-foundation.org, keescook@chromium.org, jannh@google.com, torvalds@linux-foundation.org, vbabka@suse.cz, Liam.Howlett@oracle.com, adhemerval.zanella@linaro.org, oleg@redhat.com, avagin@gmail.com, benjamin@sipsolutions.net, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-mm@kvack.org, jorgelo@chromium.org, sroettger@google.com, hch@lst.de, ojeda@kernel.org, thomas.weissschuh@linutronix.de, adobriyan@gmail.com, johannes@sipsolutions.net, pedro.falcato@gmail.com, hca@linux.ibm.com, willy@infradead.org, anna-maria@linutronix.de, mark.rutland@arm.com, linus.walleij@linaro.org, Jason@zx2c4.com, deller@gmx.de, rdunlap@infradead.org, davem@davemloft.net, peterx@redhat.com, f.fainelli@gmail.com, gerg@kernel.org, dave.hansen@linux.intel.com, mingo@kernel.org, ardb@kernel.org, mhocko@suse.com, 42.hyeyoo@gmail.com, peterz@infradead.org, ardb@google.com, enh@google.com, rientjes@google.com, groeck@chromium.org, mpe@ellerman.id.au, aleksandr.mikhalitsyn@canonical.com, mike.rapoport@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Stat-Signature: 6xnpfwumqeeoq8pg18i5o18erwce6f58 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 4ADD216000E X-HE-Tag: 1740522688-471272 X-HE-Meta: U2FsdGVkX19LRPaxEh00Jc2avlPF57lSoKTc16EhaQvc6AW3UbnrODWgI/dX7zbkO2+b2MR3ITQWKWVyScFl2Q3sLPQ+GziFMkO7f5l1nJ6PfzOQPy8GsC+2I+6+aT9RnGDuLBRpvdnQhdYFENgKdxK4cH5mgxny96+yeQ+WCSO8oFn3ulZxveUVqXCcTFD49w4B7guuVkm+fH5XevyizpKABqcxFuekCNtsRAowDsk/sVoEvNXVClyIX3LiXcWi6TD6Rf1klzg6KdTZrXOnr1zzPKpUG1kGa5CT4+brfV+6uVYgsBdHFfkKBsIbiXy3EBC40cE7thpvSi9LkSavcEQIAfWpWgeSpJHexNU4RAcuZ5ZxX7Om8LWq9qj+VOoWMTT5HVi3HrvQKi11E/ei295kt0WKtX1RpXjQ4hH9XurCN1F2d4Pun908wEVMkE8ezvfMunxy8DlVDQ2B3Es8AcbE+XcoqQ0b80MI5bcMjIlOr3yoV4Z7nG0pq6dq6w5sZmEdEXjGuLw+0efnc9AoOnmK2TO3ogJgFiBgGwAi0Y8pGjev8ECx6RVyKOQQRC9L+W+9XZmrE2DgbClVshcd9ZTzGD9QEowvwXu0zh+SOSstuoZqNQxHWcKPGsNhA8+iGL3DkHniBRTg/kgL96KJ3HKJ/Aa5RAH9ljfmxcfriciMxVtpjf2DIeIvkrjByGTBLiMaB/Q/Adsi/cAonBJBVTyCjdNjYtSD/pIPmU2x9kXJckFWDS6wE+fLmLM5IH77/OBLWUXxFuDOm1sikXUXJ01Rxq5KYpT2vOxBlvTGraAUKgCPJpIQT66HXLYFvjumYfEIbO2oyCIPN3KQ2goCMnDajAD0+hDfuT7uP4VLwhXP3uAKLy+zPqo1u6W2Ij7KrNaBygIGHfq7ONmDt1ubtOOkKNkEWr0CUqiOZSFy/fLPhft108ciYOpWeFCc1mguwmgVY+WBznxqXLos/g6 9EMfNXBN amU0WstQpw6OeHTWmQ5DmjTDqQ1PeX4SjcZ+4VU/ZTUQa6d39y5EWQkniHXrEmvhSlnMZquax5eeBZkAsuikm6piJK5AKgmap0lgh9yQ765OQD2LQdB6Vq8YaWQLIJKLxH85gEL0oBp+HDqIF7sx5i7SMxtznZu8zl2P/IuwxvWVZe0ujnPZf99exG/6/0OeiP7gGE5CiLZDxtH3UtfnPR+PNnd+vKlLG9jOSycYukcgyBVNxq7GqLsYs9P5w1xqKwrEJriw0maZbuUjC4xL6lHZbmxGu/7S76K95f8GLC570XFaXcrNepvJnBNJ7JAhoUDel X-Bogosity: Ham, tests=bogofilter, spamicity=0.003608, 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, Feb 24, 2025 at 10:07=E2=80=AFPM Lorenzo Stoakes wrote: > > On Mon, Feb 24, 2025 at 05:45:13PM +0000, jeffxu@chromium.org wrote: > > From: Jeff Xu > > > > Update memory sealing documentation to include details about system > > mappings. > > > > Signed-off-by: Jeff Xu > > --- > > Documentation/userspace-api/mseal.rst | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/Documentation/userspace-api/mseal.rst b/Documentation/user= space-api/mseal.rst > > index 41102f74c5e2..10147281bf2d 100644 > > --- a/Documentation/userspace-api/mseal.rst > > +++ b/Documentation/userspace-api/mseal.rst > > @@ -130,6 +130,13 @@ Use cases > > > > - Chrome browser: protect some security sensitive data structures. > > > > +- System mappings: > > + If supported by an architecture (via CONFIG_ARCH_HAS_MSEAL_SYSTEM_MA= PPINGS), > > + the CONFIG_MSEAL_SYSTEM_MAPPINGS seals system mappings, e.g. vdso, v= var, > > + uprobes, sigpage, vectors, etc. CHECKPOINT_RESTORE, UML, gVisor, rr = are > > + known to relocate or unmap system mapping, therefore this config can= 't be > > + enabled universally. > > Thanks for adding this. > > Similar comments to the Kconfig update - you are listing features that do= not > exist yet, please just list what you're doing, specifically, and avoid th= e vague > 'etc.', we don't need to be vague. > OK, I will remove etc and list the known mappings here. > As per the Kconfig comment - you need to be a lot more clear, I think you= 're > duplicating the text from there to here, so again I suggest something lik= e: > > WARNING: This feature breaks programs which rely on relocating or > unmapping system mappings. > > Known broken software at the time of writing includes > CHECKPOINT_RESTORE, UML, gVisor and rr. > Sure. > You also seem to be writing very little here, it's a documentation page, = you can > be as verbose as you like :) > > You really need to add some more detail here in general - you aren't expl= aining > why people would want to enable this, what you're mitigating, etc. from t= hat you > explain _why_ it doesn't work for some things. > The mseal.rst already includes below regarding the protection/mitigation. > You're also not mentioning architectural limitations here, for instance t= hat you > can only do this on arches that don't require VDSO relocation and listing > known-good arches. > > This is a documentation file, you can go wild :) the more information her= e the > better. > > WARNING > =3D=3D=3D=3D=3D=3D=3D > > > + > > When not to use mseal > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Applications can apply sealing to any virtual memory region from users= pace, > > -- > > 2.48.1.601.g30ceb7b040-goog > >