From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A7E7A3D47AA; Tue, 28 Apr 2026 08:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777366293; cv=none; b=Ti6Mt8bCsc4XVDaVfMD76L74lytgMcddBFCLS4dLYV6628ncDnyabA/n7sdvXbSnAGjiljc5NKv4pxEHCMSREL9I4MBvTUIE9x0/eOBRSr4oOS5h6HUqRFeTUOzPHrqTUdsUV4sCghE5/E1xYH82UCB8bVoSkhEH+KOHsQy7DNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777366293; c=relaxed/simple; bh=i+gw1fUS40ohLdc9hars3DbakHqzU1swpdINODPO6os=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=fEjts995R7PRttbbT05uw1kISVgTC58kMwxixEQiPA6HnIYmNUM6sgxHzbO2+PkRA2i9TYlWyUsLOZNaw3RXET+v2JIEXIgC7Fr6s4hPgG3jz6fFNWxfj4jsj9Hz+FE9xVcMq18xzHNarFE0HrLUHxKi5T8UwgsPkY4aUojZ6PI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eXmN98cV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eXmN98cV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AF33C2BCAF; Tue, 28 Apr 2026 08:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777366293; bh=i+gw1fUS40ohLdc9hars3DbakHqzU1swpdINODPO6os=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eXmN98cVMNrCbnHMFjHbGS84RGWKEra7LXonBvzfuwfGmIXZisbJcekgqvKFDgY7L PuUUw/a9cU4yFuq3aiogZuzehQ6GhvTRcFM1+3BateDmaE/2WnyKHzIqzU6f3a11bM cD6k/HarW9MZRR7lSuQtaLOuTMq5NXOwO9m0zI1L6UQFvhJrIYEBCMU5TpXYSjfLaP JuU4TZFger38FLg2yc+xVZTKSd7w5GDTpHloQL4Cw32Lni6JRZLELf98vzQ2XblLEv i1MI8atlgEEo6NOjevfuR77HjT2qhgXnHS82eqxwlvAMae3CoZWlPxWjHGszWEvvtT ibFsXcT1i3h/w== From: Thomas Gleixner To: Peter Zijlstra Cc: Mathias Stearn , Dmitry Vyukov , Jinjie Ruan , linux-man@vger.kernel.org, Mark Rutland , Mathieu Desnoyers , Catalin Marinas , Will Deacon , Boqun Feng , "Paul E. McKenney" , Chris Kennelly , regressions@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ingo Molnar , Blake Oler , Florian Weimer , Rich Felker , Matthew Wilcox , Greg Kroah-Hartman , Linus Torvalds Subject: Re: [REGRESSION] rseq: refactoring in v6.19 broke everyone on arm64 and tcmalloc everywhere In-Reply-To: <20260428073938.GH3126523@noisy.programming.kicks-ass.net> References: <87ik9i0xlj.ffs@tglx> <87a4ut1njh.ffs@tglx> <87v7dgzbo7.ffs@tglx> <20260424150318.GE641209@noisy.programming.kicks-ass.net> <87se8kywhb.ffs@tglx> <87jyttz8cf.ffs@tglx> <20260428073938.GH3126523@noisy.programming.kicks-ass.net> Date: Tue, 28 Apr 2026 10:51:29 +0200 Message-ID: <87zf2nxyb2.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Apr 28 2026 at 09:39, Peter Zijlstra wrote: > On Mon, Apr 27, 2026 at 12:04:48AM +0200, Thomas Gleixner wrote: >> static inline void rseq_signal_deliver(struct ksignal *ksig, struct pt_regs *regs) >> { >> - if (IS_ENABLED(CONFIG_GENERIC_IRQ_ENTRY)) { >> + if (IS_ENABLED(CONFIG_GENERIC_IRQ_ENTRY) && rseq_optimized(current)) { > > rseq_optimized() already implies GENERIC_IRQ_ENTRY Indeed. >> + u8 optimized; >> union { >> u16 error; >> struct { > > I know you like the 'optimized' name, it is faster etc. However, the > description there suggests: has_rseq_v2 not be a bad name. > > And while I write this, I figured we could have the value of has_rseq be > 2, rather than 1, but this might end up generating worse code, dunno, > haven't tried yet. Tried that early on and it was worse, but back the approach has changed since then and I just validated that it's actually fine to do so. Fixed. Thanks, tglx