From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2C13F42BC2D for ; Wed, 15 Jul 2026 01:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784079426; cv=none; b=GaxbEPzS6awkSbNlKROYsD3xm2Fu6jrx8CsXrPap28VxM6rU2v6GfQiziG2katE/G+5B+QWyr9vmuN+etOiyhWWnMPkSkCCI2VOYU2Wc+nN2C3mR2mcGltepmshhhhHVZjNOBTrxGBKcDsFFi3vhZznyqRpS03AGpuLJHor40IE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784079426; c=relaxed/simple; bh=CUsDrt74RB0/Rf5x3TwPLaaw6WYC/6Gnf3gQ75UyAy8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=WLDnzMkakx/QGkVqPoTM7B4kHyZxAue0OFeLe/IQQTJpj3LBSw3hp5LhD/y32MtwsCdqYB039GRFqPzoXq0fUHtQ8lrZZZy8D8Zi6rrbeESImdvtFRN74EvkT5cm17yl36kMnYK06ZBGfKjhd5tmRFpcnAws+NUfPrhJU3BfN4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ovoxpEfA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ovoxpEfA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60DBE1F000E9; Wed, 15 Jul 2026 01:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784079425; bh=9hXZES7boB1AazsyWISWT/pKV6aI6aU3YaJu2A6dM9A=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=ovoxpEfAm6BRlTFAj8F0Dcxc0hGE0wO2LKOumO8vahRNCvUgxSr+blYzcInG0T2Me A+CfHvczZTGL4+VdLFmP3oBOLW+0afzsaybGZucSLiezkYR5VuHXAtsMJML2AFKNG2 ri5a/uSwIPKpBJJDVMN3YUoIV0gqYzf9wIUZp3Jh+VYvpTsvF76oJFjueh/N7BtHdH 0HUbLKCkrzBQ4iM4QMinMIcVaeJUx/THVhrDiDyF448pJabUv4xEvUqeFGt9MMty7Y zEI4CIxQrKdQd1UuclmleDvwV0bzV7+wZSly5tFnKlVRrxxYnm+y93HdIWYT8qVAgq bkgCDLYuWelJw== Date: Tue, 14 Jul 2026 19:37:01 -0600 (MDT) From: Paul Walmsley To: Aurelien Jarno cc: Paul Walmsley , Joel Stanley , linux-kernel@vger.kernel.org, Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Jim Shu , Zong Li , Deepak Gupta , "open list:RISC-V ARCHITECTURE" Subject: Re: [PATCH] arch/riscv: vdso: remove CFI landing pad from rt_sigreturn In-Reply-To: Message-ID: References: <20260623204058.498120-1-aurelien@aurel32.net> 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 Hi Aurelien, Joel, On Tue, 14 Jul 2026, Aurelien Jarno wrote: > On 2026-06-29 17:08, Joel Stanley wrote: > > On Fri, 26 Jun 2026 at 03:33, Paul Walmsley wrote: > > > On Tue, 23 Jun 2026, Aurelien Jarno wrote: > > > > > > > When CONFIG_RISCV_USER_CFI is enabled, the CFI version of the vDSO, has > > > > a CFI landing pad instruction at the start of __vdso_rt_sigreturn. This > > > > breaks libgcc's unwinding code which matches on the first two > > > > instructions. Other unwinders that rely on similar instruction matching > > > > may also be affected. > > > > > > > > Since __vdso_rt_sigreturn is reached as part of signal-return handling > > > > rather than via an indirect call/jump from userspace, it does not need a > > > > CFI landing pad. Remove it and restore the instruction sequence expected > > > > by existing unwinding code. > > > > > > > > This matches what was done on arm64 in commit 9a964285572b ("arm64: > > > > vdso: Don't prefix sigreturn trampoline with a BTI C instruction") for a > > > > similar issue. > > > > > > > > Fixes: 37f57bd3faea ("arch/riscv: compile vdso with landing pad and shadow stack note") > > > > Co-authored-by: Joel Stanley > > > > Signed-off-by: Aurelien Jarno > > > > > > I'd like to take this one. But since you're listed as the co-author, I > > > probably need your Signed-off-by: as well. Care to reply with it? > > > > Signed-off-by: Joel Stanley > > > > Thanks Aurelien for working with me on this one. I saw CFI was > > disabled in the debian kernel config and wondered why (failing glibc > > backtrace tests with CFI enabled), and we got to the bottom of it. > > > > This one should go to stable IMO. > > Now that Joel answered with a Signed-off-by, would it be possible to get > this merged for 7.2? Of course; thank you for the reminder. Thanks for the patch and the S-o-b, queued for v7.2-rc with a cc: to stable@vger. - Paul