Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4393990ioa; Wed, 27 Apr 2022 02:54:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzuUKt1YjVj0J3mU4y50EevD/09Foq5WMyr6tUFkOv2ziMCGyDwi2JV/Q42uLdo3DM5vYM X-Received: by 2002:a17:902:c411:b0:15c:e82a:e854 with SMTP id k17-20020a170902c41100b0015ce82ae854mr20865240plk.18.1651053263177; Wed, 27 Apr 2022 02:54:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651053263; cv=pass; d=google.com; s=arc-20160816; b=ioF/jqDelBAsbeLpAiL/aPXjzsSEX92O2xXc+DoeDtELpc6SE9etzZwC3Hw6w/qt50 XirKHjvYaQq0IQ3HFCyLOOWx927KzSOETDtum0fS/v6fIMaPx6It+3n44V8AOTNhcThT RLfKQFrwnRs0OSo+XDYCeN7dDmXerxBLvcumDb0XGtROZgisMBCPJnrtDBqt9QiLfCRQ hlkvmP2WrMB3DuBUGam9lftAlzf8/N3CmwfjRQYNzTPdHrxQZUsmlt2HRQVSJfgD8FRx khiUndC1+EuWVw88zGx5vGP+56FkaVA+WgOVTHvBbUCr2NxQXu09pv5oQ9eNAEsCEQpP oZoA== 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 :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=+ztRhjjrK3hhuT6ql9AqyIKZCQj1Ap3NokTlLYJmnFk=; b=SfckVCEUld/sZX7yBa4M8WRHRvt1qkuAVERAhOqnW9q4sO+XpfGwKSriqFHLynbhvY ekD7m7keyfCvBvFhPuw5An6cIpSaThpU9w9ojy+wu0GHZSqcyMDOW2yfP2ceg6KMx/eT K6evHlBt28eF9F+21WDelJN49sWQ0SVS6k2oSL3gwKDbDjTHyEttYSFYxYpYGtSrviOz VZZ0SS8/W89/JODq1WFqZ6n0jrKigKTsLlK2QVukdD4S2MN0rtQhDMP8dIc2ib7p8AMs myMBJqrI9WXpYuDZ1RVSwriEdZWhshnaj9qaTixTSkal/LJnVJrfBfrYKUEGUIPP1Hpr UXKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=eCckFWIr; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cqqn3bVT; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id ml12-20020a17090b360c00b001d97ac77fb8si1231381pjb.87.2022.04.27.02.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:54:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=eCckFWIr; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cqqn3bVT; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1E7D82AD48E; Wed, 27 Apr 2022 02:24:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354531AbiDZUMo (ORCPT + 99 others); Tue, 26 Apr 2022 16:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354542AbiDZUMe (ORCPT ); Tue, 26 Apr 2022 16:12:34 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F19C1738E5 for ; Tue, 26 Apr 2022 13:09:25 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23QIIED1015475; Tue, 26 Apr 2022 20:08:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=+ztRhjjrK3hhuT6ql9AqyIKZCQj1Ap3NokTlLYJmnFk=; b=eCckFWIr6v/SqkYobYYzDKoBVfC9TpR04Ip1hVTgjwVq17zU7r9hrZvSxkRf3xGUPML3 O9lUJRWJ2Lh4hALWK6p4AHTHzbD3Q1Ju1drg7frePe/dMVlkPxApFA+QEP5pAZu11i3l ldMahdKwCSA5Neg9LB6MlbwRxHyWq+FcaB6ZIGXWQ+VVk4D30o496zXUw14PYUU/PqQg M3uUUDk1cnscu2bAsBUQ7rNzBvb/dmqzMFXCJxZ2t7/jBuAhj6cvKku9626E1F9O0C4i xQmmd4WpT50n6UQI/RfRXlbFawD+t9bdifJp93kUzqFjCpalkOO/TbVcxuV0cOOC086m Ug== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3fmb9aq6a5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Apr 2022 20:08:38 +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 23QK6WcA016942; Tue, 26 Apr 2022 20:08:36 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2104.outbound.protection.outlook.com [104.47.70.104]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fp5yjvptm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Apr 2022 20:08:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OI4/or+63dyaCKY7NKbYUmvvTffIC9f/Amg7Yq2UxgCEvOeFVciwxoBGh4Qbr2ecTXWZxfuJJtnaFmo0OomDH8engpGMnp0FUJ2cDrjkmcxkhAguIrkH7f5/bfCpjx656bQTAeC/PQmZ61IZIBorymfJtHqamwoEJzLsJYEu4xq5SaHpL1hJhl4H/bZN4i59ZsVujRug7smmrJO1tKfqUN0Xe7EZF9Yp0/gAmx09rDDsEZMYlmsTD7oKMvhfaI/sYwiYmf/IpEUaz+xQcZzuK8b/rDFfesPrQdrIbHb9vynk1EA6K6umY8savzGLF0lSk3/vdIvnAmhJ/GDoWrpeRg== 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=+ztRhjjrK3hhuT6ql9AqyIKZCQj1Ap3NokTlLYJmnFk=; b=fy3WdCqYd86CO3OAoq3jx+s256cORdGAASA6IwZQO3mY6BVKLtkQN+sz30S/4Y1l0UpPGUlHGtgbFqB1Gz8wjYlbSuk8sy5zm35F8/b1WyNqtVJjv8AIsptCLatphze/DWlw8T/rBPH4u+Actun0WEIOVITDXBy3ak1k+Y79Tu5TtNqOzK7wsTonWpPYqNccI0xr8mSk+6EarE7Mic7rNTPf66FxhTaDYwEuSeSD0b9iaOmbv1t4Di2qBd3jVYKk4Q9elUtZ58ayBdlALsnneIfLhmUrZ8ZRo++HDO0BZEfxdLLO3BWUI2Orn+Q9VbVvolpqPHGk78tX41LVdqS9WA== 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=+ztRhjjrK3hhuT6ql9AqyIKZCQj1Ap3NokTlLYJmnFk=; b=cqqn3bVTd0WI6MuLElpdBC7Vpv2KGaceWNyZaHNsxSCpSynEaAS/zgpsn36Qyg0LpgxmLgazEcGrRDFnwr+p/oMFGb9b1/s5dhE6poAHXFr6QIdlEPiQjgrpXrEwibCWFl96MmGFTpNuyusB+FscQoD3CMvR4XlEF8tsRq9SIIA= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by DM5PR10MB1436.namprd10.prod.outlook.com (2603:10b6:3:f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.21; Tue, 26 Apr 2022 20:08:34 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::c11a:5b2b:9659:7c42]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::c11a:5b2b:9659:7c42%7]) with mapi id 15.20.5186.021; Tue, 26 Apr 2022 20:08:34 +0000 Message-ID: <0aee5cd1-eb8c-f778-c6e5-7f5ca3624d15@oracle.com> Date: Tue, 26 Apr 2022 15:08:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH v7 2/8] x86/crash: Introduce new options to support cpu and memory hotplug Content-Language: en-US To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, 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 References: <20220413164237.20845-1-eric.devolder@oracle.com> <20220413164237.20845-3-eric.devolder@oracle.com> From: Eric DeVolder In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MN2PR08CA0002.namprd08.prod.outlook.com (2603:10b6:208:239::7) 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: 55bd69ba-0fd9-4eea-f9e0-08da27c08ad3 X-MS-TrafficTypeDiagnostic: DM5PR10MB1436: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: 7MDHIN/oC4yk3vj00QDh003Ja/S1kI45v6pTzSgWHe85N6+9esRFPPpaTZn58G3tHE6JNqTfLPd1w0oqvA5l4f/JFQiXnwQTXpUYo0SKnjcIWKQQkJ39jDmQGMIoyMmirSIpBN7Rkgj0CD58+q0srjY2/MWTXHc6eIrJwBAQMcxN4BJl3khyn4uV9cRDl+mzyRXOE00ZdFqpozGIG2h5cgn0EODi2z0+y5bO18giwAgKy6CMV7a2wgkmz/qZ4qbkUKgdFrvlT7movehOJhcVMxozkDUV1/3txnTPXOPDrMud2G6oeUXsDoAdP6vzaDx1bK2BfPB+i3Zrc7c+lmt1NpAfz1+uRC4Xekp0UV+2HD5xh6CNU5i8xRmUD1w2bGL45RsZHgxWMGBGTjuiqbNncnnQv4Lc39t8Mo/qG0/Px8sP+R1jw6lxun/29HxDZD3XBlKYm8BhofBIEZIgfZ3Y7yJI9LaDMHrjeeYdok5KYFb4aDBM+G7Rw+oC4W0atDdQzGQ9zKekX+ROv83XYv6Gza6Q6kPhsWlC0nL+cUc3GR9emkN3bs7GT+78ubfwycCb7vh7psqynL81OedEpctisGKumuLxPrs4jtiqwR9hr4He8gTUBvBG5M1djYphsZqn5XM0zxnJoU253Im6nozjAnxwpkEkPCbU6SAuiz1Melhja5zLN5W6w5zj3pKnTtC8IYkq5ZC4tunlPCnd25h+yTiJxVaZzNh1dQLCa/xuO3M= 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)(6486002)(8936002)(36756003)(31686004)(66946007)(6506007)(4326008)(6916009)(6666004)(2906002)(66476007)(66556008)(8676002)(316002)(53546011)(2616005)(83380400001)(186003)(31696002)(6512007)(38100700002)(107886003)(7416002)(508600001)(5660300002)(86362001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZXZSUUlZZWlWSXpibTNRak10WGIzWWJtVDFzQjdoN2JLTWV6R1ZTZWNlemNI?= =?utf-8?B?Szk5eFluTmdqanRwbUtqa25PdGV1T1VG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= =?utf-8?B?bENhckMvNjRtN01vZ2UxN2VIVWo3ZGNhZmRkaGVQR1Z1R1Ayc1R6azRhWVc4?= =?utf-8?B?d0xTNDUwaFRFK3ZwcFUydXNXNlRvU0pkdnlTNDZNY3d6ckMxOU1UdW51ZnI3?= =?utf-8?B?TE5yVEtNdllwWTJvYnFOcDUrdnhGMVVEallodHZ3NHJwTUNiTUt5QU1abXl3?= =?utf-8?B?WHRZZHdOQ2Y4S1FmSHJuM1pFMDlrWGs4d1oySU1QWDhxYlhRbVpabjVDLzhY?= =?utf-8?B?a0RMVEUrRUxWb0ZRQlQ2U3c1dFRzOU1HcEQ4WHA3azhJejRXd1huWjdpd2pn?= =?utf-8?B?cE92bHZqdnBKMzU1R0cyWXRiQWF6a2N4dzFPQmQvUzBiQzFlTWk3cFRvNGNR?= =?utf-8?B?QVByOEJxVFRESFNIU3JaOW8xYmUwRzN5YmowcFVZRTZybUJHTmJkZksrSUpj?= =?utf-8?B?OEpGaGpMZzdmTDc4K0pXYWJWb2dOTFdnc1VTSkxUQ0dYd2VmS2lYQTJ0VVBx?= =?utf-8?Q?Q8PkMj5CdhQjjKhW1muxs7+kyoEeWA1fCC/iV?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55bd69ba-0fd9-4eea-f9e0-08da27c08ad3 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2022 20:08:34.5509 (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: wgXtsK8molFgCIf0WnjD+zHIfITA/FzMQZ+f//nniZCB+5V3XrfmyYmg5lxFXocNUSUQOE99SlXbTBnahM8QzRor0EMTQokT3AhrnvULr1c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR10MB1436 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.858 definitions=2022-04-26_06:2022-04-26,2022-04-26 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204260128 X-Proofpoint-ORIG-GUID: 1EsZaEBT2W-HgEv6pNVzM0AF_S1-FBIs X-Proofpoint-GUID: 1EsZaEBT2W-HgEv6pNVzM0AF_S1-FBIs X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Boris, Many thanks for the time taken to illustrate for me! I've one question below. Eric On 4/25/22 14:25, Borislav Petkov wrote: > On Tue, Apr 19, 2022 at 04:58:47PM -0500, Eric DeVolder wrote: >> So in taking this concept and looking at, in particular, patch 4/8 >> "crash: add generic infrastructure for crash hotplug support", I'm not >> exactly sure how to apply this technique. > > So I took your patch 4 and maimed into what I think it should look like, > see below. > > Now there's a single ifdef there and the registration routines are > wrapped in IS_ENABLED() so that you register a callback only when the > respective stuff - HOTPLUG_CPU or MEMORY_HOTPLUG - is enabled. Otherwise > the couple of functions are unused but that's not that big of a deal. > > I've also fixed up some other issues I've encountered along the way. > > Holler if there are questions. > > HTH. > > --- > diff --git a/include/linux/crash_core.h b/include/linux/crash_core.h > index de62a722431e..b3c32e04d3f0 100644 > --- a/include/linux/crash_core.h > +++ b/include/linux/crash_core.h > @@ -84,4 +84,12 @@ int parse_crashkernel_high(char *cmdline, unsigned long long system_ram, > int parse_crashkernel_low(char *cmdline, unsigned long long system_ram, > unsigned long long *crash_size, unsigned long long *crash_base); > > +#define KEXEC_CRASH_HP_REMOVE_CPU 0 > +#define KEXEC_CRASH_HP_ADD_CPU 1 > +#define KEXEC_CRASH_HP_REMOVE_MEMORY 2 > +#define KEXEC_CRASH_HP_ADD_MEMORY 3 > + > +struct kimage; > +void arch_crash_handle_hotplug_event(struct kimage *image, unsigned int hp_action, > + unsigned int cpu); > #endif /* LINUX_CRASH_CORE_H */ > diff --git a/include/linux/kexec.h b/include/linux/kexec.h > index 02daff1f47dd..d907a1f0d3da 100644 > --- a/include/linux/kexec.h > +++ b/include/linux/kexec.h > @@ -307,13 +307,11 @@ struct kimage { > /* Information for loading purgatory */ > struct purgatory_info purgatory_info; > > -#ifdef CONFIG_CRASH_HOTPLUG > bool hotplug_event; > unsigned int offlinecpu; > bool elfcorehdr_index_valid; > int elfcorehdr_index; > #endif > -#endif > > #ifdef CONFIG_IMA_KEXEC > /* Virtual address of IMA measurement buffer for kexec syscall */ > @@ -329,15 +327,6 @@ struct kimage { > unsigned long elf_load_addr; > }; > > -#ifdef CONFIG_CRASH_HOTPLUG > -void arch_crash_hotplug_handler(struct kimage *image, > - unsigned int hp_action, unsigned int cpu); > -#define KEXEC_CRASH_HP_REMOVE_CPU 0 > -#define KEXEC_CRASH_HP_ADD_CPU 1 > -#define KEXEC_CRASH_HP_REMOVE_MEMORY 2 > -#define KEXEC_CRASH_HP_ADD_MEMORY 3 > -#endif /* CONFIG_CRASH_HOTPLUG */ > - > /* kexec interface functions */ > extern void machine_kexec(struct kimage *image); > extern int machine_kexec_prepare(struct kimage *image); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index ecf746243ab2..a6c4ee1d5c86 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -497,57 +497,50 @@ static int __init crash_save_vmcoreinfo_init(void) > > subsys_initcall(crash_save_vmcoreinfo_init); > > -#ifdef CONFIG_CRASH_HOTPLUG > -void __weak arch_crash_hotplug_handler(struct kimage *image, > - unsigned int hp_action, unsigned int cpu) > +void __weak arch_crash_handle_hotplug_event(struct kimage *image, unsigned int hp_action, > + unsigned int cpu) > { > - pr_warn("crash hp: %s not implemented", __func__); > + WARN(1, "crash hotplug handler not implemented"); > } > > -static void crash_hotplug_handler(unsigned int hp_action, > - unsigned int cpu) > +#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_MEMORY_HOTPLUG) > +static void handle_hotplug_event(unsigned int hp_action, unsigned int cpu) > { > - /* Obtain lock while changing crash information */ > - if (!mutex_trylock(&kexec_mutex)) > + if (!kexec_crash_image) > return; Why is it safe to examine kexec_crash_image outside the mutex? As I understand it, there is still the (very rare) opportunity for a kdump load/unload initiated via userland and this check to collide. (Similarly, I believe the mutex entry is almost always assured/likely.) > > - /* Check kdump is loaded */ > - if (kexec_crash_image) { > - pr_debug("crash hp: hp_action %u, cpu %u", hp_action, cpu); > + mutex_lock(&kexec_mutex); > > - /* Needed in order for the segments to be updated */ > - arch_kexec_unprotect_crashkres(); > + pr_debug("crash hotplug: hp_action %u, cpu %u", hp_action, cpu); > > - /* Flag to differentiate between normal load and hotplug */ > - kexec_crash_image->hotplug_event = true; > + /* Needed in order for the segments to be updated */ > + arch_kexec_unprotect_crashkres(); > > - /* Now invoke arch-specific update handler */ > - arch_crash_hotplug_handler(kexec_crash_image, hp_action, cpu); > + /* Flag to differentiate between normal load and hotplug */ > + kexec_crash_image->hotplug_event = true; > > - /* No longer handling a hotplug event */ > - kexec_crash_image->hotplug_event = false; > + /* Now invoke arch-specific update handler */ > + arch_crash_handle_hotplug_event(kexec_crash_image, hp_action, cpu); > > - /* Change back to read-only */ > - arch_kexec_protect_crashkres(); > - } > + /* No longer handling a hotplug event */ > + kexec_crash_image->hotplug_event = false; > + > + /* Change back to read-only */ > + arch_kexec_protect_crashkres(); > > /* Release lock now that update complete */ > mutex_unlock(&kexec_mutex); > } > > -#if defined(CONFIG_MEMORY_HOTPLUG) > -static int crash_memhp_notifier(struct notifier_block *nb, > - unsigned long val, void *v) > +static int crash_memhp_notifier(struct notifier_block *nb, unsigned long val, void *v) > { > - struct memory_notify *mhp = v; > - > switch (val) { > case MEM_ONLINE: > - crash_hotplug_handler(KEXEC_CRASH_HP_ADD_MEMORY, -1U); > + handle_hotplug_event(KEXEC_CRASH_HP_ADD_MEMORY, -1U); > break; > > case MEM_OFFLINE: > - crash_hotplug_handler(KEXEC_CRASH_HP_REMOVE_MEMORY, -1U); > + handle_hotplug_event(KEXEC_CRASH_HP_REMOVE_MEMORY, -1U); > break; > } > return NOTIFY_OK; > @@ -557,38 +550,33 @@ static struct notifier_block crash_memhp_nb = { > .notifier_call = crash_memhp_notifier, > .priority = 0 > }; > -#endif > > -#if defined(CONFIG_HOTPLUG_CPU) > static int crash_cpuhp_online(unsigned int cpu) > { > - crash_hotplug_handler(KEXEC_CRASH_HP_ADD_CPU, cpu); > + handle_hotplug_event(KEXEC_CRASH_HP_ADD_CPU, cpu); > return 0; > } > > static int crash_cpuhp_offline(unsigned int cpu) > { > - crash_hotplug_handler(KEXEC_CRASH_HP_REMOVE_CPU, cpu); > + handle_hotplug_event(KEXEC_CRASH_HP_REMOVE_CPU, cpu); > return 0; > } > -#endif > > static int __init crash_hotplug_init(void) > { > int result = 0; > > -#if defined(CONFIG_MEMORY_HOTPLUG) > - register_memory_notifier(&crash_memhp_nb); > -#endif > + if (IS_ENABLED(CONFIG_MEMORY_HOTPLUG)) > + register_memory_notifier(&crash_memhp_nb); > > -#if defined(CONFIG_HOTPLUG_CPU) > - result = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, > - "crash/cpuhp", > - crash_cpuhp_online, crash_cpuhp_offline); > -#endif > + if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) > + result = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, > + "crash/cpuhp", > + crash_cpuhp_online, > + crash_cpuhp_offline); > > return result; > } > - > subsys_initcall(crash_hotplug_init); > -#endif /* CONFIG_CRASH_HOTPLUG */ > +#endif >