Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1320938rdb; Fri, 16 Feb 2024 11:47:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU5akfCc6UNM+09mMLWM1m4lYaGhDoLuPIaQCCCBebmeyk4p6ou40eublJ0P6GQDpsmpJIO27zJf6XYbR1SAVV8qIxzSLhRDVs1RyeaAQ== X-Google-Smtp-Source: AGHT+IG4WLKIxy49IELv2hvHe5itOEjPnET5IwJyOoJa1nVxk/4qtL2c8qeVRl2qO79kZAOvFvTt X-Received: by 2002:a17:902:6a81:b0:1d9:924c:c9cb with SMTP id n1-20020a1709026a8100b001d9924cc9cbmr6102033plk.37.1708112853876; Fri, 16 Feb 2024 11:47:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708112853; cv=pass; d=google.com; s=arc-20160816; b=Rn9/y++/W9fTZB+ORAn0lzKD36gGD7LBL/0LJ3u+s2Et8fSQB8s1mMebhguznf3rpN jeQ6LMxrP8U0RB0fVRzzWDnGks32i+5S2H/7eCrLt27NBbHmAgoh1elFcVNJGAxYPQQU R+H/CezwzIM7HHZ7l2vQDUfT+2r60xX8JRgNMaFrXxJGE4BR8OVBBJnTVondTPfBT8xT bv7rAKJemCRZaodstnJz47JX5yyFi87V6Le2hvrRm07BTz3ucmv0PuPPbmw95eGYmjnO ea5ojM2sqa5xN4X7IZamxlShXCTEvidBNMxi3GaBXGo5nx1olPal6maUrSyOi4HBGWpi 9NdA== 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=DJeGR7MecqykZ6Yo2+icCQoR/1eFxGrSeBJy2YqSm+M=; fh=8gbRME0HqV/TTWOzkPwLkEw8Ym4TATAOX+RroK2iOYs=; b=wesQPcajsXwFTNlCZLZvtG5odac022EtuL01V/pvMnq63JIMkZeFasNnOGJKiengNR P3XS65H9N4Sg82jda4QJmDABKXatOBeeohfnI5EOY9LbPQcCqut17YYDnUiOtUcOQJVA eWOMYg3vqR/15QxTlqogm+8Wqj2PqlWc5K2NJnqkdOxrEbbAUToiTT1oZN9o+KYy2N1G 85eiqa5wIup1KyoTl7N9Pqho44Ql/jLeVGjN/moGhT6/TtmrpQ/dCVXROEIHZ0gu3Vwe VrYazj+KyhaeA/hYkXu2IfDoR16v+JqIB3VBuofXa4/UC8ehFeoIsyT0IS7InkIaBzk8 DlLA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OCN94ZFt; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-68976-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68976-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t24-20020a63b258000000b005d3fad648d9si338026pgo.296.2024.02.16.11.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 11:47:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68976-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OCN94ZFt; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-68976-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68976-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 CE256B213AF for ; Fri, 16 Feb 2024 16:45:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97B5443687; Fri, 16 Feb 2024 16:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="OCN94ZFt" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 E921612EBC8; Fri, 16 Feb 2024 16:44:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708101896; cv=none; b=Qcz80kwzdl0cqsAfJvTIcC6MRvxG8bz4GnsFBq4fg3TUiU6Fga9CQQxXbiucbLMYYPEaqVZ/+IkkACwpld1U3fCHcts6SGr9C3tpiAXlz+ixxXmV4XRTdDvl4GNEGWU/X5RDdmC6u0dIwgfKxClv8RJ8JQf634ai7lGnVlcY3JA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708101896; c=relaxed/simple; bh=DREtwBpdo744kwdkZr603r+e8INTDQG/jJ9H007lpGU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RxLovDh91sA9PJJeOkPXB7vnFJ626ydfzMpOiSoXkGZ/6bAs0NJjOFK8zHNokVx5V86gi4ml2f1zKbU33AaFD4gFYO7c/0l4xJVodY1QBKbvzfj3Kyjd+z557mw4xcD5i9yYUN/PBfnouqntkRxhld5jCtlnr+0JhxL2wMPPr0Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=OCN94ZFt; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DJeGR7MecqykZ6Yo2+icCQoR/1eFxGrSeBJy2YqSm+M=; b=OCN94ZFtA2QEKgR8FMWB0K+p5s 10xo3S9zwWVEv2IFIeoXxpbbNNExUy8MZRj0tu1FNV/NY7izR3/2GvWwzHS2/XsaEYF+ukqdDg3MN Qv5SSGtzWgcPs7bYwCIe9KA6mt7hrHCgzJpSXdDL3JHSnKsNipkrO74wBTX2Qcf82tdNThyU5SP0l 1BKYP2iS076KAPaM4V7YHg+OePMJZGawKk8QNT0Gom1sxZxHCPo3qAKGoqs61M88f1QaDG+Ls4B18 qX1XBOg1OJc9N8wiSkxUWLBcBWp6525NUhTj8vuLe5WU416KrZa4p/zydvGXPT1JSv+uvfOBWEVB0 HzJd44Rw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rb1K3-000000058zn-0K4J; Fri, 16 Feb 2024 16:44:23 +0000 Date: Fri, 16 Feb 2024 16:44:22 +0000 From: Matthew Wilcox To: Petr Tesarik Cc: Dave Hansen , Petr =?utf-8?B?VGVzYcWZw61r?= , Jonathan Corbet , 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 6/8] KEYS: PGP data parser Message-ID: References: <20240216152435.1575-1-petrtesarik@huaweicloud.com> <20240216152435.1575-7-petrtesarik@huaweicloud.com> 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: <20240216152435.1575-7-petrtesarik@huaweicloud.com> On Fri, Feb 16, 2024 at 04:24:33PM +0100, Petr Tesarik wrote: > From: David Howells > > Implement a PGP data parser for the crypto key type to use when > instantiating a key. > > This parser attempts to parse the instantiation data as a PGP packet > sequence (RFC 4880) and if it parses okay, attempts to extract a public-key > algorithm key or subkey from it. I don't understand why we want to do this in-kernel instead of in userspace and then pass in the actual key.