From patchwork Wed Nov 16 21:46:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric DeVolder X-Patchwork-Id: 21297 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp77940wrr; Wed, 16 Nov 2022 13:50:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf5WP/lkA2JItSmOV4bo7iREXD0JdXzy5jFiXx9L9zjv3+4k/yKfbQuA4TGgnbbM5B+YCfUL X-Received: by 2002:a17:902:e946:b0:17f:66ae:b84 with SMTP id b6-20020a170902e94600b0017f66ae0b84mr10763311pll.32.1668635407875; Wed, 16 Nov 2022 13:50:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668635407; cv=pass; d=google.com; s=arc-20160816; b=AEDRW153LRn+M/LPyd2JuV4LjCU2bGwsJt/24QfzfMGFuPKa40j5xR/9L8G9z/sGVX TgZgKsjznJRYhVC/0gS+41Rk5WYVTnuL1r4WqzLm+RV59WbFvi0rpA7sm3Awl/3at4H1 gYd1v1/tzneTnFfwAizfUjLxTdby6e9PVH4zx7ZQTSAuNcuIqQNNf0tsie9wCtI+x5q0 aDF41zqHtjHVxd54r/Hyo15bMbNf9CiVAXPvS4ycXfZMjSHlUKtVi17Cl0Oqpar45lnG ewJQ5awUCuMjEyBU+OZvAuw5w/jabooQGwSWaBPiSJvakH3U0Jv2VOEMjsJWdHcfuaJX p4pg== 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=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=0OEOYFuwtHFmsWQZ2Jgnd4XmJDkV8jAhIY6ndSYL/4tBBU+ruL0DIkRVkxb1UhBTME hmLyKogFcoRxt1/+ZIJP7/vOVhMtyeFEvctXNY9gbGXR33KjdxS76bTX+V6OAdtbELeM 12YgQY9KYZrB3NJA1LKTQ/mE6Vw4MhijjVqQ1r79EBWiVy4YKrUMXw726zVH71b5j5Aa 4WX0JQvQHmaLLp9L0s+eFPNC+PipKy8lfKL8zZHlWPcsQQoUGnXay0C26eJr3KMuEXfO Gjh89VbHCmelfJNiVR7BUi3Jx9jCgj/RucR5lknpSROzp00qCTzX89lll+t9Pt34wxP7 5NFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=gphGceHa; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="UoaMOK/F"; 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 2-20020a631042000000b0045fb345cfedsi16019056pgq.640.2022.11.16.13.49.54; Wed, 16 Nov 2022 13:50:07 -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=gphGceHa; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="UoaMOK/F"; 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 S233687AbiKPVsB (ORCPT + 99 others); Wed, 16 Nov 2022 16:48:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234174AbiKPVrf (ORCPT ); Wed, 16 Nov 2022 16:47:35 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5AE018399 for ; Wed, 16 Nov 2022 13:47:32 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AGJDxk7021268; Wed, 16 Nov 2022 21:47:08 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=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=gphGceHaIo0HnCNId2MQnPNld7Iw7kXHkmSvEoChcnWjTbVfW1js7c1OUQekNbKzvuqZ 5y8ma9qWNHXZ45/faNYeUeZTVU85SOUFc3CiBjYIKIaos3Al3p/Nf6k+FxzSWf1sWvdl /z19cfgTQNKkVa1yL5LtsjUCP2e6wpJb8qImi0dKCeerq1k6bHGus0suDX+EBkJ60igw K/8nB8PGFUiKmG+GASfxMMydkkyEo38qw9N2C06ExA/Nf1Wz2bSqqtYk55GnJcnNK+WP Q71XAaO2ilEgq/H4ylxGK/giZarnGwT2FChACowbKg2IMcA4pzV78k+GLq17fufJ422b 1Q== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kv3ns6pgv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 21:47:07 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AGKiJtD000432; Wed, 16 Nov 2022 21:47:06 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2103.outbound.protection.outlook.com [104.47.55.103]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ku3k8y3u8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 21:47:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kv8GxNT8ASYluY1ZbH77d2A2cSfQ+V6NhYyBJNxZ0ugfgP95UfthE43PCfiVRLUS4JEvhi/EbIci0GvndVQG8L6emyUXrEhx7l1V3uKsyBumIAcPHascDlkYNsQSUCbNUnUaRAbR9bI30pIynlKcAamgfXr6M/couDWEr121O4uNpTb3Qou4nH9foP4ANv51HV3kWk6r4SzvBFGuJkIqWwPPUJ1TweY+VSnOn+dWdV/U/ldmEpF2/t8jiYZBwWDPmH0nHjnWJ8CIvyVTkyBf68jommqO1o6Gl8DbY2HbOYoyzOTWzrTpx2AZl5NIwKfFEGWKUNm0NyFEjC+vrGNGVQ== 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=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=T2I4Vs+u/6Cs8L1V6YYzZxd0lsKsO8Xv0F0nMRLyskI7/qqgCQ5WdBeszQK5deNj19n30vt/qinKu+CYAMP07e+BjxtPzJcLRxybF9TBgP9cfLeyYoLnBnSZYZUTfK1hV1bwbMHsaI1E7LVuUGT95DAL5k50nsLbfhvFqIsDlE89kZZpEQYqKp64sr5QHiK+UQNpZd1bq5pErKwYYm+JQyuSw7eYYgdWFLq8T6asTaxCfBv1PhEtM0lNWm5VnBj5t0mAnferffyMhKnWNYjv27YANraqYn/mck51XZxfpvQhgFxfncNLRDU7NoNdNTzx2m34y4p6uOaLaua820d5xw== 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=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=UoaMOK/F9oNYiHCthgCd9X1x0yrBWVYf4UF0M5idKiqgjr8rFgQyNtj4Vyi7woUfGrTHcMxj0dnesWylNPDXV8gMG3oQSS0xVH66JSouBWfCW+iuguEXY6UZbP99UeSENTp1ZR8vAdcFkvvP491wbKN8pV5nj9C9PKbxYp6GKP0= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by SJ0PR10MB6376.namprd10.prod.outlook.com (2603:10b6:a03:485::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.19; Wed, 16 Nov 2022 21:47:03 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::f7b2:af85:fe37:31a7]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::f7b2:af85:fe37:31a7%9]) with mapi id 15.20.5813.019; Wed, 16 Nov 2022 21:47:03 +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 v14 5/7] kexec: exclude hot remove cpu from elfcorehdr notes Date: Wed, 16 Nov 2022 16:46:41 -0500 Message-Id: <20221116214643.6384-6-eric.devolder@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221116214643.6384-1-eric.devolder@oracle.com> References: <20221116214643.6384-1-eric.devolder@oracle.com> X-ClientProxiedBy: SN1PR12CA0050.namprd12.prod.outlook.com (2603:10b6:802:20::21) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|SJ0PR10MB6376:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b30f633-edaa-4698-a496-08dac81c193c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OqHFaLbXyZRSAecE8TXYVxacT+9FCGG/6W0TGKYHoxYs8LYCw6UD/NUwiuwxwsQtPoHEXL7DugSwxznGDZu41cbN877A4yF+11eDbOYXPKbJLGYp2md9UhXcsgdCTGVr/N1cDR6MHtsIVagvk0k4Pi78fcrlYJ2JmeiwzEhVjQxuxOA7aD1HRgest+zvY4qcGFQdFJsFyOpm2G3T5ODLzJyGqBYJH43LY3/I8l1kLwLnmv/MmvQDDzPL3PK2H0fmwbcH7dxbvt9kAi6sQO7aA4PSTns4Pyhm8dgSqrOBzSTNJrKm3oE+8QcKma1VLanWRiDh1xPyU6J70go6DBtndLFoOnws3uy78PuY6BdH0EZtiouQUGYXNEdxlHGTCF37SrSGWJlsaUCOf+/VaGxlukqrAcLyhaUfdn0IaETcmMOFksjB8gGa8h90swDkMT3jAGGFaDVB85RtgRQT4cGcQ1yMJ3RgpX/dUtt3fvtLu/qd21YIt3cXW8MOd3m/RB2mY5K1kSfC3mcQ6U+ZJm/iMJXezwIfxbr5uPAQUS66G6d6+s9uc9hXSJMn0tLivr64ZRhEwfTSBMP/OKRVdeK/vI2O48gzxemxYMh9nA5ZoVHCQez8NHGylzZs7wFRS2byhbkDfxCTAt93RDzhXOMbzwgPHdKVPzGZITrMucPSv0vX+bVx9o0nqSYi6XBVTYyG1nw+cCZavl+y6g6IBqnDBA== 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)(39860400002)(396003)(346002)(136003)(366004)(376002)(451199015)(38100700002)(186003)(86362001)(6666004)(5660300002)(6486002)(478600001)(2616005)(8936002)(7416002)(107886003)(6506007)(8676002)(4326008)(316002)(66556008)(66476007)(66946007)(41300700001)(1076003)(83380400001)(6512007)(2906002)(26005)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ao4Bb+FP03WmIB/3YbbHwhOjiL7LSABhrM8I6i5CfZV57rOPevJMsD2KqMiegBHFOSeYlOQbXVIu7EKruLk2Gq4I6lhvqJPq/UWjSD4U2KvG5jtVhWP6+enCysVDVDf2+TPgL1UvRwNDNE5T8/Ep07mTtxvqVHvL2PJw9YihRLUe51kmgbzFP108ZZJu6Yb8NC4dZTc/lCCXY5AR5+1vg8FkVBLvnPVPqYBQDvajlFzLpmm/c/yUaxvK8hp78MQ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rIyLpdIMJVlk/M/x2NICiS0mmE+loNtgdYNkQNqoXGsvY3acnZMHitrYhWFDOwOxFYvR11xCkEPCouV+A2oLWQM3r8a6Fxl5q12VU861Vz0bHpiH81L1ln3Ga6wrqcesPpjFlBeo/pJG3+BmJZ0vi4nO2k8fA9XRNPXqZwMUNhwSq9pFWm/h1ZxVW0ukNg2MwE4SzvYIpzXvqid6ukkIIb061/RbAivkpAb+2nZ8luF1u1PthkaprO1aCfwpO/vWzn51cvu36wcWqNYWsXTufbT3kn3+6MQnZkuqiuWmM0zeExpU8IbYUXLVoSyk9G0wvskVrNb9xrgXivuy7qkl5jbhvT1GX5i/e93x/xHMX+z3Mbza4bOnbP2m7xoM1bgEyAhEbrzmtYsOUB4FipU+21XRLPz1IMIRkr4geImzJ2f+NJ9ioOTxkmuC5xrw4qszD1SWbQBJzKF7UFtOAG96cZmCDnhKed62fldgBZcnSgQoA1CHUuitdoDzVzcrtEB7b6FLnZw7vZiq/MvKTX20sHb6I9PHOTMVhONfSzzbGkDSxNcvUH0l2LzN1PDSsiCmytQXEDFD+Gn48pZxS6+oamYxiEpU+6B/3hM1gsALFHjQo9KidEPZwbjkTKUlxGNysZHmnrRI2oTb9LeZ8clFIawSM60ZgQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b30f633-edaa-4698-a496-08dac81c193c X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 21:47:03.5483 (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: F86+AcivgNO4yc4K3LNu0ejtr32yFw5eSsrW6n7A5GpgGuWrZ/k0fa9Xh3k9C0teZTH3lCTefs7Hc+6k2mvgmCO+zMRB+DLr/8r1+6RGLNw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6376 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-16_03,2022-11-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160148 X-Proofpoint-GUID: JiLGyF5UOqtVT6qOz8_Hx3_yE309Jf3a X-Proofpoint-ORIG-GUID: JiLGyF5UOqtVT6qOz8_Hx3_yE309Jf3a 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?1749691041051225449?= X-GMAIL-MSGID: =?utf-8?q?1749691041051225449?= Due to use of CPUHP_AP_ONLINE_DYN, upon CPU unplug, the CPU is still in the for_each_present_cpu() list when within the handle_hotplug_event(). Thus the CPU must be explicitly excluded when building the new list of CPUs. This change identifies in handle_hotplug_event() the CPU to be excluded, and the check for excluding the CPU in crash_prepare_elf64_headers(). Signed-off-by: Eric DeVolder Acked-by: Baoquan He --- kernel/crash_core.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 4e7221226976..5c90a90f3fe3 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -366,6 +366,13 @@ int crash_prepare_elf64_headers(struct kimage *image, struct crash_mem *mem, /* Prepare one phdr of type PT_NOTE for each present CPU */ for_each_present_cpu(cpu) { +#ifdef CONFIG_CRASH_HOTPLUG + if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) { + /* Skip the soon-to-be offlined cpu */ + if (image->hotplug_event && (cpu == image->offlinecpu)) + continue; + } +#endif phdr->p_type = PT_NOTE; notes_addr = per_cpu_ptr_to_phys(per_cpu_ptr(crash_notes, cpu)); phdr->p_offset = phdr->p_paddr = notes_addr; @@ -684,6 +691,16 @@ static void handle_hotplug_event(unsigned int hp_action, unsigned int cpu) /* Flag to differentiate between normal load and hotplug */ image->hotplug_event = true; + /* + * Due to use of CPUHP_AP_ONLINE_DYN, upon unplug and during + * this callback, the CPU is still in the for_each_present_cpu() + * list. Must explicitly look to exclude this CPU when building + * new list. + */ + image->offlinecpu = + (hp_action == KEXEC_CRASH_HP_REMOVE_CPU) ? + cpu : KEXEC_CRASH_HP_INVALID_CPU; + /* Now invoke arch-specific update handler */ arch_crash_handle_hotplug_event(image);