Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6541366rdb; Fri, 15 Dec 2023 01:12:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDewt3vNv8wUTnN13BX80VF4pz5nUiASnqMHbfKyxHO5i/l99vWtB8cdSEApDjIBSmDA/Q X-Received: by 2002:a05:620a:611d:b0:77f:a7bf:492a with SMTP id oq29-20020a05620a611d00b0077fa7bf492amr1837640qkn.56.1702631539219; Fri, 15 Dec 2023 01:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702631539; cv=none; d=google.com; s=arc-20160816; b=hLqRMqqzk83P2PEYieecVaE0TPIWbZL5zlCcZJ2LXw5Etk3TKJ5RDRPdE39fX7k879 t2WniTQlpZP7hjmO+s8gi2f90ar50EpqpG98zZEEUj8OVyeSWWVEvc5Ik8gX1miWgEtB qyBAieflVGXpl16iUV41ctYGTJXk5l3epDAnljip+P0VC+/VFB5EslcyiH/b8kVqXeAB P6KogQ/EnQv8f0ckDSZ6dQ/frq1cNzKuNbB++jp7Lx25+MLY1Ljo2FpowodISSLvPn58 vRvA+JHWWPdK74GTv8EDJPV9+fSGOWRo0a8Y1OGpJpeBXiQsECgkkozxrNFnJRJRisqo pt8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EjQVaMh5tZJ+7a0UpE9iUFxun+60dNm7eqO8aieQnhM=; fh=Js1G8n0CHANuaP6EiUtxt79YJNHtPA+NagTlMbTAQL8=; b=hABV8WSFBkIRZymzDYJ/+brkHi8V7rnhrEZhYl2hXZNFuUnyjnFTu46MPQ/bvkd/6I LLgWbLuQhqUn0QLUCACAPp/I/k05j3WMLqrLH0bHVB45g78ok0kx1GaUhLjFbgSLnZ3i w6IpqogUkoJiEr89iqURcKgw1h3e+y/vVPCp/RdZmLAtiwVC2cOfr8XrDtMDWQhMWVxs +VgADWt/H946E45QSPTuDf/bCea+eTEl87ZIbYRk+yltgz/QFyonLeh5atWDVNZethwi pQYQawBjRq04885vglP/uq9lNfj+q+0s8I4SqInUUxvcZh188l18tYv+YVtTFwvC4BMU vY1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=hD7BQDIP; spf=pass (google.com: domain of linux-kernel+bounces-673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-673-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y5-20020a05620a44c500b0077d7c88c787si18326186qkp.126.2023.12.15.01.12.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 01:12:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=hD7BQDIP; spf=pass (google.com: domain of linux-kernel+bounces-673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-673-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 012651C229D1 for ; Fri, 15 Dec 2023 09:12:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 198D01B263; Fri, 15 Dec 2023 09:11:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hD7BQDIP" X-Original-To: linux-kernel@vger.kernel.org Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A27E1A702; Fri, 15 Dec 2023 09:11:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EjQVaMh5tZJ+7a0UpE9iUFxun+60dNm7eqO8aieQnhM=; b=hD7BQDIPvu5gi57uCMbykn/8Tk o0WUo7Cu49RqeqmA1Ix/Yr6c4TUQIslJVZcQoYr+vpKgM14NxpQY36QIK9m1++aZPLXj6NaNkgghP f1bQSuOB3wGuyTcQzLEA3MRYpCLbVKenLVMnWAVKL9D4YFFERCly61XQbaFBXO7YJcadimNi0VSGM g326RtxEjSrUjr7dKyB7LXgzDWKC9Na8aE8Ex1pSoN4LnSsoJvmH87tdDPE0JTMUVqcTLil3nw7Is crw9/G/+7fQmajUvMbhUM5AmrBj2rPwIikoTJ5FMs8XsacJXJQlCvZ6U/UQCACKFRN7bMka7K0nYL Ek5U1nCQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rE4De-009r2i-1m; Fri, 15 Dec 2023 09:10:57 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7324330049D; Fri, 15 Dec 2023 10:10:53 +0100 (CET) Date: Fri, 15 Dec 2023 10:10:53 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , paul.gortmaker@windriver.com, x86@kernel.org, regressions@leemhuis.info, richard.purdie@linuxfoundation.org, regressions@lists.linux.dev Subject: Re: [patch 0/2] x86/alternatives: Prevent crash in NOP optimizer Message-ID: <20231215091053.GI36716@noisy.programming.kicks-ass.net> References: <0adb772c-e8d2-4444-92b0-00cbfdaf1fac@leemhuis.info> <87r0k9ym0y.ffs@tglx> <20231207193859.961361261@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231207193859.961361261@linutronix.de> On Thu, Dec 07, 2023 at 08:49:22PM +0100, Thomas Gleixner wrote: > The following series addresses the regression report from Paul on behalf of > the yocto project. It turns out that the recent changes to alternatives > opened a race window where interrupts are enabled and NOPs are optimized in > place. An interrupt hitting into the modification will observe inconsistent > text and crash and burn. > > A 32bit QEMU crashes w/o these fixes reliably within about 50 boot > attempts. With the fix applied it survived close to 600 attempts by > now. > > Thanks to Paul for providing all the information! Urgh and D'0h. Acked-by: Peter Zijlstra (Intel)