Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1769272pxb; Sat, 2 Apr 2022 02:53:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO6N69GFRacU4xqm0WX1s3hXH0xDn+zkNUSyCI9A0hfZgVKXJI+BB2KGt5UCFABxQ5xTS5 X-Received: by 2002:aa7:cd7a:0:b0:419:48ce:3a10 with SMTP id ca26-20020aa7cd7a000000b0041948ce3a10mr24378768edb.312.1648893204667; Sat, 02 Apr 2022 02:53:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648893204; cv=pass; d=google.com; s=arc-20160816; b=kbMqpzOxNOlSOxeJTojybNWYNKURGGP2QsE3BEWJTUSvrPCPtwV08DySj32nvsjiBb OAxz9QcC2Wdy83xuP9KeCVhf/G2HL/y2fZxKTlJvoHKSw5GjJfC13KArEgNlz976+uB1 qPnim2IdVvX6kDSype1QTIjUzaawN+k8P77S70O1eO7Ok9vSqXWVQGo1Gn5Ihmumhfsu 37j8lw/hsNV84y3lLjK5r3iGx6eGt/TyhBqEfphxJTjM35XDVJKedh9H72uamqeC6P5g PFA9qGjYlzRv7o+tJs+yA6whEBhbDhPev8HGuNxVMF14dB3G0Ou7slUl6Et6RCnQyBqY ezPw== 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=AjHeRq5wVgOYs1Bw5mMPGUS7Oqa1BZQ/voOeweOKezI=; b=ztVxzVWVNkNCj4XdNaNrw5ka4N2U/3C7FSudZbh045o36n3G/0qY+YJFEbEsx8523o C+sn+jOoRLOGSzBK7I+/QnX62bdpGQBKgh7W0EB1hOL4XWGyFayxR4FcGD9muEZeBCzD OXhBSRJJoahghIcTpNweqjmpsP7Xrb5pX+UFlIZqRx0DR+UNTYvjwXllkY2FPPab/26o +NNEPBQOCDweyo/xayr+j8fBjzPi8w6uik7rEOh2Bna5iz5AVKTXVpyvEpZDs4+QY1K0 iUQaw71AnynG0KGvPdMpUlQbUrljlO0EZP61Ahurq43uZ450k1o0lfVnq39LQ0ExXNOk Sc6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=DBrMxwWt; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pNmyvD2+; 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 k4-20020a1709062a4400b006dfe65cdeefsi3010806eje.87.2022.04.02.02.52.52; Sat, 02 Apr 2022 02:53:24 -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-2021-07-09 header.b=DBrMxwWt; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pNmyvD2+; 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 S1351268AbiDAShs (ORCPT + 99 others); Fri, 1 Apr 2022 14:37:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351259AbiDAShq (ORCPT ); Fri, 1 Apr 2022 14:37:46 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7911D1E1131 for ; Fri, 1 Apr 2022 11:35:55 -0700 (PDT) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 231FiZXD014831; Fri, 1 Apr 2022 18:35:35 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=AjHeRq5wVgOYs1Bw5mMPGUS7Oqa1BZQ/voOeweOKezI=; b=DBrMxwWt1V6Sz6bYJNkJA4inJrcEn8mc4dSoXxYPV9T8ph9GuPKwzLQoBxKY9HHSMpmK EbBL3fQyOn79CKM23U1mNQfz3BeSADv9mEJO9Xk2Z8lLlc/b2OnmIHOraMNlQXtQkR3e gSX02MH9lnhsotfo9JXJ5IFtTbYSk6WT6gSgsHeYvHnmnp6ScaMgoVWgStirWPccghWq 49fymt3iilhv6zR1tXzyjCab2o9lVbE/G3/cYZ6Igd1rtwRvku0T1FG9SQq/UpgW6tqo e5FSHIqFzW6DDq0+8E5WOC6YQS/bazPqZX+t6f8XE5bP/MiM0EAb+W0PLszAiVvflXH+ 1g== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com with ESMTP id 3f1sm2qucx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Apr 2022 18:35:35 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 231IVOkH026435; Fri, 1 Apr 2022 18:35:34 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3f1s969399-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Apr 2022 18:35:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cg5u66THz7eKNsqnsmTjbORmPfEi4ClkWzkrq+ZPGyrPddCA3BQaD8rfaGRIUzeYG6pmR58bZaYWFIgEQL+NvDSq21XOhG3i6Mxm5sYK3soDl5f3RUVlm3H1NEa66DtuT6yK7pBaFL6fHEFnAv2/YkHDk3TM6OePdPWzNxUV70KqS9JVK2cWSpWg0+MDd5Nk9JPh4mzuPep7/B342xnlFuqp7LXHxstmgQwFvDNWq1jbMrqCsDykTjhshmfR4ZNAZCsT5Qu9QMmSsb+Q5IPY52oJG9+oywe5g2yKyggIiT8tpX48rUXRT3FkKhJGD+sUse+yqKn0KTXqGfA/uear0w== 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=AjHeRq5wVgOYs1Bw5mMPGUS7Oqa1BZQ/voOeweOKezI=; b=KWJnrwgBVLkqqgcCquShCTEFtIokLLyD3oBSn9JOogQUPmjuFIItBPBnW2qhjZ23o46rOkHy2cIJO7a5YkSmxpqPS9llugF/fkgCTvPwWh4fn8P2DS3LiXf2FQDg/B2ObFrBMsh+CsggBCj13bS2kK+Q7XbyvRrNr69sRnN7f1RhUeoPP0Na9K7P7x/NbS8/LuVows0IS1nhj3o06e8K4Am0u/aBSTgiH5KmA2GwU9cExcRfkqrFBubQgFXoNvzE50gTv5koHz5DEPSdY6MQqSNHQiLJU1gUMFq0uF63myy80tsntePNm6UBPdLlRMzlB1FCSuqyh0EnHBrPWxRNxQ== 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=AjHeRq5wVgOYs1Bw5mMPGUS7Oqa1BZQ/voOeweOKezI=; b=pNmyvD2+8GASFmpa/As6o+xfbbuKH0JtHryybkkOuvpQqZ5eL+2lBKd7L1T7wh4CEXj0tQk1fFDk6xz9tAkdjuK2X/0N6bi1k9iGP9NXqGVB5dMzE6CQJC2EFoNzNxg8xDsecMmDmnV1ulplMaZMd7jGXJ5uabzjTZcO9lHSvB4= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by SN6PR10MB2782.namprd10.prod.outlook.com (2603:10b6:805:dc::20) 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:35:32 +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:35:32 +0000 Message-ID: Date: Fri, 1 Apr 2022 13:35:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH v5 8/8] x86/crash: Add x86 crash hotplug support for kexec_load Content-Language: en-US To: Baoquan He Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, vgoyal@redhat.com, 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 References: <20220303162725.49640-1-eric.devolder@oracle.com> <20220303162725.49640-9-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: BYAPR03CA0009.namprd03.prod.outlook.com (2603:10b6:a02:a8::22) 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: b8c032b0-e741-4c80-f5ec-08da140e6751 X-MS-TrafficTypeDiagnostic: SN6PR10MB2782: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: E/w1Qk8/MXiH6vPAAmu0NoOUamXpzSRT9Ph9nngEn4UUr4FoffWhoIJxFVv89UJYotGFSUp6DdUHuepr93zim4BMwjVpBx1KH0WjELzdTxtxkZkOQzAAl19oeoN/xWmDVX2Xq7iQrRrmguy9PN+KCWGWBvprE5tN1BOsqqfMsWQKRBZiywnr1cbemhfgrfAj469LfZmSUhEk6ZG1yDGsRBbLLpa3J3xf0W2nT1+Gsj2jqTFD5esTKVwA7zB10P54XuqC+khwW+UwzrKEXbxIKAUkA19BPBVB3yOOVQLbVabCD+e4P/vJe2dHHjKXvUG87pJsLd3jf402p7eIY0uhaS1actkVuWC49+JdGRSCQcEagt8FGfRSAsRet5JSJod4oSY8S3pUT5anhmCxyyB2u+wMgm/2Qe3qqPegqYQk6pNP8wM8i3jFaIoE1L4hzx1novXZEp+WAX6seBn511+zBT5bR9In6oBpZ04CsXcINq67cA0+HOv4JgECC87C09ixkNGFw2Ud402BhDQTALQCIv+GTDu4jK2iyAYvpGJxrn30uBxy+pby7pO4ybK5AHFg7ZBdgefJ3/PnMAn/C7ctdnuEzjuAyQRwlu++/YKYf0XvzK73D3GDujrcpH+kWAehl4LAC9cFF0WmJnp0bKqqM8oNBZnuv5tzNUzNZwcY7JwSjld1tr36/dIQT3AdLeQGi+krVqjRJloQCi+K0sVS6tSbvIuD6KbAZrruX+slEP0= 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)(186003)(2616005)(6666004)(31686004)(6506007)(4326008)(2906002)(53546011)(6512007)(36756003)(7416002)(107886003)(8936002)(38100700002)(508600001)(66556008)(66476007)(66946007)(6916009)(316002)(8676002)(5660300002)(31696002)(6486002)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SkRWQmwzSW13T0VabVJXTldyS3J2WXltMGlPTmxBc0tUeVpJbW9MTVd4a1Fn?= =?utf-8?B?R0w0VXEvcFZJUTFCRjRBRUNidmQ3eHdwRjhUVUN5V3hnZU1yVDBBaFR1bGU5?= =?utf-8?B?dDgwUlg4bFozRERuei9HdGFjdXFsdUc4N0M3Vml0aVVJR3hsNUFHODZGd1M0?= =?utf-8?B?RFl0eldzUjROd0NoSGEzMzl4ZmxZaFp5TTFlckt0TnBpd2JzZDVSWHhDbHBM?= =?utf-8?B?a2lGQXNjbk9nU09nSXJrMVEyaVB3bzFDM1pIdnZsQlR4MjNXZ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2ZWZSNE9hQkdIYU5PWHJ3MXUzYzVydXhUWnZxWDJJUWsy?= =?utf-8?B?U0xKZmFUaS9XdldmK2ViWVlwTEVNWndCRTFjQ3o2ZWZCR0gzRnQ3U0RJeTJ1?= =?utf-8?B?aFltZWtOa3lZVHhpcEVsT2pOYml2MmVBYUhtMlBRTnhGaGs5MzRzeUhMNnFZ?= =?utf-8?B?UFZZQ0EwUWoxTzg3ZEhBYkEzWUVHdWl0eVhTTzM3TGd4aW5lSk5EUGRNeUNV?= =?utf-8?B?aytxN0c1MW52VTlVMENJY1ZIc2w5SG5ha1d4WjY1Nm1sVGtIRWh6bjdyWnhZ?= =?utf-8?Q?eRX2daN4QMUWuWORtIbd5stl+weP6mPvOmGv0?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8c032b0-e741-4c80-f5ec-08da140e6751 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:35:32.3587 (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: 8BvS8TG4CdccstvB+5ItAJYL+PKAG48h4Zxdz8YL++PbqmHZ409KmGpJS6tJajaTillSZpvcK/cK1edYXpvP7eml2mD+7Z8IHmE6FcHcJyE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2782 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 spamscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204010088 X-Proofpoint-ORIG-GUID: BQp9-j8UK9N-CVzJBdMB1yGJEu57d5nj X-Proofpoint-GUID: BQp9-j8UK9N-CVzJBdMB1yGJEu57d5nj X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 On 3/31/22 06:10, Baoquan He wrote: > On 03/03/22 at 11:27am, Eric DeVolder wrote: >> For kexec_file_load support, the loading of the crash kernel occurs >> entirely within the kernel, and as such the elfcorehdr is readily >> identified (so that it can be modified upon hotplug events). >> >> This change enables support for kexec_load by identifying the >> elfcorehdr segment in the arch_crash_hotplug_handler(), if it has >> not already been identified. >> >> In general, support for kexec_load requires corresponding changes >> to the userspace kexec-tools utility. It is the responsibility of >> the userspace kexec utility to ensure that: >> - the elfcorehdr segment is sufficiently large enough to accommodate >> hotplug changes, ala CRASH_HOTPLUG_ELFCOREHDR_SZ. >> - provides a purgatory that excludes the elfcorehdr from its list of >> run-time segments to check. >> These changes to the userspace kexec utility are available, but not >> yet accepted upstream. > > These backgroud information should be put in cover letter, or in patch > where they won't be grabbed into the final commit log. Removed. > >> >> Signed-off-by: Eric DeVolder >> --- > Here, if you want to put some status or backgroud information and expect > they are not got into log, this is a appropriate place. > > >> arch/x86/kernel/crash.c | 26 ++++++++++++++++++++++++++ >> 1 file changed, 26 insertions(+) >> >> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c >> index 5da30e2bc780..45cc6e3af63e 100644 >> --- a/arch/x86/kernel/crash.c >> +++ b/arch/x86/kernel/crash.c >> @@ -486,6 +486,32 @@ void arch_crash_hotplug_handler(struct kimage *image, >> void *elfbuf = NULL; >> unsigned long mem, memsz; >> >> + /* >> + * When the struct kimage is alloced, it is wiped to zero, so >> + * the elf_index_valid defaults to false. It is set on the >> + * kexec_file_load path, or here for kexec_load. > > I would make the last line as: > kexec_file_load path, or here for kexec_load if not already > identified.. done > >> + */ >> + if (!image->elf_index_valid) { >> + unsigned int n; >> + >> + for (n = 0; n < image->nr_segments; n++) { >> + mem = image->segment[n].mem; >> + memsz = image->segment[n].memsz; >> + ptr = map_crash_pages(mem, memsz); >> + if (ptr) { >> + /* The segment containing elfcorehdr */ >> + if ((ptr[0] == 0x7F) && >> + (ptr[1] == 'E') && >> + (ptr[2] == 'L') && >> + (ptr[3] == 'F')) { > > Can it be like memcmp(ptr, ELFMAG, SELFMAG) as we have done in > parse_crash_elf_headers()? With that, one line is taken. done > >> + image->elf_index = (int)n; >> + image->elf_index_valid = true; >> + } >> + } >> + unmap_crash_pages((void **)&ptr); >> + } >> + } >> + >> /* Must have valid elfcorehdr index */ >> if (!image->elf_index_valid) { >> pr_err("crash hp: unable to locate elfcorehdr segment"); >> -- >> 2.27.0 >> >