Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19632622rwd; Wed, 28 Jun 2023 11:55:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4fONQf3hFbaWktf54WtlzrQiO2oR60kY+HyM60lrvwn3VFxr45Zo4qQ8r6v75vvyyOl9Zi X-Received: by 2002:a17:906:72db:b0:992:a9ba:b8da with SMTP id m27-20020a17090672db00b00992a9bab8damr29787ejl.70.1687978521647; Wed, 28 Jun 2023 11:55:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687978521; cv=pass; d=google.com; s=arc-20160816; b=shZZkOc4s23gQRyLfA7eqTg+CH2y0PYz+c/clcOP8iWW/8kwPG1+/uN5rxAdkc1ot5 nHXscUfYi3A8nsuMf/bQivr3MjJmEt8eNaG+DbPGr/34Yt6OdJE5fZFL2WIhPh2BJuwl MOZaANXYV6ODVpCf4fgh69R3pACQE4RKmBPSfgLdfEFTPjTTOi2C6akMqllzRni++uKp 8EfwO8raDd2nhwQ1b5EIUfiyGDiXJqMyNLL7HnP9kCWjmh25ULEd2j9UeEYOHwUl2RG2 FCK6hiztOZBOqqub0qjP9aShDTksIGgEMcuDgVaFU5heqvyTnckvRnAEn9w1te6pWXRn qSlQ== 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=kqZzUcUI7g9GrNNQb568EFpHtig8R3NmjYR2Lpu3gEg=; fh=j+K5GuuLTbxxisV+wJRNZBqbr6zhGMwAghI8ANXi4rw=; b=wWiuWd2gSg1T5DNZnCW9g4CYHKyAikHagsBgNVmJL5krBJ0No6bxT7wbDZYlNAVpgj /csjzDQ6qKkezYQJr8k2bwP/rzrnGssKR7xlz+ENnyQZYIXkJTUBO36ILg/EyilWSj2y Mmq/nyQLEJYhN6Xm7hOdarxSFgpBgBGQ5gzD0p0hvDoyjIKWYm83EYmIk49URo0AWAFJ HlrScoWhrwXKAa3FjPSWzazIvQqwvx/83H1+ySF0efgP6KB4CYJbjj+cwED2AnSLCjg+ 6sxHXO9zEtZHHYQ9hpkumvBUKaUSA+MJtpen6tr4BrjexxQmdyUbNhiuhJ3gIBwMvYEY mByg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=PEHdWS8b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZM9Z1L3l; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020a17090682d400b00986432cf57csi5733254ejy.942.2023.06.28.11.54.55; Wed, 28 Jun 2023 11:55:21 -0700 (PDT) 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-2023-03-30 header.b=PEHdWS8b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZM9Z1L3l; 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 S231880AbjF1Sxm (ORCPT + 99 others); Wed, 28 Jun 2023 14:53:42 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:42128 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232064AbjF1SxS (ORCPT ); Wed, 28 Jun 2023 14:53:18 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35SGwm76002041; Wed, 28 Jun 2023 18:52:54 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-2023-03-30; bh=kqZzUcUI7g9GrNNQb568EFpHtig8R3NmjYR2Lpu3gEg=; b=PEHdWS8bLy+bP0M31qQ/8kf/fWEZqoFKO3T7IpW7AU5YESzpLMI4a6HBMqyxINpdxAl3 eWMXq3CYIeKcOFs8QFhV+DKVafZpG+BVnhDZGoVteDwA/Ixf+gFPLTYD9jpSJpGXjA6Z aY2wFL903BB825lRQ10CEQx+YrprkeGdW8q/waRC2YmMzeITt7abmPGj56NsfNRMOX2R JAudDwSg9TFL9+Vz9UEllOjtlDQWYvYAv7wGW6gd6cIgzKU1OJFSo0XUAR5N/zB7sGKs MElXLWg1pV9TgWZt2Tkj3g7MVFKlFpKnGvJcRrSlDIue/V404n0gRHXxZ/1RjbB4ufJk Kg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rf40e6uww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Jun 2023 18:52:54 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35SHeXd1019984; Wed, 28 Jun 2023 18:52:53 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2104.outbound.protection.outlook.com [104.47.58.104]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3rdpxc6d44-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Jun 2023 18:52:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cbW4I5JUQnMteEKhIIbRVoBG4i528sh6E4By+ZG6J2hskDy/R92T83uOH2F3pVa8NflpRAQr1N108xVkm3jEi9TVixaNrRSts1CnbQJpZUWm9zD3QzZJ76yMq3vd6gxkjMpmYhS8XLhcCXSTZ8NHlgLnUMqk2wp6wc4RwrLn5AJATzB8znpiYAku4AKZ6ny/LOvHvdUHOqkdq8KwYqlRNUIW+fV+aCzxqoI4VM4kT/DCdd/zzvutC4H7H3Wu5laMcZLu4V2BvAJp2lNyJiDB3z/dkOn07jiRi+m0fIw+9D7QrTkpSqw76uk3+xHYbWTEmsSYZN7XIlBRzzNGngAy/g== 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=kqZzUcUI7g9GrNNQb568EFpHtig8R3NmjYR2Lpu3gEg=; b=OCAvY9yciT8nTKYZYJcVkrLc3NCWmZsrXSQTcML6jaaG6yDfe2o061sktMjKXCm42FQ3qPY6oqixM4oCV9jT2s9+HD2gXbMA92AZ6BTNwqXR4GQr4/KY7uOuc+mNVm3xnkBRzhb2iuTe2O1DeJr+mnJbHG9J7dBAtiqtpPBq0GoevfckGLANXvqONCqxn34Nu9DVMUg9Pq3zl3L7CTriEGDN5gD1L+XU1YucltiLoSFwL8BaSdrbgU7YpIcfCOBQtXmFKc+d+4ubS9M0Xsfopciaz9KHXJuKTCw77glDqmOPs5GFG4HsHRmu0Mh5LYYHlPfbv5ON8EI37PeSglYVNw== 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=kqZzUcUI7g9GrNNQb568EFpHtig8R3NmjYR2Lpu3gEg=; b=ZM9Z1L3lLEGwV3w1839+OkOi3Y4l/dl0J0mYeoNYvTRsOAo1rrNO6Q7M4mMKxERwBp8ZAG9OuKr2Z7xW08V2rNNnJz9LM93G4t0VjJLkhQih6TunHVYckjlcurxCgjxmBiDFtTLSxgmhEOR1snXX4ayx3BfL/SL5/55rPDS/HMU= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by LV3PR10MB7820.namprd10.prod.outlook.com (2603:10b6:408:1b4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Wed, 28 Jun 2023 18:52:50 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::8b8f:b4b1:bb78:b048]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::8b8f:b4b1:bb78:b048%5]) with mapi id 15.20.6521.024; Wed, 28 Jun 2023 18:52:50 +0000 From: Eric DeVolder To: linux-kernel@vger.kernel.org, david@redhat.com, osalvador@suse.de, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, bhe@redhat.com, ebiederm@xmission.com, kexec@lists.infradead.org Cc: hpa@zytor.com, gregkh@linuxfoundation.org, rafael@kernel.org, vgoyal@redhat.com, dyoung@redhat.com, lf32.dev@gmail.com, akpm@linux-foundation.org, naveen.n.rao@linux.vnet.ibm.com, zohar@linux.ibm.com, bhelgaas@google.com, vbabka@suse.cz, tiwai@suse.de, seanjc@google.com, linux@weissschuh.net, vschneid@redhat.com, linux-mm@kvack.org, linux-doc@vger.kernel.org, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, eric.devolder@oracle.com Subject: [PATCH v24 09/10] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu() Date: Wed, 28 Jun 2023 14:52:14 -0400 Message-Id: <20230628185215.40707-10-eric.devolder@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230628185215.40707-1-eric.devolder@oracle.com> References: <20230628185215.40707-1-eric.devolder@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0224.namprd03.prod.outlook.com (2603:10b6:a03:39f::19) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|LV3PR10MB7820:EE_ X-MS-Office365-Filtering-Correlation-Id: ba26dda1-3456-4c8c-bad3-08db7808df7a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CNK4r3qODmyE5LvK1S4wwb6b5bLbTNeeFI7H5miyK82Lx6vGQ2qQQAlSvXHc8D7oZ7Dnft3msfhhNVIaaEyNO2g4GL5ICfHerh5LTtG8vprkwEBfSdcGvpeKXw2fGKH1qt+dvk6mgGL8EgQhPUshrgqEKZ+Pj+sBhT8iyG+DcqjU6SbwS/xmGNd9w7rzqCBgO+jzZCpzgbomF10ywpCENyVmvx+Efv1xYsgPWxfTYHtA98F78lrpGNNw2NcBwaQoqfyu5geTyxPo/dlPiAjHxJ153DaioVVdMAZnfgjx3y4xOrHsM1EBX81YThGVJWkFf6+71imuIvFF8/EFoEtVWMHRr0xK66iV+tk5erFDex/xg68tMcnI/Q1LDvGAoHAcDPDfPCtDTZWvdoyQPxJ3UXF2q5ZbuWtQIOH/7lu7WLHK9GwTZGOyR1sGDewC+QMJkq/PmzFajEVKs5iP4m2nLzhR+xpLMSxFRI5NdVlGdBrKYy3+BTY04CF5e7KrmBVbcAvSJpXOwUKAYuBcFuqcNk3LgCqPsvdS8fEnjODHyWRb5MdcA4HaXvr24yXL0aj4l76kEMx//jjh315gmje/7BV5w0J5x7nws68+NeSz9Q8= 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:(13230028)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(2906002)(83380400001)(316002)(26005)(6506007)(6512007)(1076003)(6666004)(6486002)(186003)(478600001)(86362001)(107886003)(921005)(2616005)(66476007)(41300700001)(8936002)(7406005)(7416002)(4326008)(66556008)(66946007)(8676002)(36756003)(38100700002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6MDEkhzcXiH/T+h27rmYp4YS/2wdrhDnxw1uwoOsVSmr8EheuACjCsYqjv0s?= =?us-ascii?Q?11BDgOCh+HJobw5PzpoTkoc1eYahmPCSWM4hJRSoQl/pCIEEa7sQY01uV0lk?= =?us-ascii?Q?bBNPqW6gWFmLmWgXvlStcHVVXJuQNlJ4zynRmWHCaeHPXhBFaSzOTHU5X9se?= =?us-ascii?Q?p/CigzYBa8+sj66RKtBfFvtIDZpXMi6ja/kyqRWdXV43ksCzcUbhqxrNRHKg?= =?us-ascii?Q?UUkBecoC0lYQgf9LcBtb7mUhjyWKYF9Z1v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uRQR+FtVjUo19ZX5mFWE2d8eqmlcgYsW7XU7/0txGGPHNvOrGIb?= =?us-ascii?Q?PF1JIRqlWtHtJ+WOgxFC/XLUwetcruahT3Bk5mEUEIDuW4tWlrf4dQ5xesyq?= =?us-ascii?Q?RepG0yMDJajOTJidN2vng1ZaotQs8patr9ghigGP/169MXtD427kDEK/hnCY?= =?us-ascii?Q?pq6JD5e+i6xJgy7TcVnXN6qo2H77tDasjr9rHhmrnQTRQq6x9H7s6ud70Cyy?= =?us-ascii?Q?UbKQ4ALAFbyhqGLmEujrC9qEw9xSgsU1GuGHAIT+sunMAmgjLczjOhi601jL?= =?us-ascii?Q?z1hkGRuqhpN4NopUynHhh+BXxnODNNt3uJOvfnAcWSZPoliTvMXpYjrzwaWH?= =?us-ascii?Q?YKmSedlrgnDtajwm4sdH9YpJnMdzp6oRiQ9922SxXDlsdb74RbQu7wzo+wFm?= =?us-ascii?Q?wJ26h+oIccZvcZ5fUADMILxMnTSL+l8f7aHR4PqzCzOvIphn7VQjUOT8M8Ja?= =?us-ascii?Q?ZQ=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?Y8T6ZkKHHVSUUHMKz9fjrCFv5ZaL4sJwEb04MKhY8ZmhJWKMzOAOJvfZ6FMH?= =?us-ascii?Q?51BlyH/qGdawtH3gHmK/k6yZzV74TJJN+MI5Z7jcsc2LUvvBcw45Vl+C5fn+?= =?us-ascii?Q?Xtrn7hTkBNKz/1JHkZ6te82pjxO392BwxvTL2fm/Kg6nB4HHxABHCaIVaJT9?= =?us-ascii?Q?qNw36EaUXn4q64bq0LZ21MQd1DkoTDHxy7iTzpsHMPqhPZEDkt8gWFUk4knT?= =?us-ascii?Q?p9V6xiN7nwUyd5l49NbtZ8HYn4/R0+VZSu+wkwgbK/C8YhZ/WulXzaPCBurk?= =?us-ascii?Q?6KUnbhq4TJwWnz0xHmIh83dzC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= =?us-ascii?Q?9dbrNbAOLjYxkG1/AwdGF2Mv9lpNnUbQM/I6IkbjebqgECc/OjSsSIpw3h/H?= =?us-ascii?Q?MhligMH3ca+uFR+iaB3D3GoPrBJ6tkGt3SpAV94OI6cfSIwZCU5/JY3rCBlQ?= =?us-ascii?Q?l7FNX6MQ9ulBMAYRGWE5xenoJFtsirfrFmWHsb2wiN7+WHI0MzqRkfAUZOJ4?= =?us-ascii?Q?I1y0re54XaMLDfMgqoYPC7GtdGpSMrHQ/KJLHh05jKiOK7IRaJDIcAvGxhH0?= =?us-ascii?Q?59w+rud8YzI=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba26dda1-3456-4c8c-bad3-08db7808df7a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2023 18:52:50.8418 (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: IaHb7SReA4dEq6xdH00xeWWBZTu0PxhGBjdrfrjtYU4uK8pA1TXMJZXc1ogRIFla+48xWUHL2JR4Py5LLQuzmZxA/E4Wv8NsatT9Rc8Y+hg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7820 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-28_13,2023-06-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306280168 X-Proofpoint-GUID: 0gxgbTEiHel7Q1fbdSDmLFOxBFxQPQis X-Proofpoint-ORIG-GUID: 0gxgbTEiHel7Q1fbdSDmLFOxBFxQPQis Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function crash_prepare_elf64_headers() generates the elfcorehdr which describes the CPUs and memory in the system for the crash kernel. In particular, it writes out ELF PT_NOTEs for memory regions and the CPUs in the system. With respect to the CPUs, the current implementation utilizes for_each_present_cpu() which means that as CPUs are added and removed, the elfcorehdr must again be updated to reflect the new set of CPUs. The reasoning behind the move to use for_each_possible_cpu(), is: - At kernel boot time, all percpu crash_notes are allocated for all possible CPUs; that is, crash_notes are not allocated dynamically when CPUs are plugged/unplugged. Thus the crash_notes for each possible CPU are always available. - The crash_prepare_elf64_headers() creates an ELF PT_NOTE per CPU. Changing to for_each_possible_cpu() is valid as the crash_notes pointed to by each CPU PT_NOTE are present and always valid. Furthermore, examining a common crash processing path of: kernel panic -> crash kernel -> makedumpfile -> 'crash' analyzer elfcorehdr /proc/vmcore vmcore reveals how the ELF CPU PT_NOTEs are utilized: - Upon panic, each CPU is sent an IPI and shuts itself down, recording its state in its crash_notes. When all CPUs are shutdown, the crash kernel is launched with a pointer to the elfcorehdr. - The crash kernel via linux/fs/proc/vmcore.c does not examine or use the contents of the PT_NOTEs, it exposes them via /proc/vmcore. - The makedumpfile utility uses /proc/vmcore and reads the CPU PT_NOTEs to craft a nr_cpus variable, which is reported in a header but otherwise generally unused. Makedumpfile creates the vmcore. - The 'crash' dump analyzer does not appear to reference the CPU PT_NOTEs. Instead it looks-up the cpu_[possible|present|onlin]_mask symbols and directly examines those structure contents from vmcore memory. From that information it is able to determine which CPUs are present and online, and locate the corresponding crash_notes. Said differently, it appears that 'crash' analyzer does not rely on the ELF PT_NOTEs for CPUs; rather it obtains the information directly via kernel symbols and the memory within the vmcore. (There maybe other vmcore generating and analysis tools that do use these PT_NOTEs, but 'makedumpfile' and 'crash' seems to be the most common solution.) This results in the benefit of having all CPUs described in the elfcorehdr, and therefore reducing the need to re-generate the elfcorehdr on CPU changes, at the small expense of an additional 56 bytes per PT_NOTE for not-present-but-possible CPUs. On systems where kexec_file_load() syscall is utilized, all the above is valid. On systems where kexec_load() syscall is utilized, there may be the need for the elfcorehdr to be regenerated once. The reason being that some archs only populate the 'present' CPUs from the /sys/devices/system/cpus entries, which the userspace 'kexec' utility uses to generate the userspace-supplied elfcorehdr. In this situation, one memory or CPU change will rewrite the elfcorehdr via the crash_prepare_elf64_headers() function and now all possible CPUs will be described, just as with kexec_file_load() syscall. Suggested-by: Sourabh Jain Signed-off-by: Eric DeVolder Reviewed-by: Sourabh Jain Acked-by: Hari Bathini Acked-by: Baoquan He --- kernel/crash_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index fa918176d46d..7378b501fada 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -364,8 +364,8 @@ int crash_prepare_elf64_headers(struct crash_mem *mem, int need_kernel_map, ehdr->e_ehsize = sizeof(Elf64_Ehdr); ehdr->e_phentsize = sizeof(Elf64_Phdr); - /* Prepare one phdr of type PT_NOTE for each present CPU */ - for_each_present_cpu(cpu) { + /* Prepare one phdr of type PT_NOTE for each possible CPU */ + for_each_possible_cpu(cpu) { 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; -- 2.31.1