From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796075789; b=aVZgJ6LdVHeyrMGlNDoqoMSU4V5e1Dbs48sjT0aNid9sATopY+xFwTyv4mFlr9lS15NO mGn+4WUixFtJ1sgTw0RXO4AplfszwC5od/07c40v6f5t1Hy+IkkOwMScK3D0SdxhKnapP eoCtLz+wQNUtCR8d3Ay7p7toYwK0chm2dTnz1U56OiCveyY/DtWlsdPhXrOULAOpbpWVK iIms98GZfgXQ2/zDyi1T78I5ufszvMTeC5YfHa6B/oQ7yJ3GjiE0LkSKyvuxmrDcDYRmQ HLB/lbt7TCadXrv3Y+EjFeL4LjRjxpADXPSam3fTZm8jI/4uuSZM1MG1uJ0tgE9RK0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796075789; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=54jYCqGXFg6ukawZQEHPFwdRi/TxeVB4FJ8QvhzKjPg=; b=z9R0D+n1NFpbJREr8WChx5zOaTnwm8HuEm7hIusXYhd4BlkBghmB8ds8/A7Mz1SXOjI8 PRiUHjmReMRUjKwifv93qBrYS+gTBRn+C7pof1DoFv4+YBwp8Ip0f6aaO9T9oJPBSnzWG x+BzcvuEdeQTQobk2i4k9/aiki7B6+LNCB6yesAKbiks+Cx3dnk6ReScygpeJJHCmaWZz K/WNjVavNGO5Px+n/R3x2D7QcNCWNsJ/1NaJSgwe2QKRIspBvFGWxPdBiW/u9egWMAaZk oBNJt5C6TxAW34b4b7AemD55DZegLM1GQ9ipOq4fCUJlpD4TlQFcn945nwIS6yf8Oog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SNXGpt27; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1623F606A31A for ; Mon, 30 Nov 2026 21:56:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SNXGpt27 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E59791F00896; Mon, 30 Nov 2026 21:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796075788; bh=54jYCqGXFg6ukawZQEHPFwdRi/TxeVB4FJ8QvhzKjPg=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=SNXGpt270Uw9A+ZKI2YKEEYK8m/+lI1D7rWFV5iHNubNENwXYZo9kSOWYm8yHTFNR vCNZBRk6q2O+cDSTHjyiHyW6SqKMuwyP0SIprwn6xIPxFrMkAw7LlAeYDVU0pm8MnU TesD5xUEa/sm9aonqR5AJGTwNWgrpBrZpCQoTYbK2nOqm3b3x+OULt1POBix38TNnn Qg0oACONrR6ac1bWV6FY8OLGokkejsExnUreBih2YgnJTMskbcbO5kPqqCC/EW81Ou rAcGQ+hVJ3bguHkbWWln/OtRXFzbOefAYzonhG5Jn/dx4Ybd0m0irD4+5XWiQ9B4eO buYgD+4ovZE2w== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] s390: add CFI directives for call_on_stack Reply-To: sashiko-reviews@lists.linux.dev To: "Stephen Brennan" Cc: linux-s390@vger.kernel.org, "Heiko Carstens" , "Vasily Gorbik" , "Alexander Gordeev" , "Christian Borntraeger" In-Reply-To: <20261130214633.170560-1-stephen.s.brennan@oracle.com> References: <20261130214633.170560-1-stephen.s.brennan@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 21:56:27 +0000 X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > When debugging s390 on drgn, we experience two issues. First, when a > panic is triggered on CPU 0, drgn is unable to unwind past a stack > switching event[1,2]. Second, drgn is unable to unwind through an > interrupt exception frame. >=20 > It turns out that the reason for both is the generated call_on_stack() > assembly. It modifies %r15 (the stack pointer) without any CFI > directives describing this change. Thus, the compiler-generated CFI is > wrong, and drgn tries to unwind using rules based on the wrong SP value. >=20 > To resolve this, use a callee-saved register to store the CFA before the > call. Then, emit a CFI directive describing the change. So long as DWARF > CFI is used to unwind all leaf functions, the register value should be > recoverable, so unwinders will be able to use it to determine the CFA > and continue to the new stack. >=20 > I've tested this only in a QEMU VM using drgn's vmtest framework. > With the patch, drgn is able to unwind through two stack changes: the > change to the IRQ stack, and the change to the CPU0 nodat_stack during a > panic on CPU 0. >=20 > [1]: https://github.com/osandov/drgn/blob/97b613c23bd4d100a61b3b06fb1b509= 7fcef9f61/vmtest/enter_kdump.py#L69-L74 > [2]: https://github.com/osandov/drgn/blob/97b613c23bd4d100a61b3b06fb1b509= 7fcef9f61/tests/linux_kernel/vmcore/test_vmcore.py#L19-L25 >=20 > Signed-off-by: Stephen Brennan Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261130214633.1705= 60-1-stephen.s.brennan@oracle.com?part=3D1