Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5667436iog; Thu, 23 Jun 2022 03:00:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sHsU+ui1l5UGV8g7ZwuEg0Z3daCDDnxQev9zXhcJDvNOq2S7i0fQ0fDO1pLKgwLV09Kgoo X-Received: by 2002:a17:907:6d8a:b0:711:cb5e:650e with SMTP id sb10-20020a1709076d8a00b00711cb5e650emr7330382ejc.280.1655978399896; Thu, 23 Jun 2022 02:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655978399; cv=none; d=google.com; s=arc-20160816; b=NSfThNytVRIj1hivl9BCLT6GR7iOPW/sPea/ic7DpdoVtwqafDzp4bnMa6CUUH10+N o4rgvdILB3RLSBYIvZdTlVtL98oRJZpLU7rcfpDJ1W6GGpltwxm5sNQSgyga5+cwzE8I RTFoXwt1LMXDhrXCM4h7BvKk0rjgQ00NVEPbixoeuAdWVP8osFa8NNSJPZxv5HoN/Yq+ E63tKR5r5jNycKfDSD9buSbgvLWWm1WmKXuXxYeiy+KbSdjMP/ZFzh0xu7v+cHPMAiGf y3jPO8MmAuOweIX++6wuH81ztAKWwVDMSySt4Z7ue9DcIcnZQFOXCOhOgMadN1Zv2ZfV O0AA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=rdy+QUhPkvFcFC80rvjevTMJhfdSl1qbxeO2CTdvv58=; b=Ek8IW8pTWSNRE5uQSXHQ7wgvyBByZcyanPr7rHy8FY/saCKB2Axi59CdJcH6g2dZAE /rPuhi0mCo4l5eT3B4My4l77rW2aBZ2m3lPJmnRD0p4kHKt+FPNNaDbiHRQfGt70HVu9 L9kAoUUKenvrQ1I2kSyV9toGkIwJE/GsSFszyoW86PY9O889TNs007tpB7hzpmdOskQC eZCECqXD1K0UM2Yt65oPYyR3XbG6ZDplytc/X6yB9fjzLozrL12bmSZOlVE0pgxexQ5q sO6I4aol8NDm6OqBoSRbvnny1pW7PsItRqlPlnENKKkHcXjGiEDjV5+PpkrXvLCJfhmB BUuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NEhmq8vi; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa4-20020a1709076d0400b00722efd22affsi5341821ejc.751.2022.06.23.02.59.34; Thu, 23 Jun 2022 02:59:59 -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=@linutronix.de header.s=2020 header.b=NEhmq8vi; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230311AbiFWJb5 (ORCPT + 99 others); Thu, 23 Jun 2022 05:31:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229645AbiFWJb4 (ORCPT ); Thu, 23 Jun 2022 05:31:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7DEE48302; Thu, 23 Jun 2022 02:31:55 -0700 (PDT) Date: Thu, 23 Jun 2022 11:31:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1655976713; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rdy+QUhPkvFcFC80rvjevTMJhfdSl1qbxeO2CTdvv58=; b=NEhmq8viQ72FOh+cau9QybpV1lZZv76F0Y0skF4OQ3K33zgzmjPISWBUw8wZ8ejYmmzZtJ Za/VxomJ8D0EbRmyHsp9iIgo5KJtEtw8W01lx6LJFRXY7qpRtQEeftXKQrJEcY8hZzGlao KFURtbeaNG/jIDaSC6pLEds9Sjs2tQ+rHR0NN2Ab4xtI0Y5BCzxPZgxN0ZT2FcYK9XAvq7 gSwZLLW3g90EflW0hduk0fFEQjhbAh7nK+ixMY00pRCxuxyhm4XqHCAREYUSI49F4mfXAT T+c1qZC3PMNYcahuSC2DpV5oXODqczdVooKzp4pXQI/smcHSisXnnjHwclyScw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1655976713; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rdy+QUhPkvFcFC80rvjevTMJhfdSl1qbxeO2CTdvv58=; b=1tpp+G+oSQjiwNGLj9aUmHGzkXlmunN6sB7hmmrXtf56s+eH5ZchYT6PhUcvWW8snWnOb/ i9anyEfJ1+O1mHDQ== From: Sebastian Andrzej Siewior To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-rt-users@vger.kernel.org, Eric Biederman , Arnd Bergmann , Petr Mladek , Thomas Gleixner , Juri Lelli , "Luis Claudio R. Goncalves" Subject: Re: [PATCH v2] panic, kexec: Make __crash_kexec() NMI safe Message-ID: References: <20220620111520.1039685-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220620111520.1039685-1-vschneid@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 2022-06-20 12:15:20 [+0100], Valentin Schneider wrote: > Attempting to get a crash dump out of a debug PREEMPT_RT kernel via an NMI > panic() doesn't work. The cause of that lies in the PREEMPT_RT definition > of mutex_trylock(): >=20 =E2=80=A6 > Fixes: 6ce47fd961fa ("rtmutex: Warn if trylock is called from hard/softir= q context") > Signed-off-by: Valentin Schneider Reviewed-by: Sebastian Andrzej Siewior > --- > v1 -> v2 > ++++++++ >=20 > o Changed from Peterson-like synchronization to simpler atomic_cmpxchg > (Petr) > o Slightly reworded changelog > o Added Fixes: tag. Technically should be up to since kexec can happen > in an NMI, but that isn't such a clear target RT-wise it would be needed for each release. There is also a mutex_unlock() in case an image is missing. This can go via the scheduler if there is a waiter which does not look good with the NMI in the picture. Sebastian