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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0AF7BC43334 for ; Thu, 16 Jun 2022 01:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Svl3y/7kXWgL0SggNZp5PYNQoy8GkP4K3jS5pifOEb8=; b=hDtsj+bykFgeJZyZv7UjQeZnSn XabLuU43H0Z9QJw0Z6kl+xhl0M7eKpKDSWiTw6a4Upq2dTfchRYDbQkyoCp1O1oy2QC1svDrehH7o HHshbNPB0QjtEFqCMl3bMhqAMj9qUbC4wuq00d8dfcYrrdIVbUgIDE/FlmUiKo0torujyJ4AlFLt9 5NeFSks2H7km8L5nU+6INojA78LVzEt9pAzInZxCPZZUF69LZxion5n2/8vKbvq2q7yKWR/hdfutI wMR1I829PrQ64zn5eUQv9FSQ7j9+M7ecfDl1D9xl7OAJj5cPXmVE7z8lpWK/nQ3rkcgQI3jMJvXF9 wumHw0KA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1eed-00HRpU-Ly; Thu, 16 Jun 2022 01:50:39 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1eeL-00HRiG-Hj for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2022 01:50:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655344220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fVV/WU4SmfLzF3DDklDbzisp7F5k+JmdrLDWS6yeIfg=; b=JrDyFlAvxSxlBY+HBrcP1teh/2vFF/g+pchJQdZREV57ODoGSkP2T0dAvNjkBLICOO3vqF cxnuvNUd4L3ewbdxwUpMY1LuTUQYQgUYBMGkDWPGx+ciYy/3sfps3sIlK8l3WRvBlmkKAc bozH7arTJu23kCPZDT9vdodz1qYJb2I= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-376-05NI_uNeNeCzmVHZ03MDbA-1; Wed, 15 Jun 2022 21:50:19 -0400 X-MC-Unique: 05NI_uNeNeCzmVHZ03MDbA-1 Received: by mail-pj1-f70.google.com with SMTP id x24-20020a17090ab01800b001ea7efd1e45so119778pjq.5 for ; Wed, 15 Jun 2022 18:50:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fVV/WU4SmfLzF3DDklDbzisp7F5k+JmdrLDWS6yeIfg=; b=45bMKeTBLzSMF6jZqoUIu2zXfRwDEfDmLuuKo4DX6lkgUKekhJRSInkdFEIUrB2lDl jRfwOBj1Wg4WVEUDnbPmX7qBZ7kFKWJnYFrC0G8XHrzAuazCbkToadzV03AhKxTNUqar SXN+Q8B9nb+gw+01TWm+zM1R8Dc5yyW/FISSFojIYf6C+oUotLo3gxD+1B2g5218w683 OWtQRr+LG2RYOenNP1q7AMTYKP+SU5+/GrYuD9dkv14GEXysJkH650l5bN+1ja4t2Bnh 2qcs7bUXMEuPFcDq7Ab/o9wZbYPCWZHFmQ+Pef3Hs/8rcXjLoDPzmyr3IuFH+gI57e7H Dglg== X-Gm-Message-State: AJIora9EMrLk7MlcxcnW/zLoXWfPnSIODT9ek9FKi3hkf/6KEPthOKSj IPR9fZ8JKqZo2vUviPhye6jeg/tfzyt1Z+rGSL938zhjN1nJl4jnVhhXa7UQTvrITGzQI4OGEIg 9Jty7MGnZGQMMY5tgxDtkxyj97k8fkn+he4s= X-Received: by 2002:a65:6b8a:0:b0:3db:7dc5:fec2 with SMTP id d10-20020a656b8a000000b003db7dc5fec2mr2271745pgw.223.1655344218188; Wed, 15 Jun 2022 18:50:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tat2EzR0T5nORvsBcX3iBlSsbkY9k1dYVtfU8jZxFaMpWCPS32EidaNFNhOavM/bEZa8rfiQ== X-Received: by 2002:a65:6b8a:0:b0:3db:7dc5:fec2 with SMTP id d10-20020a656b8a000000b003db7dc5fec2mr2271708pgw.223.1655344217907; Wed, 15 Jun 2022 18:50:17 -0700 (PDT) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id z11-20020a63b90b000000b00408b89e4282sm280945pge.47.2022.06.15.18.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 18:50:17 -0700 (PDT) Date: Thu, 16 Jun 2022 09:47:48 +0800 From: Coiby Xu To: Mimi Zohar Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Michal Suchanek , Baoquan He , Dave Young , Will Deacon , "Eric W . Biederman" , Chun-Yi Lee , keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v8 2/4] kexec, KEYS: make the code in bzImage64_verify_sig generic Message-ID: <20220616014748.ys3abgfakedckvag@Rk> References: <20220512070123.29486-1-coxu@redhat.com> <20220512070123.29486-3-coxu@redhat.com> <5db507747b2be22499e7357ce65f1800b36e1de4.camel@linux.ibm.com> MIME-Version: 1.0 In-Reply-To: <5db507747b2be22499e7357ce65f1800b36e1de4.camel@linux.ibm.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=coxu@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_185021_702215_12EF597B X-CRM114-Status: GOOD ( 16.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mimi, On Thu, Jun 09, 2022 at 06:18:44PM -0400, Mimi Zohar wrote: >Hi Coiby, > >On Thu, 2022-05-12 at 15:01 +0800, Coiby Xu wrote: >> commit 278311e417be ("kexec, KEYS: Make use of platform keyring for >> signature verify") adds platform keyring support on x86 kexec but not >> arm64. >> >> The code in bzImage64_verify_sig makes use of system keyrings including >> .buitin_trusted_keys, .secondary_trusted_keys and .platform keyring to >> verify signed kernel image as PE file. Make it generic so both x86_64 >> and arm64 can use it. > >^uses the keys on the .builtin_trusted_keys, .machine, if configured >and enabled, .secondary_trusted_keys, also if configured, and .platform >keyrings to verify the signed kernel image as PE file. > >> >> @@ -202,6 +203,12 @@ int arch_kexec_apply_relocations(struct purgatory_info *pi, >> const Elf_Shdr *relsec, >> const Elf_Shdr *symtab); >> int arch_kimage_file_post_load_cleanup(struct kimage *image); >> +#ifdef CONFIG_KEXEC_SIG >> +#ifdef CONFIG_SIGNED_PE_FILE_VERIFICATION >> +int kexec_kernel_verify_pe_sig(const char *kernel, >> + unsigned long kernel_len); > >Please join this line with the previous one. > >> +#endif >> +#endif >> int arch_kexec_locate_mem_hole(struct kexec_buf *kbuf); >> >> extern int kexec_add_buffer(struct kexec_buf *kbuf); I've applied the two suggestions, thanks! > >thanks, > >Mimi > -- Best regards, Coiby _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel