From nobody Sun Jul 13 18:01:38 2025 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 4bgCv65vr1z61H1g; Sun, 13 Jul 2025 18:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bgCv63SNhz3ZcH; Sun, 13 Jul 2025 18:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752429698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mF6rLAruBZERo5QEaKT5X+ukY6p2A4Oq4AV3k4W11ho=; b=A+V0gH/79Fsq80Bc/t03Od67NUwoJWVoed6pIZRZcjw3MFPNWfk1mu/fJ/bErIKItgSnGa kGSxEVnbZ4vCHhmCjny0u8mQvPmfLu3RdXNe7TERkeHgJfro98gsXKoJPaqygQ4lmuyZDv FnQQ2zoCYsChW7hF8Zuwse+xQwOA77QfZMUdCZQ+AmlGzY8lJhy3aQmRVUCRYxjPJh3Q3v oJ28VfcnuZSuRlkfR9y6auVh3Qgcgr8rSJW3BHZMqWaeLG4RuvCC7hU58T83lubz8CS7y6 +I+jPB3iTWM1oZ4MgCJY2RarVqba0C/8DTZgAQJzcIxGh33VWn5K37Olf/1dKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752429698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mF6rLAruBZERo5QEaKT5X+ukY6p2A4Oq4AV3k4W11ho=; b=MyBlLyw5a5fwuqNjIBKuSPNTEYHhB4UZ9buXHyeK6K8F0kdUJdI54QhQMM6WaMwLgX6pFX JSzlFvmHB4WsV18kXUG4tciqgijEf1nt6dl+MnHQHwoG0vmzToVz3p0u4fnN0uAt31c3RL H+bQFNBs+9d7tb6KBDKqvcweh8VLbh2nHXnLkMt5Lc2qgXGNz0L4SK104xInC/kwM2dRx7 DSohsZSEg5I4BQYMrAE6wdRhcy7uO6r3rEyUUFyV6H5tppOprMDzeiM5HiQdWuVicRI3hI enptBsg9LNXyUODTOT5yMzdcevko5GJ1VNFfYpaB9qxBusr0578i3jvDn1QPqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1752429698; a=rsa-sha256; cv=none; b=kHfCAtU8HZhlTbhl+YJEXTyKVWHFpSqh5kkbHW6kpRi5+s1P6am2U/KlT2qTGoxXYm6buD 0plE6Y+nkGAgeviWLjgsV+H/saBFxUSydGQpcfr4c56olyXY4RqNBkzUj3Y0zfC/hyILyc SKmlMZUf7+9GhYSE4083Dv5nZBdAFikOoAY1rpu7C7/6oYJeyjClmIY44J3ou1wdDM/GFo 96Lou0FGlMYKTwNA0IH3xPmvIYFTVAMWrntxQF6xN5hWBogDTZd/3Pg+zn3O6nBJj8PefZ pOcbkECOIK7z1+LP4PXenkByPo1NxOQHP3I3XVLBdIemOHUk8f1d+qcEV2l4VQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bgCv633j1z4CY; Sun, 13 Jul 2025 18:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56DI1cMw099125; Sun, 13 Jul 2025 18:01:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56DI1cD1099122; Sun, 13 Jul 2025 18:01:38 GMT (envelope-from git) Date: Sun, 13 Jul 2025 18:01:38 GMT Message-Id: <202507131801.56DI1cD1099122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 645bb3efc320 - main - powerpc: Reserve correct scratch region size below stack 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 645bb3efc3209a9ca6dfabb48b1c6475c1d965a9 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=645bb3efc3209a9ca6dfabb48b1c6475c1d965a9 commit 645bb3efc3209a9ca6dfabb48b1c6475c1d965a9 Author: Timothy Pearson AuthorDate: 2025-07-06 19:24:07 +0000 Commit: Justin Hibbits CommitDate: 2025-07-13 18:00:56 +0000 powerpc: Reserve correct scratch region size below stack According to the ELF ABI v2, two scratch regions are reserved below the stack pointer, one 288 byte general region and one 224 byte compiler region. FreeBSD only reserved the 288 byte region. Follow the ELV v2 ABI and reserve the full 512 byte region as specified. Signed-off-by: Timothy Pearson MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1756 --- sys/powerpc/powerpc/exec_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 1893d79f29a8..c6b2b01d9d30 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -214,10 +214,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) sfpsize = sizeof(sf); #ifdef __powerpc64__ /* - * 64-bit PPC defines a 288 byte scratch region - * below the stack. + * 64-bit PPC defines a 512 byte red zone below + * the existing stack (ELF ABI v2 ยง2.2.2.4) */ - rndfsize = 288 + roundup(sizeof(sf), 48); + rndfsize = 512 + roundup(sizeof(sf), 48); #else rndfsize = roundup(sizeof(sf), 16); #endif