Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4471484ioa; Wed, 27 Apr 2022 04:43:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7hfRA9IPIiY8cc6ZwxRQnNFnPAmJRANHJrrp0tOJc7buem2nBRYORSjFGon0qghPe5HpV X-Received: by 2002:a17:902:c24c:b0:15c:fa6f:263c with SMTP id 12-20020a170902c24c00b0015cfa6f263cmr19573404plg.66.1651059835882; Wed, 27 Apr 2022 04:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651059835; cv=none; d=google.com; s=arc-20160816; b=ocfgvJDW4c/lxx0JYpUO8OYg/R0XUpSge54eSoz4OYeMZFJRnujXNQcA9KCWxyRT+M 2sR8aBjHN/XSUTrRraqSHrVI9IFc9B9IFcR+zcFoHxZ4tNB6g13HHBYe9y8ZURLamGs4 tfzIqgiUiU501fxuYWmDs92u4MNEK2qBNfrGHXcg8lY4alUJGqimfZ2p0MrQZkb0Aecx 9Ous/IIQGW4UfVMIo+kHy74JhkN49eyu/B/jHW+e9fTFVcSqxHx9y/VWFkNHnXSfrJbM INVOXujKFW+nqA+DKrFT6bpyfiTfzTcdUT/HJ1z0PyrxLykgb6n9tnUX1hWdwNvJueXw N4eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0Mx2ljMgyeb1KSAU+/20OsjJdc7S6/3Eyp+HNpvcZrE=; b=ovjpDvnfJHduEbZIQC8DHDh0ZrtLjF0mfMq3VVKMERC8eHKiWxCOWUuByxzHj8AQK+ Vbj8n8GpvfcUQATyjiJLgzIto5QLvkPmlFFTIaQR9wcgD6qbJz7MgTVXeCVF2Fk5MXoP hpIFw/6+SmV68Ve0fkgxF+a94cpMqOkf11L6Hi4D5wNrqfJDEN8guh1k3tMW0vTR2bDM mkkrjeJ7vd+kyLzSZ51NJ/ReAVBSQx8YSDIAwBPyjVN3RkYA5Uhol3Olp41yleHCzl+E CiJuBUs+5vZSV44YA/sbPh/0G9fg9vyWb9yd5xTbcFz2owbipJg177bZSXTLC4tZmjN0 MvPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="qBbR2/Dm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q189-20020a632ac6000000b003c144fa99cdsi1218672pgq.543.2022.04.27.04.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="qBbR2/Dm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BCD742F07B7; Wed, 27 Apr 2022 03:58:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbiD0LBS (ORCPT + 99 others); Wed, 27 Apr 2022 07:01:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231560AbiD0LAM (ORCPT ); Wed, 27 Apr 2022 07:00:12 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4588440E33F for ; Wed, 27 Apr 2022 03:48:15 -0700 (PDT) Received: from zn.tnic (p5de8eeb4.dip0.t-ipconnect.de [93.232.238.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 694731EC0535; Wed, 27 Apr 2022 12:48:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1651056489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=0Mx2ljMgyeb1KSAU+/20OsjJdc7S6/3Eyp+HNpvcZrE=; b=qBbR2/Dmz6OVlPD0bpbknyeGPlgK+UyCPyBRlIOjy4P3f22zHsx1pbyPpVTIp6nDzENDtR 17XD4Vi9Kr6NwYiDZ1ZipFlaFS1dWwbv5qJM81nSbaSi8rp+OyvjaAZbmsmEYCI1ivzvll KHsgX+VzC3BWJbMjWC982GC5JX/F4Uc= Date: Wed, 27 Apr 2022 12:48:09 +0200 From: Borislav Petkov To: Eric DeVolder 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 Subject: Re: [PATCH v7 2/8] x86/crash: Introduce new options to support cpu and memory hotplug Message-ID: References: <20220413164237.20845-1-eric.devolder@oracle.com> <20220413164237.20845-3-eric.devolder@oracle.com> <0aee5cd1-eb8c-f778-c6e5-7f5ca3624d15@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0aee5cd1-eb8c-f778-c6e5-7f5ca3624d15@oracle.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 Tue, Apr 26, 2022 at 03:08:26PM -0500, Eric DeVolder wrote: > 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.) Yeah, I guess. As the comment in do_kexec_load() says "KISS: always take the mutex." so ignore this part of the diff and let's always grab the mutex. Sorry for the confusion. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette