From patchwork Fri Sep 4 07:28:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chester Lin X-Patchwork-Id: 11756141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A835D91F for ; Fri, 4 Sep 2020 07:31:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EA20206D4 for ; Fri, 4 Sep 2020 07:31:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0H7iYRwd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.com header.i=@suse.com header.b="h4nN5xrA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EA20206D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: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=G8d1fMmLt8kNjd52kN9Wml2PU12AIUptDDzLqKL5Ofo=; b=0H7iYRwd39ct8cwZ4uLHzd9Vy8 /QGBGFbzIZs9Aka6uG5FQ2ngH3M58rdmUSO/lnNk1kZrUW/wbikIVWyCuCVCCREac85ura5YKVOOX HGfN18s4ggWiug1d1RqhIZHPi1NuKYABT1g7hRFZfsJFn+Oa8ZpCAFrpsac/shBgta+2xDmkhyb9j oWTINzVOntfbS9jOVPZ+UwD6M8C6Wt6pgwhbZF/3RjprMAuwRWf0kui+QXmaLQQCne8peMSIfm+qH ePa61Ce+3NOqNWXt1cCjRycP5hhkWUqFEULaEIOIOtm392F8dakHDOtnLvXKbi84eFp4fVEssbpY0 SayDX8dA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kE6AI-0000ED-ID; Fri, 04 Sep 2020 07:29:42 +0000 Received: from de-smtp-delivery-102.mimecast.com ([62.140.7.102]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kE6AF-0000DD-Qo for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2020 07:29:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1599204576; 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=uJUATO4/EY2WXtEWe+OauJXndfAxySdduMFm0v1Smgs=; b=h4nN5xrAnHvpRKbxVGq09HxmU0jbIn0uHjcHE/AhljjpFPrq6dUDu/XodHjiM+hdZyRqpr YEaZJ3kQoFYDYGk0Ppjo0bLrxJ5rhAz0npUmWnS8+lpWTjyU941Lc+mNhLfalIhVcjXvs3 PgdgfLHob1zWwScv9Q69wyNTmKYyOpo= Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2170.outbound.protection.outlook.com [104.47.17.170]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-8-FtvegQu_OKOEfd_9Z0LxLw-1; Fri, 04 Sep 2020 09:29:34 +0200 X-MC-Unique: FtvegQu_OKOEfd_9Z0LxLw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Apk9snTrl3a9lxvvGTu/neKLtI/Ru5OOc/jXuBNszTDJYw1AdVJC2hLAy9MJCZwbtqDVDyR+SAl8js601SNmxvt+qh3jKXnAuz8SrV5hUehWDcP5m0V8jkm9kSulCVE8p8a80mm/8BjARDBScjkQdB9GVtQM6xCDNiyavDUAVjswQGQfQgWKrk74GHhOs4cDSHIkwpb5WpTkhebt1R6JcsA+I1D+zw2mlVBGOqlLiM/qo1Txu994t4mnst1mODOctLCPzydizF7q1lxcQY7YsQW3Q2p12TN28YuAKklTcqcwXbz3sQ5qUf99Icj8C/PgjL1NtlG4bEGnjxc7fkENuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rBuO3FBRhw0o8kx/V7f+A2WDoFQK/EwFfxMTB6K6X9s=; b=HUxMcpxvMulNVxTa19+xhtlupgacsLbRwU1HWeSCxyjMupiaTSqmLXXny6Of54q4hOt3AnCzcSyb1JwUhJdnwFnMmvsAqHqNZ6evPgFYux/H4tpqD9sQsoUMpn0spRXyN0BBzMFl3oUJY/q1uyO1MFpbf8lUIKX0qeKjZbz8jRCi1mH6/8MyS7NrvqtaUfy+qKqNcPMxdPIQQSxxusKUqeunQrQoYD096z10d9WVVqWDbeeKJM7gvK8awI3Fqov07WxwkRKuO1lMM4gamB1fHmgalJuVgK73LbzW445ibRPeuUEpYokXD4zyAOXpwFVT/11EuSQAb3z1npzfUpaJTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB4928.eurprd04.prod.outlook.com (2603:10a6:803:57::13) by VI1PR0401MB2654.eurprd04.prod.outlook.com (2603:10a6:800:58::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.25; Fri, 4 Sep 2020 07:29:32 +0000 Received: from VI1PR04MB4928.eurprd04.prod.outlook.com ([fe80::859b:fe60:4cfd:efa3]) by VI1PR04MB4928.eurprd04.prod.outlook.com ([fe80::859b:fe60:4cfd:efa3%2]) with mapi id 15.20.3348.016; Fri, 4 Sep 2020 07:29:32 +0000 From: Chester Lin To: ardb@kernel.org, catalin.marinas@arm.com, will@kernel.org, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, corbet@lwn.net, mark.rutland@arm.com, vincenzo.frascino@arm.com, samitolvanen@google.com, masahiroy@kernel.org, mingo@kernel.org Subject: [PATCH 0/6] add ima_arch support for ARM64 Date: Fri, 4 Sep 2020 15:28:59 +0800 Message-ID: <20200904072905.25332-1-clin@suse.com> X-Mailer: git-send-email 2.26.1 X-ClientProxiedBy: AM0PR02CA0073.eurprd02.prod.outlook.com (2603:10a6:208:154::14) To VI1PR04MB4928.eurprd04.prod.outlook.com (2603:10a6:803:57::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-8mug.suse.de (114.24.10.103) by AM0PR02CA0073.eurprd02.prod.outlook.com (2603:10a6:208:154::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15 via Frontend Transport; Fri, 4 Sep 2020 07:29:26 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [114.24.10.103] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16f33a1c-5c94-4039-2796-08d850a443c4 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2654: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LWCKLiDMr40bvpPiKlgbf27VRGCqIjVlEScsMkxXBHg5vYlVx5G3ZXKswAgav54RSo2v5ePFsv3KJxJSY0yMbvtNH5F5oSp8eBTwbHO/krPHDu+0CaeXxe2SbmfqgODW1z1iVzfsELRYUc3Yww5Mno4Hn/AydFsaV+9AUOlBy9TGbpOaz63iMlG+EPyA6HioQA6DTBMCzWrIvMP3YNh+BesKo0CKoC4xQvmr0xW8AAbb9YV3zKPRwL9zTszzS21hxgP5sluPLfvQddMMiT2ScxV6uhD7oSg95pcPaZj56xI7MLjx+0gEqkhv8wEHmpQQrnquSb/bMrXqdHTBuBtlO4CY3c3QMuZMMtbtictnWRFTTlrOLn6lquUoPojPHDMl X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB4928.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(346002)(136003)(376002)(396003)(366004)(83380400001)(86362001)(66476007)(478600001)(8676002)(7416002)(52116002)(66556008)(66946007)(2906002)(6512007)(8936002)(4326008)(316002)(186003)(107886003)(6666004)(26005)(5660300002)(16526019)(6506007)(956004)(36756003)(1076003)(2616005)(6486002)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: u7avlDniBIG2KApO6a/WFIOWI/nJGviADnsNBIGh5kKWt2GADakJq3T80xIUtY+7geeGblirIFprxQ/oiU0qGbrIB3pPt6NVnaOWVsp23TcSHAzK4qT9d3l6n2Qu/Ujp+43INpTahP1oFrkGNeGKzEYjSULo0hn6qTqUtBKkBMX8GGQPkdnIfyTP32jNauBE6wbYQfs8AR6MTNX6NoBVi2d+hIslbRwpQ1NEYbzjWzzGL6zYJW+qxu2HrHS7eHIO7LD4p1qK2t24hEs+SS5fVTHwvQ7FAQL0pWS+wAZhwH7qKJUPD+EPttLGAqTJhFCknmu7XWOcvV7ra5S6f7ZI8IqrJ/31Adm5SpMimi0g1qdkIn1uLvydtvKzkjbFk5yzboQD5ejIqnn52q/L0MYkqeI7x95Oi0MfbmAD7MLatCajgawcRu2nWF/6c8hqQPHeEgea7dyETsFQge7barvOBxcKP5CsbqclHHBPLogPNyUfN9e0QnqcqIQBj0i5tmaAVkrieIYYRqKB5reg3dc3pFydGssTByySblSw4Sjwn2PCcXWpNxASm0UhrctZjObHaGAMXe04CyyESq7pOuvwouv96w1heTDRmDu2rfS8gQDMfggOdutHuJJEzLYCxjHFh7mg/ikPvd6HZ0drRjPOaA== X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16f33a1c-5c94-4039-2796-08d850a443c4 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4928.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2020 07:29:31.9609 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 46wrDScoGkm0B4xHx/WOu1bR35JpIIYaSE+X9fhKs8iCp1got2JCM9nTFOdjxwKK X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2654 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200904_032940_056211_47DE8FF9 X-CRM114-Status: GOOD ( 10.03 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [62.140.7.102 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [62.140.7.102 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: clin@suse.com, linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, jlee@suse.com, linux-integrity@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add IMA arch dependent support for ARM64. Some IMA functions can check arch-specific status before running. For example, the ima_load_data function or the boot param "ima_appraise=" should not be executed when UEFI secure boot is enabled. We want to fill the gap in order to complete the IMA support on ARM64. Chester Lin (6): efistub: pass uefi secureboot flag via fdt params efi/arm: a helper to parse secure boot param in fdt params efi: add secure boot flag efi/arm: check secure boot status in efi init arm64/ima: add ima arch support docs/arm: add the description of uefi-secure-boot param Documentation/arm/uefi.rst | 2 ++ arch/arm64/Kconfig | 1 + arch/arm64/kernel/Makefile | 2 ++ arch/arm64/kernel/ima_arch.c | 37 ++++++++++++++++++++++++++++ drivers/firmware/efi/arm-init.c | 3 +++ drivers/firmware/efi/fdtparams.c | 23 ++++++++++++++++++ drivers/firmware/efi/libstub/fdt.c | 39 +++++++++++++++++++++++++++++- include/linux/efi.h | 2 ++ 8 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/kernel/ima_arch.c