From nobody Mon Jan 17 21:13:06 2022 X-Original-To: dev-commits-src-all@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 AB6241976D08; Mon, 17 Jan 2022 21:13:08 +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 4Jd4Pb2b7Vz3FW7; Mon, 17 Jan 2022 21:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642453988; 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=IFD2jdVGz5z0AfFTTpAakSaJ00t6ypLheBp+nd06VV0=; b=MEjVe7NxvtENpPPjpBOLgo5JSot84vi3F8fufTszMaG4Cd7Gep4qGl0OojvlMH0O5sj4dr LZANL8erloFN3YBWki7XbdNye/vJChKURT3tlEgmGXP0QfeZ9f3kyzkA3TrbiGz6fogdnT qTNu8/RN+2FG3lV2ZPRW6LQOKQvBw7tcLAAxCscKTLxi8nZlNfSdwclrBxv57JjKneuB2y OdCFpxfMez9cUdHxYFjdis2GA8lvZLI8JdyhpULwfensHvPF0BnTshrOle4zS21vSZDP0k sQgsamtoWsHJya0EKKqfl93eMiS6mF2/02EuYcu/shFWWHrqKU58YIVyRCqWHg== 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 6B7F61502C; Mon, 17 Jan 2022 21:13:06 +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 20HLD6eb006908; Mon, 17 Jan 2022 21:13:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20HLD65M006907; Mon, 17 Jan 2022 21:13:06 GMT (envelope-from git) Date: Mon, 17 Jan 2022 21:13:06 GMT Message-Id: <202201172113.20HLD65M006907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5a8413e779a2 - main - setrlimit: Remove special handling for RLIMIT_STACK with a stack gap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a8413e779a2258b02f92bad69a03d283c4bf2a6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642453988; 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=IFD2jdVGz5z0AfFTTpAakSaJ00t6ypLheBp+nd06VV0=; b=oyDPN1vAxEBjIWN3Ozrc7oBlrsSVG3L1bwjeWbso2BwWAKy3ljBpq/4/Vp2EqHPjPHyrx3 eMM2l9e7AsJ2SyFkK4WzDTbv0ppVdKUEovrTCfrfYd4mTlC04MM1JICanJutTwkX/DeTtB hQp/3+tLVc/tVL0Y70Wsbh2M+peS9piyuE90cTS5DxZB2T7kUUlIh9rxbt5NpWRjspVFQn dEJEK5UaAog8qnhuQdT19ZgRmE7cOjRL/ZklniYidwkt9j6fQQ9j4QbgQxm7DcLutfYDc5 soco5k1dnRkC/MhSPN6g7HIt+G+BBqFW1FZQg8hf5RAUeyjsLXIpsIcAx0Vkpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642453988; a=rsa-sha256; cv=none; b=D1yL3UtaT7SaZ94cfTcNRDWl2T9vPFX7wUqkRJXCAO6Dwr6tQloHVLiHEP29F27MrJTT8t keGOPtvqGOpUNr4X5MFROPAnj8VOeccrR2vYckH9hbkBTfLegl4Y9LYjfIMnNfRzVdhV35 aTe0/mWPI5hCB5y3V9wfhG9qqj8Nohha6ogqASXGHB/wBgX0BIz2a05RE3zovNCABc1OLo v2bFxU4UJGqz7onYCLxp7ooapvy1spky+B42iMQP+2aPOppaE/+VEllHDoTF5K8/ktRwox 4Zu4w4OpPvOWruqNt3diCIdmlW+vsBw39LSwn93FQOgfrIngjy/KrBkVRGoiUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5a8413e779a2258b02f92bad69a03d283c4bf2a6 commit 5a8413e779a2258b02f92bad69a03d283c4bf2a6 Author: Mark Johnston AuthorDate: 2022-01-17 16:42:13 +0000 Commit: Mark Johnston CommitDate: 2022-01-17 16:42:13 +0000 setrlimit: Remove special handling for RLIMIT_STACK with a stack gap This will not be required with a forthcoming reimplementation of ASLR stack randomization. Moreover, this change was not sufficient to enable the use of a stack size limit smaller than the stack gap itself. PR: 260303 Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33704 --- sys/kern/kern_resource.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 527e7f16e297..504e338ba922 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -672,9 +672,6 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, if (limp->rlim_max < 0) limp->rlim_max = RLIM_INFINITY; - if (which == RLIMIT_STACK && limp->rlim_cur != RLIM_INFINITY) - limp->rlim_cur += p->p_vmspace->vm_stkgap; - oldssiz.rlim_cur = 0; newlim = lim_alloc(); PROC_LOCK(p);