From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="OCN94ZFt" 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.