From patchwork Thu Jan 5 15:17:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 39642 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp352834wrt; Thu, 5 Jan 2023 07:22:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXs8u6ontNWvqh0ZvuxGEHjTOJrJCJeB1XfyEA+4+B/uHwTpsxb3Llzntxepsi8FhCf4y9IX X-Received: by 2002:a05:6a00:248f:b0:581:4539:3992 with SMTP id c15-20020a056a00248f00b0058145393992mr48889211pfv.25.1672932151075; Thu, 05 Jan 2023 07:22:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672932151; cv=pass; d=google.com; s=arc-20160816; b=yTZFCE98VnSsh38YtuSvF7uOGDeJBe2htHgJtCeaPYhD4cWa4kcMcZ5R9CM4uQ0nvN HSzdUlE0dDMGmazBIXpUnWjVPj1FSTHeL8Q7hWeEuMO5OdRuTZQXbLl/XoCns6W2Cz1K Fbkd+OlSGxdvtv6Qc4FZQYGGDOqMOSxBrlbqoD+M6bg8MkWSSBvUOR/fv9gGzboSe7dv bQKDapZvNI0HQRR5u6/Jo0cUpVkrc0T5k2vjjVSDSuBqBEUARKLKV/zTTjnYHS6F/HWo Y2UVi78cr3E8zRcPDIAv3QwahBwqoskLdKLbEWdBZUTq6LT/ElcQEsk/obmCh75mSV6l 1pSA== 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=dK/yPg3DcF43xzFfTNyKdijHmr+2iIu+qNvpwKO/Ayk=; b=f/7zhJV4t/XgBQaWH+7tARluWmdpvIoPQeNKXXUvxFAMv02fTh7ElKIaH7TzSFCXwQ Y73Y3oKQY6ykFTOsjeSxJ96l8wZ3XRU7bABFkFfyg/Suyh7wXQF4b50w/qTM3114DyvA nyK+5ChiA8a/N+PEFvcj5uDbbsNZ5qvuVTX5jdhZP3/LQ8F5SikGiZj+7/SgYb/FnePx OwcXxZowVX80toTS0+66F5hKENjC7SrxHAhglnAri+VyzjjwvpzWPCBLZ4M13/LkkOa2 wHll5dsEEBi7Bt7/zfd4XpRbpyDQVlxAN819AhxmN7DNoMdnjTMP5tyHnhUPn1wE7RZY UXsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=1AnOsXcP; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jw8ESSEp; 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a15-20020a621a0f000000b00575f86d63easi36876474pfa.170.2023.01.05.07.22.18; Thu, 05 Jan 2023 07:22:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=1AnOsXcP; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jw8ESSEp; 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234294AbjAEPSE (ORCPT + 99 others); Thu, 5 Jan 2023 10:18:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233857AbjAEPRx (ORCPT ); Thu, 5 Jan 2023 10:17:53 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E3374FCE7 for ; Thu, 5 Jan 2023 07:17:51 -0800 (PST) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 305E4U16012403; Thu, 5 Jan 2023 15:17:28 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-2022-7-12; bh=dK/yPg3DcF43xzFfTNyKdijHmr+2iIu+qNvpwKO/Ayk=; b=1AnOsXcPnLA2m2i2yFvX3608c/ja0Xrxpr9/P/8GEsk587MQVF+DG44/Jxxrwvee/t4/ n7ho+jwBUjBZ8aJVuUqtgfoEBoRfjTB/MppOSUodtq0BK56fH721Gmq3ckoSPQtPmDrQ /Z+0M6Kcc5gSXBVynF+udeP0Cjm7m4G3WTWNbznqumuZNQhxvpfYbFN0bgkxWM3+DuRN uavVTwOvqO8Xh9/gDq7xMW9LCFkv159HBMwZ83pHXmEjRbVzn9qk2Sufip89phJLda3L zBcecSg+LnTT1rEmffxutl8+VHtSpVER/ZMmCBRB7AMGxt638RqIKg9uD/vweBIEyFSY jQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mtbp113f1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Jan 2023 15:17:28 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 305EPKoB040165; Thu, 5 Jan 2023 15:17:27 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2043.outbound.protection.outlook.com [104.47.73.43]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3mwevjmsmm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Jan 2023 15:17:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LpIdwzRam8KKLaAzzQxf9re+OaB8MJxE5aBnEZcoNmBV7nhI9RslU3jOPT3/FzoFKnlQU7ZC+DoGVSp/hAOgjTY2Klf5xkRMgRKhvnF26dvnhSGXpyTRz7gOHBJAl3UBG2uzw7zIsGp5brZ6miKBYFmsTcdWxITVbRzF31AvjLteEV/OI37cYRfPGA0gAt1k28WAWMmmZtFvTSwd1hTYsPp95gMH/8MSg2OdHWhL2G1iq5ilfuWT1NsPg9bfgdANoDPPfBIX6Mf04L0xvQvshGCFwALlaDZDDCbZsOUFYC5aMd3km8pPjMoBRVVXOB9f+ocH8ZWpWrMeMyRneQZohw== 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=dK/yPg3DcF43xzFfTNyKdijHmr+2iIu+qNvpwKO/Ayk=; b=FP6CLbKH4mFL66ZoUMgUPLqUkRuEGvaHXonPoqmFVKf57TpnMTLyBC85lvIDsH9QDYKt5R5yPr2D6q3JZiHufF9spLE2MGmr8JmxIfwwgQK+bX4LgXdHcjbrmpRvS1lTscuJwqSdVDug/hzOwtMm4Hg9pFD3dGZUB9rDNgxdfUltFMg7BtNBHujyyKcuZQkNciMm7Nnruh8AyP8lxQUic9VTBTXbYHnUokSvZORUi3mBvKqqzCizQOyj+L+aYKnBNySHWSWEYmvfG6lw5T/3k4C6ovY6UEZlpSw+Ah36vpsy8W+xVxFiGuXQAOmrPliwODoXAFwD1CT7/QNKD3ZmUw== 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=dK/yPg3DcF43xzFfTNyKdijHmr+2iIu+qNvpwKO/Ayk=; b=jw8ESSEp8B1thtuHCm2p4BK8Qv9djJJ3n9UmQVqfLPnuP06rU24roqWhK5tAFBx0rdUn8PwIbOqJau8KSsa45XuXak2oLK50LPcCuMVN2MC9B30uSSExQWLSIjJmGASMyMzx3K+OakTMfWvzL1FGDxiX33zHJcbXY28sX1WrO5o= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by PH8PR10MB6477.namprd10.prod.outlook.com (2603:10b6:510:22f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Thu, 5 Jan 2023 15:17:25 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::e301:fde6:85e5:b45a]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::e301:fde6:85e5:b45a%5]) with mapi id 15.20.5944.019; Thu, 5 Jan 2023 15:17:25 +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, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, eric.devolder@oracle.com Subject: [PATCH v16 2/7] crash: prototype change for crash_prepare_elf64_headers() Date: Thu, 5 Jan 2023 10:17:04 -0500 Message-Id: <20230105151709.1845-3-eric.devolder@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230105151709.1845-1-eric.devolder@oracle.com> References: <20230105151709.1845-1-eric.devolder@oracle.com> X-ClientProxiedBy: DS7PR03CA0036.namprd03.prod.outlook.com (2603:10b6:5:3b5::11) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|PH8PR10MB6477:EE_ X-MS-Office365-Filtering-Correlation-Id: c8a581fe-d367-40c4-dd53-08daef2ff2fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jBJ2dQouqyadorISjinSYz5+XZStME605EP5u+tWZYnCvc0G+44EIP6hGDuBgLjm7sEIuqPAWXT4NQ2rSvN4Vji5RRJjj9M20M+D3jB0cnf+9w6BbnAUaIuf+6LrZO4Z9lchLcd3+9KrOW/axZd/Mv6ga8UtrwYzwcP6gsu/NAKLety3cUuSTYWRCqA5TfR513IOzrHQ6BeZCrgkHHGF3SMVT+Czi6hEMcT1XbRC4Lk2paqBR6tfl4jwki6le6B8ARu5mnnZWUBftFIiqALimvelyWIQ4gGHLH9OQ1QXjx0FwdsNRF7r4ZR+boHWD3pdoOxciDwZTbQ0wsekKd1I4WL0auT+zFIc7UhdtnWYMWL3kdsJssZnEpdMDcR5RPyeDiheYNxReopSur52yNlsKPmX7TTQYESV8sz/NNKgykUmhIbDO8wIa0DwKoWDlkbjAUx9z2v2fuuycovBOTaeOEQskfT6GgtNOd+F9Q7TaTGxyMVyoHqoyokylYa8OVb9DZfv5/+v8oo9gYnqKRa3fU2qCy0a7Z0lSD/Ts/MZjgFo9HVrTjfyG8kefgO5yjtHAMKdE5tYUaNF4lHXs5yyEC1lAkMb+YIgwo4YxNnGOzS93IeltP7+FTWC15kvOP9AlSldPMjeyjcKceHKajkShw== 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:(13230022)(376002)(366004)(136003)(346002)(39860400002)(396003)(451199015)(5660300002)(7416002)(2906002)(8936002)(41300700001)(478600001)(316002)(4326008)(8676002)(66556008)(66476007)(66946007)(6486002)(6666004)(6512007)(26005)(6506007)(107886003)(83380400001)(1076003)(2616005)(38100700002)(186003)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eI1R/lr3T3pZKnyxECz7S5zhTtHemHMngP6SzQMzf2Nt0ttM3vbmq8QSwMr+4BKxoSHmIWgL/kpXfDSBLZSZjhjA2lwms3r4Tc8DyUfQg+bME1YDdnQ9/rE+2DHNx5f0z1pEEAZlHhMK1w4JqxXMCi/ymVTL9fhBWfVf9N6XO0doIfF/mJBZm/thQF1hvAbWDJ8DQCconwIqbMweDl7rwnIWA1SVnGNSuigavG09QcuC/QK2zjVAC+NP3mYgvYxc0Mqq/EaVBe94ng49qwJVitqV0G9PnroUbANCqtsiP+sdszp0cObN/f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O6fdAXd4CawjTNO3byIqhy6wYPFYJiMt3tYrlAVcr8dMHnFhIfm/9JWaIFO7Q8TrJtj10poXlPnn2NO/gj0LUjYRJF0efBy3xvyRwtZi5BTCB/2XZrJR2U1f60tULji7iKo/TqcFM04/cMGJ5RwFggWJmn9glQrkIdCfRVyfeLcccIagAr8P5AqcEFTm60vGEZlenaqJRJxugh1/447N9xhOBsDoQOVZwAFtN6uFEhS2lnsDb1gbBaNpyiuWZjUxG5EVSkOrY616qoQAp7Ab+qmfeiENfspd6JPQul7lohj/FvP7swI+hW8E38xLxTIlGqSHwR6mUbs34/zykOKE3MS+xpRfzRhCBfNmD0CvpRjiWz+l+k/OpMX1x1sBtR7gPRHBiBT01O0Rt2iOHFSlhUBFLo2pBwj5p6IdXqsIw6M8XqBDKwr2fun+ORUwAadhLhp68hcJlZ1upY3m0zFOydCe4crWhe8KLMUJGJPII3npSzZehIK8kliIefaExbX2y5Lud8/E8dHKDvOqFnMN2Ky8F8JWhDABOtybpaYBtV9kzq7j8yiFUK/YhmP49ufw/c3fjzo77ws+p3ScWEjvLKj26w== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8a581fe-d367-40c4-dd53-08daef2ff2fc X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2023 15:17:24.8005 (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: KMGjmenyfeReAlPcpGlFGltZiK8L9XzosKRopqny/xuFp+YH7gTU4dZoepXzf2gRDwo7ne4FPvhNc5+cdiSUCPqlJPxJtuRRbvmc5ew8mVM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR10MB6477 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-05_06,2023-01-05_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 phishscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301050119 X-Proofpoint-GUID: QGM-WDwl6rLpicYkP613CKN3bewjV86z X-Proofpoint-ORIG-GUID: QGM-WDwl6rLpicYkP613CKN3bewjV86z X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754196503246300493?= X-GMAIL-MSGID: =?utf-8?q?1754196503246300493?= From within crash_prepare_elf64_headers() there is a need to reference the struct kimage hotplug members. As such, this change passes the struct kimage as a parameter to the crash_prepare_elf64_headers(). The hotplug members are added in "crash: add generic infrastructure for crash hotplug support". This is preparation for later patch, no functionality change. Signed-off-by: Eric DeVolder Acked-by: Baoquan He Acked-by: David Hildenbrand --- arch/arm64/kernel/machine_kexec_file.c | 6 +++--- arch/powerpc/kexec/file_load_64.c | 2 +- arch/riscv/kernel/elf_kexec.c | 7 ++++--- arch/x86/kernel/crash.c | 2 +- include/linux/kexec.h | 7 +++++-- kernel/crash_core.c | 4 ++-- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c index a11a6e14ba89..2f7b773a83bb 100644 --- a/arch/arm64/kernel/machine_kexec_file.c +++ b/arch/arm64/kernel/machine_kexec_file.c @@ -39,7 +39,7 @@ int arch_kimage_file_post_load_cleanup(struct kimage *image) return kexec_image_post_load_cleanup_default(image); } -static int prepare_elf_headers(void **addr, unsigned long *sz) +static int prepare_elf_headers(struct kimage *image, void **addr, unsigned long *sz) { struct crash_mem *cmem; unsigned int nr_ranges; @@ -64,7 +64,7 @@ static int prepare_elf_headers(void **addr, unsigned long *sz) } /* Exclude crashkernel region */ - ret = crash_exclude_mem_range(cmem, crashk_res.start, crashk_res.end); + ret = crash_exclude_mem_range(image, cmem, crashk_res.start, crashk_res.end); if (ret) goto out; @@ -74,7 +74,7 @@ static int prepare_elf_headers(void **addr, unsigned long *sz) goto out; } - ret = crash_prepare_elf64_headers(cmem, true, addr, sz); + ret = crash_prepare_elf64_headers(image, cmem, true, addr, sz); out: kfree(cmem); diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c index af8854f9eae3..e51d8059535b 100644 --- a/arch/powerpc/kexec/file_load_64.c +++ b/arch/powerpc/kexec/file_load_64.c @@ -799,7 +799,7 @@ static int load_elfcorehdr_segment(struct kimage *image, struct kexec_buf *kbuf) goto out; /* Setup elfcorehdr segment */ - ret = crash_prepare_elf64_headers(cmem, false, &headers, &headers_sz); + ret = crash_prepare_elf64_headers(image, cmem, false, &headers, &headers_sz); if (ret) { pr_err("Failed to prepare elf headers for the core\n"); goto out; diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c index 5372b708fae2..8bb2233bd5bb 100644 --- a/arch/riscv/kernel/elf_kexec.c +++ b/arch/riscv/kernel/elf_kexec.c @@ -130,7 +130,8 @@ static int prepare_elf64_ram_headers_callback(struct resource *res, void *arg) return 0; } -static int prepare_elf_headers(void **addr, unsigned long *sz) +static int prepare_elf_headers(struct kimage *image, + void **addr, unsigned long *sz) { struct crash_mem *cmem; unsigned int nr_ranges; @@ -152,7 +153,7 @@ static int prepare_elf_headers(void **addr, unsigned long *sz) /* Exclude crashkernel region */ ret = crash_exclude_mem_range(cmem, crashk_res.start, crashk_res.end); if (!ret) - ret = crash_prepare_elf64_headers(cmem, true, addr, sz); + ret = crash_prepare_elf64_headers(image, cmem, true, addr, sz); out: kfree(cmem); @@ -224,7 +225,7 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf, /* Add elfcorehdr */ if (image->type == KEXEC_TYPE_CRASH) { - ret = prepare_elf_headers(&headers, &headers_sz); + ret = prepare_elf_headers(image, &headers, &headers_sz); if (ret) { pr_err("Preparing elf core header failed\n"); goto out; diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 9730c88530fc..9ceb93c176a6 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -265,7 +265,7 @@ static int prepare_elf_headers(struct kimage *image, void **addr, goto out; /* By default prepare 64bit headers */ - ret = crash_prepare_elf64_headers(cmem, IS_ENABLED(CONFIG_X86_64), addr, sz); + ret = crash_prepare_elf64_headers(image, cmem, IS_ENABLED(CONFIG_X86_64), addr, sz); out: vfree(cmem); diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 5dd4343c1bbe..c8662a48d455 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -250,8 +250,11 @@ struct crash_mem { extern int crash_exclude_mem_range(struct crash_mem *mem, unsigned long long mstart, unsigned long long mend); -extern int crash_prepare_elf64_headers(struct crash_mem *mem, int need_kernel_map, - void **addr, unsigned long *sz); +extern int crash_prepare_elf64_headers(struct kimage *image, + struct crash_mem *mem, + int need_kernel_map, + void **addr, + unsigned long *sz); #ifndef arch_kexec_apply_relocations_add /* diff --git a/kernel/crash_core.c b/kernel/crash_core.c index f10e2266c310..92eb7dc05457 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -315,8 +315,8 @@ static int __init parse_crashkernel_dummy(char *arg) } early_param("crashkernel", parse_crashkernel_dummy); -int crash_prepare_elf64_headers(struct crash_mem *mem, int need_kernel_map, - void **addr, unsigned long *sz) +int crash_prepare_elf64_headers(struct kimage *image, struct crash_mem *mem, + int need_kernel_map, void **addr, unsigned long *sz) { Elf64_Ehdr *ehdr; Elf64_Phdr *phdr;