Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Oct 2021 13:13:22 GMT
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c0b03251095d - stable/13 - Disable stack gap for ntpd during build.
Message-ID:  <202110041313.194DDMcP068453@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=c0b03251095d38e9635d0f82e3a401d29fa4d891

commit c0b03251095d38e9635d0f82e3a401d29fa4d891
Author:     Marcin Wojtas <mw@FreeBSD.org>
AuthorDate: 2021-05-21 09:29:22 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-10-04 13:12:03 +0000

    Disable stack gap for ntpd during build.
    
    When starting, ntpd calls setrlimit(2) to limit maximum size of its
    stack. The stack limit chosen by ntpd is 200K, so when stack gap
    is enabled, the stack gap is larger than this limit, which results
    in ntpd crashing.
    
    Submitted by: Dawid Gorecki <dgr@semihalf.com>
    Reviewed by: cy, imp
    Obtained from: Semihalf
    Sponsored by: Stormshield
    Differential Revision: https://reviews.freebsd.org/D29553
    
    (cherry picked from commit af949c590bd8a00a5973b5875d7e0fa6832ea64a)
---
 usr.sbin/ntp/ntpd/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index 2d8a8b9d2a2d..b9c3a05547d4 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -56,4 +56,7 @@ CLEANFILES+= .version version.c
 version.c:
 	sh -e ${.CURDIR:H}/scripts/mkver ntpd
 
+afterbuild:
+	${ELFCTL} -e +noaslrstkgap ${PROG}
+
 .include <bsd.prog.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110041313.194DDMcP068453>