From nobody Tue Mar 05 05:44:14 2024 X-Original-To: dev-commits-src-main@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 4Tpkyk3llgz5BrxK; Tue, 5 Mar 2024 05:44:14 +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 4Tpkyk3C38z3xhW; Tue, 5 Mar 2024 05:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709617454; 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=xsNtFyWDG0y/0aTWIiA9+NLG1eO5GRtHHRAf1Zz7wyk=; b=gPutup9ujWcl97Org+GdC9l4Sn4qa/2h1PrhIZ6B8kaAvtt++VejwrLNKWHWEzHHdw/LVu m68W0FMWLDDPLhvgKuTqPnGQUvezwYlhIRM/PWgy+72DHw1aFQGSN3txkJW1qGjTIzWw9/ 30jLCGYQ4FPNYzrlNEArEhurJt4ft1v4SoacoRV9WM99M2ooFxshMFnoJQtF1r3NeFPtH5 wgxZICk25YBGCoBXTtxv3292APafrqwZPn+sU5XQF3KZx12Q0StOGZ4il2uKcypjFOiGeF /US8Od6gS4Z28EwvzJVCIFyegoMSL3oKIeg6enOpev93HMBKgI4MU9i8htIXyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709617454; a=rsa-sha256; cv=none; b=o/XOezHWnpTigj6xwbDLDeunDqeEsQg5OWuQ7uaoItbWPuTucLhb+0wfhC+05yTXj80Lqg 0gHxhsdCCcgzolcg7BDDgGl3RpKEMIQnwaPsk67aHzB2uar7vv1bafHb+ZBruEOcaFpREH TXozd6mmbvhzps+JzLXi/69sgNXPfXhFbfEfYRoa0BoqsrtavazAQhSFs7z53S6vkNUAzi JLHj7KMW0h0aEpQJcfmWL/dj69+cU1ZggUp84vQW+mk7wIP3wPooCy8hqRzXLDBTqn3jJB sQsZC+bzxrIhNgwZDWU+qwssygcNWl7n6obhQYQBIkmYJjYPFqPymuWK4AmoCg== 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=1709617454; 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=xsNtFyWDG0y/0aTWIiA9+NLG1eO5GRtHHRAf1Zz7wyk=; b=IYj+W3qbWQ3eomVodc2WZbHDJhdLEE8GyfJStGD5IDyAnuqPls/I/vnAprtffX7PPzJ6xD pzm5KzIZ4szYYhlYCFWeT3IkDZ253xWSy2E7EixgI66i8dS4vvNHgWitdS8KlbOAFk6BqK 9fCgJYlo3YcxjFMm/D6tZzbQTtwByuvePvaFADh931yKclrR3ByvERct+7D6MQc7rBxoZZ c9lq/csnUkMn4joK/SeNnB3bOs3N0Az6ncFyaKKXb5T4qqX+qyhrHbCgCkmTaIESNA5KPU cuw+TFNxN1ByFU1UaSKKeEu9sVYh2SVtzDByv5PAImFNHt7rvbv90eRgBo51dg== 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 4Tpkyk2py7ztKC; Tue, 5 Mar 2024 05:44: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 4255iErx011363; Tue, 5 Mar 2024 05:44:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4255iEBv011360; Tue, 5 Mar 2024 05:44:14 GMT (envelope-from git) Date: Tue, 5 Mar 2024 05:44:14 GMT Message-Id: <202403050544.4255iEBv011360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: b5d2165b9046 - main - kern: poll: tap out the pollfd array on successful return List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5d2165b9046572c9361a8e8b09323a6001ac586 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b5d2165b9046572c9361a8e8b09323a6001ac586 commit b5d2165b9046572c9361a8e8b09323a6001ac586 Author: Kyle Evans AuthorDate: 2024-03-05 04:14:06 +0000 Commit: Kyle Evans CommitDate: 2024-03-05 05:44:08 +0000 kern: poll: tap out the pollfd array on successful return We do this in kern_poll() to include freebsd32 but exclude the linux compat layer. The ABI should be the same, but the POLL constants are probably different or should be assumed so. Reviewed by: bapt, jhb Differential Revision: https://reviews.freebsd.org/D44158 --- sys/kern/sys_generic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 9c0cb4e739e0..f6190c3fb05f 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1606,6 +1606,11 @@ kern_poll(struct thread *td, struct pollfd *ufds, u_int nfds, error = kern_poll_kfds(td, kfds, nfds, tsp, set); if (error == 0) error = pollout(td, kfds, ufds, nfds); +#ifdef KTRACE + if (error == 0 && KTRPOINT(td, KTR_STRUCT_ARRAY)) + ktrstructarray("pollfd", UIO_USERSPACE, ufds, nfds, + sizeof(*ufds)); +#endif out: if (nfds > nitems(stackfds))