From nobody Mon May 15 21:10:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QKsTN57bhz4B5q1; Mon, 15 May 2023 21:10:16 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QKsTN1TFxz4NkT; Mon, 15 May 2023 21:10:15 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 34FLA8ZE097619; Tue, 16 May 2023 00:10:08 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 34FLA8j8097618; Tue, 16 May 2023 00:10:08 +0300 (MSK) (envelope-from dchagin) Date: Tue, 16 May 2023 00:10:08 +0300 From: Dmitry Chagin To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: d957343f8713 - main - linux(4): Rework signal trampoline on Aarch64 Message-ID: References: <202305142131.34ELV9OX074101@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4QKsTN1TFxz4NkT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, May 14, 2023 at 10:57:55PM +0100, Jessica Clarke wrote: > On 14 May 2023, at 22:31, Dmitry Chagin wrote: > > > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=d957343f8713a312442a0140b7a7752ed7b2d870 > > > > commit d957343f8713a312442a0140b7a7752ed7b2d870 > > Author: Dmitry Chagin > > AuthorDate: 2023-05-14 21:27:31 +0000 > > Commit: Dmitry Chagin > > CommitDate: 2023-05-14 21:27:31 +0000 > > > > linux(4): Rework signal trampoline on Aarch64 > > > > To avoid clobbering of any registers by the trampoline code use Linux > > way to call signal handlers. I.e., we are out from the kernel right into > > the signal handler, put return address from the signal handler into the > > link register. > > The mysterious NOP is required for some unwinders (e.g. libc++) that > > unconditionally subtract one from the result of _Unwind_GetIP() in order > > to identify the calling function. > > > > MFC after: 1 week > > So this is basically a revert of c56480a83235 "linux(4): Implement signal > trampoline for arm64 in a FreeBSD-way”? Not a huge fan of this flip-flopping > without much justification and with no review partially yes, I prefer to not revert, however in taht case I'll revert tommorow. I found a proper solution, ugh... About review, do you know who is willing to review unwinder related code? I know only one, but he is x86 guru)) AFAIK, clang libunwind and libunwind from ports do not support stack unwinding throuth signal frame on FreeBSD aarch64, libunwind from ports even broken.