Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3491651pxb; Mon, 4 Apr 2022 18:41:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXN1iEgx7D6QPZaHly3jrALY3pwpNUoENDDIrFtFsyCjmDreilvwxG2vFQwqH69UyEYKEQ X-Received: by 2002:a63:e30a:0:b0:385:fcae:d4a9 with SMTP id f10-20020a63e30a000000b00385fcaed4a9mr881961pgh.85.1649122916558; Mon, 04 Apr 2022 18:41:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649122916; cv=pass; d=google.com; s=arc-20160816; b=wfjCKS7EKsvNgMHi1NHv4ptMX05cVKFo3C9mG1O1Wo1T4L/yYhV/q+vm9sv3UTjx1V wj17Ng2uKjDpzjCNVlSmKZfoyEHIhxlqmABYn9+LUDtUCg0Y+2busbJVJN6lVmZOXzI7 lGN7BgsAJfwCgf9VTziKUyn0u5DSTdecR6YLYGsR89EJq8nm8ct98hld1Sjq5uf2/Xvo qFBfUFZ40UT4kCpXBEOVbwH6wTfL0mnVeUDn/TjHJ2/0nMUcvSCxCzs4TAK6bN7Ulj4W +EzJH0mpsXdAgyYMfI84+P5P4JiJITiMjyOQAvHhrCTH+E1oV6soOe+30T53sQYVJqx1 APSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=o+Dqt0zbsENuTCOkZXMb7UtSXXrlQOB3YFbgnmTe+Lk=; b=Z8Oowm8XbYQMY8fmVIRsKloHluXG3Z0jZf24oUExwLc0EtaBsQMFwI3Fc/6mc9C1Fp nxX4oGhyvtE2j/NEqq64XTzr4nD87qPuI0OnfT3KJHBPV6/T3bVzr+KV9hICRqtmOPu+ pyuSbxV9lP/8wX89BtSmkTEf0ggdalcTIq3CIcEr+ZxaQmCkPA9Qu5saB5cky99/soL9 7oo3TO8GWmtcJrouaF5DMGrR6CHQr4kx1cj0EVqJ5yY+keYUW6tghQ01ZucaNvIsvsI2 fnzc+RqzMrTF+525vHiSnfKVPWBRSFs4zcyPv/9ochAjuGwpl95FiK1OYMhLf5uUGJbc 6/lg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=xe5mUWWB; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=FgsWz1Mv; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q16-20020a656a90000000b00393c2e58ea7si11707498pgu.852.2022.04.04.18.41.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=xe5mUWWB; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=FgsWz1Mv; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 484AF28B125; Mon, 4 Apr 2022 17:39:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346187AbiDASd2 (ORCPT + 99 others); Fri, 1 Apr 2022 14:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233708AbiDASdZ (ORCPT ); Fri, 1 Apr 2022 14:33:25 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1546A1DD3FF for ; Fri, 1 Apr 2022 11:31:35 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 231FvHlJ018522; Fri, 1 Apr 2022 18:31:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=o+Dqt0zbsENuTCOkZXMb7UtSXXrlQOB3YFbgnmTe+Lk=; b=xe5mUWWBiu4QHy5T7Y2+w5AaZkf1P1HCb1ZwmMnYEBHFKG7VlqrOA4TmbTQ4vujy2jn8 v53l0pUctQqV95b6jbFxAuK2Mv+ekF+6GjmrpZTD36Ark1lZiPVQ6T8OTJFzyLhPpHjA LgM2Xm+ubbVZi6bXblQqs1t5nxfLC4y34tC3Y8p+ccHibREyktCmOkiHi7E7JCGdSXB5 AXQuvTVWcxGlOkGerp28voALcD8xyLAPLHw3tbsyfG+ykQS1AHVFEq5EL2hx5nuBKjBZ uDEx9fp3Ivcd+zw17oYmV+TzLX7qEZdpY5ZCyZ3nTU5DVP2ZtIYaDEyJfNe0MPmA8BVq 7Q== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com with ESMTP id 3f1se0qs2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Apr 2022 18:31:14 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 231IUcV4020441; Fri, 1 Apr 2022 18:31:12 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2103.outbound.protection.outlook.com [104.47.58.103]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3f1s961qdw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Apr 2022 18:31:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GSJEaz81Y8aiskqbYMB342YZQnEt6iyCP03WqvVR6+RYgKUeExcYolyBeu34R38EMbONU6E3QErNiDeS+CUZltwjezapajGe2ltZ0zOSE7qN50q4xXMV+3C/KGqJ1cQEQ8586/QCK4PxSjzaeBRWsr3xqfog9PZg9dw8q8BC1gpqQY9JDku5xnwzGDyxAVQXqSuNSLmSCbFWYshIxgM6CAE4QhEeemyqEdyCKmMLPBIyk9MUd6YArX12iGrJQR56m14xo8QpZgdoGiFmhdG/Qg3L/eaqWjJZislF1xcI22DKpG0LC1/C5zBBQigKYFYQJbjvoB4Ulz8h9H0IDJ33Kg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o+Dqt0zbsENuTCOkZXMb7UtSXXrlQOB3YFbgnmTe+Lk=; b=bwtyU8LJDYNu+cjOJEu67dM7F3jt4STb41n/pA800V4QinwIOT/HAGsH4XkJGuVszIq8wGEuEojIkocHNFVy8yeE8oU8HogiLEba+1mkNjeGi9SmyNY8oTUKsRmg9LT6pwYgeT+BbHsBIRUCcCcKUJ4QAKOEaNIpyCaLtyeByj7fpwrapIKMhjevJGW3+40OOBRf52PJH96XOVg4UGAnOkerRORwqwOXSyNq27YoRWfU/cz6kP2W/xuFrMEjt4mkEi7TxQJdIHCKSJijGJmmSk8DscDYrlMR6fXfpHxMgTYt+yZ0rgnF7MDWtAFzTA28uV1zVh0d/ENqKREmt/K8+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o+Dqt0zbsENuTCOkZXMb7UtSXXrlQOB3YFbgnmTe+Lk=; b=FgsWz1MvQjbboUbBPAGmudhY5t0pvYUfvtJSAPPUCyKz3av8Un8qwGbnuvc4pysHRJkK187s8ttUuQ2xNoJYf77HkbFpzo4a9UOLRRYD0D4B8BdFfW/J8o8jM3tIc492T40cG/iXnUpRCRpOKsnImAOHTokJTrCF5RyQqkEvzlQ= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by BN8PR10MB3268.namprd10.prod.outlook.com (2603:10b6:408:d2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.29; Fri, 1 Apr 2022 18:31:10 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::3188:fe86:1d6f:53ac]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::3188:fe86:1d6f:53ac%9]) with mapi id 15.20.5123.018; Fri, 1 Apr 2022 18:31:10 +0000 From: Eric DeVolder To: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, david@redhat.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, eric.devolder@oracle.com Subject: [PATCH v6 5/8] kexec: exclude elfcorehdr from the segment digest Date: Fri, 1 Apr 2022 14:30:37 -0400 Message-Id: <20220401183040.1624-6-eric.devolder@oracle.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220401183040.1624-1-eric.devolder@oracle.com> References: <20220401183040.1624-1-eric.devolder@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN4PR0701CA0042.namprd07.prod.outlook.com (2603:10b6:803:2d::16) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 86480e38-5fef-484a-a0d7-08da140dcb14 X-MS-TrafficTypeDiagnostic: BN8PR10MB3268:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hdxpJuLjkFrMBX9udwVN0ATm2eoX1u44ZPQMTpLYwiB6dckN9/RaYvSSwnRiCL3eOLRGacuh6csZFD7K9pNJH+ZQhkjEFflnnFxC83JBUqNLwUwUL7qdDaL2x0B50MDN0K1hoaJQJNi5Rt9XDb1D1he2S/m2Q8cjwcUe1p5pHMNuiWkv13/oOKvgfIr6xIRyAmG97f/b2Ijb8blJ8sULDXTjRkzOHSESzUmX+eTjjqAxRvkFx52M/wjEKjXGsHSew3asBcleev4Pb3r7tNSxM77VKEGEtq4bUXG74FrxPXnIn6vuRonkDWB4X6aKPHMim2ENFrdL52qwnGucfWQOSCzGUDmc24CiqYI65Awp3wbQMEmmrAsIPetdjC/tNivGYHwhbDoaNrt5PM6SAXS4yYvbU/GiUB9UgsgaAdpESDRv9mqJg7qLXB32uRJv0zx0dacymk/fBOm1WV/scJMxzteNJocYGRZQSpH7CNOw24PWi3Yq3/QUlhccUFe7m9JM5MtUGYErZxMoSVuSSIN1OSzmOxUcJqsZmfTIZPZ1mOr8Rr5t7qJMPlNuOfj99Gl+WcbAGsEYKVzzcBNLUpokWgV5rNizp7Z8vE4vPiPBqMPS5Z66KGDXofGEREaKAm7TovWvJnHVw7zwvyZdaLQNU2crlw7KbZcIsQFJUh8+fpqquHKnnn5Z3vD/dJ7B/VesxRIWuTljaskcixLG2oEyiA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4531.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(1076003)(86362001)(186003)(66556008)(26005)(107886003)(316002)(8676002)(66946007)(4326008)(66476007)(36756003)(6512007)(6486002)(508600001)(7416002)(38350700002)(38100700002)(6506007)(52116002)(2616005)(2906002)(5660300002)(6666004)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6XEhXALry3Pb5c/XWp17v76Jc4u0BSrhxvuFPJj8ncMDHmfnXsFUO12hy7Va?= =?us-ascii?Q?psgO4290Otrg7BBgf7PTUGg9RwMIXFpI8VFAcqroaNEtZ1T/cyDGpVLOf8ik?= =?us-ascii?Q?vZlJ47Q6kRxRtuEdFMjkGk6PYIWQYOIkwsQNB6MMORL/LbT4sMWSyVEZH3z+?= =?us-ascii?Q?kCAub1vdiYeDmrxqlCFBeJME+2Fjfg/qtesxq6S8/kzWeB8T/N9hF2VJn3ro?= =?us-ascii?Q?Vms7l9pxsZT0fHiBrcJTLIAxmsXj6ZdPSQU/Cm9WpwneF2crZ55/hUZr1lBv?= =?us-ascii?Q?dqRX/O2OLXjhm7hhhGGvC27igwfGP2u3hoioPQ4RUJ1KMe8GUpFlCMKzIH87?= =?us-ascii?Q?pmbEpjeKtzl5c0kP0aMDVzCKT60u7hV8yyhIDRGimPn86Z5bmZAU8UlbyDsZ?= =?us-ascii?Q?RN1jYTKuW0bOYBvwh6J9mZNnF2WGTV9l9mHJI1WC2DaIWX3JUMWsKEW3dnW9?= =?us-ascii?Q?96pTKaZTrlHB6Z6nkHmwO1HImc3oJ8NsBb+e39pHxATMLDP8EURM3+WIOCZG?= =?us-ascii?Q?VKtxvSGOVOFxaNjkQEXo/z7/AbeVYHKzbcniC/xZKQFCYU3yvOVX7TaVgOre?= =?us-ascii?Q?Svc/d2yyx1Z6nrrZEhbHuTrVKmkS5fscn2ASILQOE/gr76q20n/34MFNgz+D?= =?us-ascii?Q?IUykY50IsAUI6s5AKDC33BkKoaoG2hZ33kjQFxpe62HeXbE6B4pB4ru6Y1j6?= =?us-ascii?Q?qnYHORJx0UbeUR+t+t+QMsa5utJ+NC5SW6MsJdWYbTplKIYNbV8Uge+ct/x8?= =?us-ascii?Q?4oHvNAoS09rGH+jzD0KjAoriTyOaP8QO1lkgSkauD/Y+3arvMySdau0QJwqs?= =?us-ascii?Q?hbXTWW84Wl3N8HdvZji//5YrC5iAsu00oE6UQiNuoobZUiah6yleHm7goj7x?= =?us-ascii?Q?nDiGI2AQCHusgCJw60dYAP8xPeGGCRv7ouCtTV+bwHH+baDILm+eR0qm9xgC?= =?us-ascii?Q?KMIhE0WwoEBGJt0VeHxNKdhrFPeeOz3NstUbhbOQGikFTq0lwanR/aycHHDw?= =?us-ascii?Q?3lWnc/DFScH2Fe1gjEan58pis5EuPM1UiLr42KXyFxZag/lf3Tn+bRDDSyF8?= =?us-ascii?Q?xJ/575QQK3fEX/Z7qQdXTlUTtVx97m72Mc1adE4Tqc5kVljF6ShPLd64+sc8?= =?us-ascii?Q?2iAY4t6oeiidhS/buFmBMs/HQry/pWBhRLyc72yf/kXyCQw63sD1MtNqCst1?= =?us-ascii?Q?n6Srxu9BHJGqvFfY7u6M6/rmEcaSS2OASgNVG/l+lE/xaj2xdjg1A6mxTSob?= =?us-ascii?Q?5RkHE7xhhPL3MopC6SZ3QFaxly+m+UEQcHRKjPMQA4dqbDuaxz0pHotNiaJ7?= =?us-ascii?Q?GWWpMmDXOuGkDnjpqFQM6FjR5wAPJ5IYTNuZaV6BhiLdb3WLY1E1RL/0Ihet?= =?us-ascii?Q?JtWxcGTz/Pla5rOawgihZBPgDRhufNEBoXOXINJCQsgpUxvQ43zdrPufC/Lz?= =?us-ascii?Q?ZEsIRzgLSsFnwBZLJWj5Ft0WNxW7SMBXZUF4InODtrdwjlqy27lSfeIdnUrD?= =?us-ascii?Q?IYYHrUF7lzi4eQ//yLaAxOx5XzOOK2G+pMyU1UKHnBGgSGzAxC9SVA5s7bZE?= =?us-ascii?Q?aOnWZvksLTlYcb5R2uxX3wbsPBuvnEU8wCpglrvfA6flXv8MTXAvdsNAGPGT?= =?us-ascii?Q?VuvfAsDZ1kYJPc/PSDNnnY1xCGwjmil7YP6lrc0pkmDmu83yvDcW9aXbMKta?= =?us-ascii?Q?x6NhwTbKySmeV93ryGwjg26LB/DstcfI3Jn5DwqCOyNN65xMKTM3Z6XagG6K?= =?us-ascii?Q?hDqZaG5NncSa1yzyaBctsfkQMUzvoDQ=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86480e38-5fef-484a-a0d7-08da140dcb14 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2022 18:31:10.1697 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: e8YbbJRZ44rdhR88U5fgqiHNMgGRknCMgrnLj3TNtqM95lom15fbVsBh1YZenKgcoLdu4bQTE+dGF/d3Is3ZGSeGS0gbzTYJPiVcrkN5Ifs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR10MB3268 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.850 definitions=2022-04-01_05:2022-03-30,2022-04-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 spamscore=0 mlxscore=0 phishscore=0 malwarescore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204010088 X-Proofpoint-ORIG-GUID: tnjTQmq1b7JlxD_PM-XbPamGPYkGr9uL X-Proofpoint-GUID: tnjTQmq1b7JlxD_PM-XbPamGPYkGr9uL X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a crash kernel is loaded via the kexec_file_load syscall, the kernel places the various segments (ie crash kernel, crash initrd, boot_params, elfcorehdr, purgatory, etc) in memory. For those architectures that utilize purgatory, a hash digest of the segments is calculated for integrity checking. This digest is embedded into the purgatory image prior to placing purgatory in memory. Since hotplug events cause changes to the elfcorehdr, purgatory integrity checking fails (at crash time, and no kdump created). As a result, this change explicitly excludes the elfcorehdr segment from the list of segments used to create the digest. By doing so, this permits changes to the elfcorehdr in response to hotplug events, without having to also reload purgatory due to the change to the digest. Signed-off-by: Eric DeVolder Acked-by: Baoquan He --- kernel/kexec_file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 801d0d0a5012..94a459209111 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -765,6 +765,12 @@ static int kexec_calculate_store_digests(struct kimage *image) for (j = i = 0; i < image->nr_segments; i++) { struct kexec_segment *ksegment; +#ifdef CONFIG_CRASH_HOTPLUG + /* This segment excluded to allow future changes via hotplug */ + if (image->elfcorehdr_index_valid && (j == image->elfcorehdr_index)) + continue; +#endif + ksegment = &image->segment[i]; /* * Skip purgatory as it will be modified once we put digest -- 2.27.0