From nobody Thu Dec 02 22:52:58 2021 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 E630A18C7691; Thu, 2 Dec 2021 22:52:58 +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 4J4rp23ygqz4XjH; Thu, 2 Dec 2021 22:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 69A1A25F02; Thu, 2 Dec 2021 22:52:58 +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 1B2Mqw54002725; Thu, 2 Dec 2021 22:52:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2Mqw9T002724; Thu, 2 Dec 2021 22:52:58 GMT (envelope-from git) Date: Thu, 2 Dec 2021 22:52:58 GMT Message-Id: <202112022252.1B2Mqw9T002724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7a9423d6f360 - main - procstat_getfiles_sysctl: do not require non-null ki_fd 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a9423d6f360e3758ca67fbb25d309140ea93670 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638485578; 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=+Mg0GdC8S2Mc0+zVji7HLJW4UzcjlVnqoAHxYNMhe5k=; b=ClygZjp83Bh42SVfaF5MbqpKKdmViO3beZ8glkgfqUy/Ub8FKWBvGwYRF3/cNR1mW9elXG l+szYngikdXtGhqX97b5vWRjTSyDm3QLw5Mb9hlITofldctXXC5GU8lbLjU4pqbw9/Xcgh StzVHX4GFqDpo8xVa/82IkOsunOA4i/KL3+pY6yHDUqDHlSKisQMA04XP2Mz4XmuQXvEjV ihYz2VRBpXc0DLzrpJmnvvGKJT5LA5vibmZMmyL6ZznLavOQ/V25xf3STKNiQNuM6hye9Z 9pwKwQFj35cByCciwqjlijOTySvCqndIvTBZVn65KiKHF9B+sqvZQ4kxcQghUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638485578; a=rsa-sha256; cv=none; b=iqO/dJA7W+5+moVjMEJ8RuQzBmRmOW+CFdNPYrH2tMURv/7kg9dr1n/O7a7xsO5l4pu8l6 VbNzgzp75CJHrlbfQZEuLuLak0G2YuoayHr0sSL5JetpRgpfPLA/2/XRt6ezHVBU6EEZWm RckD8RyLu1vsGo++IVzYov7LN4Uh0/3tlxuHp1t0qq05mf2Irku7VGXzAqAOCjzXcGuWvS Ccd8sO1nL2EkEcLwSHMi4jUFqgHHKG/U4L1Sm1HJhvQ0KQP/f0DLRDX8mAbBO48qBUY4LN JKjHlEpWfQ7WclyfslhvJWD+ak1R9Pna2AXjHq02+XVDVC1s2jo/5sigvuzejw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7a9423d6f360e3758ca67fbb25d309140ea93670 commit 7a9423d6f360e3758ca67fbb25d309140ea93670 Author: Konstantin Belousov AuthorDate: 2021-12-02 18:03:01 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-02 22:52:49 +0000 procstat_getfiles_sysctl: do not require non-null ki_fd ki_fd is legitimately NULL when 32bit process requests process data from 64bit host kernel. The field is not used by the code for sysctl case; procstat_getfiles_kvm() checks ki_fd. PR: 260174 Reported by: Damjan Jovanovic Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libprocstat/libprocstat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index b50875db1637..850d37598423 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -865,8 +865,6 @@ procstat_getfiles_sysctl(struct procstat *procstat, struct kinfo_proc *kp, cap_rights_t cap_rights; assert(kp); - if (kp->ki_fd == NULL) - return (NULL); switch (procstat->type) { case PROCSTAT_SYSCTL: files = kinfo_getfile(kp->ki_pid, &cnt);