From owner-dev-commits-src-all@freebsd.org Fri May 21 14:15:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B13A63332C for ; Fri, 21 May 2021 14:15:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FmpYF6gmCz3Qw1 for ; Fri, 21 May 2021 14:15:45 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f45.google.com with SMTP id i17so21222688wrq.11 for ; Fri, 21 May 2021 07:15:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ppNB69zkX8u8jBuNS1pCw/RXEsO2qqqDhDzxpvlnEDo=; b=SZTKf7sYiBRS6Z9bSYuPgWewEa1KWSpx+M/mOshhIbhb+p90NjzQGH0aw9dLrKYojD 9A1XSrxlFgWLXGzvSVB1ztzg1p9ckYSM3kFNDe1umfpyv822xbPpCLTOZl7XyXiIPFLp EWQqw2WFyaFfOq7ABos8XAN7g+rguT8Lo4AZraBPvHtELwSd7+DdnPwvMVCbTvjGJ0O3 OBWMoSPWu0lT5h1LFWkQ96cyfyaNMIExmSERz7//SKEuzH9OOkxAcsCuZhBEt8v1wzce No4NDHAQy0Ih47y0gpmy9n/+esSImQ9pNzRlVX9qVqbf4KkC6ghatit3NmMcZfJuTGpU c9UA== X-Gm-Message-State: AOAM532fwHE+H3VdRE9yKg8G+O4OZESvChZdHOf6RIk2GUbm1ZDgoGMs jPkSX0CK2CRX0hXcm6Qd91P2xw== X-Google-Smtp-Source: ABdhPJygD1b5xtLY/rqAmPGxcMIp+QlkHLJa9OvQd3sqWfsL4T/2jxv2aqprzFUBZKhDTza0q4bqVA== X-Received: by 2002:a5d:6803:: with SMTP id w3mr9838122wru.285.1621606544666; Fri, 21 May 2021 07:15:44 -0700 (PDT) Received: from [192.168.150.48] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id y2sm2325256wrl.92.2021.05.21.07.15.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 May 2021 07:15:44 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: af949c590bd8 - main - Disable stack gap for ntpd during build. From: Jessica Clarke In-Reply-To: Date: Fri, 21 May 2021 15:15:43 +0100 Cc: shawn.webb@hardenedbsd.org, Marcin Wojtas , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <02078965-24BE-4F23-92D5-5E8E54A0C3E7@freebsd.org> References: <202105211334.14LDYqoa004343@gitrepo.freebsd.org> <04F25FD0-7863-4AC1-A257-EF0F1EB90659@freebsd.org> To: Marcin Wojtas X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FmpYF6gmCz3Qw1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2021 14:15:46 -0000 > On 21 May 2021, at 15:11, Marcin Wojtas wrote: >=20 > Hi Jess >=20 > pt., 21 maj 2021 o 15:39 Jessica Clarke = napisa=C5=82(a): >>=20 >> On 21 May 2021, at 14:34, Marcin Wojtas wrote: >>>=20 >>> The branch main has been updated by mw: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Daf949c590bd8a00a5973b5875d7e0fa6= 832ea64a >>>=20 >>> commit af949c590bd8a00a5973b5875d7e0fa6832ea64a >>> Author: Marcin Wojtas >>> AuthorDate: 2021-05-21 09:29:22 +0000 >>> Commit: Marcin Wojtas >>> CommitDate: 2021-05-21 13:33:06 +0000 >>>=20 >>> Disable stack gap for ntpd during build. >>>=20 >>> 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. >>=20 >> Isn=E2=80=99t the bug that the unusable gap counts as usage? >>=20 >> Jess >>=20 >=20 > 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=E2=80=99s my point, there is nothing to =E2=80=9Cfix=E2=80=9D = upstream. NTPD uses less than 200K of stack, thus it is perfectly reasonable for it to set its limit to = that. The 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=E2=80=99s entirely = unreasonable for applications to have to account for that. Jess