Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25961383rwd; Mon, 3 Jul 2023 03:36:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QL3bBnquaX4RB2HEszdzHDRh7MANlyzHDZWrd4kIBtLPcWNiK5VANRDV2lp7DaXXwFBTn X-Received: by 2002:a05:6a20:3943:b0:128:b722:e789 with SMTP id r3-20020a056a20394300b00128b722e789mr11034875pzg.1.1688380578228; Mon, 03 Jul 2023 03:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688380578; cv=none; d=google.com; s=arc-20160816; b=w0GShBjd7ridchvaOlPHIsKORsUmtfvWoG+7EsWa5EpukfGEdtkqZuj+B+cL7NAd8r KphcfxCZ5hpbNIzbJ3eDSxdeCfD7SMk5t7bbPyY7TBeAzLagW+v/wk8ZpBPI35Zm6o0m 019d3h4RnCzwgWmI/oF+sscnKD0xsR5crUrwvCNsHRlKj4qXf4jM0wFrsDvM1pOwijST /ahDkplKufu9nALC4JGi88BAEOUDGFsN8IQ3TrGLHeeMqoDU2NRd6/ZogwsMR8RnKi/B vGeE57V641IDxig5kbQPxhUjW+2Zpx3Uynhu/evX1l6rns5Ezx0Mdu5OY56XxFug5XQ4 6eOA== 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=msJWpyA7yo6ChYj6KxpLPwqEqEdFIUqzWnqvB6326h8=; fh=yFGwLzCs5CD3PsfH113UJdCp0dNEYsIXxv51/+Y7b+U=; b=nrl667hh/qPKUX2+BM+Z9rgsLY7uy+uf2A1oaK8Rz7q9H4uHKs3zId0JgJKcdKyUih EngSndDq1U6Dxn/gL1eA0+QNMyo3Fq6s4834jnFyBRpKrFNPOui0pTjKS/jwMweg5d1b 7s06NSSIEYyCwAJOG/5N1OKFAQijNSPidH/yhQIpIg5Q8EzRm74gd3MAIKcgEQxDR0ud dRx4hre3To3D3pgmsmybJeY3u1+EExu817PvV16ZPsOwJVhWhMT7664KyuAdYvbmCDZD sL+mQiCs7uyr3IzBmJI6JAelSTU3vdSUqxP/xWjleKiTBNVjXPzdEcNUoy5FN0aYaZYU QzPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uG7u5pKu; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170903018600b001b864e277e1si8602328plg.494.2023.07.03.03.36.05; Mon, 03 Jul 2023 03:36:18 -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=@linaro.org header.s=google header.b=uG7u5pKu; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbjGCKbH (ORCPT + 99 others); Mon, 3 Jul 2023 06:31:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbjGCKak (ORCPT ); Mon, 3 Jul 2023 06:30:40 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C03719B3 for ; Mon, 3 Jul 2023 03:30:05 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fbc0981756so40072305e9.0 for ; Mon, 03 Jul 2023 03:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688380185; x=1690972185; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=msJWpyA7yo6ChYj6KxpLPwqEqEdFIUqzWnqvB6326h8=; b=uG7u5pKuhtwVbr2UgzP8QRIsfl1iHAteUv24U80QoHbW76XH60V8ImE2VNBLxQa9Qq kLRpwlK6YtuNENBihvqHpD6PyWaah6uVndRmhCfpY/XXqkgmtI/BwUInZ8BSkTfG/Dao 18RUARVnFlz7VWwr0WMyVF8SsKwfdStnu625yEymLkZ2+Kj86OmvzzI8YUNG7JLtpSGp HEsvosPWjYgwvL8q8M9NlgK/Mj6nmGfLdNG759I8DxJ2cICoqAa9ihOBTlJF9w24ph2d TbkH2F7e9NyNZM63JA/5/MZmRvOX3RU0Jb+i7iMf+YaKFCuFhigY9yyshw65JxqmZDgQ EZpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688380185; x=1690972185; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=msJWpyA7yo6ChYj6KxpLPwqEqEdFIUqzWnqvB6326h8=; b=a4IDgd3WrvzPZu+zaKd0rukL8gEBTaiEQbSylp56h7Fh+eYw7NPzZoZmFFfs7idhmG ee/xU7YGgIcCtORKA3E00J62WPIrctf4/FngJEvCA9sN4P/kuWEWTwlFXBbAOtGajRPv sYtYI/k530ixZJiEIykmgjHoB07Bbi+HHA7L/FUTTO+dsjDsIxHzG0Y2v8fMLAHgoHp6 i27fT7CxFLTasNstun6oHl87wSRknUmfDnujdrPpCs/dlcACPoE8F4tdlxCjd5L3/hMY BKAOEOOk29LTSf2MLYe+MA+Zke/BJlV7xx82jO1Ub4Vi53t+n5VLRyYiuZX+uO2boF7t YPUg== X-Gm-Message-State: ABy/qLaXSSc79r9lZTiyJg5VsKj5olkKDIP4gyNFCo60d5wb9pzGSq3f gNyIOhFe1+FTnsDvW5vmwLVUqg== X-Received: by 2002:a05:600c:22c4:b0:3fb:d1c1:9b79 with SMTP id 4-20020a05600c22c400b003fbd1c19b79mr4086786wmg.30.1688380184737; Mon, 03 Jul 2023 03:29:44 -0700 (PDT) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id q18-20020adfcd92000000b003140f47224csm12786759wrj.15.2023.07.03.03.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 03:29:43 -0700 (PDT) Date: Mon, 3 Jul 2023 11:29:41 +0100 From: Daniel Thompson To: guoren@kernel.org Cc: arnd@arndb.de, palmer@rivosinc.com, tglx@linutronix.de, peterz@infradead.org, luto@kernel.org, conor.dooley@microchip.com, heiko@sntech.de, jszhang@kernel.org, lazyparser@gmail.com, falcon@tinylab.org, chenhuacai@kernel.org, apatel@ventanamicro.com, atishp@atishpatra.org, mark.rutland@arm.com, bjorn@kernel.org, palmer@dabbelt.com, bjorn@rivosinc.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, stable@vger.kernel.org, Guo Ren Subject: Re: [PATCH] riscv: entry: Fixup do_trap_break from kernel side Message-ID: <20230703102941.GA4328@aspen.lan> References: <20230702025708.784106-1-guoren@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230702025708.784106-1-guoren@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Sat, Jul 01, 2023 at 10:57:07PM -0400, guoren@kernel.org wrote: > From: Guo Ren > > The irqentry_nmi_enter/exit would force the current context into in_interrupt. > That would trigger the kernel to dead panic, but the kdb still needs "ebreak" to > debug the kernel. > > Move irqentry_nmi_enter/exit to exception_enter/exit could correct handle_break > of the kernel side. > Fixes: f0bddf50586d ("riscv: entry: Convert to generic entry") > Reported-by: Daniel Thompson > Signed-off-by: Guo Ren > Signed-off-by: Guo Ren > Cc: stable@vger.kernel.org I pushed this though the kgdb test suite that originally found the problem (although it didn't occur to me when I reported it that the problem was nothing to do with kgdb ;-) ). So FWIW: Tested-by: Daniel Thompson Daniel.