From nobody Sat Oct 16 03:59:19 2021 X-Original-To: dev-commits-ports-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 E50061808582; Sat, 16 Oct 2021 03:59:19 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HWTsg35v8z4TFg; Sat, 16 Oct 2021 03:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4453813308; Sat, 16 Oct 2021 03:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19G3xJ3b004441; Sat, 16 Oct 2021 03:59:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19G3xJZ0004440; Sat, 16 Oct 2021 03:59:19 GMT (envelope-from git) Date: Sat, 16 Oct 2021 03:59:19 GMT Message-Id: <202110160359.19G3xJZ0004440@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 8dc43f07dc66 - main - net/ntp: Reverse "Disable ntpd stack gap" List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8dc43f07dc662e4e7404b5521ba03c2e7f25470a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=8dc43f07dc662e4e7404b5521ba03c2e7f25470a commit 8dc43f07dc662e4e7404b5521ba03c2e7f25470a Author: Cy Schubert AuthorDate: 2021-10-16 03:50:11 +0000 Commit: Cy Schubert CommitDate: 2021-10-16 03:59:14 +0000 net/ntp: Reverse "Disable ntpd stack gap" 120137c822c9697c19cf94461f436f8ccc372d24 (svn r517694) disabled ntpd ASLR stack gap, which caused ntpd to segfault. (The patch in 120137c822c9697c19cf94461f436f8ccc372d24 was subsequently submitted to nwtime.org for inclusion into upstream ntp.) src commit 889b56c8cd84c9a9f2d9e3b019c154d6f14d9021 addressed the underlying cause for the setrlimit segfault negating the need for this workaround. This commit removes the workaround. MFH: 2021Q4 (after a month) --- net/ntp/Makefile | 1 + net/ntp/files/patch-ntpd_ntpd.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/net/ntp/Makefile b/net/ntp/Makefile index caa8182f152f..35feccc13198 100644 --- a/net/ntp/Makefile +++ b/net/ntp/Makefile @@ -2,6 +2,7 @@ PORTNAME= ntp PORTVERSION= 4.2.8p15 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ \ http://archive.ntp.org/ntp4/ntp-4.2/ \ diff --git a/net/ntp/files/patch-ntpd_ntpd.c b/net/ntp/files/patch-ntpd_ntpd.c new file mode 100644 index 000000000000..f6ab38ffc4f2 --- /dev/null +++ b/net/ntp/files/patch-ntpd_ntpd.c @@ -0,0 +1,39 @@ +--- ntpd/ntpd.c.orig 2020-06-23 02:17:48.000000000 -0700 ++++ ntpd/ntpd.c 2021-10-15 19:52:05.945063000 -0700 +@@ -145,17 +145,6 @@ + # include + #endif /* LIBSECCOMP and KERN_SECCOMP */ + +-#ifdef __FreeBSD__ +-#include +-#ifndef PROC_STACKGAP_CTL +-/* +- * Even if we compile on an older system we can still run on a newer one. +- */ +-#define PROC_STACKGAP_CTL 17 +-#define PROC_STACKGAP_DISABLE 0x0002 +-#endif +-#endif +- + #ifdef HAVE_DNSREGISTRATION + # include + DNSServiceRef mdns; +@@ -438,18 +427,6 @@ + char *argv[] + ) + { +-# ifdef __FreeBSD__ +- { +- /* +- * We Must disable ASLR stack gap on FreeBSD to avoid a +- * segfault. See PR/241421 and PR/241960. +- */ +- int aslr_var = PROC_STACKGAP_DISABLE; +- +- pid_t my_pid = getpid(); +- procctl(P_PID, my_pid, PROC_STACKGAP_CTL, &aslr_var); +- } +-# endif + return ntpdmain(argc, argv); + } + #endif /* !SYS_WINNT */