From nobody Thu Oct 26 20:39:14 2023 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 4SGd1v0tHPz4yFwQ; Thu, 26 Oct 2023 20:39:15 +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 4SGd1v0JvLz3TN4; Thu, 26 Oct 2023 20:39:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352755; 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=OTsb2L1LODZZav1AMB6YX4WaXAMGiCa1waJ4KDZu/3M=; b=LCyUaWiArx2IWjhty3kdb1sQL2/3z1pD/aA5DWgVS0aLZgdrlvLko98jKERwnnDjy4zObp YC/pQZL0rkMP9X/QhbCSWHeRbn12mtMZz/pex6o0VnSb+CoxcsI1vZNfRPy+P2h+Im5kaN N/ctvOo4+LLZ8pV9KfEURD84zd5+nhK8Hkxb/a1NMtYUy6gLQlDekDnZQCPZo0061hj/6m RLXcehHvkk7oCbXGp9fc5l8W2ocI5hxe6owJ5jMES1hCozWv1xgtrq/SYVYINku35lt9Gf 5gaJYJRL0j4WHFED3jAefhQhPcN5hoxMgQZnen9Mbp4E+6BSu9C4KgV/Um6bZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352755; 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=OTsb2L1LODZZav1AMB6YX4WaXAMGiCa1waJ4KDZu/3M=; b=YgkIcfm5rrrYIBq5NuBkfgI0eSRAO5WmjAGfF3U62sMwmSmB62B+MP1HCYYV/jCQ4eY1AU JlgdlOgUGWCQtk+gUNCagG0Pej1MPDBvZAixQSL5zugWrcyI3EitNCBa35nS6av6OhWEx/ jLkYRrpMrh8jOPVNz7Ti1Wk3v5hEXqYyjJkIQ/TiKzbq64+BzUnKnq7aB6oDYPndQgV31H tnNZv7tY4WLQpsHGL4ASRlG6+pTqr749xUhxoLeX6joJ0RNzhCr6Fc/IjM0cJxyHO5BMKS v2YCqu1d2FAGSz2g0KZh/KMU9RqahY0FNi80YYwX9MRYvAnHhCphB7YKzoBmcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698352755; a=rsa-sha256; cv=none; b=RJVvpxYbYfyXE+uV8wKbrUaUgfTMzAxMxBSIJP2+0FfGODInRP1zxgKSnBYPZDHyFseC9j llOjwyBNM89Ag/M8DYWf13S0CzF9DJNxP7YZGQemXkX79tRrKXESf6MWXL6tj8aBUOW9/l qOzUYquNdiR9bCiP/oY4ARkhgvi6SIs9iCq2aFoyXpwWJSsVrPASs7vhIFauvZxfc2LYZb Oni73ELeUNMi24tTgY4TSJvgKpknJQ44GEoV923MXsJzGKT2qSFkzFWQ1eDQXC3ozYS/sF 1OMY2aIzmF2OUjhsZ8oF3ommzZNYdf0ZyTDrJKM0K16VKkeI5ivxbh/WNaTEEQ== 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 4SGd1t6Pt7zlV7; Thu, 26 Oct 2023 20:39:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKdE9d091597; Thu, 26 Oct 2023 20:39:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKdEAg091594; Thu, 26 Oct 2023 20:39:14 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:39:14 GMT Message-Id: <202310262039.39QKdEAg091594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: ea7f064a780b - stable/13 - libprocstat: copy all the 32-bit auxv entries 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ea7f064a780b6f6bb023757a5eb8b997bd272687 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ea7f064a780b6f6bb023757a5eb8b997bd272687 commit ea7f064a780b6f6bb023757a5eb8b997bd272687 Author: Brooks Davis AuthorDate: 2023-10-26 20:38:41 +0000 Commit: Brooks Davis CommitDate: 2023-10-26 20:38:41 +0000 libprocstat: copy all the 32-bit auxv entries Use source struct size not the destination struct size so we copy all the auxv entries, not just the first half of them. Fix a style issue on an adjacent line. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42200 (cherry picked from commit 8f06fabe39ac3ebca4ab448a456945008305a23f) --- lib/libprocstat/libprocstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index b23a0a5b2120..f0542587cbdb 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2437,8 +2437,8 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) warn("sysctl: kern.proc.auxv: %d: %d", pid, errno); goto out; } - count = len / sizeof(Elf_Auxinfo); - auxv = malloc(count * sizeof(Elf_Auxinfo)); + count = len / sizeof(Elf32_Auxinfo); + auxv = malloc(count * sizeof(Elf_Auxinfo)); if (auxv == NULL) { warn("malloc(%zu)", count * sizeof(Elf_Auxinfo)); goto out;