From patchwork Fri Mar 18 09:40:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Coiby Xu X-Patchwork-Id: 12785076 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 A9666C433EF for ; Fri, 18 Mar 2022 09:42:30 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FHC27zAjkZAcs2nm04NDKflA9QVz4tWbgf3ugL1mL2s=; b=leFWHGjYTPyp2u g9X3JxWSschAEcQ3DL+LMkHgcbUUYW7DhiPyl7T0FCYEhXuiOxMODdFGHUJ/TYn03B3A2v39Pen5f FQdgFyfW3y64isMFJB5nXojwpq+dNsHwo/OsncJH5xvovgVFGwN6w9oshNG2/qCsNZ47o/qHX4oOB ad4U02zJ/jx9s97AVGkElQsYN3OyVFZQ9R1DhWLGV+4KGFUwnvVap2UkBw2W4FD2FHkEQCvGqB+pW awEl2n44GisfN78MqHLo/UnFff3AvbrrnwzW4dGMUTLNl2cdoJBykA15OLdHF/JoZxE5OuBztv973 wDV0mcpGatfa4m7Cib9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nV96e-000ztX-AD; Fri, 18 Mar 2022 09:41:12 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nV96a-000zsS-W0 for linux-arm-kernel@lists.infradead.org; Fri, 18 Mar 2022 09:41:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647596468; 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: content-transfer-encoding:content-transfer-encoding; bh=TW5vQTBj9jxEi320ephRG6rxYsKths8NA8dNtV1e1Ts=; b=S0655QMq4GcFWpz8wAA9h4SDIJ56LUC/+uAN0Y0IBJFnpMuKTTUIMWbE6cY7CUFNDs6G52 qe4PuvOpuODsy5G+eLyxYyW3cA/lf0gt8Q+DtCO15J8F6cc28DXunesWK2NBLPy7DN9i2R 0Z/+RXd3nIifzRIDz1hEFjwS40dXMY0= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-29-cOG3VgdoMlmLh8Z7a6KiOw-1; Fri, 18 Mar 2022 05:41:05 -0400 X-MC-Unique: cOG3VgdoMlmLh8Z7a6KiOw-1 Received: by mail-pl1-f197.google.com with SMTP id x18-20020a170902ea9200b00153e0dbca9bso2360526plb.9 for ; Fri, 18 Mar 2022 02:41:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TW5vQTBj9jxEi320ephRG6rxYsKths8NA8dNtV1e1Ts=; b=XxXSRuRgLV4hUF4jYKHTWGX0nQ+GdJus2BYlfZxMft8Z8tC9+D8TqEVnge0C1AJd1p gnK3mIflneiJz1Cjlat/YHnXbpMHCa0XYp1fVUu0VsuyNLmbVNQrfspA0e/6kMBnvlNK LwIjB4ouoy/MpR3hzKQQNuLF296NL3Cc5rN+Rc7gI/EKzyUAmnTlqMbnYLyRzDZ4ZsFG b9ulqBkxEOwyR8ym173Gk0NxOr5z7WzplLVr6d8R/Gs/1xOcV9uVyGSsl+bnMrBggTF9 MioIPTuv7LHoN1qAgWETJFhtJES5+CbcqIG+A/JWMMywRU/mkb4BMhDVEHBZDFJgEtq2 immQ== X-Gm-Message-State: AOAM533B3OIZk7QZF6OIIqps5+BZvZTZGrRHNpr8PvlSjR/egGSGILKg DMKWJ+qgSoCo7nS2FxeGGe6fRbvHg4X+hd2QIqR/4OI80gfxaxOsl9AM4Poe3zxkXqFtmzsvjf8 vxljLjM3wWPjdZXG0eC1xvEF6r57gJLSi2D4= X-Received: by 2002:a17:90b:4c0a:b0:1c6:90be:1e03 with SMTP id na10-20020a17090b4c0a00b001c690be1e03mr6992296pjb.7.1647596464841; Fri, 18 Mar 2022 02:41:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1ddZWsxl4lb1heQnE14vYubGoBseCng402vGUeUuZzTtw4sQg46GwNgr8r1zeKa+9KOOiPg== X-Received: by 2002:a17:90b:4c0a:b0:1c6:90be:1e03 with SMTP id na10-20020a17090b4c0a00b001c690be1e03mr6992277pjb.7.1647596464639; Fri, 18 Mar 2022 02:41:04 -0700 (PDT) Received: from localhost ([240e:3a1:2e5:800:f995:6136:f760:a3d0]) by smtp.gmail.com with ESMTPSA id q3-20020a63ae03000000b003820cc3a451sm3455923pgf.45.2022.03.18.02.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 02:41:04 -0700 (PDT) From: Coiby Xu To: kexec@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, Baoquan He , Dave Young , Will Deacon , "Eric W . Biederman" Subject: [PATCH v4 0/3] use more system keyrings to verify arm64 kdump kernel image signature Date: Fri, 18 Mar 2022 17:40:58 +0800 Message-Id: <20220318094101.274950-1-coxu@redhat.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220318_024109_135167_21943E70 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch set allows arm64 to use more system keyrings to verify kdump kernel image signature by making the existing code in x64 public. v4: - fix commit reference format issue and other checkpatch.pl warnings [Baoquan] v3: - s/arch_kexec_kernel_verify_pe_sig/kexec_kernel_verify_pe_sig [Eric] - clean up arch_kexec_kernel_verify_sig [Eric] v2: - only x86_64 and arm64 need to enable PE file signature check [Dave] Coiby Xu (3): kexec: clean up arch_kexec_kernel_verify_sig kexec, KEYS: make the code in bzImage64_verify_sig generic arm64: kexec_file: use more system keyrings to verify kernel image signature arch/arm64/kernel/kexec_image.c | 4 +-- arch/x86/kernel/kexec-bzimage64.c | 13 +------- include/linux/kexec.h | 7 +++-- kernel/kexec_file.c | 51 ++++++++++++++++++------------- 4 files changed, 37 insertions(+), 38 deletions(-)