Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1243923rdb; Fri, 16 Feb 2024 09:21:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZSY5fJ7ndrSaXfN2AdW2w2M+J+Z7FesD+g9MENj7NuCEo+RZEYf6N89vaR07hLU2XCGKbPLDbb+6PF9OIQqz1UE0z4WaEgG05Jgsf0g== X-Google-Smtp-Source: AGHT+IEOJr6QCP2NFprgt9dURkPQnfJYO/6uZt2hOq8jt0Dj+ODtTW5LvHzVaBEmMm6SZr3LsCzL X-Received: by 2002:a05:6a21:8ccc:b0:1a0:5f9b:9ec7 with SMTP id ta12-20020a056a218ccc00b001a05f9b9ec7mr11684923pzb.13.1708104114963; Fri, 16 Feb 2024 09:21:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708104114; cv=pass; d=google.com; s=arc-20160816; b=ldib09ut/WruzbL13lTuwPoAdZv9ZfsdqogrjO1ZrBHqEfKN5AYHWuB5NdbpTFe+Ku yevtYgszblm/0uT7I6t9S8K1y4zDu7+NTZ2JzUuzIU1nfzsSSCCqWO8OdDk+1ZUyDSZM DSlYNlWNvK8vyxNhgZyOyRIL+ZZMr1ZWiuJkEjyIjch4qH4jjOlty/LuF/IzwlP4X86N Ohg0HSR4E9C06VYDRWl3tlCB+uEZkEYBZzlpUwm25t8RWu7cWf3ZjXv0U8n1Moppq1A+ ZMwCSoxh47OU4Vj2ZpQhMpdBOYgu4f+SvWjNa56igFQgT65Cbd3Uaxxgd58pLktZ0AjS HAAg== 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:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature:dkim-filter; bh=aNfLYadEKHx+SL9kFO60R4a0MD3kWy7oxdB7GLLKR10=; fh=vz26FThwn7xhk8AMLNkK664KFRkboJZS1qVeRXt9hNg=; b=aLS4U16p+YZKB3lssbCFNFL29mMVAUzbyQ34CUDgzkk7Bp7EPclIHv05FGU05oGLLJ yZGHm+ACF+MwS+EgXMUEci8ZC5xUwxZ1E+rHaOKZsAjZWV8v2tljkvfIxbzkH4FRitjI Nf1bfFdoxgMPAkWXXJtKGZMqAhidU8u+T3hGp+AlaHepadK1i7nF0E1cddgD1QQWtcHh SC+tsZltnS/X7Vkn6QRGESrPYQaDgEb4dDFnHb3a0pDSbdAp6SGCDYA/ddF5OKDMe+rn fPIrKBmUd6VPaQ3Rz6TnwAzbrTduaI3zTTB6cx9CglE5pAZtn3iyvSyUBxLyqR79MtMf FKww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=DmQvSnrJ; arc=pass (i=1 spf=pass spfdomain=lwn.net dkim=pass dkdomain=lwn.net dmarc=pass fromdomain=lwn.net); spf=pass (google.com: domain of linux-kernel+bounces-69064-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69064-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 71-20020a63004a000000b005cd8b5dfe9csi176789pga.491.2024.02.16.09.21.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 09:21:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69064-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=@lwn.net header.s=20201203 header.b=DmQvSnrJ; arc=pass (i=1 spf=pass spfdomain=lwn.net dkim=pass dkdomain=lwn.net dmarc=pass fromdomain=lwn.net); spf=pass (google.com: domain of linux-kernel+bounces-69064-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69064-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net 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 A25072824D5 for ; Fri, 16 Feb 2024 17:21:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FB6913174F; Fri, 16 Feb 2024 17:21:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="DmQvSnrJ" Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (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 CFBC312FB1E; Fri, 16 Feb 2024 17:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708104107; cv=none; b=jgfEy9Eg+R/eQ39IOK6ll2Gu/Y8n3uwiPqEXYH1pDRA+g19OtLJvcsG7TaBwZMZ5wamL6SavRkRKJHl8XVJF10b9oqVFZeaKmlu3/5BMLi0uQRj0HiUwQwt0EjKBNkrtcog0udTGGp2RiUtPMGJ+iXuIEop12nc+DOClRcZKP/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708104107; c=relaxed/simple; bh=oZeRHJftRcXIPRMRWgsAE5DzyVWjn7Rzy5pxYXTYzMQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=BD+Rvjlowg7ZT4ebTUfgqfmB0YhnNkvZt1McXn2XfUIhpo1DFUtSnCTd2K8bKuVLC5zrHobKGz1clKlJMdmITwds4SHajz3ogoOh3amXQifSmY1xIeRpO6bVUx6tCtnNAww3MyhreGHXPCC0VL9VJ9U34o5yK4aSCLwX+eBPvh8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=DmQvSnrJ; arc=none smtp.client-ip=45.79.88.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 8EB8F45ACA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1708104104; bh=aNfLYadEKHx+SL9kFO60R4a0MD3kWy7oxdB7GLLKR10=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DmQvSnrJh8pC98E3y/Az0E7/FIQcF6lBhH6H9RYJ72Sw7vMfJz4qZf55MPy7kIieK +2969T7Uui5YWx298SOTzUX7shUTNA6c+J6E3IDoNS+P/oGTxqm4VhpH44hOzNSZWF 2pwnu3URWk4Su2Oc3l0ydhl8fcwJRIao58D146eCXU+9BxRLXTOa0FRcaNJ3Rvo/8q 54RhOFOjwR9bbDmm7Bk3z3mbWAKnDi/yGGkpAFkeLmmIwz0cwdD25597Jw0bHDZgbK Q2EExcyrAStd/8D6a0FF1fDYVJLKxqXzKayZ9q9CxRtHSG+dXXDDvZ0gk2gvJd5+9h fid9Y+jTaJdhg== Received: from localhost (unknown [IPv6:2601:280:5e00:625:67c:16ff:fe81:5f9b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 8EB8F45ACA; Fri, 16 Feb 2024 17:21:44 +0000 (UTC) From: Jonathan Corbet To: Petr =?utf-8?B?VGVzYcWZw61r?= , Dave Hansen Cc: Petr Tesarik , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Peter Zijlstra , Xin Li , Arnd Bergmann , Andrew Morton , Rick Edgecombe , Kees Cook , "Masami Hiramatsu (Google)" , Pengfei Xu , Josh Poimboeuf , Ze Gao , "Kirill A. Shutemov" , Kai Huang , David Woodhouse , Brian Gerst , Jason Gunthorpe , Joerg Roedel , "Mike Rapoport (IBM)" , Tina Zhang , Jacob Pan , "open list:DOCUMENTATION" , open list , Roberto Sassu , David Howells , Petr Tesarik Subject: Re: [RFC 0/8] PGP key parser using SandBox Mode In-Reply-To: <20240216170805.0d0decd5@meshulam.tesarici.cz> References: <20240216152435.1575-1-petrtesarik@huaweicloud.com> <20240216170805.0d0decd5@meshulam.tesarici.cz> Date: Fri, 16 Feb 2024 10:21:43 -0700 Message-ID: <87y1bktjdk.fsf@meer.lwn.net> 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=utf-8 Content-Transfer-Encoding: quoted-printable Petr Tesa=C5=99=C3=ADk writes: > On Fri, 16 Feb 2024 07:38:30 -0800 > Dave Hansen wrote: >> I'm confused by this. The kernel doesn't (appear to) have a PGP parser >> today. So are you saying that it *should* have one and it's only >> feasible if its confined in a sandbox? > > I'm sorry if this is confusing. Yes, your understanding is correct. > This patch series demonstrates that SBM (even in the initial version > that was submitted) allows to write a PGP parser which can survive > memory safety bugs withoug compromising the rest of the kernel. So I have a different question: some years ago we added the "usermode blob" feature for just this kind of use case - parsing firewall rules at the time. It has never been used for that, but it's still there in kernel/usermode_driver.c. Is there a reason why this existing functionality can't be used for tasks like PGP parsing as well? Thanks, jon