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 24DBFC433EF for ; Fri, 11 Mar 2022 20:00:31 +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=j/TCvtX51uhKwXzmPn0PMtorbW3Gkpi8Ohirw1LYeLc=; b=47+qq1p/9gRJQA gpvBwEK0rhitGgl988uFg9vkEbczV2mH7zEsWNGPXUJ/RX7UcC3TthYOnuNSA2xmnvOWk9ibrnkA/ O+NV5vwEMARXWelj8FqVnW7/A68yUAzt9LRbfwpdB9C4mgIUJmXLEi24f9i0gfWwxe3d607/M2l5+ 4SYWQ8UzmvSMXM4DVBN+4X3SVRHWvWegSoW20v2lfjOmSeFEZ/ZMiHrqehJxExnJ62g+rrifW3pK3 czXFdnMdHx1Gy5yKt6UtbBGfLZCCueQI1V1M3X2uDZjPtY0SRiAwWSFHWLBppdk+ND/QmUBkZR8ro lCvJ3FRpfHoxr6wu1LHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nSlPv-0008Z1-DN; Fri, 11 Mar 2022 19:59:15 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nSlPs-0008YJ-2V for linux-arm-kernel@lists.infradead.org; Fri, 11 Mar 2022 19:59:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VetuseguEEDl6n48iqbnYcWGuPxsesKYMgwGulCoe9g=; b=XFjVIwqdqA/nsGWakAN5gc1S6g QzSldeJdUQTAkoPjsrfVnp/kkxLZ+V20vEN57btdfgDSrIGN8SHM/mnjkENDFZJeLU04i/5TTC8ke pxj9ks8N6M5/xDDq1zimbKdB/eymTx04rX2GM8jk3pu0Z5S8E9o/WvKLVZDjjgI+FKSPyTg2awvSW Cva2+AU8N4+qq+UlYuzsqOPj0jfCiR8C8lQYoRy+kMzmXijqch+Fxf6KoVb9o8eBP9/0ptoGJiGW4 QBHSNaM45kRzBM/tkOd1HH1bTF6XwcxIbmVt1jKuQ+Yxy6ej9vC8dpjBMuV2zI8+OA7FOjO5F5s7S bF2l3eEw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57810) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nSlPo-0000b2-AT; Fri, 11 Mar 2022 19:59:08 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nSlPm-0001ui-IK; Fri, 11 Mar 2022 19:59:06 +0000 Date: Fri, 11 Mar 2022 19:59:06 +0000 From: "Russell King (Oracle)" To: Linus Torvalds Cc: stable@kernel.org, Catalin Marinas , Linux ARM Subject: Re: [PATCH v2] ARM: fix Thumb2 regression with Spectre BHB Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220311_115912_141346_93A5A6F7 X-CRM114-Status: GOOD ( 18.32 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 11, 2022 at 11:39:35AM -0800, Linus Torvalds wrote: > On Fri, Mar 11, 2022 at 9:13 AM Russell King (Oracle) > wrote: > > > > When building for Thumb2, the vectors make use of a local label. Sadly, > > the Spectre BHB code also uses a local label with the same number which > > results in the Thumb2 reference pointing at the wrong place. Fix this > > by changing the number used for the Spectre BHB local label. > > Ugh. Those local names are nasty. > > And even with this patch - which I'm about to apply right now - I > think the numbering is horrendous. It seems entirely random with "2" > being used first in that vector_stub macro, and now 1 and 3 in the > middle. I don't like them, but in a macro, I don't think there's much choice. I don't think choosing some other starting number works either, because then one ends up always starting at some other number and it's just the same problem, just with a different starting number. I guess one way around this would be to use a random local label number each time, but I suspect there isn't enough range to ensure they are unique using that method. I've already mentioned to Nathan that I really wish gas etc would allow local labels which are not purely numerical (so we can make them more descriptive.) However, I can see why it isn't permitted, because of the 'b' and 'f' suffix. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel