git: af949c590bd8 - main - Disable stack gap for ntpd during build.

Cy Schubert Cy.Schubert at cschubert.com
Fri May 21 14:46:12 UTC 2021


In message <02078965-24BE-4F23-92D5-5E8E54A0C3E7 at freebsd.org>, Jessica 
Clarke w
rites:
> > On 21 May 2021, at 15:11, Marcin Wojtas <mw at semihalf.com> wrote:
> > 
> > Hi Jess
> > 
> > pt., 21 maj 2021 o 15:39 Jessica Clarke <jrtc27 at freebsd.org> napisał(a):
> >> 
> >> On 21 May 2021, at 14:34, Marcin Wojtas <mw at FreeBSD.org> wrote:
> >>> 
> >>> The branch main has been updated by mw:
> >>> 
> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=af949c590bd8a00a5973b5875d7e
> 0fa6832ea64a
> >>> 
> >>> commit af949c590bd8a00a5973b5875d7e0fa6832ea64a
> >>> Author:     Marcin Wojtas <mw at FreeBSD.org>
> >>> AuthorDate: 2021-05-21 09:29:22 +0000
> >>> Commit:     Marcin Wojtas <mw at FreeBSD.org>
> >>> CommitDate: 2021-05-21 13:33:06 +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.
> >> 
> >> Isn’t the bug that the unusable gap counts as usage?
> >> 
> >> Jess
> >> 
> > 
> > An alternative solution was submitted
> > (https://reviews.freebsd.org/D29832), so that to extend the limit for
> > ntpd, but eventually it was recommended to simple disable the stack
> > gap for it until it's fixed upstream (see the last comment in the
> > linked revision).
>
> That’s my point, there is nothing to “fix” upstream. NTPD uses less tha
> n 200K
> of stack, thus it is perfectly reasonable for it to set its limit to that. Th
> e
> fact that FreeBSD decides to count an arbitrary, non-deterministic amount of
> additional unusable virtual address space towards that limit is not its fault
> ,
> but a bug in FreeBSD that needs to be fixed as it’s entirely unreasonable f
> or
> applications to have to account for that.

This latest problem is not stack gap. It is PIE.


-- 
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX:  <cy at FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy at nwtime.org>    Web:  https://nwtime.org

	The need of the many outweighs the greed of the few.




More information about the dev-commits-src-main mailing list