From nobody Mon Aug 5 00:32:43 2024 X-Original-To: dev-commits-src-branches@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 4Wccpg4rQ3z5S8XT; Mon, 05 Aug 2024 00:32:43 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wccpg3ZKKz4D3P; Mon, 5 Aug 2024 00:32:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722817963; 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=OmVPCHmN+/5OB+UZLfAlOzRLEcO14QbMXGul3MCHHBQ=; b=KoVUMXK/NKx17lTZq6yoN/uLFHMgje9oM3IdAIkN/38hdpFFZt32QVvixHldi5wful95u0 6Fdy/shq42y7sqzd4m8u7hnDFGcVlFaLtIQWKYs0YpOJbpbnTBdpevSJNCfst4qaxhLf3e mnxR1oKudBbTJ9Rddf6QIXeQRlhTrv0XX/hdKGLLqqZQjUG4we8kKIIfCXV2LbIYWVvJfH 3T7JjJ0Id7QI01aW7+qlf+mgYfOnyo0aCFdDeRXIk0UBozg0u0nRcS0cedoZc4mj4z+nqx tPupSGwZ4T7aLC43enRsvXTAbQxiseEcLsEmoODR/+yA1J4EvgxBfNCPNCM6WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722817963; a=rsa-sha256; cv=none; b=tVnsV208XyFBUpLHUHo4kTmVH2ksHHdeK4SZup73YCezE9FMd/IpkulEF14fd87TeGmBgH eqx11gTc3VhDGvVo8cvZa/aULBgKIqH6iYPGBqhKaL+At93vtvrU/r+XZj78VR2w9D1YAt 6JRkakRz2EkntwcEya/NQj6WdJD3gCVk24CSkGVGiam9nIHN7kxQD/EZwQfp0M1mDATCy/ FVvd1oTX2uzijaxvXxy6evnh/GDHrDSAoKtB/AujNNDeF7PZpLMw9V1Yj95dsCTlztPZvh ZjMsOMTDW4OhTAViQKBwYjOWvGCfcP2Ljz5n2ga9qdNg2hfmp1SmrtJKJyWT6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722817963; 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=OmVPCHmN+/5OB+UZLfAlOzRLEcO14QbMXGul3MCHHBQ=; b=LnxWVVUJq7SXUmcz9eLNH/FqNPM9Zk52J6HxlJ/hlaJ1nqBqiSNtN7hlQwz2DqLthmyz9Y TMeZCHL8eFJEI8MrBCijmNXPrlcNK6pcYLSaO1USmiiCYI4GFEW2RCdXvpVW+fK/uog1wK gWzuGmXI6HpQbiGqzXovKnShQhQ7aPTK9vDo5IUTkei+sCOTOxAzwQlgbJa2nsH3+5jAEL YM1Suda+oEGal2TLTRpKY0WxnyLdfW2xXncOLB1RWRh+jaWIL2srN+gDAJ6WxCGeD/Lt3l LJAmprkfAwcAcoKekvitvgYvMF/wVWSX3j/xpBYEQJFUtwQfyFNZX/n24hB/eg== 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 4Wccpg33lYz1Gfr; Mon, 5 Aug 2024 00:32:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4750Whjh003200; Mon, 5 Aug 2024 00:32:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4750WhA6003197; Mon, 5 Aug 2024 00:32:43 GMT (envelope-from git) Date: Mon, 5 Aug 2024 00:32:43 GMT Message-Id: <202408050032.4750WhA6003197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 15ee14d0f7d0 - stable/14 - rtld: avoid division in __thr_map_stacks_exec() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 15ee14d0f7d0d8af7e12f16be7fe5b3fa5b2e5de Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=15ee14d0f7d0d8af7e12f16be7fe5b3fa5b2e5de commit 15ee14d0f7d0d8af7e12f16be7fe5b3fa5b2e5de Author: Konstantin Belousov AuthorDate: 2024-07-24 10:17:55 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-05 00:32:11 +0000 rtld: avoid division in __thr_map_stacks_exec() (cherry picked from commit 31f688a26d82ce00d1ec7ca9ed17b9914bf5176f) --- lib/libthr/thread/thr_stack.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libthr/thread/thr_stack.c b/lib/libthr/thread/thr_stack.c index 5e888bbfe9b6..68a658a1ddfd 100644 --- a/lib/libthr/thread/thr_stack.c +++ b/lib/libthr/thread/thr_stack.c @@ -127,10 +127,7 @@ static char *last_stack = NULL; static inline size_t round_up(size_t size) { - if (size % _thr_page_size != 0) - size = ((size / _thr_page_size) + 1) * - _thr_page_size; - return size; + return (roundup2(size, _thr_page_size)); } void