From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBD1DC6FD1C for ; Tue, 14 Mar 2023 13:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2PZinJxdWI744Lcfb0QKP2QCbBce01RYz0mcvCQOohQ=; b=07K6Fr9RX+UFUm EJCSVSyn/dI6jbTnrFBqJ/xPjlerCsbR9i46mcFQ60S9YgFrH8CIXAl50+FxATq3fs1DmoaBSqh/u 8bGfEmG5DP7dZ5Nra01Szt7gn1oJmNjTx8hecSVGvjoFcf6UVnb7Dawmo479mpLFViy3uagB9F+Dj ILWi4Bio/ur/yFeBTsIGWM9rV/ndC2qPdqk8OUDrqtzgAPabHkz0WJyS5lOKeMcFdsbjKBnendU3X zKGKHwXxb0XCKFM5KR7SBY7XfwS39ILXP/ZJNlp8tgpq7QsqvgrXkoRfL09Ppu1dDhPOBPPiMU457 42s32216/5ZBD9E69StA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pc4Sc-00AG59-14; Tue, 14 Mar 2023 13:13:02 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pc4SY-00AG4A-1n for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2023 13:13:00 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1E04A61774; Tue, 14 Mar 2023 13:12:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3B67C433EF; Tue, 14 Mar 2023 13:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678799577; bh=p7rDfFxezkbRebMP+Co/Gz8h8h/ExFG+BMXB/o/7W34=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A7LaAREMTsmui7zFqSBH2SyerUCifqfaEObReqkjKRuHJgLPi66CgIkAHyCVZBvuc LkTA/sT9JkmUo3/tA79N6yo+64R5GUusFD0nf3g5fcfzSs4QQ3a3KjbEhpGlWKEKsN FteL+zJQecTB5vorpuvPRXUeY6RkP8lpAvoBEGoHPJpxTrBmoKkM5YrjHaHtZj7gmW 99hmHOpfVuv2zO1zyiQdxjWHOYZiG+KsG8mfIhzskDVUfuRiW2q/dUpdHwHGjMTA6D W9NsdPQDSdrDTzQGR6i24bln9JE6k1nECgJzGGEND4ZwVJZ+gyubYPv4K9NJ2hLcN7 AdaWwaIxNGDnw== Date: Tue, 14 Mar 2023 14:12:54 +0100 From: Frederic Weisbecker To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, Guenter Roeck , Peter Zijlstra Subject: Re: [RFT PATCH] ARM: vfp: Fix broken softirq handling with instrumentation enabled Message-ID: References: <20230314125743.4165575-1-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230314125743.4165575-1-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_061258_634783_B882D9EB X-CRM114-Status: GOOD ( 10.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le Tue, Mar 14, 2023 at 01:57:43PM +0100, Ard Biesheuvel a =E9crit : > diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S > index 9a89264cdcc0b46e..9555c0a1c46fd47b 100644 > --- a/arch/arm/vfp/entry.S > +++ b/arch/arm/vfp/entry.S > @@ -22,7 +22,23 @@ > @ IRQs enabled. > @ > ENTRY(do_vfp) > - local_bh_disable r10, r4 > +#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_TRACE_IRQFLAGS) > + mov r4, r0 @ stash r0, r2, lr > + mov r5, r2 > + mov r6, lr > + > + adr r0, . > + mov r1, #SOFTIRQ_DISABLE_OFFSET > + bl __local_bh_disable_ip > + > + mov r0, r4 @ restore r0, r2, lr > + mov r2, r5 > + mov lr, r6 > +#else > + ldr r4, [r10, #TI_PREEMPT] > + add r4, r4, #SOFTIRQ_DISABLE_OFFSET > + str r4, [r10, #TI_PREEMPT] > +#endi I suggest you avoid taking any risk and unconditionally call __local_bh_disable_ip(). You never know what will be added to softirq APIs in the future. For example you're missing the CONFIG_DEBUG_PREEMPT part. Thanks. > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel