From nobody Mon Jul 1 08:20:36 2024 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 4WCJrh5BP4z5PqxP; Mon, 01 Jul 2024 08:20:36 +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 4WCJrh4jgTz4yKy; Mon, 1 Jul 2024 08:20:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719822036; 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=965o02XjVwQmiOyTyngCqT2koCd6IdCzxaELb+YezfE=; b=bG5xqUiVxCOoi+fjIfsjj7OScU1xYZedeC6KO8bDpUxH5dVTztGimYyb3JdozEu34sWpLS 49SCbgiv70ckQ1bJRQwGAOR2kaevLdJQSV5NKt953i/tGhHVFWEAc0ySwqbcks0Kv3wQzO f9zDfvVcxa+gry8IOKl1XFD8P4NYRfk8OlT4nuJ6c0K0O6djMzd2s49thBZ9kb2JmTKBOj KwmiNxVn2UgIfL9CRvF7Jco7398owt9A9Iz39DdpNOjHGpWJ7ObJAV3ir6El83bXSx8Utv wGWM/CveGSbq0SCjXqRqzKzf/hDE4F4XUz5X/WEEWOGAVsF+mY4H9H7utvjv+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719822036; a=rsa-sha256; cv=none; b=Go3RwkBptnQahuc8p+Nz4ZZNJtD/W6GirXKXBPmrHfcHXzZocsCg8QEymFX3HZMXaKSnq9 5gBFp2RiL7nhqjuqNFuPSQgxei44x8OAWqSCnOsV0TV4JmLGsi2KWgghn8TCBftRwTCmIS 5+CHXNujkGUrnQQY8uvnVmm2yOHWd+P7dblqUAg0Bvru5FZsnksg2pap1ZRyGZnLwNAKew J3RyKuYqmMfH8RdCHz11rZsy65hOIR60yURuhONi99yhQ9pKUaFQqDPEWqTAoJvhd9U7vQ NlTd4XmsNHGXi6WZw0DrzBEArL0TKQktXnSpGz5W4qJC8N9fWH1IooKOht3fFg== 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=1719822036; 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=965o02XjVwQmiOyTyngCqT2koCd6IdCzxaELb+YezfE=; b=fdvE0+3Php2jGEiH0Tvw6gaJ5i5Ltd9T3MQ4/k1SpaggzqRxRpkes6syztvinMIWiOXIBX gxrHaR6Hap/EkTn2rDLrTxGOOyrJbs/zxG4+01MX7xuMi1SmD7n5R5TZT6n7wqRaAkDi6c jw0denO5ChPggbgXligkPmwmwdlRkjHC1s4YcuCHeMi72g5KmVyqTeXg/8bIisZkBkfAHE JzAbnqkVJqBnXeg3SA2WfYkyPQvfmFc1+0tebanKU5dBE5EirgkVVyZTNbUA+ZcdQU6R2h JxJMUN1E63h6R/ZxWxE0qjztL/D0rb1pefYOuhOMsSB+CDUfGgZQ3eAa+A7r4g== 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 4WCJrh4KBFzx0C; Mon, 1 Jul 2024 08:20:36 +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 4618KaEk078339; Mon, 1 Jul 2024 08:20:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618KanM078336; Mon, 1 Jul 2024 08:20:36 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:20:36 GMT Message-Id: <202407010820.4618KanM078336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: 2abea9df0165 - main - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2abea9df01655633aabbb9bf3204c90722001202 Auto-Submitted: auto-generated The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=2abea9df01655633aabbb9bf3204c90722001202 commit 2abea9df01655633aabbb9bf3204c90722001202 Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:20:01 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 9fc1a2e2eaf6..436c75630181 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index cfbb749c0d04..836b5650b247 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240318" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Mon Jul 1 08:22:13 2024 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 4WCJtZ0fGjz5PrFq; Mon, 01 Jul 2024 08:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCJtZ08Gyz5069; Mon, 1 Jul 2024 08:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719822134; 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=l/lSxpkvqfBSy15ZXZoSr6PRu+7Ts5IPmaOAJnUPnxk=; b=j5MFlWABjkDiPNyqLjUmT8Qu+6pgQv82G4X6KRBG174ASkaqp9zXFi1ZkmrVLTdIWf70Lo mINqB1sXA2ulmcIyrmxoo/Su2K/VIKYaeBXRXbTjZNEF0QM0jkuFF1Y/RrUIwnL7N3MGiy 6hMwW+3IOps0ZcIwgWJRAfhoGwHhJEWQcW1Tg4EuWB304OfUVca+aJko/LC8ZFaQ3z8uuS 1pGBfJusbqB9xzfWVpoRf2kpWBiB5qGQCPCzpQJ1eC8et84U2QKqfBMoSSboHLXLv9WhcX 6TTpIedlf/b6VZ1MRUZ8wJatZ2TP2PvzudP1spHL6Dlp8QMv/ii6wyFgu48hzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719822134; a=rsa-sha256; cv=none; b=vcQbSjTKVUlj3FODrJmwLtS1Z1+vQtZV/MZYtnghlLLu5Ar4XE6GNlcLzddacPaBRSYSHj auokXY2HVjnxj5VaB64w/r8lJBlqTN5ocVVsIrBA3LPryT+1q90GcUvRQVR8hUJSgl6G86 lwovTpYaZlg4fTBHCo0fgjzpATCqvlZ1lwMayTYyXG+8sxfx7FLlvBeoMhOyI1c5Ew9rzZ hxnKxgOeO5xL8ywnHShYsYpl0iBe+0+DNksB7aG8QVyc9y+e0VQ8ROqUfvv/85o31LEiH0 HAucTL6ZzkW+RgixiDnFCCKL9wIOHTo5JRx5RniC9iF/7bTII8hstd4DSPmq8Q== 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=1719822134; 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=l/lSxpkvqfBSy15ZXZoSr6PRu+7Ts5IPmaOAJnUPnxk=; b=cCLuYACSoFQLdhfIXD2TKsiRJ3NWLyXIXhLz/9ShtgbgwMY0Lavgf4x37xCkIsoaPHFT9n Hykysk2Wa13pRtnPsu7W9rqyB/pUGVDWkNpb41XgZ3Kd+c7udvmSnPTmfHL5X23JNHgwl4 XXtTooKbx8auhRf3GXzYNAUFZ+FIEZI9QW2Tx6CtB71Ixr5W/cZAIDjB7QcjUlkSWESk6l SDTV7DFQrMJRIdCwA7vOGBpi/9ddDC985ZCnCG6v3DqYspwrD8TiXEH8rhvVn0h90xISwg WonPH+rbdgr0EHmBS2tUNP58oiSN/ReG7rSvnsz0QMCtHSfbbKJe0qsHJR4OUQ== 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 4WCJtY6sQKzxjd; Mon, 1 Jul 2024 08:22:13 +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 4618MDtP084404; Mon, 1 Jul 2024 08:22:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618MDN4084401; Mon, 1 Jul 2024 08:22:13 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:22:13 GMT Message-Id: <202407010822.4618MDN4084401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 620a6a54bb7b - stable/14 - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 620a6a54bb7bb6e1c5607092b6ec49e353e0925f Auto-Submitted: auto-generated The branch stable/14 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=620a6a54bb7bb6e1c5607092b6ec49e353e0925f commit 620a6a54bb7bb6e1c5607092b6ec49e353e0925f Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:21:19 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 (cherry picked from commit 2abea9df01655633aabbb9bf3204c90722001202) --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 9fc1a2e2eaf6..436c75630181 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index cfbb749c0d04..836b5650b247 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240318" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Mon Jul 1 08:23:16 2024 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 4WCJvm3SZRz5PrHm; Mon, 01 Jul 2024 08:23:16 +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 4WCJvm2wtdz505l; Mon, 1 Jul 2024 08:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719822196; 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=NLDz6pv+DWYiWulJYuL8N6TZoNWuNqGquYYUMdEvCaI=; b=M5ByK++BQECqa/nnP/XesDze8j0jre+LpwPChGwPNbuyh4lPHBxwEZRSp8P/1D7IWIAElo uvw5zJnRjCDpwDCSKQ1tNI5zVPyz3b2Gb84aD1UmBwHNpEOer8OjwXKpQA7Fi7sEnJyLkR PFznQ/LsbkVL5gDjZTV30N+lM4lrqIUwVcG0CsF1PYe8NIkHeI1lJUlF5eFh42ktnrKfl1 YsPXWaX3X9MyNMCP72WGjW4HFY9q004b0q9LZzt7qhsZW/gh8MN4k8lqAkxmVhxBxGMGDr QRy0BEVfX52v6cffa0kxQyM6CjyExssZiVXugeUaMQfW8wtyfGRWaXyB99DpXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719822196; a=rsa-sha256; cv=none; b=qmjNFic6tzBesaJUiSsqc085xAFD0/n4eSAgVAiSPOVZmT1Ad8aCePd/ayGT+Ee57+6fUU tQgglB0KCPmt42PdeiFTpAh/xT4ttbgFmw5JIVKqUBZNeELVjC4RSWStlamOxGW7zyTVCL o7IA2TL58h5QGib4aBjYJhd3Ux1EZ2AmxVnU5tz6q0Vh/RCfkH2dSc0ShyyRfHFpYkwkVP Wlj//8XQxvhAxzzK5AxBNOz3Gth0sq2K0ersJ1jBF43kExb9vthvQzcm6amyvGjtyYLE2o kOcavQK/BD12TI6k++OmHh2y0TVA2jAP23ibeHf2xdX5rqm0AcMsLvqNZlgfhg== 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=1719822196; 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=NLDz6pv+DWYiWulJYuL8N6TZoNWuNqGquYYUMdEvCaI=; b=GucUnwAEO/B++8KAF7H9vQl5npdhEzoOSEv01HhaLEUciKmi8FHzPudvszZxAVnmd7bGTD pdu+FFDxkrT1EtCtJwrxs3d4C6VLq7cFSvJnke5TgubsBFKCPrns9EjDcZxmQEeOkxE4+i 7ZAxo6PZPdHnRfv/rWNrrfiCKYv+6xwr0Ma800VqLQ1LsZYHY4vl84fNo89n5SzwZOTKkl Bv/dcCGG6oyjxSZK8t8JR+Pjvm727Vb3UKnTMTAW7TM49z/AY7/0tWJq0zYZreJ29AIZ3i eBRySWb2JUraONeXF7syHHhgFxlwyTAkPY2oslsE2xCaep1QsxCW8UJlACg6Sw== 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 4WCJvm2Xf2zy6F; Mon, 1 Jul 2024 08:23:16 +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 4618NGNY085575; Mon, 1 Jul 2024 08:23:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618NGgm085572; Mon, 1 Jul 2024 08:23:16 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:23:16 GMT Message-Id: <202407010823.4618NGgm085572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 25cf430cd551 - stable/13 - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 25cf430cd551158135ef6f0c1aadf273ff3430c9 Auto-Submitted: auto-generated The branch stable/13 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=25cf430cd551158135ef6f0c1aadf273ff3430c9 commit 25cf430cd551158135ef6f0c1aadf273ff3430c9 Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:22:37 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 (cherry picked from commit 2abea9df01655633aabbb9bf3204c90722001202) --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 9fc1a2e2eaf6..436c75630181 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index cfbb749c0d04..836b5650b247 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240318" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Mon Jul 1 08:24:48 2024 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 4WCJxY0sHvz5PrVc; Mon, 01 Jul 2024 08:24:49 +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 4WCJxX5wg8z50Nf; Mon, 1 Jul 2024 08:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719822288; 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=i3uF8PgJHQ0Zm+tP12nwnVR9PGMqJW2uTDn4ktHILSs=; b=k22Kbdw/7ID0dhgRbrzLpwPHDGxdoMlQytHFej872qyZrI26vIXTvuD6SGn1xzJs7egODO 993IVa4+eISf5zRt0XjOurAQWAPE6iy32QcpkjTEGCFtlGeLSwhb+orMOOBONTvtH/Rm9N NcTVrWfzm83fJFhcr9m7SVLw7REHrcyYBjti9gloMOmmXk9Fq6P6SMt4BXEL0g7X38pD8I RM+kw/mAN6WmyhHuZ5pZdG904wx5rgYPN7NPETZBNHzP1533KZCPlUTAES+ottrpU5i1qC itMapU3N+CuOCrm4nGPJpOHTTovH/LejAst11VUL+MpQvF7nfrEpBV3VMzE5Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719822288; a=rsa-sha256; cv=none; b=kiaCE/r0bN7y4f9IrP/4mobROAXqrfq2UkHIeloK3MpDcWt/W1lJ1ecUwEWpBxDOrbMtz6 bKCr6qgkVtBKBuExginQ8nlwsqAezETOot1Xpjma9UcruIyrriv3S+KBM8JTudZGguPopJ Br1+zh5BbVy4gE61zWiCx7y4JGyQIwZfARTfT2VJGSKUf/9N0qR9FxOJRWl70Y+VPZW4FS S+e6N/eOB/Jz6ZTuCk0jLAsCIA3uBXU7jvfh9R3TroKp4Cpysl5zWyKsENWQj7iXWK+x71 sFqDaVXC/u+PTcyy9zM335MMXyjWJPnlAdZWG9Vx5W9sqiR0hT1zg5aY2VjJHw== 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=1719822288; 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=i3uF8PgJHQ0Zm+tP12nwnVR9PGMqJW2uTDn4ktHILSs=; b=CEt8bsDYT27hJOVWXjvamA/5AMQXgovQnVTsCKKLD9KFxRoBqtYNR7+c84lj/ev53rqc+G t9lrDbT1q8Qt3x3JEJRHadBmwowXNv8SpbGTbn3ctZMArjow9lX3K18fRmBAS9ZyYMiQ2M W2QW4JJmzTOfk/Oks9Jgh7gNUZCtw9nrj+SjkAx6jLwynr/q6aPYoADCaP/ZSHulua4K8n NZuPhuwmjR/YDq1RkgZ2KKf+7s4/9kSwXyCfYfG9L9CLAbvYFWdFXvusDupTYyZiy//LCT dn2sabrhdGk30I+qUPOIkI4QTnoMtCyOx5tTTSjn/6Z93gPy7JNWN8EAZBYkDg== 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 4WCJxX5Xqgzxxb; Mon, 1 Jul 2024 08:24:48 +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 4618Omtm086001; Mon, 1 Jul 2024 08:24:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618OmK2085998; Mon, 1 Jul 2024 08:24:48 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:24:48 GMT Message-Id: <202407010824.4618OmK2085998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 8f80def8aa08 - releng/14.1 - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8f80def8aa085385dc4fe4668f0e29d3a0dc8510 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=8f80def8aa085385dc4fe4668f0e29d3a0dc8510 commit 8f80def8aa085385dc4fe4668f0e29d3a0dc8510 Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:23:50 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 (cherry picked from commit 2abea9df01655633aabbb9bf3204c90722001202) (cherry picked from commit 620a6a54bb7bb6e1c5607092b6ec49e353e0925f) --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 9fc1a2e2eaf6..436c75630181 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index cfbb749c0d04..836b5650b247 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240318" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Mon Jul 1 08:26:05 2024 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 4WCJz15FZxz5PrQK; Mon, 01 Jul 2024 08:26:05 +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 4WCJz14hB5z50d2; Mon, 1 Jul 2024 08:26:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719822365; 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=FdmjhrcX0OTGBed9zncYuEMCTmeRr/MesJ90lO8JMIE=; b=p1o+6bMq/ZYsCiODUsYmyq5f2pU085lV3+Zu/cVHl7o/Zu/zv9sGxxwlK8kqgqy0chGo+q pLS0mN/jFe3vZD0KVRga3SvYWGfDZHK66+0DDU9nf5oU5Ldnv4NPKSkHQLfPbZ/gcvX4tp TCNG53Yfrjc97L5FXMJs8Z4JHX062OIRrMRSVFsO9/SquAGKPREqxKlcsHH43Aoa1b2KfN 4HaKoaMtFWhksFOTTw1c3aZsVNTU1LslD+Io3+rgGsog+sKG76k/KJIG9VrObmutWqmT2p boefPDLNwoH+xgpx8vGHNCyE8myeZM4P56OGe8iZlT0JfA6alJCAb/UNbmfXdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719822365; a=rsa-sha256; cv=none; b=MzgQNVhLX9z1ddFbAvFGSgJrwD2Mc6L3UoeEJG97Spl3QKyFa/P8qiIOfXYu9byNaiDNIq 44O6dXAs5SUXHcL1CagxR42DjwiaYhLM/VUdW1doja246jwbG2d/aVujFv6MW4UpvqLOLI ebCVickiCHG6eCgmrWoWpBqYOYxsUcZxzequZmwAwRzKG0Gd0HhzKDfenuhUZYURQv4dIG 2Jucf95V0T6EdMN4eu8460rtW16y8yUD0hKLONbOIZ6e/xVkNTdysKU9cs32FniM5c0BCR LCnesVv5HDD3kRSEefwHbWD8uf9RuZWeweD6coZJHdzKaOK/9wonRQ2EZCx6ZA== 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=1719822365; 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=FdmjhrcX0OTGBed9zncYuEMCTmeRr/MesJ90lO8JMIE=; b=yO7ewrPa3RB+YI4Ij2VVw1iAzQaw/a3cQFJsdqelUGrteh3wf1ReEtGtvwMD6PPCptFLMX JfaAN1v1TKK6fndEFkay49S7sbO48Wi8+mHRHYHtqs+n0oMMmfNsswO6Mtvegt/6ibfWGS 20U+5OnCdUlgq2ouz/18X/7hhfoLiy6wu51JfN8Pc/CpTL3yNnn/w82JQhCVTGfe1u8EX7 5vKfvEkvRPm8Y/IOtSB0iIFTgFKVSMfpyKfVPoCnucFU7uBYeQ2nEfXrAZupkD4ft+3FvH Awcne2+JpZ4EdvZeWn0PCGLW1CTLb+AIMS/5W9RdcUYZmKpEcNm3IHiN7q6tQg== 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 4WCJz14J3szxQL; Mon, 1 Jul 2024 08:26:05 +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 4618Q5Wm086283; Mon, 1 Jul 2024 08:26:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618Q5l7086280; Mon, 1 Jul 2024 08:26:05 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:26:05 GMT Message-Id: <202407010826.4618Q5l7086280@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 70eb00f17b31 - releng/14.0 - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 70eb00f17b310f599b60939c1afa326c7b2c390c Auto-Submitted: auto-generated The branch releng/14.0 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=70eb00f17b310f599b60939c1afa326c7b2c390c commit 70eb00f17b310f599b60939c1afa326c7b2c390c Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:25:43 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 (cherry picked from commit 2abea9df01655633aabbb9bf3204c90722001202) (cherry picked from commit 620a6a54bb7bb6e1c5607092b6ec49e353e0925f) --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 99bf046a792a..55e112f839e0 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index ba3690668818..56d02fbe9c86 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20231004" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Mon Jul 1 08:27:10 2024 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 4WCK0G3NWtz5PrbP; Mon, 01 Jul 2024 08:27:10 +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 4WCK0G14yVz51Bs; Mon, 1 Jul 2024 08:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719822430; 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=n0dDMMvjqQoVLAcL5v9R0GEXNTKcFqeCJVzko/XOoCs=; b=hJpHsq8Lh5L+hE0IZ3EIuylrcBqEPZuQqiFX/t5eBZ7URbtKYP6Gf9CoHTvQgZsKTpos1I y7deMQ+eJsGShXrqJ8Qe+0+R3hFZVJV5cG6pg2nleRCq9xwFy20sfFLmyqkSn95g6KDAnd VWGqmASVC6IewzO/wsDkv07ODn35rpFaq9WSaDVzNaVTQo2qsNULdREyOL8XJqosuDETvT 4uyIfLslF9zU/q4FojiFi2Ply+iB4RhE2mMYIV64GJHuERdoCUXWwqO+k0Raf6FCz5FQVN XEmayEqTAjjpWLhtVOJZ+Tht2Hf051Sgf4Dym1VfCNuI8XvSnLhrfkm5UtocHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719822430; a=rsa-sha256; cv=none; b=DAs7Ez6sx0gcNYpUnD/0EH5CL0fANLibOAFcAI34YwZe3qPevKEH2GMZmvyxVo/lYWbU6m vOa67DQUFSz4TXJHVwnrVFnoh/+16Dp41du72xwR2H69PEycYuh6O1r2jc6GHW2xJmEzlh kHZq3CKexsEtVaCxRz2+bo18aPFhY+kZCswUWfjmdTZN5MYAOGb6TXivyItsaxWBm2iuwZ EtiUA0/gYCTYZPUw0M7WttBcV6OKTB4+tDKQoRUo6zF9veWaz1pQOC4UYtFoo5TsZ17gLT gRTI0GK5xQnSWAxE1ZNRLPnqF+S/TM/7niyL3IVugfOuBahnlqPDi7rViMZ75A== 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=1719822430; 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=n0dDMMvjqQoVLAcL5v9R0GEXNTKcFqeCJVzko/XOoCs=; b=lKocImN0E82/V/P24Y8BhcIs+bm3j5QA9k09IcmWfRUfKbXdHOLXE34KGafyq6HKXRP9w0 bgMAMh1uU7IdjjXhZ216xmdh2/aFOKwozeYnOF51cBxlKHnzBH0tmfwPxC+N5Ho5ngtScc 5wyaM20upwmZhkuggF4MeP5kH/nej+S42uQj2kWP92mV2biEdkoWp55Bece9VmnyecWUpZ n0Fts5TqOzQsQpjjyH2DkzhwGArmgOQoxsgruGuQjONkV98a7uAX1lTgsx8qvWUPycrIlp oI6Zdgilm9KFLNIV10McR4enp3IdYizPOxjJF9ZF64CC27CGt9WenU3Cuz/DqQ== 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 4WCK0G0jKFzy1x; Mon, 1 Jul 2024 08:27:10 +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 4618RAnp086521; Mon, 1 Jul 2024 08:27:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618RAIQ086518; Mon, 1 Jul 2024 08:27:10 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:27:10 GMT Message-Id: <202407010827.4618RAIQ086518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: e3e0912f2977 - releng/13.3 - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: e3e0912f29771deed47955c36d38a8eb88ae32e0 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=e3e0912f29771deed47955c36d38a8eb88ae32e0 commit e3e0912f29771deed47955c36d38a8eb88ae32e0 Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:26:49 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 (cherry picked from commit 2abea9df01655633aabbb9bf3204c90722001202) (cherry picked from commit 25cf430cd551158135ef6f0c1aadf273ff3430c9) --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 9fc1a2e2eaf6..436c75630181 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 6b7067e19f8b..3e99bca450b1 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240104" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Mon Jul 1 08:27:53 2024 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 4WCK156MYkz5PrY4; Mon, 01 Jul 2024 08:27:53 +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 4WCK154QsWz51Fq; Mon, 1 Jul 2024 08:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719822473; 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=NAZQaN5ZE3zxStzUf4xJZ8eLLUwMztgmQjfe/Updopc=; b=L0+zntcuyUCLLA69pilf1j5//IgbnUdojjnQtYV8Qx9u6r80hROIDVgaDOxKoa2AxNAzcV I82Wz+I/BOTBI7ls2D0nUod6LbH3sSWdqgaLsun1ojAeEDqzRWN3cIbhjeaiZZ+iNg033M JWbDwXlrNKQqluNMmI6S/nYJUFqlswTx1JVOVRXm7XmU8ZXcAbrmrKOK1fcJwdv7t6XSvx WJhwzVWbYQyyUipwb7vxCv4AX08hEa4VRNRPZXPsmHW37frVEl9zVZnRVGoeQtERNoPL0B 7NLqNJvsSP3WXZIeiQ325l1Q1q61RF+BYO0ry0drvkNR7JZ9MRQmuguDZ7h9SA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719822473; a=rsa-sha256; cv=none; b=OAGI2elgWPGZnYejqFe61dgxScUJS5bJH0Av2RDAnJ+TP48bSZ0Gii7WIkLMAzsbHhLWWW m/8DWt1sy8/Pcd02eADYjn5rclSqmMU84hINKD2ItxhuD6kn8JJAPkYQu3Qje5OptzOvTJ ZyUcV/H4XAVo8VcXvAv1CfkxaZo51V2Jlm20F03zAjb3k+7ggvt4cCnAhdYZSy15W93EP9 Erkwf8rn+pL2Z29MglyOI1h+C/hTwSyn0OugxZE6l6xjgOlkZMM0TlOgl4baEHN9n3L2F0 ENw8TffWVGaJnj8cWFC7V8aIk617ElzgxPgM6U644q6UssOCN0zVEA107UxUiA== 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=1719822473; 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=NAZQaN5ZE3zxStzUf4xJZ8eLLUwMztgmQjfe/Updopc=; b=V7OluXghUInJp32BP2qyowa4tB0sZ5tMn0pXh87V1A+IPddOSMciesDW/otqTomT5vfFDl ZzFbPUG9wMDTsRzc/Fh8JXQL8P4I0dtMiDWKVCpZKm+6pqb61SbPwsh6qhLQIypV9LW/hN NNP74KgTMdroC/P/16zVs93+JJWrdOlAR4QOHVENOfibg8q6vDMGa2YnoIS8yxO8el2kSf JvIHFsnRvqwu1Y/GC2jMaHbQeXTt9zt14rr9cz1DTfvxRKkv38ur/FHerM1ZTsfQbXGhYN ba3hULpQLEKuOh8KjrBZCHiRYYjCb9Cc3NU+erMF1QUJNYDeztr7/T7B8vNjdA== 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 4WCK1542xLzy6H; Mon, 1 Jul 2024 08:27:53 +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 4618RrEk086718; Mon, 1 Jul 2024 08:27:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618RrT5086715; Mon, 1 Jul 2024 08:27:53 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:27:53 GMT Message-Id: <202407010827.4618RrT5086715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 99ad94894edf - releng/13.2 - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 99ad94894edf0585bc8c5a2b2a6eb7162db29a34 Auto-Submitted: auto-generated The branch releng/13.2 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=99ad94894edf0585bc8c5a2b2a6eb7162db29a34 commit 99ad94894edf0585bc8c5a2b2a6eb7162db29a34 Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:27:37 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 (cherry picked from commit 2abea9df01655633aabbb9bf3204c90722001202) (cherry picked from commit 25cf430cd551158135ef6f0c1aadf273ff3430c9) --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 99bf046a792a..55e112f839e0 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 7132fd7b0780..138d256bb291 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p2" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20230719" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Mon Jul 1 08:51:47 2024 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 4WCKXg5jlCz5PfGH; Mon, 01 Jul 2024 08:51:47 +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 4WCKXg5DkPz54V7; Mon, 1 Jul 2024 08:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719823907; 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=9+G5mNxf6nlUtecEIRLW4ZOif75bBO+vov1Us/waAlI=; b=AGRI//9hjOzouHgo61aG0MWW34yBme9cfhdlJil5HxTZzMXF/OX+iNe+g2o/niJ1TduuYx 6jc/lFU6vevSQb7LEh5CQ+TBPTb3n/yQHonbpNDdfFsrfp3GqByPT0M32A3rGbLdZlC7cx bW6Ewm/12pehrcYE9P9Tbm5y5OCQ02zri/xLB4bxX7sksTHJleKymYssofGZFm4FVL9YHv ghJn3MBEZIq6Ix4XyNvpQW2Lm2lpnHtHEn1UJZR//8n1YsWCTvQ4HK/14xA36ILf3TjMMi xtuAGDYEd/z0/YSpWVX9crAeDn7mHu+kljS9nBytBnhqF21EHiqVXbwDKVqeZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719823907; a=rsa-sha256; cv=none; b=S+j/oV0BJpkrslh+DukwBXPTl/bAfzZlUjVeFXaFu4BLx/QAoxMN5Q3fHsOjlnbTcthy6d RHegBlpLRJvjmVUx9j0q/eCOOyUcyBdsvrj2OzJU2PscxDPpaTEEXwe31NQdLqNS/KdLgd PdDZFWWdbk/l850UgNQTob5kwai9hVJGt3cCPbnj0csBWfVCF0T0rU28Jt3FZGOwM+yEZC FQWkPRD0btyf+yTqfKuHcTRM0Y+uyDCXHj6wxr3QwbEhyaSzVZe8WS0gVXrf5RtcjQybMh 6ujSqU7zuhLsX2cp0SL1lp0wvR16bRKwhPjzE3nOHLcgaPCRnxjgsRuMYJuI1g== 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=1719823907; 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=9+G5mNxf6nlUtecEIRLW4ZOif75bBO+vov1Us/waAlI=; b=C2qARsV+rjOmHgKfpHoA/IvJ5ontKxUcqRvWKUlbGZqPvwbNxSj0Ue5bqHnvDTSQhYGP+S EKOUyncmrZbyNNKZO+lD7JORo+plmI/cQ6TZ+L/yGloy4VAEDg8NwBQqbSJngCEiT8u/74 b71zWwxJJmCdre/wBu7h2tjRz7xaknbKpA9FmcmHDyXiy/wFebJsEGaC0yC/EvZ0Jsng5b NvB7zRXJmygFjO0wty6p++8oh2WxKVLLOXbW3p7QVhI+Mcc3JgTN/oKO6vqWwuu+6VviI7 EeYmhYR4R3wuxYr89oXm7Sdr9YtzrK9ruP6r7Kaywoa0M80vB3MkCLc4MB6k0Q== 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 4WCKXg4n7MzyGt; Mon, 1 Jul 2024 08:51:47 +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 4618pl89035213; Mon, 1 Jul 2024 08:51:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618plqM035210; Mon, 1 Jul 2024 08:51:47 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:51:47 GMT Message-Id: <202407010851.4618plqM035210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 1eba659e2f68 - releng/14.1 - Add UPDATING entries and bump the branch version. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 1eba659e2f689d4014136048a8e470e852bdc69b Auto-Submitted: auto-generated The branch releng/14.1 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=1eba659e2f689d4014136048a8e470e852bdc69b commit 1eba659e2f689d4014136048a8e470e852bdc69b Author: Philip Paeps AuthorDate: 2024-07-01 08:50:42 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:50:42 +0000 Add UPDATING entries and bump the branch version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index d972b89c5f69..9972de7d6fac 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240701: + 14.1-RELEASE-p1 SA-24:04.openssh + + Fix pre-authentication remote code execution in sshd [SA-24:04.openssh] + 20240619: 14.1-RELEASE-p1 EN-24:10.zfs EN-24:13.libc++ diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 8b55836841d7..ba482a7931d2 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.1" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Mon Jul 1 08:53:10 2024 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 4WCKZH19Rwz5Pf6k; Mon, 01 Jul 2024 08:53:11 +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 4WCKZH0Rz3z5527; Mon, 1 Jul 2024 08:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719823991; 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=wjohNkEvHvcCK2XEB2mG8qBR1VMJVP9h8CIg/4i/ze8=; b=a7zpJexDPo0tNZ4WhkujLfiyLqncf2KLzo367cy2uYwvAmiVo0ovBvv5ZpOpucWv0HLUtu Is86q+LafNopMzhR9x7RjeQ8pn9mtjg9VUP76cpcC7NhBiWkd7Z+/NZnAzeiO/9xlC04WG NTJUoGXbyHkXQMcpWwc0Zmsu6QoXKydCjyT6JpiF4+lCmaKZkRfAfVlPQQdnVheknHBr08 nd/gyHH2E5wu7P0HfhtDhjeJLtlzKj8ZKVsuS0SojiHpodXpIV61TTaRZkx3oxlqOdr77u +kQQE+6ieX4woJ3AVTy80t+kb2MOeLoPu917K+t7VPut7dIOjM+OuQK+tCHOtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719823991; a=rsa-sha256; cv=none; b=BfeRMprMOjK8fLb3lIi/Vj7H5BPpZ+92YilZJOAwnyOsdL/yAhPdcTUp3rKqD0DpeWKMnQ iW2r6L9a9Y5kXEGhnMHvUSoS88LV6yQZZRylDlkJSubVN9a2hGpifVWXggsVmUL+AUZ53E CiHzkwozOpOcPJIJr0xqtJ5HEJqyCbBhLBrboCw2zuexLKpFmO8w61NWJwKQrfxzpr699a NaS81SJDdm99HCLR6KsIeGHXRgpFFum3P0vDRMUHWfsAGIvbc1SUCrAgkyx5ArHC5FJYs+ 2KTsEEoEFBZItK/YV3PIMhrnsQcHVzBMp1c3N2GrO+n+dzmK6XE35HPUzWzxRA== 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=1719823991; 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=wjohNkEvHvcCK2XEB2mG8qBR1VMJVP9h8CIg/4i/ze8=; b=cJ9wqjqMEG7eO+Wb5SglGmlGO1NfJxMkqGwlfVVjJP1SLl2USAB5cNj8NoeMlw4UMW+Y3C i3gXnpqhvTlxMrdUlfwg/YX2teQ0DLXy4JBAY3vxQc380DwFdZOmn9jQaGC9U06LXheVLC 4p1MXcQ/YoUcctT5QL9NSfsVJP/8XOCnhq87A17cU391HbsPyXQHde3TbpWQOkTnALUVb5 9ec78glNC50Uwn/RuBhpKcUFwpMZ6dm3Ujxgof84p6goSUN7Qt8sao2spXYCEVDUbTMgHS aK4Ov+ZaEWIUkY9H3MfIFoiLz2vOm13gTrQ6k5+RBJu3rfK9z1qUPNgd8xzzow== 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 4WCKZH02mJzyPc; Mon, 1 Jul 2024 08:53:11 +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 4618rAP8036530; Mon, 1 Jul 2024 08:53:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618rAqw036527; Mon, 1 Jul 2024 08:53:10 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:53:10 GMT Message-Id: <202407010853.4618rAqw036527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 5e23806790ef - releng/14.0 - Add UPDATING entries and bump the branch version. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5e23806790ef4825ac09b458d3df941748599fbb Auto-Submitted: auto-generated The branch releng/14.0 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=5e23806790ef4825ac09b458d3df941748599fbb commit 5e23806790ef4825ac09b458d3df941748599fbb Author: Philip Paeps AuthorDate: 2024-07-01 08:52:53 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:52:53 +0000 Add UPDATING entries and bump the branch version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 0a9ee0ff58f1..c786fe74c829 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240701: + 14.0-RELEASE-p8 SA-24:04.openssh + + Fix pre-authentication remote code execution in sshd [SA-24:04.openssh] + 20240619: 14.0-RELEASE-p7 EN-24:11.ldns diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 2d5f3bbca98c..d566b1b8f6c5 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="RELEASE-p7" +BRANCH="RELEASE-p8" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Mon Jul 1 08:54:08 2024 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 4WCKbN48wvz5Pf9m; Mon, 01 Jul 2024 08:54: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCKbN3ckGz553g; Mon, 1 Jul 2024 08:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719824048; 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=+2hoyuY/UEueyg9V5eYsPV9GKjGWBqTOMl3vXd4beyk=; b=wlvZkYiH8jR/JAXoFg2lqMUhOK7B6wxyNVksiyBW2rhjco3ze+gwMPh5E9McNnraNrFK6o uDZIqgNTOMUESjCmu3hdNHUY0Gsz2aDbCtTX7tcyyHqY/VppTZ97VWcbAAglB2FwneMWUO b6RkjMO21o0Z3rHLbgTmnrgbESRRMGl1ec5aXd5nDwJ2FvgYXSUvzGmltzDGavsncWkfWl E1Cg3oDXr9dxSrb9PwOkT5wcwlmsLQ+fh2hxHWlGJKCjOqMzagmjg3wNOvWnV+L9xta4hI YrhmSuF8R/0K8QbmPul1JruGnqqlQR+9Lg3xg8JkL1ycSM8uSA/pXHwDU2ilGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719824048; a=rsa-sha256; cv=none; b=GNxG7c5Xascndqe/UPGAWAo0jkmDaS1ofbkXi+l/Vb3PAO/j+ePzlgq8X4HsuN9YQHw3br 8HJWVa4q6pFrlwGQ+fYrYis6gHJADOqBBAvsL90VzqGTWhVK78HM5Do1fn+bUgaiYpCuxZ 8SSfmzTMkxaFoqLuI4R+wdtD29cCQ+hiZdVq5w8hwOGSi6+/aVIjfwPtQ5nVhomRTQ5hsA UPKI1ho5RD80IB+GzrGpNuYvIR/GwBMR1UqbOVk/BNGzLOPjAdkxeCymTOl7fEaV3UicYh EBBZzb3ow6/IBFVbbgnvHeApYkm/jhEUSNsniaUy9IcjM5Otsd7YxE/qFGpc4Q== 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=1719824048; 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=+2hoyuY/UEueyg9V5eYsPV9GKjGWBqTOMl3vXd4beyk=; b=G6YKHtK4B23ityesXGWos2Wb4RXc92yNrcIZW66hsTpRKrBXZNB20j2ZshRF+T01xsJpAt ftboy6/mACNgW1gNc7mO58F8g8PhFvt49TVVS3P//PD8cnfW+aRn3iZvEi7wkFT5apmYgn ff+oSakd6iiCdexiXW46RDjygE8V687yw6KdUyjOlznzEGzzdGy2uhcmRVHmK+e3vnM1v2 JLQ39V2u73PsNfC7Jt1anjaWalK7o8GWQBTLZr6jndCAS7juPaNu0oGw5G4k0VpvrN+6NX YF/xAG7OHUcffcHeqQqyOD3ZBkdLde+xJLlM1BbSjWi4pRSmcMffgOwphJrShw== 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 4WCKbN3DNPzyPd; Mon, 1 Jul 2024 08:54:08 +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 4618s8Xd036923; Mon, 1 Jul 2024 08:54:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618s8rN036920; Mon, 1 Jul 2024 08:54:08 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:54:08 GMT Message-Id: <202407010854.4618s8rN036920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: deb948cd8dc2 - releng/13.3 - Add UPDATING entries and bump the branch version. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: deb948cd8dc2efb341ce96e1b7a56c9fbc662ba1 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=deb948cd8dc2efb341ce96e1b7a56c9fbc662ba1 commit deb948cd8dc2efb341ce96e1b7a56c9fbc662ba1 Author: Philip Paeps AuthorDate: 2024-07-01 08:53:52 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:53:52 +0000 Add UPDATING entries and bump the branch version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 1c9d8acbde6d..cfeb99794e88 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240701: + 13.3-RELEASE-p4 SA-24:04.openssh + + Fix pre-authentication remote code execution in sshd [SA-24:04.openssh] + 20240619: 13.3-RELEASE-p3 EN-24:11.ldns EN-24:12.killpg diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 2e6012da6667..a98b62ded09e 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.3" -BRANCH="RELEASE-p3" +BRANCH="RELEASE-p4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Mon Jul 1 08:55:06 2024 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 4WCKcW1Bnmz5Pfwl; Mon, 01 Jul 2024 08:55:07 +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 4WCKcV5zRwz55Ly; Mon, 1 Jul 2024 08:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719824106; 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=KJWHmDXbD7VgYYDXxXFSuxmlT8PIbPRD8tYxXm1lls8=; b=MIvP/WcwrTizP/iQIGEkDjATRKdByDrSrsmzjYO9HkEJ6buYz/i7w/ijMBQH4nhlfR+ZMS Ft603mTwD25yTJzOgtFL3hZsCKr3qiL8ujZx9F316IBtw44PX1HuEYwJrnvzcj5FsdR6cb bAk5NEUDKmiySF8HuPCDm/WK3pefFIAl9mFZ+tbKcyfRRL2MMpG2YiAEu1xOTZ3hLpvswi g7qLsvjEbmz1HLvEkn4gd+e3BPtLiLJAY7i9DibOUA+NtrI9okVFqMquDS6oprXnfQaPlg GjAuiD533JBWlY+Jso/BBsJiaHs/kAvedftWTzo3jCLXmwsTU2OKUwbDX4WR4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719824106; a=rsa-sha256; cv=none; b=r24mwki/YayY55w9+CLVnn1LF7dFOJLEsoRkLviIAl1YSQMVd8WcOCouCDxTJSN49P9mLL kgVIP+3kGeNmtY147tF6SZFowe3z9TcHX0pmQYQamPMgUlHFXzdslqUoNIDDWkCN9iT5+T 889REbXJTRi09lpgmp4D+ZR8DV46mMV8UDJtuJXhEh0LqJ/boBostYK3anFMI4Ase4J7cC JrSj1cJMIvPzDbpPP+Ibkal+HlTZyZhLvG7zn+ZbMy3FvF1xNElXsMwEpadY9YeBh0qzKj ECFj4Kx2uCfkCmVWuqleRFOWktT9F386a/2xHW9lXa1xHR6oExICl36Ig6YobA== 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=1719824106; 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=KJWHmDXbD7VgYYDXxXFSuxmlT8PIbPRD8tYxXm1lls8=; b=YPmYsLsgBNzSy3X6uTB/3ogpw0f//jzuD8VaRpGRVcLwfNiwoG1Jr+yevOvnC9sKPipuWb tBbxbhzEJvZWHSithYEiTVqxWvQLk0T41uQOlHWU9s/fR6AzRSzMj3dkoFzCIhBbWa7ES7 zYtk0PFKjJMJVwCxaRRrDJizTCSgOKYvWNtnhJEXWJHOkGhXdSpcTx9Llv6mfa2qFMackE kF57dPKQ8D1YzN5RnpMrVf/MW9+rZWFkQzvE3lfo9iNMm8kV4bFMW7sUHw+XL2QTTGFFk1 ifE7vIIIIyiuss7cy+ZnvGjCmHgK3KQ/P9wUkhe0ZAKRLOsRVA/jOgfEhDqtJw== 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 4WCKcV5bgczxw9; Mon, 1 Jul 2024 08:55:06 +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 4618t6QH037196; Mon, 1 Jul 2024 08:55:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618t6ZQ037193; Mon, 1 Jul 2024 08:55:06 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:55:06 GMT Message-Id: <202407010855.4618t6ZQ037193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: f0cf0b8266ee - releng/13.2 - Add UPDATING entries and bump the branch version. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: f0cf0b8266eef39b13917f7bed808daf6d6a2d3e Auto-Submitted: auto-generated The branch releng/13.2 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=f0cf0b8266eef39b13917f7bed808daf6d6a2d3e commit f0cf0b8266eef39b13917f7bed808daf6d6a2d3e Author: Philip Paeps AuthorDate: 2024-07-01 08:54:52 +0000 Commit: Philip Paeps CommitDate: 2024-07-01 08:54:52 +0000 Add UPDATING entries and bump the branch version. Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 4f3424d33f8e..a8dfdbb4d87a 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240701: + 13.2-RELEASE-p12 SA-24:04.openssh + + Fix pre-authentication remote code execution in sshd [SA-24:04.openssh] + 20240327: 13.2-RELEASE-p11 SA-24:03.unbound EN-24:05.tty diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index b582ddf4343e..516e92c136fe 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.2" -BRANCH="RELEASE-p11" +BRANCH="RELEASE-p12" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Mon Jul 1 13:17:45 2024 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 4WCRRZ0t3gz5Mrwm; Mon, 01 Jul 2024 13:17:46 +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 4WCRRZ0MM0z4kcJ; Mon, 1 Jul 2024 13:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719839866; 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=izxDYYUkWOej6tLC76qxtxdbnXbct0rwGQoZDECBAg0=; b=JfsUtwwoB/aJzzU8utJXz9vRqN2FMSemWywXTBKBZfXXGdHtGHHMSRR+J1GpE3PwAzeb20 y0u+ydbzt6ywzKt/7/8D7jWHbmlhe9a6t5aUSulXES+CmLbjLb4KewOzS+XJ0MEYNnSHZ0 NYlXeajdCElJxXKuwFKDiv5cXtU458OKjMEE+Gq+YySol0hTGRvLTMHk1S4/fhRGM+A3+p PTAYH47zJkNvH3ZfMpwBxXojAYoDXczNv3hqTtq1ooBycTbtmG0HKHoxLsdNhOC94NPlkZ GfSW1ny0f2eHuW0CE4hRU1qPe8mJHCzpvvYclrCTf4RiGW7LF/fIGleRFRbkOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719839866; a=rsa-sha256; cv=none; b=R0vP1qlSqNe+O+cxBlcv0WsfTalHmaKEuVh350xuut5IBL4dxUri8RmplrzYHYeIL1C4Xd 23ofdJQeNlDCySjHBZqoHG8DJmRfJX0VPJcxPGDVaVdI/FGof5zWStVqI4cQl9u1xIeZrI /vEQn3ETkjSruzg6XbqvWhVbdfA+X5NAM6RnWObVIOfnhmpqijsrvgTzlfhMCkcr1dj6Vu AD2HIZYcvm4dSUOk6R41w/GOLtnC2DWRbeIi1VngM89Zz6QnSdiOLrCSqrKBT4+Jk1/K90 UX51Zj0hhXTAVJ7qFerppQaskWEedD7k0f1VND3cvmxWIxCD2Tu9smqeFPvDqg== 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=1719839866; 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=izxDYYUkWOej6tLC76qxtxdbnXbct0rwGQoZDECBAg0=; b=UGNT9tngeuqQmaQp17rCycxV+kddfCXcCYfN1Sne0QpBM9SLMRzdmR1aeJBVAahQf+WaGb fx3dBMdlOAJNt7VYSGgy/4QLn6B6U3e6X/SErNPIqCcV7Pi4V7q8zWctT2cnWyDwN5jGUh h/W49T/M2/nzM3CrKfSmhrfgvImbtdjw7OjiFvebTrAbR+FSHRkubMlddzRVcvf/JqKrX6 AXhcEE5ns/c7FgepibN2W2o98l1VDHZahDIe0xmss1HljJGKOog4pXJPkPOpjDfNUlDO4i mJc7KV0xEQ+V36hnfSKFnssWafx85HC66FkOFJDXvABiL9+vidRu0hBImDYyTQ== 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 4WCRRY6xvZz15ny; Mon, 1 Jul 2024 13:17:45 +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 461DHjcu076864; Mon, 1 Jul 2024 13:17:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461DHj4x076861; Mon, 1 Jul 2024 13:17:45 GMT (envelope-from git) Date: Mon, 1 Jul 2024 13:17:45 GMT Message-Id: <202407011317.461DHj4x076861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: 840d8e0c306a - stable/14 - amd64: add a func pointer to tlb shootdown function 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 840d8e0c306a7f127e4371f6c86213af5764c99b Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=840d8e0c306a7f127e4371f6c86213af5764c99b commit 840d8e0c306a7f127e4371f6c86213af5764c99b Author: Souradeep Chakrabarti AuthorDate: 2024-06-05 12:25:05 +0000 Commit: Wei Hu CommitDate: 2024-07-01 13:03:02 +0000 amd64: add a func pointer to tlb shootdown function Make the tlb shootdown function as a pointer. By default, it still points to the system function smp_targeted_tlb_shootdown(). It allows other implemenations to overwrite in the future. Reviewed by: kib Tested by: whu Authored-by: Souradeep Chakrabarti Co-Authored-by: Erni Sri Satya Vennela MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D45174 (cherry picked from commit bec000c9c1ef409989685bb03ff0532907befb4a) --- sys/amd64/amd64/mp_machdep.c | 27 ++++++--------------------- sys/vm/pmap.h | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index d506ffada4b9..91737637b714 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -102,13 +102,16 @@ void *bootpcpu; extern u_int mptramp_la57; extern u_int mptramp_nx; - +smp_targeted_tlb_shootdown_t smp_targeted_tlb_shootdown = &smp_targeted_tlb_shootdown_native; /* * Local data and functions. */ static int start_ap(int apic_id, vm_paddr_t boot_address); +void +smp_targeted_tlb_shootdown_native(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, + smp_invl_cb_t curcpu_cb, enum invl_op_codes op); /* * Initialize the IPI handlers and start up the AP's. */ @@ -497,24 +500,6 @@ start_ap(int apic_id, vm_paddr_t boot_address) * Flush the TLB on other CPU's */ -/* - * Invalidation request. PCPU pc_smp_tlb_op uses u_int instead of the - * enum to avoid both namespace and ABI issues (with enums). - */ -enum invl_op_codes { - INVL_OP_TLB = 1, - INVL_OP_TLB_INVPCID = 2, - INVL_OP_TLB_INVPCID_PTI = 3, - INVL_OP_TLB_PCID = 4, - INVL_OP_PGRNG = 5, - INVL_OP_PGRNG_INVPCID = 6, - INVL_OP_PGRNG_PCID = 7, - INVL_OP_PG = 8, - INVL_OP_PG_INVPCID = 9, - INVL_OP_PG_PCID = 10, - INVL_OP_CACHE = 11, -}; - /* * These variables are initialized at startup to reflect how each of * the different kinds of invalidations should be performed on the @@ -600,8 +585,8 @@ invl_scoreboard_slot(u_int cpu) * Function must be called with the thread pinned, and it unpins on * completion. */ -static void -smp_targeted_tlb_shootdown(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, +void +smp_targeted_tlb_shootdown_native(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, smp_invl_cb_t curcpu_cb, enum invl_op_codes op) { cpuset_t mask; diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index 65e909df9b8f..f438a1bd0883 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -169,6 +169,33 @@ void pmap_unwire(pmap_t pmap, vm_offset_t start, vm_offset_t end); void pmap_zero_page(vm_page_t); void pmap_zero_page_area(vm_page_t, int off, int size); +/* + * Invalidation request. PCPU pc_smp_tlb_op uses u_int instead of the + * enum to avoid both namespace and ABI issues (with enums). + */ +enum invl_op_codes { + INVL_OP_TLB = 1, + INVL_OP_TLB_INVPCID = 2, + INVL_OP_TLB_INVPCID_PTI = 3, + INVL_OP_TLB_PCID = 4, + INVL_OP_PGRNG = 5, + INVL_OP_PGRNG_INVPCID = 6, + INVL_OP_PGRNG_PCID = 7, + INVL_OP_PG = 8, + INVL_OP_PG_INVPCID = 9, + INVL_OP_PG_PCID = 10, + INVL_OP_CACHE = 11, +}; +typedef void (*smp_invl_local_cb_t)(struct pmap *, vm_offset_t addr1, + vm_offset_t addr2); +typedef void (*smp_targeted_tlb_shootdown_t)(pmap_t, vm_offset_t, vm_offset_t, + smp_invl_local_cb_t, enum invl_op_codes); + +extern void +smp_targeted_tlb_shootdown_native(pmap_t, vm_offset_t, vm_offset_t, + smp_invl_local_cb_t, enum invl_op_codes); +extern smp_targeted_tlb_shootdown_t smp_targeted_tlb_shootdown; + #define pmap_resident_count(pm) ((pm)->pm_stats.resident_count) #define pmap_wired_count(pm) ((pm)->pm_stats.wired_count) From nobody Mon Jul 1 13:17:46 2024 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 4WCRRb4Cy5z5Mrwn; Mon, 01 Jul 2024 13:17:47 +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 4WCRRb0TyWz4kYy; Mon, 1 Jul 2024 13:17:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719839867; 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=FrNtVCfSpSlH7YIZcA+s8BodQaR7uNQu55yX+00J0OM=; b=dpntpUaonEj6tkCYoLPouC0AKAgO7KgZ/AHo+skJmVZcp9220NAX1d2rWMUzoiGDJT6T67 gKypbIyKZ3Zv9WvZv011Or0S/p0CtDlAfelnyPXKQM63TUmKDmMeVj1fC2UwNQVZ0lRJJD caXXMtToUPeruHoDFEUdwCNIcsdqXAzUe4AgAV3sG/j/fDlLJjHs8gbczd2/VEM+qs2eVF vdqtg9fOGM20ZgtNwG5Ac8IiMSUuwa9UUEGIj+JcKPuH13HOoX8LnlV0zY2SjVILal+3LR +PDDU7ZwsKHujDPnJEGzzxTwqXyZiLnO10RdfjNQHXKYxaKD9DPuNerQ+rbyjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719839867; a=rsa-sha256; cv=none; b=xhaxTir7HJE1d/aSBzDYCuoczElkDHYqx4m+CjzG2qKoU6TolJCkHr28GxQBRlOMKld7pa iXmVdqix2JIh7vk+/FOK+xRGr+KiEzS9jlWaE6VdxhnDmt35WJXgONRljeSE9d206DhRpl bPeVK/kVlTukqvCSwkGm2oeeLI9uNoq2pxURZnUcd15tBoTlBvsX1MIahtIJatb1ziVd3M Id9S7/oi/pJtQrpZKbQ0w54Wv38/NDJ4wgpAs7sKuB04kzuXoGoy97rzx1/5zW2sivwO0i PCFJapA3G7LkF2/VfbVRSn1LJf+ETRPCnHc3oxLtK+Ss4Eh48YA5nYbYPOMQfA== 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=1719839867; 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=FrNtVCfSpSlH7YIZcA+s8BodQaR7uNQu55yX+00J0OM=; b=S+9hEgkUbHSDd/m9KW0Vas28WmQtCjyy4w3PPZYE+vm150FqpT1tGvxbhwpJjvv6WcAG9V jzxdfnyNXDGnCl1MO8iswR9aK4+VSZ93F4yyz44NxFyUazJ5REemWtPTS7XPjWREtomPi3 5tMGPNqPUZjIOX3Qc/kEjQfs7XVxv71uXYDyR0yap7mBy9LJI5UYSMy95Hlgy95lsFCfuW hWUHiVx4J2pF/lGnTAxjPu873D+61smMqJVelBg8YO9qn48k4m/xfiIWv36GnCAySo+HzL KwlwkX57VrTqyzrSjxmwsn4C6FHPbBa2elJs+c7Rj+rpyel4oSPHlCSqelJAMw== 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 4WCRRb05C9z15lj; Mon, 1 Jul 2024 13:17:47 +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 461DHkD4076950; Mon, 1 Jul 2024 13:17:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461DHk4U076947; Mon, 1 Jul 2024 13:17:46 GMT (envelope-from git) Date: Mon, 1 Jul 2024 13:17:46 GMT Message-Id: <202407011317.461DHk4U076947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: 7a3d7aec415e - stable/14 - pmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a3d7aec415e1850b1d459e86d381051cdb1315e Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=7a3d7aec415e1850b1d459e86d381051cdb1315e commit 7a3d7aec415e1850b1d459e86d381051cdb1315e Author: Konstantin Belousov AuthorDate: 2024-06-06 05:03:14 +0000 Commit: Wei Hu CommitDate: 2024-07-01 13:07:38 +0000 pmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h Fixes: bec000c9c1ef409989685bb03ff0532907befb4aESC Sponsored by: The FreeBSD Foundation (cherry picked from commit 9c5d7e4a0c02bc45b61f565586da2abcc65d70fa) --- sys/amd64/include/pmap.h | 27 +++++++++++++++++++++++++++ sys/vm/pmap.h | 27 --------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index bf531ab6ae56..506b28562bcc 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -545,6 +545,33 @@ pmap_get_pcid(pmap_t pmap) } #endif /* sys/pcpu.h */ +/* + * Invalidation request. PCPU pc_smp_tlb_op uses u_int instead of the + * enum to avoid both namespace and ABI issues (with enums). + */ +enum invl_op_codes { + INVL_OP_TLB = 1, + INVL_OP_TLB_INVPCID = 2, + INVL_OP_TLB_INVPCID_PTI = 3, + INVL_OP_TLB_PCID = 4, + INVL_OP_PGRNG = 5, + INVL_OP_PGRNG_INVPCID = 6, + INVL_OP_PGRNG_PCID = 7, + INVL_OP_PG = 8, + INVL_OP_PG_INVPCID = 9, + INVL_OP_PG_PCID = 10, + INVL_OP_CACHE = 11, +}; + +typedef void (*smp_invl_local_cb_t)(struct pmap *, vm_offset_t addr1, + vm_offset_t addr2); +typedef void (*smp_targeted_tlb_shootdown_t)(pmap_t, vm_offset_t, vm_offset_t, + smp_invl_local_cb_t, enum invl_op_codes); + +void smp_targeted_tlb_shootdown_native(pmap_t, vm_offset_t, vm_offset_t, + smp_invl_local_cb_t, enum invl_op_codes); +extern smp_targeted_tlb_shootdown_t smp_targeted_tlb_shootdown; + #endif /* _KERNEL */ /* Return various clipped indexes for a given VA */ diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index f438a1bd0883..65e909df9b8f 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -169,33 +169,6 @@ void pmap_unwire(pmap_t pmap, vm_offset_t start, vm_offset_t end); void pmap_zero_page(vm_page_t); void pmap_zero_page_area(vm_page_t, int off, int size); -/* - * Invalidation request. PCPU pc_smp_tlb_op uses u_int instead of the - * enum to avoid both namespace and ABI issues (with enums). - */ -enum invl_op_codes { - INVL_OP_TLB = 1, - INVL_OP_TLB_INVPCID = 2, - INVL_OP_TLB_INVPCID_PTI = 3, - INVL_OP_TLB_PCID = 4, - INVL_OP_PGRNG = 5, - INVL_OP_PGRNG_INVPCID = 6, - INVL_OP_PGRNG_PCID = 7, - INVL_OP_PG = 8, - INVL_OP_PG_INVPCID = 9, - INVL_OP_PG_PCID = 10, - INVL_OP_CACHE = 11, -}; -typedef void (*smp_invl_local_cb_t)(struct pmap *, vm_offset_t addr1, - vm_offset_t addr2); -typedef void (*smp_targeted_tlb_shootdown_t)(pmap_t, vm_offset_t, vm_offset_t, - smp_invl_local_cb_t, enum invl_op_codes); - -extern void -smp_targeted_tlb_shootdown_native(pmap_t, vm_offset_t, vm_offset_t, - smp_invl_local_cb_t, enum invl_op_codes); -extern smp_targeted_tlb_shootdown_t smp_targeted_tlb_shootdown; - #define pmap_resident_count(pm) ((pm)->pm_stats.resident_count) #define pmap_wired_count(pm) ((pm)->pm_stats.wired_count) From nobody Mon Jul 1 13:31:21 2024 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 4WCRlF4MSfz5MvKw; Mon, 01 Jul 2024 13:31:21 +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 4WCRlF3hd8z4mCx; Mon, 1 Jul 2024 13:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719840681; 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=LyKsKC6HT5VKChh8m/zPhzN21BwuwtoBGTrJdpvBdLk=; b=K+MiOJVgDGPzD5sDIukntnoEAZ0IDw3DxeP1QqdsjeDqhntyOb6pZb8qb3JK5036nYF82X F/1IL3aH3jAcrIzvgnh8eTMWE6OSGuezj9TjwlwO1D933sAdO0MIrqN2Y+CAeo3w3zhupb f57VF+JhuIt02npy9vikY2F8QsbTGld0kLBop7hcEh7D4JOvWnZgNozAi9TO3AVNQ7P3fG CDRVwkskJLWvsKllTugYape0GJcOgsOfHzy18vQbslKCFKHvYB9A7vLEchpzeeKFKgVwID gIIBUEjq6oo2kWV4T1aKuL/5fiyHGD2cypwY+Kkw8minB3Km/zWXUqolBIHCRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719840681; a=rsa-sha256; cv=none; b=yi0CRazIWPNVnMY4iQtt03pTOkWLiOBpuyULATsfWOwWgXpQkw4ZTqJP/UV4DLP52YbenX NFikMYPJFyex7Ao9tyO3Um1wjxWj9/z+nTenMziFaVnUc8z3/xB2uxI3TKaBeNSon0d1XM CNuBw45c6uhKTjygPJp8FGJZsb4rapZRO4foGcD7ivjMje9FqpE5XyC/9y+TTs1IWLPrS9 rxQYGWYnTzef/pJcTVDoYFbGXPu+Yj/5njsAgu3TIQBX3qIlGRNU8lcnJOo2Ect6r8+sv3 ayF2Y+Uygx8gWFq6yEA0KIksIHDorF8KXkUuNE+ygx4AIhKxMmNBz5EKyPTl2Q== 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=1719840681; 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=LyKsKC6HT5VKChh8m/zPhzN21BwuwtoBGTrJdpvBdLk=; b=CeCZpfB2WG6VPSrIPWgzik85Nyzp+diPNTsXouDllLrh1VP+ig7MHVqc/Rc8lZN/1jzLL3 9UthpOoSfjyvlIDWEZMKqwz8jlVqmCjp85zB0fpX/iKAnKE3Qg5ZL/BhqlI5TjuTaY0pY8 JckITcQ/M2hZwVedKSB1UWRG2WDP2LY13QxCfaRLHGNA+k1k/Nqya91EqdezyVU9J9/tQC zb8maUbwekpDmEKC75e2B0GsKokYh0F4GmDTxqG0651Zp0dfqxxN27w7p4TDfLz/42U7SA vdwG+SUESHBHGIN57xugzkKvfy1g1obtQJ6WZ3YCDufV44tPrZn7ErBton2rKw== 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 4WCRlF3JDsz16Sw; Mon, 1 Jul 2024 13:31:21 +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 461DVLoK004103; Mon, 1 Jul 2024 13:31:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461DVLhA004079; Mon, 1 Jul 2024 13:31:21 GMT (envelope-from git) Date: Mon, 1 Jul 2024 13:31:21 GMT Message-Id: <202407011331.461DVLhA004079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: 7ece5993b787 - stable/14 - Hyper-V: TLB flush enlightment using hypercall 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ece5993b7875fe7751ac7556c3f71b17120342b Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=7ece5993b7875fe7751ac7556c3f71b17120342b commit 7ece5993b7875fe7751ac7556c3f71b17120342b Author: Souradeep Chakrabarti AuthorDate: 2024-06-07 07:56:07 +0000 Commit: Wei Hu CommitDate: 2024-07-01 13:21:14 +0000 Hyper-V: TLB flush enlightment using hypercall Currently FreeBSD uses IPI based TLB flushing for remote TLB flushing. Hyper-V allows hypercalls to flush local and remote TLB. The use of Hyper-V hypercalls gives significant performance improvement in TLB operations. This patch set during test has shown near to 40 percent TLB performance improvement. Also this patch adds rep hypercall implementation as well. Reviewed by: whu, kib Tested by: whu Authored-by: Souradeep Chakrabarti Co-Authored-by: Erni Sri Satya Vennela MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D45521 (cherry picked from commit 2b887687edc25bb4553f0d8a1183f454a85d413d) --- sys/conf/files.amd64 | 5 +- sys/dev/hyperv/vmbus/hyperv.c | 63 ++++++++ sys/dev/hyperv/vmbus/hyperv_mmu.c | 309 ++++++++++++++++++++++++++++++++++++++ sys/dev/hyperv/vmbus/hyperv_mmu.h | 57 +++++++ sys/dev/hyperv/vmbus/hyperv_var.h | 11 ++ sys/dev/hyperv/vmbus/vmbus.c | 36 +++++ sys/dev/hyperv/vmbus/vmbus_var.h | 54 +++++++ sys/modules/hyperv/vmbus/Makefile | 4 +- 8 files changed, 535 insertions(+), 4 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 8a5e643913a3..1c0592009e93 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -133,8 +133,9 @@ dev/enic/vnic_intr.c optional enic dev/enic/vnic_rq.c optional enic dev/enic/vnic_wq.c optional enic dev/ftgpio/ftgpio.c optional ftgpio superio -dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv -dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv +dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv +dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv +dev/hyperv/vmbus/hyperv_mmu.c optional hyperv dev/iavf/if_iavf_iflib.c optional iavf pci \ compile-with "${NORMAL_C} -I$S/dev/iavf" dev/iavf/iavf_lib.c optional iavf pci \ diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index 3109030384a0..c66588e205d8 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -50,6 +51,7 @@ #include #include #endif +#include #include #include @@ -72,10 +74,12 @@ MSR_HV_GUESTID_OSID_FREEBSD | \ MSR_HV_GUESTID_OSTYPE_FREEBSD) + static bool hyperv_identify(void); static void hypercall_memfree(void); static struct hypercall_ctx hypercall_context; + uint64_t hypercall_post_message(bus_addr_t msg_paddr) { @@ -90,6 +94,65 @@ hypercall_signal_event(bus_addr_t monprm_paddr) HYPERCALL_SIGNAL_EVENT, monprm_paddr, 0); } +static inline int hv_result(uint64_t status) +{ + return status & HV_HYPERCALL_RESULT_MASK; +} + +static inline bool hv_result_success(uint64_t status) +{ + return hv_result(status) == HV_STATUS_SUCCESS; +} + +static inline unsigned int hv_repcomp(uint64_t status) +{ + /* Bits [43:32] of status have 'Reps completed' data. */ + return ((status & HV_HYPERCALL_REP_COMP_MASK) >> + HV_HYPERCALL_REP_COMP_OFFSET); +} + +/* + * Rep hypercalls. Callers of this functions are supposed to ensure that + * rep_count and varhead_size comply with Hyper-V hypercall definition. + */ +uint64_t +hv_do_rep_hypercall(uint16_t code, uint16_t rep_count, uint16_t varhead_size, + uint64_t input, uint64_t output) +{ + uint64_t control = code; + uint64_t status; + uint16_t rep_comp; + + control |= (uint64_t)varhead_size << HV_HYPERCALL_VARHEAD_OFFSET; + control |= (uint64_t)rep_count << HV_HYPERCALL_REP_COMP_OFFSET; + + do { + status = hypercall_do_md(control, input, output); + if (!hv_result_success(status)) + return status; + + rep_comp = hv_repcomp(status); + + control &= ~HV_HYPERCALL_REP_START_MASK; + control |= (uint64_t)rep_comp << HV_HYPERCALL_REP_START_OFFSET; + + } while (rep_comp < rep_count); + if (hv_result_success(status)) + return HV_STATUS_SUCCESS; + + return status; +} + +uint64_t +hypercall_do_md(uint64_t input_val, uint64_t input_addr, uint64_t out_addr) +{ + uint64_t phys_inaddr, phys_outaddr; + phys_inaddr = input_addr ? vtophys(input_addr) : 0; + phys_outaddr = out_addr ? vtophys(out_addr) : 0; + return hypercall_md(hypercall_context.hc_addr, + input_val, phys_inaddr, phys_outaddr); +} + int hyperv_guid2str(const struct hyperv_guid *guid, char *buf, size_t sz) { diff --git a/sys/dev/hyperv/vmbus/hyperv_mmu.c b/sys/dev/hyperv/vmbus/hyperv_mmu.c new file mode 100644 index 000000000000..13b1f52fa1f6 --- /dev/null +++ b/sys/dev/hyperv/vmbus/hyperv_mmu.c @@ -0,0 +1,309 @@ +/*- + * Copyright (c) 2009-2012,2016-2024 Microsoft Corp. + * Copyright (c) 2012 NetApp Inc. + * Copyright (c) 2012 Citrix Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include "hyperv_mmu.h" + +static inline int fill_gva_list(uint64_t gva_list[], + unsigned long start, unsigned long end) +{ + int gva_n = 0; + unsigned long cur = start, diff; + + do { + diff = end > cur ? end - cur : 0; + + gva_list[gva_n] = cur; + /* + * Lower 12 bits encode the number of additional + * pages to flush (in addition to the 'cur' page). + */ + if (diff >= HV_TLB_FLUSH_UNIT) { + gva_list[gva_n] |= PAGE_MASK; + cur += HV_TLB_FLUSH_UNIT; + } else if (diff) { + gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT; + cur = end; + } + + gva_n++; + + } while (cur < end); + + return gva_n; +} + + +inline int hv_cpumask_to_vpset(struct hv_vpset *vpset, + const cpuset_t *cpus, struct vmbus_softc * sc) +{ + int cpu, vcpu, vcpu_bank, vcpu_offset, nr_bank = 1; + int max_vcpu_bank = hv_max_vp_index / HV_VCPUS_PER_SPARSE_BANK; + + /* + * vpset.valid_bank_mask can represent up to + * HV_MAX_SPARSE_VCPU_BANKS banks + */ + if (max_vcpu_bank >= HV_MAX_SPARSE_VCPU_BANKS) + return 0; + + /* + * Clear all banks up to the maximum possible bank as hv_tlb_flush_ex + * structs are not cleared between calls, we risk flushing unneeded + * vCPUs otherwise. + */ + for (vcpu_bank = 0; vcpu_bank <= max_vcpu_bank; vcpu_bank++) + vpset->bank_contents[vcpu_bank] = 0; + + /* + * Some banks may end up being empty but this is acceptable. + */ + CPU_FOREACH_ISSET(cpu, cpus) { + vcpu = VMBUS_PCPU_GET(sc, vcpuid, cpu); + if (vcpu == -1) + return -1; + vcpu_bank = vcpu / HV_VCPUS_PER_SPARSE_BANK; + vcpu_offset = vcpu % HV_VCPUS_PER_SPARSE_BANK; + set_bit(vcpu_offset, (unsigned long *) + &vpset->bank_contents[vcpu_bank]); + if (vcpu_bank >= nr_bank) + nr_bank = vcpu_bank + 1; + } + vpset->valid_bank_mask = GENMASK_ULL(nr_bank - 1, 0); + return nr_bank; +} + + + + +void +hv_vm_tlb_flush(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, + enum invl_op_codes op, struct vmbus_softc *sc, smp_invl_local_cb_t curcpu_cb) +{ + cpuset_t tmp_mask, mask; + struct hyperv_tlb_flush *flush; + int cpu, vcpu; + int max_gvas, gva_n; + uint64_t status = 0; + uint64_t cr3; + + /* + * Hyper-V doesn't handle the invalidating cache. Let system handle it. + */ + if (op == INVL_OP_CACHE) + return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, + curcpu_cb, op); + + flush = *DPCPU_PTR(hv_pcpu_mem); + if (flush == NULL) + return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, + curcpu_cb, op); + /* + * It is not necessary to signal other CPUs while booting or + * when in the debugger. + */ + if (__predict_false(kdb_active || KERNEL_PANICKED() || !smp_started)) + goto local_cb; + + KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); + + /* + * Make a stable copy of the set of CPUs on which the pmap is active. + * See if we have to interrupt other CPUs. + */ + CPU_COPY(pmap_invalidate_cpu_mask(pmap), &tmp_mask); + CPU_COPY(pmap_invalidate_cpu_mask(pmap), &mask); + CPU_CLR(curcpu, &tmp_mask); + if (CPU_EMPTY(&tmp_mask)) + goto local_cb; + + /* + * Initiator must have interrupts enabled, which prevents + * non-invalidation IPIs that take smp_ipi_mtx spinlock, + * from deadlocking with us. On the other hand, preemption + * must be disabled to pin initiator to the instance of the + * pcpu pc_smp_tlb data and scoreboard line. + */ + KASSERT((read_rflags() & PSL_I) != 0, + ("hv_tlb_flush: interrupts disabled")); + critical_enter(); + flush->processor_mask = 0; + cr3 = pmap->pm_cr3; + + if (op == INVL_OP_TLB || op == INVL_OP_TLB_INVPCID || + op == INVL_OP_TLB_INVPCID_PTI || op == INVL_OP_TLB_PCID) { + flush->address_space = 0; + flush->flags = HV_FLUSH_ALL_VIRTUAL_ADDRESS_SPACES; + } else { + + flush->address_space = cr3; + flush->address_space &= ~CR3_PCID_MASK; + flush->flags = 0; + } + if(CPU_CMP(&mask, &all_cpus) == 0) { + flush->flags |= HV_FLUSH_ALL_PROCESSORS; + } else { + if (CPU_FLS(&mask) < mp_ncpus && CPU_FLS(&mask) >= 64) + goto do_ex_hypercall; + + CPU_FOREACH_ISSET(cpu, &mask) { + vcpu = VMBUS_PCPU_GET(sc, vcpuid, cpu); + if (vcpu >= 64) + goto do_ex_hypercall; + + set_bit(vcpu, &flush->processor_mask); + } + if (!flush->processor_mask ) + goto native; + } + max_gvas = (PAGE_SIZE - sizeof(*flush)) / sizeof(flush->gva_list[0]); + if (addr2 == 0) { + flush->flags |= HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY; + status = hypercall_do_md(HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE, + (uint64_t)flush, (uint64_t)NULL); + } else if ((addr2 && (addr2 -addr1)/HV_TLB_FLUSH_UNIT) > max_gvas) { + status = hypercall_do_md(HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE, + (uint64_t)flush, (uint64_t)NULL); + } else { + gva_n = fill_gva_list(flush->gva_list, addr1, addr2); + + status = hv_do_rep_hypercall(HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST, + gva_n, 0, (uint64_t)flush, (uint64_t)NULL); + + } + if(status) + goto native; + sched_unpin(); + critical_exit(); + return; + +local_cb: + critical_enter(); + curcpu_cb(pmap, addr1, addr2); + sched_unpin(); + critical_exit(); + return; +do_ex_hypercall: + status = hv_flush_tlb_others_ex(pmap, addr1, addr2, mask, op, sc); + if (status) + goto native; + sched_unpin(); + critical_exit(); + return; +native: + sched_unpin(); + critical_exit(); + return smp_targeted_tlb_shootdown_native(pmap, addr1, + addr2, curcpu_cb, op); +} + +uint64_t +hv_flush_tlb_others_ex(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, + const cpuset_t mask, enum invl_op_codes op, struct vmbus_softc *sc) +{ + int nr_bank = 0, max_gvas, gva_n; + struct hv_tlb_flush_ex *flush; + if(*DPCPU_PTR(hv_pcpu_mem) == NULL) + return EINVAL; + flush = *DPCPU_PTR(hv_pcpu_mem); + uint64_t status = 0; + uint64_t cr3; + + if (!(hyperv_recommends & HYPERV_X64_EX_PROCESSOR_MASKS_RECOMMENDED)) + return EINVAL; + + cr3 = pmap->pm_cr3; + if (op == INVL_OP_TLB) { + flush->address_space = 0; + flush->flags = HV_FLUSH_ALL_VIRTUAL_ADDRESS_SPACES; + } else { + + flush->address_space = cr3; + flush->address_space &= ~CR3_PCID_MASK; + flush->flags = 0; + } + + flush->hv_vp_set.valid_bank_mask = 0; + + flush->hv_vp_set.format = HV_GENERIC_SET_SPARSE_4K; + nr_bank = hv_cpumask_to_vpset(&flush->hv_vp_set, &mask, sc); + if (nr_bank < 0) + return EINVAL; + + /* + * We can flush not more than max_gvas with one hypercall. Flush the + * whole address space if we were asked to do more. + */ + max_gvas = (PAGE_SIZE - sizeof(*flush) - nr_bank * + sizeof(flush->hv_vp_set.bank_contents[0])) / + sizeof(flush->hv_vp_set.bank_contents[0]); + + if (addr2 == 0) { + flush->flags |= HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY; + status = hv_do_rep_hypercall( + HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX, + 0, nr_bank, (uint64_t)flush, (uint64_t)NULL); + } else if (addr2 && + ((addr2 - addr1)/HV_TLB_FLUSH_UNIT) > max_gvas) { + status = hv_do_rep_hypercall( + HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX, + 0, nr_bank, (uint64_t)flush, (uint64_t)NULL); + } else { + gva_n = fill_gva_list(&flush->hv_vp_set.bank_contents[nr_bank], + addr1, addr2); + status = hv_do_rep_hypercall( + HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX, + gva_n, nr_bank, (uint64_t)flush, (uint64_t)NULL); + } + return status; +} diff --git a/sys/dev/hyperv/vmbus/hyperv_mmu.h b/sys/dev/hyperv/vmbus/hyperv_mmu.h new file mode 100644 index 000000000000..e62948d74181 --- /dev/null +++ b/sys/dev/hyperv/vmbus/hyperv_mmu.h @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2009-2012,2016-2024 Microsoft Corp. + * Copyright (c) 2012 NetApp Inc. + * Copyright (c) 2012 Citrix Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _HYPERV_MMU_H_ +#define _HYPERV_MMU_H_ + +#include "vmbus_var.h" + +#define HV_VCPUS_PER_SPARSE_BANK (64) +#define HV_MAX_SPARSE_VCPU_BANKS (64) + + +struct hyperv_tlb_flush { + uint64_t address_space; + uint64_t flags; + uint64_t processor_mask; + uint64_t gva_list[]; +}__packed; + +struct hv_vpset { + uint64_t format; + uint64_t valid_bank_mask; + uint64_t bank_contents[]; +} __packed; + +struct hv_tlb_flush_ex { + uint64_t address_space; + uint64_t flags; + struct hv_vpset hv_vp_set; +} __packed; + +#endif diff --git a/sys/dev/hyperv/vmbus/hyperv_var.h b/sys/dev/hyperv/vmbus/hyperv_var.h index 67f6cc4ef706..62cce9026ab0 100644 --- a/sys/dev/hyperv/vmbus/hyperv_var.h +++ b/sys/dev/hyperv/vmbus/hyperv_var.h @@ -33,7 +33,18 @@ struct hypercall_ctx { void *hc_addr; vm_paddr_t hc_paddr; }; + uint64_t hypercall_post_message(bus_addr_t msg_paddr); uint64_t hypercall_signal_event(bus_addr_t monprm_paddr); +uint64_t hypercall_do_md(uint64_t input, uint64_t in_addr, + uint64_t out_addr); +struct hv_vpset; +struct vmbus_softc; +uint64_t +hv_do_rep_hypercall(uint16_t code, uint16_t rep_count, uint16_t varhead_size, + uint64_t input, uint64_t output); +int +hv_cpumask_to_vpset(struct hv_vpset *vpset, const cpuset_t *cpus, + struct vmbus_softc *sc); #endif /* !_HYPERV_VAR_H_ */ diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index 0ea401507b79..dc79d1745510 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -139,6 +139,8 @@ static void vmbus_event_proc_dummy(struct vmbus_softc *, int); static bus_dma_tag_t vmbus_get_dma_tag(device_t parent, device_t child); static struct vmbus_softc *vmbus_sc; +static void free_pcpu_ptr(void); +static void alloc_pcpu_ptr(void); SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V vmbus"); @@ -208,6 +210,9 @@ static driver_t vmbus_driver = { sizeof(struct vmbus_softc) }; +uint32_t hv_max_vp_index; +DPCPU_DEFINE(void *, hv_pcpu_mem); + DRIVER_MODULE(vmbus, pcib, vmbus_driver, NULL, NULL); DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, NULL, NULL); @@ -739,6 +744,7 @@ vmbus_synic_setup(void *xsc) int cpu = curcpu; uint64_t val, orig; uint32_t sint; + void **hv_cpu_mem; if (hyperv_features & CPUID_HV_MSR_VP_INDEX) { /* Save virtual processor id. */ @@ -748,6 +754,11 @@ vmbus_synic_setup(void *xsc) VMBUS_PCPU_GET(sc, vcpuid, cpu) = 0; } + if (VMBUS_PCPU_GET(sc, vcpuid, cpu) > hv_max_vp_index) + hv_max_vp_index = VMBUS_PCPU_GET(sc, vcpuid, cpu); + hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); + *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + 0ul, ~0ul, PAGE_SIZE, 0); /* * Setup the SynIC message. */ @@ -786,6 +797,16 @@ vmbus_synic_setup(void *xsc) WRMSR(MSR_HV_SCONTROL, val); } +#if defined(__x86_64__) +void +hyperv_vm_tlb_flush(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, + smp_invl_local_cb_t curcpu_cb, enum invl_op_codes op) +{ + struct vmbus_softc *sc = vmbus_get_softc(); + return hv_vm_tlb_flush(pmap, addr1, addr2, op, sc, curcpu_cb); +} +#endif /*__x86_64__*/ + static void vmbus_synic_teardown(void *arg) { @@ -820,6 +841,7 @@ vmbus_synic_teardown(void *arg) */ orig = RDMSR(MSR_HV_SIEFP); WRMSR(MSR_HV_SIEFP, (orig & MSR_HV_SIEFP_RSVD_MASK)); + free_pcpu_ptr(); } static int @@ -1373,6 +1395,16 @@ vmbus_probe(device_t dev) return (BUS_PROBE_DEFAULT); } + +static void free_pcpu_ptr(void) +{ + int cpu = curcpu; + void **hv_cpu_mem; + hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); + if(*hv_cpu_mem) + contigfree(*hv_cpu_mem, PAGE_SIZE, M_DEVBUF); +} + /** * @brief Main vmbus driver initialization routine. * @@ -1470,6 +1502,10 @@ vmbus_doattach(struct vmbus_softc *sc) smp_rendezvous(NULL, vmbus_synic_setup, NULL, sc); sc->vmbus_flags |= VMBUS_FLAG_SYNIC; +#if defined(__x86_64__) + smp_targeted_tlb_shootdown = &hyperv_vm_tlb_flush; +#endif + /* * Initialize vmbus, e.g. connect to Hypervisor. */ diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index 023d27c52cea..4f0668476716 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -32,6 +32,11 @@ #include #include +#include +#include +#include +#include + #include #include @@ -137,6 +142,40 @@ struct vmbus_softc { #define VMBUS_PCPU_GET(sc, field, cpu) (sc)->vmbus_pcpu[(cpu)].field #define VMBUS_PCPU_PTR(sc, field, cpu) &(sc)->vmbus_pcpu[(cpu)].field +#define HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE 0x0002 +#define HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX 0x0013 +#define HV_FLUSH_ALL_PROCESSORS BIT(0) +#define HV_FLUSH_ALL_VIRTUAL_ADDRESS_SPACES BIT(1) +#define HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY BIT(2) +#define HV_TLB_FLUSH_UNIT (4096 * PAGE_SIZE) + + +#define BIT(n) (1ULL << (n)) +#define BITS_PER_LONG (sizeof(long) * NBBY) +#define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1))) +#define BIT_WORD(nr) ((nr) / BITS_PER_LONG) +#define set_bit(i, a) \ + atomic_set_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i)) + +#define GENMASK_ULL(h, l) (((~0ULL) >> (64 - (h) - 1)) & ((~0ULL) << (l))) + +#define HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST 0x0003 +#define HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX 0x0014 +#define HYPERV_X64_EX_PROCESSOR_MASKS_RECOMMENDED BIT(11) +#define HV_HYPERCALL_RESULT_MASK GENMASK_ULL(15, 0) +#define HV_STATUS_SUCCESS 0 +#define HV_HYPERCALL_REP_COMP_MASK GENMASK_ULL(43, 32) +#define HV_HYPERCALL_REP_COMP_OFFSET 32 + +#define HV_HYPERCALL_VARHEAD_OFFSET 17 + +#define HV_HYPERCALL_REP_START_MASK GENMASK_ULL(59, 48) +#define HV_HYPERCALL_REP_START_OFFSET 48 + +enum HV_GENERIC_SET_FORMAT { + HV_GENERIC_SET_SPARSE_4K, + HV_GENERIC_SET_ALL, +}; struct vmbus_channel; struct trapframe; @@ -176,4 +215,19 @@ void vmbus_synic_setup1(void *xsc); void vmbus_synic_teardown1(void); int vmbus_setup_intr1(struct vmbus_softc *sc); void vmbus_intr_teardown1(struct vmbus_softc *sc); + +DPCPU_DECLARE(void *, hv_pcpu_mem); + +extern uint32_t hv_max_vp_index; + + +#if defined(__x86_64__) +void hyperv_vm_tlb_flush(pmap_t, vm_offset_t, + vm_offset_t, smp_invl_local_cb_t, enum invl_op_codes); +uint64_t hv_flush_tlb_others_ex(pmap_t, vm_offset_t, vm_offset_t, + cpuset_t, enum invl_op_codes, struct vmbus_softc *); +void hv_vm_tlb_flush(pmap_t, vm_offset_t, vm_offset_t, + enum invl_op_codes, struct vmbus_softc *, + smp_invl_local_cb_t); +#endif /* __x86_64__ */ #endif /* !_VMBUS_VAR_H_ */ diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile index 1659d5186493..9863f4db46ca 100644 --- a/sys/modules/hyperv/vmbus/Makefile +++ b/sys/modules/hyperv/vmbus/Makefile @@ -14,8 +14,8 @@ SRCS= hyperv.c \ vmbus_res.c \ vmbus_xact.c -.if ${MACHINE_CPUARCH} != "i386" && ${MACHINE_CPUARCH} != "aarch64" -SRCS+= vmbus_vector.S +.if ${MACHINE_CPUARCH} == "amd64" +SRCS+= vmbus_vector.S hyperv_mmu.c .endif .if ${MACHINE_CPUARCH} != "aarch64" SRCS+= vmbus_et.c hyperv_x86.c vmbus_x86.c From nobody Mon Jul 1 13:42:20 2024 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 4WCRzw53GLz5NhWg; Mon, 01 Jul 2024 13:42:20 +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 4WCRzw4WLnz4p0j; Mon, 1 Jul 2024 13:42:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719841340; 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=5Hnvt0PRaoYCX6GQwG84KjEs62R/qczp033yoDaLEhk=; b=qpOUL1aEIMtIY5EYLysaMSgcdy+i3jd8efEEpEKmwPUB5feqGUAvQsmThQyglQJgIynx4c D6GaXr4eSYFh4RH23Xt1ADT5cLHLPbLKs0ZiV0l2Vw1lJZyAIsETJnjiD+6JJwPYzIohB9 GxgZkFXZjs7fw7EcF/g27VEQaYcepRXbfnyFyLbCiyrTidUTBBlaZ7/cfpDJ6QM5Rc5Alo 11AL99edUFNzBBEHCipE2VBSIRSucDXG/ZN5vFa04QsYXSpl1qqEAMEba9cPAIZa8pzU4N MAv2sgTGMHIdYarrKBSL9TyFUaDdt9vk6osYDEMo99X74JyaO3azh8AJDGDqYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719841340; a=rsa-sha256; cv=none; b=uCivtsG06+ST4X1Zb/FSeT5tRyVG0NAFVoc+80FGYL83vRjAVIiykvYxGAbHb50AU6295j rEkmCcbTrhWHcLQ1pZwXjsCKHWsnEMF0DMs81y8oqSceSR8cZpxzH4ZynNlEvM+uE20EnJ HFq35leGI4oBYuxro1SxNZw2IgTD4/uRnLK0d+sVUQn63sKzAN3gTQw1s/g/5XHuVgPV38 LvKnKUBflKpXyhJtvQrQh2OS/K1B4K4gR7mUN8bYGqR0CLnwfDEsu7/8y6+o0Q7riH524+ kDJ/kOjlxlP4DkJeyvDj5hog1NSfGdIG+GojzndSyeE7RFLVBrEhNeWq6NgWjA== 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=1719841340; 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=5Hnvt0PRaoYCX6GQwG84KjEs62R/qczp033yoDaLEhk=; b=IA77ujGcoZupHZHzSHcO01EuXmpI29OKnXYAJbgoxGVk64y6/GaPfXZnxqJgTWqVp2ir/E yYuvVlrX42p8iNg2Smp7LzmD7NjTPpj4Qv6HJlrxy+uh56ExkrobYn17mmpJkR9SL10pQx uUzMH0ZGUdXxgBx+sXi9OD2Np2ofSgcvq0ms6y+ItYf5/kk2pmACBX10c/cUKzJb9FDg+v lWLbxF10Vtwz4r33RGREpsTpQVPLf9oqpgmgBg1eQIbPaaUCXq5fwIolbf4kTa4luRBg77 F0Py+lFeXKS2cED9VKfK9CtJDbPxJ9SenTw472GmqbXKA5uc7Ty13wUmDAQMNg== 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 4WCRzw47gvz16Bp; Mon, 1 Jul 2024 13:42:20 +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 461DgKNV026961; Mon, 1 Jul 2024 13:42:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461DgKTN026958; Mon, 1 Jul 2024 13:42:20 GMT (envelope-from git) Date: Mon, 1 Jul 2024 13:42:20 GMT Message-Id: <202407011342.461DgKTN026958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: 3c1f330088e7 - stable/14 - Hyper-V: remove unused alloc_pcpu_ptr() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3c1f330088e781ff166314030202919e57aa8e27 Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=3c1f330088e781ff166314030202919e57aa8e27 commit 3c1f330088e781ff166314030202919e57aa8e27 Author: Wei Hu AuthorDate: 2024-06-10 12:33:46 +0000 Commit: Wei Hu CommitDate: 2024-07-01 13:31:55 +0000 Hyper-V: remove unused alloc_pcpu_ptr() Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d Sponsored by: Microsoft (cherry picked from commit fd911ae609247ef5c91493fb5506e77aa6e497bc) --- sys/dev/hyperv/vmbus/vmbus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index dc79d1745510..51f9cfa05138 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -140,7 +140,6 @@ static void vmbus_event_proc_dummy(struct vmbus_softc *, static bus_dma_tag_t vmbus_get_dma_tag(device_t parent, device_t child); static struct vmbus_softc *vmbus_sc; static void free_pcpu_ptr(void); -static void alloc_pcpu_ptr(void); SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V vmbus"); From nobody Mon Jul 1 13:42:21 2024 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 4WCRzx6GMtz5Nhq4; Mon, 01 Jul 2024 13:42:21 +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 4WCRzx5Wt3z4ny3; Mon, 1 Jul 2024 13:42:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719841341; 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=UpUZfAHSCts0Nyd3yVoLGl0dGrYaNJHIumuUz3g+w/E=; b=UI5vCj7qVwntMbOffNBbsOwQWR+aX7H7YkuWvfXhXq79JOYfjm2DMEIq7Gc1GMA0uG3WQe FOFD33NGJ4qL8TzwLkzki2iH12bM3pEeT/x4KEcOhgZ793CfKUZ3E464yQpqZDb+2glOtI rflEBYAm1DO1Zwatj4prp1Bz0J2a2tcU5SU3SRmS2sRotb0TkpQ3gav2bqPJorXj7ooeQr wuVkrc36BpNvACHW375rgFzyfok31fut7s6GUYexo8pab4etJIkunQgMfMWVRnse/jvKl3 IpYeDjIUBKizZwF+HopBKYkOPyCTSt4TjWHt9R/6UmQpg1xaxqo8D3K+XG9oUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719841341; a=rsa-sha256; cv=none; b=C+f4lprfrHqHNbgkhYJdq1ieo+/zK/ndeLxAjTqqUnE1KqgcJfnH+FV1ybWgef29rEH0FJ GS08N1DmfqYNwkAAE0e9nhmfJ3TCqmS7D+OHmZUfu4BgwcZ+BUISwIcs81Lah8wtsfrg0r 4y+5VtNiGBxaSJnJqd0/F5FgzLq5zc/whhPl5jNXegCR8le+HAMpn1SHUUlrnGZ7n9iqsh gpp6Joz18F7Yns8IJA2tWqdi0nANubCcevavdyzbwUkVakTlVG1NqxlE3RRDnyxJwDDYre s6X+lFDlmk7KozDVJyHLsOLyBvCya7QJXaThLoF9YJQddxZfqxLvpXXizgBL4Q== 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=1719841341; 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=UpUZfAHSCts0Nyd3yVoLGl0dGrYaNJHIumuUz3g+w/E=; b=U8xL/NWGF0J152QBBcegvwoHVAMOUl4EcUzmYe5+IBqY0ibH+6KM9MOcQxna1050wE5LSr u4shKiQZqRYn19yikwMx0SX04dKcsgxpicf8V+mvOT47rfGS9NsOKroEYeJhi/aoIP7LDY AKeMqFisXMnHToyl5NJsF6tlM4InZOG2h4qa+GtADp04KhCzRFz6TtsHNoX9J4G93JXBeT /6zrAFbOvmClkivE25VEhu18lwv3Oxin2ez735ZnERiUf3g9KyIpv2w9HeRAZd3QQehPiJ hhWMgi5tTpzZfdcfk2x2+ju2UqvhuU+IKnItVOyh4ai7FWUdF+FNT/fxBnYzAQ== 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 4WCRzx57QDz16Bs; Mon, 1 Jul 2024 13:42:21 +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 461DgL84027015; Mon, 1 Jul 2024 13:42:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461DgLnB027012; Mon, 1 Jul 2024 13:42:21 GMT (envelope-from git) Date: Mon, 1 Jul 2024 13:42:21 GMT Message-Id: <202407011342.461DgLnB027012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: 451941677aba - stable/14 - Hyper_V: add a boot parameter to tlb flush hypercall 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 451941677aba763db6f4410517960a45f2128f90 Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=451941677aba763db6f4410517960a45f2128f90 commit 451941677aba763db6f4410517960a45f2128f90 Author: Wei Hu AuthorDate: 2024-06-11 10:05:21 +0000 Commit: Wei Hu CommitDate: 2024-07-01 13:32:37 +0000 Hyper_V: add a boot parameter to tlb flush hypercall Add boot parameter hw.vmbus.tlb_hcall for tlb flush hypercall. By default it is set to 1 to allow hyercall tlb flush. It can be set to 0 in loader.conf to turn off hypercall and use system provided tlb flush routine. The change also changes flag in the per cpu contiguous memory allocation to no wait to avoid panic happened some cases which there are no enough contiguous memery available at boot time. Reported by: gbe Tested by: whu MFC after: 1 week Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d Sponsored by: Microsoft (cherry picked from commit e02d20ddff7f9f9509b28095459327bc183dab8a) --- sys/dev/hyperv/vmbus/vmbus.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index 51f9cfa05138..786b2611dcd7 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -147,6 +147,13 @@ SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, static int vmbus_pin_evttask = 1; SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN, &vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU"); + +#if defined(__x86_64__) +static int hv_tlb_hcall = 1; +SYSCTL_INT(_hw_vmbus, OID_AUTO, tlb_hcall , CTLFLAG_RDTUN, + &hv_tlb_hcall, 0, "Use Hyper_V hyercall for tlb flush"); +#endif + uint32_t vmbus_current_version; static const uint32_t vmbus_version[] = { @@ -756,8 +763,19 @@ vmbus_synic_setup(void *xsc) if (VMBUS_PCPU_GET(sc, vcpuid, cpu) > hv_max_vp_index) hv_max_vp_index = VMBUS_PCPU_GET(sc, vcpuid, cpu); hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); - *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); + +#if defined(__x86_64__) + if (*hv_cpu_mem == NULL && hv_tlb_hcall) { + hv_tlb_hcall = 0; + if (bootverbose && sc) + device_printf(sc->vmbus_dev, + "cannot alloc contig memory for hv_pcpu_mem, " + "use system provided tlb flush call.\n"); + } +#endif + /* * Setup the SynIC message. */ @@ -1502,7 +1520,8 @@ vmbus_doattach(struct vmbus_softc *sc) sc->vmbus_flags |= VMBUS_FLAG_SYNIC; #if defined(__x86_64__) - smp_targeted_tlb_shootdown = &hyperv_vm_tlb_flush; + if (hv_tlb_hcall) + smp_targeted_tlb_shootdown = &hyperv_vm_tlb_flush; #endif /* From nobody Mon Jul 1 13:42:22 2024 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 4WCRzz3Qgfz5NhY3; Mon, 01 Jul 2024 13:42:23 +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 4WCRzy6Zgpz4nh8; Mon, 1 Jul 2024 13:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719841342; 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=cqn38eY2eZ7SRequ0t13x2U8stGyv/Y8rGP5yvYDcRc=; b=FDhD6iAz+UOKwx8k5edefxd9Pvw4JI9jhyCCVH5sIPvPwyzjSoUrK7j9L1nRz4VKIhhKAN Glw/K/Pi0DV1AIRHmBnBOqeuxU/fHtXFNDGJNk9LFbB/R5FNTA1VPhjgFfaNJMS+blOXi0 x3LN4+xGtc2yDTbOtK0xAsaccb4qwljEk2XN70rXgV8CZpL8FEN73PWNl19WHLiAxYOrxE GQlJ19VUcHo/gvFw4bFxqw2L+3j1ah2jS/mh1bNbluyfMdN7j5lCJqDIqZF+CkHIKgsLwp 3O3+JOFHJQM0SDSMOOOVau6n6ODHWNawQm+X5DuubSBiIcFbK+c+qiDN2KpIcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719841342; a=rsa-sha256; cv=none; b=w+ifT7vZWsHLI3Uw0MKkOOvJ/SM9tn5Zs7CPUp6sQPQowTyMCLVH8EHhtOI113owzRqF53 feMIr8xZJhcVmjd58A8qpxKIwZz1r1cFKJLntDoZU3o16VDC+cW7xmUG8mzYoiQbM/gX+t 8PeyVJHDVJ8XxOJ9Yj872zy2ZXlklMqJKwRdLkg/hefYzIzQc82nXURTjHbA4AeQFUOdFP C+FsoY+xjORwKA2Haxxk77Gd0g/HqvVBiVUkWyKVCVDNr5/lfM4DPQdD/TUF9vSeatOTac kHbRZ7Ekg7Noz8s0vC8Av/1kRdGjCiaaI3yJsQAdgZ08ks3SvXVfRm5aCW1EMg== 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=1719841342; 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=cqn38eY2eZ7SRequ0t13x2U8stGyv/Y8rGP5yvYDcRc=; b=mBYfvLXm9/oPjlYILXY4hl7HgLZfBghfJSoSjSgFl3pJTiasWSzRv5bpTWr7hSl5FsqL5K QGGLYpQmLrc4tXjMEG6XC2qEdKhm/Rlh16i1R9kshmO2YHqchJsdOFDjRePQMvX4qT/xOB CEBFoo2nXkBkf2bs/fHeze8i10P1D4kBZ+2YhxEhBsPTnF2Qe/hMQVYcqi8WBre6n3UZqe eFyhfnCP4UfGTqjVwOeZMlKMAq2RqaiNuNGGBUQIhNQNxntR9I3JrfjEBlT6YTbADTiVS3 KzHzq6O9OgdCH1owT3GzxdySScNWgzNoHW+70iI+Kff+HNQ+8CjyyaGg672PXA== 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 4WCRzy6B83z16Bt; Mon, 1 Jul 2024 13:42:22 +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 461DgMk6027075; Mon, 1 Jul 2024 13:42:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461DgM5r027072; Mon, 1 Jul 2024 13:42:22 GMT (envelope-from git) Date: Mon, 1 Jul 2024 13:42:22 GMT Message-Id: <202407011342.461DgM5r027072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: d56a912f2fb6 - stable/14 - Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d56a912f2fb6fb26a00e950a26e420729e6ef775 Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=d56a912f2fb6fb26a00e950a26e420729e6ef775 commit d56a912f2fb6fb26a00e950a26e420729e6ef775 Author: Wei Hu AuthorDate: 2024-06-15 14:07:58 +0000 Commit: Wei Hu CommitDate: 2024-07-01 13:33:08 +0000 Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous The allocation call could result in sleep lock violation if it is in smp_rendezvous. Move it out. Also move the pcpu memory pointer to vmbus_pcpu_data since it is only used on Hyper-V. PR: 279738 Reported by: gbe Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d MFC after: 2 weeks Sponsored by: Microsoft (cherry picked from commit d0cb4674df97aa638d5d17861c364b1625f79401) --- sys/dev/hyperv/vmbus/hyperv_mmu.c | 6 +-- sys/dev/hyperv/vmbus/vmbus.c | 88 +++++++++++++++++++++++++++++---------- sys/dev/hyperv/vmbus/vmbus_var.h | 5 ++- 3 files changed, 71 insertions(+), 28 deletions(-) diff --git a/sys/dev/hyperv/vmbus/hyperv_mmu.c b/sys/dev/hyperv/vmbus/hyperv_mmu.c index 13b1f52fa1f6..7c29fe294093 100644 --- a/sys/dev/hyperv/vmbus/hyperv_mmu.c +++ b/sys/dev/hyperv/vmbus/hyperv_mmu.c @@ -144,7 +144,7 @@ hv_vm_tlb_flush(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, curcpu_cb, op); - flush = *DPCPU_PTR(hv_pcpu_mem); + flush = *VMBUS_PCPU_PTR(sc, cpu_mem, curcpu); if (flush == NULL) return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, curcpu_cb, op); @@ -253,9 +253,9 @@ hv_flush_tlb_others_ex(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, { int nr_bank = 0, max_gvas, gva_n; struct hv_tlb_flush_ex *flush; - if(*DPCPU_PTR(hv_pcpu_mem) == NULL) + if(*VMBUS_PCPU_PTR(sc, cpu_mem, curcpu) == NULL) return EINVAL; - flush = *DPCPU_PTR(hv_pcpu_mem); + flush = *VMBUS_PCPU_PTR(sc, cpu_mem, curcpu); uint64_t status = 0; uint64_t cr3; diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index 786b2611dcd7..6a26527768c4 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -139,7 +139,10 @@ static void vmbus_event_proc_dummy(struct vmbus_softc *, int); static bus_dma_tag_t vmbus_get_dma_tag(device_t parent, device_t child); static struct vmbus_softc *vmbus_sc; -static void free_pcpu_ptr(void); +#if defined(__x86_64__) +static int vmbus_alloc_cpu_mem(struct vmbus_softc *sc); +static void vmbus_free_cpu_mem(struct vmbus_softc *sc); +#endif SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V vmbus"); @@ -217,7 +220,6 @@ static driver_t vmbus_driver = { }; uint32_t hv_max_vp_index; -DPCPU_DEFINE(void *, hv_pcpu_mem); DRIVER_MODULE(vmbus, pcib, vmbus_driver, NULL, NULL); DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, NULL, NULL); @@ -750,7 +752,6 @@ vmbus_synic_setup(void *xsc) int cpu = curcpu; uint64_t val, orig; uint32_t sint; - void **hv_cpu_mem; if (hyperv_features & CPUID_HV_MSR_VP_INDEX) { /* Save virtual processor id. */ @@ -762,19 +763,6 @@ vmbus_synic_setup(void *xsc) if (VMBUS_PCPU_GET(sc, vcpuid, cpu) > hv_max_vp_index) hv_max_vp_index = VMBUS_PCPU_GET(sc, vcpuid, cpu); - hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); - *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT | M_ZERO, - 0ul, ~0ul, PAGE_SIZE, 0); - -#if defined(__x86_64__) - if (*hv_cpu_mem == NULL && hv_tlb_hcall) { - hv_tlb_hcall = 0; - if (bootverbose && sc) - device_printf(sc->vmbus_dev, - "cannot alloc contig memory for hv_pcpu_mem, " - "use system provided tlb flush call.\n"); - } -#endif /* * Setup the SynIC message. @@ -858,7 +846,6 @@ vmbus_synic_teardown(void *arg) */ orig = RDMSR(MSR_HV_SIEFP); WRMSR(MSR_HV_SIEFP, (orig & MSR_HV_SIEFP_RSVD_MASK)); - free_pcpu_ptr(); } static int @@ -1412,15 +1399,41 @@ vmbus_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +#if defined(__x86_64__) +static int +vmbus_alloc_cpu_mem(struct vmbus_softc *sc) +{ + int cpu; -static void free_pcpu_ptr(void) + CPU_FOREACH(cpu) { + void **hv_cpu_mem; + + hv_cpu_mem = VMBUS_PCPU_PTR(sc, cpu_mem, cpu); + *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, + M_NOWAIT | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); + + if (*hv_cpu_mem == NULL) + return ENOMEM; + } + + return 0; +} + +static void +vmbus_free_cpu_mem(struct vmbus_softc *sc) { - int cpu = curcpu; - void **hv_cpu_mem; - hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); - if(*hv_cpu_mem) - contigfree(*hv_cpu_mem, PAGE_SIZE, M_DEVBUF); + int cpu; + + CPU_FOREACH(cpu) { + void **hv_cpu_mem; + hv_cpu_mem = VMBUS_PCPU_PTR(sc, cpu_mem, cpu); + if(*hv_cpu_mem != NULL) { + contigfree(*hv_cpu_mem, PAGE_SIZE, M_DEVBUF); + *hv_cpu_mem = NULL; + } + } } +#endif /** * @brief Main vmbus driver initialization routine. @@ -1511,6 +1524,25 @@ vmbus_doattach(struct vmbus_softc *sc) if (ret != 0) goto cleanup; +#if defined(__x86_64__) + /* + * Alloc per cpu memory for tlb flush hypercall + */ + if (hv_tlb_hcall) { + ret = vmbus_alloc_cpu_mem(sc); + if (ret != 0) { + hv_tlb_hcall = 0; + if (bootverbose) + device_printf(sc->vmbus_dev, + "cannot alloc contig memory for " + "cpu_mem, use system provided " + "tlb flush call.\n"); + + vmbus_free_cpu_mem(sc); + } + } +#endif + /* * Setup SynIC. */ @@ -1627,6 +1659,16 @@ vmbus_detach(device_t dev) smp_rendezvous(NULL, vmbus_synic_teardown, NULL, NULL); } +#if defined(__x86_64__) + /* + * Restore the tlb flush to native call + */ + if (hv_tlb_hcall) { + smp_targeted_tlb_shootdown = &smp_targeted_tlb_shootdown_native; + vmbus_free_cpu_mem(sc); + } +#endif + vmbus_intr_teardown(sc); vmbus_dma_free(sc); diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index 4f0668476716..4e0a769402d5 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -74,6 +74,9 @@ struct vmbus_pcpu_data { uint32_t vcpuid; /* virtual cpuid */ int event_flags_cnt;/* # of event flags */ struct vmbus_evtflags *event_flags; /* event flags from host */ +#if defined(__x86_64__) + void *cpu_mem; /* For Hyper-V tlb hypercall */ +#endif /* Rarely used fields */ struct taskqueue *event_tq; /* event taskq */ @@ -216,8 +219,6 @@ void vmbus_synic_teardown1(void); int vmbus_setup_intr1(struct vmbus_softc *sc); void vmbus_intr_teardown1(struct vmbus_softc *sc); -DPCPU_DECLARE(void *, hv_pcpu_mem); - extern uint32_t hv_max_vp_index; From nobody Mon Jul 1 14:04:17 2024 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 4WCSTF6MbVz5Np4R for ; Mon, 01 Jul 2024 14:04:17 +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 4WCSTF4XgQz4swN; Mon, 1 Jul 2024 14:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719842657; 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=3bXYrzRLVOGjBgvJ3XVx2pEZE0cfHuuUfLsRYbF044A=; b=pAcjxuHRUpZRsVePC+QIhcUszg2Ui836cUBbldo3rMai4ClrLQP77W02lA3sp30HFRT2dZ MWzOpKDdJEATQwGfHpwqUI1jwix8bkVq2DNx6coGPQgwAKWsCuTkbOQvdw6s0wiVFHlCYg ANENK0tFp1fzhUkT9FA6OOndglj9Ch2rJ+jFFT/NHBDy4NYP07qIgog67JzOLTVEsPGVRJ XiX4IkcHVRxsYyjO1l4XUIzn4s92yFcjX6JYdobYcgG6eS3DfltvPqC5lgFDQPe4F/cTlr TGfkISoMUPDSBGtnYgB7maRD1sBQw5nC4Jt1oDiYs7XbfJDg+uBoaB2EyDvMIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719842657; a=rsa-sha256; cv=none; b=LL8u2iHJbB0ieVGIuWP1JOZQgWIKcT2tsTwcvJEhwkbi9CTgzQNW6tM+Fvs2HjcD8NrfjZ hm4REV5lJlph9SDxyqbnjz5lop9xHt1czNqggGwziZiehozxX9YmjnFdYx9m+XRa1VnDQt NcgRFg+pjq2EtIpgMJnlP9K5063L3UIpSrvPaGYl49lHmZ/UZTM1rV8evRIagpvETo9SWG eQb8+Yy0fM10uWF7byI9hiuXEox6FkWclOnPsSFr1nFUOfOx2vIAzRAtduBt3BRE7worp8 SC4aMYLPXtvPkYIFIsa/xr/IDXfFTVjDN94/cJZKDPphrat3wJKpx4ST8Agm4g== 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=1719842657; 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=3bXYrzRLVOGjBgvJ3XVx2pEZE0cfHuuUfLsRYbF044A=; b=Otz3hgS8rIr1SmLpLKN5eqblkqFhkysmrwGUCGszhGT8m+8pa7nYKqf3vRLz02+L49IeJh wwjNkQeByaV9CkUJrIxLKBA03QO1VWA32rer8rnf+oyU92fX10Di3JBkG014anOjyvUnxn zmaNAsJnrNgeR18PvRjbzkOmhBBrH/19GTV/4cjtSOWaP0vyXobz0XR2ToiRsSXH6DWYGc 0WJzhc383Jjo/NLF81uPNU0daUCfeR85t47FJxa8Su406irYJQAW43fl5SxtB/b+pxfh/1 Y8Bhuh3PgYNB9cRj1sZXG71nZE/jdGwmaLbjd00qiFb25hDpkNye6+FvSMW7bA== 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 4WCSTF3r9kz17V8; Mon, 1 Jul 2024 14:04:17 +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 461E4HQG061853; Mon, 1 Jul 2024 14:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461E4HiT061852; Mon, 1 Jul 2024 14:04:17 GMT (envelope-from git) Date: Mon, 1 Jul 2024 14:04:17 GMT Message-Id: <202407011404.461E4HiT061852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 9200ce3210fd..d565364dadeb - vendor/openssh - vendor branch updated 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openssh X-Git-Reftype: branch X-Git-Commit: d565364dadebdaabef4ecead36ae102774e81174 X-Git-Oldrev: 9200ce3210fdc00706904d2eb2d8a481ed84eef3 X-Git-Newrev: d565364dadebdaabef4ecead36ae102774e81174 Auto-Submitted: auto-generated The branch vendor/openssh has been updated by emaste: URL: https://cgit.FreeBSD.org/src/log/?id=9200ce3210fd..d565364dadeb d565364dadeb Vendor import of OpenSSH 9.8p1 From nobody Mon Jul 1 14:04:22 2024 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 4WCSTL3Wttz5Np4c for ; Mon, 01 Jul 2024 14:04:22 +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 4WCSTL1hWrz4sk7; Mon, 1 Jul 2024 14:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719842662; 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=qcygq23G4fWVARV1od9u8sCmU11QeOdnCapO/ck/CUo=; b=wf3xVY9a9NyRwj6FUn816EMfYK2zEDJriebCHN8aZY59JWnvz527TgluUDFtVS6snc4LSX /MYRnS+/AdiZqs7gAk8Mng7Qzp0AFom10rC5b5YDS4irbxx3A7tb75k8eBJUJo0WtET+tV 9hxFj2fOAafImIuh58nAB66udKCIjxjGMWDDylsC+zPiSb/BLml96pixe9qqqNgs6UufZA Y2gvfuesHLDdCcAquUGIumhT2zDM31QahQwuE53i7j9rvD8RCG3mo404eftelPf8z33tgl P7F8C0lG31mGCjc+QcTx82ddneODkG591BysbnoSvr0Kgk8Rqb5tQubzj/KHlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719842662; a=rsa-sha256; cv=none; b=QdCaFrMkMMxJqFnKUp10iyQePkkGrXyVLA36saKDEYSXuvCuCDc0Af9Oxxlp2sYwfHW6hE jq7Azrg54KxS0KuZ4FOXSg31HzELp6w/ab9i8wRc1VInDu0tOxob6WHiqxsQwQEpott9J7 TXPlEtlsxeousbDf0qI27LgeQEqqAqXKMWUhAu6MNN0d34UaY56uIWFms620eRrVj78QzY lgh04cz2j6mi6Nrcyqq5b5WJVyiak86LrX6lxULU0F0oIfxIkeSsa0iQwrPkThl57HhBph +WSk7ztgcH6/sr9B/v7WYxa5bLyPZ0b8ftno25Sz+wODHGhZjCUVU0fZ5tlM/Q== 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=1719842662; 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=qcygq23G4fWVARV1od9u8sCmU11QeOdnCapO/ck/CUo=; b=WYPH5TcBx09HNTrq5VEHHfa1zEh3PveRqhxGJwP/5hjr/etN3IH/AjUrgfnaioAoqMVVS5 rHEjb6YObRjGWrt/TQ2J41tc6VBK73kDEd8RUT21WbhwpPBG71hK1SOIn3VndmaNz/kNzQ fdQFqmb0Gg73VeOg3Z1R405UYeUwsol6u25Wtot76VTBQKU8sClSOlR1Uob5X2XETq3nGk A31+CYQdey7jqfKR5BMJ3KDQ2tHcmoHDfJ86jyZbcOn6UG8F0iv0nixrxhZ9LGdfKwRDBT 1gJ2YmdihfORohvs8+vccamnpPLDuB3T4TxJ6AhKia8CcHoPw1MrnO2g55xAnA== 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 4WCSTL1HpTz17Pg; Mon, 1 Jul 2024 14:04:22 +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 461E4MUO061951; Mon, 1 Jul 2024 14:04:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461E4MBH061950; Mon, 1 Jul 2024 14:04:22 GMT (envelope-from git) Date: Mon, 1 Jul 2024 14:04:22 GMT Message-Id: <202407011404.461E4MBH061950@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 0424462190be - Create tag vendor/openssh/9.8p1 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/tags/vendor/openssh/9.8p1 X-Git-Reftype: annotated tag X-Git-Commit: 0424462190be695bb86ad0f03b6871425c440620 Auto-Submitted: auto-generated The annotated tag vendor/openssh/9.8p1 has been created by emaste: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/openssh/9.8p1 tag vendor/openssh/9.8p1 Tagger: Ed Maste TaggerDate: 2024-07-01 14:03:47 +0000 Tag OpenSSH 9.8p1 commit d565364dadebdaabef4ecead36ae102774e81174 Author: Ed Maste AuthorDate: 2024-07-01 14:01:36 +0000 Commit: Ed Maste CommitDate: 2024-07-01 14:01:36 +0000 Vendor import of OpenSSH 9.8p1 From nobody Mon Jul 1 15:24:59 2024 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 4WCVGM4G6tz5P85K; Mon, 01 Jul 2024 15:24:59 +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 4WCVGM3hCWz46YV; Mon, 1 Jul 2024 15:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719847499; 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=SguJh6odm78mKbLmNZWQ6uxurnZwCN0Ww7Xc/cDZK9A=; b=Iwkq4z2E8zNEz+eNg9ffZgjsSBD+/8PqEgMbgKttyN80oM1qgksPAt2k50/moeRYy+pvcF FZMyFIOSLiUbxzesEWHCxO6XrwA3OYxik9IDNyfV6OSxoV8xLpmWiItjNIgxvp/zxnn94y 6QvP3XZevYqRw26amlUZ+vh5AGlIAE3NSuNPI3WIKRZKAW2Bcwjo8V4Pywo47dCcJaWO/y mXpChiGT4wM/N2ni+XSEglB0m5LSBNLtCHacqt/3B86GFSh6CNA9geyjViBSoSxtKku/9b l6K0Lwcxw73nKDUBhMkQd0p6rrF/7demWahwoS3uBM5dZ92R6YENgMUF/WF3Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719847499; a=rsa-sha256; cv=none; b=GDlTaFZ3sdK1sGETllSX3/F6GZ59KpHDqhFZ+ToEp6j+tqusjmwFJxlGkWimilUPE+O2B4 gMC3BVgjCSAvV0A9xYDg4ZQqNvNgBUxN46sOypUsv5dNd97jY+eftoOddxgbJNfXOGTEJR oNOw40qbfxF/+JJYbvaX2sGdhWIalJ3j8qW6wzxPj/cgDaVNxJCdBhKvPzN+MZI+o2QLEL HNdRAp+2RjPXdXqv1/z50psIBmZ9KaAYQKlgNqt/0nRGGpI42kgZwcL9JR/RW6c49RUBFG 3zykjVOuFyDOZO7FNZj9ya8If0Xa1UJlzWB81XUwZ7V1kSlA39jKnumKpBatew== 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=1719847499; 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=SguJh6odm78mKbLmNZWQ6uxurnZwCN0Ww7Xc/cDZK9A=; b=SFOt5YNfEZYOLu3B0uao8k/784miGU8XRKI0avvgOc8MeTNahbvdBTTOJeUxeS82QcEp00 LA91+fgC50SG0KTVIofvcLwLw8xOORo0OO29TfPkwyLTNOznyB8ksNKFmpjbywpImIeegj dfYT1PpnpORLeUQYSVgewJEPFvEkQMXHiST0Zv9EhHdrmVz0N6uIU7EkWCc4uIJelhL5L6 5ihEwKPWZYL0k+ZgszE1mRMTQn6mNJKANE0hypBLCLlP684IeHJ3Qr3vSVxDvEfbmLOfcj EP6kqDxN8QWP27cbdGffeg0NfyoHpJWHnubNTYVqw0WPyTRdX2/7o2Jfv7It9g== 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 4WCVGM3DqBz19Dc; Mon, 1 Jul 2024 15:24:59 +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 461FOxxK096785; Mon, 1 Jul 2024 15:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 461FOxsL096782; Mon, 1 Jul 2024 15:24:59 GMT (envelope-from git) Date: Mon, 1 Jul 2024 15:24:59 GMT Message-Id: <202407011524.461FOxsL096782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: f8a46de2dd48 - main - bluetooth socket sysinit: correct memset initialization 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8a46de2dd481da2bf69747551db30ea453490d5 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=f8a46de2dd481da2bf69747551db30ea453490d5 commit f8a46de2dd481da2bf69747551db30ea453490d5 Author: Ryan Libby AuthorDate: 2024-07-01 15:22:31 +0000 Commit: Ryan Libby CommitDate: 2024-07-01 15:22:31 +0000 bluetooth socket sysinit: correct memset initialization gcc -Wmemset-elt-size diagnosed this. The code was only initializing the first 1/sizeof(long) bytes. On 64-bit systems, this would mean only events up to 0x20 were initialized. This effectively reverses the security policy for some events with higher ids, now permitting them on unprivileged sockets. Two that are defined are NG_HCI_EVENT_LE (0x3e) and NG_HCI_EVENT_BT_LOGO (0xfe). PR: 280039 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45707 --- sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c index b8caf0c515fd..b123322b33aa 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c @@ -808,8 +808,7 @@ ng_btsocket_hci_raw_init(void *arg __unused) /* Enable all events */ memset(&ng_btsocket_hci_raw_sec_filter->events, 0xff, - sizeof(ng_btsocket_hci_raw_sec_filter->events)/ - sizeof(ng_btsocket_hci_raw_sec_filter->events[0])); + sizeof(ng_btsocket_hci_raw_sec_filter->events)); /* Disable some critical events */ f = ng_btsocket_hci_raw_sec_filter->events; From nobody Mon Jul 1 21:08:53 2024 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 4WCdvB20Fmz5Q4SN; Mon, 01 Jul 2024 21:08:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCdvB1Lq0z3ynw; Mon, 1 Jul 2024 21:08:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719868134; 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: in-reply-to:in-reply-to:references:references; bh=UYGxo8pShentPbfGWu9Ib60T/h38tjVNo85g5w44NQ0=; b=JaGH3kJpGKRM5kDG+5hFdm/IVU9VIz5hxNuHap3zI1NJSsulIpEY6n/jh/1133OEgHsJhG EAJ9SKnUuOEkYVQ8XJQ+m4kiH5jCBA6Y4WMDwdFebfeR225K3bkb/pF5FRns4wjQW1XZqR h91QI5RD0oxVlY1rK0IRNM8DGe+ZSECoSe+GtEu7jfLNljfdFbBNb62fEUzbWtdhGONoDq zNh4xeGHEErO8JL+rcbbUiMhZ2mjzWEsQRi9CprFznYVsF1aGXUb8bhdrJAklu4zwUDoMt NeWhYfG44G2VCIpuFrik1SgD6D9ulyf/SuHhRlzWZaRpBzkLSrm6aVodl4VKzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719868134; a=rsa-sha256; cv=none; b=xPhrWdfhAVk5OTIyEjtW5v6PbAi7GWHKmWVujCtr/eSuqsUcD8C8w9CEZ0aMd8MKDhyFO+ wXGeVbb4uRk4JIsTr4Ey5y/4hDUzkxRvPKAn6khmgAWiUtPiE3vh4W8f06cqhU9cQqCRM4 UuMCxp04+TzJsyRYZLryzH9X1zCTbjgcIydUJXGBaGzNICTO3N9gF/hXxgAFu+R5cri5W1 CKs7v3s0LIjZNSzmhUjP0fVBH7sP/HEfu38ronYSsP6dXDJfRq78nv8LbrnDY2RmwaOMA2 dUMRnCgIO/xtvaTpoVDaLUgzyzW1E78j9VNcaU05bD8+OMkIbtrTQGzI2thAJQ== 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=1719868134; 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: in-reply-to:in-reply-to:references:references; bh=UYGxo8pShentPbfGWu9Ib60T/h38tjVNo85g5w44NQ0=; b=hcTIjBaHGFmeKUmvKOjw07lgSiOKkDOgw4fTbNSdOSX9TnsbjAp/r23KhAkmQly9WRhvm8 L4hVWZkJFEzlkcUPanva/i41beIWh+rkbP3SJok6YDWnT2PEmUj4JlvKvArj/i2ZiTMG1Y xaxCePimGBiwS8hAqZkg+xeKrmtE7B0oMPub1x3uom2ilD+3r1In6lE8ZP2kleV7qmEBHc 5msOmDjf/8qrIrj9b0a9K2aGcfsUmLAmweeNXX7P9mb8kaZ1udaQCxYVBHJp1etDnqQZX2 fJnewau6lRaevt49CCXw39NOiDfwjFaHB5w2MUHhp9/iX7qLK2LqtOcysQU6Sw== Received: from [IPV6:2601:5c0:4200:b830:198e:c253:cce:4f0] (unknown [IPv6:2601:5c0:4200:b830:198e:c253:cce:4f0]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WCdv96Zt0zWrR; Mon, 1 Jul 2024 21:08:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 1 Jul 2024 17:08:53 -0400 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: edbd489d09ba - main - ctladm: don't require the use of "-p" with "port -r" Content-Language: en-US To: Alan Somers , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406101601.45AG1jSb001516@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202406101601.45AG1jSb001516@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/10/24 9:01 AM, Alan Somers wrote: > The branch main has been updated by asomers: > > URL: https://cgit.FreeBSD.org/src/commit/?id=edbd489d09babebdc6c03924a912013be584c409 > > commit edbd489d09babebdc6c03924a912013be584c409 > Author: Alan Somers > AuthorDate: 2024-06-06 19:14:43 +0000 > Commit: Alan Somers > CommitDate: 2024-06-10 16:01:25 +0000 > > ctladm: don't require the use of "-p" with "port -r" > > When removing a port, the ioctl frontend requires the "-p" argument. > But other frontends, like cfiscsi, do not. So don't require that > argument in the ctladm command. The frontend driver will report an > error if any required argument is missing. > > MFC after: 2 weeks > Sponsored by: Axcient > Reviewed by: mav > Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 > --- > sys/cam/ctl/ctl_frontend_ioctl.c | 2 +- > usr.sbin/ctladm/ctladm.8 | 3 +-- > usr.sbin/ctladm/ctladm.c | 10 +++------- > usr.sbin/ctladm/tests/port.sh | 28 +++++++++++++++++++++++----- > 4 files changed, 28 insertions(+), 15 deletions(-) > > diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c > index 14951797ddf1..46b7b88547dd 100644 > --- a/usr.sbin/ctladm/ctladm.c > +++ b/usr.sbin/ctladm/ctladm.c > @@ -580,11 +580,6 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) > break; > } > case CCTL_PORT_MODE_REMOVE: > - if (targ_port == -1) { > - warnx("%s: -r requires -p", __func__); > - retval = 1; > - goto bailout; > - } > /* FALLTHROUGH */ Should we just remove the FALLTHOUGH now? > case CCTL_PORT_MODE_CREATE: { > bzero(&req, sizeof(req)); > diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh > index 1f2c9aaed5c1..139e1a7d29a0 100644 > --- a/usr.sbin/ctladm/tests/port.sh > +++ b/usr.sbin/ctladm/tests/port.sh > @@ -37,8 +37,6 @@ cleanup() { > ;; > "iscsi") > TARGET=`awk '/target:/ {print $2}' port-create.txt` > - # PORTNUM is ignored, but must be set > - PORTNUM=9999 > ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET You still use PORTNUM here even though you don't define it? > ;; > esac -- John Baldwin From nobody Mon Jul 1 21:49:12 2024 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 4WCfnj3hWGz5QC1L; Mon, 01 Jul 2024 21:49:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCfnj31zPz44Nx; Mon, 1 Jul 2024 21:49:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719870553; 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: in-reply-to:in-reply-to:references:references; bh=Wf2TaSpVrvwuzbPk1y4gUuAcr/aR62B67Z9yO7DHfAc=; b=IhjvSzr7JmmrKYehdPnbl8ViveHHlhQkGcNk+7pB3yUWNlDEzbA58B9bf70Uy9BTRcz3cF wNAe80GiFdn6n+8oeki7F6TtFxkdHv/6rT1JJ/3eZVHgysLLKcEbApgJRXOHCckWAplAww V81kmHP/47KhoYGuicmMrXq83sga/VRKMttqVf3dNYsNpq0a3KpuoFZfjsKkYXkX7iiA/t +gFrREP2ckqriWv9HFT8g0kAuQnsthPtkwLDAD5O8EaXZUJmw1BnzhRYT/SNvgW0nXh3vZ q0OdTZoDbdBPcaZX7XS8eg/ZFDJkZlOyquk4J/IS7M9ZKwICANHMdPlg+OGCoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719870553; a=rsa-sha256; cv=none; b=hRpoieE29Ip7pDE4M46FWUrMBxkoAzCrW4SZxRK3MjejQeaaLRW5q7tWvjKlVkSPu5VZ/K i5Ve3/ydchszP8juXAcSolHiq2kS45b6lKbajcW30rmAO8le7CA46INIlxfTmuanBiAoSX N+Lca4dSdcobgmUwTHpa9ePdAdvc5WoTImaJAbthJHSzJYLbixyjWw5zywTsYrJBpPGnUK BzdI9HdemuSGTjfSnGtsFHO0WAd/qrnbDeQE7mapZGmbS2edDaFX8nhiYF524ZGTew26Q0 krO9n9Z68Yc4vzb0nAAkhKjYTJ5EBeJkv/YgSLmmarHtychDXsiyIccC8mItMA== 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=1719870553; 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: in-reply-to:in-reply-to:references:references; bh=Wf2TaSpVrvwuzbPk1y4gUuAcr/aR62B67Z9yO7DHfAc=; b=iS1jpNwF3V39V2G1Fx6WR/jARvHD2QkR+gBA3kdWsVGNpXU36j7UvRv2OQXh232j5Lky29 KT5Zkl0vo8mbv+q27UDjMV9FGFeoeDamvUFOiHQQFOukpFMVMiFfEvRez08IFyw6bqF+pl F9TXe6X9vCxSYYJtRHf3jMEk25BdLOeuecdGAfrptrZfvdQk2Dh6JqZmLY0X3qJVvFP5Lw gAdwGJ8wU74I+BRIgiN1cUQfzFW89rCYJ4SlAkC0+Z1U/7gbO0ftxgf4Nv2DLSPxfBkeGJ OWMkejRKrytK9LEKwm9vuTcw+EqrFWfgrcwKMkpzY24wJBT9KaBkFtVKghGlSA== Received: from [IPV6:2601:5c0:4200:b830:198e:c253:cce:4f0] (unknown [IPv6:2601:5c0:4200:b830:198e:c253:cce:4f0]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WCfnj17W2zWHW; Mon, 1 Jul 2024 21:49:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <7ca0ab94-4d5e-405e-b178-84ef3d8ebc8d@FreeBSD.org> Date: Mon, 1 Jul 2024 17:49:12 -0400 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 2508372b7b46 - main - cdefs.h: Assume the compiler supports at least GNU C 3.0 extensions Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406210241.45L2fNU2056962@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202406210241.45L2fNU2056962@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/20/24 7:41 PM, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2508372b7b46117a9fb801b50624265d30888442 > > commit 2508372b7b46117a9fb801b50624265d30888442 > Author: Warner Losh > AuthorDate: 2024-06-20 23:02:42 +0000 > Commit: Warner Losh > CommitDate: 2024-06-21 02:41:08 +0000 > > cdefs.h: Assume the compiler supports at least GNU C 3.0 extensions > > All compilers that can build FreeBSD binaries (as opposed to the entire > system) support at least gcc 9 (gcc, clang, tcc). Even pcc supports most > of the gcc 4.3 attributes. Make this file simpler by removing support > for pre-3.0 compilers. > > Reviewed by: brooks > Differential Revision: https://reviews.freebsd.org/D45653 > Sponsored by: Netflix > --- > sys/sys/cdefs.h | 79 +-------------------------------------------------------- > 1 file changed, 1 insertion(+), 78 deletions(-) > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 476c89d1dddb..88019819eb35 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -389,45 +367,10 @@ > */ > #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901 > #define __restrict restrict > -#elif !__GNUC_PREREQ__(2, 95) > -#define __restrict > #endif > > -/* > - * GNU C version 2.96 adds explicit branch prediction so that > - * the CPU back-end can hint the processor and also so that > - * code blocks can be reordered such that the predicted path > - * sees a more linear flow, thus improving cache behavior, etc. > - * > - * The following two macros provide us with a way to utilize this > - * compiler feature. Use __predict_true() if you expect the expression > - * to evaluate to true, and __predict_false() if you expect the > - * expression to evaluate to false. > - * > - * A few notes about usage: > - * > - * * Generally, __predict_false() error condition checks (unless > - * you have some _strong_ reason to do otherwise, in which case > - * document it), and/or __predict_true() `no-error' condition > - * checks, assuming you want to optimize for the no-error case. > - * > - * * Other than that, if you don't know the likelihood of a test > - * succeeding from empirical or other `hard' evidence, don't > - * make predictions. > - * > - * * These are meant to be used in places that are run `a lot'. > - * It is wasteful to make predictions in code that is run > - * seldomly (e.g. at subsystem initialization time) as the > - * basic block reordering that this affects can often generate > - * larger code. > - */ > -#if __GNUC_PREREQ__(2, 96) > #define __predict_true(exp) __builtin_expect((exp), 1) > #define __predict_false(exp) __builtin_expect((exp), 0) > -#else > -#define __predict_true(exp) (exp) > -#define __predict_false(exp) (exp) > -#endif I think the comment was worth keeping around. You just need to modify the start of it to "Modern compilers include explicit branch prediction..." In particular, I think our current practice is still to apply prediction hints rather conservatively. -- John Baldwin From nobody Mon Jul 1 21:53:09 2024 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 4WCftG1ds8z5QCXR; Mon, 01 Jul 2024 21:53:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCftF6Xl1z45X7; Mon, 1 Jul 2024 21:53:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719870789; 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: in-reply-to:in-reply-to:references:references; bh=AtOkBmnVaU4pD2ESbEIigjZO+nEKEPOZpblcqeqlrv4=; b=jC5UQ/1EHmwfPbHbi3oT3ZuPGshzgGG3f1ZsLE7veFahMFc2c07/btb6UwBKQrkDol5zHi UPAMjsnhJ6so7Cy37qiWa9mblsUJh8HmTBln/CirNQuJEx90gcWLal6LnNa64ZsJVV3Kvz 9F9jRTBtB75E4/DMMxqjXXRm1KM5oSPkhUVQXQFCyFRRXGSgQ64n8YlHRZ4Zfr5YqeiF0g pv+o5eABF5IqgU2CeFZG2XCn/jH8YmWbtpCi4UqBuXB9yXb507SGqOMoxacVH7xIyO/Amx noyM3iovjqLr94LCv7NyuyGk2MMPxajCnAI6v6aX1V7tySFp4xBK7OWCrHMpSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719870789; a=rsa-sha256; cv=none; b=SXjgj4PmkytMczZoDCaCz/NaKSHXRRmMxify+bam4gt+Hk4LtJfRkI7YT19/QwK0munLjw L70UjnoPlA269xtQIkKJ5NZ6mO3gglyeF7oLfdowPBWQBlIJ+Izc01clVRRBiZmOWwvTry UcpN7G1dmhDLJxcbvC6jq1+XTdoKwpXPcBuxtn9Klzs2C2CyYxRrO6dR6KHmNVr7v07V8A Tas+OQC0UCo8M6B7NNJx/nFrJw7mq8J6v1PDduJZWTk9LMZog/GDxz93rgW0ag54C39W0j 6h9Puaa0Uf73VdcGt+5zYOOWpvaAeCENurhaXhWOyxhpccCAnT5a73v2zw8GGw== 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=1719870789; 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: in-reply-to:in-reply-to:references:references; bh=AtOkBmnVaU4pD2ESbEIigjZO+nEKEPOZpblcqeqlrv4=; b=uYTx2tKfENRdmV6oyNvU7V5zqJTnlDqUErXfhFB/oDvex25zAy5Blb3/YeEFWXZtAXEfqz tOx0N7d4ZTHUh/yOVREZxAKWbKHJ0NXf0dceT6QS5LpTmeYQYZW+0XuSBBAEyjwRWuxLuy jHGsI5rgxOAD7erIvIGWB1PlhN5tTkHmPf4YKrD+ihjrmKBhz7iVMQrZasl8XQzZX83f/f AVfy0uQ7VuHgwBtHLP/6yRf09hyJdShM+NwDehN0SBtiir1+gSBEwDHS5khbwXsA5KC2bC Sy70m13wpJVeEMUZd9rDA7A8j0W9eVnqER3/pZWC789g4g8L3wIxZzGEhVnjCw== Received: from [IPV6:2601:5c0:4200:b830:198e:c253:cce:4f0] (unknown [IPv6:2601:5c0:4200:b830:198e:c253:cce:4f0]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WCftF4fRfzWHd; Mon, 1 Jul 2024 21:53:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> Date: Mon, 1 Jul 2024 17:53:09 -0400 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/20/24 7:41 PM, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=67d1a1cd9e772e2ef94003579f4fbc271d38be7d > > commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d > Author: Warner Losh > AuthorDate: 2024-06-20 23:02:56 +0000 > Commit: Warner Losh > CommitDate: 2024-06-21 02:41:08 +0000 > > cdefs.h: Remove support for pre gcc 4.0 > > All supported compilers support the gcc 3 attribute extensions. Remove > the #else clauses for this. Also, latter-day pcc compilers also define > __GNUC__, so there's not need to also test for __PCC__. > > Reviewed by: brooks > Differential Revision: https://reviews.freebsd.org/D45654 > Sponsored by: Netflix > --- > sys/sys/cdefs.h | 42 ++++-------------------------------------- > 1 file changed, 4 insertions(+), 38 deletions(-) > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 88019819eb35..a6ecdca5d8b9 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -408,15 +389,10 @@ > * assign pointer x to a local variable, to check that its type is > * compatible with member m. > */ > -#if __GNUC_PREREQ__(3, 1) > #define __containerof(x, s, m) ({ \ > const volatile __typeof(((s *)0)->m) *__x = (x); \ > __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ > }) > -#else > -#define __containerof(x, s, m) \ > - __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) > -#endif > > /* > * Compiler-dependent macros to declare that functions take printf-like > @@ -434,14 +410,8 @@ > #define __strftimelike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) > > -/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ > -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ > - defined(__GNUC__) > #define __printf0like(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) > -#else > -#define __printf0like(fmtarg, firstvararg) > -#endif Does this still work with external GCC? I didn't think printf0 was supported by external GCC (or maybe I had to readd it in the port and that's what I remember). Ah, yes, printf0 is a local patch in the devel/freebsd-gccX ports, but is not available in stock GCC (e.g. lang/gcc does not support it). -- John Baldwin From nobody Mon Jul 1 22:28:55 2024 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 4WCggY1HW6z5QJjZ; Mon, 01 Jul 2024 22:28:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCggY0gRsz4B7m; Mon, 1 Jul 2024 22:28:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719872937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X2pCBzZqoE4u/Xc1LHXn/z/hYpP0+QtQFd02iDzhX9A=; b=j8OVs/BDYOHLClnxRqjIylW0l4+Q8Llri2yVj2KxyI/oztk3D9IJ3dFH0RWermCz91oVpC yRnHlAt73OppG8+mpE7rOiw2RKvwOdSfyrXrBLRYtYeRVOgT9VckMtaxZnOM31erzc2Am0 S2hEWTgJpkwR48ObtufTul/acJ2q2ZTq9GFjOH0wMCJEOkEUpJGJ/fUqWWjCKpPD8VKFlU OiXePynd+PtqxRmwasQXsLsqHD3L510EIT2aqKnGY6qVPBeTtrgD0z7LH89+n6iliUxVuE vv+9rEoH5MkYR477KVF+HLXTYDJYuTFC849U0JkMYsVO7y+2fw+BA8Ct/XGJVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719872937; a=rsa-sha256; cv=none; b=TQIkfS6kdx9q1u6e7t7LKnwBOvMP341bVoWi+44Kqxe7u8PtR10eXGr4LBZTWS0wPX76bP mFO4D3p1Fca5zEe9xaVRZhgnIhMGFMXFg8lT58kFB1bgCTHkWZ3cAg6T5T9kB9iYb600Dx krdJmnH87NmG7McrehJ76wX+P+CyeQjWGv57JlGniD6K6u7Kn4YAqdk8vnauC2NHd2CZV8 tLRe+0JdW7/kZQXoE5hEMpyuMj25L9gJqU6tStvEzCtBEv8tSbL7QX3T0tL7e2knYnsghQ BBGK43XIVgPHWeH5R/Y4MhG+bjkUeGrstu84BRK/+IN2KS2cetMJtbV74qClQA== 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=1719872937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X2pCBzZqoE4u/Xc1LHXn/z/hYpP0+QtQFd02iDzhX9A=; b=RCDsDzi1uVYJOtBU6GXhp66obwUkSsuD14pzAEqHvzfHqWhaeDYarKpp4qMbRFFotZ0Vwb LPwFouOzbLTFf5a+eRbgHrJxvCB0Z1N0xQ65dCS/pVMbzFJs+EVa8+8tFf/ZJJG8pGwrJ0 ZEBTyGGucLlKBBFWla/8ofPho65DvPPRfQ/NoUsAny3ElxzFBPsSD4+BHumovhsMbUkSJ0 sp6021XxzZul6aBR3CECRj9AxjoAiRHM98sxA77I1ZkkKYrSIwtOIHsKJydNBz0xtqudOV 1UQdM56GKmOtOepGTpe+PIh0cWNJakmXjT7XcgxktTxf1o1UZf9PSGGpKK8U2Q== Received: from [IPV6:2601:5c0:4200:b830:198e:c253:cce:4f0] (unknown [IPv6:2601:5c0:4200:b830:198e:c253:cce:4f0]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WCggX5XMzzYNh; Mon, 1 Jul 2024 22:28:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 1 Jul 2024 18:28:55 -0400 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 7cae020b9c97 - main - Simplify signal handling code in libthr by removing use of SYS_sigreturn Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406062150.456LorpK058076@gitrepo.freebsd.org> From: John Baldwin Cc: Dapeng Gao In-Reply-To: <202406062150.456LorpK058076@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/6/24 2:50 PM, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7cae020b9c977c11881363d726b13d1cd2feec5e > > commit 7cae020b9c977c11881363d726b13d1cd2feec5e > Author: Dapeng Gao > AuthorDate: 2024-06-03 18:18:13 +0000 > Commit: Warner Losh > CommitDate: 2024-06-06 21:48:39 +0000 > > Simplify signal handling code in libthr by removing use of SYS_sigreturn > > The use of SYS_sigreturn is unnecessary here. > > If handle_signal is called when a signal is delivered, it can just > return normally back to sigcode which will call sigreturn anyway. > > In case handle_signal is called by check_deferred_signal, using > setcontext is better than SYS_sigreturn because that is the correct > system call to pair with the earlier getcontext. > > Reviewed by: imp, kib > Differential Revision: https://reviews.freebsd.org/D44893 > --- > lib/libthr/thread/thr_sig.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c > index ad291d106001..b953c430158c 100644 > --- a/lib/libthr/thread/thr_sig.c > +++ b/lib/libthr/thread/thr_sig.c > @@ -247,7 +247,6 @@ static void > handle_signal(struct sigaction *actp, int sig, siginfo_t *info, ucontext_t *ucp) > { > struct pthread *curthread = _get_curthread(); > - ucontext_t uc2; > __siginfohandler_t *sigfunc; > int cancel_point; > int cancel_async; > @@ -307,13 +306,11 @@ handle_signal(struct sigaction *actp, int sig, siginfo_t *info, ucontext_t *ucp) > curthread->cancel_point = cancel_point; > curthread->cancel_enable = cancel_enable; > > - memcpy(&uc2, ucp, sizeof(uc2)); > - SIGDELSET(uc2.uc_sigmask, SIGCANCEL); > + SIGDELSET(ucp->uc_sigmask, SIGCANCEL); > > /* reschedule cancellation */ > - check_cancel(curthread, &uc2); > + check_cancel(curthread, ucp); > errno = err; > - syscall(SYS_sigreturn, &uc2); > } > > void > @@ -400,6 +397,7 @@ check_deferred_signal(struct pthread *curthread) > /* remove signal */ > curthread->deferred_siginfo.si_signo = 0; > handle_signal(&act, info.si_signo, &info, uc); > + syscall(SYS_sigreturn, uc); The commit log implies this should be calling setcontext() instead of syscall()? Was that a stale part of the commit log? I thought I remember discussing this at one point. Maybe the issue was that you couldn't pre-resolve the PLT for setcontext()? -- John Baldwin From nobody Mon Jul 1 23:09:24 2024 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 4WChZV0FGjz5QQT0 for ; Mon, 01 Jul 2024 23:09:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WChZT50Mbz4Kgx for ; Mon, 1 Jul 2024 23:09:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7066c9741b7so2093081b3a.1 for ; Mon, 01 Jul 2024 16:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1719875376; x=1720480176; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vdfLXwZu3TCb/T5MvpXiBn8RTJSSyOEZquMos/fJ5Z8=; b=zZMVcIVbbo26dDmfJbpGzaiPW5V0yWaW6hd7XsO/VtQRfk28AbVsQdyUZAeG9Rx/YJ 2ycU5Vqb5EZLFT1Iu4z7x/FbvYAWlIZkk+9wk5JPraRK+JIcT3EwgBcDFxyzKmsS0aw2 VpE90dqiH36RbmJubH6JWcKaKmgzM17ngakjICzRaIm8zss/ZnzFvd/KjwoGMyBmcwnz 1QY517vMRV3Ho/deIxc6JhTypZ0YOq3N4Pu2RA65NS7CKn5dn8afI4GArgwx74Wnhlgs YcNVdE/uvkyhjKVo+vy3GsWfNrHH3hSrhmAFvnEOqf3951r9nf76Vv6TRm//doV2i82Y KNBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719875376; x=1720480176; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vdfLXwZu3TCb/T5MvpXiBn8RTJSSyOEZquMos/fJ5Z8=; b=H0c1JnC0hGD5u3d5DBUtf7JU1kgnEHGSXwmupYFy82z4RUin1I0iQt4psXKdZrRNGc HTOpFfnwuOpedaj03gsNFHF976wv3TgW5zuogercVxy7FoRVH5RiLjQ3gmaYl5BDxXwE CpOc3yxBX6zpuwPZrDp8CndAYzaWiFqs1V82S6ZMulCMP5h0tHSuWcIVCpZk22ciOMkc 4AzUupqJcg6VuzdPEhsdCyk86Gt3WIxnqr4w3p+d7s4eFGiszg7rbxM/SXlz8c1bRilg B9bSE9E8Cx/dZwETo8EHesqG3UAgnDWEYVWnzPs16Uv4/IvzAb8YChbx4VqYvjlYRIFj lGUg== X-Forwarded-Encrypted: i=1; AJvYcCUTORqz6O8+Eenp7W7INpPdgBgRsGLXySmIcTf8PNQeQVVtrP36DHlNOSjT3LzNV8CjOZjwejVBVSch/BS1XZ6aYEoPt+O39PdSSimXJILs X-Gm-Message-State: AOJu0YwOFlZIS15CBYxmAiDCaZZohhI3mN/2V39XOtZDGRQF6obNgEW0 AWCAJYlCoEKWageo34ILHbEfgYak7QC/AxpdXFmAHIIJXAd3OcTb7bdjSRLSG2/7RFypPppGrBa qK+2/qPr6x7JyyNCrSHGjHZL5dII/Xu5wXzQclA== X-Google-Smtp-Source: AGHT+IEsUzvr4lNcmEdrzaBo770pg4L7lXV0h0uw4a+d1MN//QFOoiv5Lf9/kexf35+r9snBoYg0o24VZt1ndXN0/7A= X-Received: by 2002:a05:6a20:2448:b0:1be:2e11:2aa2 with SMTP id adf61e73a8af0-1bef6109dc2mr6283681637.22.1719875376048; Mon, 01 Jul 2024 16:09:36 -0700 (PDT) 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> In-Reply-To: <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> From: Warner Losh Date: Mon, 1 Jul 2024 17:09:24 -0600 Message-ID: Subject: Re: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 To: John Baldwin Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000d90221061c37b0ad" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WChZT50Mbz4Kgx --000000000000d90221061c37b0ad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 1, 2024, 3:53=E2=80=AFPM John Baldwin wrote: > On 6/20/24 7:41 PM, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D67d1a1cd9e772e2ef94003579f4fbc2= 71d38be7d > > > > commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d > > Author: Warner Losh > > AuthorDate: 2024-06-20 23:02:56 +0000 > > Commit: Warner Losh > > CommitDate: 2024-06-21 02:41:08 +0000 > > > > cdefs.h: Remove support for pre gcc 4.0 > > > > All supported compilers support the gcc 3 attribute extensions. > Remove > > the #else clauses for this. Also, latter-day pcc compilers also > define > > __GNUC__, so there's not need to also test for __PCC__. > > > > Reviewed by: brooks > > Differential Revision: https://reviews.freebsd.org/D45654 > > Sponsored by: Netflix > > --- > > sys/sys/cdefs.h | 42 ++++-------------------------------------- > > 1 file changed, 4 insertions(+), 38 deletions(-) > > > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > > index 88019819eb35..a6ecdca5d8b9 100644 > > --- a/sys/sys/cdefs.h > > +++ b/sys/sys/cdefs.h > > @@ -408,15 +389,10 @@ > > * assign pointer x to a local variable, to check that its type is > > * compatible with member m. > > */ > > -#if __GNUC_PREREQ__(3, 1) > > #define __containerof(x, s, m) ({ > \ > > const volatile __typeof(((s *)0)->m) *__x =3D (x); = \ > > __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ > > }) > > -#else > > -#define __containerof(x, s, m) > \ > > - __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) > > -#endif > > > > /* > > * Compiler-dependent macros to declare that functions take printf-li= ke > > @@ -434,14 +410,8 @@ > > #define __strftimelike(fmtarg, firstvararg) \ > > __attribute__((__format__ (__strftime__, fmtarg, firstvararg)= )) > > > > -/* Compiler-dependent macros that rely on FreeBSD-specific extensions. > */ > > -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >=3D 300001 = && \ > > - defined(__GNUC__) > > #define __printf0like(fmtarg, firstvararg) \ > > __attribute__((__format__ (__printf0__, fmtarg, firstvararg))= ) > > -#else > > -#define __printf0like(fmtarg, firstvararg) > > -#endif > > Does this still work with external GCC? I didn't think printf0 was > supported > by external GCC (or maybe I had to readd it in the port and that's what I > remember). Ah, yes, printf0 is a local patch in the devel/freebsd-gccX > ports, but is not available in stock GCC (e.g. lang/gcc does not support > it). > Ah. That would explain why it just worked for me. That's what I tested with. Clang also seemed happy with it. But that was the in tree clang. Is there a similar issue? Gnuc is defined for both. Warner --=20 > John Baldwin > > --000000000000d90221061c37b0ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jul 1, 2024, 3:53=E2=80=AFPM John Baldwin <= jhb@freebsd.org> wrote:
=
On 6/20/24 7:41 PM, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D67d1a1cd9e772e2ef94003579f4fbc= 271d38be7d
>
> commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-06-20 23:02:56 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-06-21 02:41:08 +0000
>
>=C2=A0 =C2=A0 =C2=A0 cdefs.h: Remove support for pre gcc 4.0
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 All supported compilers support the gcc 3 attribut= e extensions. Remove
>=C2=A0 =C2=A0 =C2=A0 the #else clauses for this. Also, latter-day pcc c= ompilers also define
>=C2=A0 =C2=A0 =C2=A0 __GNUC__, so there's not need to also test for= __PCC__.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 brooks
>=C2=A0 =C2=A0 =C2=A0 Differential Revision:=C2=A0 h= ttps://reviews.freebsd.org/D45654
>=C2=A0 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Netflix
> ---
>=C2=A0 =C2=A0sys/sys/cdefs.h | 42 ++++---------------------------------= -----
>=C2=A0 =C2=A01 file changed, 4 insertions(+), 38 deletions(-)
>
> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
> index 88019819eb35..a6ecdca5d8b9 100644
> --- a/sys/sys/cdefs.h
> +++ b/sys/sys/cdefs.h
> @@ -408,15 +389,10 @@
>=C2=A0 =C2=A0 * assign pointer x to a local variable, to check that its= type is
>=C2=A0 =C2=A0 * compatible with member m.
>=C2=A0 =C2=A0 */
> -#if __GNUC_PREREQ__(3, 1)
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0__containerof(x, s, m) ({=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\
>=C2=A0 =C2=A0 =C2=A0 =C2=A0const volatile __typeof(((s *)0)->m) *__x= =3D (x);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0__DEQUALIFY(s *, (const volatile char *)__x = - __offsetof(s, m));\
>=C2=A0 =C2=A0})
> -#else
> -#define=C2=A0 =C2=A0 =C2=A0 __containerof(x, s, m)=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
> -=C2=A0 =C2=A0 =C2=A0__DEQUALIFY(s *, (const volatile char *)(x) - __o= ffsetof(s, m))
> -#endif
>=C2=A0 =C2=A0
>=C2=A0 =C2=A0/*
>=C2=A0 =C2=A0 * Compiler-dependent macros to declare that functions tak= e printf-like
> @@ -434,14 +410,8 @@
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0__strftimelike(fmtarg, firstvar= arg) \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0__attribute__((__format__ (__s= trftime__, fmtarg, firstvararg)))
>=C2=A0 =C2=A0
> -/* Compiler-dependent macros that rely on FreeBSD-specific extensions= . */
> -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= ;=3D 300001 && \
> -=C2=A0 =C2=A0 defined(__GNUC__)
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0__printf0like(fmtarg, firstvara= rg) \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0__attribute__((__format__ (__p= rintf0__, fmtarg, firstvararg)))
> -#else
> -#define=C2=A0 =C2=A0 =C2=A0 __printf0like(fmtarg, firstvararg)
> -#endif

Does this still work with external GCC?=C2=A0 I didn't think printf0 wa= s supported
by external GCC (or maybe I had to readd it in the port and that's what= I
remember).=C2=A0 Ah, yes, printf0 is a local patch in the devel/freebsd-gcc= X
ports, but is not available in stock GCC (e.g. lang/gcc does not support it= ).

Ah. That would explain why it just worked for me. That's what I teste= d with. Clang also seemed happy with it. But that was the in tree clang. Is= there a similar issue? Gnuc is defined for both.
Warner

--
John Baldwin

--000000000000d90221061c37b0ad-- From nobody Tue Jul 2 04:58:16 2024 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 4WCrJm59sHz5PDLQ; Tue, 02 Jul 2024 04:58:16 +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 4WCrJm4gGXz3x59; Tue, 2 Jul 2024 04:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719896296; 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=MlywIGpjV683OXwq7vkcDXy9qDUPYeG2MSekda5Y02o=; b=Oe8JANGRvd2JdSiGhDjlFGX2+Nw7uVuU+MJaZ0bXp51duQfJXn9zrpJwOBpyg1UexZky/g 7GZGSqw6TQhHfEwDCArHNb0keHMz2FP5WsxTZFxmGv4qxd6g6J6D4kq/UHYeZdQeapySGB Sp9+kPwq6uQ9Mq/0rT9lNPKDM9LqpCioW4PGj4CcXygV2To3itsFHlmG4uti/Eej5JEiJx dTzMVavbaPnc823phJgtZ5tA0Wqj460fIdf34MEZlmD8hC7yaXMshnRVtIQsCqq2ASxJGS 6G/pJ3kki7qfiilIxT/irXMGA1opf220Fth6i20duutmgz2L2GrgsJSzvxWJ4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719896296; a=rsa-sha256; cv=none; b=wjhP5aR72yv05kBYG7IhU+1VbQGQ9VyDbuPJdXN/buNZXsPDgDHsLSlUL5Lf32qvUjWwDC W3rxK2TeCVy6eHq/AyF3i2Zb8w7r3y8/srNqU/RAxgwih4KSRo43r800Ojr/HAocFYaNkB rNliY7hppn/L5ZXwt1wbo5r0SAaVurkUgMp5yxGsSRH866jrZ8YO7Pl7lQIp+Rulwkxc/R xqJFjrxSdnS3LOhumKA2ZKW8zr5Plf9orNBLtXXwPlG16wDH5itJX/iOZGpONio63D799H 16ISAmborH90X9/74wSav+XxYF+qNdWLDP4NELRRXZuV+9MF8YLiy973Dv5wQg== 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=1719896296; 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=MlywIGpjV683OXwq7vkcDXy9qDUPYeG2MSekda5Y02o=; b=GeXfofHPwUEdVsT2CgqvATY8D0yADwju0UVRj1U3Kd8KgfymHtccU8eLWTIBlUHU1OvQM6 8nS1G6ta14ExRN2C6sohmn11oZyueJRCgzV5qAmWIh3BAtlB0A2GQXL5pH4xKDHA1lynLB x3VWR+zXj6E3tP9Vwt70xFDMfUxvd8heH8kIo+THIvZtaVqXUQcE43fAKYYIQgTxPUaQrG IY1wAYmFSMMwA4F5M3K7KEvn03YlSeD/sX3btwjR4onsKdl/ps6oh/MpVMDy7i0nTLbtOB oABA7UhYLsBBuO+E3bDT6JzVSLWtt+nom/8V3BwV9VpF2wZQmSP2sAaY5Gf6kA== 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 4WCrJm4GkszbBF; Tue, 2 Jul 2024 04:58:16 +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 4624wGWe062892; Tue, 2 Jul 2024 04:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4624wGtR062889; Tue, 2 Jul 2024 04:58:16 GMT (envelope-from git) Date: Tue, 2 Jul 2024 04:58:16 GMT Message-Id: <202407020458.4624wGtR062889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: d6963b9ed328 - main - if_vxlan(4): Exclude ETHER_CRC_LEN from macro VXLAN_MAX_MTU 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6963b9ed3287e91db3d1df153861591faff0007 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d6963b9ed3287e91db3d1df153861591faff0007 commit d6963b9ed3287e91db3d1df153861591faff0007 Author: Zhenlei Huang AuthorDate: 2024-07-02 04:57:01 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-02 04:57:01 +0000 if_vxlan(4): Exclude ETHER_CRC_LEN from macro VXLAN_MAX_MTU The encapsulated (original) frame does not count in FCS as per Section 5 of RFC 7348. Reviewed by: afedorov, bryanv, #network Fixes: b7592822d5de Allow set MTU more than 1500 bytes MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45195 --- sys/net/if_vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 37f987981a0c..05430768cc73 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -97,7 +97,7 @@ struct vxlan_socket_mc_info { 60 /* Maximum IPv4 header len */ - \ sizeof(struct udphdr) - \ sizeof(struct vxlan_header) - \ - ETHER_HDR_LEN - ETHER_CRC_LEN - ETHER_VLAN_ENCAP_LEN) + ETHER_HDR_LEN - ETHER_VLAN_ENCAP_LEN) #define VXLAN_BASIC_IFCAPS (IFCAP_LINKSTATE | IFCAP_JUMBO_MTU) #define VXLAN_SO_MC_MAX_GROUPS 32 From nobody Tue Jul 2 04:58:17 2024 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 4WCrJn6Bx2z5PDWX; Tue, 02 Jul 2024 04:58:17 +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 4WCrJn5clFz3x9m; Tue, 2 Jul 2024 04:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719896297; 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=dYXeAok3IcEsZlf2I2sBKcLnEXnmC8udrLt7s5EX8Ak=; b=XKFCqKefNlVGprtKNgMNpLchu5s+AfBOqT5kt8zc7DpQe5BzHkVAmZNKT1ly51FhrOK7Sy gglIe6tj2eIr1VtY4XI38SqzBQB93OdutWZFXUgG96ePxMcQZKX7YugsQ4PBWobQhTchtV rMxFVmQapxVY6qMNTFvO80CreF88JylYBeC6P9tSXNkTNgI8DgPe+/7tcIY2b/vClfqpfF DPmeiwr/HdfUhlzVJ1os1V4YKXrhkw7OwvTtdx+YRFR/iywr60UD9V99CcnsHvl8Ca7TmW s2MgcZZPcAOErI6R1KIgyKcJhkDO8fuc2GLe1K3/ZJNO7BxAoQO5tUnQdWFV1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719896297; a=rsa-sha256; cv=none; b=TnR0iunNcPhES4zSn2qSv3zFxgDMdXUtFhyJPasaKP7zyOElrNVDemd4DYC+datBQtW8LX QZ3IOeDIR1kHR5bcHL0lxOWyzcOXlucIcDpFYiKbCkt5BeIusha40BR4gX+azqLQumeQMp 6zqrAlGysFnwHJEZPfKWgkoSEy9mb/4nvrjdkFIQJEg0hq/bWU07CG9zqC5XkBRxKa+sB9 zaec7oV9QFUGTUgKCAc/PjGwkUUgs0uFgNCA5EbXeAix/0wFxgGfj5bi0N4EsJ13ectIcf M0Eej7/Gx+fE565xzGevbloeLTjX2D2RLJ7AA8STVG4VRIrIaDGORD4MNkYeXw== 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=1719896297; 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=dYXeAok3IcEsZlf2I2sBKcLnEXnmC8udrLt7s5EX8Ak=; b=naoC1HNHybDYF6WuImNP8b8q4kwN3kw9BN1/vk6qo3H9NncGHbtRIQFGFLB1YlJBY38/tw JK1MH7mZn69feYHixXnivu/muK7yMHxSJL11Dm9v2PQ2SD1uGeTNCk/4kINFUkKa8+WmCe r2/c8jLfcSMCWvPzvZGJhgZ4CDVAlJ7AAFuE2WmaEjG0eK4zn3y7IPTtHYNlIVP5/b3R3h d25bYwgQisJs9nw8rLUaGYzP3T3kbuUB38E+eed7oKmsgr3fgEq2Nx534mEF/7QcWZY9z6 45nwOZc6kj2GBdZb7CzKKhYBjBdGgWn4BhjWUTKOVB/YBQS61gGyFVb9FuCx6w== 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 4WCrJn5F0fzZlj; Tue, 2 Jul 2024 04:58:17 +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 4624wHeU062942; Tue, 2 Jul 2024 04:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4624wHij062939; Tue, 2 Jul 2024 04:58:17 GMT (envelope-from git) Date: Tue, 2 Jul 2024 04:58:17 GMT Message-Id: <202407020458.4624wHij062939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 087f5e08ab5f - main - if_vxlan(4): Plug a memory leak 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 087f5e08ab5f0384163f76f73b9a91c98a3ba450 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=087f5e08ab5f0384163f76f73b9a91c98a3ba450 commit 087f5e08ab5f0384163f76f73b9a91c98a3ba450 Author: Zhenlei Huang AuthorDate: 2024-07-02 04:57:02 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-02 04:57:02 +0000 if_vxlan(4): Plug a memory leak On clone creating, either failure from vxlan_set_user_config() or ifc_copyin() will result in leaking previous allocated counters. Since counter_u64_alloc(M_WAITOK) never fails, make vxlan_stats_alloc() void and move the allocation for counters below checking ifd->params to avoid memory leak. Reviewed by: kp, glebius Fixes: b092fd6c973d if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45822 --- sys/net/if_vxlan.c | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 05430768cc73..bb2de793550f 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -367,7 +367,7 @@ static bool vxlan_rcv_udp_packet(struct mbuf *, int, struct inpcb *, static int vxlan_input(struct vxlan_socket *, uint32_t, struct mbuf **, const struct sockaddr *); -static int vxlan_stats_alloc(struct vxlan_softc *); +static void vxlan_stats_alloc(struct vxlan_softc *); static void vxlan_stats_free(struct vxlan_softc *); static void vxlan_set_default_config(struct vxlan_softc *); static int vxlan_set_user_config(struct vxlan_softc *, @@ -2923,27 +2923,14 @@ out: return (error); } -static int +static void vxlan_stats_alloc(struct vxlan_softc *sc) { struct vxlan_statistics *stats = &sc->vxl_stats; stats->txcsum = counter_u64_alloc(M_WAITOK); - if (stats->txcsum == NULL) - goto failed; - stats->tso = counter_u64_alloc(M_WAITOK); - if (stats->tso == NULL) - goto failed; - stats->rxcsum = counter_u64_alloc(M_WAITOK); - if (stats->rxcsum == NULL) - goto failed; - - return (0); -failed: - vxlan_stats_free(sc); - return (ENOMEM); } static void @@ -2951,18 +2938,9 @@ vxlan_stats_free(struct vxlan_softc *sc) { struct vxlan_statistics *stats = &sc->vxl_stats; - if (stats->txcsum != NULL) { - counter_u64_free(stats->txcsum); - stats->txcsum = NULL; - } - if (stats->tso != NULL) { - counter_u64_free(stats->tso); - stats->tso = NULL; - } - if (stats->rxcsum != NULL) { - counter_u64_free(stats->rxcsum); - stats->rxcsum = NULL; - } + counter_u64_free(stats->txcsum); + counter_u64_free(stats->tso); + counter_u64_free(stats->rxcsum); } static void @@ -3233,9 +3211,6 @@ vxlan_clone_create(struct if_clone *ifc, char *name, size_t len, sc->vxl_unit = ifd->unit; sc->vxl_fibnum = curthread->td_proc->p_fibnum; vxlan_set_default_config(sc); - error = vxlan_stats_alloc(sc); - if (error != 0) - goto fail; if (ifd->params != NULL) { error = ifc_copyin(ifd, &vxlp, sizeof(vxlp)); @@ -3247,6 +3222,7 @@ vxlan_clone_create(struct if_clone *ifc, char *name, size_t len, goto fail; } + vxlan_stats_alloc(sc); ifp = if_alloc(IFT_ETHER); sc->vxl_ifp = ifp; rm_init(&sc->vxl_lock, "vxlanrm"); From nobody Tue Jul 2 08:06:14 2024 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 4WCwTf47p2z5Phjm; Tue, 02 Jul 2024 08:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCwTf3Q2gz4J4k; Tue, 2 Jul 2024 08:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907574; 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=doxblZHvhbG9oPgq45BhGcpmI0e4Oos4FJ2G0RVgF0c=; b=ckVvVUKLyT1BhrygncRkNB4UBNlr/Y3CRAxzup/DzfVN1ljg0EEBWuHNEsDJeJb+Kb8oX/ Tc/RSWHUaYA8j2H3MtLHZWHKAL2B/qVWZcToAxIg5I+mbRCvveb5HPuYXoocaxu6Mqk9aF prQeY6uszYsXXlttvqvqHgdWvYNKAnBUqKRAHPyp9EReTy3rpB9g8hKjkx0Nodq9khKZ0r CRvMjHcUqOKKhRN5RJLpuEK9SUh2yl6IWi0YlTo+X/Pa9Ozik1R+H8IvoMKSiukooxUiPv u0CQCLWZ1h9vZcv6wgR6StVHdH04M21WdI57L1hnXubJ/9V8EAelV/uXY3ETrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907574; a=rsa-sha256; cv=none; b=HF/ryXeYPThnQu0BF305T+JfLbuECdmXzr3UnoYRZGPvTymf33N1IU4PVopGwsnEPf/dPZ JfP8ZEGi9uhEc/HjOyCB5lpAGUes2nGzMX5JQVvD6eIPt6ISoTx5RkRNtPKJdU4/iTxon4 NOvCdRiI5SPhrZ+xdMfdc0Rij54Zx4RnND8kwggdr8dLW8ab6h+7L0VXrc+sKhUAi0xaBY udCftvdfvUxG5fS4En73jqiFKu3g54frJ1WS7H5XHDlw1zVgkv5L77zASGQ8zu/ZXZC7oM FbF0ERbs4AMvu7biRxonHnus99kvOtrbDpLX69KE5uPB9qpBF76n9inDO+q/vw== 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=1719907574; 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=doxblZHvhbG9oPgq45BhGcpmI0e4Oos4FJ2G0RVgF0c=; b=ICKQ1uIPcX1cbNdM4kHCSwNorCL3Ixu49P7R99+6GYun3Qs1UsHom0Hd6ng7XC/YJCG9w9 hjnjudCtACnOoDZAtIM8fAPatw/RA5+CldE1DeS8rOgSlAYIpiCouAd7bTmdgabpvbeDtH z/7tHfzhQuX147yxoP3cMfvibHgnlc0YOjAlxrj/BbafjU3pIKJpycmFi/jzJ1QU/Vo2/+ YEyC8y3ggpAmQaLMeVkhwueHfSymo/O2nZ5p8GeViS5HTlRLh3VkItDz1Be/IVSQrSRz7t luYZQuYoiwEkikf1jaAL+GTKd4a/BJVk7nKz0+Yl/KLb20HZrpLx9TPaZPFRWg== 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 4WCwTf2vRYzgNl; Tue, 2 Jul 2024 08:06:14 +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 46286EpT082388; Tue, 2 Jul 2024 08:06:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286Edr082385; Tue, 2 Jul 2024 08:06:14 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:14 GMT Message-Id: <202407020806.46286Edr082385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 95596d181dad - stable/13 - iovctl: allow vlan restrictions to be passed to the driver 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 95596d181dade90597e8badd7916f9aa0dfce87c Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=95596d181dade90597e8badd7916f9aa0dfce87c commit 95596d181dade90597e8badd7916f9aa0dfce87c Author: Kristof Provost AuthorDate: 2024-05-29 17:29:35 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:06:02 +0000 iovctl: allow vlan restrictions to be passed to the driver Allow iovctl to create VFs that are restricted to specific VLAN IDs. Reviewed by: kib, np MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D45402 (cherry picked from commit c57c26179033f64c2011a2d2a904ee3fa62e826a) --- sys/dev/pci/pci_iov_schema.c | 61 +++++++++++++++++++++++++++++++++++++++++++ sys/sys/iov.h | 2 ++ sys/sys/iov_schema.h | 3 ++- usr.sbin/iovctl/iovctl.c | 6 +++++ usr.sbin/iovctl/iovctl.conf.5 | 5 +++- usr.sbin/iovctl/parse.c | 25 ++++++++++++++++++ 6 files changed, 100 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/pci_iov_schema.c b/sys/dev/pci/pci_iov_schema.c index 742dfbd2b4d9..bb87e7215bc8 100644 --- a/sys/dev/pci/pci_iov_schema.c +++ b/sys/dev/pci/pci_iov_schema.c @@ -55,11 +55,13 @@ static validate_func pci_iov_schema_validate_bool; static validate_func pci_iov_schema_validate_string; static validate_func pci_iov_schema_validate_uint; static validate_func pci_iov_schema_validate_unicast_mac; +static validate_func pci_iov_schema_validate_vlan; static default_validate_t pci_iov_validate_bool_default; static default_validate_t pci_iov_validate_string_default; static default_validate_t pci_iov_validate_uint_default; static default_validate_t pci_iov_validate_unicast_mac_default; +static default_validate_t pci_iov_validate_vlan_default; struct config_type_validator { const char *type_name; @@ -108,6 +110,11 @@ static struct config_type_validator pci_iov_schema_validators[] = { .validate = pci_iov_schema_validate_unicast_mac, .default_validate = pci_iov_validate_unicast_mac_default, }, + { + .type_name = "vlan", + .validate = pci_iov_schema_validate_vlan, + .default_validate = pci_iov_validate_vlan_default, + }, }; static const struct config_type_validator * @@ -262,6 +269,26 @@ pci_iov_schema_add_unicast_mac(nvlist_t *schema, const char *name, nvlist_move_nvlist(schema, name, entry); } +void +pci_iov_schema_add_vlan(nvlist_t *schema, const char *name, + uint32_t flags, const uint16_t defaultVal) +{ + nvlist_t *entry; + + entry = nvlist_create(NV_FLAG_IGNORE_CASE); + if (entry == NULL) { + nvlist_set_error(schema, ENOMEM); + return; + } + + pci_iov_schema_add_type(entry, "vlan"); + if (flags & IOV_SCHEMA_HASDEFAULT) + nvlist_add_number(entry, "default", defaultVal); + pci_iov_schema_add_required(entry, flags); + + nvlist_move_nvlist(schema, name, entry); +} + static int pci_iov_schema_validate_bool(const struct config_type_validator * validator, const nvlist_t *config, const char *name) @@ -321,6 +348,24 @@ pci_iov_schema_validate_unicast_mac( return (0); } +static int +pci_iov_schema_validate_vlan( + const struct config_type_validator * validator, + const nvlist_t *config, const char *name) +{ + uint16_t vlan; + + if (!nvlist_exists_number(config, name)) + return (EINVAL); + + vlan = nvlist_get_number(config, name); + + if (vlan > 4095 && vlan != VF_VLAN_TRUNK) + return (EINVAL); + + return (0); +} + static void pci_iov_config_add_default(const nvlist_t *param_schema, const char *name, nvlist_t *config) @@ -401,6 +446,22 @@ pci_iov_validate_unicast_mac_default( return (0); } +static int +pci_iov_validate_vlan_default( + const struct config_type_validator * validator, const nvlist_t *param) +{ + uint16_t vlan; + + if (! nvlist_exists_number(param, DEFAULT_SCHEMA_NAME)) + return (EINVAL); + + vlan = nvlist_get_number(param, DEFAULT_SCHEMA_NAME); + if (vlan > 4095 && vlan != VF_VLAN_TRUNK) + return (EINVAL); + + return (0); +} + static int pci_iov_validate_param_schema(const nvlist_t *schema) { diff --git a/sys/sys/iov.h b/sys/sys/iov.h index 0171fc5a98cf..2ae7e5ac6767 100644 --- a/sys/sys/iov.h +++ b/sys/sys/iov.h @@ -46,6 +46,8 @@ #define DEFAULT_SCHEMA_NAME "DEFAULT" #define REQUIRED_SCHEMA_NAME "REQUIRED" +#define VF_VLAN_TRUNK 4096 + /* * Because each PF device is expected to expose a unique set of possible * configurations, the SR-IOV infrastructure dynamically queries the PF diff --git a/sys/sys/iov_schema.h b/sys/sys/iov_schema.h index cb50f7796d30..66c883540563 100644 --- a/sys/sys/iov_schema.h +++ b/sys/sys/iov_schema.h @@ -48,5 +48,6 @@ void pci_iov_schema_add_uint64(nvlist_t *schema, const char *name, uint32_t flags, uint64_t defaultVal); void pci_iov_schema_add_unicast_mac(nvlist_t *schema, const char *name, uint32_t flags, const uint8_t * defaultVal); - +void pci_iov_schema_add_vlan(nvlist_t *schema, const char *name, + uint32_t flags, const uint16_t defaultVal); #endif diff --git a/usr.sbin/iovctl/iovctl.c b/usr.sbin/iovctl/iovctl.c index 413fb7b2f4a5..368fa51c594f 100644 --- a/usr.sbin/iovctl/iovctl.c +++ b/usr.sbin/iovctl/iovctl.c @@ -346,6 +346,12 @@ print_default_value(const nvlist_t *parameter, const char *type) mac = nvlist_get_binary(parameter, DEFAULT_SCHEMA_NAME, &size); printf(" (default = %02x:%02x:%02x:%02x:%02x:%02x)", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + } else if (strcasecmp(type, "vlan") == 0) { + uint16_t vlan = nvlist_get_number(parameter, DEFAULT_SCHEMA_NAME); + if (vlan == VF_VLAN_TRUNK) + printf(" (default = trunk)"); + else + printf(" (default = %d)", vlan); } else errx(1, "Unexpected type in schema: '%s'", type); } diff --git a/usr.sbin/iovctl/iovctl.conf.5 b/usr.sbin/iovctl/iovctl.conf.5 index a7eb6c2077ee..1bae96e150ba 100644 --- a/usr.sbin/iovctl/iovctl.conf.5 +++ b/usr.sbin/iovctl/iovctl.conf.5 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 29, 2020 +.Dd May 30, 2024 .Dt IOVCTL.CONF 5 .Os .Sh NAME @@ -95,6 +95,8 @@ The following option types are supported: .Bl -tag -width indent .It boolean Accepts a boolean value of true or false. +.It vlan +Accepts a VLAN ID, or "trunk" to allow any VLAN ID. .It mac-addr Accepts a unicast MAC address specified as a string of the form xx:xx:xx:xx:xx:xx, where xx is one or two hexadecimal digits. @@ -159,6 +161,7 @@ DEFAULT { VF-0 { mac-addr : "02:56:48:7e:d9:f7"; passthrough : false; + vlan: 1; } .Ed .Sh SEE ALSO diff --git a/usr.sbin/iovctl/parse.c b/usr.sbin/iovctl/parse.c index a5810ba077eb..5114bd19e381 100644 --- a/usr.sbin/iovctl/parse.c +++ b/usr.sbin/iovctl/parse.c @@ -161,6 +161,29 @@ add_unicast_mac_config(const char *key, const ucl_object_t *obj, nvlist_t *confi nvlist_add_binary(config, key, mac, ETHER_ADDR_LEN); } +static void +add_vlan_config(const char *key, const ucl_object_t *obj, nvlist_t *config) +{ + int64_t val; + const char *strVal = ""; + + if(ucl_object_tostring_safe(obj, &strVal)) { + if (strcasecmp(strVal, "trunk") == 0) { + nvlist_add_number(config, key, VF_VLAN_TRUNK); + return; + } + report_config_error(key, obj, "vlan"); + } + + if (!ucl_object_toint_safe(obj, &val)) + report_config_error(key, obj, "vlan"); + + if (val < 0 || val > 4095) + report_config_error(key, obj, "vlan"); + + nvlist_add_number(config, key, val); +} + /* * Validates that the given configuation value has the right type as specified * in the schema, and then adds the value to the configuation node. @@ -187,6 +210,8 @@ add_config(const char *key, const ucl_object_t *obj, nvlist_t *config, add_uint_config(key, obj, config, type, UINT64_MAX); else if (strcasecmp(type, "unicast-mac") == 0) add_unicast_mac_config(key, obj, config); + else if (strcasecmp(type, "vlan") == 0) + add_vlan_config(key, obj, config); else errx(1, "Unexpected type '%s' in schema", type); } From nobody Tue Jul 2 08:06:15 2024 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 4WCwTg5B3Mz5Phlt; Tue, 02 Jul 2024 08:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCwTg4Hr4z4Hv6; Tue, 2 Jul 2024 08:06:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907575; 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=N+oKW4mH8EobctxMtyb0qNndROusHfb5B1Eos8ZXtoI=; b=ve551GZ215gnP2AxS+C0SFqxbm7HeO2KeftOeABjsYEZxJa2cVGmTYzL3sdawIskwFJZex /tAGLN4IhhY7WUDphqKnRvPnhL6o9LrPsrrekypOnuzizXhu6vBfYiqIpKmFtRXT0yZN9Q 0HF4NdEOh6diY15Hgnj+THWmXJxF3DIVdAiT0Qt0sv0iZJwgABsAtYmu9o/SoYhDWMwyhL P3Ssg4KYkPhLXT2J+7k0AwXkanqcsFpgxNAlFOAT5IgGzCvlUAMMUGqUqECs4CZOf/q1U9 Plksk+1yVN0LfoPbrS8vtKavG6Dha/543mYVcab9njrjCqX1Z3GnO+XUfPuj3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907575; a=rsa-sha256; cv=none; b=ZBZcvOntRf1V6lmwu8x+AgWRRURQ/lGh16lhuDzmSaE7QwRXOwlJy5qLWCV+hAIJeIZfm4 zSSVj3Ekk8fAxsEBZd923byPp9MTlX86iK7iPStxrlgrfmZv70WXSFWRVnCQH7z0aLZorq u+ygTgmtDWMJ2VUs79+xPbefh4qGn1aP0pX6rxpR4dwRpOapvGfTvKP9Be7iY+iYhQ7MMI GirW5cfveGgYa8KWRlH4ULY/cWvfwQdcD7Irr+W83HqHTJboIhqwVkv+6H8yU9bwACFkZr L/nFxPAKwU12jcdzwO15A8qWbU9Is/iv43LNEdc8JauBrnrFwXoP7Y3jVCc2WQ== 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=1719907575; 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=N+oKW4mH8EobctxMtyb0qNndROusHfb5B1Eos8ZXtoI=; b=uZEHcCNJqm9bI00MNeGdyzh1TLotHNIaFSbfF3cS0ju/dVdSrk3gzMpbBnBVr+TqYz3xj2 ELTNMTCw2PpiK59kcFiqd1qGNmVPadnY7NDNWsozONAdC4qQvwQjYd16EPp2NDpdMCboOr i2TxI3DnpxSYmOXY/yjcryiEL7lOgAYaP1E3rW/eh8n6Z2a5WrRuLXh2lN2H31HoRVSe1A ClIFP3/2H9bo2doHidyRNjWgHirb9UVvuJpTey3TsvhlQeXDz7e9EGQ722I305cBSS7Bzi JlgDWWNcSu+6WqMsA8nH1ifdbNMMXqi6A73V1PNMtf+RmiZ/mFZ1Wwr4fWw+hQ== 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 4WCwTg3nL4zgGP; Tue, 2 Jul 2024 08:06:15 +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 46286FBV082570; Tue, 2 Jul 2024 08:06:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286F2b082567; Tue, 2 Jul 2024 08:06:15 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:15 GMT Message-Id: <202407020806.46286F2b082567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 29c64c8ddf67 - stable/13 - mlx5: handle vlan PF restrictions 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 29c64c8ddf675e5dac615083df7cc8c12dd63bcc Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=29c64c8ddf675e5dac615083df7cc8c12dd63bcc commit 29c64c8ddf675e5dac615083df7cc8c12dd63bcc Author: Kristof Provost AuthorDate: 2024-05-30 13:56:56 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:53 +0000 mlx5: handle vlan PF restrictions Reviewed by: kib MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D45427 (cherry picked from commit 7deadea2eb0aca0b83657d30f895d98795d9d81f) --- sys/dev/mlx5/mlx5_core/mlx5_main.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 0a05d559072f..a96467a3681b 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -52,8 +52,12 @@ #include #ifdef PCI_IOV #include +#include #include #include +#include +#include +#include #endif static const char mlx5_version[] = "Mellanox Core driver " @@ -225,6 +229,7 @@ static void mlx5_set_driver_version(struct mlx5_core_dev *dev) #ifdef PCI_IOV static const char iov_mac_addr_name[] = "mac-addr"; +static const char iov_vlan_name[] = "vlan"; static const char iov_node_guid_name[] = "node-guid"; static const char iov_port_guid_name[] = "port-guid"; #endif @@ -1697,6 +1702,8 @@ static int init_one(struct pci_dev *pdev, vf_schema = pci_iov_schema_alloc_node(); pci_iov_schema_add_unicast_mac(vf_schema, iov_mac_addr_name, 0, NULL); + pci_iov_schema_add_vlan(vf_schema, + iov_vlan_name, 0, 0); pci_iov_schema_add_uint64(vf_schema, iov_node_guid_name, 0, 0); pci_iov_schema_add_uint64(vf_schema, iov_port_guid_name, @@ -1933,6 +1940,25 @@ mlx5_iov_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *vf_config) } } + if (nvlist_exists_number(vf_config, iov_vlan_name)) { + uint16_t vlan = nvlist_get_number(vf_config, iov_vlan_name); + + if (vlan == 0) + error = ENOTSUP; + else { + if (vlan == VF_VLAN_TRUNK) + vlan = 0; + + error = -mlx5_eswitch_set_vport_vlan(priv->eswitch, + vfnum + 1, vlan, 0); + } + if (error != 0) { + mlx5_core_err(core_dev, + "setting VLAN for VF %d failed, error %d\n", + vfnum + 1, error); + } + } + if (nvlist_exists_number(vf_config, iov_node_guid_name)) { node_guid = nvlist_get_number(vf_config, iov_node_guid_name); error = -mlx5_modify_nic_vport_node_guid(core_dev, vfnum + 1, From nobody Tue Jul 2 08:06:15 2024 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 4WCwTg5BlSz5PhXR; Tue, 02 Jul 2024 08:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCwTg3Z00z4Hwy; Tue, 2 Jul 2024 08:06:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907575; 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=F+2kgvBjt9InWIPbibN6WVMY66VlJkCha92PM0VkDfA=; b=qoMabY/4TXS1rlsGefLrsFvgcRyLQZYfGY0YATFdMR8SkCc38knjEQ6k7GgW8jCpcxevRp P34v0RwijdQuuQNoL+zqq8TBe2WNTX5EpC9qljCXXkYcmfjVUUhhprHFpasXDsb2VuEim0 MC9KRQmlzCBUoX/7ZJmt3z7tyAMrTvmRMWFo7ZZdVThHZvkjUggnz5s3XskBgDsXo/zVUM FsROSNRuDAfub11qnBZQNGx1mVMp1rXGmhOj5uWdurUhMQC0/ECc2P/F74r9XmfGaKFIgP 2vOUVMzmMu+ohO2Kh0pFtrBtA96P7gSJYn0YvpoEBKBWOf2BPYe06ZCbGCKgNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907575; a=rsa-sha256; cv=none; b=gDfv+UwuukvEsTcstW6lnwSVNNipfd4o+ekx7va7Y/NkgiRFFaFu0U+OEfuK0V0fQLhzC8 /Qt/KyGTtN+qwOYMGODYEGF2GqTSzvJkSXtgRldru3F4VoRxqrdzuP/1F6AfZuWvC2BtGG cP2riSJ6j4iqms5Vf5LVfja6IKZzAebUn5/rM3StQ8tLkLoYwkq1Mmzm1ewMuul1s0e4M/ VWn203WKHyIWlCFsuCbFeEIMiBvdQ7pkHdATfwRzyHf+zOyjHG0ie1RLlwyD5ehSG3jMSy PzB16jwsxHM+RlyPaYS+dy3pODy/PEl/WFCfADfQR1gGMKq8H2QiLCX2kPY2+w== 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=1719907575; 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=F+2kgvBjt9InWIPbibN6WVMY66VlJkCha92PM0VkDfA=; b=Pu6GVQ9rVOTE9Ff8P0oE8tY0RgB0Clx8rHhDt6jjITcBbqGLvRZy30Vp5yb+SBJaVmi6/4 zz/5lFmoypP5fhvsyE+pJkett6aeZpngDiOiz2jb5ZqujviAQcK7ZUHt0p2HuBmmtOJneN ACFoyQOPfSGRO1EmXB4J+V4Hg+RZH4kWysiBPRBolHFlcGZL3l3l9FDB9QJMbwfnH79Z6A efsZZmSg3dI6wCHn8kj8CqFidmsggZnR+cOgybSjpwUFpR68GaHi/He4clS2Au1LBHQYc0 fd6PujVQ5cIM9wZSn79GhIp57VT5RtBfIjvM63M2rQwsemJ8WAz3suvZQZCj3w== 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 4WCwTg39jhzgGN; Tue, 2 Jul 2024 08:06:15 +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 46286FcY082528; Tue, 2 Jul 2024 08:06:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286Ft5082526; Tue, 2 Jul 2024 08:06:15 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:15 GMT Message-Id: <202407020806.46286Ft5082526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 6bba78e6e936 - stable/14 - iovctl: allow vlan restrictions to be passed to the driver 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6bba78e6e9369c4ef86ef3b666c77f00e3ab083c Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6bba78e6e9369c4ef86ef3b666c77f00e3ab083c commit 6bba78e6e9369c4ef86ef3b666c77f00e3ab083c Author: Kristof Provost AuthorDate: 2024-05-29 17:29:35 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:06:05 +0000 iovctl: allow vlan restrictions to be passed to the driver Allow iovctl to create VFs that are restricted to specific VLAN IDs. Reviewed by: kib, np MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D45402 (cherry picked from commit c57c26179033f64c2011a2d2a904ee3fa62e826a) --- sys/dev/pci/pci_iov_schema.c | 61 +++++++++++++++++++++++++++++++++++++++++++ sys/sys/iov.h | 2 ++ sys/sys/iov_schema.h | 3 ++- usr.sbin/iovctl/iovctl.c | 6 +++++ usr.sbin/iovctl/iovctl.conf.5 | 5 +++- usr.sbin/iovctl/parse.c | 25 ++++++++++++++++++ 6 files changed, 100 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/pci_iov_schema.c b/sys/dev/pci/pci_iov_schema.c index 742dfbd2b4d9..bb87e7215bc8 100644 --- a/sys/dev/pci/pci_iov_schema.c +++ b/sys/dev/pci/pci_iov_schema.c @@ -55,11 +55,13 @@ static validate_func pci_iov_schema_validate_bool; static validate_func pci_iov_schema_validate_string; static validate_func pci_iov_schema_validate_uint; static validate_func pci_iov_schema_validate_unicast_mac; +static validate_func pci_iov_schema_validate_vlan; static default_validate_t pci_iov_validate_bool_default; static default_validate_t pci_iov_validate_string_default; static default_validate_t pci_iov_validate_uint_default; static default_validate_t pci_iov_validate_unicast_mac_default; +static default_validate_t pci_iov_validate_vlan_default; struct config_type_validator { const char *type_name; @@ -108,6 +110,11 @@ static struct config_type_validator pci_iov_schema_validators[] = { .validate = pci_iov_schema_validate_unicast_mac, .default_validate = pci_iov_validate_unicast_mac_default, }, + { + .type_name = "vlan", + .validate = pci_iov_schema_validate_vlan, + .default_validate = pci_iov_validate_vlan_default, + }, }; static const struct config_type_validator * @@ -262,6 +269,26 @@ pci_iov_schema_add_unicast_mac(nvlist_t *schema, const char *name, nvlist_move_nvlist(schema, name, entry); } +void +pci_iov_schema_add_vlan(nvlist_t *schema, const char *name, + uint32_t flags, const uint16_t defaultVal) +{ + nvlist_t *entry; + + entry = nvlist_create(NV_FLAG_IGNORE_CASE); + if (entry == NULL) { + nvlist_set_error(schema, ENOMEM); + return; + } + + pci_iov_schema_add_type(entry, "vlan"); + if (flags & IOV_SCHEMA_HASDEFAULT) + nvlist_add_number(entry, "default", defaultVal); + pci_iov_schema_add_required(entry, flags); + + nvlist_move_nvlist(schema, name, entry); +} + static int pci_iov_schema_validate_bool(const struct config_type_validator * validator, const nvlist_t *config, const char *name) @@ -321,6 +348,24 @@ pci_iov_schema_validate_unicast_mac( return (0); } +static int +pci_iov_schema_validate_vlan( + const struct config_type_validator * validator, + const nvlist_t *config, const char *name) +{ + uint16_t vlan; + + if (!nvlist_exists_number(config, name)) + return (EINVAL); + + vlan = nvlist_get_number(config, name); + + if (vlan > 4095 && vlan != VF_VLAN_TRUNK) + return (EINVAL); + + return (0); +} + static void pci_iov_config_add_default(const nvlist_t *param_schema, const char *name, nvlist_t *config) @@ -401,6 +446,22 @@ pci_iov_validate_unicast_mac_default( return (0); } +static int +pci_iov_validate_vlan_default( + const struct config_type_validator * validator, const nvlist_t *param) +{ + uint16_t vlan; + + if (! nvlist_exists_number(param, DEFAULT_SCHEMA_NAME)) + return (EINVAL); + + vlan = nvlist_get_number(param, DEFAULT_SCHEMA_NAME); + if (vlan > 4095 && vlan != VF_VLAN_TRUNK) + return (EINVAL); + + return (0); +} + static int pci_iov_validate_param_schema(const nvlist_t *schema) { diff --git a/sys/sys/iov.h b/sys/sys/iov.h index 0171fc5a98cf..2ae7e5ac6767 100644 --- a/sys/sys/iov.h +++ b/sys/sys/iov.h @@ -46,6 +46,8 @@ #define DEFAULT_SCHEMA_NAME "DEFAULT" #define REQUIRED_SCHEMA_NAME "REQUIRED" +#define VF_VLAN_TRUNK 4096 + /* * Because each PF device is expected to expose a unique set of possible * configurations, the SR-IOV infrastructure dynamically queries the PF diff --git a/sys/sys/iov_schema.h b/sys/sys/iov_schema.h index cb50f7796d30..66c883540563 100644 --- a/sys/sys/iov_schema.h +++ b/sys/sys/iov_schema.h @@ -48,5 +48,6 @@ void pci_iov_schema_add_uint64(nvlist_t *schema, const char *name, uint32_t flags, uint64_t defaultVal); void pci_iov_schema_add_unicast_mac(nvlist_t *schema, const char *name, uint32_t flags, const uint8_t * defaultVal); - +void pci_iov_schema_add_vlan(nvlist_t *schema, const char *name, + uint32_t flags, const uint16_t defaultVal); #endif diff --git a/usr.sbin/iovctl/iovctl.c b/usr.sbin/iovctl/iovctl.c index 413fb7b2f4a5..368fa51c594f 100644 --- a/usr.sbin/iovctl/iovctl.c +++ b/usr.sbin/iovctl/iovctl.c @@ -346,6 +346,12 @@ print_default_value(const nvlist_t *parameter, const char *type) mac = nvlist_get_binary(parameter, DEFAULT_SCHEMA_NAME, &size); printf(" (default = %02x:%02x:%02x:%02x:%02x:%02x)", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + } else if (strcasecmp(type, "vlan") == 0) { + uint16_t vlan = nvlist_get_number(parameter, DEFAULT_SCHEMA_NAME); + if (vlan == VF_VLAN_TRUNK) + printf(" (default = trunk)"); + else + printf(" (default = %d)", vlan); } else errx(1, "Unexpected type in schema: '%s'", type); } diff --git a/usr.sbin/iovctl/iovctl.conf.5 b/usr.sbin/iovctl/iovctl.conf.5 index a7eb6c2077ee..1bae96e150ba 100644 --- a/usr.sbin/iovctl/iovctl.conf.5 +++ b/usr.sbin/iovctl/iovctl.conf.5 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 29, 2020 +.Dd May 30, 2024 .Dt IOVCTL.CONF 5 .Os .Sh NAME @@ -95,6 +95,8 @@ The following option types are supported: .Bl -tag -width indent .It boolean Accepts a boolean value of true or false. +.It vlan +Accepts a VLAN ID, or "trunk" to allow any VLAN ID. .It mac-addr Accepts a unicast MAC address specified as a string of the form xx:xx:xx:xx:xx:xx, where xx is one or two hexadecimal digits. @@ -159,6 +161,7 @@ DEFAULT { VF-0 { mac-addr : "02:56:48:7e:d9:f7"; passthrough : false; + vlan: 1; } .Ed .Sh SEE ALSO diff --git a/usr.sbin/iovctl/parse.c b/usr.sbin/iovctl/parse.c index d04c008b449c..8bf37fa97979 100644 --- a/usr.sbin/iovctl/parse.c +++ b/usr.sbin/iovctl/parse.c @@ -161,6 +161,29 @@ add_unicast_mac_config(const char *key, const ucl_object_t *obj, nvlist_t *confi nvlist_add_binary(config, key, mac, ETHER_ADDR_LEN); } +static void +add_vlan_config(const char *key, const ucl_object_t *obj, nvlist_t *config) +{ + int64_t val; + const char *strVal = ""; + + if(ucl_object_tostring_safe(obj, &strVal)) { + if (strcasecmp(strVal, "trunk") == 0) { + nvlist_add_number(config, key, VF_VLAN_TRUNK); + return; + } + report_config_error(key, obj, "vlan"); + } + + if (!ucl_object_toint_safe(obj, &val)) + report_config_error(key, obj, "vlan"); + + if (val < 0 || val > 4095) + report_config_error(key, obj, "vlan"); + + nvlist_add_number(config, key, val); +} + /* * Validates that the given configuration value has the right type as specified * in the schema, and then adds the value to the configuration node. @@ -187,6 +210,8 @@ add_config(const char *key, const ucl_object_t *obj, nvlist_t *config, add_uint_config(key, obj, config, type, UINT64_MAX); else if (strcasecmp(type, "unicast-mac") == 0) add_unicast_mac_config(key, obj, config); + else if (strcasecmp(type, "vlan") == 0) + add_vlan_config(key, obj, config); else errx(1, "Unexpected type '%s' in schema", type); } From nobody Tue Jul 2 08:06:16 2024 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 4WCwTj0zl6z5PhZl; Tue, 02 Jul 2024 08:06:17 +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 4WCwTh4zvlz4Hv8; Tue, 2 Jul 2024 08:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907576; 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=EvKusVxuh4UdHOJMqEqc331UShOH5q/pFQQw+QUO8Hw=; b=tZ8CySHsUnMY9p3wFzIyQ5OVbcqo1Ogn6I6LjX+8lMr2ZAzDCy64D9RLs6qAWh7hWgslrH kWo3HKoXw1yoemdjFPSMzMSsOKujTYOmd9dUQZn85O1OaxgoGc8No3zmQVjLx9t7HGIY9c Ol/rvSBnWRkeJc7Mp2Xc8eelaO0lRa32jVq85IkYxmEHLP8I1EfSwdv9wq+7nvKhCTdHQi T7huzM6s11OIku5gLwESxSTiNCIUjfr/RweEkyQnzDdq+V/eGUklhSg2zCj8d0+RA/3vs0 IP+E6vLlDrCAekKrxUOjWpBt1WzM4fd73ddJ7B45ATgBRI5A+BkTMCOgW8inVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907576; a=rsa-sha256; cv=none; b=q2LRwlUSYecbStWmAEgnZ/wd89MQ1RKNDdoPmd1aO3Sld2bh0QdlrzpiI3WvxaYH62T7jD aO+91ZysPFkxn01+tPuizGzcW9rkCiNWeCfxdkSINbOpKjfpCL4T0ayXQXG+L2QFUnevPv bdZwV+vnTO3NDQM8pNuVjmnuPww3MZO0/3sjPNP9SrcJ4P7XBRBwNWxbiylHak7NiHirO8 /DTaFl/oxgsI4es+vkPaDzf6McSv/zeeVeKpxF81Py1uejpYAWgPoBrnYJYTeNb+lXTXt0 u7Kf+nFck+ns0DzdBIfetWhSGfygrY4QWtj5MXQ3S8MLVogZHquN7BmaHM21Ew== 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=1719907576; 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=EvKusVxuh4UdHOJMqEqc331UShOH5q/pFQQw+QUO8Hw=; b=mTphM9vf9SU3tZKpUz36ZHhF6bAx10tXD4qZl7ZRLSKZZXESjTkQDQ7o3agIshvItrXu3F MCU85Ge0baJTaiN3sk6BLkUq2GgpubbbK0HWCOJ+tb7O7iPhnuh2vMEFPPzZ0qwosxcWVo 3uQNwHA4ocBf+OSdm9BmM+vR3gpwD8EFJGrUuQeBKr72xCA/MKYXBd7nFnXUPL/WXYUBS5 mZNTcl3ldCi5Zj91TkeytA2bRVbFDZVdtQdbmjgQfn928upER+5lIF/fI8kEb9go1G0UPU KjnPeZCcsDi8DUpNiR0RmQ30AZcTw0kTQ2YMC8wPPcsr0nedRM0ZKc1g+/alXQ== 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 4WCwTh4WsbzgcF; Tue, 2 Jul 2024 08:06:16 +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 46286GgM082654; Tue, 2 Jul 2024 08:06:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286GZ0082651; Tue, 2 Jul 2024 08:06:16 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:16 GMT Message-Id: <202407020806.46286GZ0082651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: f0f1580cab27 - stable/13 - cxgbe: handle vlan PF restrictions 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f0f1580cab2738b734d956eae9c551b9678cd4d5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f0f1580cab2738b734d956eae9c551b9678cd4d5 commit f0f1580cab2738b734d956eae9c551b9678cd4d5 Author: Kristof Provost AuthorDate: 2024-05-30 13:59:09 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:53 +0000 cxgbe: handle vlan PF restrictions Co-Authored-by: Navdeep Parhar MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D45428 (cherry picked from commit 1389314d53531e06c7ec02406b0addf7d77e7db7) --- sys/dev/cxgbe/common/t4_hw.c | 7 ++++--- sys/dev/cxgbe/t4_iov.c | 37 +++++++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index c18243e4b681..c428fd2720cd 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -11466,7 +11466,7 @@ out: * @vlan: The vlanid to be set * */ -int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, +int t4_set_vlan_acl(struct adapter *adap, unsigned int pf, unsigned int vf, u16 vlan) { struct fw_acl_vlan_cmd vlan_cmd; @@ -11478,9 +11478,10 @@ int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, F_FW_CMD_REQUEST | F_FW_CMD_WRITE | F_FW_CMD_EXEC | - V_FW_ACL_VLAN_CMD_PFN(adap->pf) | + V_FW_ACL_VLAN_CMD_PFN(pf) | V_FW_ACL_VLAN_CMD_VFN(vf)); - vlan_cmd.en_to_len16 = cpu_to_be32(enable | FW_LEN16(vlan_cmd)); + vlan_cmd.en_to_len16 = cpu_to_be32(enable | FW_LEN16(vlan_cmd) | + V_FW_ACL_VLAN_CMD_PMASK(1 << pf)); /* Drop all packets that donot match vlan id */ vlan_cmd.dropnovlan_fm = (enable ? (F_FW_ACL_VLAN_CMD_DROPNOVLAN | diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c index b063bda233b9..6409f3e3f994 100644 --- a/sys/dev/cxgbe/t4_iov.c +++ b/sys/dev/cxgbe/t4_iov.c @@ -30,8 +30,12 @@ #include #include #include +#include #include +#include #include +#include +#include #ifdef PCI_IOV #include @@ -258,6 +262,7 @@ t4iov_attach_child(device_t dev) pf_schema = pci_iov_schema_alloc_node(); vf_schema = pci_iov_schema_alloc_node(); pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); + pci_iov_schema_add_vlan(vf_schema, "vlan", 0, 0); error = pci_iov_attach_name(dev, pf_schema, vf_schema, "%s", device_get_nameunit(pdev)); if (error) { @@ -337,14 +342,15 @@ t4iov_add_vf(device_t dev, uint16_t vfnum, const struct nvlist *config) size_t size; int rc; + sc = device_get_softc(dev); + MPASS(sc->sc_attached); + MPASS(sc->sc_main != NULL); + adap = device_get_softc(sc->sc_main); + if (nvlist_exists_binary(config, "mac-addr")) { mac = nvlist_get_binary(config, "mac-addr", &size); bcopy(mac, ma, ETHER_ADDR_LEN); - sc = device_get_softc(dev); - MPASS(sc->sc_attached); - MPASS(sc->sc_main != NULL); - adap = device_get_softc(sc->sc_main); if (begin_synchronized_op(adap, NULL, SLEEP_OK | INTR_OK, "t4vfma") != 0) return (ENXIO); @@ -359,6 +365,29 @@ t4iov_add_vf(device_t dev, uint16_t vfnum, const struct nvlist *config) } } + if (nvlist_exists_number(config, "vlan")) { + uint16_t vlan = nvlist_get_number(config, "vlan"); + + /* We can't restrict to VID 0 */ + if (vlan == 0) + return (ENOTSUP); + + if (vlan == VF_VLAN_TRUNK) + vlan = 0; + + if (begin_synchronized_op(adap, NULL, SLEEP_OK | INTR_OK, + "t4vfvl") != 0) + return (ENXIO); + rc = t4_set_vlan_acl(adap, sc->pf, vfnum + 1, vlan); + end_synchronized_op(adap, 0); + if (rc != 0) { + device_printf(dev, + "Failed to set VF%d VLAN to %d, rc = %d\n", + vfnum, vlan, rc); + return (rc); + } + } + return (0); } #endif From nobody Tue Jul 2 08:06:16 2024 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 4WCwTh51bxz5PhVj; Tue, 02 Jul 2024 08:06:16 +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 4WCwTh4Kw7z4J9P; Tue, 2 Jul 2024 08:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907576; 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=/reQYK5QFvJaIZ71nvnBUW6OtpXtzxbl0EcUMTXFnVA=; b=LdoOWUdd+e1XPtqpu2RLUV4pFDgqNGO0vTcWerN2wSAhdj2CS9Z31h1UV8WYiU6X1GU5di tP2uZXlqnehNpWaCeV2lGk0psLhiOAiM9+f2ENtByfshucuLLFAtYNKdiAMtYAS8Kejskm FNbh9JdwxifrOkdXD9ytqFlNNjW3apB5afbp9H9vpR8glB7/l1wBsw1Jp/IkVyQOVkddMA PfWwaC5ttrrkr65RdOkYzQLXCUNUVX+cIj1WmHKHAqWe+c5upwFlUFXCdDZv5b0p/mmp3F O3Q8U+nsWCs70M1mrpZtZaPwLI5RmNg0dH818vEwtJe+rpo9pmJs8z8dYs0+DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907576; a=rsa-sha256; cv=none; b=AcnYTW7F+38cYXUEy6LNuU2TKKwKJXNKIv+TL7ICETvyfSX9LRrtoQvk+X2v8ai8hz66dY JS2NoGi2W4oAgonogX+VIhDTno3qKbreEvcH2xQ+BqnNDUHevzWEEi+uo93H9x0aBmL/bE tcfg0Y/vSplDVSqH7qgdcHPxoz1yCGSqmdy0BaIdPIBbTjIdXmQHS4n43gD77Zgf3Ja+FD TMH+C/t6/3h/zKvFtK31wsfXQAa0jUb+1lVqzzJBYooguyREkaGPsYDzZtQm0j0L0oPwlH V+RGh1ZxZ5y8AwTFm9/86k5v/nX5Kc6QpAP0hXfNjxLrIya7wYnIWkRTi9B9XQ== 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=1719907576; 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=/reQYK5QFvJaIZ71nvnBUW6OtpXtzxbl0EcUMTXFnVA=; b=GXZ+4NgyTY/3Lzn2BaY5AiIAEm7KBt3Jg5Q6BDKl7CaekA9C7n9AVtu+zwa1u+425J1IWr u6LiGQ/lAJnCD4azsLk3CFPBW0rkIJUOQd3lpEdW5hoyV9kQ0Gd533UR3xA34hSPPBjCMv dRVJAvspgWYPUSikqXzxrZbdpjcWua72qrsqdmrthHb/fMScy2MLA3+wlL1ugFe4V412gH 5QvR/FJqKp22DV1stK5qrU7dT05r6itZnN31SKQUPFO1FJu0yS7agoOFgP2OcOKp5kE4mS MDwXQF8aaJsXtGrSOOG0wS/K1clVALcnffCkHp67RnOlUC557Avp6znIYfWnqw== 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 4WCwTh3yNQzgcD; Tue, 2 Jul 2024 08:06:16 +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 46286G1t082612; Tue, 2 Jul 2024 08:06:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286G8e082609; Tue, 2 Jul 2024 08:06:16 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:16 GMT Message-Id: <202407020806.46286G8e082609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9c86768b14f6 - stable/14 - mlx5: handle vlan PF restrictions 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9c86768b14f67ae071201addfe28d12eaca45fac Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9c86768b14f67ae071201addfe28d12eaca45fac commit 9c86768b14f67ae071201addfe28d12eaca45fac Author: Kristof Provost AuthorDate: 2024-05-30 13:56:56 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:06:09 +0000 mlx5: handle vlan PF restrictions Reviewed by: kib MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D45427 (cherry picked from commit 7deadea2eb0aca0b83657d30f895d98795d9d81f) --- sys/dev/mlx5/mlx5_core/mlx5_main.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 6b9b63a24714..95d88c728306 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -52,8 +52,12 @@ #include #ifdef PCI_IOV #include +#include #include #include +#include +#include +#include #endif static const char mlx5_version[] = "Mellanox Core driver " @@ -225,6 +229,7 @@ static void mlx5_set_driver_version(struct mlx5_core_dev *dev) #ifdef PCI_IOV static const char iov_mac_addr_name[] = "mac-addr"; +static const char iov_vlan_name[] = "vlan"; static const char iov_node_guid_name[] = "node-guid"; static const char iov_port_guid_name[] = "port-guid"; #endif @@ -1714,6 +1719,8 @@ static int init_one(struct pci_dev *pdev, vf_schema = pci_iov_schema_alloc_node(); pci_iov_schema_add_unicast_mac(vf_schema, iov_mac_addr_name, 0, NULL); + pci_iov_schema_add_vlan(vf_schema, + iov_vlan_name, 0, 0); pci_iov_schema_add_uint64(vf_schema, iov_node_guid_name, 0, 0); pci_iov_schema_add_uint64(vf_schema, iov_port_guid_name, @@ -1950,6 +1957,25 @@ mlx5_iov_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *vf_config) } } + if (nvlist_exists_number(vf_config, iov_vlan_name)) { + uint16_t vlan = nvlist_get_number(vf_config, iov_vlan_name); + + if (vlan == DOT1Q_VID_NULL) + error = ENOTSUP; + else { + if (vlan == VF_VLAN_TRUNK) + vlan = DOT1Q_VID_NULL; + + error = -mlx5_eswitch_set_vport_vlan(priv->eswitch, + vfnum + 1, vlan, 0); + } + if (error != 0) { + mlx5_core_err(core_dev, + "setting VLAN for VF %d failed, error %d\n", + vfnum + 1, error); + } + } + if (nvlist_exists_number(vf_config, iov_node_guid_name)) { node_guid = nvlist_get_number(vf_config, iov_node_guid_name); error = -mlx5_modify_nic_vport_node_guid(core_dev, vfnum + 1, From nobody Tue Jul 2 08:06:17 2024 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 4WCwTk0mXgz5PhXf; Tue, 02 Jul 2024 08:06:18 +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 4WCwTj5vVqz4JLv; Tue, 2 Jul 2024 08:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907577; 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=KrpRfnexn05WKI5gMZiMihKo0kloXR6Ff2wJOJg/xNg=; b=YitUkMS92c8ZqvyrcInacr09GWiGDvchCSUHMrQYRBwFeUbXAlnoEcdavBgF0xG970QW2i VAucrb8t4RKs72qKe+td9/Sbt9i/ZAvUO+x23v6vtiPcB1vYpZAnYArx1cV+lpdmmM6MKb T/Bv/XIXmGwt4EWZ40qbW8O+iphl1PExw3SgvoTOpETiK/NYtuGQRoAvvWiJpU2Jjblh4A 7VByyKmkbLoO65SeVRoqUIQOIKoek8ZRoRBbiN+jNS9Sq2iQtNgpv0m7NdAYhDKtjYROg7 eZ8L0J1Eo8sjGARyvmzHPxG9lUyNWjX0JnYeZqWZxpnSgRPhIULA3ARvBq1Rcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907577; a=rsa-sha256; cv=none; b=XrV44coPlFRJTk/8/yUz1PFgxrLTNAoosRdbu6Q/MJEp0tBY3gDqJPpJ2Swp0ie1x2i94x ZVMcTVnZS6QaWhpYkYDgpF9XdOlcjxN7cR3Q0UlkESKWtdPW1+pzh28AcpfdQhff73QDuy TMc8ei+xMxC5+TaiGOUyMnmcQjSZzosfZUrJxlTA6cSxb9aDeomwWNgw9oAgkAR6nSdR2P UlK1OHgZ1vs8TFC6fKFS8Fpt2S4dCscv/9siMBmCMAWNI0qbWwl1ke8b+gKrL/jiS7pNGt XhkBwuQoMFjZQna97+nzmArYCCh2hXV1n6LgS/eGhHBjL3PWpAKEfDWckC49LQ== 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=1719907577; 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=KrpRfnexn05WKI5gMZiMihKo0kloXR6Ff2wJOJg/xNg=; b=xaGVEslWvONgY3gitPWeaF8dzvH8T3+Xz6OqvP8bj1qv4Gy8d/bKsbesbaILuJGi1zJkuY F7/PBtBkHUp6KZB76QI4E5b9r4M9wk0FJdWRGsTUBDyGGBSCpDxJlMbVHr7WzneXDR+0Gm T0+SjBbkRyRvCCVHqacVwgj0AEC9rCH6eiR3LazpXsS9l/g/LlRCpF9L2FmhQfBjMLPI5u AIN7agSUI2eVxORiUFoo472vKKXtCDfLHC9/ErPDT4C67TdFc2WSkMNjO1KMr7BjEKpiPD WSCj7+OgPGJP/F+OhY2GTWWQZ7/bmuJzxXUcWUpJnN/xps+EAyFu9ZwjqEmn/w== 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 4WCwTj5Bf2zgKq; Tue, 2 Jul 2024 08:06:17 +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 46286HcS082765; Tue, 2 Jul 2024 08:06:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286HWB082762; Tue, 2 Jul 2024 08:06:17 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:17 GMT Message-Id: <202407020806.46286HWB082762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 460d934fd3d8 - stable/13 - cxgbev(4): Use the correct source pf for T6 in the VF driver. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 460d934fd3d81d478b7ede6351baf16335c4bfe6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=460d934fd3d81d478b7ede6351baf16335c4bfe6 commit 460d934fd3d81d478b7ede6351baf16335c4bfe6 Author: Navdeep Parhar AuthorDate: 2024-06-16 18:27:15 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:53 +0000 cxgbev(4): Use the correct source pf for T6 in the VF driver. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit d0fdafdb0ef4ec9c5c66f39daf2eca926f14be0d) --- sys/dev/cxgbe/common/t4vf_hw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/common/t4vf_hw.c b/sys/dev/cxgbe/common/t4vf_hw.c index 25ab3db77c72..a0c2eb5f60b3 100644 --- a/sys/dev/cxgbe/common/t4vf_hw.c +++ b/sys/dev/cxgbe/common/t4vf_hw.c @@ -139,7 +139,10 @@ int t4vf_get_sge_params(struct adapter *adapter) * This is based on the PF from which we're instantiated. */ whoami = t4_read_reg(adapter, VF_PL_REG(A_PL_VF_WHOAMI)); - pf = G_SOURCEPF(whoami); + if (chip_id(adapter) <= CHELSIO_T5) + pf = G_SOURCEPF(whoami); + else + pf = G_T6_SOURCEPF(whoami); s_hps = (S_HOSTPAGESIZEPF0 + (S_HOSTPAGESIZEPF1 - S_HOSTPAGESIZEPF0) * pf); From nobody Tue Jul 2 08:06:17 2024 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 4WCwTj6lFFz5Phm1; Tue, 02 Jul 2024 08:06:17 +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 4WCwTj5TSCz4JPQ; Tue, 2 Jul 2024 08:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907577; 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=pxU4tpeam6B9xWL3gnYdItVld6EX3IUQX0O3dwk+qCw=; b=AVl8wks3asHEHvd975EV92a6gfHh2vjdS0qX7rrv5hRGxDZSdh8zKoYAlVeg9p3aQZffK+ cfX5pMVUOqeH/cNyuAthodyxyn5p+ATfB9HEb8cJk3Gi0IqmX6YTDOQTT+cdjBpAUDP8Cp 4sAkl4CYBtILkn/DIFmsoMvPeGc+nDDAmpHc5I3PH1uTmj3fhAj/HLz9wANlAYyHlFofwJ qwNNAnth+6xFGxOSqAGNPoWsg+1WsOGo9tpiPAytVruciuUaAfhCvTQ4XtpZ4EvjO2LbGW V03QBDxPDYmuMrzvP97d8PRY2mo/fIku+6r6TOg0pwJ5A3LrxakJkgOzhICxYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907577; a=rsa-sha256; cv=none; b=HlOjDDG1bSLBtURxkD9JYq7KZjs1adxy2vbpEgphZsX48CfI5n3tgKhLR2xTMsTD+0hgIp fH7o7MFDvn5St8+7I5MEJKpH4tqXmxOk1UoPaeDNvcgVwM8A1RYvdmGYb4/DIrXPXw1zmE i3WOFLwRPdZamRMmuX5IoKxF260M6Jlu24E9n8QjiExx2CrjwOBnN3E17A8AwfaeCGihRD brinRV7bpzaV0qBzsIyJ2XOtbxfgHJUaKbXQFt80frtUG5mOPrwHrI1OnXJhXut2oMB7el aKRNGfE08HLkjUsRmNJdsXyZMbCVdd72YwS3Bfd2eZ3BQ8jCU/c7AFe/lCqzYA== 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=1719907577; 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=pxU4tpeam6B9xWL3gnYdItVld6EX3IUQX0O3dwk+qCw=; b=waBPfajWPekXXmDNDAQIm53M5pWq8oDmEi8Cfn5bHLFMrNZ4kpNtEwj+cXF6ijaCKgdM7n becsg9oiYRAHQ227z3CGMCzSVQ3oIbCy9LX4Zz+OpC27RD1A/pk5U1/pbasYhLDRMENLTH TsNWjPwOi1vShLJ7VEh2w9T5B9nlzpV7vEt3oz5CMRs+THm36thI90JkfpEJ0B6lfjAZAM 4OtUqxvQQqkcZO/yPivVli8bKQCSx458+lN9Gb0OOwlhhSlY3qaLa2CSH38QGZ3lh+K8mc e/gkm08CS95wCrel5WFaNVcUjoKlNNBUN5j8uPsEIDRh8CwTsm5pg5dvNEXLIQ== 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 4WCwTj4bkfzgGQ; Tue, 2 Jul 2024 08:06:17 +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 46286HLq082701; Tue, 2 Jul 2024 08:06:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286HKw082697; Tue, 2 Jul 2024 08:06:17 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:17 GMT Message-Id: <202407020806.46286HKw082697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 406415364308 - stable/14 - cxgbe: handle vlan PF restrictions 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 406415364308dc11b220b0a89a414fda66a52148 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=406415364308dc11b220b0a89a414fda66a52148 commit 406415364308dc11b220b0a89a414fda66a52148 Author: Kristof Provost AuthorDate: 2024-05-30 13:59:09 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:06:16 +0000 cxgbe: handle vlan PF restrictions Co-Authored-by: Navdeep Parhar MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D45428 (cherry picked from commit 1389314d53531e06c7ec02406b0addf7d77e7db7) --- sys/dev/cxgbe/common/t4_hw.c | 7 ++++--- sys/dev/cxgbe/t4_iov.c | 37 +++++++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index c18243e4b681..c428fd2720cd 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -11466,7 +11466,7 @@ out: * @vlan: The vlanid to be set * */ -int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, +int t4_set_vlan_acl(struct adapter *adap, unsigned int pf, unsigned int vf, u16 vlan) { struct fw_acl_vlan_cmd vlan_cmd; @@ -11478,9 +11478,10 @@ int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, F_FW_CMD_REQUEST | F_FW_CMD_WRITE | F_FW_CMD_EXEC | - V_FW_ACL_VLAN_CMD_PFN(adap->pf) | + V_FW_ACL_VLAN_CMD_PFN(pf) | V_FW_ACL_VLAN_CMD_VFN(vf)); - vlan_cmd.en_to_len16 = cpu_to_be32(enable | FW_LEN16(vlan_cmd)); + vlan_cmd.en_to_len16 = cpu_to_be32(enable | FW_LEN16(vlan_cmd) | + V_FW_ACL_VLAN_CMD_PMASK(1 << pf)); /* Drop all packets that donot match vlan id */ vlan_cmd.dropnovlan_fm = (enable ? (F_FW_ACL_VLAN_CMD_DROPNOVLAN | diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c index 1971c3b15c4f..7f4e80ca020d 100644 --- a/sys/dev/cxgbe/t4_iov.c +++ b/sys/dev/cxgbe/t4_iov.c @@ -30,8 +30,12 @@ #include #include #include +#include #include +#include #include +#include +#include #ifdef PCI_IOV #include @@ -258,6 +262,7 @@ t4iov_attach_child(device_t dev) pf_schema = pci_iov_schema_alloc_node(); vf_schema = pci_iov_schema_alloc_node(); pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); + pci_iov_schema_add_vlan(vf_schema, "vlan", 0, 0); error = pci_iov_attach_name(dev, pf_schema, vf_schema, "%s", device_get_nameunit(pdev)); if (error) { @@ -337,14 +342,15 @@ t4iov_add_vf(device_t dev, uint16_t vfnum, const struct nvlist *config) size_t size; int rc; + sc = device_get_softc(dev); + MPASS(sc->sc_attached); + MPASS(sc->sc_main != NULL); + adap = device_get_softc(sc->sc_main); + if (nvlist_exists_binary(config, "mac-addr")) { mac = nvlist_get_binary(config, "mac-addr", &size); bcopy(mac, ma, ETHER_ADDR_LEN); - sc = device_get_softc(dev); - MPASS(sc->sc_attached); - MPASS(sc->sc_main != NULL); - adap = device_get_softc(sc->sc_main); if (begin_synchronized_op(adap, NULL, SLEEP_OK | INTR_OK, "t4vfma") != 0) return (ENXIO); @@ -359,6 +365,29 @@ t4iov_add_vf(device_t dev, uint16_t vfnum, const struct nvlist *config) } } + if (nvlist_exists_number(config, "vlan")) { + uint16_t vlan = nvlist_get_number(config, "vlan"); + + /* We can't restrict to VID 0 */ + if (vlan == DOT1Q_VID_NULL) + return (ENOTSUP); + + if (vlan == VF_VLAN_TRUNK) + vlan = DOT1Q_VID_NULL; + + if (begin_synchronized_op(adap, NULL, SLEEP_OK | INTR_OK, + "t4vfvl") != 0) + return (ENXIO); + rc = t4_set_vlan_acl(adap, sc->pf, vfnum + 1, vlan); + end_synchronized_op(adap, 0); + if (rc != 0) { + device_printf(dev, + "Failed to set VF%d VLAN to %d, rc = %d\n", + vfnum, vlan, rc); + return (rc); + } + } + return (0); } #endif From nobody Tue Jul 2 08:06:18 2024 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 4WCwTl14Kjz5PhXs; Tue, 02 Jul 2024 08:06:19 +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 4WCwTk6JJ8z4JKf; Tue, 2 Jul 2024 08:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907578; 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=4yFm8UmMbFPdoVyjIkRV1xAswqxUNCGS48Dg0ETGJwU=; b=qGAPbBVQWhQCpywEES0MM8hgdBvOmNbEQ4+e3m6b8rnouvbmVJIcq8ZE0JbIFSsAryPYAB W4sekks9jFKtAPz7KZ+fU5MdZ3q24IomI+W5zwNiwYqvkK80nIfNktpzPzxIvCbTCEnhkK mHP7Qx2LevqD6YXSORrBpEWTw0r/THTF3vxRTYI7VM2gpkksKC5/viG81JcCUHBmgSzhzh i+HfKI7xDpHUBZupfYK9y2G3IGuQQo33jv2I2aGzscidNj37w5nbAR6cm1FopzfsGVFGIq C871vDgiSzNvYq7dj/QoDqfpjW8dd58lMSGdlV/C88wAHAG/6KeQCTY1TZ2dmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907578; a=rsa-sha256; cv=none; b=DOSJDZdLQZXB2jaMRguL7uQXUkRbkLFqV/Vb89nno1F1S9gURlMPQBh0kRR/yp8XSBYU07 JmHMUtasiL7Ph4X9lUpXIJa1SbhzvEOIzVXTYUJu6/sMbrWrz0x23nP7Qn613TNg4LXOwc iLODPTAfN6cFdwBf0mXo4A9LgRhKtl+i6359hAKTusC9b5jdX4VHUrW+02IIp7j1gP33aE GqK6W34pnmz1vSjkrV85rB/W3Hc8V9gIgLrJFt0XS02Kq5nWFiXrlLwCh+umUVXQOVQlWs P0rpJbpthOEXLafquzJRyD4kdbsCLuzTdl5yWtJ6r9L3tKhZ8REYvSz5UgJUwA== 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=1719907578; 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=4yFm8UmMbFPdoVyjIkRV1xAswqxUNCGS48Dg0ETGJwU=; b=o7plDmlzItmoHdBBgewzUT8YdZh6tYgdZEvEq3M5FPsNvc4rsSpsJZNL471EHzohHg7y11 Fi10ILtXf9zlRbM3svtzhWluiRH+7+vn9hGNgnkWolvVEvd00HKt51BmHhQtCqsDyW0xxa j7/DBbdmn9+sONyEOq1f9iQs/JnWha1SkGQq7GjzPH/C3CKW5zMiNp59G7VJkNjRMXUCbh 5rR5mo5fSmcTTxvyUAgdpV52w/yHSh6SvdAUsJNx9msxXjC/N1y7R5UrZl4LviBYDJY84v /6zU8Wy8+SMs0zu+RQzQBjaLjklexTgDCx+2vWJ5COBZhc9TD2Ld/9fxJ0FUUA== 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 4WCwTk5rc2zgJh; Tue, 2 Jul 2024 08:06:18 +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 46286Ijg082866; Tue, 2 Jul 2024 08:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286IYd082845; Tue, 2 Jul 2024 08:06:18 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:18 GMT Message-Id: <202407020806.46286IYd082845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b913bd160626 - stable/14 - cxgbev(4): Use the correct source pf for T6 in the VF driver. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b913bd160626d8837e9623665eaa53feaca0c0c2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b913bd160626d8837e9623665eaa53feaca0c0c2 commit b913bd160626d8837e9623665eaa53feaca0c0c2 Author: Navdeep Parhar AuthorDate: 2024-06-16 18:27:15 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:07:39 +0000 cxgbev(4): Use the correct source pf for T6 in the VF driver. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit d0fdafdb0ef4ec9c5c66f39daf2eca926f14be0d) --- sys/dev/cxgbe/common/t4vf_hw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/common/t4vf_hw.c b/sys/dev/cxgbe/common/t4vf_hw.c index 25ab3db77c72..a0c2eb5f60b3 100644 --- a/sys/dev/cxgbe/common/t4vf_hw.c +++ b/sys/dev/cxgbe/common/t4vf_hw.c @@ -139,7 +139,10 @@ int t4vf_get_sge_params(struct adapter *adapter) * This is based on the PF from which we're instantiated. */ whoami = t4_read_reg(adapter, VF_PL_REG(A_PL_VF_WHOAMI)); - pf = G_SOURCEPF(whoami); + if (chip_id(adapter) <= CHELSIO_T5) + pf = G_SOURCEPF(whoami); + else + pf = G_T6_SOURCEPF(whoami); s_hps = (S_HOSTPAGESIZEPF0 + (S_HOSTPAGESIZEPF1 - S_HOSTPAGESIZEPF0) * pf); From nobody Tue Jul 2 08:06:18 2024 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 4WCwTl2NZVz5PhZy; Tue, 02 Jul 2024 08:06:19 +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 4WCwTk6xK1z4HxM; Tue, 2 Jul 2024 08:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907579; 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=hOtPnbe61HAMQYpfRYFPZNN1GYdMRVZm+Ztb8QkIfb8=; b=Tahg7kv3pJBrlXAv9rQgd4N0Ed3Ic9qu6By9EJcr4VJ8vDCvPO/EiuOJRtEfcIUXCB/zJf buu4eCFrij6PuDYQHoJwJkPLLVy/Vcx/xA53hUqmpX+Lg5sAy1hvRaYwZSbgpgNAK2PHKm jazMHe3XVmn7xq2Y3UkzQiUmiXQVp81mqyccm4eCJx3O+vICiu+GdwzkQUcOIjyqWGUC1p DxjND88KkhggZYG5e2M9+wcZ455gx0DeL+8Fi+J2jKRideoho6r6IpFwgrgQrZU0+SKuz/ sh+ypicZct5u46ZVZ503FPjQmdJSrDrW6S94k605OWbUJwDY7IIP8RIQvVeGGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907579; a=rsa-sha256; cv=none; b=mITkL2GNKXw++NYcSZtfHuoafLcHUXzpIBXMJszUUuw+gFXSo4LzoiTiHK15HvpmfiGMD2 LbsLpS9L6C+oRkUvQrL3levs6Qje0FMMQVdGJ1l7KgfRyTXV5PhO91n20P15pQCRMzt5Ag CTgL/kp/9aT6IQz2jhXi89veS1m4MvRFpbCihVub3f6fREbBLj31TTtO5/6bB7XNsL8iEs Rh3U4uLkhutZfQ+yDYLC/WfWyF4oSGNGVwQ5CwPgUyN0mAx7AKybS7GSdDaiGJWXNcyu3y 0proItH1g+F9izJccqeSHkqu0fnUpQIyGQAfhG3Fgj4jKPhpWlbG0C0vf8TIDw== 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=1719907579; 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=hOtPnbe61HAMQYpfRYFPZNN1GYdMRVZm+Ztb8QkIfb8=; b=InOpEFjJlCD4SfDE95S8/tkpwfn05ymu3P157BVC/ZuYa4sI7nP141zF/D5KrB6C2PT2v0 0dS11ruqW6/SZblQcK8YTdNUbGAU1Rl1wg+KNiWL1dEOZjOiIq3Qkwc3tbS2F/+jkkZxXy XWcMLNgl9iZVrWybeidpCB2fgtho4MbQUt2yOlnXOSfjJR/LslZ9INaeiccaMb5Q/iMQ5J lzA/cQ47YnCt85GfCj96xxaa0Iji6jS1twYhQ9zGa0W3pHs/xKRwC0noSNqjj+HaW3pGiu HQqKc1GUdHAPMhcOQ439cdlAz0p5Y9MoRDh0hGo542BAbh7IVUZM9HaVVJRLBA== 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 4WCwTk6CrLzgb5; Tue, 2 Jul 2024 08:06:18 +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 46286IKX082882; Tue, 2 Jul 2024 08:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286Inv082879; Tue, 2 Jul 2024 08:06:18 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:18 GMT Message-Id: <202407020806.46286Inv082879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 23fb99961111 - stable/13 - cxgbe(4): Do not issue an L1CFG command from a VF. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 23fb99961111f5e3f5185cc43cd58380a675d4f8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=23fb99961111f5e3f5185cc43cd58380a675d4f8 commit 23fb99961111f5e3f5185cc43cd58380a675d4f8 Author: Navdeep Parhar AuthorDate: 2024-06-13 18:05:51 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:54 +0000 cxgbe(4): Do not issue an L1CFG command from a VF. It is pointless to attempt an operation that is not permitted. It spams the firmware devlog with "insufficient caps" errors that distract from real errors. 78 2463625358 ERR CORE insufficient caps to process mailbox cmd: pfn 0x0 vfn 0x1; r_caps 0x86 wx_caps 0x82 required r_caps 0x81 w_caps 0x5 MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit d72db09005e53160d6c89b5221169efaac74cd55) --- sys/dev/cxgbe/t4_main.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 98f27c466bdc..d8653813f8a9 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -6084,25 +6084,27 @@ apply_link_config(struct port_info *pi) if (lc->requested_fec & FEC_BASER_RS) MPASS(lc->pcaps & FW_PORT_CAP32_FEC_BASER_RS); #endif - rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); - if (rc != 0) { - /* Don't complain if the VF driver gets back an EPERM. */ - if (!(sc->flags & IS_VF) || rc != FW_EPERM) + if (!(sc->flags & IS_VF)) { + rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); + if (rc != 0) { device_printf(pi->dev, "l1cfg failed: %d\n", rc); - } else { - /* - * An L1_CFG will almost always result in a link-change event if - * the link is up, and the driver will refresh the actual - * fec/fc/etc. when the notification is processed. If the link - * is down then the actual settings are meaningless. - * - * This takes care of the case where a change in the L1 settings - * may not result in a notification. - */ - if (lc->link_ok && !(lc->requested_fc & PAUSE_AUTONEG)) - lc->fc = lc->requested_fc & (PAUSE_TX | PAUSE_RX); + return (rc); + } } - return (rc); + + /* + * An L1_CFG will almost always result in a link-change event if the + * link is up, and the driver will refresh the actual fec/fc/etc. when + * the notification is processed. If the link is down then the actual + * settings are meaningless. + * + * This takes care of the case where a change in the L1 settings may not + * result in a notification. + */ + if (lc->link_ok && !(lc->requested_fc & PAUSE_AUTONEG)) + lc->fc = lc->requested_fc & (PAUSE_TX | PAUSE_RX); + + return (0); } #define FW_MAC_EXACT_CHUNK 7 From nobody Tue Jul 2 08:06:19 2024 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 4WCwTm2m7Xz5Phgw; Tue, 02 Jul 2024 08:06:20 +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 4WCwTm0Hh9z4J3D; Tue, 2 Jul 2024 08:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907580; 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=0YhPKKouZYx+nvo7vUj/RkKXYoN+vuqqxgSHK8a6veY=; b=npnxy6k8Eia/Owq9EMnnvJHwd6XzVCC3bG2FAerwvo2javANm1kB6ci9P3u0IOmlD6VE8R gZh3CUsGY6G0a94kN64Kd0qqZxC0xwJG1mllLuybuVRxdGrHpKEr0Qmp4JDpuwL1/dIwmd PwCw2g+sU4gXef99BxyZuvgcQT6+84clZJT0s9kXtGMO/FWuZR9YMxInlZViLkOver/Jk1 SLyu2xXW9TkTEH87JvAUfssTEp7hWu3SiEXlGogkeSJOph/aikNdNuQ3bthl0NU6Biik7I ixCJmUFWmECzj130gZ8PiQ0tFdPbq+HK6UWBtCZb9l1KWc73dTAAbsUVujPJGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907580; a=rsa-sha256; cv=none; b=bTPnzs+hhKURMYIDcceJJJUusl9SUCgRkKd/Oj0f9L6YXcPWlB6Kra8TBiVeZ92Ptg1CCp hMtgWf72FhW3S5YwmUIKb1GqLpB6KBbec+iJX3qwxOm7U49BjsRiGxTqd0JT3NfP5Fp1eB 1LRPOlo8Dzp/ZK+Yvd7eOjnLrZZTMRUoaAFDB4qNbmez5A2SHRKbPgoz3IhBfObx0iJ2Cb q5QOAkLqpssg/I8a7qp8MdOxaImVGUwNbneitC5Lo/8AiSUXXz6gKMoNPsLcC6f3porFau tLTKj5XK5kGx8hGJUxfJ3RgJDJflUTsmGOagHRa2mbMoU2WrehJQhfYKX3zcrQ== 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=1719907580; 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=0YhPKKouZYx+nvo7vUj/RkKXYoN+vuqqxgSHK8a6veY=; b=OCPm0zxbTl/NEQePRcRpmtr/ElLycyJdpFEKq+5sKyVS6780nycBAGvnOCE1jZbvn/x0Gz 6/coH0lVfDO2/6Z0n+zGDzPCYChGrjWybc2bMcExEQ7bQhkekSdav7FdCO3C00GC2yJcFt LCD9RNso5fxBGvlSytvNJbvwjkTtlbAiL+pqIpuvnZADOjnSdLSB969AS2QYzUFVRXz8g6 LIxiZza2CLJi3VXuUTdCVvfA2eLUBkjdpumpyYX+uCzwnOoqFt7QdYCg/LAjsl1JslrCmo gH+F7USzvgQ5FosMAmHh1rt69NESsLb38HQRU2cF9B2RBfl9oARCdHlJA+iFdw== 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 4WCwTl6jYpzgNm; Tue, 2 Jul 2024 08:06:19 +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 46286JKl083001; Tue, 2 Jul 2024 08:06:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286JiE082989; Tue, 2 Jul 2024 08:06:19 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:19 GMT Message-Id: <202407020806.46286JiE082989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7aa9202bc8ea - stable/14 - cxgbe(4): Do not issue an L1CFG command from a VF. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7aa9202bc8eaf8df44a40f5bcae0ae39d08a36a7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7aa9202bc8eaf8df44a40f5bcae0ae39d08a36a7 commit 7aa9202bc8eaf8df44a40f5bcae0ae39d08a36a7 Author: Navdeep Parhar AuthorDate: 2024-06-13 18:05:51 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:07:47 +0000 cxgbe(4): Do not issue an L1CFG command from a VF. It is pointless to attempt an operation that is not permitted. It spams the firmware devlog with "insufficient caps" errors that distract from real errors. 78 2463625358 ERR CORE insufficient caps to process mailbox cmd: pfn 0x0 vfn 0x1; r_caps 0x86 wx_caps 0x82 required r_caps 0x81 w_caps 0x5 MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit d72db09005e53160d6c89b5221169efaac74cd55) --- sys/dev/cxgbe/t4_main.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index f79bcfdabacf..f3bee2bbda3f 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -6015,25 +6015,27 @@ apply_link_config(struct port_info *pi) if (lc->requested_fec & FEC_BASER_RS) MPASS(lc->pcaps & FW_PORT_CAP32_FEC_BASER_RS); #endif - rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); - if (rc != 0) { - /* Don't complain if the VF driver gets back an EPERM. */ - if (!(sc->flags & IS_VF) || rc != FW_EPERM) + if (!(sc->flags & IS_VF)) { + rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); + if (rc != 0) { device_printf(pi->dev, "l1cfg failed: %d\n", rc); - } else { - /* - * An L1_CFG will almost always result in a link-change event if - * the link is up, and the driver will refresh the actual - * fec/fc/etc. when the notification is processed. If the link - * is down then the actual settings are meaningless. - * - * This takes care of the case where a change in the L1 settings - * may not result in a notification. - */ - if (lc->link_ok && !(lc->requested_fc & PAUSE_AUTONEG)) - lc->fc = lc->requested_fc & (PAUSE_TX | PAUSE_RX); + return (rc); + } } - return (rc); + + /* + * An L1_CFG will almost always result in a link-change event if the + * link is up, and the driver will refresh the actual fec/fc/etc. when + * the notification is processed. If the link is down then the actual + * settings are meaningless. + * + * This takes care of the case where a change in the L1 settings may not + * result in a notification. + */ + if (lc->link_ok && !(lc->requested_fc & PAUSE_AUTONEG)) + lc->fc = lc->requested_fc & (PAUSE_TX | PAUSE_RX); + + return (0); } #define FW_MAC_EXACT_CHUNK 7 From nobody Tue Jul 2 08:06:19 2024 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 4WCwTm4m4qz5PhW5; Tue, 02 Jul 2024 08:06:20 +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 4WCwTm084Qz4J5Q; Tue, 2 Jul 2024 08:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907580; 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=Kvokx6jfzP8gPOG+g6sOhejPssgbp0MQBNbjfwBJWeo=; b=u2qldLuq79ppfeufAqpQka/HP8Zwmtx9b7JKyaAZ5QYVHeClc6qxoh78geS8MLnSXXV7Ut pmcEaHBcTIZ9mh6fxBlTs6IFUUyXca+0cc4W2Be0tAjew03F5UtqtnAu/aqc3NvUX+kzIp kR+P+6ci6qS/YZox1ArDkGJBKkBS9w7RFzBJopBwNozBrmDoMmvaHFsF7ENzUC4NHvTpnC ogCiCxqui/ZT5jvKjPEWN8TcQjhPBmYDHmVPbR2kTpp1PZ90K+M/BtM13pRwOkSAuLm3Nn 3S08R+y/UgQXS1gNoq2U1gwP4agchEKIOQp37vrBd2nG36lefUal9WBbhciapg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907580; a=rsa-sha256; cv=none; b=wHaX3+njCD8zZyyPr23iW6qnL0+rpOBLQ6boQN0COUr/11XvFK4Cub+u+/hiHqcalzDrGN luE30Dp+GOpat0pyMzahvZgcCsWvNdsyg4h8jZo/kzPP3FxOXl8QvQKnPo6ljbBpLs9fTw rNyETxAv9bdLqHX9rMbsuHFunGkszHnxDlpNFRfergqhtp5WPOJqXpzfGqSVjpvRzucv/i eUV/MC/x6RwVHbjv7mUcqNyAvaoioyTF9S5S7yUI/uTHpYUWPnUu+Gy2ab8zM6uiw0GHdv IdLWxwRdTErVcQtB6sXU5KwxVQJQrzQD3T0X+wjBTZO64+KLB7d62fulz0nmVA== 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=1719907580; 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=Kvokx6jfzP8gPOG+g6sOhejPssgbp0MQBNbjfwBJWeo=; b=Xk36wrbEfJGkaZa5Of323yORZAwvRTL1y5zzN/eVO5YpQk5qhgsvXxbV4MYLeHt6MGao+6 v2DjczIvZrEj3iLdjzoXSD5ZOpKYd+KGumAte7VH3tMs8abk1bPeLqG8h0oYsf2NoQwaGz 67AOFIc8kxU2Gg2KCAaYBC4SqYJmQ/woPEtRi1Uian+vA4eLuDp0oXIVCrMMvhOujjdYX+ Upx7H1iYqMUxBPj59/KQ9nW8pozUjNxiMZZHkTzgeJComsd7jRpu85YfwP7lQxOZNeunZk WC1FCDiBKmSFRp/8AXkJuh5GSudnyNbI9SC5PDQMDlOMgrED97YRkZEKBCPtWg== 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 4WCwTl6mrhzgQm; Tue, 2 Jul 2024 08:06:19 +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 46286JkT083002; Tue, 2 Jul 2024 08:06:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286JmR082998; Tue, 2 Jul 2024 08:06:19 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:19 GMT Message-Id: <202407020806.46286JmR082998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2f8f10bee95f - stable/13 - cxgbe(4): New knob to limit driver to the specified types of doorbells. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f8f10bee95f59267cbacb393c4205d539409af5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2f8f10bee95f59267cbacb393c4205d539409af5 commit 2f8f10bee95f59267cbacb393c4205d539409af5 Author: Navdeep Parhar AuthorDate: 2024-06-13 17:22:03 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:54 +0000 cxgbe(4): New knob to limit driver to the specified types of doorbells. hw.cxgbe.doorbells_allowed="0xf" The adapter's doorbells bitmap is clipped to the value specified in the tunable, which is meant for debug and workarounds only. There is no change in default behavior. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit ba95b4aea78909bca972239afcbd51538c4b37c1) --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/t4_main.c | 21 +++++++++++++++++++++ sys/dev/cxgbe/t4_vf.c | 4 ++++ 3 files changed, 26 insertions(+) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index f6e58dc976c1..706bdf1b9f8b 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1303,6 +1303,7 @@ void t4_add_adapter(struct adapter *); int t4_detach_common(device_t); int t4_map_bars_0_and_4(struct adapter *); int t4_map_bar_2(struct adapter *); +int t4_adj_doorbells(struct adapter *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index d8653813f8a9..a47b4609e8f1 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -605,6 +605,11 @@ static int t5_write_combine = 0; SYSCTL_INT(_hw_cxl, OID_AUTO, write_combine, CTLFLAG_RDTUN, &t5_write_combine, 0, "Use WC instead of UC for BAR2"); +/* From t4_sysctls: doorbells = {"\20\1UDB\2WCWR\3UDBWC\4KDB"} */ +static int t4_doorbells_allowed = 0xf; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, doorbells_allowed, CTLFLAG_RDTUN, + &t4_doorbells_allowed, 0, "Limit tx queues to these doorbells"); + static int t4_num_vis = 1; SYSCTL_INT(_hw_cxgbe, OID_AUTO, num_vis, CTLFLAG_RDTUN, &t4_num_vis, 0, "Number of VIs per port"); @@ -1351,6 +1356,10 @@ t4_attach(device_t dev) if (rc != 0) goto done; /* error message displayed already */ + rc = t4_adj_doorbells(sc); + if (rc != 0) + goto done; /* error message displayed already */ + rc = t4_create_dma_tag(sc); if (rc != 0) goto done; /* error message displayed already */ @@ -3827,6 +3836,18 @@ t4_map_bar_2(struct adapter *sc) return (0); } +int +t4_adj_doorbells(struct adapter *sc) +{ + if ((sc->doorbells & t4_doorbells_allowed) != 0) { + sc->doorbells &= t4_doorbells_allowed; + return (0); + } + CH_ERR(sc, "No usable doorbell (available = 0x%x, allowed = 0x%x).\n", + sc->doorbells, t4_doorbells_allowed); + return (EINVAL); +} + struct memwin_init { uint32_t base; uint32_t aperture; diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c index 31faa9969dd6..d22937ef2bbd 100644 --- a/sys/dev/cxgbe/t4_vf.c +++ b/sys/dev/cxgbe/t4_vf.c @@ -589,6 +589,10 @@ t4vf_attach(device_t dev) if (rc != 0) goto done; /* error message displayed already */ + rc = t4_adj_doorbells(sc); + if (rc != 0) + goto done; /* error message displayed already */ + rc = t4_create_dma_tag(sc); if (rc != 0) goto done; /* error message displayed already */ From nobody Tue Jul 2 08:06:20 2024 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 4WCwTn3V5pz5Phdl; Tue, 02 Jul 2024 08:06:21 +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 4WCwTn1336z4JL7; Tue, 2 Jul 2024 08:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907581; 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=upWoWTuyJ8DuY+SbB6YIacyqTcOe7vL8jxYP/brOpgQ=; b=yNhacZXSN+lGBXCib+wP+ZScYedXhFE9S6QkokwyJPdFpeFZlFz90Tjf1GmqAqIInJkCRA Dt6WHwJvZBCdmbe32mHyLY/zMEioGWzKDPsLDKzDsUPrPL24fGSk/B9/IDBCl2rb1TxQ/B 34QcDvPntBGjsZOREdaVpo3nuTytz26jFXsXHkdsvojF1n1MMZEYLffizpMlxcuMrYuYEN 5MAEFHzOeHVmW+h8eNgqFQmzI/FERBogugjWCUr2aKsl7uqwJpvVOTqjlA2KsSOtVDUZN3 QSvJPzd0UQ1yuPaQ9+fTXPATb/HSSYH3PzRwU1GxA4439kTm40PTbfDxa7MitQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907581; a=rsa-sha256; cv=none; b=k8x8uMbZP+VHP8n2jfoAGIZ9kH20Oir8AjivS+yc9qC9l7U5tG7oDNfUXpQcV7sno2keeo /bWOGEYsDuydZQNzNp/A5z2IDxnqYOiUjAmXudwi/l/aQejwAHSahS4veX+3tUuyhWfgmJ 3MK38NGlV2wGMzekfeRBfmBY2NxQaHn4U+BsOtTX6oQtzneK11j2kjKzpIYAHN9PMwTn0J OocgXXgEe/ZsoR1WDT11K9EWhvZ+TYMkVv4b0CYdBJVdaY3WcDkbXgEn5j/om46YqvoPce WtsYajuSqCmiY8vjZz4SJ8QzekYueFToBU0bxmg6YVJ/K0yNr1O2eVj0HFyoFw== 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=1719907581; 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=upWoWTuyJ8DuY+SbB6YIacyqTcOe7vL8jxYP/brOpgQ=; b=a61EwWhb5fnCGS4EYqux/3Wctdc6V2cbZJD9utc8Z0EJvoSEJmvn8ad/ub9pVA+tpda/56 X6XnUtKpZ3/obC8rqIJgqTtvRRHfHnHL1A1P2NX27POAmNqsm1VOo0B2XSlipmy2vgRNEq YA0cH0+Tyt0M8HiV7JlWYYs/PY6Iy6XiU890KDaOlqGzAGab1RQjEskKhlpiBWTtPYCCyp zzRADaflAUBRTVmBYTMJgxwlEQjnvI0hLuu4x0/3oySYAxsNcyOByqj93PPsE7pTgTYxiZ hwvs6wTq6LSTTy/ehHkH1hEyUFGdz3GhbJi+cbhOB0spAHSqRrXB43BOc7mbzg== 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 4WCwTn0gTvzgGR; Tue, 2 Jul 2024 08:06:21 +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 46286K82083131; Tue, 2 Jul 2024 08:06:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286KYN083122; Tue, 2 Jul 2024 08:06:20 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:20 GMT Message-Id: <202407020806.46286KYN083122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 45b7dd043630 - stable/14 - cxgbe(4): New knob to limit driver to the specified types of doorbells. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 45b7dd0436309efcecbf0866011dcab1ed74bb51 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=45b7dd0436309efcecbf0866011dcab1ed74bb51 commit 45b7dd0436309efcecbf0866011dcab1ed74bb51 Author: Navdeep Parhar AuthorDate: 2024-06-13 17:22:03 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:07:57 +0000 cxgbe(4): New knob to limit driver to the specified types of doorbells. hw.cxgbe.doorbells_allowed="0xf" The adapter's doorbells bitmap is clipped to the value specified in the tunable, which is meant for debug and workarounds only. There is no change in default behavior. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit ba95b4aea78909bca972239afcbd51538c4b37c1) --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/t4_main.c | 21 +++++++++++++++++++++ sys/dev/cxgbe/t4_vf.c | 4 ++++ 3 files changed, 26 insertions(+) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index b9780809421f..498d80654c71 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1363,6 +1363,7 @@ void t4_add_adapter(struct adapter *); int t4_detach_common(device_t); int t4_map_bars_0_and_4(struct adapter *); int t4_map_bar_2(struct adapter *); +int t4_adj_doorbells(struct adapter *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index f3bee2bbda3f..28119bd419bb 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -604,6 +604,11 @@ static int t5_write_combine = 0; SYSCTL_INT(_hw_cxl, OID_AUTO, write_combine, CTLFLAG_RDTUN, &t5_write_combine, 0, "Use WC instead of UC for BAR2"); +/* From t4_sysctls: doorbells = {"\20\1UDB\2WCWR\3UDBWC\4KDB"} */ +static int t4_doorbells_allowed = 0xf; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, doorbells_allowed, CTLFLAG_RDTUN, + &t4_doorbells_allowed, 0, "Limit tx queues to these doorbells"); + static int t4_num_vis = 1; SYSCTL_INT(_hw_cxgbe, OID_AUTO, num_vis, CTLFLAG_RDTUN, &t4_num_vis, 0, "Number of VIs per port"); @@ -1348,6 +1353,10 @@ t4_attach(device_t dev) if (rc != 0) goto done; /* error message displayed already */ + rc = t4_adj_doorbells(sc); + if (rc != 0) + goto done; /* error message displayed already */ + rc = t4_create_dma_tag(sc); if (rc != 0) goto done; /* error message displayed already */ @@ -3765,6 +3774,18 @@ t4_map_bar_2(struct adapter *sc) return (0); } +int +t4_adj_doorbells(struct adapter *sc) +{ + if ((sc->doorbells & t4_doorbells_allowed) != 0) { + sc->doorbells &= t4_doorbells_allowed; + return (0); + } + CH_ERR(sc, "No usable doorbell (available = 0x%x, allowed = 0x%x).\n", + sc->doorbells, t4_doorbells_allowed); + return (EINVAL); +} + struct memwin_init { uint32_t base; uint32_t aperture; diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c index a4a611ed645c..24c80aaa7b2d 100644 --- a/sys/dev/cxgbe/t4_vf.c +++ b/sys/dev/cxgbe/t4_vf.c @@ -589,6 +589,10 @@ t4vf_attach(device_t dev) if (rc != 0) goto done; /* error message displayed already */ + rc = t4_adj_doorbells(sc); + if (rc != 0) + goto done; /* error message displayed already */ + rc = t4_create_dma_tag(sc); if (rc != 0) goto done; /* error message displayed already */ From nobody Tue Jul 2 08:06:20 2024 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 4WCwTn48b2z5PhbG; Tue, 02 Jul 2024 08:06:21 +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 4WCwTn1XL1z4J3R; Tue, 2 Jul 2024 08:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907581; 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=pBIjz7A3XqS16fUD5NaRk+E/Sqr7Wjuah59OwdkLAFI=; b=l1sbYoZCU7ND8kolhsTNKRVc5O7UN+XnAyft8Ad5tiY+e3efEihzOjAuf72CQmCyw0OO3m /oQgEKEmqgxFQVa4Mz5960fiuyZhUhzmjE9itSf64WUWyrVS51SjeojYBasUhMuZ3/q94X xJnTrhMbMZhwNAhJ6vF1Y4dKuV6X6NU2vjPGEECqUDnCI6sBKRHX7TcaGfwySEFTZz5GYs jJkbdyC3z64gCdMRK6CC0NltPOMgCYgt4RYVPSAZbW7w5gU+YHjBEMlJ1/WEcpwA0M4p0I Ma91sTI3kC2HwWkwR165NWLPb1J1a1lDJ8ehdffcG9gX3xipeRNVzw0MVD/SXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907581; a=rsa-sha256; cv=none; b=c/+FolaT23V8vbqm3YCTbaJwAawAeEq4RrFsI7QvAB/DmsnAUwwsF3rDCVuFn6ACNyaY6D LkxpngjrM5wJ82796+w7ref4lSPQoc1PyEb6XgMAhNEtaeeTsA1IPHLV7/wUUqbUmuyQ+1 deCh/yKtuiW1A5Y3ZCUblcfTAYjtiBJn/Vj5eCVV2h47pQvY2SyFx6AjtBTInsrFlUKOWL uYbRq0f4lYhgvQYxXA54Yp25/2DczLVrUd/9Uw3DTMOZVVD/ZTS62PSZOwkV/bZMtgpYI6 CZi7Dt4PnTCrgIXnJcCf64IQd//FzJRq8oxGPHZuqczrZoMn9QVfH7t6ewurHw== 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=1719907581; 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=pBIjz7A3XqS16fUD5NaRk+E/Sqr7Wjuah59OwdkLAFI=; b=diySeE+IDskghdtgs8a9tOQG1pIl8mB+wDz2QI4VWt3J993y28iJpioLIVygS2chcCk2sH +A5LaBAiTmpjcankWY+8gjicGRHE2CASxekv16WzejXv4Qt/82SeGGfz20IkOvm6w6RmuZ 771irrG0YH0svas5O/c0D7yzYxguoN9IHYtCMr9q5nf+8iV6F++1fn5atEs44UUzdKpOLK RnNGI3yCXRJO2m23D9hzoIywW2bHdC9U5N1t5z/qB1lz9W816PIrBiu4aB1lMiEoxjJMlb ksk6N46vKIz83Yqn95aG8c6ZU/J9rq2MJCIWHmuvvHyBjDmiyt/gpKC52fybvA== 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 4WCwTn118Bzgb6; Tue, 2 Jul 2024 08:06:21 +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 46286K1x083130; Tue, 2 Jul 2024 08:06:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286K2g083127; Tue, 2 Jul 2024 08:06:20 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:20 GMT Message-Id: <202407020806.46286K2g083127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d4fd7d7978f0 - stable/13 - cxgbev(4): Shared code for the VF driver to query a VF's VLAN config. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d4fd7d7978f03510422a87dcf78edd4a58265150 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d4fd7d7978f03510422a87dcf78edd4a58265150 commit d4fd7d7978f03510422a87dcf78edd4a58265150 Author: Navdeep Parhar AuthorDate: 2024-06-12 22:24:25 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:55 +0000 cxgbev(4): Shared code for the VF driver to query a VF's VLAN config. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit 4471ff11969ec6bd2e5d3c745fc5ba90fda596ed) --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4vf_hw.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 0861e3df4bee..0871ca8c40f1 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -944,6 +944,7 @@ int t4vf_get_vfres(struct adapter *adapter); int t4vf_prep_adapter(struct adapter *adapter); int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, unsigned int *naddr, u8 *addr); +int t4vf_get_vf_vlan(struct adapter *adapter); int t4_bar2_sge_qregs(struct adapter *adapter, unsigned int qid, enum t4_bar2_qtype qtype, int user, u64 *pbar2_qoffset, unsigned int *pbar2_qid); diff --git a/sys/dev/cxgbe/common/t4vf_hw.c b/sys/dev/cxgbe/common/t4vf_hw.c index a0c2eb5f60b3..8091eb5db2f9 100644 --- a/sys/dev/cxgbe/common/t4vf_hw.c +++ b/sys/dev/cxgbe/common/t4vf_hw.c @@ -429,3 +429,30 @@ int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, return ret; } + +/* + * t4vf_get_vf_vlan - Get the VLAN ID to be set to the VI of this VF. + * @adapter: The adapter + * + * Find the VLAN ID to be set to the VF's VI. The requested VLAN ID + * is from the host OS via callback in the PF driver. + */ +int t4vf_get_vf_vlan(struct adapter *adapter) +{ + struct fw_acl_vlan_cmd cmd = {0}; + int vlan = 0; + int ret = 0; + + cmd.op_to_vfn = htonl(V_FW_CMD_OP(FW_ACL_VLAN_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_READ); + + /* Note: Do not enable the ACL */ + cmd.en_to_len16 = htonl((unsigned int)FW_LEN16(cmd)); + + ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &cmd); + + if (!ret) + vlan = be16_to_cpu(cmd.vlanid[0]); + + return vlan; +} From nobody Tue Jul 2 08:06:22 2024 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 4WCwTp3C37z5Phk4; Tue, 02 Jul 2024 08:06:22 +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 4WCwTp2H0nz4J3f; Tue, 2 Jul 2024 08:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907582; 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=CHMJaftQvhG6oxSSG7znWtI4VPwLWfr6+eLrqTJbwxQ=; b=w7OG4GfGUvT//5I/P0fi9tkaUv3fsIy/f8OlQfTvDy9nFAQKt+l+VGt3/REyXY8pLObd6i bcueTc7tF0zDcAvdfcv6LfJFzXDHLUGYGGsEKL+hZQJ0yMubWFng2d74+tjwNxlkV6xNIv SXfcTsCJ7krabu65YUUdW8TXANv8PaEwR0by3jPqio2OrPnPuY+rxWAP3szOP+0UnYzQ6a s3NrHA/sK07n04gyIyFQZ5OzZFoq+NvyxJunUuhVGG4Z8JAV099eVNALieMCQQh+gdHJ6B KF2G5v5iYKMDKMvGzuA5+OP6D+ph6dOaywtY0aH9O3lL6sSGE+NxLPOKHzRXVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907582; a=rsa-sha256; cv=none; b=I2XLf7iUrpGIiW1NL6FqY38UgGbG8r+RSuwjnmTp02UY4uZA1FNqxn3SPkftxGzMHRKzsO J+vqVy9IQjlhpmXcej4zxRlFHiKSRo213eGc1N5C1//cS1h1nZezDZoGEAutgt5LfCf0gF 48ozn3IlhQ6zT2VbOR1i6ZxAlBMXaRMbXWBYClB7S/d5dwHTg33naYPlQ1Cul3EBu/UHMX T8A3U14KGhqhi8wZOYPlZPrxoULrSkCEEMFQ+plwvYC/44bP15PXTr3Wf2p+2f5t1UbEWy jaUU5I0ntWdQEJTTgq/dTwuZS5V4PJnrdyWiZGqGrChq0lN2+kEPxtKsmVYwPQ== 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=1719907582; 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=CHMJaftQvhG6oxSSG7znWtI4VPwLWfr6+eLrqTJbwxQ=; b=Im+2TRFNqNg5zxnQQj9RX8xaRfnJSYbOziYHvSTqA+tMYxTLNZogx4zWoc7h0sAAoByT3N qQ3ro5GC+bc8DthOTJKqngY4fkPHMFS+MzJdTAlZNrDiA0qc/MtZYi8tFqWQjRtxCswsgT xnuaxPdIB8DK8BqUQNAcFfBjsnOxUfwk3KxxuGWShO9oZk1glACV5mx+aeDGCPVwGKjlTp 927Vx0F/AviaBBABaAzKDoTOOL0CHt5cU5L8I5BSByHM5/euTVKYpBhKjd/VC9hd6WC7/3 Xu0MApeuuxImSKBvWpBXP4FnWx9Qi1Jkl1D+ILYiN+RcYDGGlaKJf5e1Os/tfg== 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 4WCwTp1WlJzgNn; Tue, 2 Jul 2024 08:06:22 +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 46286MRr083253; Tue, 2 Jul 2024 08:06:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286M6w083250; Tue, 2 Jul 2024 08:06:22 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:22 GMT Message-Id: <202407020806.46286M6w083250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 5d49a46b845a - stable/14 - cxgbev(4): Shared code for the VF driver to query a VF's VLAN config. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d49a46b845afecee95781c826223f2570ce69b6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d49a46b845afecee95781c826223f2570ce69b6 commit 5d49a46b845afecee95781c826223f2570ce69b6 Author: Navdeep Parhar AuthorDate: 2024-06-12 22:24:25 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:08:06 +0000 cxgbev(4): Shared code for the VF driver to query a VF's VLAN config. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit 4471ff11969ec6bd2e5d3c745fc5ba90fda596ed) --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4vf_hw.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 0861e3df4bee..0871ca8c40f1 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -944,6 +944,7 @@ int t4vf_get_vfres(struct adapter *adapter); int t4vf_prep_adapter(struct adapter *adapter); int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, unsigned int *naddr, u8 *addr); +int t4vf_get_vf_vlan(struct adapter *adapter); int t4_bar2_sge_qregs(struct adapter *adapter, unsigned int qid, enum t4_bar2_qtype qtype, int user, u64 *pbar2_qoffset, unsigned int *pbar2_qid); diff --git a/sys/dev/cxgbe/common/t4vf_hw.c b/sys/dev/cxgbe/common/t4vf_hw.c index a0c2eb5f60b3..8091eb5db2f9 100644 --- a/sys/dev/cxgbe/common/t4vf_hw.c +++ b/sys/dev/cxgbe/common/t4vf_hw.c @@ -429,3 +429,30 @@ int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, return ret; } + +/* + * t4vf_get_vf_vlan - Get the VLAN ID to be set to the VI of this VF. + * @adapter: The adapter + * + * Find the VLAN ID to be set to the VF's VI. The requested VLAN ID + * is from the host OS via callback in the PF driver. + */ +int t4vf_get_vf_vlan(struct adapter *adapter) +{ + struct fw_acl_vlan_cmd cmd = {0}; + int vlan = 0; + int ret = 0; + + cmd.op_to_vfn = htonl(V_FW_CMD_OP(FW_ACL_VLAN_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_READ); + + /* Note: Do not enable the ACL */ + cmd.en_to_len16 = htonl((unsigned int)FW_LEN16(cmd)); + + ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &cmd); + + if (!ret) + vlan = be16_to_cpu(cmd.vlanid[0]); + + return vlan; +} From nobody Tue Jul 2 08:06:22 2024 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 4WCwTp345Bz5PhmB; Tue, 02 Jul 2024 08:06:22 +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 4WCwTp2JnCz4JBR; Tue, 2 Jul 2024 08:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907582; 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=Cq5Ud420djkypXqsQFQ7SPl7IN8/JcjryvYhvVUeNzg=; b=fAdrbcWZrfinVXbuPwJdae7M1xpzk4Lvbs/0yBTNfOUmfyCCQl+4IBiQqKXuyy3IiSzavX OI3MTcf2X+tdKDupRWbm7YcKCVVV7FZL8V0tM8IG4ydpqlWSQa2gfw23xnrv7T4MoOVRTj ywqy8WkoPPDhdSO9uYmyb8aeKTrE3k2UVDtqDMI+2S3xxYiGUrNBU3E60nXx+Ko/9zPFRl JNuhd65K4mjQjLbEI3DAr7OmLjAbaCoEJMJykcN3ww1MLXqg7dnf+kQMARzhplpKK5DN6m MiOMSY40auJwWQ8OwllnzENekdezLGLXEKuFxYBV7lPHk7Gpw4XTaeuKiZe1Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907582; a=rsa-sha256; cv=none; b=ARhEIDhwsNYGdFwE64Pc4NuitWqy8koTdggSx3zsqCXD6wQ7uX5nEgTJLQaGcIQWudD0V0 edXZgZ7hoR3JSTW3AUDhh0hyo0yQ11mBvPFAz4dTMRkLZNwLeFgkSehKjUj54m7StjpO71 ROz8J0shVWRhk4sf1AwBtwRIfjbCkkc9mQBLGRMkoGpyFw5mOXJxuHvc+VuO7zDoVxNkgM tserqy1/W9GHSkx4uc9Y+E3yqxp3nNCfLDovO0+Bv+cH8bJkhvQMC7FPBFtHdo3iMPGmcT zARsf5nlb/ejI2ZCTrSXMnv7FaPagYU+VA+9rKOd8T42d2dSfhm7msp68usH3A== 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=1719907582; 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=Cq5Ud420djkypXqsQFQ7SPl7IN8/JcjryvYhvVUeNzg=; b=q1dlYLHupnDAymRf0Jqg7b180ykYf+x76oX5cHY0aczfosF2ipfZ1u1P/T6LQt35cvlvi0 x90SRV1osUn1iwtU2dVh0rSJR1D8C8H39MobvYk5DQc/ifGArtMcvytMjYGUhwDNRHANlJ IVnSKzcWrY/8Vvp9c/qjOV8pOGNHla9g3HU+xNlfDLbg2zjmI1doVLXzksMqPneCjmMG7I b6TxVktbbLrboisIgwMKhdNmy0BKGHgom+EDK/1hWjyhVVzY3Igf4KnYUNykftUb2tXvou K4wPD2NvKVp1byf/fyYoISeZhkqzVg35ZCcRm0FFefHyCAxUHPtHdR/xYUGT6w== 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 4WCwTp1l41zgKr; Tue, 2 Jul 2024 08:06:22 +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 46286MB8083254; Tue, 2 Jul 2024 08:06:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286MwD083244; Tue, 2 Jul 2024 08:06:22 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:22 GMT Message-Id: <202407020806.46286MwD083244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: df85c75a80f2 - stable/13 - cxgbev(4): Pay attention to the VLAN configuration for the VF. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: df85c75a80f28bf2a1f70669ad9ee8a4647acfb7 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=df85c75a80f28bf2a1f70669ad9ee8a4647acfb7 commit df85c75a80f28bf2a1f70669ad9ee8a4647acfb7 Author: Navdeep Parhar AuthorDate: 2024-06-17 17:11:16 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 07:45:55 +0000 cxgbev(4): Pay attention to the VLAN configuration for the VF. Make sure that the transmit traffic is tagged correctly or else the firmware will refuse to transmit and will report an ACL violation. On receive the hardware will make sure that tagged traffic is delivered to the appropriate VM. The driver only asserts that the VLAN id that was extracted from the wire traffic matches the VF's configuration. All this works when associating a specific VLAN id with a VF. The 'trunk' setting likely needs more work. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit 2d0a01271223ce623c78f5c8236f8f3f4b6ef104) --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/t4_sge.c | 20 +++++++++++++++----- sys/dev/cxgbe/t4_vf.c | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 706bdf1b9f8b..648182fe31c4 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -928,6 +928,7 @@ struct adapter { u_int vxlan_refcount; int rawf_base; int nrawf; + u_int vlan_id; struct taskqueue *tq[MAX_NCHAN]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index a6f77a2b7430..93f914c3e2c5 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -2098,9 +2098,17 @@ have_mbuf: } if (cpl->vlan_ex) { - m0->m_pkthdr.ether_vtag = be16toh(cpl->vlan); - m0->m_flags |= M_VLANTAG; - rxq->vlan_extraction++; + if (sc->flags & IS_VF && sc->vlan_id) { + /* + * HW is not setup correctly if extracted vlan_id does + * not match the VF's setting. + */ + MPASS(be16toh(cpl->vlan) == sc->vlan_id); + } else { + m0->m_pkthdr.ether_vtag = be16toh(cpl->vlan); + m0->m_flags |= M_VLANTAG; + rxq->vlan_extraction++; + } } if (rxq->iq.flags & IQ_RX_TIMESTAMP) { @@ -5530,7 +5538,8 @@ write_txpkt_vm_wr(struct adapter *sc, struct sge_txq *txq, struct mbuf *m0) ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(m0->m_pkthdr.ether_vtag); txq->vlan_insertion++; - } + } else if (sc->vlan_id) + ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(sc->vlan_id); /* CPL header */ cpl->ctrl0 = txq->cpl_ctrl0; @@ -6031,7 +6040,8 @@ write_txpkts_vm_wr(struct adapter *sc, struct sge_txq *txq) ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(m->m_pkthdr.ether_vtag); txq->vlan_insertion++; - } + } else if (sc->vlan_id) + ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(sc->vlan_id); /* CPL header */ cpl->ctrl0 = txq->cpl_ctrl0; diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c index d22937ef2bbd..ac28f5b02aff 100644 --- a/sys/dev/cxgbe/t4_vf.c +++ b/sys/dev/cxgbe/t4_vf.c @@ -660,6 +660,8 @@ t4vf_attach(device_t dev) t4_os_set_hw_addr(pi, mac); pmask &= ~(1 << p); + sc->vlan_id = t4vf_get_vf_vlan(sc); + /* No t4_link_start. */ snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", From nobody Tue Jul 2 08:06:23 2024 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 4WCwTq4sNtz5PhkC; Tue, 02 Jul 2024 08:06:23 +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 4WCwTq3Bqfz4JQH; Tue, 2 Jul 2024 08:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719907583; 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=N5hOLo1gY2Ncm6Nnwu+rMQzgCswSZfPAepdCXgDPcQM=; b=Pj+DsmU9hoeR0gRoneaNIORM8wFvDFvRB3jDS5wXQj2MQMFxsC7pZl27kRVIMZ6OlEir6E cX0IPsAOmM3rPUj+SL+kLZ9fwOzsS1Vd5I0NIP8AE1jajk7ILOE530wyeV/1l+3upnX74T /T20VEdV1nIl4T9Cyyr0Gtq6yXT7ka2s8krgUzbxxrJ1OdObSl7jc84K92HrpILZj0w4oe ke6UFpAQnbV6G0nu8mp5bYYv1vVLpEjtx+Orp1rqQWtKLujuik2xTJjR9wunQ7amZzYmWX gx1iK3KStwRYQLXOrR6fPVArm3Up6hpZO8HCYyWCAAGuR4uEcAHTeVPnC8C4Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719907583; a=rsa-sha256; cv=none; b=xYf6im1GNbY6wRCZLWYz7qypYRzotcw32V06+KtycVSdKOGeGDBnHWBb0VGY2jF191GRG9 1z6za4LyEbabMRZdGeqJ5NtfHWMDDlgI11hYhjhzRsOfcirBaGwYNIj0l+08OFdtg1i6Lj WN2vShx/PNv6xZIBO1vEwQ0l2h91M9aKchWwOV/NmvxWB4hLUrNeolyaAOUtTQexJxuvYO jLdNjXwptb8FnQr764LI1K+1Hfm8M9ybFIjqSGN2zsehbVy5NxAwRKchshjMoIda63rNL3 OljsEVqX2bOV2TR7SdOIo6faD+4IZmIbJBJBOuZlNWJPJlP9kLtz6OW6X584kQ== 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=1719907583; 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=N5hOLo1gY2Ncm6Nnwu+rMQzgCswSZfPAepdCXgDPcQM=; b=OPJvPDzvuhLvWOQ/cviCTzsGcnRyYUfqHEo0ME24RblOryCnPbeyi5tWh/UPOLxyWaRXRr T0ydPOSlmmRq98Fc500xo4XfqmzsiAiQx4Mk8rIDEnGZg9XhtmF6Z1k3eQOPN3eSPrKKyg lCof6SWYZw9omHZgGvq22eYx9FoijmihPgmQz7mdDnWZ5yDOF/5gxcuPPqymip2eGTO9vR WYpNEHtxp8wiSmLVngftM6U6l6+Sq0E097RPYph513rAwtiAbaEWEIpXcBQ6itp1NmNIzc T7EhUUcV7qi0/9GYcdrF/nFf3GJ+2pc7Qy/Ig5QQNxGx/XwToIt1aNxeDYdInA== 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 4WCwTq2q7fzgQn; Tue, 2 Jul 2024 08:06:23 +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 46286NK6083356; Tue, 2 Jul 2024 08:06:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46286NdT083333; Tue, 2 Jul 2024 08:06:23 GMT (envelope-from git) Date: Tue, 2 Jul 2024 08:06:23 GMT Message-Id: <202407020806.46286NdT083333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 536a452cc4e3 - stable/14 - cxgbev(4): Pay attention to the VLAN configuration for the VF. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 536a452cc4e388454d829144dab95927ec39128f Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=536a452cc4e388454d829144dab95927ec39128f commit 536a452cc4e388454d829144dab95927ec39128f Author: Navdeep Parhar AuthorDate: 2024-06-17 17:11:16 +0000 Commit: Kristof Provost CommitDate: 2024-07-01 16:08:17 +0000 cxgbev(4): Pay attention to the VLAN configuration for the VF. Make sure that the transmit traffic is tagged correctly or else the firmware will refuse to transmit and will report an ACL violation. On receive the hardware will make sure that tagged traffic is delivered to the appropriate VM. The driver only asserts that the VLAN id that was extracted from the wire traffic matches the VF's configuration. All this works when associating a specific VLAN id with a VF. The 'trunk' setting likely needs more work. MFC after: 1 week Sponsored by: Chelsio Communications (cherry picked from commit 2d0a01271223ce623c78f5c8236f8f3f4b6ef104) --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/t4_sge.c | 20 +++++++++++++++----- sys/dev/cxgbe/t4_vf.c | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 498d80654c71..335b1be57b8b 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -928,6 +928,7 @@ struct adapter { u_int vxlan_refcount; int rawf_base; int nrawf; + u_int vlan_id; struct taskqueue *tq[MAX_NCHAN]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 2ef05b5a9f86..7008c3c65e02 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -2086,9 +2086,17 @@ have_mbuf: } if (cpl->vlan_ex) { - m0->m_pkthdr.ether_vtag = be16toh(cpl->vlan); - m0->m_flags |= M_VLANTAG; - rxq->vlan_extraction++; + if (sc->flags & IS_VF && sc->vlan_id) { + /* + * HW is not setup correctly if extracted vlan_id does + * not match the VF's setting. + */ + MPASS(be16toh(cpl->vlan) == sc->vlan_id); + } else { + m0->m_pkthdr.ether_vtag = be16toh(cpl->vlan); + m0->m_flags |= M_VLANTAG; + rxq->vlan_extraction++; + } } if (rxq->iq.flags & IQ_RX_TIMESTAMP) { @@ -5477,7 +5485,8 @@ write_txpkt_vm_wr(struct adapter *sc, struct sge_txq *txq, struct mbuf *m0) ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(m0->m_pkthdr.ether_vtag); txq->vlan_insertion++; - } + } else if (sc->vlan_id) + ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(sc->vlan_id); /* CPL header */ cpl->ctrl0 = txq->cpl_ctrl0; @@ -5978,7 +5987,8 @@ write_txpkts_vm_wr(struct adapter *sc, struct sge_txq *txq) ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(m->m_pkthdr.ether_vtag); txq->vlan_insertion++; - } + } else if (sc->vlan_id) + ctrl1 |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(sc->vlan_id); /* CPL header */ cpl->ctrl0 = txq->cpl_ctrl0; diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c index 24c80aaa7b2d..8ca6dd98a66f 100644 --- a/sys/dev/cxgbe/t4_vf.c +++ b/sys/dev/cxgbe/t4_vf.c @@ -660,6 +660,8 @@ t4vf_attach(device_t dev) t4_os_set_hw_addr(pi, mac); pmask &= ~(1 << p); + sc->vlan_id = t4vf_get_vf_vlan(sc); + /* No t4_link_start. */ snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", From nobody Tue Jul 2 13:22:31 2024 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 4WD3Vc0R64z5QRhg; Tue, 02 Jul 2024 13:22:32 +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 4WD3Vb75FDz4ydL; Tue, 2 Jul 2024 13:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719926552; 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=nycuz8vIVdYmSEEzAph7ma8jEoWHYS+2uKV/0zJV+JQ=; b=KTNDsA/35cXG3cb+Jv9f5CVVU80uPlx0Qakg3vkoQoRm7OEjD7vUYD5vS2EezcJs7hp9e1 HGUyJslaibrmSPRl3l9rcXNBEmgGT2A3HTvnIP7srXRmH42K0sY49zBsz+FhSiSgoaCons uOT8f7Qi3C3rhDDxuhvvi03ZQBnlU9IHNSqVXD0MPwGzB79uRsb6bPwBymEm6URrYOAYHN 0XVGV42xsZ+jk1HUCPO9qGNl+p7q3stE6ToaKfic4UajYEVYijGtFw320CEq9W/2edkSUM 4qw6HW2Tq33CK4qBFhGVOCeJccyHKRemv43dE1xz7SlarcKV9ixiH62I6DOkmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719926552; a=rsa-sha256; cv=none; b=l1X6kGfdRrG2SyT0v6yuZGMuOerWmzydEck+HIn7MAZwzl3eodyw+S6Bi7+Nk+tto3TgWI naEOaDwqXsWhhbx8JpSJoFoZZ7+nByyJ9ahiCvBYI5wg8efuUENiZcbjByZyaUYSQHLdIw 5eY6Jh4v7vCcrIiD9CYmV5xYu0UtKS437PbiDePr2efi50PSZPmaeTH9RAS6NtC4HO1/HD 6FWfIPvo1CbijkErzMbidivD2NoLjpbtELp5TVnDVTQGrIsEFxZowGXYMP3PWRwBvCoioj 9X3Om1Z/DucLZIj4gCBlndrktQx0EVD3ilDocl2hXF2MpXW40pfsYJVBsB/k4Q== 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=1719926552; 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=nycuz8vIVdYmSEEzAph7ma8jEoWHYS+2uKV/0zJV+JQ=; b=wpBs+0QppnT95iuWlm2OpHv5lNADYegzI+LC4nBLRIbWy0iTd3uf8XlvMLk5BbEjbwsZpC AsHznzI4+NpAusnRrrkXSbzVoSIdSSuO8JlBDmGNqK0Doh4y2jbkm8mwwROt3dOoCVLhtF +qVubbmnDaGRxU+e9NrmDL2yIcrMGVTRjZbMfvtJJJ2MhtHRmOntWmoPtQO7akAANDsR6U vL+SmP2nz5LRtA40s7iTU0YcZRD7tadk2liZRsE6SHQNK1g8xb+JVE37Zi/t9aHEQnhyCX csi0t3HlOvqXUZXk6Y4HhCBPOG4gPKh2y7raXDUaA0Zphy5/Gv6f+1Xei3TmRw== 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 4WD3Vb6hdmzqG2; Tue, 2 Jul 2024 13:22:31 +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 462DMVb9021030; Tue, 2 Jul 2024 13:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462DMVI9021027; Tue, 2 Jul 2024 13:22:31 GMT (envelope-from git) Date: Tue, 2 Jul 2024 13:22:31 GMT Message-Id: <202407021322.462DMVI9021027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c39d01d73cec - stable/14 - dtrace: Remove LOCK_LEVEL 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: c39d01d73cec24a0da747cf6b221ff749e332a1b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c39d01d73cec24a0da747cf6b221ff749e332a1b commit c39d01d73cec24a0da747cf6b221ff749e332a1b Author: Mark Johnston AuthorDate: 2024-06-19 15:18:45 +0000 Commit: Mark Johnston CommitDate: 2024-07-02 13:19:28 +0000 dtrace: Remove LOCK_LEVEL It is unused on FreeBSD. No functional change intended. MFC after: 1 week (cherry picked from commit bc2901144cf71fd14b4b04cef801fa1bab19ad32) --- sys/cddl/dev/dtrace/dtrace_cddl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/cddl/dev/dtrace/dtrace_cddl.h b/sys/cddl/dev/dtrace/dtrace_cddl.h index 95317955c102..42a4721fbb90 100644 --- a/sys/cddl/dev/dtrace/dtrace_cddl.h +++ b/sys/cddl/dev/dtrace/dtrace_cddl.h @@ -25,8 +25,6 @@ #include -#define LOCK_LEVEL 10 - /* * Kernel DTrace extension to 'struct proc' for FreeBSD. */ From nobody Tue Jul 2 13:22:32 2024 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 4WD3Vd1Sy2z5QRhj; Tue, 02 Jul 2024 13:22:33 +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 4WD3Vd10hCz4yj0; Tue, 2 Jul 2024 13:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719926553; 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=BGfHxJ/RiZh12jABN9KZjFe6vHNWwWOZj1G0IVY/M74=; b=SJ7fmwp8v8K3Crmb+7feihehJTwXeBplV6a4lLW6vxbIM+15yDmGU4uCNzAxab6iAFHFUL 4Vb0cGWTSosVIe36igocah8lOlIzTpLZMYVYb/YCk6GFaPLbELRbPUt/PmzqfJcx5r6fP0 4YIaYmtQcZsTZlRYD7LifQvcpDhBGeAj6Jmwny/63+X566kelUlmji+Ei8IDiXU7FEu3ka /sSGh/T/klWKtziVYQKuE1oS/RKz7e9Wf5+mIbdLl8TnuZOD0/oeaXGHkvTepw8Y/A6i/t cezP4+6KgJXFX4o9itdN+dORyUh78+kN2PIrjpi38Fdb5IQIpA1kTQ+nJq1x0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719926553; a=rsa-sha256; cv=none; b=d1uoHjjVt37ZzpnxF1v3jfh3RMLwHjoD4LecvlmAJdF3sbiEbvmHoeUoWSdjeadWr9oXpa n9Ph9z2mTGfl0dm6oKFRQg20P04Qg7YJFAifs4Ab0Q9cdJ+sbOurIZVgwCC6uOc0SeOYH7 LRdnxy+lJ994yML303j0kqMV8gAC5uMY8+gnqk2jG26DF+suEF65swLMeP6TchrZ3mKmHx hP6CsnfbltPNv3ADmatD+NUIA0WQ/Xz49rZXhEoM9UFXm0O3kU23ZXg5Vm2Qsqt1MRxtQd m3jQGPIly1H/owgt2T4/dxYlK57Hvn0APEo2s3UbDNiyNGlcoEn21yo03i6Ikg== 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=1719926553; 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=BGfHxJ/RiZh12jABN9KZjFe6vHNWwWOZj1G0IVY/M74=; b=vjMa4IAyPNh2KdSQG7wANzNJWkxOV7vBPpRWligmV1/8Wlagg7OCm+5rRE0q8ET8acJAp7 Qjv4fqqhZk2ldjckbOJdiVPK6Y+MHMxi0QspSJYc3kQpr8ViZUPR8P7dTxEPP+LpMeL+g5 1p2+oJ2wQeWWESbp2Es+YeKDtqsLL3v/401eeUxJ1/Lwtovsff9aDFxVOzXESX2oSgQ83p SCGhcPi8hQGQ1YEgMIkgdH8VSar8qg4s6d3pp342/14CfAvuy5HluewVH6JJ6OjsZk7aTO hCjQoXbsYfcHly1jE54YLatiYcsdTcgZxM5wn1Qn3nYKXXXY1O3V//VYvXTLrw== 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 4WD3Vd0bJpzpwM; Tue, 2 Jul 2024 13:22:33 +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 462DMWae021069; Tue, 2 Jul 2024 13:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462DMWJq021066; Tue, 2 Jul 2024 13:22:32 GMT (envelope-from git) Date: Tue, 2 Jul 2024 13:22:32 GMT Message-Id: <202407021322.462DMWJq021066@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a9a57c843264 - stable/14 - wg: Implement if_transmit unconditionally 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: a9a57c843264ae1fecf8f0b63f95edbca2496819 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a9a57c843264ae1fecf8f0b63f95edbca2496819 commit a9a57c843264ae1fecf8f0b63f95edbca2496819 Author: Mark Johnston AuthorDate: 2024-06-16 17:33:45 +0000 Commit: Mark Johnston CommitDate: 2024-07-02 13:19:28 +0000 wg: Implement if_transmit unconditionally Commit bf454ca88bdf made wg_transmit() defined only when "device netmap" is configured, as if_wg's if_transmit implementation should never be called otherwise, but this breaks a requirement that interfaces implement both or neither of if_transmit and if_qflush. Restore the old behaviour of unconditionally defining wg_transmit(). It contains an assertion that the interface is in netmap mode. Reported by: peterj MFC after: 2 weeks Fixes: bf454ca88bdf ("wg: Add netmap support") (cherry picked from commit 5515e8874a8d85a8d961fca64c494dfc1bea4bd0) --- sys/dev/wg/if_wg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 552f47f9645b..b0ad94e284f1 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2194,7 +2194,6 @@ determine_af_and_pullup(struct mbuf **m, sa_family_t *af) return (0); } -#ifdef DEV_NETMAP static int determine_ethertype_and_pullup(struct mbuf **m, int *etp) { @@ -2256,6 +2255,7 @@ wg_transmit(if_t ifp, struct mbuf *m) return (0); } +#ifdef DEV_NETMAP /* * This should only be invoked by netmap, via nm_os_send_up(), to process * packets from the host TX ring. @@ -2919,8 +2919,8 @@ wg_clone_create(struct if_clone *ifc, char *name, size_t len, if_setinitfn(ifp, wg_init); if_setreassignfn(ifp, wg_reassign); if_setqflushfn(ifp, wg_qflush); -#ifdef DEV_NETMAP if_settransmitfn(ifp, wg_transmit); +#ifdef DEV_NETMAP if_setinputfn(ifp, wg_if_input); #endif if_setoutputfn(ifp, wg_output); From nobody Tue Jul 2 13:22:34 2024 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 4WD3Vf2GDKz5QRhl; Tue, 02 Jul 2024 13:22:34 +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 4WD3Vf1Ks8z4ylP; Tue, 2 Jul 2024 13:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719926554; 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=TfOIPUkOS3dOIFwDL1oMOO+xwWnqPy7YL8yt3W/+yVw=; b=MpOIQSo9Gn0CF+VLTmeLoWEIoh/K3zMVenBvlz1qf4IawyVx6KcN+sValaAgi9eMHDVVYj y21yISCiF5Li05eG4ak3R0rZlgxLTawVuqIoeXre4LHu6A9r0NiiKhTE/kS69aWMJvoS1B 6i7fCqkYYOQQRLNRbjdy45EXquud6RYYy8ya20YkR0v9Zmwz/jYGYaNI+5iu8OwLJojW+7 RZHJ6taIM4Ei/gWe8XzDx208vOK7jeyQaxdh+3U3JguaNfsIR+F8yM75jukI73TMjdOSXQ yCalV/idwM/Y7k6WkIN1T+/5V3Uo2qRA55J/bTQrdbd8eYqEdN2kJR2rgFUImg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719926554; a=rsa-sha256; cv=none; b=uamIWNV6SflAMHQqHJKJ1XBUtyzN84MfrkjRatMX1Iq+SVU9V3zW7H1Lh9nkY6YU7yxoUB wiOBeEHKeLLNNkFPxh9UR+NmWMFr2Vk/jd/SAbfl6VTRcOvuf0CG6f3IwhCHqBd3+LfV8K ll14cCm/BU2hqYZ2QDMnTcrcl9xrbaAQJ6CEO0zy0NJRFymub5A/jAgbibyjW2n6Idwjgc ep/40cLVrUXICo3h2HEk/hdjjvONcPbq56a24gU62NGR0fCIL5dkZ6khbzDL31+b7KkAMb G634DjYtQ+6O73BFVujYGJwGUoTZv8U9Q/jOWsyUGl3jmyMOWAszowyQslLXcQ== 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=1719926554; 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=TfOIPUkOS3dOIFwDL1oMOO+xwWnqPy7YL8yt3W/+yVw=; b=DM0QsCja2IhyRVbSO5nGZYcmtfugNdbXAXMBGF8stHNuCdfcF7zXNUz4iwlvi0V/F7Bi2r Yru50P5846LItTqi/Q5+oIp5xenIKtk2qNyKaf/GNjzTUIVTomPTLdpTcMFsEZyp0bZYrd tPcqJddAHRUeVrnU+Qni2N64gkyTFBwwS4rxT8offFLbBlFfI7OfQq9nxmpPESFi9MKREy L/5zEMgw7Z1JW3jMGvtDsvHYKXk40+VS4jKYDaCo+SMc3hr3ofpHZpwQt8SefCykMvxAcY sbDoRsDfZKFTNuc455jBkgCC8BLsAA4XGBNKpswfr6cMjwvxG2cY9TbQ2eJagA== 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 4WD3Vf0yDrzqQ5; Tue, 2 Jul 2024 13:22:34 +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 462DMYGM021126; Tue, 2 Jul 2024 13:22:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462DMYfT021123; Tue, 2 Jul 2024 13:22:34 GMT (envelope-from git) Date: Tue, 2 Jul 2024 13:22:34 GMT Message-Id: <202407021322.462DMYfT021123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 18babd824e11 - stable/14 - pf: Sprinkle const qualifiers in state lookup routines 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 18babd824e112d89057a01e2a21359dd5f464f0c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=18babd824e112d89057a01e2a21359dd5f464f0c commit 18babd824e112d89057a01e2a21359dd5f464f0c Author: Mark Johnston AuthorDate: 2024-06-24 14:46:55 +0000 Commit: Mark Johnston CommitDate: 2024-07-02 13:19:29 +0000 pf: Sprinkle const qualifiers in state lookup routines State keys are trivially const in lookup routines, so annotate them as such. No functional change intended. Reviewed by: kp MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D45671 (cherry picked from commit 66b8cac8d837c0ca3fd38d0a66259ca932a1c430) --- sys/net/pfvar.h | 8 +++++--- sys/netpfil/pf/pf.c | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 27428ad161f8..1c932026aeb3 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2231,9 +2231,11 @@ pf_release_staten(struct pf_kstate *s, u_int n) } extern struct pf_kstate *pf_find_state_byid(uint64_t, uint32_t); -extern struct pf_kstate *pf_find_state_all(struct pf_state_key_cmp *, +extern struct pf_kstate *pf_find_state_all( + const struct pf_state_key_cmp *, u_int, int *); -extern bool pf_find_state_all_exists(struct pf_state_key_cmp *, +extern bool pf_find_state_all_exists( + const struct pf_state_key_cmp *, u_int); extern struct pf_ksrc_node *pf_find_src_node(struct pf_addr *, struct pf_krule *, sa_family_t, @@ -2514,7 +2516,7 @@ struct pf_krule *pf_get_translation(struct pf_pdesc *, struct mbuf *, struct pf_state_key *pf_state_key_setup(struct pf_pdesc *, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t); -struct pf_state_key *pf_state_key_clone(struct pf_state_key *); +struct pf_state_key *pf_state_key_clone(const struct pf_state_key *); void pf_rule_to_actions(struct pf_krule *, struct pf_rule_actions *); int pf_normalize_mss(struct mbuf *m, int off, diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index ae0c5dcf8128..6671839fc5ab 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -361,7 +361,7 @@ static void pf_print_state_parts(struct pf_kstate *, static void pf_patch_8(struct mbuf *, u_int16_t *, u_int8_t *, u_int8_t, bool, u_int8_t); static struct pf_kstate *pf_find_state(struct pfi_kkif *, - struct pf_state_key_cmp *, u_int); + const struct pf_state_key_cmp *, u_int); static int pf_src_connlimit(struct pf_kstate **); static void pf_overload_task(void *v, int pending); static u_short pf_insert_src_node(struct pf_ksrc_node **, @@ -627,11 +627,11 @@ pf_packet_rework_nat(struct mbuf *m, struct pf_pdesc *pd, int off, } static __inline uint32_t -pf_hashkey(struct pf_state_key *sk) +pf_hashkey(const struct pf_state_key *sk) { uint32_t h; - h = murmur3_32_hash32((uint32_t *)sk, + h = murmur3_32_hash32((const uint32_t *)sk, sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), V_pf_hashseed); @@ -1477,7 +1477,7 @@ pf_state_key_setup(struct pf_pdesc *pd, struct pf_addr *saddr, } struct pf_state_key * -pf_state_key_clone(struct pf_state_key *orig) +pf_state_key_clone(const struct pf_state_key *orig) { struct pf_state_key *sk; @@ -1576,7 +1576,8 @@ pf_find_state_byid(uint64_t id, uint32_t creatorid) * Returns with ID hash slot locked on success. */ static struct pf_kstate * -pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) +pf_find_state(struct pfi_kkif *kif, const struct pf_state_key_cmp *key, + u_int dir) { struct pf_keyhash *kh; struct pf_state_key *sk; @@ -1585,7 +1586,7 @@ pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); - kh = &V_pf_keyhash[pf_hashkey((struct pf_state_key *)key)]; + kh = &V_pf_keyhash[pf_hashkey((const struct pf_state_key *)key)]; PF_HASHROW_LOCK(kh); LIST_FOREACH(sk, &kh->keys, entry) @@ -1623,7 +1624,7 @@ pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) * Returns with ID hash slot locked on success. */ struct pf_kstate * -pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) +pf_find_state_all(const struct pf_state_key_cmp *key, u_int dir, int *more) { struct pf_keyhash *kh; struct pf_state_key *sk; @@ -1632,7 +1633,7 @@ pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); - kh = &V_pf_keyhash[pf_hashkey((struct pf_state_key *)key)]; + kh = &V_pf_keyhash[pf_hashkey((const struct pf_state_key *)key)]; PF_HASHROW_LOCK(kh); LIST_FOREACH(sk, &kh->keys, entry) @@ -1689,7 +1690,7 @@ second_run: * removing it. */ bool -pf_find_state_all_exists(struct pf_state_key_cmp *key, u_int dir) +pf_find_state_all_exists(const struct pf_state_key_cmp *key, u_int dir) { struct pf_kstate *s; From nobody Tue Jul 2 13:22:35 2024 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 4WD3Vg3XHMz5QRCD; Tue, 02 Jul 2024 13:22:35 +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 4WD3Vg2RBbz4yPP; Tue, 2 Jul 2024 13:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719926555; 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=+i9eD1zQh+C0PNjxL3+HYRKRtcOzy4PBkqnRv6Ks0k4=; b=ZAiULQLxdoEFrmY9ugil3zFEY976TqYljslaoXZ08XO/CJKhuhQl+7L8LCh1rIHLBpLT0q F20VbRMygYMm/zauylbHlu9GD+7aSX5WcePJNMTDYv4ugZhSfZKB4z+xHroa/U60wK0uv0 GaYHxkLk9E/kfPiA3Qs93pUQo2u3NiZbKhjXROzpNGrhwQvb/DuCT4hu3cvglzOxyC0akx u0ccXJRbOJ65T7zcTt943/LpEoOW4rjwVig9BW+gYhBcSDeHYiGD0vTU+N10HnlgMWsouh NyAo+zmToQn+xjm7cfCTi55mddptIbUzL0c4z3SG1j+aV8oJCrN9ckPAf2aNKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719926555; a=rsa-sha256; cv=none; b=qT4qQQ49pqix9U0ynlXfvFrQvjUYd7PF1VKbvuGisPns5lU9CwDHez0P1no9z2doMIJKyW nIm7XNckQEfrfE31WQldTGdvyY4RtfffpvI29vxYFKmPRiZ0rfhhT/f+TcYeTRsfJI1Phg ezJBITWWrIOzi0YjDnz3zOYYLK+UrC+72obwdZTN7o5AuUyjdFbAGMvYiGu4ibkqXLJYZP BKki155aT2QWMamycFQE/jqo5qRDLtpLDT3blXSvVd7CXlVKZRV1w6/DmZb5wcIJegWjYs 65epLfd7/lgQOmFxo09rf53j0jPQmCAk3YL1uSGLvrJKwnHhlG7UuojK05i1ug== 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=1719926555; 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=+i9eD1zQh+C0PNjxL3+HYRKRtcOzy4PBkqnRv6Ks0k4=; b=O8kHbZsTIvPVqlzQCfFU04uBa54IC/49/S9BboiSk+nV0xyPPU3V6RhswqzUN0HZVwRhZk nDiluOX8y5Y2yKktr/ZI6scVkSJ8ODv1P5wE7FwQBUq6nh9nhxw7uA0P5LwTtvPIVWy3Uy vSY5KLmYmuiEEZx9Rwgrgvauf9Pxi9Kct6HH9qfFvy3wO2NiQyFHAgRj6YDTnsZB5RPEsl vsTJlHOpAnBmSpthS4yAXD4ubk4/SU8q2rLMyMXKCVmWvEfDtevTu1hgk54OAyk+najJrH e5gv10+kapK/7DF2X3qHCxIXhOKbt3U3hwdN4uGEqALNQpg1bSbpzXyFGdO9rw== 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 4WD3Vg22tdzq20; Tue, 2 Jul 2024 13:22:35 +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 462DMZFP021186; Tue, 2 Jul 2024 13:22:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462DMZuM021183; Tue, 2 Jul 2024 13:22:35 GMT (envelope-from git) Date: Tue, 2 Jul 2024 13:22:35 GMT Message-Id: <202407021322.462DMZuM021183@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 10f4a77485ff - stable/14 - procfs.4: Fix the description of credential info in the "status" file 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 10f4a77485ff0a2ca71812c19e52daa07d283774 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=10f4a77485ff0a2ca71812c19e52daa07d283774 commit 10f4a77485ff0a2ca71812c19e52daa07d283774 Author: Mark Johnston AuthorDate: 2024-06-24 14:46:36 +0000 Commit: Mark Johnston CommitDate: 2024-07-02 13:19:29 +0000 procfs.4: Fix the description of credential info in the "status" file The 11th and 12th columns are the effective and real UIDs, respectively. The 13th column is a group list whose first member is the effective GID. Reviewed by: arrowd MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45700 (cherry picked from commit b75d14d6005b36fe8ea90cadc027272eb06d1bc5) --- share/man/man5/procfs.5 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/share/man/man5/procfs.5 b/share/man/man5/procfs.5 index d055faadf2c0..253fe5670969 100644 --- a/share/man/man5/procfs.5 +++ b/share/man/man5/procfs.5 @@ -1,7 +1,7 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.Dd April 10, 2023 +.Dd June 23, 2024 .Dt PROCFS 5 .Os .Sh NAME @@ -229,11 +229,11 @@ comma separated. .It the wait channel message .It -the process credentials consisting of -the effective user id -and the list of groups (whose first member -is the effective group id) -all comma separated. +the process effective UID +.It +the process real UID +.It +group list, starting with the effective GID, comma-separated .It the hostname of the jail in which the process runs, or .Ql - From nobody Tue Jul 2 13:22:36 2024 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 4WD3Vh4R3vz5QRCH; Tue, 02 Jul 2024 13:22:36 +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 4WD3Vh39gmz4yVJ; Tue, 2 Jul 2024 13:22:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719926556; 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=8N2CzVWlikaaA7cHzmUQYJywyqDaN3dZ8nVnP6uM1eU=; b=Tflrn1JSqpdgm3u0qvicqeW8J8cJOsn6lvICyIYFa3ph243Z8FemvJAoavxma+XnQmFCXs m+Na8yKGrAILYO+5rye0SpwTQ7ppTKi+8LtPs/eKoMW4chdCmFbJZr2VylAKACm3tN1bDE L4NG5nJMpj59u5taL8mgUI1ApbDdMFgPqtUsMU+6lnw+Hsq6G5Nb24UUeHKeI+5I96seIZ H0qR8rI2s6a+hx6IlZw5hcV4w5pRBem01PJwx6u5wQCayYOGdYFNbH9Y9+23wSeArKnsLP 3fNRmbD7ubTN0vp+bkYDixVwSWOoK+Fb8vRSO1p0I7y8XmNlFNvZ8Q4nrgBeKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719926556; a=rsa-sha256; cv=none; b=v2x68/WcDecpMZod1taQRdh7CeSsKV5v/iyanqF8DILX+EeYY4uJnQBtKDqrHOEykFHwKF /g3F4gv9DPmDoN3Efqk7mU5jZZ3qDFY6XNbYgFhhPnr6jH2yON6oQRRyd5HPRZNF3Qge/y I5KvQaZhBjvLgCKssHPsi+65YtbJ/naVaRv7IgVWpte1LKaDoGknpos5xdoIu3sWWtmNc2 k1da778BjoUwzB/HpTF6AxxrtTYQmwrdz9+xcPQvCosAA2RtYd93v+n69nwIV2pj14gnL+ bLgYKNI0AxWvGQ8YYdWhxYIvoni6wk93db/dtPJMhv+SsDMHlbYrzm+WsmY+nw== 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=1719926556; 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=8N2CzVWlikaaA7cHzmUQYJywyqDaN3dZ8nVnP6uM1eU=; b=qrIyFaC4LYI/XuxFbfAmfzvUQASJzFZhycGxWKyH+LnfWNxsHgoYQF5LSUgPrWJMj5khla BUyIgdrZ9lr0SsxpUwBoxFhie5woGdohIbGZEqwcjph0OKGveq8b6lNLe7BfkFLTt8scYn VUS5sWsBc+L9QqIdC3uzCShXINYsLTaYASVYrwaLD2TuR9+gnXLfZNub1GWM7dFUWKVBYm iB849Cqd8aHD+sSL7Gx21LDGsGl5686qvIZbXiB0+jqCL+0QxQdCRSfB5rP/jKrDCfQVyY 7uOvJDQyXZoCgB2957p4mJPaCUzMpBfIgWwlgVojEJZlzGG5+skDjWsRl+u56A== 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 4WD3Vh2nTvzq3q; Tue, 2 Jul 2024 13:22:36 +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 462DMaLE021239; Tue, 2 Jul 2024 13:22:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462DMaQL021236; Tue, 2 Jul 2024 13:22:36 GMT (envelope-from git) Date: Tue, 2 Jul 2024 13:22:36 GMT Message-Id: <202407021322.462DMaQL021236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1a0314d6e305 - stable/14 - ctladm: Fix a race when loading ctl.ko 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a0314d6e30554fc2b07caa5121b00956f416cc4 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1a0314d6e30554fc2b07caa5121b00956f416cc4 commit 1a0314d6e30554fc2b07caa5121b00956f416cc4 Author: Mark Johnston AuthorDate: 2024-06-24 15:09:18 +0000 Commit: Mark Johnston CommitDate: 2024-07-02 13:19:29 +0000 ctladm: Fix a race when loading ctl.ko If multiple ctladm processes try to load ctl.ko at the same time, only one will succeed. Handle this possibility by retrying the operation (open /dev/cam/ctl) if kldload returns EEXIST, rather than bailing. This at least helps ensure that ctladm tests can be run in parallel when ctl.ko is not preloaded. Reviewed by: asomers MFC after: 1 week (cherry picked from commit 7d6932d20aedbbb220cd78e90ab4e82d1abaad31) --- usr.sbin/ctladm/ctladm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index e99610373ff0..228af7bae8c6 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -4133,7 +4133,7 @@ main(int argc, char **argv) if (fd == -1 && errno == ENOENT) { saved_errno = errno; retval = kldload("ctl"); - if (retval != -1) + if (retval != -1 || errno == EEXIST) fd = open(device, O_RDWR); else errno = saved_errno; From nobody Tue Jul 2 15:41:09 2024 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 4WD6ZY6dVdz5MpbY; Tue, 02 Jul 2024 15:41:09 +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 4WD6ZY556dz45jy; Tue, 2 Jul 2024 15:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719934869; 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=1+qkNvBcigrS6bDElLMdN9Ft5NHxE65QR0VZKcCxP8k=; b=T+/U+Cg1v9FsgkP/h9Gmx5QyAH9xFxarmD8c49CoT74BbskwFSsAIZbcEKFSAEPzvl/KY9 +qXcvOReDyiWrxO7sN+/XyVyz/cxCVSo+0MG/VRyyjkZnAtDf0CNYhVI66EYucm4WuEoBL j59p1C9ghEZ6nqL3qvgq88j9U69jFdy35CF5SRljC4cXLadj5AjIT2PhPT48wRE37AkViD TBN3e9+u1tbfDjr2++b5AMKKSQ8Sycs3Yg8CdYRkFC1td5LrHwP+lJevpaq0D42D+gEted BWv4yvaTvIbxQjLxkM4C42+z4uFtCErhOBnjLxVNEQdKPpYwLj8CTyEXD7qUMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719934869; a=rsa-sha256; cv=none; b=S7vuUw9LxrSyXWSaPiGEs3oDcPeYv5/p0cyT6UqGllNWlnmj1rNG0mwbHfFwPq4BfyUYyD OOB2IQkwXwDTLtnRUN5ZUdzJrCz0kj+VVZDDAsdUmexT8CjzqTJRpsC3Qt5Tz3+8yqCV/i 3F7iEdPk+8/UUq/mmY7K/C3iDnTZQsGv/wD/6PyLHGcL1OENAE8gYa3+31DEXD9GVG633N fotTxYcN5/b+S/hzbic08cqTebbjH45NxsDIWP15i+CWqbAY+UNryHnoVIl3nkHEidPe21 CwJAjuKRWxNv05kN0VkuRRXMGFBCoNrKtEhTJ+q2ohsHlPRykUzyFLQUv6D8FA== 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=1719934869; 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=1+qkNvBcigrS6bDElLMdN9Ft5NHxE65QR0VZKcCxP8k=; b=ixUUgQH720LMxJ93c2QB58GJYkYuhlOzV2334h7dmQmbutpSmlbyqvn4rWQBswUiTlYB2j GC43TJTVgIz5xSsBz7OrqPgFQ5LAaCD9C08eC+VYeXtEs26v6p4MsEdlCfxniH6Vg05GYk ERXMsSJRB9jkvI0k4p6j5ccfMmSagbPyBqeAGZuXPHnCbG3JHnss9wdUPxCdFURj8HDXXT Fwmai6ghqIwqmodbqVWuF5uYDyqaBjvZihyg/LO9aMxEk0dPEOg9YiIKCMil6GJY+CtS5+ EWBwoHmhEj0B5YrPAPb6AYIndqKictrQ9Hza5y3styBF+z95FNb+SYif0/yZHQ== 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 4WD6ZY4hTzzsnG; Tue, 2 Jul 2024 15:41:09 +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 462Ff9GY052644; Tue, 2 Jul 2024 15:41:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462Ff9LW052641; Tue, 2 Jul 2024 15:41:09 GMT (envelope-from git) Date: Tue, 2 Jul 2024 15:41:09 GMT Message-Id: <202407021541.462Ff9LW052641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 239e24eb0cf6 - main - pf: Handle (*m0)->m_len < sizeof(struct ip) case 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 239e24eb0cf694547f75d9b75d029895c9d540b1 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=239e24eb0cf694547f75d9b75d029895c9d540b1 commit 239e24eb0cf694547f75d9b75d029895c9d540b1 Author: Igor Ostapenko AuthorDate: 2024-07-02 12:41:54 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 12:43:46 +0000 pf: Handle (*m0)->m_len < sizeof(struct ip) case if_enc(4) can pass IPsec payload to pfil(9) with the outer header or without it. In case of a small packet like ICMP, when mbuf cluster is not used, everything works fine. Otherwise, the first mbuf in a chain has m_len == 0 if it is asked to strip the outer header. pf was not handling such case, and erroneous reading of the outer IP header led to unexpected behavior. Reviewed by: kp, glebius Differential Revision: https://reviews.freebsd.org/D45780 --- sys/netpfil/pf/pf.c | 8 ++ tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/if_enc.sh | 220 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 1e3f09783e40..4ad0a9a1336a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8082,6 +8082,14 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, pd.af = AF_INET; pd.act.rtableid = -1; + if (m->m_len < sizeof(struct ip) && + (m = *m0 = m_pullup(*m0, sizeof(struct ip))) == NULL) { + DPFPRINTF(PF_DEBUG_URGENT, + ("pf_test: m_len=%d < sizeof(struct ip), pullup failed\n", + m->m_len)); + PF_RULES_RUNLOCK(); + return (PF_DROP); + } h = mtod(m, struct ip *); off = h->ip_hl << 2; diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 2840dc92f2fa..71f26979415a 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -17,6 +17,7 @@ ATF_TESTS_SH+= altq \ fragmentation_no_reassembly \ get_state \ icmp \ + if_enc \ limits \ loginterface \ killstate \ diff --git a/tests/sys/netpfil/pf/if_enc.sh b/tests/sys/netpfil/pf/if_enc.sh new file mode 100644 index 000000000000..a6d258e40e33 --- /dev/null +++ b/tests/sys/netpfil/pf/if_enc.sh @@ -0,0 +1,220 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Igor Ostapenko +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +# +# The following network is used as a base for testing. +# +# +# ${awan}b |----------| ${bwan}b +# 2.0.0.1 | host wan | 3.0.0.1 +# .---->| Internet |<----. +# A WAN | |----------| | B WAN +# | | +# Office A side | | Office B side +# | ${awan}a ${bwan}a | +# v 2.0.0.22 3.0.0.33 v +# ${alan}b |----------| |----------| ${blan}b +# 1.0.0.1 | host agw | | host bgw | 4.0.0.1 +# .----------->| gateway | < IPsec > | gateway |<-----------. +# | A LAN |----------| tunnel |----------| B LAN | +# | | +# | | +# | ${alan}a ${blan}a | +# v 1.0.0.11 4.0.0.44 v +# |----------| |----------| +# | host a | | host b | +# | client | | client | +# |----------| |----------| +# +# +# There is routing between office A clients and office B ones. The traffic is +# encrypted, i.e. host wan should see IPsec flow (ESP packets). +# + +ipsec_init() +{ + if ! sysctl -q kern.features.ipsec >/dev/null ; then + atf_skip "This test requires ipsec" + fi +} + +if_enc_init() +{ + ipsec_init + if ! kldstat -q -m if_enc; then + atf_skip "This test requires if_enc" + fi +} + +ipfw_init() +{ + if ! kldstat -q -m ipfw; then + atf_skip "This test requires ipfw" + fi +} + +assert_ipfw_is_off() +{ + if kldstat -q -m ipfw; then + atf_skip "This test is for the case when ipfw is not loaded" + fi +} + +build_test_network() +{ + local ipfwon=$1 + + alan=$(vnet_mkepair) + awan=$(vnet_mkepair) + bwan=$(vnet_mkepair) + blan=$(vnet_mkepair) + + # host a + vnet_mkjail a ${alan}a + jexec a ifconfig ${alan}a 1.0.0.11/24 up + jexec a route add default 1.0.0.1 + test $ipfwon && jexec a ipfw add 65534 allow all from any to any + + # host agw + vnet_mkjail agw ${alan}b ${awan}a + jexec agw ifconfig ${alan}b 1.0.0.1/24 up + jexec agw ifconfig ${awan}a 2.0.0.22/24 up + jexec agw route add default 2.0.0.1 + jexec agw sysctl net.inet.ip.forwarding=1 + test $ipfwon && jexec agw ipfw add 65534 allow all from any to any + + # host wan + vnet_mkjail wan ${awan}b ${bwan}b + jexec wan ifconfig ${awan}b 2.0.0.1/24 up + jexec wan ifconfig ${bwan}b 3.0.0.1/24 up + jexec wan sysctl net.inet.ip.forwarding=1 + test $ipfwon && jexec wan ipfw add 65534 allow all from any to any + + # host bgw + vnet_mkjail bgw ${bwan}a ${blan}b + jexec bgw ifconfig ${bwan}a 3.0.0.33/24 up + jexec bgw ifconfig ${blan}b 4.0.0.1/24 up + jexec bgw route add default 3.0.0.1 + jexec bgw sysctl net.inet.ip.forwarding=1 + test $ipfwon && jexec bgw ipfw add 65534 allow all from any to any + + # host b + vnet_mkjail b ${blan}a + jexec b ifconfig ${blan}a 4.0.0.44/24 up + jexec b route add default 4.0.0.1 + test $ipfwon && jexec b ipfw add 65534 allow all from any to any + + # Office A VPN setup + echo ' + spdadd 1.0.0.0/24 4.0.0.0/24 any -P out ipsec esp/tunnel/2.0.0.22-3.0.0.33/require; + spdadd 4.0.0.0/24 1.0.0.0/24 any -P in ipsec esp/tunnel/3.0.0.33-2.0.0.22/require; + add 2.0.0.22 3.0.0.33 esp 0x203 -E aes-gcm-16 "123456789012345678901234567890123456"; + add 3.0.0.33 2.0.0.22 esp 0x302 -E aes-gcm-16 "123456789012345678901234567890123456"; + ' | jexec agw setkey -c + + # Office B VPN setup + echo ' + spdadd 4.0.0.0/24 1.0.0.0/24 any -P out ipsec esp/tunnel/3.0.0.33-2.0.0.22/require; + spdadd 1.0.0.0/24 4.0.0.0/24 any -P in ipsec esp/tunnel/2.0.0.22-3.0.0.33/require; + add 2.0.0.22 3.0.0.33 esp 0x203 -E aes-gcm-16 "123456789012345678901234567890123456"; + add 3.0.0.33 2.0.0.22 esp 0x302 -E aes-gcm-16 "123456789012345678901234567890123456"; + ' | jexec bgw setkey -c +} + +atf_test_case "ipfwoff_ip4_pfil_in_after_stripping" "cleanup" +ipfwoff_ip4_pfil_in_after_stripping_head() +{ + atf_set descr 'Test that pf pulls up mbuf if m_len==0 after stripping the outer header, with ipfw disabled' + atf_set require.user root + atf_set require.progs nc +} +ipfwoff_ip4_pfil_in_after_stripping_body() +{ + local ipfwon + + pft_init + if_enc_init + test "$1" == "ipfwon" && ipfwon="yes" + test $ipfwon && ipfw_init || assert_ipfw_is_off + + build_test_network $ipfwon + + # Sanity check + atf_check -s exit:0 -o ignore jexec a ping -c3 4.0.0.44 + + # Configure port forwarding on host bgw + jexec bgw ifconfig enc0 up + jexec bgw sysctl net.inet.ipsec.filtertunnel=0 + jexec bgw sysctl net.enc.in.ipsec_filter_mask=2 # after stripping + jexec bgw sysctl net.enc.out.ipsec_filter_mask=1 # before outer header + echo ' + rdr on enc0 proto tcp to 4.0.0.1 port 666 -> 4.0.0.44 + pass + ' | jexec bgw pfctl -ef- + + # Prepare the catcher on host b + echo "unexpected" > ./receiver + jexec b nc -n4l -N 666 > ./receiver & + nc_pid=$! + sleep 1 + + # Poke it from host a to host bgw + spell="Ak Ohum Oktay Weez Barsoom." + echo $spell | jexec a nc -w3 4.0.0.1 666 + + # Expect it to hit host b instead + sleep 1 # let the catcher finish + jexec b kill -KILL $nc_pid # in a fail case the catcher may listen forever + atf_check_equal "$spell" "$(cat ./receiver)" +} +ipfwoff_ip4_pfil_in_after_stripping_cleanup() +{ + pft_cleanup +} + +atf_test_case "ipfwon_ip4_pfil_in_after_stripping" "cleanup" +ipfwon_ip4_pfil_in_after_stripping_head() +{ + atf_set descr 'Test that pf pulls up mbuf if m_len==0 after stripping the outer header, with ipfw enabled' + atf_set require.user root + atf_set require.progs nc +} +ipfwon_ip4_pfil_in_after_stripping_body() +{ + ipfwoff_ip4_pfil_in_after_stripping_body "ipfwon" +} +ipfwon_ip4_pfil_in_after_stripping_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "ipfwoff_ip4_pfil_in_after_stripping" + atf_add_test_case "ipfwon_ip4_pfil_in_after_stripping" +} From nobody Tue Jul 2 15:44:03 2024 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 4WD6dw1pTKz5Mpvg; Tue, 02 Jul 2024 15:44:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD6dw0jZhz467y; Tue, 2 Jul 2024 15:44:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719935044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uL7FQ0+3neBxfvvH42RLULhnXOO3GkUdzEnWnfBfIh4=; b=jnZsiWS816ECMK8FMziKK27+D8C2oOmBMo0llPiEVz4P+pgeLyWUKVW42LR2UCCHyZNtji tj+pZ0cs3Jikpf/9m8CqeNQZRZXWHKAOOHU+uwBy9Oi6RhC7F0d1AkWr9P3NmSxxoKvvVk uFGlOar1O1pzhp3c3wUoms9r99vfKPBcPmRHG47duMGCwJaoCySLUkVVkbO/nlf2x9rsuD JqtA0E1ycnKQzXy5Z8Tp6CtT+bSd2TTi8WE/lw4GiqBr0c2Dlhz5uRZaPRfSVhu5Yvt/AJ 4GCNhqWIZNQGuQXZJMKlWUWbp0Iw3Mr9NAW3REzOBYuZ//TN0J0zOJ7ucGryIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719935044; a=rsa-sha256; cv=none; b=qFVlGhZsjjGXR1aKqkuF4txWlgAgIZcQLFeTYqp+gV4TvubRbdzNLbZ4eWc4/IzrIJQUhG R0Ljtfdw6aLQq2tuMYhnbNFC7PLjaQi6urLVe9h76fZ2vvLfjebUEWYc3gMSzemx3mZCbk V89vfDrUo4mOqRm948eE072+9c2OhqTDLElw3HDDCnNDdbFwwahtjWsYyHeMW/cxTj2+kB /XWXQUBPOpWQjiI61u3ku6G2qq2H/xMdVw+eZbKOrpU68obX1l82TNhWzTLBwHgoAWJn0s WTcscuoa3g0xL766YJuzptjdy46YmfjWb+Tg8L8JDwd0Ch3BK4tH47zoGuYONg== 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=1719935044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uL7FQ0+3neBxfvvH42RLULhnXOO3GkUdzEnWnfBfIh4=; b=bxx/HIUNVV2S2KLZclLiNOkt+hOe2q9UdPVl2EiYEHqWxEF2za+m+/Ziel3q5BTXys3Txx kJh/9FlT+mbySGouzMQuNGVmm1ssrbM4fQ/hN2Av0LXvlgryLbV1nznXZk1L33vAUkrQbr G8jZ43wAuXjETMbc4BlM0I7GO4yDZzKof3maxp759IkE6jGC0X6PBhhD3V3ZHRadlXpoXd n6O0Dd6Bh7zyQoU1WoOR622Nc2wXJ2KkuEsZzTMdYNDjydVVc62/e7g3l5mLaN+0OsPxrg lC6ljxXWuMhCAYPQx+DnraV95ZrBUsZuHTT/A39aMG+koiZvRrQoGww4izk81w== Received: from [IPV6:2601:5c0:4200:b830:3517:62a3:b646:39a7] (unknown [IPv6:2601:5c0:4200:b830:3517:62a3:b646:39a7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WD6dv5VQwz17xh; Tue, 2 Jul 2024 15:44:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 2 Jul 2024 11:44:03 -0400 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 Content-Language: en-US To: Warner Losh Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/1/24 4:09 PM, Warner Losh wrote: > On Mon, Jul 1, 2024, 3:53 PM John Baldwin wrote: > >> On 6/20/24 7:41 PM, Warner Losh wrote: >>> The branch main has been updated by imp: >>> >>> URL: >> https://cgit.FreeBSD.org/src/commit/?id=67d1a1cd9e772e2ef94003579f4fbc271d38be7d >>> >>> commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d >>> Author: Warner Losh >>> AuthorDate: 2024-06-20 23:02:56 +0000 >>> Commit: Warner Losh >>> CommitDate: 2024-06-21 02:41:08 +0000 >>> >>> cdefs.h: Remove support for pre gcc 4.0 >>> >>> All supported compilers support the gcc 3 attribute extensions. >> Remove >>> the #else clauses for this. Also, latter-day pcc compilers also >> define >>> __GNUC__, so there's not need to also test for __PCC__. >>> >>> Reviewed by: brooks >>> Differential Revision: https://reviews.freebsd.org/D45654 >>> Sponsored by: Netflix >>> --- >>> sys/sys/cdefs.h | 42 ++++-------------------------------------- >>> 1 file changed, 4 insertions(+), 38 deletions(-) >>> >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >>> index 88019819eb35..a6ecdca5d8b9 100644 >>> --- a/sys/sys/cdefs.h >>> +++ b/sys/sys/cdefs.h >>> @@ -408,15 +389,10 @@ >>> * assign pointer x to a local variable, to check that its type is >>> * compatible with member m. >>> */ >>> -#if __GNUC_PREREQ__(3, 1) >>> #define __containerof(x, s, m) ({ >> \ >>> const volatile __typeof(((s *)0)->m) *__x = (x); \ >>> __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ >>> }) >>> -#else >>> -#define __containerof(x, s, m) >> \ >>> - __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) >>> -#endif >>> >>> /* >>> * Compiler-dependent macros to declare that functions take printf-like >>> @@ -434,14 +410,8 @@ >>> #define __strftimelike(fmtarg, firstvararg) \ >>> __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) >>> >>> -/* Compiler-dependent macros that rely on FreeBSD-specific extensions. >> */ >>> -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ >>> - defined(__GNUC__) >>> #define __printf0like(fmtarg, firstvararg) \ >>> __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) >>> -#else >>> -#define __printf0like(fmtarg, firstvararg) >>> -#endif >> >> Does this still work with external GCC? I didn't think printf0 was >> supported >> by external GCC (or maybe I had to readd it in the port and that's what I >> remember). Ah, yes, printf0 is a local patch in the devel/freebsd-gccX >> ports, but is not available in stock GCC (e.g. lang/gcc does not support >> it). >> > > Ah. That would explain why it just worked for me. That's what I tested > with. Clang also seemed happy with it. But that was the in tree clang. Is > there a similar issue? Gnuc is defined for both. So we don't support building the base system with lang/gcc, only devel/freebsd-gccX (which has a local patch to add printf0 support). The only question might be, do we support using __printf0like for things that aren't in the base system that could be built with lang/gcc. If so, we might need to guard this somehow. I'm not sure though that we care about random software not in base using a FreeBSD-specific keyword from . -- John Baldwin From nobody Tue Jul 2 16:30:03 2024 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 4WD7gF5y83z5Nh11 for ; Tue, 02 Jul 2024 16:30:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD7gD6KGcz4Cy4 for ; Tue, 2 Jul 2024 16:30:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2c7bf925764so3217303a91.0 for ; Tue, 02 Jul 2024 09:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1719937815; x=1720542615; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=v3dB22oSaRx4YTp6pS6wENk7E//T+T7NNvOn6tc/RS8=; b=gXW4OmAew/GdA5PyDxfFIYvKy3dI1+eDTew2tjWsWC2r59v3NFrpLntPRyr9QbB+AO U1ohTtnPK0dWpC3ckHN6CoevlkkxiM2w4gNk2tbC/gA8JIYsaI1F3KoLeDo/bXpf4Bga vXI2zOzLPtoI+zoex4VVFyEUodXxnoq1o0YMBMuRicivGZPHFTbbK/Mj7/FkaQ0lB0DM CMMd6bprwerBV4D1ssxz5huZ2jUGXtVxbAv0pFG4Og/5xq8IaG8Q2fZh9Jdt46PLxQtM BwuCoGRpEAL4FnbrIjctyK/BMpCSjyBOvMZNl/jzVH22L8/zt5AqPrrui2dBLORDgFxC LnYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719937815; x=1720542615; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v3dB22oSaRx4YTp6pS6wENk7E//T+T7NNvOn6tc/RS8=; b=v5xTv2gKdhXaNZ6Lss5pWRaAbL5qcMmd9eFdkuFmCL9MdksBMQNIIBYH+98f4oPn1H ISSbRHzJ5XuENJdV4BROU/OdL2NYyiyWjXYgr32jR6WZ9MiqDvAIFGn+jJcbd2Kk7HQL zfJZY3u0TxK3ZaUmlEchDd2qdHvwzb6PjUgdcKxxajMipwrsLAd0gxx7D/jmLBi9WWBK CZDUMdDNBcQFp7OnzzGisi9pH5LqqgXR908badpjJUrAQng0M7+hWEHXFoNmAKnfrPHv 4YnBLYqM2ksOXdMAyEnB7d8k+SDpFi4oNynCv88VKjaKZ67qjLWBLUZ185QvsYG4/252 w5rw== X-Forwarded-Encrypted: i=1; AJvYcCUorXiXFXTkjCThIdN5r0WO0+ErQSYOKdG2zwyZoRs81D6qUryIyu6W1DDLFX6Xjx0alGgDLpFjvoekSh6sE6+tOETxggG/f/MB12K0897R X-Gm-Message-State: AOJu0Yw2J5il1UARFZYwNIvb/KL52hhYNHfZEo9iJ4P4XakGd3CfSmRB KzReFvL31cT1uL+YUD/iV8Vr4QuBFCd322vuYyHL0qEjhBZRre8Sr2zYNYAjawzXM4+y0cRpz9+ yfNmcGoGLrJ9pLx4I3xshySNrVQiJ0kb3jRKTfw== X-Google-Smtp-Source: AGHT+IGoU/zEg6KnsT+fzeU+tP5ha6HNp+u5J96hqizKO5/FSqnQrQNlEeUZ1ZHTd8gbyW549xh9hep1ZaJoDswlh6M= X-Received: by 2002:a17:90a:883:b0:2c9:2d00:44e with SMTP id 98e67ed59e1d1-2c93d710b9cmr7575037a91.14.1719937814852; Tue, 02 Jul 2024 09:30:14 -0700 (PDT) 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Tue, 2 Jul 2024 10:30:03 -0600 Message-ID: Subject: Re: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 To: John Baldwin Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000007d9a9f061c463ae8" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WD7gD6KGcz4Cy4 --0000000000007d9a9f061c463ae8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey John, On Tue, Jul 2, 2024 at 9:44=E2=80=AFAM John Baldwin wrote= : > On 7/1/24 4:09 PM, Warner Losh wrote: > > On Mon, Jul 1, 2024, 3:53=E2=80=AFPM John Baldwin wro= te: > > > >> On 6/20/24 7:41 PM, Warner Losh wrote: > >>> The branch main has been updated by imp: > >>> > >>> URL: > >> > https://cgit.FreeBSD.org/src/commit/?id=3D67d1a1cd9e772e2ef94003579f4fbc2= 71d38be7d > >>> > >>> commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d > >>> Author: Warner Losh > >>> AuthorDate: 2024-06-20 23:02:56 +0000 > >>> Commit: Warner Losh > >>> CommitDate: 2024-06-21 02:41:08 +0000 > >>> > >>> cdefs.h: Remove support for pre gcc 4.0 > >>> > >>> All supported compilers support the gcc 3 attribute extensions. > >> Remove > >>> the #else clauses for this. Also, latter-day pcc compilers also > >> define > >>> __GNUC__, so there's not need to also test for __PCC__. > >>> > >>> Reviewed by: brooks > >>> Differential Revision: https://reviews.freebsd.org/D45654 > >>> Sponsored by: Netflix > >>> --- > >>> sys/sys/cdefs.h | 42 ++++-------------------------------------- > >>> 1 file changed, 4 insertions(+), 38 deletions(-) > >>> > >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > >>> index 88019819eb35..a6ecdca5d8b9 100644 > >>> --- a/sys/sys/cdefs.h > >>> +++ b/sys/sys/cdefs.h > >>> @@ -408,15 +389,10 @@ > >>> * assign pointer x to a local variable, to check that its type is > >>> * compatible with member m. > >>> */ > >>> -#if __GNUC_PREREQ__(3, 1) > >>> #define __containerof(x, s, m) ({ > >> \ > >>> const volatile __typeof(((s *)0)->m) *__x =3D (x); > \ > >>> __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, > m));\ > >>> }) > >>> -#else > >>> -#define __containerof(x, s, m) > >> \ > >>> - __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) > >>> -#endif > >>> > >>> /* > >>> * Compiler-dependent macros to declare that functions take > printf-like > >>> @@ -434,14 +410,8 @@ > >>> #define __strftimelike(fmtarg, firstvararg) \ > >>> __attribute__((__format__ (__strftime__, fmtarg, > firstvararg))) > >>> > >>> -/* Compiler-dependent macros that rely on FreeBSD-specific extension= s. > >> */ > >>> -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >=3D 30000= 1 > && \ > >>> - defined(__GNUC__) > >>> #define __printf0like(fmtarg, firstvararg) \ > >>> __attribute__((__format__ (__printf0__, fmtarg, > firstvararg))) > >>> -#else > >>> -#define __printf0like(fmtarg, firstvararg) > >>> -#endif > >> > >> Does this still work with external GCC? I didn't think printf0 was > >> supported > >> by external GCC (or maybe I had to readd it in the port and that's wha= t > I > >> remember). Ah, yes, printf0 is a local patch in the devel/freebsd-gcc= X > >> ports, but is not available in stock GCC (e.g. lang/gcc does not suppo= rt > >> it). > >> > > > > Ah. That would explain why it just worked for me. That's what I tested > > with. Clang also seemed happy with it. But that was the in tree clang. = Is > > there a similar issue? Gnuc is defined for both. > > So we don't support building the base system with lang/gcc, only > devel/freebsd-gccX (which has a local patch to add printf0 support). > The only question might be, do we support using __printf0like for things > that aren't in the base system that could be built with lang/gcc. If so, > we might need to guard this somehow. I'm not sure though that we care > about random software not in base using a FreeBSD-specific keyword from > . > Yes. The question is "do we use __printf0like in our headers" since we definitely can't build FreeBSD itself w/o at least some of the extensions for other things... and the answer is "yes". err.h uses it, for example, as does setproctitle in stdlib.h The interesting thing for me is that gcc13 will produce no warnings if I include errr.h because -Wsystem-header is off. With it on, warnings crop up too. This is why my testing didn't see it... It looks like clang has it as a builtin for all versions we care about, so I'll create a phab to add some of this back. Maybe we should upstream what we have, for this and freebsd_printf since that's also in clang and one of the small number of patches we have for the lang/gcc* family? Warner --0000000000007d9a9f061c463ae8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey John,

On Tue, Jul 2, 2024 at 9:44= =E2=80=AFAM John Baldwin <jhb@freebsd= .org> wrote:
On 7/1/24 4:09 PM, Warner Losh wrote:
> On Mon, Jul 1, 2024, 3:53=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrote:
>
>> On 6/20/24 7:41 PM, Warner Losh wrote:
>>> The branch main has been updated by imp:
>>>
>>> URL:
>> https://c= git.FreeBSD.org/src/commit/?id=3D67d1a1cd9e772e2ef94003579f4fbc271d38be7d
>>>
>>> commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d
>>> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>=
>>> AuthorDate: 2024-06-20 23:02:56 +0000
>>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>=
>>> CommitDate: 2024-06-21 02:41:08 +0000
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0cdefs.h: Remove support for pre gcc = 4.0
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0All supported compilers support the = gcc 3 attribute extensions.
>> Remove
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0the #else clauses for this. Also, la= tter-day pcc compilers also
>> define
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0__GNUC__, so there's not need to= also test for __PCC__.
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 brooks
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0
https://reviews.freebsd.org/D45654
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0Netflix
>>> ---
>>>=C2=A0 =C2=A0 sys/sys/cdefs.h | 42 ++++------------------------= --------------
>>>=C2=A0 =C2=A0 1 file changed, 4 insertions(+), 38 deletions(-)<= br> >>>
>>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
>>> index 88019819eb35..a6ecdca5d8b9 100644
>>> --- a/sys/sys/cdefs.h
>>> +++ b/sys/sys/cdefs.h
>>> @@ -408,15 +389,10 @@
>>>=C2=A0 =C2=A0 =C2=A0* assign pointer x to a local variable, to = check that its type is
>>>=C2=A0 =C2=A0 =C2=A0* compatible with member m.
>>>=C2=A0 =C2=A0 =C2=A0*/
>>> -#if __GNUC_PREREQ__(3, 1)
>>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0 =C2=A0__containerof(x, s, m)= ({
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0\
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 const volatile __typeof(((s *)0)-&g= t;m) *__x =3D (x);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \=
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 __DEQUALIFY(s *, (const volatile ch= ar *)__x - __offsetof(s, m));\
>>>=C2=A0 =C2=A0 })
>>> -#else
>>> -#define=C2=A0 =C2=A0 =C2=A0 __containerof(x, s, m)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 \
>>> -=C2=A0 =C2=A0 =C2=A0__DEQUALIFY(s *, (const volatile char *)(= x) - __offsetof(s, m))
>>> -#endif
>>>
>>>=C2=A0 =C2=A0 /*
>>>=C2=A0 =C2=A0 =C2=A0* Compiler-dependent macros to declare that= functions take printf-like
>>> @@ -434,14 +410,8 @@
>>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0 =C2=A0__strftimelike(fmtarg,= firstvararg) \
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __attribute__((__form= at__ (__strftime__, fmtarg, firstvararg)))
>>>
>>> -/* Compiler-dependent macros that rely on FreeBSD-specific ex= tensions.
>> */
>>> -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_ver= sion >=3D 300001 && \
>>> -=C2=A0 =C2=A0 defined(__GNUC__)
>>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0 =C2=A0__printf0like(fmtarg, = firstvararg) \
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __attribute__((__form= at__ (__printf0__, fmtarg, firstvararg)))
>>> -#else
>>> -#define=C2=A0 =C2=A0 =C2=A0 __printf0like(fmtarg, firstvararg= )
>>> -#endif
>>
>> Does this still work with external GCC?=C2=A0 I didn't think p= rintf0 was
>> supported
>> by external GCC (or maybe I had to readd it in the port and that&#= 39;s what I
>> remember).=C2=A0 Ah, yes, printf0 is a local patch in the devel/fr= eebsd-gccX
>> ports, but is not available in stock GCC (e.g. lang/gcc does not s= upport
>> it).
>>
>
> Ah. That would explain why it just worked for me. That's what I te= sted
> with. Clang also seemed happy with it. But that was the in tree clang.= Is
> there a similar issue? Gnuc is defined for both.

So we don't support building the base system with lang/gcc, only
devel/freebsd-gccX (which has a local patch to add printf0 support).
The only question might be, do we support using __printf0like for things that aren't in the base system that could be built with lang/gcc.=C2=A0= If so,
we might need to guard this somehow.=C2=A0 I'm not sure though that we = care
about random software not in base using a FreeBSD-specific keyword from
<sys/cdefs.h>.

Yes. The question = is "do we use __printf0like=C2=A0 in our headers" since we defini= tely
can't build FreeBSD itself w/o at least some of the exte= nsions for other things...
and the answer is "yes". err= .h uses it, for example, as does setproctitle in stdlib.h

The interesting thing for me is that gcc13 will produce no warnings= if I include errr.h=C2=A0
because -Wsystem-header=C2=A0is off. W= ith it on, warnings crop up too. This is why my testing
didn'= t see it...

It looks like clang has it as a builti= n for all versions we care about, so I'll create a phab to add some
of this back. Maybe we should upstream what we have, for this and fr= eebsd_printf since that's also
in clang and one of the small = number of patches we have for the lang/gcc* family?

Warner
--0000000000007d9a9f061c463ae8-- From nobody Tue Jul 2 17:29:01 2024 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 4WD8z14WFGz5NqsS; Tue, 02 Jul 2024 17:29:01 +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 4WD8z141qgz4PGr; Tue, 2 Jul 2024 17:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719941341; 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=ecUZ3exaVlGTPzNKiHIqCSEuZjw6z3ahexNcp/IOtFs=; b=xKQRN2THgEAC7n9OhNnJKmlcLMvK5DlOlsH8LblVccckMUrt7PiMRyvjZkkhJITnuMyOsg U4VRnnL5PYLJhS1AzTjgBTdfN71lEa4BeqGyNWmMy07Za8j7CGiuM6ZfEyik5gJfsQkx5D h/lSBZU3a8Zgoqg7uA+YlLMtphfNt8oSRkqVFGPeqc8Nav78AfjEm4Zko2+Zm4tbu/4kAn ATZC5G5V4ZH3HwBRRvjPRRcE8HL9fYOoeLfI08O3tYtpmDo+Fn0j2b8zCI5AR63wYbUqsG f0/vjV8NsAmDBQA1mwf/hAdu1ghSZNrVrox2W1JpB+sNtrmWNtAS0Q0tZRoOaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719941341; a=rsa-sha256; cv=none; b=GYxdUWbObzEbYW2gpV/SIqDx8FYpz3XppqVkBpCzW1ZbP//INzfhJW8PS7aCEw5MMyr3JR VsL753ASK7vqy26yCV3dt15RkfaaRABwMHZwpazvam0Ql+4WES67g8HDmSmY809AvWSaON UfQjqQWb5IxbPwN3p3Lt8GCjwg46pTyu0tS9MRagda6/hFuU7z/HPFmXwGA0KijIIBaXqb 1G+QNMQtaYs1BkSnt1fXgZsUCVqPYFZyeDUeMAKhHUfrLyp++eqNUpVeCqdFV031cZ6roB 83mW886jNZIUyTGJ/ODGQpWMwzbYmuit9kxTfRIVmy3by1C/HgWJsrTJibw27Q== 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=1719941341; 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=ecUZ3exaVlGTPzNKiHIqCSEuZjw6z3ahexNcp/IOtFs=; b=ZYpAbbduN44jJZyfyaTNXy2tlDai3w04dO2yOREZOnXxCHTTM71+asKiIDO8sn8mqU3ZWn EGHPx0xp7Q0hP2H2Mhjh4jhmfuEaw9ok28UTDkjTr02NnqqxbjzIeyL5jQuSJTy1LQqnp3 rEMOXqRDUsAwYaOTHFdMiTcsB5ovHwWpRjvMJnYT5Y7zOfCKa7sjHHrUEJDoRPcEd0u6S/ G0wOxP8qDId3sgYhbTl0ZVV7uGrNhKBQwL5r88luGu+z7EN2dsmm3lI/+rHgxf5UBsd/1f YeALhXgjpz+NaMtdPRdgtKuVoBKN8FmBDN06vgNpYr0Z0kgumkxp0jY8WPmN1A== 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 4WD8z13dKQzxC5; Tue, 2 Jul 2024 17:29:01 +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 462HT153029178; Tue, 2 Jul 2024 17:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462HT1VD029175; Tue, 2 Jul 2024 17:29:01 GMT (envelope-from git) Date: Tue, 2 Jul 2024 17:29:01 GMT Message-Id: <202407021729.462HT1VD029175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 172328c477b1 - main - timerfd.2: Add documentation for CLOCK_UPTIME and CLOCK_BOOTTIME 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 172328c477b13458c5faa4cf81ad8669f6852aee Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=172328c477b13458c5faa4cf81ad8669f6852aee commit 172328c477b13458c5faa4cf81ad8669f6852aee Author: Cormac Stephenson AuthorDate: 2024-06-28 16:45:44 +0000 Commit: Warner Losh CommitDate: 2024-07-02 16:40:04 +0000 timerfd.2: Add documentation for CLOCK_UPTIME and CLOCK_BOOTTIME Add CLOCK_UPTIME and CLOCK_BOOTTIME options and a quick pointer to clock_gettime(2) for a better definition of these values. Reviewed-by: imp (small tweaks and added Xr) Pull-Request: https://github.com/freebsd/freebsd-src/pull/1302 --- lib/libsys/timerfd.2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/libsys/timerfd.2 b/lib/libsys/timerfd.2 index 7a112ad0dfcb..ae6cc6f6f49a 100644 --- a/lib/libsys/timerfd.2 +++ b/lib/libsys/timerfd.2 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 21, 2023 +.Dd June 28, 2024 .Dt TIMERFD 2 .Os .Sh NAME @@ -95,9 +95,16 @@ argument specifies the clock used as a timing base and may be: .Bl -tag -width "Dv CLOCK_MONOTONIC" -compact .It Dv CLOCK_REALTIME Increments as a wall clock should. +.It Dv CLOCK_BOOTTIME .It Dv CLOCK_MONOTONIC Increments monotonically in SI seconds. +.It Dv CLOCK_UPTIME +Increments monotonically in SI seconds, but is paused while the system is +suspended. .El +See +.Xr clock_gettime 2 +for more precise definitions. .Pp The .Fa flags From nobody Tue Jul 2 17:29:02 2024 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 4WD8z25SnFz5Nqnb; Tue, 02 Jul 2024 17:29:02 +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 4WD8z24yCjz4PX7; Tue, 2 Jul 2024 17:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719941342; 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=unNK9YirE7awLWpTW8pPwEapjOtdJMryeRj2oXg9XTg=; b=k1vQPZ2y6an26SqMpNCAynn4pZjCf6C/MSeEnHEW0yVw3bGxCoJQVW5okU1ZUKrPXYiaJY SimAgaUIvtsYydXFnnhyO0M1EEKFUJ4yFJnjDqna8dWi4tQtMn8wVUOWXCQg26UTZ1d9sc Ztq/RJIAQJtznrM2VpugBWwbqXf0MNxmCy/+V6+1yMxQlGuATos1H95gL7IqhbqQhxaulG Voh9A2gKTC1xQ8lhkvP9Ux414xHAoUnyUSBf0MD7AYwX8Urp6spMncF9uZ0F7/1kwO6qlj upOafMa9J+l9JnUy9Jj0hMvf2toz7XU/spY7v3h5uxu66iOmWSCadU1Q83UW6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719941342; a=rsa-sha256; cv=none; b=Cp98mTwKzqqJpyHRNYGf9CkvkvOpESGL95D1loqj4iuGgqq1XiaDKbJx1Y0c54vEeEpv7Y MQrCMqW8ulSyHqF4rXuKxXqkD8QAsmGec4xv9JW58CKcjAEaYyRgnM8wavEH2wfAXUitOx 3fqKGBd55U8MW7cXynkO5vy+Tt1XTXThw+R16AlB7EHrQPrpLqUYFQeL3gDv1ipz4KZDzS EOkwc/1xFotViLAbi8qIcFf2JYW1U8B7SdIdQ6fgUruEC0uc3VsUHWQN76aIxCq205AMH3 pjWhi6Vyn/z+OrXnC1T6GFZyV9noqpwuk/XohLiIV2MJJ8HTjrUssDVTMHo/fg== 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=1719941342; 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=unNK9YirE7awLWpTW8pPwEapjOtdJMryeRj2oXg9XTg=; b=yGuK6iZwz7b+J4NbY0hgIKzEwq+M7xyJD7nIdLScGuW031a9Dr/pAbzn3JUxLiUmXJl1Li SO5+ETvTcTIhgPZPO7Sv0RRKZW0VAqvvZcKsPJlsCtQ5lt9ta9TZLfFnL3OF2LDcKCvOlV MTSnl8hgo6W1QN8IV87Pgk3Z5QPF2AZAsbcC3sf7Q9D8yi27HSNlJXoQEEkUvIRO3lnn7a fOENo2x0MPWNthFQ4PiWaiB2Vvc8CCbw1nz2o9CKn8on7QiN4sYKrNVyJRngNzK9XBj9k6 LoYqeg6LDedbPszIDv4iBeNBxKJr/yMF5mIN3KbxuI0DwhwFirqdCohVlzV9kg== 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 4WD8z24ZDDzwtV; Tue, 2 Jul 2024 17:29:02 +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 462HT258029226; Tue, 2 Jul 2024 17:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462HT2Q4029223; Tue, 2 Jul 2024 17:29:02 GMT (envelope-from git) Date: Tue, 2 Jul 2024 17:29:02 GMT Message-Id: <202407021729.462HT2Q4029223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: de1e91339b17 - main - clock_gettime: Catch up with the CLOCK_BOOTTIME changes 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de1e91339b17171e020029e1d49f361aa66c5146 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=de1e91339b17171e020029e1d49f361aa66c5146 commit de1e91339b17171e020029e1d49f361aa66c5146 Author: Warner Losh AuthorDate: 2024-06-28 16:55:23 +0000 Commit: Warner Losh CommitDate: 2024-07-02 17:27:35 +0000 clock_gettime: Catch up with the CLOCK_BOOTTIME changes When CLOCK_BOOTTIME was made an alias for CLOCK_MONOTONIC, the man page wasn't updated. Update to include the changed semantics (it was to be better compatible with Linux). Clarify the details of these clocks. Provide a reference to the UTC standard, and a clarifying remark about leap second encoding (fun fact: POSIX provides no unique value for these, nor definitive values to use). Sponsored by: Netflix --- lib/libsys/clock_gettime.2 | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/lib/libsys/clock_gettime.2 b/lib/libsys/clock_gettime.2 index 82f6615e8b93..fcdc5be498f2 100644 --- a/lib/libsys/clock_gettime.2 +++ b/lib/libsys/clock_gettime.2 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 27, 2023 +.Dd June 28, 2024 .Dt CLOCK_GETTIME 2 .Os .Sh NAME @@ -67,18 +67,26 @@ as well as the following values: .It Dv CLOCK_REALTIME_PRECISE .It Dv CLOCK_REALTIME_FAST .It Dv CLOCK_REALTIME_COARSE -Increments as a wall clock should. +Increments in SI seconds like a wall clock. +It uses a 1970 epoch and implements the UTC timescale. +The count of physical SI seconds since 1970, adjusted by subtracting the number +of positive leap seconds and adding the number of negative leap seconds. +Behavior during a leap second is not defined by and POSIX standard. .It Dv CLOCK_MONOTONIC .It Dv CLOCK_MONOTONIC_PRECISE .It Dv CLOCK_MONOTONIC_FAST .It Dv CLOCK_MONOTONIC_COARSE -Increments in SI seconds. +.It Dv CLOCK_BOOTTIME +Increments in SI seconds, even while the system is suspended. +Its epoch is unspecified. +The count is not adjusted by leap seconds. +.Fx implements .It Dv CLOCK_UPTIME .It Dv CLOCK_UPTIME_PRECISE .It Dv CLOCK_UPTIME_FAST -.It Dv CLOCK_BOOTTIME -Starts at zero when the kernel boots and increments -monotonically in SI seconds while the machine is running. +Increments monotonically in SI seconds while the machine is running. +The count is not adjusted by leap seconds. +The epoch is unspecified. .It Dv CLOCK_VIRTUAL Increments only when the CPU is running in user mode on behalf of the calling process. @@ -94,6 +102,7 @@ Returns the execution time of the calling thread. .El .Pp The clock IDs +.Dv CLOCK_BOOTTIME , .Dv CLOCK_REALTIME , .Dv CLOCK_MONOTONIC , and @@ -122,7 +131,7 @@ systems. Finally, .Dv CLOCK_BOOTTIME is an alias for -.Dv CLOCK_UPTIME +.Dv CLOCK_MONOTONIC for compatibility with other systems and is unrelated to the .Fa kern.boottime .Xr sysctl 8 . @@ -186,19 +195,28 @@ The and .Fn clock_getres system calls conform to -.St -p1003.1b-93 . +.St -p1003.1-2008 . The clock IDs -.Dv CLOCK_REALTIME_FAST , -.Dv CLOCK_REALTIME_PRECISE , +.Dv CLOCK_BOOTTIME , .Dv CLOCK_MONOTONIC_FAST , .Dv CLOCK_MONOTONIC_PRECISE , +.Dv CLOCK_REALTIME_FAST , +.Dv CLOCK_REALTIME_PRECISE , +.Dv CLOCK_SECOND .Dv CLOCK_UPTIME , .Dv CLOCK_UPTIME_FAST , -.Dv CLOCK_UPTIME_PRECISE , -.Dv CLOCK_SECOND +and +.Dv CLOCK_UPTIME_PRECISE are .Fx extensions to the POSIX interface. +.Pp +UTC is defined by ITU-R TF.460-6, Standard-frequency and time-signal emissions. +However, the +.Vt time_t +type is a simple count that does not provide a unique encoding for leap seconds, +nor a specification for what values should be used to encode a leap second. +.Pp .Sh HISTORY The .Fn clock_gettime , From nobody Tue Jul 2 17:58:16 2024 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 4WD9d14sJ3z5NvdC for ; Tue, 02 Jul 2024 17:58:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD9d041Zkz4SXJ for ; Tue, 2 Jul 2024 17:58:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=gYqubMqi; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::434) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-706a1711ee5so2710008b3a.0 for ; Tue, 02 Jul 2024 10:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1719943107; x=1720547907; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kg8+wh+GyM079h6A9LD6SNRYl5PVcgITK3wsoj4NS3U=; b=gYqubMqivcuoZrrVhW1elshoTW0jM41BAc7HFGiBUQ+jmqphKzcnnfTiozZekIclJ+ Ig1V71DMvOQF1zJjsepZjWkRZa3V2flrr+QUHBvGSXMUQ0qaE9nz5NAYc1ANC1/1IQiv 12YPfVLPrSrEXKFeGUYHU5S6NkPxcTmhLBc4oq+KvqLKhc1ggcNCKsQI8wJ18HLl1/HI m9yosxEuoG13vf5m0CRac75EjNPp6rMwnAkNBtMmBxhgnoK6RYsXKwQ3xxBRILXL2Ej9 FmxKdUTViTU/0yf3yR53136HzyyI+7+6AEJgtL3gRAYJs9wdgaXXTL13ei8dw96pT6pP hUig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719943107; x=1720547907; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kg8+wh+GyM079h6A9LD6SNRYl5PVcgITK3wsoj4NS3U=; b=eubGJ1CaF6va63g/ZfIN41XCH73aIlELD9FWEgTuxmxBPZnS4FRt1vZa5JwtMbXdeJ g7bgSl6939zPoD0awxSxaeVrmzZxsPspIqcloShwvSbFoWoane3xyEEA+m8gVsXjNUsQ qEV5+TvW6qvgV2l+gDmguht3lKKzHk4RKh9ue6wyik7W/vQ2xOBgNJu902iquc6kMj77 fWVfdGD0PAQfw7YiZuoX6mFeuZ6A5bxG79HoOT3wCTq8VtfKqqVk0cU6chEl2O9umLTK MW70aP6AHY+VK4iHkVH28IehHc7LUIxNPaDhff7Xl/8IKDW+J9JKYGMmbY9qxe1xlJvZ ZnoA== X-Forwarded-Encrypted: i=1; AJvYcCWttIPUuZ262WwUl/0BlVNzMatrvDYB77XxdKUqtedwahG6zetmDRV/few3FxkvkrJSe8jzrEPIhbK/KLjNAmNZAQrnQLPuW/IZ0bBZQ8EX X-Gm-Message-State: AOJu0YzqwOigfLjo7Jc/J2qhwI0kUqorRg5Aoh3M6VDdpUIvyP8Ulo5d 62Kz0cpv9/vAmoqe8yr8kx8FwDwsFRVUaWv/1acTLJlT8kZprB/6DZilfxcRFjUQgAXL+qcnW4w E6Y1TbEOt9FM1bUQRFNE99460e8yy/4vZuzNr/Q== X-Google-Smtp-Source: AGHT+IEgjbtLqnmEHP6ytABTJYal8Rubu+jruhJIRssyR4M0YDVpfK37pQiVeMMppRizhOstvmm3JtGVA/O9VNcj7aU= X-Received: by 2002:a05:6a20:2d11:b0:1be:d032:efff with SMTP id adf61e73a8af0-1bef62283cbmr9574139637.57.1719943107191; Tue, 02 Jul 2024 10:58:27 -0700 (PDT) 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Tue, 2 Jul 2024 11:58:16 -0600 Message-ID: Subject: Re: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 To: John Baldwin Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000f04164061c477510" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::434:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4WD9d041Zkz4SXJ --000000000000f04164061c477510 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 2, 2024 at 10:30=E2=80=AFAM Warner Losh wrote: > Hey John, > > On Tue, Jul 2, 2024 at 9:44=E2=80=AFAM John Baldwin wro= te: > >> On 7/1/24 4:09 PM, Warner Losh wrote: >> > On Mon, Jul 1, 2024, 3:53=E2=80=AFPM John Baldwin wr= ote: >> > >> >> On 6/20/24 7:41 PM, Warner Losh wrote: >> >>> The branch main has been updated by imp: >> >>> >> >>> URL: >> >> >> https://cgit.FreeBSD.org/src/commit/?id=3D67d1a1cd9e772e2ef94003579f4fbc= 271d38be7d >> >>> >> >>> commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d >> >>> Author: Warner Losh >> >>> AuthorDate: 2024-06-20 23:02:56 +0000 >> >>> Commit: Warner Losh >> >>> CommitDate: 2024-06-21 02:41:08 +0000 >> >>> >> >>> cdefs.h: Remove support for pre gcc 4.0 >> >>> >> >>> All supported compilers support the gcc 3 attribute extensions= . >> >> Remove >> >>> the #else clauses for this. Also, latter-day pcc compilers als= o >> >> define >> >>> __GNUC__, so there's not need to also test for __PCC__. >> >>> >> >>> Reviewed by: brooks >> >>> Differential Revision: https://reviews.freebsd.org/D45654 >> >>> Sponsored by: Netflix >> >>> --- >> >>> sys/sys/cdefs.h | 42 ++++-------------------------------------- >> >>> 1 file changed, 4 insertions(+), 38 deletions(-) >> >>> >> >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >> >>> index 88019819eb35..a6ecdca5d8b9 100644 >> >>> --- a/sys/sys/cdefs.h >> >>> +++ b/sys/sys/cdefs.h >> >>> @@ -408,15 +389,10 @@ >> >>> * assign pointer x to a local variable, to check that its type i= s >> >>> * compatible with member m. >> >>> */ >> >>> -#if __GNUC_PREREQ__(3, 1) >> >>> #define __containerof(x, s, m) ({ >> >> \ >> >>> const volatile __typeof(((s *)0)->m) *__x =3D (x); >> \ >> >>> __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, >> m));\ >> >>> }) >> >>> -#else >> >>> -#define __containerof(x, s, m) >> >> \ >> >>> - __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)= ) >> >>> -#endif >> >>> >> >>> /* >> >>> * Compiler-dependent macros to declare that functions take >> printf-like >> >>> @@ -434,14 +410,8 @@ >> >>> #define __strftimelike(fmtarg, firstvararg) \ >> >>> __attribute__((__format__ (__strftime__, fmtarg, >> firstvararg))) >> >>> >> >>> -/* Compiler-dependent macros that rely on FreeBSD-specific >> extensions. >> >> */ >> >>> -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >=3D 3000= 01 >> && \ >> >>> - defined(__GNUC__) >> >>> #define __printf0like(fmtarg, firstvararg) \ >> >>> __attribute__((__format__ (__printf0__, fmtarg, >> firstvararg))) >> >>> -#else >> >>> -#define __printf0like(fmtarg, firstvararg) >> >>> -#endif >> >> >> >> Does this still work with external GCC? I didn't think printf0 was >> >> supported >> >> by external GCC (or maybe I had to readd it in the port and that's >> what I >> >> remember). Ah, yes, printf0 is a local patch in the devel/freebsd-gc= cX >> >> ports, but is not available in stock GCC (e.g. lang/gcc does not >> support >> >> it). >> >> >> > >> > Ah. That would explain why it just worked for me. That's what I tested >> > with. Clang also seemed happy with it. But that was the in tree clang. >> Is >> > there a similar issue? Gnuc is defined for both. >> >> So we don't support building the base system with lang/gcc, only >> devel/freebsd-gccX (which has a local patch to add printf0 support). >> The only question might be, do we support using __printf0like for things >> that aren't in the base system that could be built with lang/gcc. If so= , >> we might need to guard this somehow. I'm not sure though that we care >> about random software not in base using a FreeBSD-specific keyword from >> . >> > > Yes. The question is "do we use __printf0like in our headers" since we > definitely > can't build FreeBSD itself w/o at least some of the extensions for other > things... > and the answer is "yes". err.h uses it, for example, as does setproctitle > in stdlib.h > > The interesting thing for me is that gcc13 will produce no warnings if I > include errr.h > because -Wsystem-header is off. With it on, warnings crop up too. This is > why my testing > didn't see it... > > It looks like clang has it as a builtin for all versions we care about, s= o > I'll create a phab to add some > of this back. Maybe we should upstream what we have, for this and > freebsd_printf since that's also > in clang and one of the small number of patches we have for the lang/gcc* > family? > https://reviews.freebsd.org/D45836 Warner --000000000000f04164061c477510 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Jul 2, 2024 at 10:30=E2=80=AF= AM Warner Losh <imp@bsdimp.com>= wrote:
Hey John,

On Tue, Jul 2, 2024 at 9:44=E2=80=AF= AM John Baldwin <jh= b@freebsd.org> wrote:
On 7/1/24 4:09 PM, Warner Losh wrote:
> On Mon, Jul 1, 2024, 3:53=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrote:
>
>> On 6/20/24 7:41 PM, Warner Losh wrote:
>>> The branch main has been updated by imp:
>>>
>>> URL:
>> https://c= git.FreeBSD.org/src/commit/?id=3D67d1a1cd9e772e2ef94003579f4fbc271d38be7d
>>>
>>> commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d
>>> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>=
>>> AuthorDate: 2024-06-20 23:02:56 +0000
>>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>=
>>> CommitDate: 2024-06-21 02:41:08 +0000
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0cdefs.h: Remove support for pre gcc = 4.0
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0All supported compilers support the = gcc 3 attribute extensions.
>> Remove
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0the #else clauses for this. Also, la= tter-day pcc compilers also
>> define
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0__GNUC__, so there's not need to= also test for __PCC__.
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 brooks
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0
https://reviews.freebsd.org/D45654
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0Netflix
>>> ---
>>>=C2=A0 =C2=A0 sys/sys/cdefs.h | 42 ++++------------------------= --------------
>>>=C2=A0 =C2=A0 1 file changed, 4 insertions(+), 38 deletions(-)<= br> >>>
>>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
>>> index 88019819eb35..a6ecdca5d8b9 100644
>>> --- a/sys/sys/cdefs.h
>>> +++ b/sys/sys/cdefs.h
>>> @@ -408,15 +389,10 @@
>>>=C2=A0 =C2=A0 =C2=A0* assign pointer x to a local variable, to = check that its type is
>>>=C2=A0 =C2=A0 =C2=A0* compatible with member m.
>>>=C2=A0 =C2=A0 =C2=A0*/
>>> -#if __GNUC_PREREQ__(3, 1)
>>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0 =C2=A0__containerof(x, s, m)= ({
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0\
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 const volatile __typeof(((s *)0)-&g= t;m) *__x =3D (x);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \=
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 __DEQUALIFY(s *, (const volatile ch= ar *)__x - __offsetof(s, m));\
>>>=C2=A0 =C2=A0 })
>>> -#else
>>> -#define=C2=A0 =C2=A0 =C2=A0 __containerof(x, s, m)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 \
>>> -=C2=A0 =C2=A0 =C2=A0__DEQUALIFY(s *, (const volatile char *)(= x) - __offsetof(s, m))
>>> -#endif
>>>
>>>=C2=A0 =C2=A0 /*
>>>=C2=A0 =C2=A0 =C2=A0* Compiler-dependent macros to declare that= functions take printf-like
>>> @@ -434,14 +410,8 @@
>>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0 =C2=A0__strftimelike(fmtarg,= firstvararg) \
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __attribute__((__form= at__ (__strftime__, fmtarg, firstvararg)))
>>>
>>> -/* Compiler-dependent macros that rely on FreeBSD-specific ex= tensions.
>> */
>>> -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_ver= sion >=3D 300001 && \
>>> -=C2=A0 =C2=A0 defined(__GNUC__)
>>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0 =C2=A0__printf0like(fmtarg, = firstvararg) \
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __attribute__((__form= at__ (__printf0__, fmtarg, firstvararg)))
>>> -#else
>>> -#define=C2=A0 =C2=A0 =C2=A0 __printf0like(fmtarg, firstvararg= )
>>> -#endif
>>
>> Does this still work with external GCC?=C2=A0 I didn't think p= rintf0 was
>> supported
>> by external GCC (or maybe I had to readd it in the port and that&#= 39;s what I
>> remember).=C2=A0 Ah, yes, printf0 is a local patch in the devel/fr= eebsd-gccX
>> ports, but is not available in stock GCC (e.g. lang/gcc does not s= upport
>> it).
>>
>
> Ah. That would explain why it just worked for me. That's what I te= sted
> with. Clang also seemed happy with it. But that was the in tree clang.= Is
> there a similar issue? Gnuc is defined for both.

So we don't support building the base system with lang/gcc, only
devel/freebsd-gccX (which has a local patch to add printf0 support).
The only question might be, do we support using __printf0like for things that aren't in the base system that could be built with lang/gcc.=C2=A0= If so,
we might need to guard this somehow.=C2=A0 I'm not sure though that we = care
about random software not in base using a FreeBSD-specific keyword from
<sys/cdefs.h>.

Yes. The question = is "do we use __printf0like=C2=A0 in our headers" since we defini= tely
can't build FreeBSD itself w/o at least some of the exte= nsions for other things...
and the answer is "yes". err= .h uses it, for example, as does setproctitle in stdlib.h

The interesting thing for me is that gcc13 will produce no warnings= if I include errr.h=C2=A0
because -Wsystem-header=C2=A0is off. W= ith it on, warnings crop up too. This is why my testing
didn'= t see it...

It looks like clang has it as a builti= n for all versions we care about, so I'll create a phab to add some
of this back. Maybe we should upstream what we have, for this and fr= eebsd_printf since that's also
in clang and one of the small = number of patches we have for the lang/gcc* family?


Warner=
--000000000000f04164061c477510-- From nobody Tue Jul 2 18:05:52 2024 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 4WD9nm521Wz5Nw80 for ; Tue, 02 Jul 2024 18:06:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD9nm39XFz4Sry for ; Tue, 2 Jul 2024 18:06:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-706524adf91so3692214b3a.2 for ; Tue, 02 Jul 2024 11:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1719943563; x=1720548363; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oajtjtEmHNvTiPKZcEZaIQbENcUHZxrI8pUFeei2CUM=; b=KvmPDXJBshozxs4A+HuIXjyU2MD7mn43DIHDk3Bd7eoxHeKRrzqlf4TB50xMQ/NAH6 me7A8rtVO1P3NurGoGhjFRbHyP/nd3ZprIOW0XuaDrldu1vxni0IVXOF46/eB9/ZAfV/ hlSk7W9rJKtG/MfKRNiMmslTyq+WDSU1lSxAlTQDSQwXi0R18BjR49HBvvqAFEIpM8/p tGcPcjySwNxaU0wEbyK6CJ7PdMFv3Fl3giTRl2WlnNhTex6HB54X2Pjsjv+zQCOdUkLB SiPg85S+UlQ5WfnPEbynRBal1Pnsyq1ENV+Ewiv9HRpdr65hA2d8M7so4j4kalW9YShc 6WKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719943563; x=1720548363; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oajtjtEmHNvTiPKZcEZaIQbENcUHZxrI8pUFeei2CUM=; b=AGLQzEtj94Z938l6NjUqrZ2NSEWyhdgcvliPGu0XTvNbl5B7JNMpUSJKJEbPczhXM5 A/zuo3pq7CjOSUJ+T3lXchskLxXkiiIwKXig6srBB9HX4tF2TaEEOiNOWUzvzr8AgP9N VJz6m7UBcalseDy1D6Nkn14Ry9LU+GH0LcipW8PS86YvhUbOLBOvATxtiaPPRavEtkZD Hbx2zsiXGUZQSWHgqY6dPoYb6c4SW621/1Iq/ZbdC+wTTKBQScl01ZcywQKipPPjap2V RCDL0nMQoIlZxcWYbZzfpNRIzuYgeNVxU7jercx0S1+rR553NfkQLdLKX+WV+cCC3b5k 070w== X-Forwarded-Encrypted: i=1; AJvYcCVnn889D1qjBGaTnHGdv8IpVU+ujZAkrdZG1nNMtq/nGj+YmEYPUk+3fmoODfH5NCBSjScqjhusYwM2Ksfs3S8L/UVoUbx0g/spFJxlZFIu X-Gm-Message-State: AOJu0Ywq2aM4Cix9b0hExg/MhoF9DldiCLmrBiXurFEcqfXNx0aQOxB6 YksBL6q7NlDaq1Vb5+BSKkbX+C5ywL7inX11g22/S9gepH1KtHx9KOqwJ53eqjDClD7tfzHUAma 1rOZVwAzg3gGcoNF0YaAsHiBsj+Wxf41d2Vg8fg== X-Google-Smtp-Source: AGHT+IEE17sFRi9TzTYwMrNcw1TxaWG3zLh0axevm8fd2AUKFugSVjzs9lCwhpMxxeIi0rMCspVDJ3CoOXxLcVKPVyA= X-Received: by 2002:a05:6a20:1584:b0:1bd:fe8:fc9a with SMTP id adf61e73a8af0-1bef60fc0demr12775061637.17.1719943563077; Tue, 02 Jul 2024 11:06:03 -0700 (PDT) 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406210241.45L2fNU2056962@gitrepo.freebsd.org> <7ca0ab94-4d5e-405e-b178-84ef3d8ebc8d@FreeBSD.org> In-Reply-To: <7ca0ab94-4d5e-405e-b178-84ef3d8ebc8d@FreeBSD.org> From: Warner Losh Date: Tue, 2 Jul 2024 12:05:52 -0600 Message-ID: Subject: Re: git: 2508372b7b46 - main - cdefs.h: Assume the compiler supports at least GNU C 3.0 extensions To: John Baldwin Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000001c839a061c479154" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WD9nm39XFz4Sry --0000000000001c839a061c479154 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey John, On Mon, Jul 1, 2024 at 3:49=E2=80=AFPM John Baldwin wrote= : > On 6/20/24 7:41 PM, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D2508372b7b46117a9fb801b50624265= d30888442 > > > > commit 2508372b7b46117a9fb801b50624265d30888442 > ... > > -/* > > - * GNU C version 2.96 adds explicit branch prediction so that > > - * the CPU back-end can hint the processor and also so that > > - * code blocks can be reordered such that the predicted path > > - * sees a more linear flow, thus improving cache behavior, etc. > > - * > > - * The following two macros provide us with a way to utilize this > > - * compiler feature. Use __predict_true() if you expect the expressio= n > > - * to evaluate to true, and __predict_false() if you expect the > > - * expression to evaluate to false. > > - * > > - * A few notes about usage: > > - * > > - * * Generally, __predict_false() error condition checks (unless > > - * you have some _strong_ reason to do otherwise, in which case > > - * document it), and/or __predict_true() `no-error' condition > > - * checks, assuming you want to optimize for the no-error case. > > - * > > - * * Other than that, if you don't know the likelihood of a test > > - * succeeding from empirical or other `hard' evidence, don't > > - * make predictions. > > - * > > - * * These are meant to be used in places that are run `a lot'. > > - * It is wasteful to make predictions in code that is run > > - * seldomly (e.g. at subsystem initialization time) as the > > - * basic block reordering that this affects can often generate > > - * larger code. > > - */ > > -#if __GNUC_PREREQ__(2, 96) > > #define __predict_true(exp) __builtin_expect((exp), 1) > > #define __predict_false(exp) __builtin_expect((exp), 0) > > -#else > > -#define __predict_true(exp) (exp) > > -#define __predict_false(exp) (exp) > > -#endif > > I think the comment was worth keeping around. You just need to modify > the start of it to "Modern compilers include explicit branch prediction..= ." > In particular, I think our current practice is still to apply prediction > hints rather conservatively. > That's a fair point I hadn't considered. https://reviews.freebsd.org/D45837 adds it back with some tiny tweaks to the language, justification, etc. Warner --0000000000001c839a061c479154 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey John,

On Mon, Jul 1, 2024 at 3:49= =E2=80=AFPM John Baldwin <jhb@freebsd= .org> wrote:
On 6/20/24 7:41 PM, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D2508372b7b46117a9fb801b50624265d30888442<= /a>
>
> commit 2508372b7b46117a9fb801b50624265d30888442
> -/* > - * GNU C version 2.96 adds explicit branch prediction so that
> - * the CPU back-end can hint the processor and also so that
> - * code blocks can be reordered such that the predicted path
> - * sees a more linear flow, thus improving cache behavior, etc.
> - *
> - * The following two macros provide us with a way to utilize this
> - * compiler feature.=C2=A0 Use __predict_true() if you expect the exp= ression
> - * to evaluate to true, and __predict_false() if you expect the
> - * expression to evaluate to false.
> - *
> - * A few notes about usage:
> - *
> - *=C2=A0 =C2=A0* Generally, __predict_false() error condition checks = (unless
> - *=C2=A0 =C2=A0 =C2=A0you have some _strong_ reason to do otherwise, = in which case
> - *=C2=A0 =C2=A0 =C2=A0document it), and/or __predict_true() `no-error= ' condition
> - *=C2=A0 =C2=A0 =C2=A0checks, assuming you want to optimize for the n= o-error case.
> - *
> - *=C2=A0 =C2=A0* Other than that, if you don't know the likelihoo= d of a test
> - *=C2=A0 =C2=A0 =C2=A0succeeding from empirical or other `hard' e= vidence, don't
> - *=C2=A0 =C2=A0 =C2=A0make predictions.
> - *
> - *=C2=A0 =C2=A0* These are meant to be used in places that are run `a= lot'.
> - *=C2=A0 =C2=A0 =C2=A0It is wasteful to make predictions in code that= is run
> - *=C2=A0 =C2=A0 =C2=A0seldomly (e.g. at subsystem initialization time= ) as the
> - *=C2=A0 =C2=A0 =C2=A0basic block reordering that this affects can of= ten generate
> - *=C2=A0 =C2=A0 =C2=A0larger code.
> - */
> -#if __GNUC_PREREQ__(2, 96)
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0__predict_true(exp)=C2=A0 =C2= =A0 =C2=A0__builtin_expect((exp), 1)
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0__predict_false(exp)=C2=A0 =C2= =A0 __builtin_expect((exp), 0)
> -#else
> -#define=C2=A0 =C2=A0 =C2=A0 __predict_true(exp)=C2=A0 =C2=A0 =C2=A0(e= xp)
> -#define=C2=A0 =C2=A0 =C2=A0 __predict_false(exp)=C2=A0 =C2=A0 (exp) > -#endif

I think the comment was worth keeping around.=C2=A0 You just need to modify=
the start of it to "Modern compilers include explicit branch predictio= n..."
In particular, I think our current practice is still to apply prediction hints rather conservatively.

adds it ba= ck with some tiny tweaks to the language, justification, etc.
Warner=C2=A0
--0000000000001c839a061c479154-- From nobody Tue Jul 2 18:27:48 2024 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 4WDBGt2NV9z5P02B; Tue, 02 Jul 2024 18:27:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WDBGt1RJxz4Wdw; Tue, 2 Jul 2024 18:27:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719944870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GB/JDL0ijvdqWDw3X6ScZ6lDiUpZw96p2vXHDaCsSwU=; b=ebLIo2ruFFwqjbCzwIYZnonJTuwxcKxfiZ5P3B4HbPUZN45juKogh/qyG6m5GvuRqzNYLT LBHVd0DtxX2tNjOeTqwCmVLLFJA1k3Oq26NTGj4bBmBRcMkJaCOtCMqxKBun/LrJYOtjtD BlcazCXeCXTM1Db0evoeEElombsZV5701o5Y5xyqT3iTZ5awIfBFhCiWeAE8JPIkQDmKf7 wd3VPsu7toMWVFpqTNlg6Apw/F/1ks187e41pMrwHUWADgPy4BXkBqYZkc0LlwzoYeX99E AnVRCTMB+Bbg7opBOVh2q0i/ICHyfQScNe6KVPQwKIlCmihA/vJ9VL4CjkNIoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719944870; a=rsa-sha256; cv=none; b=jkPgpm1p3qklwHNsw/3ECJrevFoRgFb+oC/xPPP6xsIHvV5SRbo4WtvskrvveJCirvojRx 4gHOO3Ldo702T3cXfrBMUdZJkOUKG1aEgOw/dXklUYi4ATp0R0rKK12K3rFoetM6kUQkrE ejion5uUdtKu6Q/nEDcD7+JNamDzUvfD0Tpi7GF/7CQwowE9XI/j4+k9QIfuplTgagWesG i3JFe5zHx5X093hxOH0K1m82igGYSImoXv9gYUfU0Hc1cZZIqJoJ0KLOFhn10wtiEYGsMU yt+ZH2J4oS9pKPpyzEESOGdQZf2EYURcq+Cd9tP0aXxfkBamp/FQriOJ2/3KSw== 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=1719944870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GB/JDL0ijvdqWDw3X6ScZ6lDiUpZw96p2vXHDaCsSwU=; b=P3wAY04hdUPeykvbf0TUJXLtHYDL6izN+Z72Z3DWs6lfC6U+PT4UUTjiPYkeRxzONtAHY3 wJKj4ELauamsiqflUVgmjO4++7PAOOjwBOmEfKaojbzFNU0cOIRPTwC39xrdrud9hoPqQf Pa1X+5cpTW/YQUDQV+RPA0Yapgu5e+1Jmaj9xrWNTyN3Lr+f/dxBf0U//6ou9FILImyePV EkqLyVdNGRsStGDg90OdGBqSM8IS5InUqCrd1+7aonR+0hi7dtEgVZnpfEfqIrff57i8lo NlGjTlvZD7pZ0/WBFIEOB6gokmroxryfSgW2L7qiAwXwHA0YtQxRQe9iwS3aSQ== Received: from [IPV6:2601:5c0:4200:b830:3517:62a3:b646:39a7] (unknown [IPv6:2601:5c0:4200:b830:3517:62a3:b646:39a7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WDBGs5ltZz19hL; Tue, 2 Jul 2024 18:27:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <3e59b5b4-5807-49bd-a069-642f321c9662@FreeBSD.org> Date: Tue, 2 Jul 2024 14:27:48 -0400 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 Content-Language: en-US To: Warner Losh Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/2/24 12:30, Warner Losh wrote: > Hey John, > > On Tue, Jul 2, 2024 at 9:44 AM John Baldwin wrote: > >> On 7/1/24 4:09 PM, Warner Losh wrote: >>> On Mon, Jul 1, 2024, 3:53 PM John Baldwin wrote: >>> >>>> On 6/20/24 7:41 PM, Warner Losh wrote: >>>>> The branch main has been updated by imp: >>>>> >>>>> URL: >>>> >> https://cgit.FreeBSD.org/src/commit/?id=67d1a1cd9e772e2ef94003579f4fbc271d38be7d >>>>> >>>>> commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d >>>>> Author: Warner Losh >>>>> AuthorDate: 2024-06-20 23:02:56 +0000 >>>>> Commit: Warner Losh >>>>> CommitDate: 2024-06-21 02:41:08 +0000 >>>>> >>>>> cdefs.h: Remove support for pre gcc 4.0 >>>>> >>>>> All supported compilers support the gcc 3 attribute extensions. >>>> Remove >>>>> the #else clauses for this. Also, latter-day pcc compilers also >>>> define >>>>> __GNUC__, so there's not need to also test for __PCC__. >>>>> >>>>> Reviewed by: brooks >>>>> Differential Revision: https://reviews.freebsd.org/D45654 >>>>> Sponsored by: Netflix >>>>> --- >>>>> sys/sys/cdefs.h | 42 ++++-------------------------------------- >>>>> 1 file changed, 4 insertions(+), 38 deletions(-) >>>>> >>>>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >>>>> index 88019819eb35..a6ecdca5d8b9 100644 >>>>> --- a/sys/sys/cdefs.h >>>>> +++ b/sys/sys/cdefs.h >>>>> @@ -408,15 +389,10 @@ >>>>> * assign pointer x to a local variable, to check that its type is >>>>> * compatible with member m. >>>>> */ >>>>> -#if __GNUC_PREREQ__(3, 1) >>>>> #define __containerof(x, s, m) ({ >>>> \ >>>>> const volatile __typeof(((s *)0)->m) *__x = (x); >> \ >>>>> __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, >> m));\ >>>>> }) >>>>> -#else >>>>> -#define __containerof(x, s, m) >>>> \ >>>>> - __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) >>>>> -#endif >>>>> >>>>> /* >>>>> * Compiler-dependent macros to declare that functions take >> printf-like >>>>> @@ -434,14 +410,8 @@ >>>>> #define __strftimelike(fmtarg, firstvararg) \ >>>>> __attribute__((__format__ (__strftime__, fmtarg, >> firstvararg))) >>>>> >>>>> -/* Compiler-dependent macros that rely on FreeBSD-specific extensions. >>>> */ >>>>> -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 >> && \ >>>>> - defined(__GNUC__) >>>>> #define __printf0like(fmtarg, firstvararg) \ >>>>> __attribute__((__format__ (__printf0__, fmtarg, >> firstvararg))) >>>>> -#else >>>>> -#define __printf0like(fmtarg, firstvararg) >>>>> -#endif >>>> >>>> Does this still work with external GCC? I didn't think printf0 was >>>> supported >>>> by external GCC (or maybe I had to readd it in the port and that's what >> I >>>> remember). Ah, yes, printf0 is a local patch in the devel/freebsd-gccX >>>> ports, but is not available in stock GCC (e.g. lang/gcc does not support >>>> it). >>>> >>> >>> Ah. That would explain why it just worked for me. That's what I tested >>> with. Clang also seemed happy with it. But that was the in tree clang. Is >>> there a similar issue? Gnuc is defined for both. >> >> So we don't support building the base system with lang/gcc, only >> devel/freebsd-gccX (which has a local patch to add printf0 support). >> The only question might be, do we support using __printf0like for things >> that aren't in the base system that could be built with lang/gcc. If so, >> we might need to guard this somehow. I'm not sure though that we care >> about random software not in base using a FreeBSD-specific keyword from >> . >> > > Yes. The question is "do we use __printf0like in our headers" since we > definitely > can't build FreeBSD itself w/o at least some of the extensions for other > things... > and the answer is "yes". err.h uses it, for example, as does setproctitle > in stdlib.h > > The interesting thing for me is that gcc13 will produce no warnings if I > include errr.h > because -Wsystem-header is off. With it on, warnings crop up too. This is > why my testing > didn't see it... > > It looks like clang has it as a builtin for all versions we care about, so > I'll create a phab to add some > of this back. Maybe we should upstream what we have, for this and > freebsd_printf since that's also > in clang and one of the small number of patches we have for the lang/gcc* > family? Yeah, I should do my FSF paperwork for GCC sometime and try to upstream at least the printf changes and a few others (i386 defaulting to i686 on recent releases as well) -- John Baldwin From nobody Tue Jul 2 19:15:09 2024 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 4WDCKT4JKHz5P6j4; Tue, 02 Jul 2024 19:15:09 +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 4WDCKT3LTKz4c5k; Tue, 2 Jul 2024 19:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719947709; 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=2/UIETrhqsXeN3OYZanS8l3S6SvOCB1xTxwWJDs3bVo=; b=XOOd6QaO0RVlkHqX8bZYYDmsQt+3HqpjbtAtzBh4/FQHcuzU4+iOM//4zEZHEjbto/hl+z g1wwuvnpT9paSGZWtqTqX66Ar3f5s0eacv6YV+PwVAdPSwSzy1NTvn8/K1M/j0qU6ezWcG 0KPNvhUxypx0wD6mGQBrXSbc74QJUSiAQSPOKUdEJ22xpAoPULn36U4n4k2KuRHuLnSjkT p3H9xk228dCYuO1AGiBahea8rFD33VuN2KB52PRRI8IPCwJ3hw6Ry0UROjseGZ7KNvbbU2 4cCG1TkFlN/ZNGh9ZRfWgCnrQ/fDdJ5aZsLaBHRsZeVI3Yix0jwasHPcaHXFlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719947709; a=rsa-sha256; cv=none; b=uu2lQ91wNCxNUNZCp3Urt7kCXdq7HHT6RPTa4cXW8/6f8M9zdqArPR2rjfrSS7XJD6Nv2E 1KLsG8bJgqKFkV87wioZAt2BPN5TaepPAfvoXys3UJc/cTY210Ymom8E56a6ZGoAiU7iMM SqprrXgF2QSvsSr/ZYQORRrPwQ3Dax0dRkZJlbSFcfcuu8o0o+V1y3rCHz19Ww6bgIm74J 2AnmULWpSLYUy8u4Ykw+Cw/hlG1SU/7CgRLWHWkRP693Xxoatz/ufjpwL+G2zbkBg8egc2 EAZRywf75DFCYSSOo6FE7WAF1ZIz4EuJHJDKXH0AyqVvKjFT0+mcx+trJ+1qww== 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=1719947709; 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=2/UIETrhqsXeN3OYZanS8l3S6SvOCB1xTxwWJDs3bVo=; b=FndlUy94TecSZpgzfStbqqPAYpN9ZVx0Y4a+1ACnA82Voq83BA/ng+OLyECqeDnd8D2SZq wiE59+5rOa3+eNLDepOv8e87w7vY8z9M8o2qSJ5+xmRL9YGIz+Rnr6Jj23z2mX4ojSqkvx uUVMY8CRepBifpUiReoHSITFOcyLQM5WR8a2BZ9bbDYpJyxInQq8CnzC66/dWT1VUxgYYF FEzvLul00tFDL6M+P9RCNSmB7RLyXlejX8TUSIq63uaXaHtudHAJdORPvpQyEwoojZv/X6 nObZjMedjbJhUI+bMkKbX23klZhlFhu4JYokoVc8slAlMV6+N7NZnE6F15Mq1Q== 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 4WDCKT2xC5z11FS; Tue, 2 Jul 2024 19:15:09 +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 462JF9oP014031; Tue, 2 Jul 2024 19:15:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462JF98s014028; Tue, 2 Jul 2024 19:15:09 GMT (envelope-from git) Date: Tue, 2 Jul 2024 19:15:09 GMT Message-Id: <202407021915.462JF98s014028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 19008cdf7bef - main - gsb_crc32.c: avoid gcc -Wunused-const-variable in user build 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19008cdf7befe5351b9118174432d107e0c39431 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=19008cdf7befe5351b9118174432d107e0c39431 commit 19008cdf7befe5351b9118174432d107e0c39431 Author: Ryan Libby AuthorDate: 2024-07-02 19:12:22 +0000 Commit: Ryan Libby CommitDate: 2024-07-02 19:12:22 +0000 gsb_crc32.c: avoid gcc -Wunused-const-variable in user build Fixup after 56e9a0136f87 gsb_crc32: Fix a warning when compiled in userland. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45824 --- sys/libkern/gsb_crc32.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/libkern/gsb_crc32.c b/sys/libkern/gsb_crc32.c index 58bd3e720278..8cfee97d8d55 100644 --- a/sys/libkern/gsb_crc32.c +++ b/sys/libkern/gsb_crc32.c @@ -59,11 +59,7 @@ #include #include #endif -#endif /* _KERNEL */ -#ifndef _KERNEL -static -#endif const uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, @@ -128,6 +124,7 @@ const uint32_t crc32_tab[] = { * return crc ^ ~0U; * } */ +#endif /* _KERNEL */ /* CRC32C routines, these use a different polynomial */ /*****************************************************************/ From nobody Tue Jul 2 19:15:10 2024 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 4WDCKV5Fnmz5P6WZ; Tue, 02 Jul 2024 19:15:10 +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 4WDCKV44DVz4c8H; Tue, 2 Jul 2024 19:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719947710; 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=+tIaC52iwjpa7yUePOnoVnqU2abDmAESxkqbOjLNnMg=; b=meGXe8Kg1PnAFsNeX43z+GVYZ47E4GakoKnjIsB8B/7PqFbJawJWHCSxfdkavV6TSGKO9k QELmjDqq8oEeUt3yOxO71lIUzzN/1Z47awSGz02dX/r1or1GrfhOtdhjRP+hwNz601oeeg tw63O1T1qdt4e/kE7/xRvcGS34jFJW3949au1A1p0hgWCTbC9ttmqPeg8r6o4gtnbzGtlN aCQ3zxwnFtAJBP/oVVvOiQneQmdqNSXZ55FYwZvWRIDPSD9PG0WXdmIDTGMmMuESZbVLHA QfGOJzsa/ptEDKvhif1bYg5htolveR4zkFVsiIHWw/JW4T29YhPi19q2HYh8Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719947710; a=rsa-sha256; cv=none; b=I9dTLj4yD/JflcTCcAKleYTrYArI1bEhqJPR2M0Wvf2GMHGDEgDhJhXNbXuafitJ1qgjQz 038iM18fXMqjq7RhVevczglI23mfJyAElZSIcVQnFBCmpZVbrTjXvPtlukW1TFT3PwZF1D h4LHoiIEC9zuX9+MzkffYSWOxDp9svwap9wsSbDdv1hpktB5rj7nQm821NIhPDUP4UxPSr Hkkb9cLuNkqJGiuMryTnazXXAz24zZ80xuDm2gArehZ+38xnyST4sSdmN8Cu2BFzskZq6E p4/ogh1D5OeuO+l2agpMGiR2BJZfhhB4Tdl8Oz671V+UA2SuAnf/P7lsBQhjlA== 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=1719947710; 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=+tIaC52iwjpa7yUePOnoVnqU2abDmAESxkqbOjLNnMg=; b=fd3dtW7cAMBJFcDKLtYmaja2bV2pGlwSPR0jg3KQ/RyGy5et3bKcX4C+84WteBpLWVvPq1 fzuIcr1J/EOYbU10GCn/0R9ticFpqS/Y06P7/ImdiJNhytBkab5TtvASDOgZtEecAhatbW nTOuVTuu8uADruGPAiiJiuBLnlJ8WJTCZPD6v/RaqD2UEiJ1HPRr9zdg4vaAdygzO5z7c/ rN5mGBxWWhS/3lg8MP5X5v3jXYNehgGrDnBORRnU07CoACeKJmTQhtbgd/9yjkZU9rjCEa FQtH1oHtxYPiTxqOcLHFwxG3+XM546v8qMYJzmi5kyeteJb/MQon2gknwdQuYA== 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 4WDCKV3gZQz119V; Tue, 2 Jul 2024 19:15:10 +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 462JFAhS014073; Tue, 2 Jul 2024 19:15:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462JFAhh014070; Tue, 2 Jul 2024 19:15:10 GMT (envelope-from git) Date: Tue, 2 Jul 2024 19:15:10 GMT Message-Id: <202407021915.462JFAhh014070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 3cfcbbfaf83a - main - cdefs.h __generic: avoid gcc -Wunused-value 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cfcbbfaf83aa0a61c1fd72cb1e82a011b08bc83 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=3cfcbbfaf83aa0a61c1fd72cb1e82a011b08bc83 commit 3cfcbbfaf83aa0a61c1fd72cb1e82a011b08bc83 Author: Ryan Libby AuthorDate: 2024-07-02 19:12:59 +0000 Commit: Ryan Libby CommitDate: 2024-07-02 19:12:59 +0000 cdefs.h __generic: avoid gcc -Wunused-value Fixup after 9d2f97981755 : Decay expression passed to fallback version of __generic() Reviewed by: imp, jrtc27, kib Differential Revision: https://reviews.freebsd.org/D45825 --- sys/sys/cdefs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 53ac1b1c3f92..7c4890ece8d5 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -244,8 +244,8 @@ _Generic(expr, t: yes, default: no) #elif !defined(__cplusplus) #define __generic(expr, t, yes, no) \ - __builtin_choose_expr( \ - __builtin_types_compatible_p(__typeof((0, (expr))), t), yes, no) + __builtin_choose_expr(__builtin_types_compatible_p( \ + __typeof(((void)0, (expr))), t), yes, no) #endif /* From nobody Tue Jul 2 19:58:47 2024 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 4WDDHq2Tltz5PCwD; Tue, 02 Jul 2024 19:58:47 +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 4WDDHq1vnpz4hK9; Tue, 2 Jul 2024 19:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719950327; 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=nIlMDalocunDJ9WpaMi1DC2rKLTcwzBuh4HkfcsWlPc=; b=s3SLHU/n4gie2eR7ud0G1/eAceG+cMF11KYkPSsP8smhc1LLYfMZLcrcE9Vzemmm1S+4sH bbra4ptRHkMz4rFbdbR4eFYPpq5RwiOLf0XAaBXA/hjGAQPPAXmzEZ/B97HtUNMqRFCc1b 9op7nl/eu0ie6s7yFVmwUPws3c88TJYrQxTmxXnz0IL5wZSP+x4Sm2R96jZQp6wLi30jpl CQmk4+y+vjs/HYQa4ePZvU+d9HTip476aWSiq/iNZjWjWNMRzM3qN6Z0JBni0CAVXFKZtr EJdAlN8ucwFx8QzMGVdZc3CdogcNLtzHP1+RozLbRPixQr4IB8BJA/XGnfTP5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719950327; a=rsa-sha256; cv=none; b=LXcMMOO10jlu7t0UzxxlNYGKmhu4j8t2wTUVdrxSFVGXg5baftZj1GQkkeKp5UU4mwtJuy wNV2oom9x3kgYluCiLyk2h0wH+Z5tUpWgxv8F+eMOB5hTe+L8gEgwnIW4McfYntVkMuiNj 0rsKUXyQZdaRPfy5WBoio8R0a5XL5ssZVqtI+h48o0vZL/9BfuSGigehbQAtJMDsclEDzF 5cs5SJ4u6OzYJONLfLtm3qglHs1g/wt21fs3GjBBYIcvVe4/+zeuTVG2uSQb4alPSPptLd HiV+uJO2IjfoEz5P77IBLlU+JQWVj3pJLOh409CruX2Ff+uhpOM7tF0hJJJU2w== 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=1719950327; 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=nIlMDalocunDJ9WpaMi1DC2rKLTcwzBuh4HkfcsWlPc=; b=ZQWEHbFy0Veh6tCqDwtAcZ/YrZxoVRAxBx58R4dll6IGR8ys0BQIdfJaUoPOZGRoXUiHOz XkGUdCvsmB3Iy+rCamAy6LVc/ZkKHxkHKVpQO7qIwWSTHoQn2Mi3FoABW9/xgEaxPN6BY7 YLFcmVEjML5yE0jqzxVzVs1Q4E3M/Zo2xpfXi+mH1/8JeR86FyaBk0KDHmx6CYDLxmHrPw n8xUowggKIJha8vo9USxIOHHPAUGmrJnH6akzrxFoW3kQaQkPUbXuj4jTwh4sH79+iv5hx V7HxV3HEJTqIjoInVKr8dGTpZj9eZNvLTtHrXur5B/vPZUJVJQrYPSvx7yr8wg== 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 4WDDHq1PLWz11Z6; Tue, 2 Jul 2024 19:58:47 +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 462Jwlpl081337; Tue, 2 Jul 2024 19:58:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462JwlxL081334; Tue, 2 Jul 2024 19:58:47 GMT (envelope-from git) Date: Tue, 2 Jul 2024 19:58:47 GMT Message-Id: <202407021958.462JwlxL081334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 78918c9b271c - main - pf: Fix NULL deref in m_pullup failure case 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78918c9b271cb71419111abb5780f8a5adb4f2f5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=78918c9b271cb71419111abb5780f8a5adb4f2f5 commit 78918c9b271cb71419111abb5780f8a5adb4f2f5 Author: Igor Ostapenko AuthorDate: 2024-07-02 17:36:28 +0000 Commit: Kristof Provost CommitDate: 2024-07-02 19:58:32 +0000 pf: Fix NULL deref in m_pullup failure case Reviewed by: glebius, kp Differential Revision: https://reviews.freebsd.org/D45832 --- sys/netpfil/pf/pf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 4ad0a9a1336a..21647bd733f8 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8085,8 +8085,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, if (m->m_len < sizeof(struct ip) && (m = *m0 = m_pullup(*m0, sizeof(struct ip))) == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test: m_len=%d < sizeof(struct ip), pullup failed\n", - m->m_len)); + ("pf_test: m_len < sizeof(struct ip), pullup failed\n")); PF_RULES_RUNLOCK(); return (PF_DROP); } From nobody Tue Jul 2 23:17:50 2024 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 4WDJjV6qxjz5PfHZ; Tue, 02 Jul 2024 23:17:50 +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 4WDJjV6HLSz4DYc; Tue, 2 Jul 2024 23:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719962270; 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=+YHkL6lkLSBx64GyFrx17XZ2MFkrFi08MyN5vVWdEnw=; b=P3DH86y6rW4Gz84W+M5L122zxOouPhIng33Bem/LRK1JOv/issRw0n172o13/7+Q6V/QOu wsyrzD4AsniSccdDgHAi1pesFvHEtSptvAVR/FAPEih4vXYS7hFm3kGlBGdbJLEIQ8vVAs OsetwH0PsMLIHDjcbgPmSW2cClX8bIJ5tSkyOHeprvDzy0jj5UUcOmD39sGlFpFeZoN4YQ nAhQKiE2XutnkOS92acdmeKDwfmKnv7Z1E2wK7vQgVAigsgShtmKAd/rHMRM3BAU2T+CF1 4UCfImApV5LaPX3OgE0XbZtVqGAKhvyQN1U/pge3AQPZfgmeZXqe8mYqzP6cUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719962270; a=rsa-sha256; cv=none; b=iqkTAT3hi13OuC2H71wNLXCX8xnDiJA3UIOI6EcQEfnyzFf3GnM00EML36cQRbYDBv8aMn faZUeqKglzLdgNLRwqhc/PO+om/Pnwlf4GPuYxDwAa3Csz3iuG0yHJGS006duWSzMGypCD Qm/kzCqF7d+KfAE5UzMXg4LWi+n5YyZX1SFOxeLlFrluvrAdx0fe0CZKZmgU3Rxz/5MfBO EmUox2bcxFUTjSKWpTf8+4mgcrLk938VE57TVFtXngOfBPEvMm1K4RGqr2tn+Lo3Y5zIak 6eaC5ZvXHPpRwsqJQhT+O55FZs2Y9673tRqCO0383vSNGbSRVa7oMXOIRN34Lw== 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=1719962270; 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=+YHkL6lkLSBx64GyFrx17XZ2MFkrFi08MyN5vVWdEnw=; b=SZvb/WvH/qz4o6GDBI9Yu9liylvY37YHdVZKSMOX10hB3m37x4HcEhv23nOcev2W8gFpK0 oVxpjswHqPEUZyH77pGDnviLPLbSdKqb0re5da1N9YvhcYMb0vX2xxyB++u85DGgzjd6+l 994krK6Ftju3hMAf0tl7C00phBNoAvwjqxb9vje30hAcQL/7GtWPc5yITS45TXqO4gua4y iai9uNqoEfWA2TuAPiFapx5CrWkgxYqYNsOhlPUD27jVz6YsSGXJcVeDiub/+NhpVP8XWe 5L7JWhg49noRLVZjVN3t+ebkUYfUnVR8cEf9rP0tmkPAOt8jwENVDREPSFeq/g== 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 4WDJjV5m1bz16ky; Tue, 2 Jul 2024 23:17:50 +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 462NHoYm019554; Tue, 2 Jul 2024 23:17:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462NHogY019551; Tue, 2 Jul 2024 23:17:50 GMT (envelope-from git) Date: Tue, 2 Jul 2024 23:17:50 GMT Message-Id: <202407022317.462NHogY019551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: d6888e211b07 - main - ums(4): fix incorrect mouse button reporting via evdev 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6888e211b07be79dd8de3145ac41b365f482ae8 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d6888e211b07be79dd8de3145ac41b365f482ae8 commit d6888e211b07be79dd8de3145ac41b365f482ae8 Author: Niko Sonack AuthorDate: 2024-07-02 19:27:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-02 23:15:50 +0000 ums(4): fix incorrect mouse button reporting via evdev when ums driver receives non-mouse HID report. This results in unexpected button release event. Reuse existing sysmouse logic to keep button pressed. Reviewed by: imp, wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45838 --- sys/dev/usb/input/ums.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/input/ums.c b/sys/dev/usb/input/ums.c index 8416be656f81..067feed13e92 100644 --- a/sys/dev/usb/input/ums.c +++ b/sys/dev/usb/input/ums.c @@ -320,11 +320,12 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error) if (++info != &sc->sc_info[UMS_INFO_MAX]) goto repeat; + /* keep old button value(s) for non-detected buttons */ + buttons |= sc->sc_status.button & ~buttons_found; + #ifdef EVDEV_SUPPORT buttons_reported = buttons; #endif - /* keep old button value(s) for non-detected buttons */ - buttons |= sc->sc_status.button & ~buttons_found; if (dx || dy || dz || dt || dw || (buttons != sc->sc_status.button)) { From nobody Tue Jul 2 23:19:40 2024 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 4WDJld1N24z5Pfbd; Tue, 02 Jul 2024 23:19:41 +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 4WDJld0l5Jz4F2v; Tue, 2 Jul 2024 23:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719962381; 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=ImAlU2FnnK2/AdIh8XxM9+y/+qdcLOeB2gonWqIZG8M=; b=YrZVPU0ocuPLNODS257VDVB0kVei+rb7F07fwCCvo92xKv42xFZ/qiWZ5uUI5iIgXWZq0G JrxXbz30JPuPfmfo0PEnaAyKBiUQ6lnSXHRodupbLpvB0LiD7PYqiGR/ZUHevT7XjUN7vQ 8AvDOhrC8EP9slimYnnk+k4Gu8ocVU+xcMZ13E4/alDvdVEsyMQ2pVtwMHUSDkUrfUtWo4 IFzY4s758CDkhitvXP9amUljpPV+660z/zD67S6S2qV5qT5J6qqw3sWMB9xeX/VMQdgI3e V1zbwb5M6bMXdp5L8Mu8MD177HBkVvzFi2vFwH0LjodRWq7fhqJcik8kpnv8sQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719962381; a=rsa-sha256; cv=none; b=JaGXOdQpMww6U810yU5kwrgnP6FISOLmMiAVmG/j0eJNnENRo+QQ7TirI+l6DVNQt024we 3HjrAftJcKxz6144/g9IION3umr8wZCXV+MKnEkv/gJD1/EhrEijlbQO2B/EeWS7O8CNzt qxvPZqhnSpP+KtRMWRSPu7ZkVkw1cm78U5BKmjSK6mrMMxfe0cEXC0H4bg6ZrKJ6dvWo0c D0g1DEWTDzzuxAz0Tug07b1Nl9UV/9zAceSQEsY9vWy69MUuQ8piWIOk1zUtHMwiZ/iLzv fx63TC/Mku19PtreDJPRptv1q6EKDHFaeue76cdPE70QUzoqFnNjAV3RZG+wHA== 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=1719962381; 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=ImAlU2FnnK2/AdIh8XxM9+y/+qdcLOeB2gonWqIZG8M=; b=bdzvAiazzwlAio/slJaPk7sBISVDcPEVjv5fwV3eCpMlG1lEciP25yO0k72KxuOCKqYbHk 6NyHoVMA8ftFgURDLqAzjpfHJfI8cwpSOTbPCcqqs0XSXCA7GJl08T6MpIsqaKNbLphYWu 7pK7ZCvEbKOFVV+EQOiICl7iJtd3OvX8kTvnahqLGZdQq2C3aoNmCM4PdDOGk+ZnB4/8nL DJ+AtlUxULIoytmn/v19OG2stCgmZIWcAUa54dLANWWpoppGDkdH520FQpOF/pGKm4pEPj QpZ15OByX8Lujlf1zdYAv2EcTy+d/7MK04vmsua0ez9M5Lg9BJR5Hq1Rni8FZw== 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 4WDJld0CZbz16bP; Tue, 2 Jul 2024 23:19:41 +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 462NJepA019928; Tue, 2 Jul 2024 23:19:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462NJehl019925; Tue, 2 Jul 2024 23:19:40 GMT (envelope-from git) Date: Tue, 2 Jul 2024 23:19:40 GMT Message-Id: <202407022319.462NJehl019925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a1cfe4c7646b - main - style(9): Delete __FBSDID straggler 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1cfe4c7646bcae56276ba89c1fe316f426c3d8c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a1cfe4c7646bcae56276ba89c1fe316f426c3d8c commit a1cfe4c7646bcae56276ba89c1fe316f426c3d8c Author: Warner Losh AuthorDate: 2024-07-02 23:09:36 +0000 Commit: Warner Losh CommitDate: 2024-07-02 23:19:32 +0000 style(9): Delete __FBSDID straggler We no longer need advice on __FBSDID, so delete it. Sponsored by: Netflix --- share/man/man9/style.9 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 8eb82e3419ec..381f3aa3bfa3 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 26, 2024 +.Dd July 2, 2024 .Dt STYLE 9 .Os .Sh NAME @@ -137,11 +137,6 @@ Leave one blank line before the header files. Kernel include files .Pa ( sys/*.h ) come first. -If -.In sys/cdefs.h -is needed for -.Fn __FBSDID , -include it first. If either .In sys/types.h or From nobody Wed Jul 3 08:02:56 2024 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 4WDXMN5TsLz5MpVr; Wed, 03 Jul 2024 08:02:56 +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 4WDXMN3RfYz4GbC; Wed, 3 Jul 2024 08:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719993776; 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=owrDuC2pDDcp5ZGVLUsMGCSpPNA5uWgEIYnsdIW3Uxk=; b=Cm2oZsQDFTZ/8KT7bKyAwHbDmIMb/T+jVaJiNRl3AGgm+AhTAQuW3KcyXO+AtYXMZtcz/F LO/ik//XMgczS74/7TKZXzHtl9gcRl0m/ZOOct4ckXgptz3sEDsXNeeTztMhvgISwYX0eA D03tDjZxd5XsC2+eJ0OiyaaEcHC97GR7xAlj0jQWHa617lKy+zpVe398UM48Q3NLCjThm9 pMn4GzLFcZMuOh1upLEsl3uNQCPb0Gaz2jtDihklrXRw/pIo2d6ttqx0tiBwRDxzXN/+fI AoL0ph5OxNurqVpXUZau5uynor1LorhLv0Kw6+5nwI+24AqE8UH5alvA9z+hJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719993776; a=rsa-sha256; cv=none; b=ou03wY9Z3U9kXQfCl9twJBuSInMnhl0X0iW/yOAPwMqlXmhTvecd0OpM7LrAHjevGQ+CLJ nzTJm78WvcxbsThD6jousG0+84+1KxK+X3xV9Zz3SFqoJq1zqGMQIbKlSvy83gmZb7EnjU 2CvwK307YxtIaSEKk1vIhVUr3fFTIRMTHPvybiaKSRrSEhFdIB139XEEkuN6DspBHo3rmM LQs+oVbVwBg5uZRxQw8+a40jFzdI5QBQQMrNvRgnCkhCwPy8+lYLoAREQ85EkVFiPU5nku OprCCFoKhZSVKxM/kr7O8xTxzEtUNoFumt7c9m3K8gXrh0E/GCzxSyaNpAc6+g== 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=1719993776; 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=owrDuC2pDDcp5ZGVLUsMGCSpPNA5uWgEIYnsdIW3Uxk=; b=UaxwcYObyFk1N0J967BnQHoGtv0R9TM+lgmX3y5ASsi4yUDz1ry2l43I96j0n+YqbWX1Ap 33B5ICmbmr1WNSQ8LecA7DOXGfs76aLuJPZBmW1vcGuNXju6pnSfaa6S34KRP0kzxMi/aX zvTWLECSOvcdzwRQZTrKDsyQahld9k0gNuOaWj51K15pESq0Vfia1Rl4Mm58HKiy48/p5F PSFz81E5Ero2vphh9brIplRE7Z2zqMQ8kONxhsohr7k8lISXEpmMPbZkv5wxGrduccZrzg EqeOcDAoQspvwQa1kuD4vV8wodwfR8s4oadpYVt1/F2YUtGs3SR/DXZWy0+17g== 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 4WDXMN32pgzN8R; Wed, 3 Jul 2024 08:02:56 +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 46382uPZ014089; Wed, 3 Jul 2024 08:02:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46382uK8014086; Wed, 3 Jul 2024 08:02:56 GMT (envelope-from git) Date: Wed, 3 Jul 2024 08:02:56 GMT Message-Id: <202407030802.46382uK8014086@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: 342053a66c16 - stable/14 - sched_unpin(): assert that curthread was pinned 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 342053a66c161c12f6887efac913c80040959ae8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=342053a66c161c12f6887efac913c80040959ae8 commit 342053a66c161c12f6887efac913c80040959ae8 Author: Konstantin Belousov AuthorDate: 2024-06-25 20:08:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-03 08:02:28 +0000 sched_unpin(): assert that curthread was pinned (cherry picked from commit 7e5574f9e5d9df749ffc49657717527cfa93f6b4) --- sys/sys/sched.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/sched.h b/sys/sys/sched.h index 9d37e8f0f999..933f05385675 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -180,6 +180,7 @@ static __inline void sched_unpin(void) { atomic_interrupt_fence(); + MPASS(curthread->td_pinned > 0); curthread->td_pinned--; } From nobody Wed Jul 3 13:20:19 2024 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 4WDgPc0FpJz5PHH7; Wed, 03 Jul 2024 13:20:20 +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 4WDgPb6562z4pHr; Wed, 3 Jul 2024 13:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720012819; 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=PRhfPY1RFIpV30VE6KFzPUDAFemOiEoqdGoGqFg6+8g=; b=sOLOupCCVNBjPgErtXjRBXnYW7wIL3GtO0qkbnjFdRu+nkSifyj9/Eh7F/BIdH9zy8Y7xs ZJhRofxMAlEH9CGyMgy8dU7IXjXdtL8K/+BaBjGBGnYUa/SyIJF44FM/+NrBiY/vEmt7dd YfbVgkFyteK1/cAZnR3L0lHJRA5WklOE4lSviEE1Cske6UAJQI/WiBYGHssOGRVveAGDnB B+/c9rZanVeS6uIEwpIhc6ToUw0exQmesW+sVnEGpksw0tJBhM+evkClE7gfakT6Oebn7S zT4GAMK00rv8cpX2HpvR669XyyPeCtJtU147Jrsk4uglPEWrFx8OQmQf6EVuwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720012819; a=rsa-sha256; cv=none; b=TVihAR6hvB8yd/zI9amBjBZCO0ldBvoQ2mCqVRhsfNw12aaKsv4ieN20HjAI7VUIJPKN2a vTVfnGP1JdIGu4/3JRGAOUxsfwIhPiK1LHO3U65umeDn/tqTQbayxA8ywMzbh/yhOEvoSk 65P7g2iRzUBMx0Jw48FlCAydoG+unteQAkJbP47NsZg636xtgavCfZnwuCwJwczeO7YwAn 12QCApgpa0oFIKVkatCNn835QNuS9/tVEbCsbcJQ1igePbgHeQHWfid2RniSFLzNpZKUJU p5lJR71p4J4ZdCYFMC5ahzKuydUjZtgQdLRhGWw5z822e01zb5usPu72Yl+jyQ== 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=1720012819; 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=PRhfPY1RFIpV30VE6KFzPUDAFemOiEoqdGoGqFg6+8g=; b=RPHgFPU4zukDbICAzKQYFPqCnJ48Jj9RCduWwa2rzYwd3fuIM/xnMyfi106bkRHL0y2iR2 oDDiyKfNqOvlEAUaM4HD0YOHEONpo7iXnHa2DmGse0J4N31TfrTD/FFsVJEgbp8mpqYFbd 90z9Y/rPaj/YVCj6i7NM0N4P1P1m3i5PpeLEM1EY8uv/XzHYSa9A1LuY1B4lm6taRSBOHC TFcWKcOevVGnhhAHIszfdFRZEfJL5Ol9njP25jNPnnq7S6R0IXvxu2PV9QlQbIKdSJzR9x n9vOYAyIhJfz4W3eCIT4zYA7UhDcu6G8KFq9nGDTVRAE/lqOC8DFDKfyx1ZA9w== 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 4WDgPb5ZBwzYXS; Wed, 3 Jul 2024 13:20:19 +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 463DKJCH047373; Wed, 3 Jul 2024 13:20:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463DKJLa047370; Wed, 3 Jul 2024 13:20:19 GMT (envelope-from git) Date: Wed, 3 Jul 2024 13:20:19 GMT Message-Id: <202407031320.463DKJLa047370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: a2cac544a668 - main - if_clone: Allow maxunit to be zero 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2cac544a668d2834ed41986aca32b44b9819c89 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a2cac544a668d2834ed41986aca32b44b9819c89 commit a2cac544a668d2834ed41986aca32b44b9819c89 Author: Zhenlei Huang AuthorDate: 2024-07-03 13:14:08 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-03 13:14:08 +0000 if_clone: Allow maxunit to be zero Some drivers, e.g. if_enc(4), only allow one instance to be created, but the KPI ifc_attach_cloner() treat zero value of maxunit as not limited, aka IF_MAXUNIT. Introduce a new flag IFC_F_LIMITUNIT to indicate that the requested maxunit is limited and should be respected. Consumers should use the new flag if there is an intended limit. Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45757 --- sys/net/if_clone.c | 13 +++++++++---- sys/net/if_clone.h | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 8f1bad56d14e..13d89e4e2c59 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -483,12 +483,13 @@ if_clone_alloc(const char *name, int maxunit) struct if_clone *ifc; KASSERT(name != NULL, ("%s: no name\n", __func__)); + MPASS(maxunit >= 0); ifc = malloc(sizeof(struct if_clone), M_CLONE, M_WAITOK | M_ZERO); strncpy(ifc->ifc_name, name, IFCLOSIZ-1); IF_CLONE_LOCK_INIT(ifc); IF_CLONE_ADDREF(ifc); - ifc->ifc_maxunit = maxunit ? maxunit : IF_MAXUNIT; + ifc->ifc_maxunit = maxunit; ifc->ifc_unrhdr = new_unrhdr(0, ifc->ifc_maxunit, &ifc->ifc_mtx); LIST_INIT(&ifc->ifc_iflist); @@ -521,12 +522,16 @@ if_clone_attach(struct if_clone *ifc) struct if_clone * ifc_attach_cloner(const char *name, struct if_clone_addreq *req) { + int maxunit; + struct if_clone *ifc; + if (req->create_f == NULL || req->destroy_f == NULL) return (NULL); if (strnlen(name, IFCLOSIZ) >= (IFCLOSIZ - 1)) return (NULL); - struct if_clone *ifc = if_clone_alloc(name, req->maxunit); + maxunit = (req->flags & IFC_F_LIMITUNIT) ? req->maxunit : IF_MAXUNIT; + ifc = if_clone_alloc(name, maxunit); ifc->ifc_match = req->match_f != NULL ? req->match_f : ifc_simple_match; ifc->ifc_create = req->create_f; ifc->ifc_destroy = req->destroy_f; @@ -584,7 +589,7 @@ if_clone_advanced(const char *name, u_int maxunit, ifc_match_t match, { struct if_clone *ifc; - ifc = if_clone_alloc(name, maxunit); + ifc = if_clone_alloc(name, maxunit ? maxunit : IF_MAXUNIT); ifc->ifc_match = match; ifc->ifc_create = ifc_advanced_create_wrapper; ifc->ifc_destroy = ifc_advanced_destroy_wrapper; @@ -629,7 +634,7 @@ if_clone_simple(const char *name, ifcs_create_t create, ifcs_destroy_t destroy, struct if_clone *ifc; u_int unit; - ifc = if_clone_alloc(name, 0); + ifc = if_clone_alloc(name, IF_MAXUNIT); ifc->ifc_match = ifc_simple_match; ifc->ifc_create = ifc_simple_create_wrapper; ifc->ifc_destroy = ifc_simple_destroy_wrapper; diff --git a/sys/net/if_clone.h b/sys/net/if_clone.h index 45a6d4144230..e11fc5c8cdd7 100644 --- a/sys/net/if_clone.h +++ b/sys/net/if_clone.h @@ -101,6 +101,11 @@ struct if_clone_addreq_v2 { #define IFC_F_SYSSPACE 0x04 /* Cloner callback: params pointer is in kernel memory */ #define IFC_F_FORCE 0x08 /* Deletion flag: force interface deletion */ #define IFC_F_CREATE 0x10 /* Creation flag: indicate creation request */ +#define IFC_F_LIMITUNIT 0x20 /* Creation flag: the unit number is limited */ + +_Static_assert(offsetof(struct if_clone_addreq, destroy_f) == + offsetof(struct if_clone_addreq_v2, destroy_f), + "destroy_f in if_clone_addreq and if_clone_addreq_v2 are at different offset"); struct if_clone *ifc_attach_cloner(const char *name, struct if_clone_addreq *req); void ifc_detach_cloner(struct if_clone *ifc); From nobody Wed Jul 3 13:20:20 2024 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 4WDgPd0sDsz5PH8P; Wed, 03 Jul 2024 13:20:21 +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 4WDgPc6V9Dz4pFj; Wed, 3 Jul 2024 13:20:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720012820; 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=SYsaVz5D6plohFZbwbC5SAhzSVHvK3i/8K/s5/A468Y=; b=v/9pD+mTlfW2Db6YabFqsyLVau5oyrb2aLn3AbCCEh/qfYbZjV1DZwW+1QmMvoxVm6bod0 MbwiU1XnKdUb/pPcdq5CcxrjoVm8m/LkYG1T677EW6qAk3Ii0X7utg3uqzPrkyX0FV4KC4 BHUXUUAVVbwOrtYL0doTHzOmEKX59ZK4ZPHRtJp+NU0GFXTG3uNN1ZfOKh1/hd2ZWrSwK8 dxDRYI5GEWzJJMrHgRoncv3IMQvH1k4+Yt9Op0HEUnuENis7Ht70kQRkIzhKBPw4I6evjk oGuZFSuHo/TXJ/bVjDUMFmBOvTxT2LD+k9k5sT+k4hCZoqBU1SkB9nHxwSjXxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720012820; a=rsa-sha256; cv=none; b=Cz14TjziHoOcyvvAjlquxVWfqdfSLSdauSHdK4FMIYkZqY12yb9Bqcr/FFk0wRPdGFTBBc +0DOzYsdFgJsXb1nObMa5k/jzvN0XMxmDHvt/ISV4f78QonnCDONqLkW/ceLMlUEdDIsCD QYdgfoG3hOepHdGcCfALSloATEnf87kFA+ra7P/j1M09ybwAydlic7eRIkvfzzTbdv+VB+ dfAZhxPsjiv9ToDioW8LV3fFpybNYiQQppvM63pwofvotIYhE+Vq7ain87duNaNH/VHJVe ijNCXBYJJfW2tr+INR/uztaH5x9fwli2hTCMnpnmtXgfgzHplU1MCS19eSXjhw== 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=1720012820; 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=SYsaVz5D6plohFZbwbC5SAhzSVHvK3i/8K/s5/A468Y=; b=uUSB79vwJxdFjTtqtzYMi1j5l0O1kvMkV1emJnOjsDk2jMeYV3hl4RD2JgSTYAIZInwYI/ 2xH1e4XUbRX1nn+O5LOJBDhrcS0Dx2e3/icpPaf0B3t6jAq1cyJVSmym7NKx6RBj89NbhK 0cgT+x5ABQBe/rEHk0q3y81C9wwaEg66kH3EpkMxXMz6LzRXYmjaHh9nYxz8iTFLJuNBwJ dHYbcZ+BG+aQwq/lk07M4hhmnbMVTW91VWF1eai5DNM6QkDO9aROKhU4BN0d7mOGiD45rr GjoPRltDvXgHN9404/azd3VeCWW9iDBsctBdzJLXwum4utCbf3BqPD/SVZG/pA== 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 4WDgPc65cgzYJ5; Wed, 3 Jul 2024 13:20:20 +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 463DKKce047427; Wed, 3 Jul 2024 13:20:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463DKKrE047424; Wed, 3 Jul 2024 13:20:20 GMT (envelope-from git) Date: Wed, 3 Jul 2024 13:20:20 GMT Message-Id: <202407031320.463DKKrE047424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 07d138afc7e5 - main - if_pflog: Limit the maximum unit via the new KPI 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07d138afc7e5efee73368459dd047493713056cf Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=07d138afc7e5efee73368459dd047493713056cf commit 07d138afc7e5efee73368459dd047493713056cf Author: Zhenlei Huang AuthorDate: 2024-07-03 13:14:09 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-03 13:14:09 +0000 if_pflog: Limit the maximum unit via the new KPI The cloner has the ability to limit the maximum unit. Employ it to do that rather than roll our own. No functional change intended. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45767 --- sys/netpfil/pf/if_pflog.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/if_pflog.c b/sys/netpfil/pf/if_pflog.c index 8b849b0b9376..6035ba635116 100644 --- a/sys/netpfil/pf/if_pflog.c +++ b/sys/netpfil/pf/if_pflog.c @@ -105,14 +105,16 @@ VNET_DEFINE(struct ifnet *, pflogifs[PFLOGIFS_MAX]); /* for fast access */ static void pflogattach(int npflog __unused) { - int i; + int i; + for (i = 0; i < PFLOGIFS_MAX; i++) V_pflogifs[i] = NULL; struct if_clone_addreq req = { .create_f = pflog_clone_create, .destroy_f = pflog_clone_destroy, - .flags = IFC_F_AUTOUNIT, + .flags = IFC_F_AUTOUNIT | IFC_F_LIMITUNIT, + .maxunit = PFLOGIFS_MAX - 1, }; V_pflog_cloner = ifc_attach_cloner(pflogname, &req); struct ifc_data ifd = { .unit = 0 }; @@ -125,8 +127,7 @@ pflog_clone_create(struct if_clone *ifc, char *name, size_t maxlen, { struct ifnet *ifp; - if (ifd->unit >= PFLOGIFS_MAX) - return (EINVAL); + MPASS(ifd->unit < PFLOGIFS_MAX); ifp = if_alloc(IFT_PFLOG); if_initname(ifp, pflogname, ifd->unit); From nobody Wed Jul 3 15:05:28 2024 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 4WDjkw2QKPz5Pl1l; Wed, 03 Jul 2024 15:05:28 +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 4WDjkw1kYSz41Bh; Wed, 3 Jul 2024 15:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720019128; 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=8nkQobrZc2oPr8rt+5iCNUdDAL1oiFd3e2tg4MC92D4=; b=OXvrPBOBNuU3zmMIFTO8lgdRxGw3guq6IkCB3glGbBD2NG8aOMcSIiK5Ja4clCJv/lrzCI WkTTj0jKZj/GcZ4lBOqSZPKGLk8p494G1+swv+3YzqSgbPoaeNsDEOZPc+fDZYTDi77KgV gTaA3TiuSSernjgi2TMRLsNDf67SfQKerxYB1Kab6ZxrIM4l1XW6pudLZNC6G4kh1Vp17J MiqUzi4PYGb2JsFdtDMFoV6SjYICUVlIYD2RlQY9tE3UKXqc2ATy+L32XikJ3m+whzu/IC NzVOQtOAlfLCCbXpH7MUhkcnaEt8toPsj3GT7Ch+6tWyS4GcOJY7SGUvkx8lcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720019128; a=rsa-sha256; cv=none; b=OhiSL1682Zcdqusb1xID22q6ZlMmyOtBlIuDQItdDUZvJGiM05rW4kS4dr6dKDhvGPxMUB aZfwioVMDeYwk+lOpjI39eka2Duu4g+CNZIFBUaCF9GhbH3Rua8AO3fmJ2opS1KnoVOzNS EjWNdGiTStLkohAHBd7LOAqdm+j+XYulhSCkisb6J4F7sEkyJ1qQrBox2F4kizzonqRxk4 KonGdc1Rl2hs5o3vGeP6BSGAqLtO9ZvHvJX49buNtZH0YTSkHV5TgoTxnLTF3Bv6EtHnkb MrzEN1TtCHyYBi/oK3eXqPzXeaA6qR2xdtx+CtwZ9SWBhifZlTO/R7Esw4Lesw== 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=1720019128; 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=8nkQobrZc2oPr8rt+5iCNUdDAL1oiFd3e2tg4MC92D4=; b=IJyi/cubPx/c5iF7Cd2tMcFpASAAdEO85o5hnQeouhKRDq/bQKsPUcD0+/+p5K/LW2GV2n S507NQIJpgSkjj1whcd4k26wt8bPXOPPfJL9xecUjgFTxfS8PhKbIigaAMDKWaNZIO4I30 9Kg7syXx+v09O5mJD8MAriGUSan0zyaAPPOkQSTMqPI6sjh2ieVGACjsmVmvehCdwfPRs/ luT2MtbNEllOWwiS/x0H2uuAU+tJeCB72MNDIwHDYTYH7tYOmk5/+YaHu4x/qu/54urVEQ KC5DGDjL5TjGdJ0W6CyBGECvwhVkq+9Xq5HpM76nK+DduzfcJiAPztKbUCBdVw== 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 4WDjkw1KkfzcDZ; Wed, 3 Jul 2024 15:05:28 +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 463F5SIL023496; Wed, 3 Jul 2024 15:05:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463F5SNn023493; Wed, 3 Jul 2024 15:05:28 GMT (envelope-from git) Date: Wed, 3 Jul 2024 15:05:28 GMT Message-Id: <202407031505.463F5SNn023493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 61089df8147e - main - cxgbe: Remove most uses of sysctl_wire_old_buffer 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61089df8147eb7109696476c891514296d543bad Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=61089df8147eb7109696476c891514296d543bad commit 61089df8147eb7109696476c891514296d543bad Author: John Baldwin AuthorDate: 2024-07-03 15:04:52 +0000 Commit: John Baldwin CommitDate: 2024-07-03 15:04:52 +0000 cxgbe: Remove most uses of sysctl_wire_old_buffer Most of these sysctls don't call sbuf_* while holding any locks. Of the ones that do hold locks, all but one can be fixed to drop the lock before calling sbuf_*. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45186 --- sys/dev/cxgbe/t4_main.c | 167 ++++++++---------------------------------------- 1 file changed, 27 insertions(+), 140 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index ab477595bdb9..14799b3eeb18 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -8140,10 +8140,6 @@ sysctl_bitfield_8b(SYSCTL_HANDLER_ARGS) int rc; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8161,10 +8157,6 @@ sysctl_bitfield_16b(SYSCTL_HANDLER_ARGS) int rc; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8422,10 +8414,6 @@ sysctl_pause_settings(SYSCTL_HANDLER_ARGS) struct sbuf *sb; static char *bits = "\20\1RX\2TX\3AUTO"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8487,10 +8475,6 @@ sysctl_link_fec(SYSCTL_HANDLER_ARGS) struct sbuf *sb; static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD1\5RSVD2"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8518,10 +8502,6 @@ sysctl_requested_fec(SYSCTL_HANDLER_ARGS) static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD2" "\5RSVD3\6auto\7module"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8597,10 +8577,6 @@ sysctl_module_fec(SYSCTL_HANDLER_ARGS) struct sbuf *sb; static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD2\5RSVD3"; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); @@ -8627,14 +8603,15 @@ sysctl_module_fec(SYSCTL_HANDLER_ARGS) fec = lc->fec_hint; if (pi->mod_type == FW_PORT_MOD_TYPE_NONE || !fec_supported(lc->pcaps)) { + PORT_UNLOCK(pi); sbuf_printf(sb, "n/a"); } else { if (fec == 0) fec = FEC_NONE; + PORT_UNLOCK(pi); sbuf_printf(sb, "%b", fec & M_FW_PORT_CAP32_FEC, bits); } rc = sbuf_finish(sb); - PORT_UNLOCK(pi); done: sbuf_delete(sb); end_synchronized_op(sc, 0); @@ -8854,10 +8831,6 @@ sysctl_loadavg(SYSCTL_HANDLER_ARGS) if (rc) return (rc); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -8887,14 +8860,11 @@ sysctl_cctrl(SYSCTL_HANDLER_ARGS) "0.9375" }; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -8970,10 +8940,6 @@ sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS) } n = rc * sizeof(uint32_t); /* rc has # of words actually read */ - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - goto done; - sb = sbuf_new_for_sysctl(NULL, NULL, PAGE_SIZE, req); if (sb == NULL) { rc = ENOMEM; @@ -9092,9 +9058,6 @@ sysctl_cim_la(SYSCTL_HANDLER_ARGS) struct sbuf *sb; int rc; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9162,10 +9125,6 @@ sysctl_cim_ma_la(SYSCTL_HANDLER_ARGS) uint32_t *buf, *p; int rc; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9173,6 +9132,7 @@ sysctl_cim_ma_la(SYSCTL_HANDLER_ARGS) buf = malloc(2 * CIM_MALA_SIZE * 5 * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9213,10 +9173,6 @@ sysctl_cim_pif_la(SYSCTL_HANDLER_ARGS) uint32_t *buf, *p; int rc; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9224,6 +9180,7 @@ sysctl_cim_pif_la(SYSCTL_HANDLER_ARGS) buf = malloc(2 * CIM_PIFLA_SIZE * 6 * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9293,10 +9250,6 @@ sysctl_cim_qcfg(SYSCTL_HANDLER_ARGS) if (rc) return (rc); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, PAGE_SIZE, req); if (sb == NULL) return (ENOMEM); @@ -9329,14 +9282,11 @@ sysctl_cpl_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_cpl_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9375,14 +9325,11 @@ sysctl_ddp_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_usm_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9408,14 +9355,11 @@ sysctl_tid_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_tid_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9552,9 +9496,6 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS) int rc; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -9597,10 +9538,7 @@ sysctl_fcoe_stats(SYSCTL_HANDLER_ARGS) struct tp_fcoe_stats stats[MAX_NCHAN]; int i, nchan = sc->chip_params->nchan; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -9653,16 +9591,13 @@ sysctl_hw_sched(SYSCTL_HANDLER_ARGS) unsigned int map, kbps, ipg, mode; unsigned int pace_tab[NTX_SCHED]; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 512, req); if (sb == NULL) return (ENOMEM); mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) { + mtx_unlock(&sc->reg_lock); rc = ENXIO; goto done; } @@ -9670,6 +9605,7 @@ sysctl_hw_sched(SYSCTL_HANDLER_ARGS) map = t4_read_reg(sc, A_TP_TX_MOD_QUEUE_REQ_MAP); mode = G_TIMERMODE(t4_read_reg(sc, A_TP_MOD_CONFIG)); t4_read_pace_tbl(sc, pace_tab); + mtx_unlock(&sc->reg_lock); sbuf_printf(sb, "Scheduler Mode Channel Rate (Kbps) " "Class IPG (0.1 ns) Flow IPG (us)"); @@ -9695,7 +9631,6 @@ sysctl_hw_sched(SYSCTL_HANDLER_ARGS) } rc = sbuf_finish(sb); done: - mtx_unlock(&sc->reg_lock); sbuf_delete(sb); return (rc); } @@ -9718,16 +9653,13 @@ sysctl_lb_stats(SYSCTL_HANDLER_ARGS) "BG2FramesTrunc:", "BG3FramesTrunc:" }; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); memset(s, 0, sizeof(s)); + rc = 0; for (i = 0; i < sc->chip_params->nchan; i += 2) { mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) @@ -9750,7 +9682,8 @@ sysctl_lb_stats(SYSCTL_HANDLER_ARGS) *p0++, *p1++); } - rc = sbuf_finish(sb); + if (rc == 0) + rc = sbuf_finish(sb); sbuf_delete(sb); return (rc); @@ -9764,9 +9697,6 @@ sysctl_linkdnrc(SYSCTL_HANDLER_ARGS) struct link_config *lc = &pi->link_cfg; struct sbuf *sb; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); sb = sbuf_new_for_sysctl(NULL, NULL, 64, req); if (sb == NULL) return (ENOMEM); @@ -10104,10 +10034,6 @@ sysctl_mps_tcam(SYSCTL_HANDLER_ARGS) MPASS(chip_id(sc) <= CHELSIO_T5); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -10115,6 +10041,7 @@ sysctl_mps_tcam(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "Idx Ethernet address Mask Vld Ports PF" " VF Replication P0 P1 P2 P3 ML"); + rc = 0; for (i = 0; i < sc->chip_params->mps_tcam_size; i++) { uint64_t tcamx, tcamy, mask; uint32_t cls_lo, cls_hi; @@ -10208,10 +10135,6 @@ sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS) MPASS(chip_id(sc) > CHELSIO_T5); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -10221,6 +10144,7 @@ sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS) " Replication" " P0 P1 P2 P3 ML\n"); + rc = 0; for (i = 0; i < sc->chip_params->mps_tcam_size; i++) { uint8_t dip_hit, vlan_vld, lookup_type, port_num; uint16_t ivlan; @@ -10390,10 +10314,7 @@ sysctl_path_mtus(SYSCTL_HANDLER_ARGS) int rc; uint16_t mtus[NMTUS]; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10435,10 +10356,7 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) "Rx FIFO wait", NULL, "Rx latency" }; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10499,10 +10417,7 @@ sysctl_rdma_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_rdma_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10533,10 +10448,7 @@ sysctl_tcp_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_tcp_stats v4, v6; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10576,10 +10488,7 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) uint32_t x, y; struct tid_info *t = &sc->tids; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); if (sb == NULL) return (ENOMEM); @@ -10671,10 +10580,7 @@ sysctl_tp_err_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_err_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -10752,10 +10658,7 @@ sysctl_tnl_stats(SYSCTL_HANDLER_ARGS) int rc; struct tp_tnl_stats stats; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return(rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -11019,10 +10922,7 @@ sysctl_tp_la(SYSCTL_HANDLER_ARGS) u_int i, inc; void (*show_func)(struct sbuf *, uint64_t *, int); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -11070,10 +10970,7 @@ sysctl_tx_rate(SYSCTL_HANDLER_ARGS) int rc; u64 nrate[MAX_NCHAN], orate[MAX_NCHAN]; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -11116,10 +11013,7 @@ sysctl_ulprx_la(SYSCTL_HANDLER_ARGS) uint32_t *buf, *p; int rc, i; - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -11160,10 +11054,7 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) MPASS(chip_id(sc) >= CHELSIO_T5); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - + rc = 0; mtx_lock(&sc->reg_lock); if (hw_off_limits(sc)) rc = ENXIO; @@ -11213,10 +11104,6 @@ sysctl_cpus(SYSCTL_HANDLER_ARGS) if (rc != 0) return (rc); - rc = sysctl_wire_old_buffer(req, 0); - if (rc != 0) - return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); From nobody Wed Jul 3 15:05:29 2024 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 4WDjkx4PjQz5Pl6m; Wed, 03 Jul 2024 15:05:29 +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 4WDjkx2cpkz41WD; Wed, 3 Jul 2024 15:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720019129; 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=imS8MesO261pmg2scljLYg2Tt8E+q8h6pBCmetNDvqs=; b=ny1c96tOSa2le4jMQhoL0WAqv0uNsyeUvWUP4Fihmu24D2Bo7Jc6MTd7+FmFgfGM0LAziw oBTma4hbWPsZJ3Vqsm7TvjQlM14Exs2vXWyy9BcdTkgsjDcK4ULpGR03S3Uyj7A5o4KKWB 0FgQ3b6/OdzXSZiiaHTEokpyDJAsSpQHLEusqC7ALkiQgDYLY4wwIQIyf7DKxqYLHKJVUK HRATn4+gZx5T0YD8vR4CR9ASpHl+CiMWkw1okyMbeWkIrmeXtdjiUSs4AnuQa+1aWUYhsJ DL+nAO15G+tpt0MLVuHHya+1J0+rQu5usjelqQgpIBlmwua3RUjgv4D2ESmGnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720019129; a=rsa-sha256; cv=none; b=wGPswMCNwbleclQciHGk2Y8/6XxjWRYAlRTz1+JnnTdLwt8o9S5s4NRM3f14XV3fMFE7NL 1GDk4N450dom9eW/MzMLgy1oFFHP7gaXEg4igOsWW51IP6MVohOMUkDlmGbad1nmNRwYJo TpTv0cti/8bV3x0zEt0RUaydzIIXLYGSZ4C+J8kxzVgFZgtDqDkZPsaJQUMtJUz80LqAiZ YUqOn81hZ4UbeJWfHPb5okQc7RxlMhMrqREzZLoSny5X78IIArBuldAEm/8ScGz7R8xbTb WNTuQ/zYIhbvHoRQyPbu72SfxKuOJVoms/qGgfQOqjNzMIpktqrQ/oFsSfgX2w== 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=1720019129; 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=imS8MesO261pmg2scljLYg2Tt8E+q8h6pBCmetNDvqs=; b=I9pGZEuROPOifhCqNCVtIeB/9w2S8iCJF3kdtOdmS2CUAOYdzi77Z4l/gcG1f0OaPxvPfK 7As8EeQN+JZNPoFnTSBDNUaTcXHwowXnAfNQ0ZX5UV9WUTBMSol9L4PFP4PC76v82AuKz6 S9U1KDIEPaNW5Fvo4Am7Ajm9EsQB3JjYRCA1bPFZWxyPw84My+AkxlOWu0TZDNjYNTf2gr WtiMr7l6L5jmYxuz7CFPH74sPn/700SgS/UQR6Qm//jRiO0fs7AP1xtRUbsG0zf1OR2kl7 qYjiGjOmrsYxdVZubcULvSp3iM3RI0SWY+CXI1f7X6zwYHevEo3hFbDA+4V5Rw== 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 4WDjkx2D9zzcQT; Wed, 3 Jul 2024 15:05:29 +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 463F5Tp3023547; Wed, 3 Jul 2024 15:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463F5TNC023544; Wed, 3 Jul 2024 15:05:29 GMT (envelope-from git) Date: Wed, 3 Jul 2024 15:05:29 GMT Message-Id: <202407031505.463F5TNC023544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1edf61f395d9 - main - cxgbe: Add a 'show t4 memdump' DDB command 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1edf61f395d98a5abb7d6f38e5e64722b4ddf351 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1edf61f395d98a5abb7d6f38e5e64722b4ddf351 commit 1edf61f395d98a5abb7d6f38e5e64722b4ddf351 Author: John Baldwin AuthorDate: 2024-07-03 15:05:11 +0000 Commit: John Baldwin CommitDate: 2024-07-03 15:05:11 +0000 cxgbe: Add a 'show t4 memdump' DDB command Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45187 --- sys/dev/cxgbe/t4_main.c | 76 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 14799b3eeb18..c142fa93166d 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -12737,30 +12737,26 @@ tweak_tunables(void) #ifdef DDB static void -t4_dump_tcb(struct adapter *sc, int tid) +t4_dump_mem(struct adapter *sc, u_int addr, u_int len) { - uint32_t base, i, j, off, pf, reg, save, tcb_addr, win_pos; + uint32_t base, j, off, pf, reg, save, win_pos; reg = PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2); save = t4_read_reg(sc, reg); base = sc->memwin[2].mw_base; - /* Dump TCB for the tid */ - tcb_addr = t4_read_reg(sc, A_TP_CMM_TCB_BASE); - tcb_addr += tid * TCB_SIZE; - if (is_t4(sc)) { pf = 0; - win_pos = tcb_addr & ~0xf; /* start must be 16B aligned */ + win_pos = addr & ~0xf; /* start must be 16B aligned */ } else { pf = V_PFNUM(sc->pf); - win_pos = tcb_addr & ~0x7f; /* start must be 128B aligned */ + win_pos = addr & ~0x7f; /* start must be 128B aligned */ } + off = addr - win_pos; t4_write_reg(sc, reg, win_pos | pf); t4_read_reg(sc, reg); - off = tcb_addr - win_pos; - for (i = 0; i < 4; i++) { + while (len > 0 && !db_pager_quit) { uint32_t buf[8]; for (j = 0; j < 8; j++, off += 4) buf[j] = htonl(t4_read_reg(sc, base + off)); @@ -12768,12 +12764,27 @@ t4_dump_tcb(struct adapter *sc, int tid) db_printf("%08x %08x %08x %08x %08x %08x %08x %08x\n", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]); + if (len <= sizeof(buf)) + len = 0; + else + len -= sizeof(buf); } t4_write_reg(sc, reg, save); t4_read_reg(sc, reg); } +static void +t4_dump_tcb(struct adapter *sc, int tid) +{ + uint32_t tcb_addr; + + /* Dump TCB for the tid */ + tcb_addr = t4_read_reg(sc, A_TP_CMM_TCB_BASE); + tcb_addr += tid * TCB_SIZE; + t4_dump_mem(sc, tcb_addr, TCB_SIZE); +} + static void t4_dump_devlog(struct adapter *sc) { @@ -12905,6 +12916,51 @@ DB_TABLE_COMMAND_FLAGS(show_t4, tcb, db_show_t4tcb, CS_OWN) t4_dump_tcb(device_get_softc(dev), tid); } + +DB_TABLE_COMMAND_FLAGS(show_t4, memdump, db_show_memdump, CS_OWN) +{ + device_t dev; + int radix, t; + bool valid; + + valid = false; + radix = db_radix; + db_radix = 10; + t = db_read_token(); + if (t == tIDENT) { + dev = device_lookup_by_name(db_tok_string); + t = db_read_token(); + if (t == tNUMBER) { + addr = db_tok_number; + t = db_read_token(); + if (t == tNUMBER) { + count = db_tok_number; + valid = true; + } + } + } + db_radix = radix; + db_skip_to_eol(); + if (!valid) { + db_printf("usage: show t4 memdump \n"); + return; + } + + if (dev == NULL) { + db_printf("device not found\n"); + return; + } + if (addr < 0) { + db_printf("invalid address\n"); + return; + } + if (count <= 0) { + db_printf("invalid length\n"); + return; + } + + t4_dump_mem(device_get_softc(dev), addr, count); +} #endif static eventhandler_tag vxlan_start_evtag; From nobody Wed Jul 3 16:14:56 2024 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 4WDlH446vFz5Pf3R; Wed, 03 Jul 2024 16:14:56 +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 4WDlH43b6zz49qT; Wed, 3 Jul 2024 16:14:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023296; 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=5wbwUOMAYQ9EK7r/yTb+rjSZxDRO2A2iWFp5URZWT50=; b=BEMqGP3bXMGfUAUehZI35RVjFdqIM2iLWSNOnk08gG5MD7XcalmMGV5DNSP9YGZmRKMJ7d 9FBbOPZ/LsVGpHpnLBg4HSAItwf68s9N6j66OhXOUV3UleMpObFACrUBsC7Jl6vwdOxs8+ yf4wAA7yOhQe7hTwi6v96RZ06hyQmuAhrETeUOxbCrw/alrbOhyJcLYq2TlQfTBo+zS3e1 GWqNupA/AQV7BeQLuhuEY//2/Y9UXzdD6y5AJlQ5USqgBxGWjsvRFkExboElAZI2kAl/Ly lxs5oNpIF2qL5QIpMqFycaL7XUn361KEuZ7MivfOT9s0saimvtHi7fIst7K0Ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023296; a=rsa-sha256; cv=none; b=hLb4TiBjEL4jfeG1/YAYxwcMncrAqbZtiD2cPPgZ+7YOtjJjeKAwzY9M6s8K+5qEOumj56 i5jAjFX+WfL+8HugpNUNDmGcz9fpPrupwyLL9QtNRRfdtUzc8OTUU16QIfvGg0egULFiYN PhfBxUkF0MHdTjUdfq0PKSHlygzfY5wdytS0Xj9XPm3zLDO5FljH6GwatHRqD2u3UzcDid 2PT7HgOWYRVAS/O1hZcj0JA4KJ2t9wZ3Cfb0ExL8ZsQufkd7iup9l/LLExHExbW8CCTGP7 HOA2j8uJk8517/duPCNWDMTWlIpqN4LtmNt4FUa5A8IiATUlVMqhDe79si1Y+Q== 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=1720023296; 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=5wbwUOMAYQ9EK7r/yTb+rjSZxDRO2A2iWFp5URZWT50=; b=gEL6LK/6U6Xd72UHAvDLWl/0Fjnqrj4VieGsT1T7VkPiv749QOkjBo8Od8qOw2mKmYQ5lY 6I0Dd1YKJ2g+U9GQHKRYETDqeDsazMyySgjDZoOsgN8MixUEeo5rJPCXFSBUAtBcEnPuN3 SE3AoC9C25NItA16e5mglYCR8tecHIa+UlAgeAtDaz3Div+jMA42ruklSYsD7a/BeQBWv8 T3MeStihEn043fIsS8K+WdUsNRCrYbfS4BkLvXICF8M0zYM0kgHxUmbY5zKOAAa1Qq7U5H o3gd+C5KadC/X12TLBz2qUUr41X9QoSudTc+jaG8HJSNlaQG5R2BGE67sKU1PA== 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 4WDlH42tJ2zdgC; Wed, 3 Jul 2024 16:14:56 +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 463GEum5041517; Wed, 3 Jul 2024 16:14:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GEu1w041514; Wed, 3 Jul 2024 16:14:56 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:14:56 GMT Message-Id: <202407031614.463GEu1w041514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: ab92c99aa56f - main - i386 pcpu: fix clobbers, suppress warnings, and clean up 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab92c99aa56fdec4a06f9af5f30f87ef08fbeb0e Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=ab92c99aa56fdec4a06f9af5f30f87ef08fbeb0e commit ab92c99aa56fdec4a06f9af5f30f87ef08fbeb0e Author: Ryan Libby AuthorDate: 2024-07-03 15:35:31 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:35:31 +0000 i386 pcpu: fix clobbers, suppress warnings, and clean up - Add missing cc clobber to __PCPU_ADD (which is currently unused). - Allow the compiler the opportunity to marginally improve code generation from __PCPU_PTR by letting it figure out how to do the add (also removing the addition fixes a missing cc clobber). - Quiet gcc -Warray-bounds by using constant operands instead of bogus memory references. - Remove the struct __s __s temporaries, just cast through the type. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45826 --- sys/i386/include/pcpu.h | 47 +++++++++++++++++++-------------------------- sys/i386/include/pcpu_aux.h | 8 ++++---- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/sys/i386/include/pcpu.h b/sys/i386/include/pcpu.h index ef3f5cc9dff7..d51763b20798 100644 --- a/sys/i386/include/pcpu.h +++ b/sys/i386/include/pcpu.h @@ -108,16 +108,8 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); /* * Evaluates to the address of the per-cpu variable name. */ -#define __PCPU_PTR(name) __extension__ ({ \ - __pcpu_type(name) *__p; \ - \ - __asm __volatile("movl %%fs:%1,%0; addl %2,%0" \ - : "=r" (__p) \ - : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace))), \ - "i" (__pcpu_offset(name))); \ - \ - __p; \ -}) +#define __PCPU_PTR(name) \ + (&get_pcpu()->name) /* * Evaluates to the value of the per-cpu variable name. @@ -126,14 +118,13 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); __pcpu_type(name) __res; \ struct __s { \ u_char __b[MIN(sizeof(__res), 4)]; \ - } __s; \ + }; \ \ if (sizeof(__res) == 1 || sizeof(__res) == 2 || \ sizeof(__res) == 4) { \ - __asm __volatile("mov %%fs:%1,%0" \ - : "=r" (__s) \ - : "m" (*(struct __s *)(__pcpu_offset(name)))); \ - *(struct __s *)(void *)&__res = __s; \ + __asm __volatile("mov %%fs:%c1,%0" \ + : "=r" (*(struct __s *)(void *)&__res) \ + : "i" (__pcpu_offset(name))); \ } else { \ __res = *__PCPU_PTR(name); \ } \ @@ -148,15 +139,16 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); __pcpu_type(name) __val; \ struct __s { \ u_char __b[MIN(sizeof(__val), 4)]; \ - } __s; \ + }; \ \ __val = (val); \ if (sizeof(__val) == 1 || sizeof(__val) == 2 || \ sizeof(__val) == 4) { \ - __s = *(struct __s *)(void *)&__val; \ - __asm __volatile("add %1,%%fs:%0" \ - : "=m" (*(struct __s *)(__pcpu_offset(name))) \ - : "r" (__s)); \ + __asm __volatile("add %1,%%fs:%c0" \ + : \ + : "i" (__pcpu_offset(name)), \ + "r" (*(struct __s *)(void *)&__val) \ + : "cc", "memory"); \ } else \ *__PCPU_PTR(name) += __val; \ } while (0) @@ -168,15 +160,16 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); __pcpu_type(name) __val; \ struct __s { \ u_char __b[MIN(sizeof(__val), 4)]; \ - } __s; \ + }; \ \ __val = (val); \ if (sizeof(__val) == 1 || sizeof(__val) == 2 || \ sizeof(__val) == 4) { \ - __s = *(struct __s *)(void *)&__val; \ - __asm __volatile("mov %1,%%fs:%0" \ - : "=m" (*(struct __s *)(__pcpu_offset(name))) \ - : "r" (__s)); \ + __asm __volatile("mov %1,%%fs:%c0" \ + : \ + : "i" (__pcpu_offset(name)), \ + "r" (*(struct __s *)(void *)&__val) \ + : "memory"); \ } else { \ *__PCPU_PTR(name) = __val; \ } \ @@ -185,9 +178,9 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); #define get_pcpu() __extension__ ({ \ struct pcpu *__pc; \ \ - __asm __volatile("movl %%fs:%1,%0" \ + __asm __volatile("movl %%fs:%c1,%0" \ : "=r" (__pc) \ - : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \ + : "i" (__pcpu_offset(pc_prvspace))); \ __pc; \ }) diff --git a/sys/i386/include/pcpu_aux.h b/sys/i386/include/pcpu_aux.h index 9d15ee1f3ee3..a38faf9af964 100644 --- a/sys/i386/include/pcpu_aux.h +++ b/sys/i386/include/pcpu_aux.h @@ -49,8 +49,8 @@ __curthread(void) { struct thread *td; - __asm("movl %%fs:%1,%0" : "=r" (td) - : "m" (*(char *)offsetof(struct pcpu, pc_curthread))); + __asm("movl %%fs:%c1,%0" : "=r" (td) + : "i" (offsetof(struct pcpu, pc_curthread))); return (td); } #define curthread (__curthread()) @@ -60,8 +60,8 @@ __curpcb(void) { struct pcb *pcb; - __asm("movl %%fs:%1,%0" : "=r" (pcb) - : "m" (*(char *)offsetof(struct pcpu, pc_curpcb))); + __asm("movl %%fs:%c1,%0" : "=r" (pcb) + : "i" (offsetof(struct pcpu, pc_curpcb))); return (pcb); } #define curpcb (__curpcb()) From nobody Wed Jul 3 16:14:57 2024 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 4WDlH55v8Pz5PfCY; Wed, 03 Jul 2024 16:14:57 +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 4WDlH54FVWz49qW; Wed, 3 Jul 2024 16:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023297; 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=LZ72/iV7Em3FX948d/hO9kGQNbydRPnQTrRUsFFrS7w=; b=cm6JFml4WoNOHaROmV07Xtak8xy+0EPrRywmGbZfUFX5y9NP8b+7SbKQ3283WtAub3zQ6w GQdd3HVDJdPrdK6VdUmugUt0C98mS3tKoI4hv+6PSka8gFoJJH9Utum8YW3Hga1s41oxxD gwmmm4pS5xZmwbj60ST8+jOOeH7/8YP2L0Vo6eQhb08P+TVL3SZm5zoGQFlWmCVKyC1oiE wPsvBpFiaWPu9/i57VoCp3JF4pvRtWHXgmbrvuSSImnCp9mFVGsp7aqRL+PwwCVGIapUnl AiizSJiIMW3y7+oUestnAuOeeWqwWfw7c19StbExTlAwyoIG/49Xv9nRz6mkyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023297; a=rsa-sha256; cv=none; b=rMXdQRjoXG2A+uv+Susy/ytWzOUF+rl399YhPr2BWzkFLte2ZNxD16mR78rX0Otdr/yfkN 4HOZFrfI8ZUxOITY5gZ9WoIorBWFhiEZdWCdsGjzPxMzqJERmM4Lat4lwoO7/mLTsT267U 8k5b2vTHvAg2ziZ03jqcdLNAwzxeEAYkEgcnMhkAa7FcTNTdWuEaH78gj2mfixg/XC/ysX TdyDi4l0t9E8Pk3Wojr3/2up+PGLZdV7obWG3nDoIvg1vpUOt0aqgpKL0ZCPoZ5B0Bur+s qiRMVv0bAeg6QJEq0nF7ijclnJHRaT50n67uoh3t/IXErxM2YVB1NMrlVCX+BQ== 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=1720023297; 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=LZ72/iV7Em3FX948d/hO9kGQNbydRPnQTrRUsFFrS7w=; b=Yhs2iGQ/LIc5SnF4IyfO0a6Fr5nXyzihoWbJDtu7gQ83uP/Njm3X7rMCKGiL1yYGQonMXP n1PwtWe0UnGMt7k835MdEQHjw4GjJ8YFds9Xm/ePNeucEcAJQZ8ccOTU+hJb6taDn36L+5 /VNOh+Zl0qNY+v6d1ClzjDe3lYchndKywkjZ/LzdDnOYhxoRvs/PJhrNFthO+MPtnXoWou 7U5rhT92jJPcycpWIo0fPBgoOzLmt/YDkufPQxYis87RYlhvfFJZjUNIUBXbC3eBLK0Vaq tb80thH7aICNFWGytyQKBXBt9WLzVpw2g++3qiQn365npkoLJAnmBdqSBb8WlA== 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 4WDlH53sG1zf13; Wed, 3 Jul 2024 16:14:57 +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 463GEvj9041572; Wed, 3 Jul 2024 16:14:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GEvIc041569; Wed, 3 Jul 2024 16:14:57 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:14:57 GMT Message-Id: <202407031614.463GEvIc041569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 2730f4291411 - main - amd64 pcpu: fix clobbers, suppress warnings, and clean up 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2730f4291411be0adc1c6ec421f72e146556579c Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=2730f4291411be0adc1c6ec421f72e146556579c commit 2730f4291411be0adc1c6ec421f72e146556579c Author: Ryan Libby AuthorDate: 2024-07-03 15:36:31 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:36:31 +0000 amd64 pcpu: fix clobbers, suppress warnings, and clean up These changes mostly apply to the !__SEG_GS section, which is no longer the normal compilation path. They're made to be consistent with changes to i386. - Add missing cc clobber to __PCPU_ADD (which is currently unused). - Allow the compiler the opportunity to marginally improve code generation from __PCPU_PTR by letting it figure out how to do the add (also removing the addition fixes a missing cc clobber). - Quiet gcc -Warray-bounds by using constant operands instead of bogus memory references. - Remove the struct __s __s temporaries, just cast through the type. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45827 --- sys/amd64/include/pcpu.h | 51 +++++++++++++++++++------------------------- sys/amd64/include/pcpu_aux.h | 4 ++-- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index fb49eb31ef8a..213790d245dc 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -182,16 +182,8 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); /* * Evaluates to the address of the per-cpu variable name. */ -#define __PCPU_PTR(name) __extension__ ({ \ - __pcpu_type(name) *__p; \ - \ - __asm __volatile("movq %%gs:%1,%0; addq %2,%0" \ - : "=r" (__p) \ - : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace))), \ - "i" (__pcpu_offset(name))); \ - \ - __p; \ -}) +#define __PCPU_PTR(name) \ + (&get_pcpu()->name) /* * Evaluates to the value of the per-cpu variable name. @@ -200,14 +192,13 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); __pcpu_type(name) __res; \ struct __s { \ u_char __b[MIN(sizeof(__pcpu_type(name)), 8)]; \ - } __s; \ + }; \ \ if (sizeof(__res) == 1 || sizeof(__res) == 2 || \ sizeof(__res) == 4 || sizeof(__res) == 8) { \ - __asm __volatile("mov %%gs:%1,%0" \ - : "=r" (__s) \ - : "m" (*(struct __s *)(__pcpu_offset(name)))); \ - *(struct __s *)(void *)&__res = __s; \ + __asm __volatile("mov %%gs:%c1,%0" \ + : "=r" (*(struct __s *)(void *)&__res) \ + : "i" (__pcpu_offset(name))); \ } else { \ __res = *__PCPU_PTR(name); \ } \ @@ -222,15 +213,16 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); __pcpu_type(name) __val; \ struct __s { \ u_char __b[MIN(sizeof(__pcpu_type(name)), 8)]; \ - } __s; \ + }; \ \ __val = (val); \ if (sizeof(__val) == 1 || sizeof(__val) == 2 || \ sizeof(__val) == 4 || sizeof(__val) == 8) { \ - __s = *(struct __s *)(void *)&__val; \ - __asm __volatile("add %1,%%gs:%0" \ - : "=m" (*(struct __s *)(__pcpu_offset(name))) \ - : "r" (__s)); \ + __asm __volatile("add %1,%%gs:%c0" \ + : \ + : "i" (__pcpu_offset(name)), \ + "r" (*(struct __s *)(void *)&__val) \ + : "cc", "memory"); \ } else \ *__PCPU_PTR(name) += __val; \ } while (0) @@ -238,30 +230,31 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); /* * Sets the value of the per-cpu variable name to value val. */ -#define __PCPU_SET(name, val) { \ +#define __PCPU_SET(name, val) do { \ __pcpu_type(name) __val; \ struct __s { \ u_char __b[MIN(sizeof(__pcpu_type(name)), 8)]; \ - } __s; \ + }; \ \ __val = (val); \ if (sizeof(__val) == 1 || sizeof(__val) == 2 || \ sizeof(__val) == 4 || sizeof(__val) == 8) { \ - __s = *(struct __s *)(void *)&__val; \ - __asm __volatile("mov %1,%%gs:%0" \ - : "=m" (*(struct __s *)(__pcpu_offset(name))) \ - : "r" (__s)); \ + __asm __volatile("mov %1,%%gs:%c0" \ + : \ + : "i" (__pcpu_offset(name)), \ + "r" (*(struct __s *)(void *)&__val) \ + : "memory"); \ } else { \ *__PCPU_PTR(name) = __val; \ } \ -} +} while (0) #define get_pcpu() __extension__ ({ \ struct pcpu *__pc; \ \ - __asm __volatile("movq %%gs:%1,%0" \ + __asm __volatile("movq %%gs:%c1,%0" \ : "=r" (__pc) \ - : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \ + : "i" (__pcpu_offset(pc_prvspace))); \ __pc; \ }) #endif /* !__SEG_GS */ diff --git a/sys/amd64/include/pcpu_aux.h b/sys/amd64/include/pcpu_aux.h index 9d776274a57d..6e27162e1fb4 100644 --- a/sys/amd64/include/pcpu_aux.h +++ b/sys/amd64/include/pcpu_aux.h @@ -54,8 +54,8 @@ __curthread(void) { struct thread *td; - __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu, - pc_curthread))); + __asm("movq %%gs:%c1,%0" : "=r" (td) + : "i" (offsetof(struct pcpu, pc_curthread))); return (td); } #define curthread (__curthread()) From nobody Wed Jul 3 16:14:58 2024 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 4WDlH72MFMz5PfP5; Wed, 03 Jul 2024 16:14:59 +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 4WDlH6535dz4BGS; Wed, 3 Jul 2024 16:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023298; 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=EzpotoaBDaXX/NiPgngm9aaVDcRt+XOz43zLNA33uVs=; b=mfSuyvZoQ3lRXby4Z589QTj3A0i2NqzTA3LcC/CL9XdD7IRokJ3vuHXjkBmYZqFhu9qCBO 2UsajROz9/Jq3BV8btZg3Q8BW0dJtzKvZr5QW1emYrHM5yh6uAEy1ScmKU6Daym3OiDvVt rSfS0+K6r3xePK6d0qY2x0Um11iSx6DSP3g4uh3/Lt3klkn+MrJhQSUgm5ev4hqwLoxkuZ Ruio5o6efaw+o17XNky1B+eDAfPbvlQbv/0DT5TntnJJVzFFAYsH9aK/2WDv+p6/uEYTmU pOIw9W74GxJqsQqz+rJ3KX5xbU4Y3snCSy2NNqw0wKIXlQpw7GA7RsUUgkS37w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023298; a=rsa-sha256; cv=none; b=IA4tVdfA7g9i4TA4AM88FDCbJjCiRgxy9eiF27XDopuhn7zaHLmeGNrEBhOy7s7noFD7JT Rd4QVt8Q7n0eITJLELJenKl1KD/D+d9CzI2ZqE2/B9SoIKH36WtbqDgYSWMxY628yEQqGN tOTSrWSDTPrccMSwlD/SoYs909ISB6H7xWLdzKBbrmdXuINFvit0ncCTrE145TZNYNPgYA lR7VHuwe/9h/tSrEV30phORkcs6++pihxM/mjR/do5H5QAcfdAzkmNfW+D3TZtC1pl1yFh AsKB9TMO/4MRW8AMHCKz4u70DfPciNFl0CsHY3uEg7qapmxhejTc4jzj1mziCg== 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=1720023298; 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=EzpotoaBDaXX/NiPgngm9aaVDcRt+XOz43zLNA33uVs=; b=pdlYKIF7SsYA8mB43DPhZm07s2xEBhDR5pI2MrDJi2NmvO0Mok/MMNKkYbyCrkpirlJsXM VmcREKCN6Eps6kmmHCh6ABZWGx4m2ba54oSPcVUFTAVvDgGnhuIuT0alYhncCqgRiDLI27 RUteefTYXQiSyL7i2vYyR0m+x79sqw3X0n68sfARBQ9BfxwSO1BDPWa/e3PjQE92vF7a6H TgWDKww+MXkQNnW1pk8TA/nS3IcsE9/TI65sFhHJB4WQ5ILUuj3rnMDUxDcSKty7dyaOGb UZqrYn3wDpRDOcGumACsFprbqCl4dQYsaWGSr67e4UcWS1XV90nD/jO1a9O2aQ== 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 4WDlH64Z6KzfCK; Wed, 3 Jul 2024 16:14:58 +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 463GEwOT041622; Wed, 3 Jul 2024 16:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GEwuc041619; Wed, 3 Jul 2024 16:14:58 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:14:58 GMT Message-Id: <202407031614.463GEwuc041619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 657b1276ad4c - main - libthr _get_curthread amd64: quiet gcc -Warray-bounds 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 657b1276ad4c2d2d92ce9d13b338349c0fa40dc3 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=657b1276ad4c2d2d92ce9d13b338349c0fa40dc3 commit 657b1276ad4c2d2d92ce9d13b338349c0fa40dc3 Author: Ryan Libby AuthorDate: 2024-07-03 15:37:11 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:37:11 +0000 libthr _get_curthread amd64: quiet gcc -Warray-bounds Use a constant input operand instead of a bogus memory reference to tell the compiler about offsetof(struct tcb, tcb_thread) in the fs segment. Otherwise gcc complains if we tell it we are reading memory offset 0x10. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45828 --- lib/libthr/arch/amd64/include/pthread_md.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libthr/arch/amd64/include/pthread_md.h b/lib/libthr/arch/amd64/include/pthread_md.h index f43578a8241a..995f35cb569c 100644 --- a/lib/libthr/arch/amd64/include/pthread_md.h +++ b/lib/libthr/arch/amd64/include/pthread_md.h @@ -47,8 +47,8 @@ _get_curthread(void) { struct pthread *thr; - __asm __volatile("movq %%fs:%1, %0" : "=r" (thr) - : "m" (*(volatile u_long *)offsetof(struct tcb, tcb_thread))); + __asm __volatile("movq %%fs:%c1, %0" : "=r" (thr) + : "i" (offsetof(struct tcb, tcb_thread))); return (thr); } From nobody Wed Jul 3 16:14:59 2024 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 4WDlH81KdZz5PfCd; Wed, 03 Jul 2024 16:15:00 +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 4WDlH76Z7jz4Bfm; Wed, 3 Jul 2024 16:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023299; 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=/ac5Npg96yq5Ga+Qutirabfb1fgs6NuxSGSaSkYazl0=; b=Ryf5XnmwfswmHzN4GPUWDQ2ZmejuhfbF+BkVz9PX0X2pfdlnq1ZgReJOiMheRP5QrtzLBm ceYcATEMiuU09Quu5WhfEHmiGTQYUQoRxxr0rytgn3O0K7ObJ7ASjbaNJiRw/KZ0LI6+pf 5XQCBntu6AN9NGvM9B5GgbGMTUe8GsGBhcFFQp7p91oD5cksYqDES/xuBo2dAeYT+Uxhs/ y0kegXdTpxKKQIsZUNHJ5vaBOwwrjb+F9dziBuwerrhI6Za5fSiVKamK/hXqU1h4V5HeZW tALL9STN4WkuZvu6wPVc4b9AkNWFwFrYBskFbdMKBAdF39Pp7ybGMQyVE16+Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023299; a=rsa-sha256; cv=none; b=RoCOLar3FGVf+gVlASfLvAiBwSTeILBQiAaNq93rLp6tV0RNZy+VozJRDGhUd2UTX8it28 UmkcjPk7ct1v/K27QWwizKfuLJBfrPKihf3oscKqBUBDITSNlWSFvnkJRcoDELh9mqMEd4 kDUJPp+Nqj2yymkrdyTCgijtKmVvohmY0QY5QJpwR56+wsajMdbk0gtxZDtDTP4YUiD9d0 OOmwCF87NSYFWwmef7N0Ns/uxw2aQ5iUFdH+Ycs9ArlkYhWlOVr5M6rUCJY3flZBOKvlZR xQ/D9xVbqQnz5TYDWtuHnvyeOX4eJ1cyZHhyqZS1uSbBH9CSnvoaSNvImLZ7vQ== 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=1720023299; 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=/ac5Npg96yq5Ga+Qutirabfb1fgs6NuxSGSaSkYazl0=; b=sEBALle8pqXPwKDh4UxErrPK2un2srq0xxWhQEvt7FBVuw5dZLpNCJNlAAdDlGSbsPGCY0 OeAqbXeehS3NfxX2V64qFi1lfPwwwYSwOeVSfJcc/ijHuYDKJcZyGgfg9mW0VHStJD9bt4 XmnA1owQ0OOVwy6OL13cRcngo45tLkOIgdyRy4fpDI8ou6uB1ZnwuZDtaF4ffJYnoaUt/m D81MZzIjXlbbb34nhTFzvsy6n5lJmuvoQQAkQeEsl8Xramk3jym38xmh5KzmJbsWWhlJZL kqHPXE0nkWQ3Nw3WgORmO+vIgz1w34/ouX5VQ+v9Q8vKgTZqHL0fBCYdbq/KtQ== 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 4WDlH76BFMzf2v; Wed, 3 Jul 2024 16:14:59 +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 463GExWd041669; Wed, 3 Jul 2024 16:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GExw5041666; Wed, 3 Jul 2024 16:14:59 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:14:59 GMT Message-Id: <202407031614.463GExw5041666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 7b1c770341fe - main - libthr _get_curthread i386: quiet gcc -Warray-bounds 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b1c770341fe96236772ce3d475e14988833a988 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=7b1c770341fe96236772ce3d475e14988833a988 commit 7b1c770341fe96236772ce3d475e14988833a988 Author: Ryan Libby AuthorDate: 2024-07-03 15:37:44 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:37:44 +0000 libthr _get_curthread i386: quiet gcc -Warray-bounds Use a constant input operand instead of a bogus memory reference to tell the compiler about offsetof(struct tcb, tcb_thread) in the gs segment. Otherwise gcc complains if we tell it we are reading memory offset 0x8. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45829 --- lib/libthr/arch/i386/include/pthread_md.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libthr/arch/i386/include/pthread_md.h b/lib/libthr/arch/i386/include/pthread_md.h index 021ce8126909..9008a4f11bdb 100644 --- a/lib/libthr/arch/i386/include/pthread_md.h +++ b/lib/libthr/arch/i386/include/pthread_md.h @@ -47,8 +47,8 @@ _get_curthread(void) { struct pthread *thr; - __asm __volatile("movl %%gs:%1, %0" : "=r" (thr) - : "m" (*(volatile u_int *)offsetof(struct tcb, tcb_thread))); + __asm __volatile("movl %%gs:%c1, %0" : "=r" (thr) + : "i" (offsetof(struct tcb, tcb_thread))); return (thr); } From nobody Wed Jul 3 16:15:00 2024 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 4WDlH92mXRz5PfFv; Wed, 03 Jul 2024 16:15:01 +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 4WDlH90B8jz4BGw; Wed, 3 Jul 2024 16:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023301; 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=/Et3DHQjws9uPG1HuU0NqolB0kL3oNdhxJw6LGXR+co=; b=oJK1SD6hFUMB3XUs70WsNGhVr8YXLT/Z6yqMN5u96bdqvDJKog6KSDDSi4b0aAdTImgoI4 Z7BEWLR4fq9vLjW2fL12rLDh6lrXkZN7EePeoLY4NW6h9gczi69U97zPCrXqZ6ozQHBg/5 2N8Z97AB5IgZZSLXCoDLgXlukSAJ/Tir7Pqr/uVw6bdZJ0Xo5AKwiGzM3+fCfQCDnhY87D JhoGYtLFqM80iCzl70fwW3kr+gqjuxvJojsgN69SoBEfIZZbM7RJd464EYXDpuICFmEwMX PmTT04oBj7sAIEcBMs46cC3NNYpdNTBrLAyD7+Vhva/PEVe8lCFN+l9I55Dvsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023301; a=rsa-sha256; cv=none; b=KCcnxV4m71XOXQt5Jmjz2oKDw+d/VNMSMF+CuQzDc1z7aQ9tCRdqQgBxDVPRa5Y1CDHwC+ WdRe2VNelGBLbZgGKFhtX4fF+bKPCNyC7MNKtiDf79Rf5MMB7Z/g/7XurGYrJRXiz6K6G1 IpMP44RRVd0fPGMmf51PurCku9y0g+RK9LLaU19ISHGKqyBlTuAprnHYzKp56AmAt+giUv WTefB1SkcDH3g+gl6Oa2wLoFiikqcLH5qi+lOS7BZjKddOpm8ErQ3BQRuTdcGtq0WqAG1r taRQjotzOdJtbw3+aLqwRr7KupJ2IerndyxpYQZMjTrg6KXYnCxHBiCwGfqH4g== 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=1720023301; 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=/Et3DHQjws9uPG1HuU0NqolB0kL3oNdhxJw6LGXR+co=; b=yyjFkMZIlomvu2uXETWxdWnRzTN78t8Ewieh/oVYWOhhJWo/Ahi/jRrfTmG0gHOlrSZefj dRcFA2kpQpIjVrs/qncnx+8OcrTOmRcJJPyOcfF3oD6ctgcRhmr1uEiPQXmEI6g88B81d4 ADPBONxp2YD7YSUCRdc53XtcMjEn6rXdGXS398y0x0fkZ5GkXIyVRAul3JnTVv424WTGI/ aDUCF+yixX1Yvow9XNlu2DDl3uqLnlj/lBA2a2oyvNejDbsQ4ZEpOpUee6zUynmPQj+Foa IJotWYQ5tmbuDdreQgVGpvvuyxMv4nn9Fy7dxhZyV7dJH45PBFkPCL+YUHbYQg== 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 4WDlH86rpKzdvq; Wed, 3 Jul 2024 16:15:00 +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 463GF0qN041724; Wed, 3 Jul 2024 16:15:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GF0hW041721; Wed, 3 Jul 2024 16:15:00 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:15:00 GMT Message-Id: <202407031615.463GF0hW041721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 07d359787f0d - main - libthr: avoid gcc -Wcast-function-type 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07d359787f0d7f8e5682a3d1991ef68711fb94d1 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=07d359787f0d7f8e5682a3d1991ef68711fb94d1 commit 07d359787f0d7f8e5682a3d1991ef68711fb94d1 Author: Ryan Libby AuthorDate: 2024-07-03 15:38:32 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:38:32 +0000 libthr: avoid gcc -Wcast-function-type The actual types of pthread_func_t and interpos_func_t are not used. Declare them as the generic void (*)(void) which suppresses warnings. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45830 --- lib/libc/include/libc_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 2b16ce736e3a..4d4779647f50 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -190,7 +190,7 @@ typedef enum { PJT_MAX } pjt_index_t; -typedef int (*pthread_func_t)(void); +typedef void (*pthread_func_t)(void); typedef pthread_func_t pthread_func_entry_t[2]; extern pthread_func_entry_t __thr_jtable[]; @@ -199,7 +199,7 @@ void __set_error_selector(int *(*arg)(void)); int _pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, void *(calloc_cb)(__size_t, __size_t)); -typedef int (*interpos_func_t)(void); +typedef void (*interpos_func_t)(void); interpos_func_t *__libc_interposing_slot(int interposno); extern interpos_func_t __libc_interposing[] __hidden; interpos_func_t *__libsys_interposing_slot(int interposno); From nobody Wed Jul 3 17:34:45 2024 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 4WDn395thLz5Ppyl; Wed, 03 Jul 2024 17:34:45 +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 4WDn395BRbz4Mb2; Wed, 3 Jul 2024 17:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720028085; 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=+fXZtf9f803BUWmVX9Bouv05loH8iD0bi66dwLDqx+o=; b=B/vL48w0Q5qa3L7UqgAsZXBqlsDrexwYbfcMjUtkTM9f1aIzgvmc9WDgSN+FqqQRi6mn6x 7NyBFu3Q9Hhm//yTzXoFaFeaow1Ji5tSbBtTttSYm+ZEOqL6vLRw/nqwlHJ0ZssAfcOhT+ QYm8BnSIDtTxdtcZm+woOMr04eJZv+daLMqSWXsWk+7uqJ2ZR0CMJ2Tp+DSNv4PxqDFqJw n0PsTIC7mbClhf+exqOPTb8uceZ4jduoAoiEji558SRE5eT2ahOuGTH8cvK1qJpg/iD11X 5eSYrlQczXrbcMsQe9k1tBUZRMbq28AAvx0vpjXpyx/Z4NC1RHAd7y+FfLfxsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720028085; a=rsa-sha256; cv=none; b=t7801SKha47NLitB0zAxAOsC9ff2IcgaG+P17FBdQYyOaDRsBvUNyeMOGIqNRwkag4WOO1 zsZ08NPkPNfNIJ3qlbu9+RZ7zsaF62/IAqO8bmwTLgmnMRsOQL67UPIRBHVxMlGs5gh/1d tc9GeEUxFXnN+FD81qnzh5eK75NmgYE31/s/BfdvTF7NMD9i3kEj32DFQ5tPvP5MtLhhIg ahMiCuCNWdpv1+1Rk3iFnDIF26vRY6k5a7CxnOlXAZrvq4CsccifM66rnuNBd2IOzKQgWr V/Yd4tXP9wsAz7kKU1Itwoys82rM9h64S7pt8/9/Wz4brlmftHKhtDjzXDlrxQ== 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=1720028085; 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=+fXZtf9f803BUWmVX9Bouv05loH8iD0bi66dwLDqx+o=; b=Eqb+x3OUYDJ97m0ySV8dibX12/TkZZigCGf3Gh60rbW+pEDVsHuK9ply6/Nj0PBBLINjs/ i33l27E8c2OQtjxh1efv/Awr5MtS6SXL4DtTgMig/TQNPIwYannundrGSnezaWPCA2qZSo bzrBSdWDopamDs3rJQ5TVnMyR2+lDy37wtm0TMcTaivIJkcYpr3QsZh98Fq+VDmqverfG4 n/zNy3m6BN1aIbVEZInXe6Ym++sK2zBviQEmGPvwk94QMCy5+KihwLuykCS+VDnyAWZczH n90qgbeIdNUQKQ1V8kbwJxG3vF88sOwTD7zBLgT73jUNCDS5hoAYrmPMTp+whg== 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 4WDn394gsnzh6X; Wed, 3 Jul 2024 17:34:45 +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 463HYj4d076802; Wed, 3 Jul 2024 17:34:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463HYjV8076799; Wed, 3 Jul 2024 17:34:45 GMT (envelope-from git) Date: Wed, 3 Jul 2024 17:34:45 GMT Message-Id: <202407031734.463HYjV8076799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 25ef056f74e4 - main - ofed: fix rwq buffer allocation 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25ef056f74e40429df6bcbc31d52888b57ff3e2c Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=25ef056f74e40429df6bcbc31d52888b57ff3e2c commit 25ef056f74e40429df6bcbc31d52888b57ff3e2c Author: Ka Ho Ng AuthorDate: 2024-07-03 17:32:06 +0000 Commit: Ka Ho Ng CommitDate: 2024-07-03 17:32:44 +0000 ofed: fix rwq buffer allocation Fixes a wrong rwq->buf_size assignment. The field was assigned 0 upon a successful call to ibv_init_wq. Fixes: a687910fc435 Sponsored by: Juniper Networks, Inc. MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45833 --- contrib/ofed/libmlx5/verbs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/ofed/libmlx5/verbs.c b/contrib/ofed/libmlx5/verbs.c index 766751041050..6c296bb69f6f 100644 --- a/contrib/ofed/libmlx5/verbs.c +++ b/contrib/ofed/libmlx5/verbs.c @@ -2077,6 +2077,10 @@ struct ibv_wq *mlx5_create_wq(struct ibv_context *context, if (!rwq) return NULL; + ret = ibv_init_wq(&rwq->wq); + if (ret < 0) + goto err; + rwq->wq_sig = rwq_sig_enabled(context); if (rwq->wq_sig) cmd.drv.flags = MLX5_RWQ_FLAG_SIGNATURE; @@ -2084,13 +2088,9 @@ struct ibv_wq *mlx5_create_wq(struct ibv_context *context, ret = mlx5_calc_rwq_size(ctx, rwq, attr); if (ret < 0) { errno = -ret; - goto err; + goto err_cleanup_wq; } - ret = ibv_init_wq(&rwq->wq); - if (ret < 0) - goto err; - rwq->buf_size = ret; if (mlx5_alloc_rwq_buf(context, rwq, ret)) goto err_cleanup_wq; From nobody Wed Jul 3 18:26:47 2024 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 4WDpCC1q28z5PwfC; Wed, 03 Jul 2024 18:26:47 +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 4WDpCC1JW4z4SHS; Wed, 3 Jul 2024 18:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720031207; 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=0HpyfAb/Z7cN9FEtT62rOQKfUMPnQq/EqXQoCViCBSo=; b=V7r1jgjjNwaQK3Ueyr4dVye6hGXCgOZWayBafnw18r1DQrGUFgnPwVde4MQytOUTwSbiIe hmL80ronRDSXowT4dhOxNijy5aEJGRfgvENkhSXl7I6Y0IGneRM5Qo4CAhutotgcQiFbs1 SSlDmqWBm4BpDWEQrjdUqY7HxwZpOSrdWxMX+SIM++PYsxG4CzQzhx2UUE+ccVuc+bZtOe xQLATnwuDENDqIwM5CGqOuSDcWk2hv5IOLNAgYXidQlydg6RyFgQE9GxIFwyjqyK+aaHB4 tJUum0IoX1uC9qn6/4dhSiGmkzdWBBQDPre8mO9PqabeDQiS9rdAYdB28lanBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720031207; a=rsa-sha256; cv=none; b=JoXj/y2tPU807Y13Xcpwu1/LweC7+KIUMetV2FgAC6cEMYbHcdDc1KFybAiOVMqrf6Fk36 Fx+8ZWBC7L9x/pA6l5MgBPF+fGr3eDdOeRE+/wTXVaTzvD1GTfjletAcIOSaW9yufvRjy5 tvvnjlYFfBb+bwwtEGqF+QCfR4YF7vwT7l/Dhq0ejXXJbzHFobrncmkTfiItfud0bNlM7e 36lidlkbCM7iemPd5rI5gRQnWJfz7eQFoVJi5BOSbjOJVPICG8CiuHKDTGV07blytWn+oa 0KtYJlE39iJUyY+iIDHSDVPW7qfxLDZTwkrCknxgocIlG57IuctpBA93FT6CBQ== 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=1720031207; 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=0HpyfAb/Z7cN9FEtT62rOQKfUMPnQq/EqXQoCViCBSo=; b=pcpkYyEMiOdskDxksiDDPlT8iH3T/GCcL5fnunQe4uQIXRbmrBE9yOTrUlv+57/2tN2h7O NaE/PSMdydng2ZZMuUWAvzuEJXaeLwOk8aRM/0b7Y0wtsyw2m6YoR+v4eaC+Uv1SInKRFd Rnyb3c830q88HuvpbJhzJScAqY93TKXUPUxO0RQdqs2dGN7gmnFcaToHAW5pL7iHkdaE5Z GfwelDwDf8dlBj8fx60D4DSBKKE+wzxqpVXm3pJyaOkkR3q46Th3E2BFT5FTpNOMBEfafn 2WKqHtA/Fy4JQc0LvlfjTujO75kno9zA3aLarT3CnzMX/U+vwIWOjnJowRpixA== 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 4WDpCC0v2gzj6R; Wed, 3 Jul 2024 18:26:47 +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 463IQl5K061672; Wed, 3 Jul 2024 18:26:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463IQl6g061669; Wed, 3 Jul 2024 18:26:47 GMT (envelope-from git) Date: Wed, 3 Jul 2024 18:26:47 GMT Message-Id: <202407031826.463IQl6g061669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 94416c6939f4 - main - openssh: use '' instead of `' in config.h 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94416c6939f431b29286a71bb2797e749df9645c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=94416c6939f431b29286a71bb2797e749df9645c commit 94416c6939f431b29286a71bb2797e749df9645c Author: Ed Maste AuthorDate: 2024-07-01 14:45:43 +0000 Commit: Ed Maste CommitDate: 2024-07-03 18:22:50 +0000 openssh: use '' instead of `' in config.h Autoconf 2.72 uses '' rather tha `' in comments in config.h, from autoconf commit 64df9b4523fe ("Autoconf now quotes 'like this' instead of `like this'"). Switch quoting style now to minimize diffs on the next OpenSSH update and config.h regen. Reviewed by: gordon, philip Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45840 --- crypto/openssh/config.h | 614 ++++++++++++++++++++++++------------------------ 1 file changed, 307 insertions(+), 307 deletions(-) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 5e7e93992829..6462ff16d8d9 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -196,19 +196,19 @@ /* Define if you have ut_addr_v6 in utmpx.h */ /* #undef HAVE_ADDR_V6_IN_UTMPX */ -/* Define to 1 if you have the `arc4random' function. */ +/* Define to 1 if you have the 'arc4random' function. */ #define HAVE_ARC4RANDOM 1 -/* Define to 1 if you have the `arc4random_buf' function. */ +/* Define to 1 if you have the 'arc4random_buf' function. */ #define HAVE_ARC4RANDOM_BUF 1 -/* Define to 1 if you have the `arc4random_stir' function. */ +/* Define to 1 if you have the 'arc4random_stir' function. */ /* #undef HAVE_ARC4RANDOM_STIR */ -/* Define to 1 if you have the `arc4random_uniform' function. */ +/* Define to 1 if you have the 'arc4random_uniform' function. */ #define HAVE_ARC4RANDOM_UNIFORM 1 -/* Define to 1 if you have the `asprintf' function. */ +/* Define to 1 if you have the 'asprintf' function. */ #define HAVE_ASPRINTF 1 /* OpenBSD's gcc has bounded */ @@ -220,52 +220,52 @@ /* OpenBSD's gcc has sentinel */ /* #undef HAVE_ATTRIBUTE__SENTINEL__ */ -/* Define to 1 if you have the `aug_get_machine' function. */ +/* Define to 1 if you have the 'aug_get_machine' function. */ /* #undef HAVE_AUG_GET_MACHINE */ -/* Define to 1 if you have the `auth_hostok' function. */ +/* Define to 1 if you have the 'auth_hostok' function. */ #define HAVE_AUTH_HOSTOK 1 -/* Define to 1 if you have the `auth_timeok' function. */ +/* Define to 1 if you have the 'auth_timeok' function. */ #define HAVE_AUTH_TIMEOK 1 -/* Define to 1 if you have the `b64_ntop' function. */ +/* Define to 1 if you have the 'b64_ntop' function. */ /* #undef HAVE_B64_NTOP */ -/* Define to 1 if you have the `b64_pton' function. */ +/* Define to 1 if you have the 'b64_pton' function. */ /* #undef HAVE_B64_PTON */ /* Define if you have the basename function. */ #define HAVE_BASENAME 1 -/* Define to 1 if you have the `bcopy' function. */ +/* Define to 1 if you have the 'bcopy' function. */ #define HAVE_BCOPY 1 -/* Define to 1 if you have the `bcrypt_pbkdf' function. */ +/* Define to 1 if you have the 'bcrypt_pbkdf' function. */ /* #undef HAVE_BCRYPT_PBKDF */ -/* Define to 1 if you have the `bindresvport_sa' function. */ +/* Define to 1 if you have the 'bindresvport_sa' function. */ #define HAVE_BINDRESVPORT_SA 1 -/* Define to 1 if you have the `blf_enc' function. */ +/* Define to 1 if you have the 'blf_enc' function. */ /* #undef HAVE_BLF_ENC */ /* Define to 1 if you have the header file. */ /* #undef HAVE_BLF_H */ -/* Define to 1 if you have the `Blowfish_expand0state' function. */ +/* Define to 1 if you have the 'Blowfish_expand0state' function. */ /* #undef HAVE_BLOWFISH_EXPAND0STATE */ -/* Define to 1 if you have the `Blowfish_expandstate' function. */ +/* Define to 1 if you have the 'Blowfish_expandstate' function. */ /* #undef HAVE_BLOWFISH_EXPANDSTATE */ -/* Define to 1 if you have the `Blowfish_initstate' function. */ +/* Define to 1 if you have the 'Blowfish_initstate' function. */ /* #undef HAVE_BLOWFISH_INITSTATE */ -/* Define to 1 if you have the `Blowfish_stream2word' function. */ +/* Define to 1 if you have the 'Blowfish_stream2word' function. */ /* #undef HAVE_BLOWFISH_STREAM2WORD */ -/* Define to 1 if you have the `BN_is_prime_ex' function. */ +/* Define to 1 if you have the 'BN_is_prime_ex' function. */ #define HAVE_BN_IS_PRIME_EX 1 /* Define to 1 if you have the header file. */ @@ -277,7 +277,7 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_BSTRING_H */ -/* Define to 1 if you have the `bzero' function. */ +/* Define to 1 if you have the 'bzero' function. */ #define HAVE_BZERO 1 /* calloc(0, x) returns NULL */ @@ -289,10 +289,10 @@ /* Define to 1 if you have the header file. */ #define HAVE_CAPSICUM_HELPERS_H 1 -/* Define to 1 if you have the `cap_rights_limit' function. */ +/* Define to 1 if you have the 'cap_rights_limit' function. */ #define HAVE_CAP_RIGHTS_LIMIT 1 -/* Define to 1 if you have the `clock' function. */ +/* Define to 1 if you have the 'clock' function. */ #define HAVE_CLOCK 1 /* Have clock_gettime */ @@ -301,10 +301,10 @@ /* define if you have clock_t data type */ #define HAVE_CLOCK_T 1 -/* Define to 1 if you have the `closefrom' function. */ +/* Define to 1 if you have the 'closefrom' function. */ #define HAVE_CLOSEFROM 1 -/* Define to 1 if you have the `close_range' function. */ +/* Define to 1 if you have the 'close_range' function. */ #define HAVE_CLOSE_RANGE 1 /* Define if gai_strerror() returns const char * */ @@ -313,7 +313,7 @@ /* Define if your system uses ancillary data style file descriptor passing */ #define HAVE_CONTROL_IN_MSGHDR 1 -/* Define to 1 if you have the `crypt' function. */ +/* Define to 1 if you have the 'crypt' function. */ #define HAVE_CRYPT 1 /* Define to 1 if you have the header file. */ @@ -328,111 +328,111 @@ /* Define if your libraries define daemon() */ #define HAVE_DAEMON 1 -/* Define to 1 if you have the declaration of `AI_NUMERICSERV', and to 0 if +/* Define to 1 if you have the declaration of 'AI_NUMERICSERV', and to 0 if you don't. */ #define HAVE_DECL_AI_NUMERICSERV 1 -/* Define to 1 if you have the declaration of `authenticate', and to 0 if you +/* Define to 1 if you have the declaration of 'authenticate', and to 0 if you don't. */ /* #undef HAVE_DECL_AUTHENTICATE */ -/* Define to 1 if you have the declaration of `bzero', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'bzero', and to 0 if you don't. */ #define HAVE_DECL_BZERO 1 -/* Define to 1 if you have the declaration of `ftruncate', and to 0 if you +/* Define to 1 if you have the declaration of 'ftruncate', and to 0 if you don't. */ #define HAVE_DECL_FTRUNCATE 1 -/* Define to 1 if you have the declaration of `getentropy', and to 0 if you +/* Define to 1 if you have the declaration of 'getentropy', and to 0 if you don't. */ #define HAVE_DECL_GETENTROPY 1 -/* Define to 1 if you have the declaration of `getpeereid', and to 0 if you +/* Define to 1 if you have the declaration of 'getpeereid', and to 0 if you don't. */ #define HAVE_DECL_GETPEEREID 1 -/* Define to 1 if you have the declaration of `GLOB_NOMATCH', and to 0 if you +/* Define to 1 if you have the declaration of 'GLOB_NOMATCH', and to 0 if you don't. */ #define HAVE_DECL_GLOB_NOMATCH 1 -/* Define to 1 if you have the declaration of `GSS_C_NT_HOSTBASED_SERVICE', +/* Define to 1 if you have the declaration of 'GSS_C_NT_HOSTBASED_SERVICE', and to 0 if you don't. */ /* #undef HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE */ -/* Define to 1 if you have the declaration of `howmany', and to 0 if you +/* Define to 1 if you have the declaration of 'howmany', and to 0 if you don't. */ #define HAVE_DECL_HOWMANY 1 -/* Define to 1 if you have the declaration of `h_errno', and to 0 if you +/* Define to 1 if you have the declaration of 'h_errno', and to 0 if you don't. */ #define HAVE_DECL_H_ERRNO 1 -/* Define to 1 if you have the declaration of `loginfailed', and to 0 if you +/* Define to 1 if you have the declaration of 'loginfailed', and to 0 if you don't. */ /* #undef HAVE_DECL_LOGINFAILED */ -/* Define to 1 if you have the declaration of `loginrestrictions', and to 0 if +/* Define to 1 if you have the declaration of 'loginrestrictions', and to 0 if you don't. */ /* #undef HAVE_DECL_LOGINRESTRICTIONS */ -/* Define to 1 if you have the declaration of `loginsuccess', and to 0 if you +/* Define to 1 if you have the declaration of 'loginsuccess', and to 0 if you don't. */ /* #undef HAVE_DECL_LOGINSUCCESS */ -/* Define to 1 if you have the declaration of `MAXSYMLINKS', and to 0 if you +/* Define to 1 if you have the declaration of 'MAXSYMLINKS', and to 0 if you don't. */ #define HAVE_DECL_MAXSYMLINKS 1 -/* Define to 1 if you have the declaration of `memmem', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'memmem', and to 0 if you don't. */ #define HAVE_DECL_MEMMEM 1 -/* Define to 1 if you have the declaration of `NFDBITS', and to 0 if you +/* Define to 1 if you have the declaration of 'NFDBITS', and to 0 if you don't. */ #define HAVE_DECL_NFDBITS 1 -/* Define to 1 if you have the declaration of `offsetof', and to 0 if you +/* Define to 1 if you have the declaration of 'offsetof', and to 0 if you don't. */ #define HAVE_DECL_OFFSETOF 1 -/* Define to 1 if you have the declaration of `O_NONBLOCK', and to 0 if you +/* Define to 1 if you have the declaration of 'O_NONBLOCK', and to 0 if you don't. */ #define HAVE_DECL_O_NONBLOCK 1 -/* Define to 1 if you have the declaration of `passwdexpired', and to 0 if you +/* Define to 1 if you have the declaration of 'passwdexpired', and to 0 if you don't. */ /* #undef HAVE_DECL_PASSWDEXPIRED */ -/* Define to 1 if you have the declaration of `readv', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'readv', and to 0 if you don't. */ #define HAVE_DECL_READV 1 -/* Define to 1 if you have the declaration of `setauthdb', and to 0 if you +/* Define to 1 if you have the declaration of 'setauthdb', and to 0 if you don't. */ /* #undef HAVE_DECL_SETAUTHDB */ -/* Define to 1 if you have the declaration of `SHUT_RD', and to 0 if you +/* Define to 1 if you have the declaration of 'SHUT_RD', and to 0 if you don't. */ #define HAVE_DECL_SHUT_RD 1 -/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'UINT32_MAX', and to 0 if you don't. */ #define HAVE_DECL_UINT32_MAX 1 -/* Define to 1 if you have the declaration of `writev', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'writev', and to 0 if you don't. */ #define HAVE_DECL_WRITEV 1 -/* Define to 1 if you have the declaration of `_getlong', and to 0 if you +/* Define to 1 if you have the declaration of '_getlong', and to 0 if you don't. */ #define HAVE_DECL__GETLONG 0 -/* Define to 1 if you have the declaration of `_getshort', and to 0 if you +/* Define to 1 if you have the declaration of '_getshort', and to 0 if you don't. */ #define HAVE_DECL__GETSHORT 0 -/* Define to 1 if you have the `DES_crypt' function. */ +/* Define to 1 if you have the 'DES_crypt' function. */ #define HAVE_DES_CRYPT 1 /* Define if you have /dev/ptmx */ @@ -444,40 +444,40 @@ /* Define to 1 if you have the header file. */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dirfd' function. */ +/* Define to 1 if you have the 'dirfd' function. */ #define HAVE_DIRFD 1 -/* Define to 1 if you have the `dirname' function. */ +/* Define to 1 if you have the 'dirname' function. */ #define HAVE_DIRNAME 1 -/* Define to 1 if you have the `dlopen' function. */ +/* Define to 1 if you have the 'dlopen' function. */ #define HAVE_DLOPEN 1 -/* Define to 1 if you have the `DSA_generate_parameters_ex' function. */ +/* Define to 1 if you have the 'DSA_generate_parameters_ex' function. */ #define HAVE_DSA_GENERATE_PARAMETERS_EX 1 -/* Define to 1 if you have the `EC_KEY_METHOD_new' function. */ +/* Define to 1 if you have the 'EC_KEY_METHOD_new' function. */ #define HAVE_EC_KEY_METHOD_NEW 1 /* Define to 1 if you have the header file. */ #define HAVE_ELF_H 1 -/* Define to 1 if you have the `endgrent' function. */ +/* Define to 1 if you have the 'endgrent' function. */ #define HAVE_ENDGRENT 1 /* Define to 1 if you have the header file. */ #define HAVE_ENDIAN_H 1 -/* Define to 1 if you have the `endutent' function. */ +/* Define to 1 if you have the 'endutent' function. */ /* #undef HAVE_ENDUTENT */ -/* Define to 1 if you have the `endutxent' function. */ +/* Define to 1 if you have the 'endutxent' function. */ #define HAVE_ENDUTXENT 1 -/* Define to 1 if you have the `err' function. */ +/* Define to 1 if you have the 'err' function. */ #define HAVE_ERR 1 -/* Define to 1 if you have the `errx' function. */ +/* Define to 1 if you have the 'errx' function. */ #define HAVE_ERRX 1 /* Define to 1 if you have the header file. */ @@ -486,73 +486,73 @@ /* Define if your system has /etc/default/login */ /* #undef HAVE_ETC_DEFAULT_LOGIN */ -/* Define to 1 if you have the `EVP_chacha20' function. */ +/* Define to 1 if you have the 'EVP_chacha20' function. */ #define HAVE_EVP_CHACHA20 1 -/* Define to 1 if you have the `EVP_CIPHER_CTX_get_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_get_iv' function. */ /* #undef HAVE_EVP_CIPHER_CTX_GET_IV */ -/* Define to 1 if you have the `EVP_CIPHER_CTX_get_updated_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_get_updated_iv' function. */ #define HAVE_EVP_CIPHER_CTX_GET_UPDATED_IV 1 -/* Define to 1 if you have the `EVP_CIPHER_CTX_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_iv' function. */ #define HAVE_EVP_CIPHER_CTX_IV 1 -/* Define to 1 if you have the `EVP_CIPHER_CTX_iv_noconst' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_iv_noconst' function. */ #define HAVE_EVP_CIPHER_CTX_IV_NOCONST 1 -/* Define to 1 if you have the `EVP_CIPHER_CTX_set_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_set_iv' function. */ /* #undef HAVE_EVP_CIPHER_CTX_SET_IV */ -/* Define to 1 if you have the `EVP_DigestFinal_ex' function. */ +/* Define to 1 if you have the 'EVP_DigestFinal_ex' function. */ #define HAVE_EVP_DIGESTFINAL_EX 1 -/* Define to 1 if you have the `EVP_DigestInit_ex' function. */ +/* Define to 1 if you have the 'EVP_DigestInit_ex' function. */ #define HAVE_EVP_DIGESTINIT_EX 1 -/* Define to 1 if you have the `EVP_MD_CTX_cleanup' function. */ +/* Define to 1 if you have the 'EVP_MD_CTX_cleanup' function. */ /* #undef HAVE_EVP_MD_CTX_CLEANUP */ -/* Define to 1 if you have the `EVP_MD_CTX_copy_ex' function. */ +/* Define to 1 if you have the 'EVP_MD_CTX_copy_ex' function. */ #define HAVE_EVP_MD_CTX_COPY_EX 1 -/* Define to 1 if you have the `EVP_MD_CTX_init' function. */ +/* Define to 1 if you have the 'EVP_MD_CTX_init' function. */ /* #undef HAVE_EVP_MD_CTX_INIT */ -/* Define to 1 if you have the `EVP_PKEY_get_raw_private_key' function. */ +/* Define to 1 if you have the 'EVP_PKEY_get_raw_private_key' function. */ #define HAVE_EVP_PKEY_GET_RAW_PRIVATE_KEY 1 -/* Define to 1 if you have the `EVP_PKEY_get_raw_public_key' function. */ +/* Define to 1 if you have the 'EVP_PKEY_get_raw_public_key' function. */ #define HAVE_EVP_PKEY_GET_RAW_PUBLIC_KEY 1 -/* Define to 1 if you have the `EVP_sha256' function. */ +/* Define to 1 if you have the 'EVP_sha256' function. */ #define HAVE_EVP_SHA256 1 -/* Define to 1 if you have the `EVP_sha384' function. */ +/* Define to 1 if you have the 'EVP_sha384' function. */ #define HAVE_EVP_SHA384 1 -/* Define to 1 if you have the `EVP_sha512' function. */ +/* Define to 1 if you have the 'EVP_sha512' function. */ #define HAVE_EVP_SHA512 1 /* Define if you have ut_exit in utmp.h */ /* #undef HAVE_EXIT_IN_UTMP */ -/* Define to 1 if you have the `explicit_bzero' function. */ +/* Define to 1 if you have the 'explicit_bzero' function. */ #define HAVE_EXPLICIT_BZERO 1 -/* Define to 1 if you have the `explicit_memset' function. */ +/* Define to 1 if you have the 'explicit_memset' function. */ /* #undef HAVE_EXPLICIT_MEMSET */ -/* Define to 1 if you have the `fchmod' function. */ +/* Define to 1 if you have the 'fchmod' function. */ #define HAVE_FCHMOD 1 -/* Define to 1 if you have the `fchmodat' function. */ +/* Define to 1 if you have the 'fchmodat' function. */ #define HAVE_FCHMODAT 1 -/* Define to 1 if you have the `fchown' function. */ +/* Define to 1 if you have the 'fchown' function. */ #define HAVE_FCHOWN 1 -/* Define to 1 if you have the `fchownat' function. */ +/* Define to 1 if you have the 'fchownat' function. */ #define HAVE_FCHOWNAT 1 /* Use F_CLOSEM fcntl for closefrom */ @@ -561,109 +561,109 @@ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if the system has the type `fd_mask'. */ +/* Define to 1 if the system has the type 'fd_mask'. */ #define HAVE_FD_MASK 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_FEATURES_H */ -/* Define to 1 if you have the `fido_assert_set_clientdata' function. */ +/* Define to 1 if you have the 'fido_assert_set_clientdata' function. */ /* #undef HAVE_FIDO_ASSERT_SET_CLIENTDATA */ -/* Define to 1 if you have the `fido_cred_prot' function. */ +/* Define to 1 if you have the 'fido_cred_prot' function. */ /* #undef HAVE_FIDO_CRED_PROT */ -/* Define to 1 if you have the `fido_cred_set_clientdata' function. */ +/* Define to 1 if you have the 'fido_cred_set_clientdata' function. */ /* #undef HAVE_FIDO_CRED_SET_CLIENTDATA */ -/* Define to 1 if you have the `fido_cred_set_prot' function. */ +/* Define to 1 if you have the 'fido_cred_set_prot' function. */ /* #undef HAVE_FIDO_CRED_SET_PROT */ -/* Define to 1 if you have the `fido_dev_get_touch_begin' function. */ +/* Define to 1 if you have the 'fido_dev_get_touch_begin' function. */ /* #undef HAVE_FIDO_DEV_GET_TOUCH_BEGIN */ -/* Define to 1 if you have the `fido_dev_get_touch_status' function. */ +/* Define to 1 if you have the 'fido_dev_get_touch_status' function. */ /* #undef HAVE_FIDO_DEV_GET_TOUCH_STATUS */ -/* Define to 1 if you have the `fido_dev_is_winhello' function. */ +/* Define to 1 if you have the 'fido_dev_is_winhello' function. */ /* #undef HAVE_FIDO_DEV_IS_WINHELLO */ -/* Define to 1 if you have the `fido_dev_supports_cred_prot' function. */ +/* Define to 1 if you have the 'fido_dev_supports_cred_prot' function. */ /* #undef HAVE_FIDO_DEV_SUPPORTS_CRED_PROT */ /* Define to 1 if you have the header file. */ #define HAVE_FLOATINGPOINT_H 1 -/* Define to 1 if you have the `flock' function. */ +/* Define to 1 if you have the 'flock' function. */ #define HAVE_FLOCK 1 -/* Define to 1 if you have the `fmt_scaled' function. */ +/* Define to 1 if you have the 'fmt_scaled' function. */ /* #undef HAVE_FMT_SCALED */ -/* Define to 1 if you have the `fnmatch' function. */ +/* Define to 1 if you have the 'fnmatch' function. */ #define HAVE_FNMATCH 1 /* Define to 1 if you have the header file. */ #define HAVE_FNMATCH_H 1 -/* Define to 1 if you have the `freeaddrinfo' function. */ +/* Define to 1 if you have the 'freeaddrinfo' function. */ #define HAVE_FREEADDRINFO 1 -/* Define to 1 if you have the `freezero' function. */ +/* Define to 1 if you have the 'freezero' function. */ /* #undef HAVE_FREEZERO */ -/* Define to 1 if the system has the type `fsblkcnt_t'. */ +/* Define to 1 if the system has the type 'fsblkcnt_t'. */ #define HAVE_FSBLKCNT_T 1 -/* Define to 1 if the system has the type `fsfilcnt_t'. */ +/* Define to 1 if the system has the type 'fsfilcnt_t'. */ #define HAVE_FSFILCNT_T 1 -/* Define to 1 if you have the `fstatfs' function. */ +/* Define to 1 if you have the 'fstatfs' function. */ #define HAVE_FSTATFS 1 -/* Define to 1 if you have the `fstatvfs' function. */ +/* Define to 1 if you have the 'fstatvfs' function. */ #define HAVE_FSTATVFS 1 -/* Define to 1 if you have the `futimes' function. */ +/* Define to 1 if you have the 'futimes' function. */ #define HAVE_FUTIMES 1 -/* Define to 1 if you have the `gai_strerror' function. */ +/* Define to 1 if you have the 'gai_strerror' function. */ #define HAVE_GAI_STRERROR 1 -/* Define to 1 if you have the `getaddrinfo' function. */ +/* Define to 1 if you have the 'getaddrinfo' function. */ #define HAVE_GETADDRINFO 1 -/* Define to 1 if you have the `getaudit' function. */ +/* Define to 1 if you have the 'getaudit' function. */ /* #undef HAVE_GETAUDIT */ -/* Define to 1 if you have the `getaudit_addr' function. */ +/* Define to 1 if you have the 'getaudit_addr' function. */ /* #undef HAVE_GETAUDIT_ADDR */ -/* Define to 1 if you have the `getcwd' function. */ +/* Define to 1 if you have the 'getcwd' function. */ #define HAVE_GETCWD 1 -/* Define to 1 if you have the `getentropy' function. */ +/* Define to 1 if you have the 'getentropy' function. */ #define HAVE_GETENTROPY 1 -/* Define to 1 if you have the `getgrouplist' function. */ +/* Define to 1 if you have the 'getgrouplist' function. */ #define HAVE_GETGROUPLIST 1 -/* Define to 1 if you have the `getgrset' function. */ +/* Define to 1 if you have the 'getgrset' function. */ /* #undef HAVE_GETGRSET */ -/* Define to 1 if you have the `getlastlogxbyname' function. */ +/* Define to 1 if you have the 'getlastlogxbyname' function. */ /* #undef HAVE_GETLASTLOGXBYNAME */ -/* Define to 1 if you have the `getline' function. */ +/* Define to 1 if you have the 'getline' function. */ #define HAVE_GETLINE 1 -/* Define to 1 if you have the `getluid' function. */ +/* Define to 1 if you have the 'getluid' function. */ /* #undef HAVE_GETLUID */ -/* Define to 1 if you have the `getnameinfo' function. */ +/* Define to 1 if you have the 'getnameinfo' function. */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the `getopt' function. */ +/* Define to 1 if you have the 'getopt' function. */ #define HAVE_GETOPT 1 /* Define to 1 if you have the header file. */ @@ -675,73 +675,73 @@ /* Define if your libraries define getpagesize() */ #define HAVE_GETPAGESIZE 1 -/* Define to 1 if you have the `getpeereid' function. */ +/* Define to 1 if you have the 'getpeereid' function. */ #define HAVE_GETPEEREID 1 -/* Define to 1 if you have the `getpeerucred' function. */ +/* Define to 1 if you have the 'getpeerucred' function. */ /* #undef HAVE_GETPEERUCRED */ -/* Define to 1 if you have the `getpgid' function. */ +/* Define to 1 if you have the 'getpgid' function. */ #define HAVE_GETPGID 1 -/* Define to 1 if you have the `getpgrp' function. */ +/* Define to 1 if you have the 'getpgrp' function. */ #define HAVE_GETPGRP 1 -/* Define to 1 if you have the `getpwanam' function. */ +/* Define to 1 if you have the 'getpwanam' function. */ /* #undef HAVE_GETPWANAM */ -/* Define to 1 if you have the `getrandom' function. */ +/* Define to 1 if you have the 'getrandom' function. */ #define HAVE_GETRANDOM 1 -/* Define to 1 if you have the `getrlimit' function. */ +/* Define to 1 if you have the 'getrlimit' function. */ #define HAVE_GETRLIMIT 1 /* Define if getrrsetbyname() exists */ /* #undef HAVE_GETRRSETBYNAME */ -/* Define to 1 if you have the `getseuserbyname' function. */ +/* Define to 1 if you have the 'getseuserbyname' function. */ /* #undef HAVE_GETSEUSERBYNAME */ -/* Define to 1 if you have the `getsid' function. */ +/* Define to 1 if you have the 'getsid' function. */ #define HAVE_GETSID 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have the 'gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 -/* Define to 1 if you have the `getttyent' function. */ +/* Define to 1 if you have the 'getttyent' function. */ #define HAVE_GETTTYENT 1 -/* Define to 1 if you have the `getutent' function. */ +/* Define to 1 if you have the 'getutent' function. */ /* #undef HAVE_GETUTENT */ -/* Define to 1 if you have the `getutid' function. */ +/* Define to 1 if you have the 'getutid' function. */ /* #undef HAVE_GETUTID */ -/* Define to 1 if you have the `getutline' function. */ +/* Define to 1 if you have the 'getutline' function. */ /* #undef HAVE_GETUTLINE */ -/* Define to 1 if you have the `getutxent' function. */ +/* Define to 1 if you have the 'getutxent' function. */ #define HAVE_GETUTXENT 1 -/* Define to 1 if you have the `getutxid' function. */ +/* Define to 1 if you have the 'getutxid' function. */ #define HAVE_GETUTXID 1 -/* Define to 1 if you have the `getutxline' function. */ +/* Define to 1 if you have the 'getutxline' function. */ #define HAVE_GETUTXLINE 1 -/* Define to 1 if you have the `getutxuser' function. */ +/* Define to 1 if you have the 'getutxuser' function. */ #define HAVE_GETUTXUSER 1 -/* Define to 1 if you have the `get_default_context_with_level' function. */ +/* Define to 1 if you have the 'get_default_context_with_level' function. */ /* #undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL */ -/* Define to 1 if you have the `glob' function. */ +/* Define to 1 if you have the 'glob' function. */ #define HAVE_GLOB 1 /* Define to 1 if you have the header file. */ #define HAVE_GLOB_H 1 -/* Define to 1 if you have the `group_from_gid' function. */ +/* Define to 1 if you have the 'group_from_gid' function. */ #define HAVE_GROUP_FROM_GID 1 /* Define to 1 if you have the header file. */ @@ -765,7 +765,7 @@ /* Define if HEADER.ad exists in arpa/nameser.h */ #define HAVE_HEADER_AD 1 -/* Define to 1 if you have the `HMAC_CTX_init' function. */ +/* Define to 1 if you have the 'HMAC_CTX_init' function. */ /* #undef HAVE_HMAC_CTX_INIT */ /* Define if you have ut_host in utmp.h */ @@ -789,22 +789,22 @@ /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `inet_aton' function. */ +/* Define to 1 if you have the 'inet_aton' function. */ #define HAVE_INET_ATON 1 -/* Define to 1 if you have the `inet_ntoa' function. */ +/* Define to 1 if you have the 'inet_ntoa' function. */ #define HAVE_INET_NTOA 1 -/* Define to 1 if you have the `inet_ntop' function. */ +/* Define to 1 if you have the 'inet_ntop' function. */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have the `innetgr' function. */ +/* Define to 1 if you have the 'innetgr' function. */ #define HAVE_INNETGR 1 /* define if you have int64_t data type */ #define HAVE_INT64_T 1 -/* Define to 1 if the system has the type `intmax_t'. */ +/* Define to 1 if the system has the type 'intmax_t'. */ #define HAVE_INTMAX_T 1 /* Define to 1 if you have the header file. */ @@ -813,25 +813,25 @@ /* define if you have intxx_t data type */ #define HAVE_INTXX_T 1 -/* Define to 1 if the system has the type `in_addr_t'. */ +/* Define to 1 if the system has the type 'in_addr_t'. */ #define HAVE_IN_ADDR_T 1 -/* Define to 1 if the system has the type `in_port_t'. */ +/* Define to 1 if the system has the type 'in_port_t'. */ #define HAVE_IN_PORT_T 1 /* Define if you have isblank(3C). */ #define HAVE_ISBLANK 1 -/* Define to 1 if you have the `killpg' function. */ +/* Define to 1 if you have the 'killpg' function. */ #define HAVE_KILLPG 1 -/* Define to 1 if you have the `krb5_cc_new_unique' function. */ +/* Define to 1 if you have the 'krb5_cc_new_unique' function. */ /* #undef HAVE_KRB5_CC_NEW_UNIQUE */ -/* Define to 1 if you have the `krb5_free_error_message' function. */ +/* Define to 1 if you have the 'krb5_free_error_message' function. */ /* #undef HAVE_KRB5_FREE_ERROR_MESSAGE */ -/* Define to 1 if you have the `krb5_get_error_message' function. */ +/* Define to 1 if you have the 'krb5_get_error_message' function. */ /* #undef HAVE_KRB5_GET_ERROR_MESSAGE */ /* Define to 1 if you have the header file. */ @@ -846,10 +846,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBAUDIT_H */ -/* Define to 1 if you have the `bsm' library (-lbsm). */ +/* Define to 1 if you have the 'bsm' library (-lbsm). */ /* #undef HAVE_LIBBSM */ -/* Define to 1 if you have the `dl' library (-ldl). */ +/* Define to 1 if you have the 'dl' library (-ldl). */ #define HAVE_LIBDL 1 /* Define to 1 if you have the header file. */ @@ -858,25 +858,25 @@ /* Define if system has libiaf that supports set_id */ /* #undef HAVE_LIBIAF */ -/* Define to 1 if you have the `network' library (-lnetwork). */ +/* Define to 1 if you have the 'network' library (-lnetwork). */ /* #undef HAVE_LIBNETWORK */ -/* Define to 1 if you have the `pam' library (-lpam). */ +/* Define to 1 if you have the 'pam' library (-lpam). */ #define HAVE_LIBPAM 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBPROC_H */ -/* Define to 1 if you have the `socket' library (-lsocket). */ +/* Define to 1 if you have the 'socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ /* Define to 1 if you have the header file. */ #define HAVE_LIBUTIL_H 1 -/* Define to 1 if you have the `xnet' library (-lxnet). */ +/* Define to 1 if you have the 'xnet' library (-lxnet). */ /* #undef HAVE_LIBXNET */ -/* Define to 1 if you have the `z' library (-lz). */ +/* Define to 1 if you have the 'z' library (-lz). */ #define HAVE_LIBZ 1 /* Define to 1 if you have the header file. */ @@ -894,65 +894,65 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_SECCOMP_H */ -/* Define to 1 if you have the `llabs' function. */ +/* Define to 1 if you have the 'llabs' function. */ #define HAVE_LLABS 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 -/* Define to 1 if you have the `localtime_r' function. */ +/* Define to 1 if you have the 'localtime_r' function. */ #define HAVE_LOCALTIME_R 1 -/* Define to 1 if you have the `login' function. */ +/* Define to 1 if you have the 'login' function. */ /* #undef HAVE_LOGIN */ /* Define to 1 if you have the header file. */ #define HAVE_LOGIN_CAP_H 1 -/* Define to 1 if you have the `login_getcapbool' function. */ +/* Define to 1 if you have the 'login_getcapbool' function. */ #define HAVE_LOGIN_GETCAPBOOL 1 -/* Define to 1 if you have the `login_getpwclass' function. */ +/* Define to 1 if you have the 'login_getpwclass' function. */ #define HAVE_LOGIN_GETPWCLASS 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_LOGIN_H */ -/* Define to 1 if you have the `logout' function. */ +/* Define to 1 if you have the 'logout' function. */ /* #undef HAVE_LOGOUT */ -/* Define to 1 if you have the `logwtmp' function. */ +/* Define to 1 if you have the 'logwtmp' function. */ /* #undef HAVE_LOGWTMP */ -/* Define to 1 if the system has the type `long double'. */ +/* Define to 1 if the system has the type 'long double'. */ #define HAVE_LONG_DOUBLE 1 -/* Define to 1 if the system has the type `long long'. */ +/* Define to 1 if the system has the type 'long long'. */ #define HAVE_LONG_LONG 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_MAILLOCK_H */ -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and +/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise. */ #define HAVE_MALLOC 1 -/* Define to 1 if you have the `mblen' function. */ +/* Define to 1 if you have the 'mblen' function. */ #define HAVE_MBLEN 1 -/* Define to 1 if you have the `mbtowc' function. */ +/* Define to 1 if you have the 'mbtowc' function. */ #define HAVE_MBTOWC 1 -/* Define to 1 if you have the `memmem' function. */ +/* Define to 1 if you have the 'memmem' function. */ #define HAVE_MEMMEM 1 -/* Define to 1 if you have the `memmove' function. */ +/* Define to 1 if you have the 'memmove' function. */ #define HAVE_MEMMOVE 1 -/* Define to 1 if you have the `memset_s' function. */ +/* Define to 1 if you have the 'memset_s' function. */ #define HAVE_MEMSET_S 1 -/* Define to 1 if you have the `mkdtemp' function. */ +/* Define to 1 if you have the 'mkdtemp' function. */ #define HAVE_MKDTEMP 1 /* define if you have mode_t data type */ @@ -979,50 +979,50 @@ /* Define if you are on NeXT */ /* #undef HAVE_NEXT */ -/* Define to 1 if the system has the type `nfds_t'. */ +/* Define to 1 if the system has the type 'nfds_t'. */ #define HAVE_NFDS_T 1 -/* Define to 1 if you have the `ngetaddrinfo' function. */ +/* Define to 1 if you have the 'ngetaddrinfo' function. */ /* #undef HAVE_NGETADDRINFO */ -/* Define to 1 if you have the `nl_langinfo' function. */ +/* Define to 1 if you have the 'nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 -/* Define to 1 if you have the `nsleep' function. */ +/* Define to 1 if you have the 'nsleep' function. */ /* #undef HAVE_NSLEEP */ -/* Define to 1 if you have the `ogetaddrinfo' function. */ +/* Define to 1 if you have the 'ogetaddrinfo' function. */ /* #undef HAVE_OGETADDRINFO */ /* Define if you have an old version of PAM which takes only one argument to pam_strerror */ /* #undef HAVE_OLD_PAM */ -/* Define to 1 if you have the `openlog_r' function. */ +/* Define to 1 if you have the 'openlog_r' function. */ /* #undef HAVE_OPENLOG_R */ -/* Define to 1 if you have the `openpty' function. */ +/* Define to 1 if you have the 'openpty' function. */ #define HAVE_OPENPTY 1 /* as a macro */ #define HAVE_OPENSSL_ADD_ALL_ALGORITHMS 1 -/* Define to 1 if you have the `OpenSSL_version' function. */ +/* Define to 1 if you have the 'OpenSSL_version' function. */ #define HAVE_OPENSSL_VERSION 1 -/* Define to 1 if you have the `OpenSSL_version_num' function. */ +/* Define to 1 if you have the 'OpenSSL_version_num' function. */ #define HAVE_OPENSSL_VERSION_NUM 1 /* Define if you have Digital Unix Security Integration Architecture */ /* #undef HAVE_OSF_SIA */ -/* Define to 1 if you have the `pam_getenvlist' function. */ +/* Define to 1 if you have the 'pam_getenvlist' function. */ #define HAVE_PAM_GETENVLIST 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PAM_PAM_APPL_H */ -/* Define to 1 if you have the `pam_putenv' function. */ +/* Define to 1 if you have the 'pam_putenv' function. */ #define HAVE_PAM_PUTENV 1 /* Define to 1 if you have the header file. */ @@ -1034,74 +1034,74 @@ /* define if you have pid_t data type */ #define HAVE_PID_T 1 -/* Define to 1 if you have the `pledge' function. */ +/* Define to 1 if you have the 'pledge' function. */ /* #undef HAVE_PLEDGE */ -/* Define to 1 if you have the `poll' function. */ +/* Define to 1 if you have the 'poll' function. */ #define HAVE_POLL 1 /* Define to 1 if you have the header file. */ #define HAVE_POLL_H 1 -/* Define to 1 if you have the `ppoll' function. */ +/* Define to 1 if you have the 'ppoll' function. */ #define HAVE_PPOLL 1 -/* Define to 1 if you have the `prctl' function. */ +/* Define to 1 if you have the 'prctl' function. */ /* #undef HAVE_PRCTL */ -/* Define to 1 if you have the `priv_basicset' function. */ +/* Define to 1 if you have the 'priv_basicset' function. */ /* #undef HAVE_PRIV_BASICSET */ /* Define to 1 if you have the header file. */ /* #undef HAVE_PRIV_H */ -/* Define to 1 if you have the `procctl' function. */ +/* Define to 1 if you have the 'procctl' function. */ #define HAVE_PROCCTL 1 /* Define if you have /proc/$pid/fd */ /* #undef HAVE_PROC_PID */ -/* Define to 1 if you have the `proc_pidinfo' function. */ +/* Define to 1 if you have the 'proc_pidinfo' function. */ /* #undef HAVE_PROC_PIDINFO */ *** 591 LINES SKIPPED *** From nobody Wed Jul 3 18:56:57 2024 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 4WDpt11n26z5Q0fZ; Wed, 03 Jul 2024 18:56:57 +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 4WDpt11D1yz4Vhm; Wed, 3 Jul 2024 18:56:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720033017; 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=7yHgcOeNjhKFB27cRH71M3UwDQUT6Q9gGk8mNco1rpo=; b=nCXo8gOl0KkLlzKMIyE0ClqeNuJkKcUejwD86ndKaRmRDn9bjttUcvr5otrtxzFd+7GbB3 7OazXody42KZUkkq/MJHfeyBmSzWfHbpOKyUX1TJ/XwdZB8W4+0xOYArFb9sXc05frR8vt fWpEWtFt9C3mkThT9t8Iv4xjs5HaDJ2+qG1yTpyIRwRz4CzJXzjxPz962oPOKfb5MT011d j8+o8SksuPKyI6zIH4doNv2EbSv7e2wu7w1dA6aJpdJrbsNCvUfyj+RfqQfv+OOuDi7Atn Lj4HB0P544UDhpJwSN1I0H1ZSkjK8N9+J0DbD5bcp5lyKqxLCnStpVFa/F4REw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720033017; a=rsa-sha256; cv=none; b=l2sHtfWpPIteH1DhsrlIwAp1oXh5Iwyd9pulOhrj0GSD2Hd1J8ioVz42uDrsmTmt85KyIQ zNwGvLGzGqHIWg4kXc0HW6HTQGJmsdzE88DQD8LZXRqOLfPOHkCSxy3ZFTQYCvw8piElct wH6CnNDqIAn0gpGXf4n4K6rye0FRljBqfiKSycJui7V2X8m0G10gUESK5eBEOWtCPc1sif cAKOLrJbt2lc8t6t8b1+ffP64iKoxmS9hiLWUz75qL91UicHtLwM+LzJP0/483ZcAedVx9 /hR+P8zS9fDHqxfMoyVJUznSFj1ZxwUSnTydAWoBuIs6f3VJKmFBA/WKKePn3Q== 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=1720033017; 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=7yHgcOeNjhKFB27cRH71M3UwDQUT6Q9gGk8mNco1rpo=; b=KDEvsvB+JbmmXC05H5OjHfolbN6K/c1Rw8++1eHaCGe2/XTqMQGLkBbr5Gf98HXhZd3Baq 18J9HnkNsJu1vdS4b3h5eQlQ0D74RrDAf+wBu07nRKUkaZkdiyVGkZmT8UmyVE+R3y/KR2 amEPwVX9KXr2vzQdE3TtoD0Axu44Os0o2uPPCqLetm43xrATXLM7a2KRlmp5ICMH/ztpbi d6J7p1KgQyWJtiMvH2X9zau/Nm3DxjNEmgFKV9YbdXaXKAQrBXiOAEx3hgdb3AP3/yE3gd TOZgISf9Dzx9bWSgFSI6AK5Q5c/X5aMAmnwAxCwo76BWSzb15SHHxH1YuRuhXw== 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 4WDpt10qQWzjc0; Wed, 3 Jul 2024 18:56:57 +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 463Iuv0r011765; Wed, 3 Jul 2024 18:56:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463IuvdS011762; Wed, 3 Jul 2024 18:56:57 GMT (envelope-from git) Date: Wed, 3 Jul 2024 18:56:57 GMT Message-Id: <202407031856.463IuvdS011762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fd31c0946ee2 - main - cdefs.h: Add back comment about branch prediction 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd31c0946ee2240491db1301c2d33eb846221a54 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fd31c0946ee2240491db1301c2d33eb846221a54 commit fd31c0946ee2240491db1301c2d33eb846221a54 Author: Warner Losh AuthorDate: 2024-07-03 18:52:38 +0000 Commit: Warner Losh CommitDate: 2024-07-03 18:56:42 +0000 cdefs.h: Add back comment about branch prediction Add back, with editing, the comments about branch prediction, when to use it, etc. Offer stronger opinions about this in style(9). Add in the convention for FreeBSD that we do only the entire expression in the if expression. Advise use only when it makes things measurably faster. Requested by: jhb Sponsored by: Netflix Reviewed by: brooks, jhb Differential Revision: https://reviews.freebsd.org/D45837 --- share/man/man9/style.9 | 16 ++++++++++++++++ sys/sys/cdefs.h | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 381f3aa3bfa3..daddc57bfb1f 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -897,6 +897,22 @@ New code should use .Fn _Static_assert instead of the older .Fn CTASSERT . +.Pp +.Fn __predict_true +and +.Fn __predict_false +should only be used in frequently executed code when it makes the code +measurably faster. +It is wasteful to make predictions for infrequently run code, like subsystem +initialization. +When using branch prediction hints, atypical error conditions should use +.Fn __predict_false +(document the exceptions). +Operations that almost always succeed use +.Fn __predict_true . +Only use the annotation for the entire if statement, rather than individual clauses. +Do not add these annotations without empirical evidence of the likelihood of the +branch. .Sh FILES .Bl -tag -width indent .It Pa /usr/src/tools/build/checkstyle9.pl diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 7c4890ece8d5..b92992c1b5c3 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -321,6 +321,13 @@ #define __restrict restrict #endif +/* + * All modern compilers have explicit branch prediction so that the CPU back-end + * can hint to the processor and also so that code blocks can be reordered such + * that the predicted path sees a more linear flow, thus improving cache + * behavior, etc. Use sparingly, except in performance critical code where + * they make things measurably faster. + */ #define __predict_true(exp) __builtin_expect((exp), 1) #define __predict_false(exp) __builtin_expect((exp), 0) From nobody Wed Jul 3 19:40:03 2024 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 4WDqql45rNz5Q5lH; Wed, 03 Jul 2024 19:40:03 +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 4WDqql3fvJz4bXL; Wed, 3 Jul 2024 19:40:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720035603; 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=7W7xyxm7GRqm/Xz+VUgs+o+nC6zbqdkXJW2EKquTr3c=; b=re4Q6f9FQXGdxH6hJhMQqt4OE1u2yy4fllRk5xw4n6cRSsmuZEK7p+DG15yq07yl/eAx/8 8wWyB1Jvr/qyF6m604wXtS5mxk8tYWfIqyh7q/n9S5egMfkTEpwwM3tDKNDOh5tNnMFAE7 s7xtvr20xnAs9BKubEDb+EBqfLEVQv/GV8a+wFf3n3Dw5JTEgrpcxIyW2kJocmtdb8sWzS ET9GiOm/+hhxX7VabQ7osRNz0JZYkIwyI8Cxqfb60CezBvfj898ul570xiT3yGytGlnRNj E1e3pExJ70o73AeTABxxjg4T48M2WZBt9b12GFlyD06xi3kGScPo8Mjqibt53w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720035603; a=rsa-sha256; cv=none; b=w+JbZJiexY1q3sbK75cV2ObzDv5lOnGqPAMB/uJYpx4bx5bAphJrTPMCzWvOLvL5LN6coe bHMBoSx8zUrKQeHdLG/v2vG15W+LYGzXgsDkJxcnvL8ZKOIJbJOK5x4dWlbeT5UpVRgoqL DBa0gNjuTIefzVdhIADpKSAr9TT67dNmyvW5MF7b1amQTIxE08UWNnr18ZVM/MwRnhyjH/ CNg1Cd4bDgzAH7TSaBAbURIQUO2hI8iHFnrk+Pg9uxODAFPaMnZrxl4RoGX3C0toYsnOhD 5MiprWRN4ZfB2+u3z6HqR1Y/qxoRWBjCIZKRdRDHz64pHcnfj0t3KDqgmepZQg== 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=1720035603; 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=7W7xyxm7GRqm/Xz+VUgs+o+nC6zbqdkXJW2EKquTr3c=; b=jyMVpKtTQaUFwFIiIJnGWUwKjAFucnshW6JMd94nn+YnvAosXgr1U3K6hULMp0GVWRAsSO DiXZPKARbEwxJoaXKl2as7LADVM0ZnfxTkryfJs85b/1KR47yjWB/sPeR8ZIMWTT6Bo8SB zEFj3SpnAkvsuRxfw/ZmBmlYiwxOHZnctmtK5hFa+XZlGypsNiif5YVtjJ0tGG14LNTH0H d6yTFyIxiiNulYvykY/fG8Y8jwedYKz4sG47kXF3P+ggE7xXsUMoFDNN3WMPP6VGEqUk2V g+8J/IBiMTK5HKpn5Xz1BMjvFSMHM6/CDnrLvAsovm0bdL/+jtCCP51sDm31zw== 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 4WDqql3FthzkJV; Wed, 3 Jul 2024 19:40:03 +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 463Je3v9083002; Wed, 3 Jul 2024 19:40:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463Je3sv082997; Wed, 3 Jul 2024 19:40:03 GMT (envelope-from git) Date: Wed, 3 Jul 2024 19:40:03 GMT Message-Id: <202407031940.463Je3sv082997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 125a2a6b6764 - stable/14 - MFC: linux: Make module standalone-buildable 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 125a2a6b676484964661689f8a62d59d0a49fa14 Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=125a2a6b676484964661689f8a62d59d0a49fa14 commit 125a2a6b676484964661689f8a62d59d0a49fa14 Author: Warner Losh AuthorDate: 2024-05-11 22:35:54 +0000 Commit: Eugene Grosbein CommitDate: 2024-07-03 19:37:57 +0000 MFC: linux: Make module standalone-buildable Add opt_inet.h and opt_usb.h to make linux module buildable standalone. (cherry picked from commit c5f906d32d2bc8e37f1e1911382e27af7e6240ff) --- sys/modules/linux/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index d1035445ccfb..ff960ba28efb 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -34,9 +34,11 @@ SRCS= linux${SFX}_dummy_machdep.c \ linux_uid16.c \ linux_vdso.c \ linux_xattr.c \ + opt_inet.h \ opt_inet6.h \ opt_ktrace.h \ opt_posix.h \ + opt_usb.h \ bus_if.h \ device_if.h \ vnode_if.h From nobody Wed Jul 3 19:43:00 2024 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 4WDqv84YYzz5Q5jl; Wed, 03 Jul 2024 19:43:00 +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 4WDqv83yRpz4bsm; Wed, 3 Jul 2024 19:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720035780; 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=ucic/sULChPO5GS8Lxc54/zStNE9rtc+hkXT4Ow+97g=; b=qa4bFb9wO0MAeCt1HytEnuVS3nj9JbxSAUTWM1WBdAgzy8iRVumYBQTI5kkT5CExeZHE38 UwD9zXa2swPZVN8DklNHS3Pnsk1kXBMmATC0TrLcQeU1L+SNVsksud2a5m7BapAt4DW2mw qgjbKFOXR3FPNI0At1Nthbb9RNq9446Zl6AjVgClcIE7ddNlMpU0ZUggqdVUHNYoyhEown /eT0i9ffIpEWLoGgC0Cv5ISWXh9xPD+aJKqiywfVrPvZd0UClLY9lNbke04ac6Lq8CVdTb WgC5u3dFJ/ao9CsILLioqtKy4PSyZKz7SPJQsna1Ec8++cYDG01XZ5LEWO/pww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720035780; a=rsa-sha256; cv=none; b=tvd850qyReL8d4WZVoTQ5b9Hyv89/G8Au/cKT6B9t1zmupFgdreK6ZCAfkJlyrIeqENWQQ nGHP+x4KtuSgaN+s1u58iaAzqSEYidqRowL5QYX6gDnC/BFbvWxtOFVJe7OmHsj/8MP1Fv DkWp0BAya3Y57b9GSwDzB18JV2NhYWrgxjyp4pFCF2ZLuLbiIZPyI+dyi59pf4SBtCOrFp YYs8r3oL6PWjfTySk+6LCclZt/rgtJN+6x7P3oQzavL34XvfM0FKvb6Ic0oav/+tYjXZr7 Yhq9whvkHbRWwsUTvNn61cAECmDLP8iwmDgAnqzkAnizptbZX/kprMZCeRusOg== 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=1720035780; 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=ucic/sULChPO5GS8Lxc54/zStNE9rtc+hkXT4Ow+97g=; b=uJ/eaUul3pCTqKZzy7hckd2QmBdEYkvBL5jWiVduJZa1tT+t+OmKAKR/2HG85Qna0R2k98 xvq7ZqcpDX2DrnQgXJF/uT7qS2eYuxQ5bervGu1oEv7T8JKfn/WllJ3gSCfUz1tlrs33g+ X/dGZ7cGpjOIwgT8lBL2NVp6NIHDrrJP47gchb3a+93xuo0j4cm5MOkKWx6bhBzPp39Y2l 1uR25EenaJnRLlHSO2Eh4F+1fJ8RCF7j3i5k0EktI69pq7Vh/XpVQQk7HpSmSWKdYLe0sx rvzsYlr4lEgonezO4FB/B70I0D0hEiiapmz8yA0NmkPqMR6JPvhmK5D0fZh9+g== 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 4WDqv83YrqzkfM; Wed, 3 Jul 2024 19:43:00 +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 463Jh0ED096681; Wed, 3 Jul 2024 19:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463Jh0ZW096678; Wed, 3 Jul 2024 19:43:00 GMT (envelope-from git) Date: Wed, 3 Jul 2024 19:43:00 GMT Message-Id: <202407031943.463Jh0ZW096678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: cf2c79915a63 - main - organization.dot: Update core.13 members and secretary 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf2c79915a63463ce6f7323127ade110bbe67db6 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=cf2c79915a63463ce6f7323127ade110bbe67db6 commit cf2c79915a63463ce6f7323127ade110bbe67db6 Author: Li-Wen Hsu AuthorDate: 2024-07-03 19:41:35 +0000 Commit: Li-Wen Hsu CommitDate: 2024-07-03 19:42:29 +0000 organization.dot: Update core.13 members and secretary Approved by: core --- share/misc/organization.dot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/misc/organization.dot b/share/misc/organization.dot index f33ea0f0dbd0..1a88bc71b14e 100644 --- a/share/misc/organization.dot +++ b/share/misc/organization.dot @@ -24,8 +24,8 @@ _misc [label="Miscellaneous Hats"] # Development teams go here alphabetically sorted by FreeBSD login name -core [label="Core Team\ncore@FreeBSD.org\nbapt, bcr, emaste,\ngrog, jhb, lwhsu,\nmanu, tcberner, 0mp"] -coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\ncarlavilla"] +core [label="Core Team\ncore@FreeBSD.org\nallanjude, dch, glebius,\nhrs, lwhsu, mat,\nolivier, tcberner"] +coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\nrene"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\nbcr, gabor, gjb, hrs,\nblackend, ryusuke, wblock"] pkgmgr [label="Package Management Team\npkgmgr@FreeBSD.org\nantoine, bdrewery"] From nobody Wed Jul 3 19:48:18 2024 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 4WDr1H1bX1z5Q6Lv; Wed, 03 Jul 2024 19:48:19 +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 4WDr1H161wz4d0N; Wed, 3 Jul 2024 19:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720036099; 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=vvTz1WDe9XufCWa65dMUGXfwPJP1WKPSXkFmW+LQ0Xk=; b=uqlRmCuTN2LEmOt6dmpzHtwXV9EiZMtMPoTKYnoIoVkucMA5MDIaeEo4XL8DwnxDFM7vPq Le747jqLE+S/FQuokot25Cbols8g7wy+c6QrBYuTBAmfkhHbt+08SevXREOmqbPmpksJI2 ZWo9636MMgKfugcOwHkZzVErl6RzcJT3QUxz0SrMKp5ohTY/1ugsghTcbtaTICu5bKPU7u hDImlyifUwcmrozC4qEqWAgJH3phGt+vNAs3B/NHM8cBbPA3yi/EOTc79jC2Bykzqbv2+4 JkSr3VefU3zidlOVt3LTKJLyErKp1ggVUDql8R7GvarakEDq9TprUmSUu5Tx9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720036099; a=rsa-sha256; cv=none; b=w7djWUOYUvWBSihce335Mn49vb/hGAhEc6dI25jNonntrv/q5t3GXGtjRZYspz/X8ZnL53 zJGou89J/jHaW11zmATagLn8wuvDeaLWvl+1cxa7+cD/EitMfLRb5yApdeRs18UMMY43Fq cJX8t+eimMuOhc7lCWLatBIO8krW6Ia+bQ80CwNMvRljN0fjaOuN/Zzr+ZtS91DiBGqt3I IV2NNxTXxEu/WhfQXmNaalLOCHWMlHG5KrXR5xFgaOk1l31nR7zdxoAKOYzt+NeEZzDXVk F8ZRC1bwEgdBy8bVrtNeApC0q8gPZasjY+Xj+JBRJyBtBn1rxLzizy6ot2LhLg== 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=1720036099; 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=vvTz1WDe9XufCWa65dMUGXfwPJP1WKPSXkFmW+LQ0Xk=; b=dOOwxBeUwU4rNHB+hYzyZrlUroDC1lhQb0ZG3iT4oMyQYLFMW6fiaTOA0zlEvOzxlz7V66 bHJlgKixmNHmzQnGkogMBmdJF60xLTWEv2OwWEEkKLvSLvVRgfVocBHK/ApevGldHqZzrG svUHVXdYsi6l58xxu0ud7gEqIbZnuYIUHiPYO7mE3mJXySWmN8vNe617h6paHbQ5CGOMTR 7yvLknhiYYQrQsjs84k5VOzUK29LpyWDZe9epNavOIwQsbdxehxGCqTgBtjuTOZBp+gm+9 ZnQY3MLimaz3DQAaSm1cui4KmmbNu5R+zuwlUhO7qkvEhlVpisAbaRNgjXRNow== 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 4WDr1H0jxxzkMB; Wed, 3 Jul 2024 19:48:19 +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 463JmJEv097739; Wed, 3 Jul 2024 19:48:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463JmIgM097736; Wed, 3 Jul 2024 19:48:18 GMT (envelope-from git) Date: Wed, 3 Jul 2024 19:48:18 GMT Message-Id: <202407031948.463JmIgM097736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 2e95d0ed3da7 - stable/13 - MFC: linux: Make module standalone-buildable 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2e95d0ed3da70e22dc403d611b589e4de378cb2f Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=2e95d0ed3da70e22dc403d611b589e4de378cb2f commit 2e95d0ed3da70e22dc403d611b589e4de378cb2f Author: Warner Losh AuthorDate: 2024-05-11 22:35:54 +0000 Commit: Eugene Grosbein CommitDate: 2024-07-03 19:47:42 +0000 MFC: linux: Make module standalone-buildable Add opt_inet.h and opt_usb.h to make linux module buildable standalone. (cherry picked from commit c5f906d32d2bc8e37f1e1911382e27af7e6240ff) --- sys/modules/linux/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 738f2907edf8..431db42ba0b0 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -33,9 +33,11 @@ SRCS= linux${SFX}_dummy_machdep.c \ linux_timer.c \ linux_uid16.c \ linux_vdso.c \ + opt_inet.h \ opt_inet6.h \ opt_ktrace.h \ opt_posix.h \ + opt_usb.h \ bus_if.h \ device_if.h \ vnode_if.h From nobody Thu Jul 4 07:15:53 2024 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 4WF7Gf05Mzz5PGGr; Thu, 04 Jul 2024 07:15:54 +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 4WF7Gd6hNXz4mkF; Thu, 4 Jul 2024 07:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720077353; 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=L7sSWvkb+EkYEFzh+av/VQJTqjUXczhUeOIkDyOZPrw=; b=RSwp5rCXngGPttgXjgQUgBt3uyhqaZDFs0StkcZV6vqBN/3OD/oqco/2NC1EygRx6POjZ0 IP6USR9bFANkBlXq4t3lJOsDz57k2oqsTCS6Ac6wRygUwKwdyaLNLLb+d1q/kbhMXKeQ35 efDSiBgxSvQh2GG8uNSqvFw8kmjqyRY69bnRiWyx8dBma+HADo8wiPU4GPApsFCcBBWOsq vqb32F/3i+7zJLZqx+//w1Psz1Ym7IRJy+toF23JbaPRl5MNFo9Gz4r8X9sPTuX/7FAhNp tkLDtOVRDWJ0bFOW8zsKy3NIcSp4AsCKCaQOUEz1TRId12oNnHW3MOwSczmihA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720077353; a=rsa-sha256; cv=none; b=IC9MaRFiDqkjBE+Cs++MDg8qEc44rlEXECglYwgfdXKP0kFNhmh389gTm3Qc6LKLk4D9mf pYNtwMAHXOqr9Dco1Zvm7lj4xrk8BIql8RLBnhKLYmRwefnEaB/DHB964XYcR9Bl7M5tgv SfwmwJ1Ewqv5BiUjnj/x/IhQl7KHRnbp3uYA2twohITMCG5NTeFYkHGRT3QF5GiAYchVqf up/MjuqO8wqV2DaqDtqdh6eTHKNtTL8JDzk+jahfxmuWpYwtcwpLD5BpB9+s1EFo1Rcp5c VvBt8F/UTT4LSQHrKGz46/zkzjh6fmq0P2HKY/zyeTwMXEt4rmzBL2AQe/Syxg== 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=1720077353; 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=L7sSWvkb+EkYEFzh+av/VQJTqjUXczhUeOIkDyOZPrw=; b=cGiUyCWXP56PkMe1luZny5jFTxLa6Mk1LrZkFnJimQn/zmNIqEog7XswthgZtlxTMt7MHu 5fsU7icl5AgRYjaqKhCVC3XMUaS1oudLelRnCzvOTDtGVMWNPhkZ5ozDgbJm7ImzULAEv0 S4D4eC675DjyvcCwpEKU0De3JVFf5HUbmLML14kXWJMChyy4HNGYqWrwyOOTprb5AVAoSs R8j23OqfuqmajsH8jHq8KB2tURfm0DfePlqsBswcEgj8H+NPtYjHDvlbmHmkQ0dXl52abW 2a13egGvSqkjnYwG+hPQS4FaFrwpL8cGPDgz2z2QI/MAsHkiM1IvYn0SZwW4Xw== 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 4WF7Gd6HYVz14gN; Thu, 4 Jul 2024 07:15:53 +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 4647FrdK060102; Thu, 4 Jul 2024 07:15:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4647FrsM060099; Thu, 4 Jul 2024 07:15:53 GMT (envelope-from git) Date: Thu, 4 Jul 2024 07:15:53 GMT Message-Id: <202407040715.4647FrsM060099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: ad99f0062b34 - main - stress2: Added a new unionfs test scenario 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad99f0062b34b7060381a48b89212fc3a3b3fa2e Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=ad99f0062b34b7060381a48b89212fc3a3b3fa2e commit ad99f0062b34b7060381a48b89212fc3a3b3fa2e Author: Peter Holm AuthorDate: 2024-07-04 07:13:39 +0000 Commit: Peter Holm CommitDate: 2024-07-04 07:13:39 +0000 stress2: Added a new unionfs test scenario --- tools/test/stress2/misc/unionfs19.sh | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/tools/test/stress2/misc/unionfs19.sh b/tools/test/stress2/misc/unionfs19.sh new file mode 100755 index 000000000000..a4e31ad0857e --- /dev/null +++ b/tools/test/stress2/misc/unionfs19.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# umount FS with memory mapped file +# "panic: general protection fault" seen: +# https://people.freebsd.org/~pho/stress/log/log0519.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +prog=$(basename "$0" .sh) +here=`pwd` +log=/tmp/$prog.log +md1=$mdstart +md2=$((md1 + 1)) +mp1=/mnt$md1 +mp2=/mnt$md2 + +set -e +mdconfig -l | grep -q md$md && mdconfig -d -u $md1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $md2 + +mdconfig -s 2g -u $md1 +newfs $newfs_flags /dev/md$md1 > /dev/null +mdconfig -s 2g -u $md2 +newfs $newfs_flags /dev/md$md2 > /dev/null + +mkdir -p $mp1 $mp2 +mount /dev/md$md1 $mp1 +mount /dev/md$md2 $mp2 +mount -t unionfs -o noatime $mp1 $mp2 +mount | grep -E "$mp1|$mp2" +set +e + +export RUNDIR=$mp2/stressX +export runRUNTIME=2m +export LOAD=70 +export mmapLOAD=100 +export TESTPROGS="testcases/mmap/mmap testcases/swap/swap" + +(cd ..; ./testcases/run/run $TESTPROGS > /dev/null 2>&1) & rpid=$! +sleep 5 + +tail -F -n 0 /var/log/messages > $log & lpid=$! + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 120 ]; do + umount -f $mp2 && + mount -t unionfs -o noatime $mp1 $mp2 + sleep 5 + mount | grep -q unionfs || break + pgrep -q mmap || break +done +pkill run swap mmap +while pgrep -q swap; do pkill swap; done +wait $rpid + +umount $mp2 # The unionfs mount +umount $mp2 +umount $mp1 + +mdconfig -d -u $md1 +mdconfig -d -u $md2 + +kill $lpid && wait $lpid +grep -m 1 "pager read error" $log && s=1 || s=0 +rm $log +exit $s From nobody Thu Jul 4 07:15:54 2024 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 4WF7Gg13Nvz5PG3M; Thu, 04 Jul 2024 07:15:55 +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 4WF7Gg0bBBz4mh5; Thu, 4 Jul 2024 07:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720077355; 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=Odla4ObwQH3hdceTYhhOg8to464JMPZpeSXJU2V/EGY=; b=WqvPZVPQZsFZW2MydW7bdSckXi4ssbZ0KDhhcenXaMQeJsj85DfVGG6NFhAjofJGGRKtxv oU1bXXdiwZvvj/es3OVYIniGqdQSph/xkR1+BJfuTUZU7vF0exEQlwpGPYExu1M/PqdITL yYkyDc4cQWTRthq41MYgtVeYGMdfddtpq1Heews0kpEs3qH7Lmy7AVul50n4ygMoB5/t3i jUOk3n8OZ8tuOdlWOisAHHf5bL+aMYtkaM2ctf460vRSaTWe7SngjykmIyyOUUTHNIXP/r O9aAVpa9Xuyl9FG5BOWITcHT8gmpjJrz9HqiRWQBsksCHVxjFqGISuBiOAJn0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720077355; a=rsa-sha256; cv=none; b=hmj9wBiGMctPucP49r15s8QWVLOGDBA0vRCBa8beM/X86TIGLfVkS8VMJjfnrci+O1qKYM goE3brSVTgQYBC7ksAVvnXH768DVQK/pH/319vMN3SC5+dFAhXv9BdOOODmlwGUoXDCb/v x3Xv1LzIfLPeK1h1hNvD8xv5FIH7YQ9oAzKXsBforBH0A1Isype87t3QRPooTBMDi7yje+ eFgiyxpqABQbEyuhQAj4FEwkU8cRi6ieVarTruv+67uoCA3WoWL9evvU6X8F2UwZ6xA3p+ gNhGTHtFiOxUp0tppGU/l5V/hmSW1QMndjAZfVEQvsqc1XDrkY2KvDv7NI5Thg== 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=1720077355; 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=Odla4ObwQH3hdceTYhhOg8to464JMPZpeSXJU2V/EGY=; b=cO4J3OdA78yWmWwUa1l9pnmgwA9e7mu/hOUQuQIVAAdb5F4vDK2vMHztpsu39yD5+3oQs6 hyO1YsteBPuaAJGG5/T6Nebu7TB2uQn1Y7Io/FKqhhLTcd/Pqw1h0EH7EqkwuaFivRLfXM LxlmuW8qnGNbD5IVajYMvA1t0TV56Z1zmpwvLcRIHivOhmR6n7YcO58X9t/DErznBN7leF TyDhuvolDegSRAaREpRSANMYlCj85FLr3w5G/CgZAGawzmuXsBCJpeBiZp6L0A4TR4L6Ck JIugEp8jb1/hOuwd5kL8UCimqy+6ro/5GQG+GLupnX6zdVaJQ5V4Zs6a2fbi6w== 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 4WF7Gg0BXSz15BV; Thu, 4 Jul 2024 07:15:55 +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 4647Fsxh060156; Thu, 4 Jul 2024 07:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4647FsTJ060153; Thu, 4 Jul 2024 07:15:54 GMT (envelope-from git) Date: Thu, 4 Jul 2024 07:15:54 GMT Message-Id: <202407040715.4647FsTJ060153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 12be19572aea - main - stress2: Add two test. Fix a typo while here 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12be19572aeac33409c34924ba8f7f051c2ee704 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=12be19572aeac33409c34924ba8f7f051c2ee704 commit 12be19572aeac33409c34924ba8f7f051c2ee704 Author: Peter Holm AuthorDate: 2024-07-04 07:14:45 +0000 Commit: Peter Holm CommitDate: 2024-07-04 07:14:45 +0000 stress2: Add two test. Fix a typo while here --- tools/test/stress2/misc/all.exclude | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index f7b1a9613670..07cff21a1d9a 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -1,4 +1,4 @@ -# List of tests not to run, unless the '-a' option is used with run.sh +# List of tests not to run, unless the '-a' option is used with all.sh # Exclude names must start in column 1 backingstore.sh g_vfs_done():md6a[WRITE(offset=...)]error = 28 20111220 @@ -65,11 +65,13 @@ systrace2.sh WiP 20200227 syzkaller16.sh zonelimit issue 20210722 syzkaller28.sh panic: About to free ctl:0x... so:0x... and its in 1 20201120 syzkaller31.sh panic: Bad tailq NEXT(0xfffffe01a0899430->tqh_last) != NULL 20220420 +syzkaller55.sh https://people.freebsd.org/~pho/stress/log/log0533.txt 20240702 syzkaller59.sh Page fault 20220625 syzkaller65.sh panic: in_pcblookup_hash_locked: invalid local address 20230318 syzkaller66.sh panic: in_pcbconnect: inp is already connected 20230621 syzkaller67.sh panic: ASan: Invalid access, 8-byte read at ... 20230621 truss3.sh WiP 20200915 +unionfs19.sh https://people.freebsd.org/~pho/stress/log/log0519.txt 20240702 # Test not to run for other reasons: From nobody Thu Jul 4 11:32:32 2024 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 4WFDym4MRLz5Pt35; Thu, 04 Jul 2024 11:32:32 +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 4WFDym3NNYz4GmD; Thu, 4 Jul 2024 11:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720092752; 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=dWDm8Jg/hwgJa9btgsT6hEY0gJL8EAfC4eKmypF2p9E=; b=qiXwJP2rDHeQlh6Nh2X3JfSxZrwh1KoaUCeZjt1gFtmFTnrtld4drqI9+XhldiTmP3twS6 YqrsTC14rBKU819rjoh6mM3r0M+QP4Rz4t5RBHQi3l8dMHVKuuVdz56NP29qcTTuYrj61h gw7BJEbg84B9JOlVAXa1FLfnY1dHAxMYXo1o3Jw4YAy/78+SKhhv5A+gPatrXVxod8VmkG znYV7HmALMEmd+7dGciqf9YFYROxGC0YHWnnDVKseRRW3l3+DFbxVY6r8bjXCAiC+ibhWe pqoI2sXJRS3m9hRgujILOax0vTOe0ps81wOkbRIIe2aY7Eg6NvWOy2X5Os8rng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720092752; a=rsa-sha256; cv=none; b=oYe5K9+K6MPzyh8GoUgiR24+UCQ9CxOyY+VJz/oZkLccsQDnxKa8xIHtRN5s71JpZGJ3d+ yF6qERcTZkIpRXkzwfhynZ2NpMoIpVFFJZRco0gUyz8xJhjmMJDnwbL4hbJQuur9Q5XO3N 81IaT4nOddD/d+RcLG2t3l4M+l32m91abxyUx6ehH0yggYWcOjZbmwk0VH5nUiEW0yK0Hu XVZfVzdXjHh7v4082bEQnP218DNIhFTthSMnaW+vPu12MJEtvAz2vI1hposzbhJ5sHvuVu 9Mm/ZpsJj2ywRThx0zHoXnDQUwuM+hTb0lAfKJUh+qJEgdqe0tbqEFlar8BjDA== 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=1720092752; 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=dWDm8Jg/hwgJa9btgsT6hEY0gJL8EAfC4eKmypF2p9E=; b=wPd58cowci1Oqz5BevZ/E9bSHeP/MJ4T6MGDgMqiVr+Tu35mUCe0KEm+SUB8P7etOUIOrx lJDQpwEdvCZuzqdOG2/m+jkggv70JXx/BhnZoLK58aUEKZZjD28HUVNfxhIAlTb13/PYuf fKdIzLGKGtVjxnQ5LLP63fIEmq6bRzak/5CoaSlXY2pmSiEtieQH2YjlYTwkchhpRq75IL IrzpJZeAgcvuF+aB8/aNAQaFZ/9N+fr/X/p9TmUOiU8uDenidkLtN6VspDvhrh0twZyDU2 mgN1tT77vTfyQHg1P2Lv3Aey1Yf7l5cgCymaCxNO4hLKvA5GPSLF7CSbA/ANFg== 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 4WFDym2xcHz1Bqv; Thu, 4 Jul 2024 11:32:32 +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 464BWWhk088257; Thu, 4 Jul 2024 11:32:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464BWW6t088254; Thu, 4 Jul 2024 11:32:32 GMT (envelope-from git) Date: Thu, 4 Jul 2024 11:32:32 GMT Message-Id: <202407041132.464BWW6t088254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a2e65d45a5c6 - main - dhclient: correct struct ifreq allocation 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a2e65d45a5c6def93e1bc8652a6fe686a63fbdb8 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a2e65d45a5c6def93e1bc8652a6fe686a63fbdb8 commit a2e65d45a5c6def93e1bc8652a6fe686a63fbdb8 Author: Brooks Davis AuthorDate: 2024-07-04 11:27:10 +0000 Commit: Brooks Davis CommitDate: 2024-07-04 11:27:10 +0000 dhclient: correct struct ifreq allocation ioctl commands such as BIOCSETIF take a struct ifreq and due to FreeBSD's ioctl implementation copy exactly sizeof(struct ifreq) bytes in so allocate that much space. The over-allocaton was harmless, but useless. Reported by: def Fixes: e2dc8d789f68a dhclient: do not add 0.0.0.0 interface alias. Sponsored by: DARPA, AFRL Reviewed by: def Differential Revision: https://reviews.freebsd.org/D45769 --- sbin/dhclient/dispatch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 310f477f8a4f..3108fe4365d1 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -76,7 +76,6 @@ discover_interfaces(struct interface_info *iface) { struct ifaddrs *ifap, *ifa; struct ifreq *tif; - int len = IFNAMSIZ + sizeof(struct sockaddr_storage); if (getifaddrs(&ifap) != 0) error("getifaddrs failed"); @@ -119,7 +118,7 @@ discover_interfaces(struct interface_info *iface) LLADDR(foo), foo->sdl_alen); } if (!iface->ifp) { - if ((tif = calloc(1, len)) == NULL) + if ((tif = calloc(1, sizeof(struct ifreq))) == NULL) error("no space to remember ifp"); strlcpy(tif->ifr_name, ifa->ifa_name, IFNAMSIZ); iface->ifp = tif; From nobody Thu Jul 4 12:55:44 2024 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 4WFGpm3kRLz5Q4R2; Thu, 04 Jul 2024 12:55:44 +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 4WFGpm2xcZz4PlH; Thu, 4 Jul 2024 12:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720097744; 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=T8Hix2PMWhsQkcAWZTzz/ZlaSkjZNsnhqFzpO9Z46rI=; b=KAfrnw8xVlxzDr7LgaujzZk8S087MiBeUalpGoHfdde0jITxTvLNPe3+m2av9KqRpobL8S 0j4kQP5sS6ycZnwhp5vv8Bf/WTBFVuPuNAakuW2jWA/sa3MwtDz/1y2r2o6hL9AK1e+FlJ KI1xAAx4VO81ew8U0dGbIunNs/v2Fng2g9/1501ObUBStOk6yg1KIkXOi7HZqGVTy1lKF0 g+0ZcdBrDcdeE4dP7J0xmbGG/1+e079qRVb/YNn3WUMJeJz2HHOJz/8yx44/2R0p+Jt5nz D5HBe4H3ZTGoEm3GLzr3KHo9p7z8g+Fxmki1Suo8pxJs2LnYrRxsNXr5QfHQ5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720097744; a=rsa-sha256; cv=none; b=QHin1hDQinYaEOBQIT48Lc9u8gJA0mcdcHe40MVqzR0XY4o1hSqjgUeslaEvRnHw3yKnP9 qWco9oHOYhfCbOmdS2CfJZ42H1iOsNzs9I1mO9z+ShWIqesxsQp33tzpEOu3jSfJp8ne74 dOvWTNDY0HgLk8/TVPpAsji3A7DoA6ck9zPLJZqLx7lzm6cDjzOneYzXxAPD1wax4dtRvC AhzI2aEHPOu4q4F0hrIlo93/TankFCP5jeYcNrmEb63qCOEI6XIJsGTQ8Bt8eA+fDeEWXx sBuXf6SuVQPvTiFF7JoJIk1rMkfrBFHid5pltMvyyXu2yFr0n3xx2xpAHIbOjw== 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=1720097744; 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=T8Hix2PMWhsQkcAWZTzz/ZlaSkjZNsnhqFzpO9Z46rI=; b=C6lHcnyjZFNEJ6Uq+ZLmZ7LubfWwJ6GmnZ+W5wmAbVs6FQVBS7wSTgqf9s4rcUoF9DDCQE b9EQnXQMMJoo0nqQGGF5sYU6FsA+sRzifyj0rqc8XgmjlIveLwneJy1EZMKGxuOMdGhwez r+7juC7II67Vl4PF5BdWH5BQik3RZoy/vS9iOVxO8eKlXeWd4NBjYMgxoaaPlHkqs+qBBM PI2prIwQsZe0ROibHJceY+pxBCg+v0Bk6jUjI0ccano7vRm6ulaVYh5VkKtAHEx6AY+bWg Tal8qLvtPE/ZZWhnURDTIeMBybleWWNJQR5by/GH7ib0s7dT1KruDvesQHxoZw== 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 4WFGpm2QL0zF0v; Thu, 4 Jul 2024 12:55:44 +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 464CtiGl025289; Thu, 4 Jul 2024 12:55:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464CtifA025286; Thu, 4 Jul 2024 12:55:44 GMT (envelope-from git) Date: Thu, 4 Jul 2024 12:55:44 GMT Message-Id: <202407041255.464CtifA025286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1980b3dfa1f1 - stable/12 - openssh: Fix pre-authentication remote code execution in sshd. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1980b3dfa1f15920ebd268f51813eacd87432f27 Auto-Submitted: auto-generated The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1980b3dfa1f15920ebd268f51813eacd87432f27 commit 1980b3dfa1f15920ebd268f51813eacd87432f27 Author: Philip Paeps AuthorDate: 2024-07-01 08:20:01 +0000 Commit: Ed Maste CommitDate: 2024-07-01 13:25:49 +0000 openssh: Fix pre-authentication remote code execution in sshd. Reported by: Qualys Threat Research Unit (TRU) Approved by: so Security: FreeBSD-SA-24:04.openssh Security: CVE-2024-6387 (cherry picked from commit 2abea9df01655633aabbb9bf3204c90722001202) (cherry picked from commit 25cf430cd551158135ef6f0c1aadf273ff3430c9) --- crypto/openssh/log.c | 2 ++ crypto/openssh/version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 99bf046a792a..55e112f839e0 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -451,12 +451,14 @@ void sshsigdie(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { +#if 0 va_list args; va_start(args, fmt); sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, suffix, fmt, args); va_end(args); +#endif _exit(1); } diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 3f7069aba20f..46d984ece1c0 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -6,4 +6,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20230719" +#define SSH_VERSION_FREEBSD "FreeBSD-20240701" From nobody Thu Jul 4 13:32:24 2024 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 4WFHd50pxTz5Q8Vy; Thu, 04 Jul 2024 13:32:25 +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 4WFHd50MCYz4TWf; Thu, 4 Jul 2024 13:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720099945; 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=kq4eHgXZYc6EcdgbGa31acKnIvKOwSWq0U4IQuMQ30M=; b=JAp9eItL0HVMWO7UX8+jmeQTTAJN2Bkd3S2qfiotMzxmnJJeokLqliMy0H2peWZbwHlVkZ dNFS66lx6gJFNgX+wuiO8ZMowWSp4EcyIiWxlDrYjGY0VXc2QbMarAbJifgp/fBvDNXvt4 HjGO6oiwVyhnRBiA5o0nhnyAPuTkq7qMM9pJnqtC3SkhYdbBudOypLpRNGRpzPcJtf2oJK /paOKVkUCnH5B7xJl4cRb/9yxEnSST+/5luLi9gW6HHwM89Wv/AFn5A3KAKn8bgzI3D/vL JRF+c/u4TDohKUGQVAyiOFAg43WNal49gp4Ozr78K6lc3XQk2KHGjka2ZyWuHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720099945; a=rsa-sha256; cv=none; b=AqoWj11yceUmqq0N33krMibzmYpUKqmMbqFd9dnSbGyHNdzJBjFE3Fh147JtXVCZNjzeHY O1RnknV/fNpeEvzcFKOK6mav6Bb5PPJX1q3b2E3kb/PzoDeuD8SzAMGQwd8634VeMq6F0U xw5kmQ9tIYOBC4lUH6v/ftMLe+uSbI4EqGBAYpyL1jlxfU7vCcr7XynmClAwa2fdp60rNL 7kGwq/56tKinn0+W3vX+bf+26RW583lFDXJasVKsrqmUoDjLtH35PuPy8FJJV07e42k8kx VjIzfSN8Y+HDYEjRI/OgJF/Jbd/lm7893SMw5Jg3GfII8x954td/MFsvLpoRlg== 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=1720099945; 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=kq4eHgXZYc6EcdgbGa31acKnIvKOwSWq0U4IQuMQ30M=; b=OnfhwwWfIt92pjeMH2hI61LpLNJBC/m7YB37RGwDp2udDMnWsmXZK/TTg7NlM9BsCbBzV3 riqTdhhoJ951fb6DhyrSN97FmRUHTBYQVUIlTy6OftENN4Nq9iTdpVqJChus8gpt22VOr2 bWD27FrQdrId215ISfAI9+sMclicrU7W3lsHwV1jAWrN4y56vr2JDA6pt3oqbn5ICGwqtP /uzcvi+lD+bnQ7gqo2r6b8T77A5lM42kPHj3lWP8f8QnxELsZs5+wB0IqsxaLDCKAYkcpD FNjrqGr1FYWSx6fK5KASYSkLSOGZNR+CUYFecciQxN1BOS3z3ULKm53fMj15rQ== 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 4WFHd474j9zFMd; Thu, 4 Jul 2024 13:32:24 +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 464DWOLb092716; Thu, 4 Jul 2024 13:32:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464DWOeO092713; Thu, 4 Jul 2024 13:32:24 GMT (envelope-from git) Date: Thu, 4 Jul 2024 13:32:24 GMT Message-Id: <202407041332.464DWOeO092713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 08b083932c6f - stable/14 - wpa_cli.8: describe better + tag spdx + linter nit 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 08b083932c6f4193ba108739fea1d2ce0619f10e Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=08b083932c6f4193ba108739fea1d2ce0619f10e commit 08b083932c6f4193ba108739fea1d2ce0619f10e Author: Alexander Ziaee AuthorDate: 2024-06-18 05:00:05 +0000 Commit: Mitchell Horne CommitDate: 2024-07-04 13:31:53 +0000 wpa_cli.8: describe better + tag spdx + linter nit "how do I switch active wifi network on console" "% apropos wifi" MFC after: 3 days Reviewed by: mhorne, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1299 (cherry picked from commit 18a27dd64129f4b11ba458065bb5bb883f6b4c6e) --- usr.sbin/wpa/wpa_cli/wpa_cli.8 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/wpa/wpa_cli/wpa_cli.8 b/usr.sbin/wpa/wpa_cli/wpa_cli.8 index c484434f0b0c..4fdd892da193 100644 --- a/usr.sbin/wpa/wpa_cli/wpa_cli.8 +++ b/usr.sbin/wpa/wpa_cli/wpa_cli.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2005 Sam Leffler .\" All rights reserved. .\" @@ -22,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 24, 2017 +.Dd June 21, 2024 .Dt WPA_CLI 8 .Os .Sh NAME .Nm wpa_cli -.Nd "text-based frontend program for interacting with wpa_supplicant" +.Nd console utility for WiFi authentication with wpa_supplicant .Sh SYNOPSIS .Nm wpa_cli .Op Fl p Ar path_to_ctrl_sockets @@ -118,7 +121,7 @@ The .Nm utility shows these requests with a -.Dq Li CTRL-REQ- Ns Ao Ar type Ac Ns Li - Ns Ao Ar id Ac Ns : Ns Aq Ar text +.Dq Li CTRL-REQ- Ns Ao Ar type Ac Ns Li - Ns Ao Ar id Ac : Ns Aq Ar text prefix, where .Aq Ar type is From nobody Thu Jul 4 13:32:25 2024 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 4WFHd61SZhz5Q8GW; Thu, 04 Jul 2024 13:32:26 +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 4WFHd60xfpz4Tc1; Thu, 4 Jul 2024 13:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720099946; 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=e886kEQ8zDAvNON+vZZ6dqEc7MmM458v37s5KeR8REY=; b=u02Ui96nxc1Poa5iny+FGnd2DdSigmWyIbyIW0gMFgaUypRdU+A/NCUUQDHSOPogrWq4Mm V/ntrbnVmjgsMy8y95KPcCMcYEjS8xJpiXDP1QeXx/pBjbfn2k1c6UJ67OHjijLQCtkhYz kevXyYQpb0rL/gF97rVPztDPX3c4zTkozytPbF4Yy5HzBSdWRyBs/VASwM6NGwd8PTgarf BJTBZ1cYy0vI8t1QGcDPDcZHKyGqWUTFMZ2lPHkS0Ksgl8ChlKkNQqso05npD3KAF5T8NM PvaE09BZbrmx4UyMvgjk5DxmJN4pFjnmijTq4as9V8k4Ez8/ELzhq/t1Ho6Q7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720099946; a=rsa-sha256; cv=none; b=A0vbfcXEYHQBSrtc8nvS37F8BAtiDKRoYDwhd1N0wK8Ag66LJQIvuwsCva4KbC8l10JmKA mYNdXjWnktRJKTbaNIAULU45Qg5bRNkTziWHrNrBB9IzLFRWDGOl2tt5di2G68y45DRr86 vGpVK3d0OS+Quda7iSI29hoCukQZ/ngFfAiBBkcXfATft7dA9Cf2Z3NHv5Kx+7PTHcx1KF 8B8Qy8Qk14p2RKo/O/4EJuZ06y3X5FBYSYNTRltkQnSJlsJlPFHW6iHgF7LgO3Uz/CNpNV UMHb09oe64pM/cVBRkQnn1m1ykOMJD5fm1zCvqvP1H2I5YcU9GDDfn8vjX5PBQ== 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=1720099946; 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=e886kEQ8zDAvNON+vZZ6dqEc7MmM458v37s5KeR8REY=; b=jKzl5x2br+DVjc1BoQIOLGwgxPXwwtdM6XtYX7euALEgoVeYlKsjHfV3UCDKY3yHpz2L7G 3P+2c13GspGM4O5pcI0JKSOhaoQWUDP1Yqkmkhf0zIxhADboDBcqmgCb2/W9fw9rLHTSzM 1gFbzDWgNCJPExOk3BNjdIzJgVRfnypmioXDp/H8ebHYmd4w/3KVuvKTFdm+x3m8+4CI8T 3/VUbH+RutYZ1RD7JIVgguDk5I2RnDFesITPZvQo4sfvzchwTxwITOftjf9HSv5tT93Tic GRpxmwt6SFzpfwLgzIh7nfM2KIZpd693DhC9/RHtXuv+I3MsQ/vBd96Ksf/Bgw== 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 4WFHd60Y4lzGLv; Thu, 4 Jul 2024 13:32:26 +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 464DWPsL092770; Thu, 4 Jul 2024 13:32:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464DWPWH092767; Thu, 4 Jul 2024 13:32:25 GMT (envelope-from git) Date: Thu, 4 Jul 2024 13:32:25 GMT Message-Id: <202407041332.464DWPWH092767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 8daa60945080 - stable/14 - if_genet: don't load DMA mapping when tx_queue is full 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8daa60945080c602f2a65ed2a0f2333c15bd947e Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8daa60945080c602f2a65ed2a0f2333c15bd947e commit 8daa60945080c602f2a65ed2a0f2333c15bd947e Author: Mitchell Horne AuthorDate: 2024-06-27 17:26:54 +0000 Commit: Mitchell Horne CommitDate: 2024-07-04 13:31:54 +0000 if_genet: don't load DMA mapping when tx_queue is full gen_encap() always calls bus_dmamap_load_mbuf_sg() into 'map' (which is the current tx_queue). If the tx_queue is full, it will load with a 'map' that already has a currently active mapping. This violates the busdma(9) KPI. Checking for a full queue and returning ENOBUFS will allow gen_start_locked() to set the IFF_DRV_OACTIVE faster without having to needlessly check if the mbuf will fit (it won't). PR: 256482 Reviewed by: mhorne MFC after: 1 week Submitted by: ghuckriede@blackberry.com (cherry picked from commit a35f66510917f5ac21c11e9642174cda7718fbc6) --- sys/arm64/broadcom/genet/if_genet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/arm64/broadcom/genet/if_genet.c b/sys/arm64/broadcom/genet/if_genet.c index 40fc096208c6..8fb46a7552f1 100644 --- a/sys/arm64/broadcom/genet/if_genet.c +++ b/sys/arm64/broadcom/genet/if_genet.c @@ -1070,6 +1070,10 @@ gen_encap(struct gen_softc *sc, struct mbuf **mp) GEN_ASSERT_LOCKED(sc); q = &sc->tx_queue[DEF_TXQUEUE]; + if (q->queued == q->nentries) { + /* tx_queue is full */ + return (ENOBUFS); + } m = *mp; From nobody Thu Jul 4 14:27:42 2024 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 4WFJrt3wfBz5QGZT; Thu, 04 Jul 2024 14:27:42 +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 4WFJrt3RP6z4bJt; Thu, 4 Jul 2024 14:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720103262; 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=BrC7MEE+zOK/XofsS0tD6UP+3gzqe+PQj31rpiGtFco=; b=e9EJxMv7JjMirzOFkT0KjB9+lab7kE3JoX0NaUILjFjPzhasWJv1FyQ6zqzbwgI3VtQ8by QoZHoP3PyBkboxTnY0CNSChW2S86qmRvoiZ6+F1cqwTaLaDEwE7KF4yMlE1Q5F6a3lJS+w 9/6M1fwjLVN6Gj0MhBo8ZNhdg8mXQR06lBKyhX3SzdVLW/bgYei0hQmnqZkvD3P4Qat/0o gPlkwLxtuSl89xFKDN/xGthCRpg7BDAI5yFt8KmE1SOVGRIRFNd+7U/dOUKkA37d2sudUx SUCaqPiikmypDgOSrx58Psv+fTxawMNucwwxcxDga8ck9bW0cZ7cZO27aEvzVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720103262; a=rsa-sha256; cv=none; b=VmQdcuKSNTeVgC4JSvbLdLwuSikFPb+zzBMqQciE4bX88h1tw2sul1F21wXvbYPZthprPL XnMfNuKwpkbMs5aKMqeuG2ubUHUTY0PGLwiwcw8B9yorScpGoOPedsApDulV0SBelVbsjh dACwLeZ5ZWHePIIVtj5emk24lUu4Z4pf4ELwNiYihKlIAfjx67LAXjfet8DvprqiqPqhUO OMbBLHhaDrCb2monbvJIA+z1Tl90+s2vRyLX87YH89zbvt9a18o2VTzS/7hInw9gexpq7Q Nw8DK6UgM+EDEMSjonX1M4E1pu0RQB7Ws/JyeJVTZ7eSd1ap18tLyAR8JwBMgg== 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=1720103262; 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=BrC7MEE+zOK/XofsS0tD6UP+3gzqe+PQj31rpiGtFco=; b=rT/KZ9p/rU/+yXHdd0BWkGKgtQdyr0A30h2MqHtK881RUPRPR7N0ONDdNEm7kOffE8qFb8 QRFudWS/A/u1H7rGe7DoF0mHR3zJdrWjJuV8rq0b4htD4xa17W0dsG30JBRVQppQBS6Qea V7zniV941kZwYQ3grqBKtO06SPJN+PjmV34xGG8PKLMmDQNAGYdSCh/xxa8thZtP1csxZc HUsbBNotYraNbFCYi1zaEv5MarS6FG9v8Pn5BWVjV3q1mYxH/R2gbG9RY93Ik4BRe80OuS mWN3UmNWElf27fMFxgiKklxlD0uL2HcAncht0bEP6yt+H61SkNOZ90fDkkAp1Q== 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 4WFJrt2wy6zHPB; Thu, 4 Jul 2024 14:27:42 +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 464ERghb078484; Thu, 4 Jul 2024 14:27:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464ERgCZ078481; Thu, 4 Jul 2024 14:27:42 GMT (envelope-from git) Date: Thu, 4 Jul 2024 14:27:42 GMT Message-Id: <202407041427.464ERgCZ078481@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: b1dd06703274 - main - vtblk: Invoke busdma completion callbacks when polling 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b1dd067032747c12ae237d2f7aeed6d81285c121 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b1dd067032747c12ae237d2f7aeed6d81285c121 commit b1dd067032747c12ae237d2f7aeed6d81285c121 Author: Mark Johnston AuthorDate: 2024-07-04 14:15:33 +0000 Commit: Mark Johnston CommitDate: 2024-07-04 14:15:33 +0000 vtblk: Invoke busdma completion callbacks when polling vtblk_poll_request() is used for kernel dumps and for fetching the block device's identifier string during device probing. In the latter case, it was not calling bus_dmamap_sync() after completing the I/O, but this is required in general. Thus: - Factor out per-request code from vtblk_queue_completed(). - Use it in vtblk_poll_request() once virtqueue_poll() finishes. - While here, assert that virtqueue_poll() returns the request that we expect. Reported by: KMSAN Fixes: 782105f7c898 ("vtblk: Use busdma") Reviewed by: cperciva, imp Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D45665 --- sys/dev/virtio/block/virtio_blk.c | 66 +++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c index d7fa903936a1..d3eb3cf97831 100644 --- a/sys/dev/virtio/block/virtio_blk.c +++ b/sys/dev/virtio/block/virtio_blk.c @@ -1177,6 +1177,35 @@ vtblk_request_error(struct vtblk_request *req) return (error); } +static struct bio * +vtblk_queue_complete_one(struct vtblk_softc *sc, struct vtblk_request *req) +{ + struct bio *bp; + + if (sc->vtblk_req_ordered != NULL) { + MPASS(sc->vtblk_req_ordered == req); + sc->vtblk_req_ordered = NULL; + } + + bp = req->vbr_bp; + if (req->vbr_mapp != NULL) { + switch (bp->bio_cmd) { + case BIO_READ: + bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->vtblk_dmat, req->vbr_mapp); + break; + case BIO_WRITE: + bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->vtblk_dmat, req->vbr_mapp); + break; + } + } + bp->bio_error = vtblk_request_error(req); + return (bp); +} + static void vtblk_queue_completed(struct vtblk_softc *sc, struct bio_queue *queue) { @@ -1184,31 +1213,9 @@ vtblk_queue_completed(struct vtblk_softc *sc, struct bio_queue *queue) struct bio *bp; while ((req = virtqueue_dequeue(sc->vtblk_vq, NULL)) != NULL) { - if (sc->vtblk_req_ordered != NULL) { - MPASS(sc->vtblk_req_ordered == req); - sc->vtblk_req_ordered = NULL; - } + bp = vtblk_queue_complete_one(sc, req); - bp = req->vbr_bp; - if (req->vbr_mapp != NULL) { - switch (bp->bio_cmd) { - case BIO_READ: - bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp, - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->vtblk_dmat, - req->vbr_mapp); - break; - case BIO_WRITE: - bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->vtblk_dmat, - req->vbr_mapp); - break; - } - } - bp->bio_error = vtblk_request_error(req); TAILQ_INSERT_TAIL(queue, bp, bio_queue); - vtblk_request_enqueue(sc, req); } } @@ -1412,8 +1419,6 @@ vtblk_ident(struct vtblk_softc *sc) error = vtblk_poll_request(sc, req); VTBLK_UNLOCK(sc); - vtblk_request_enqueue(sc, req); - if (error) { device_printf(sc->vtblk_dev, "error getting device identifier: %d\n", error); @@ -1423,7 +1428,9 @@ vtblk_ident(struct vtblk_softc *sc) static int vtblk_poll_request(struct vtblk_softc *sc, struct vtblk_request *req) { + struct vtblk_request *req1 __diagused; struct virtqueue *vq; + struct bio *bp; int error; vq = sc->vtblk_vq; @@ -1436,13 +1443,18 @@ vtblk_poll_request(struct vtblk_softc *sc, struct vtblk_request *req) return (error); virtqueue_notify(vq); - virtqueue_poll(vq, NULL); + req1 = virtqueue_poll(vq, NULL); + KASSERT(req == req1, + ("%s: polling completed %p not %p", __func__, req1, req)); - error = vtblk_request_error(req); + bp = vtblk_queue_complete_one(sc, req); + error = bp->bio_error; if (error && bootverbose) { device_printf(sc->vtblk_dev, "%s: IO error: %d\n", __func__, error); } + if (req != &sc->vtblk_dump_request) + vtblk_request_enqueue(sc, req); return (error); } From nobody Thu Jul 4 15:31:56 2024 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 4WFLH11JWvz5Ngqw; Thu, 04 Jul 2024 15:31:57 +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 4WFLH10mrjz4hgV; Thu, 4 Jul 2024 15:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720107117; 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=rMJnTInzMpIOpSqyu6Vuclvx8JxrstfFN6gfi/d8w04=; b=yplGUb1/urr0njLYrFfkA8QDj4W7OnDdl47lAAthdXtsigmCzrfFxrUoNF979ppcA3c5J6 ktoPXFT5UgZYEc17RSxKORvcnHQ/jsyFp5kcbRdm6pqGTnuBxsb7YIkfSfFcZewv9RrD28 wl5BkH0+Xzdtr8SZA9Hn0ziCmAuQ46uyq6Yfh2dEJZpTJj1L+IDcjH28TWFibvXjWmax2Z s/MY1gw8rRIv3K8Vcs9jqSbhb7R9QmNlcKKF7zzBD0MqsxSYxf4GEF9ioEUKme7ZDRgGWa RkaIr7vIpMMCQDEf6shIg/mzfVhVO0jEOPz5yIGCXkDGwRL5XeTeUrUNN+WwRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720107117; a=rsa-sha256; cv=none; b=j04IAHhnjrl1bG3INZIDUNffWOZRCjOYEmAa5WXkBvNO1WdC8TTx9r3TpOVpCCaC9WK/na i7QMTK8yuBIN/PUsoeHOFR3a3udxjrfW5j6I1hRZQKpKQaehIcU6xEtwc1ZQdRaWhlUi38 cq6qoZ0eT1T6+42+/l/kXsl2qeAmiH0z8u6aimMH4MXhSjKcvUxZklxUaiFZbwRz7ofFwV gM3Q0RmOa7o6bhD4qxvn1nCaE2SPTtUPoA5L45e01K67i5f2KlqY6XbZ1/l9cZuhlGGpOp HCCfjb9obUvzKxGel3GKNeNI3jeEvZ0w9GMaDLc+3iNnAP/PPShCOdQA8ey8Gw== 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=1720107117; 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=rMJnTInzMpIOpSqyu6Vuclvx8JxrstfFN6gfi/d8w04=; b=dzYt7qrnVNME9aZeL+LhA/1QR41xTgHcw3rWXBirw5fwZQbqbpJzCVQGiEqIHfOCBvB73F i/jO1JGaKndy3nGGtiFTYlsl/eYAE4V4h3VGhRvipvKpbsJoD83em4cn2t96YguH0MWIdu +UfXbFaOZxYU4RARHg3njlofuJDrC9xTuiQIc+okuZhSxQuuQU2ycjXSpKnieGOSXagOS/ wytd6v+4ajlJotPPrHwXkGGx3nwgGgy+DKL2czOYmNoeJHcShZkI2VbZiYH+eN6yziKO1W N6lKNVW8scgIb0HULBn68aW9dl1AepfGc1RRULnIINBFaS2JoKrd/FoZ2U4gww== 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 4WFLH10NMqzJrd; Thu, 4 Jul 2024 15:31:57 +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 464FVuS4096082; Thu, 4 Jul 2024 15:31:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464FVuTZ096079; Thu, 4 Jul 2024 15:31:56 GMT (envelope-from git) Date: Thu, 4 Jul 2024 15:31:56 GMT Message-Id: <202407041531.464FVuTZ096079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 16a753759e48 - stable/14 - diff: Document the --no-dereference option. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 16a753759e482c8091b195514d50bc94ae501ccf Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=16a753759e482c8091b195514d50bc94ae501ccf commit 16a753759e482c8091b195514d50bc94ae501ccf Author: Dag-Erling Smørgrav AuthorDate: 2024-06-30 15:55:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-04 15:31:09 +0000 diff: Document the --no-dereference option. Also, --no-dereference should not imply --recurse. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D45779 (cherry picked from commit 4ce4a0fe14c455c6ec77452bc99cd93ea45737b1) --- usr.bin/diff/diff.1 | 10 +++++++++- usr.bin/diff/diff.c | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index d3978158d1d1..c10b130a2d72 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -29,7 +29,7 @@ .\" .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" -.Dd February 26, 2024 +.Dd June 29, 2024 .Dt DIFF 1 .Os .Sh NAME @@ -53,6 +53,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -rcs @@ -83,6 +84,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -109,6 +111,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -137,6 +140,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -168,6 +172,7 @@ .Op Fl -initial-tab .Op Fl -minimal .Op Fl -new-file +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -198,6 +203,7 @@ .Op Fl -ignore-blank-lines .Op Fl -ignore-case .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -strip-trailing-cr .Op Fl -suppress-common-lines @@ -450,6 +456,8 @@ lines from FILE2 .El .It Fl -ignore-file-name-case ignore case when comparing file names +.It Fl -no-dereference +do not follow symbolic links .It Fl -no-ignore-file-name-case do not ignore case wen comparing file names (default) .It Fl -normal diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index d947c1e01705..24e851ae9dbf 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -336,7 +336,6 @@ main(int argc, char **argv) optarg); break; case OPT_NO_DEREFERENCE: - rflag = true; noderef = true; break; case OPT_VERSION: From nobody Thu Jul 4 16:57:53 2024 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 4WFNBB1mzvz5NttS; Thu, 04 Jul 2024 16:57:54 +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 4WFNBB16pHz4txd; Thu, 4 Jul 2024 16:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720112274; 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=smPzIcFIEOR/K0NI2zyiZsrMXSMERKq62DGsqFwWB3k=; b=Gez7uncRXTwm7ydShn3O2DuLlpDEdjWmSKFENlCQKR7e+FSUOG9A3cVVloX+IGRUclkwsK bIWhRzIcYweC/PHkNYIFxAYto4JTlNuSxBm7v3blSBPjS5PD6nDn0HT6hTGUZbP3rN4p+s n2vXkiZwcqpMtdKFZeD1JZKUwRbGXjChRYd3+kKptyxsaiHCg0gbgE33lZDDWprtB720kN TLF/Cg4OwmL8kBGYNdEckL33V3dT+bEFzia/13mdMceh+lTWDF+53MfVwng7FUDV2QjicA BYQkXxEwnhn+nPc8X0rIZNvvPeLEE7bcyeOzuv0qwqiUXhlKBXL+/9ZZ1sqL/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720112274; a=rsa-sha256; cv=none; b=VCm0RPd4Z/Y2pQGbLM2C9oW7EWaQ3MJBzLAAe+RYjDrpVEU7Y2lP+uo6X86dP5a0M5Wgli 9hbEk/SgCb7Sa7guXOWxPQSIWckd5eDEvouCsAg5yPi5V9zWXspZxsQ4Iy+NL5JQVW35Nl niSgVygTXXXJ0OnKjROMIEl7ltynV13oJLo/6uO5AwE616JEHdjQ3ot9b5G3VplEUk2Vd2 HlJiT/yjOK/6CKEnadtRIwsveAxTBo18KoS7eSHngq+oP7eZsalOFuw7p9SNcof2NE3lAU LzvQq2E3IKi0D/PI3GkVYX/hOz3wS4FWzZ27Bg+IfTE5v+J3XBsRGg0XBvzVTg== 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=1720112274; 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=smPzIcFIEOR/K0NI2zyiZsrMXSMERKq62DGsqFwWB3k=; b=kBB1QuekGVAqwJ+P4rXhkKuQ3jG3zLfN5auyl4FTOp7nnj4AmMcu25qpgH9CJ8LCaUgOVj XV48ceQnVW2YsJ1TJOZTF58Gz6Jr8XsFIrpQ2ooyRIKI3gXPNQtcwSv7RBPI0N3wueVTMM nVNhYqGGf/+x4/Nr4RpE+u9WFgDv30yMOOp3MIVP7XrO3P9t+YuYH4RnYVXMpjLIlp7ULT HbP53JclbcIJp2aP+ByEC3dQqZ7yoaO5QLzjNe83SHMZv6uIPTUGwn/BcRWUwv1Jn3aijB 3W2ojHy0wauJtlB385+HFSMO1zKVIy/YTEr5BBoCWzeBTJHys9SEXiGkOnd5hQ== 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 4WFNBB0k3HzMQP; Thu, 4 Jul 2024 16:57:54 +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 464GvrGj034085; Thu, 4 Jul 2024 16:57:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464Gvrr6034082; Thu, 4 Jul 2024 16:57:53 GMT (envelope-from git) Date: Thu, 4 Jul 2024 16:57:53 GMT Message-Id: <202407041657.464Gvrr6034082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 09164454aa4c - main - ethernet: Retire M_HASFCS 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09164454aa4c1868abf1ea724ec6160c4a556bdd Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09164454aa4c1868abf1ea724ec6160c4a556bdd commit 09164454aa4c1868abf1ea724ec6160c4a556bdd Author: Zhenlei Huang AuthorDate: 2024-07-04 16:53:51 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-04 16:53:51 +0000 ethernet: Retire M_HASFCS The mbuf flag M_HASFCS was introduced for drivers to indicate the net stack that packets include FCS (Frame Check Sequence). In principle, to be efficient, FCS should always be processed by hardware, firmware, or at last sort the driver. Well, Ethernet specifies that damaged frames should be discarded, thus only good ones will be passed up to the net stack, then it makes no senses for the net stack to see FCS just to trim it. The last consumer of the flag M_HASFCS has been removed since change [1]. It is time to retire it. 1. 105a4f7b3cb6 ng_atmllc: remove Reviewed by: kp MFC after: never Differential Revision: https://reviews.freebsd.org/D42391 --- sys/net/debugnet.c | 4 ---- sys/net/ethernet.h | 1 - sys/net/if_ethersubr.c | 10 ---------- 3 files changed, 15 deletions(-) diff --git a/sys/net/debugnet.c b/sys/net/debugnet.c index c6f57ec84618..8b1419bcaa28 100644 --- a/sys/net/debugnet.c +++ b/sys/net/debugnet.c @@ -570,10 +570,6 @@ debugnet_input_one(struct ifnet *ifp, struct mbuf *m) m->m_len, m->m_pkthdr.len); goto done; } - if ((m->m_flags & M_HASFCS) != 0) { - m_adj(m, -ETHER_CRC_LEN); - m->m_flags &= ~M_HASFCS; - } eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); if ((m->m_flags & M_VLANTAG) != 0 || etype == ETHERTYPE_VLAN) { diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index e7313e78c5bb..cf92145eea8f 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -40,7 +40,6 @@ /* * Ethernet-specific mbuf flags. */ -#define M_HASFCS M_PROTO5 /* FCS included at end of frame */ #define M_BRIDGE_INJECT M_PROTO6 /* if_bridge-injected frame */ /* diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index eeb2c1ea4ef3..6cd5cefa9609 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -588,16 +588,6 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m) */ ETHER_BPF_MTAP(ifp, m); - /* - * If the CRC is still on the packet, trim it off. We do this once - * and once only in case we are re-entered. Nothing else on the - * Ethernet receive path expects to see the FCS. - */ - if (m->m_flags & M_HASFCS) { - m_adj(m, -ETHER_CRC_LEN); - m->m_flags &= ~M_HASFCS; - } - if (!(ifp->if_capenable & IFCAP_HWSTATS)) if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); From nobody Thu Jul 4 20:34:06 2024 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 4WFSzf3sCwz5PhM7; Thu, 04 Jul 2024 20:34:06 +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 4WFSzf3N9tz4K1B; Thu, 4 Jul 2024 20:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720125246; 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=KNQj3jUi07N7lgi6dXrwYgZC0+9M7K3FzQXRirCvAsQ=; b=GC/CDfevPG8/ZhpqyABMkqNxzy8XzM8qX3Auqx3SQC3q1le2tlLrVvM0rj+SK9l7WVN2Vj 7R8WXBVv8F/T6UeGL5nlmaQVeevWnOGArUlClA5Ym+6DIIvqjGFDQoJ/U2qq8eUPVQymkI 4rgwGfgFdMkQFLnZ7LQn1wtnSUf9cejObaIFcTDlapFknpLeLIXpnYkkva/H+ve68eGAh0 6OHbccFRewPzDNBS1kkTfeCgwxNOuyVq4WpCV5TEMInCnJM7QMi+P5TiZfY3oge9i5O4KQ Hp35b7jMjf4AS/6ya7ithZUJkyW55DV4/VKET1DHj9fIc2snRv8nZOX5XFLM2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720125246; a=rsa-sha256; cv=none; b=sQBbXkaEDYemnArUUwmpUyO8bxJNjjjg1S9DxobyCURzaIY6BlCjZKKpam1DE5xUC1qOW7 VuD5ZUy8PSFX4GGREqUy5SgK2gkvJ34CM4fpIMt/vmAM40Xao7KAt3IF+28gwS09wumZsW yi3B7REjh3WQucTCXhUg2yivPOlvsFxHyftr5dMvi4XxF/S2CbCBp9AA6+88SnShgKDCfh 2cDT3SoVV+vKH6h0l/Rma8shw9mS1kjBysomqrUGouoFegrFPMihmfx8b2gJ3J8lT2lTAw OvlgiLph+tmS+ol0go52yG+qUpCDlgLSVT/ZR1/UUX8Dqg3z9EHu8+L7Ye9sPg== 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=1720125246; 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=KNQj3jUi07N7lgi6dXrwYgZC0+9M7K3FzQXRirCvAsQ=; b=Fpi8dx+1hlw42zpx7tdHaw5vbwMpdhfhHz0itQnSLGinu7aMiSKQ9kW+Xr6sKf6tmOgCSx WZKSKBVSkhXkQo0SUH4jlumC3W+N+hJpjOnVuUov2vCC4ifBQRZBfYLOiznd20ZbHyATcJ SSVOXtlKq8ryL6PliiL8YZyIRorW0R9E3YUsbhMb5XURpwsuseMc8ho1YVvfrJH4OtJe/c ukZiyPVQTHI9cLdSuO6AG6yl6OZZoII5URJZaxJf5p29fZFalSfAVLY4RFAiQK1Pe6I5YD bX0VOd15SfzD+31EtVA489e2rUcUldjafGQIECC2vMiajRc+JhF0E+cxYQ5O8A== 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 4WFSzf2zZqzSQk; Thu, 4 Jul 2024 20:34:06 +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 464KY6es007842; Thu, 4 Jul 2024 20:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 464KY6H3007839; Thu, 4 Jul 2024 20:34:06 GMT (envelope-from git) Date: Thu, 4 Jul 2024 20:34:06 GMT Message-Id: <202407042034.464KY6H3007839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 7f50027321db - main - ctladm: don't require the use of "-p" with "port -r", part 2 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f50027321db3b08477f6236abded0297e9e5ed8 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=7f50027321db3b08477f6236abded0297e9e5ed8 commit 7f50027321db3b08477f6236abded0297e9e5ed8 Author: Alan Somers AuthorDate: 2024-07-04 20:32:24 +0000 Commit: Alan Somers CommitDate: 2024-07-04 20:32:24 +0000 ctladm: don't require the use of "-p" with "port -r", part 2 * Remove a now superfluous FALLTHROUGH hint * Don't specify "-p" with an empty argument in the tests Reported by: jhb MFC after: 1 week MFC with: edbd489d09babebdc6c03924a912013be584c409 --- usr.sbin/ctladm/ctladm.c | 1 - usr.sbin/ctladm/tests/port.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 5abc95cddc34..bcbddf50d724 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -592,7 +592,6 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) } #endif case CCTL_PORT_MODE_REMOVE: - /* FALLTHROUGH */ case CCTL_PORT_MODE_CREATE: { bzero(&req, sizeof(req)); strlcpy(req.driver, driver, sizeof(req.driver)); diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index 633dec2fd273..a9ff609d3f4c 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -62,7 +62,7 @@ cleanup() { ;; "iscsi") TARGET=`awk '/target:/ {print $2}' port-create.txt` - ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET + ctladm port -r -d $driver -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET ;; esac fi From nobody Fri Jul 5 01:14:43 2024 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 4WFbCR3S72z5Ps05; Fri, 05 Jul 2024 01:14: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 4WFbCR35CLz4v0n; Fri, 5 Jul 2024 01:14:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720142083; 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=sFaLrhYOyDGwI6QTXLFnKR9LEx6VfjFW4EOnWKyKX1M=; b=Utk6EGC6c0L803Aw2D22HLfLoc1Kz0nNAhFNU9ZapWduppUX2WRTO8ETwgGYh7kfPmTlsv wnRfR3/haw2EvSO8OoScoxYgxdDt5QeuDMwLKRyIj6FwzndVGwNFikdMQScBP5w67voqDo WEjQOg5mO2oqBB52eNhZvZegCETy3GTyNZYlTG9E2t3L2uXUwRlCl46sbByP3NfaOXS7vG etSp2LDjg/Yo5NLViT4AGoBd99RIW7QXT/Gaih5XfDukj2JkHABFXy3wKl4QyO+Zm348Tl 1BN7OST9HT71KOlOVzwpB3B9PgyofhgW0sujlJWhp7IckxmmKmnFW0eUAi+/mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720142083; a=rsa-sha256; cv=none; b=BahF/UwlDy82g8nfqTyg1XOkuLY2tCIOquTO8JTGPsfSdiT1kRiGp91x6n87i8H+CFCFkY u6Cbe12yFrtWnFonZm2cuDqcesHCkz0eaiBRsk8uhQLa1DCX8ilM18RN7RO1diDt+GRXZe kAfEIWjXg/nnWhKG8vgSCVsMpLJFVz2U1nJbyG4oeNRTQ2Ltcjs9yXXK622GomrnatjTxj 7dgTMGfHq6Y6rmYKRAvL4r2UVK4tq9bbi6nowkepA64IIAQn3hwcYtBYgeT4dWgmqd4nEW S9oU3XrIOHw9K8jV++qE6wc5lz8S2QgeJTHVxWfTIQ5ff0V5j/ZZaq/V98jN0Q== 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=1720142083; 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=sFaLrhYOyDGwI6QTXLFnKR9LEx6VfjFW4EOnWKyKX1M=; b=vSTB02m7NxIBgIye39CRX5c4TwsuLbNHPLQxHADvfiVyNRDDi5jft3vLOhfxmqeHMR1Ga5 ugMCqgoU/Ytyi9femSl5HEYXnNtStkov6Ly5lXV8CMNq+l1kQS+UDuYI4YB+3pBJNPnCl9 eXfSTva9jknnIyxfytQseVtUBjsBIMD8kVRY+vAWNAL54xbTBDF0Ibv8a4GqxxGyYUHk+w gBjBz1/QPWkVPTnHjfQJjH2zkQsg7A+fSxnlRQ5hNMD76UXcdqHtwX3xvNK6XtPGQs+L8P AMcRanggLr0a0upGzrqSN3EmnqBvgklJ/KUCweiAonHDkg3hD4KF6Ks2OnAhPQ== 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 4WFbCR2h05zclY; Fri, 5 Jul 2024 01:14: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 4651EhLx082186; Fri, 5 Jul 2024 01:14:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4651Ehfv082183; Fri, 5 Jul 2024 01:14:43 GMT (envelope-from git) Date: Fri, 5 Jul 2024 01:14:43 GMT Message-Id: <202407050114.4651Ehfv082183@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 98c53b0b5540 - stable/14 - nfsd: Fix delegation handled for atomic upgrade 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 98c53b0b55401eaed374b235a40f3a547a5ab4e9 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=98c53b0b55401eaed374b235a40f3a547a5ab4e9 commit 98c53b0b55401eaed374b235a40f3a547a5ab4e9 Author: Rick Macklem AuthorDate: 2024-06-05 01:46:41 +0000 Commit: Rick Macklem CommitDate: 2024-07-05 01:12:26 +0000 nfsd: Fix delegation handled for atomic upgrade For NFSv4.1/4.2, an atomic upgrade of a delegation from a read delegation to a write delegation is allowed and can result in signoficantly improved performance. This patch adds support for this atomic upgrade, plus fixes a couple of other delegation related bugs. Since there were three cases where delegations were being issued, the patch factors this out into a separate function called nfsrv_issuedelegations(). This patch should only affect the NFSv4.1/4.2 behaviour when delegations are enabled, which is not the default. (cherry picked from commit e2c9fad2e0ae3f7049831bf7f2be1a3573363cdc) --- sys/fs/nfsserver/nfs_nfsdserv.c | 7 + sys/fs/nfsserver/nfs_nfsdstate.c | 297 ++++++++++++++++++--------------------- 2 files changed, 141 insertions(+), 163 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 0c8bda6dc6a6..47e3a20390f4 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -3244,6 +3244,13 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OPEN_RESOURCE); *tl = newnfs_false; + } else if ((rflags & + NFSV4OPEN_WDNOTSUPPDOWNGRADE) != 0) { + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OPEN_NOTSUPPDOWNGRADE); + } else if ((rflags & NFSV4OPEN_WDNOTSUPPUPGRADE) != 0) { + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OPEN_NOTSUPPUPGRADE); } else { NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OPEN_NOTWANTED); diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index c73840277022..ce3f3481f04a 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -240,6 +240,11 @@ static int nfsrv_createdsfile(vnode_t vp, fhandle_t *fhp, struct pnfsdsfile *pf, static struct nfsdevice *nfsrv_findmirroredds(struct nfsmount *nmp); static int nfsrv_checkmachcred(int op, struct nfsrv_descript *nd, struct nfsclient *clp); +static void nfsrv_issuedelegation(struct vnode *vp, struct nfsclient *clp, + struct nfsrv_descript *nd, int delegate, int writedeleg, int readonly, + u_quad_t filerev, uint64_t rdonly, struct nfsstate **new_delegp, + struct nfsstate *new_stp, struct nfslockfile *lfp, uint32_t *rflagsp, + nfsv4stateid_t *delegstateidp); /* * Scan the client list for a match and either return the current one, @@ -442,7 +447,8 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp, /* * If the verifier has changed, the client has rebooted * and a new client id is issued. The old state info - * can be thrown away once the SETCLIENTID_CONFIRM occurs. + * can be thrown away once the SetClientID_Confirm or + * Create_Session that confirms the clientid occurs. */ LIST_REMOVE(clp, lc_hash); @@ -2648,6 +2654,8 @@ tryagain: * considered a conflict since the client with a read delegation * could have done an Open with ReadAccess and WriteDeny * locally and then not have checked for the WriteDeny.) + * The exception is a NFSv4.1/4.2 client that has requested + * an atomic upgrade to a write delegation. * Don't check for a Reclaim, since that will be dealt with * by nfsrv_openctrl(). */ @@ -2657,9 +2665,10 @@ tryagain: while (stp != LIST_END(&lfp->lf_deleg)) { nstp = LIST_NEXT(stp, ls_file); if ((readonly && stp->ls_clp != clp && - (stp->ls_flags & NFSLCK_DELEGWRITE)) || + (stp->ls_flags & NFSLCK_DELEGWRITE) != 0) || (!readonly && (stp->ls_clp != clp || - (stp->ls_flags & NFSLCK_DELEGREAD)))) { + ((stp->ls_flags & NFSLCK_DELEGREAD) != 0 && + (new_stp->ls_flags & NFSLCK_WANTWDELEG) == 0)))) { ret = nfsrv_delegconflict(stp, &haslock, p, vp); if (ret) { /* @@ -2944,6 +2953,8 @@ tryagain: * considered a conflict since the client with a read delegation * could have done an Open with ReadAccess and WriteDeny * locally and then not have checked for the WriteDeny.) + * The exception is a NFSv4.1/4.2 client that has requested + * an atomic upgrade to a write delegation. */ if (!(new_stp->ls_flags & (NFSLCK_DELEGPREV | NFSLCK_DELEGCUR))) { stp = LIST_FIRST(&lfp->lf_deleg); @@ -2951,12 +2962,15 @@ tryagain: nstp = LIST_NEXT(stp, ls_file); if (stp->ls_clp != clp && (stp->ls_flags & NFSLCK_DELEGREAD)) writedeleg = 0; - else + else if (stp->ls_clp != clp || + (stp->ls_flags & NFSLCK_DELEGWRITE) != 0 || + (new_stp->ls_flags & NFSLCK_WANTWDELEG) == 0) delegate = 0; if ((readonly && stp->ls_clp != clp && - (stp->ls_flags & NFSLCK_DELEGWRITE)) || + (stp->ls_flags & NFSLCK_DELEGWRITE) != 0) || (!readonly && (stp->ls_clp != clp || - (stp->ls_flags & NFSLCK_DELEGREAD)))) { + ((stp->ls_flags & NFSLCK_DELEGREAD) != 0 && + (new_stp->ls_flags & NFSLCK_WANTWDELEG) == 0)))) { if (new_stp->ls_flags & NFSLCK_RECLAIM) { delegate = 2; } else { @@ -3204,47 +3218,9 @@ tryagain: /* * This is where we can choose to issue a delegation. */ - if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) - *rflagsp |= NFSV4OPEN_WDNOTWANTED; - else if (nfsrv_issuedelegs == 0) - *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; - else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) - *rflagsp |= NFSV4OPEN_WDRESOURCE; - else if (delegate == 0 || writedeleg == 0 || - NFSVNO_EXRDONLY(exp) || (readonly != 0 && - nfsrv_writedelegifpos == 0) || - !NFSVNO_DELEGOK(vp) || - (new_stp->ls_flags & NFSLCK_WANTRDELEG) != 0 || - (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != - LCL_CALLBACKSON) - *rflagsp |= NFSV4OPEN_WDCONTENTION; - else { - new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; - new_deleg->ls_stateid.other[0] = delegstateidp->other[0] - = clp->lc_clientid.lval[0]; - new_deleg->ls_stateid.other[1] = delegstateidp->other[1] - = clp->lc_clientid.lval[1]; - new_deleg->ls_stateid.other[2] = delegstateidp->other[2] - = nfsrv_nextstateindex(clp); - new_deleg->ls_flags = (NFSLCK_DELEGWRITE | - NFSLCK_READACCESS | NFSLCK_WRITEACCESS); - *rflagsp |= NFSV4OPEN_WRITEDELEGATE; - new_deleg->ls_uid = new_stp->ls_uid; - new_deleg->ls_lfp = lfp; - new_deleg->ls_clp = clp; - new_deleg->ls_filerev = filerev; - new_deleg->ls_compref = nd->nd_compref; - new_deleg->ls_lastrecall = 0; - nfsrv_writedelegcnt++; - LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); - LIST_INSERT_HEAD(NFSSTATEHASH(clp, - new_deleg->ls_stateid), new_deleg, ls_hash); - LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list); - new_deleg = NULL; - NFSD_VNET(nfsstatsv1_p)->srvdelegates++; - nfsrv_openpluslock++; - nfsrv_delegatecnt++; - } + nfsrv_issuedelegation(vp, clp, nd, delegate, writedeleg, + readonly, filerev, NFSVNO_EXRDONLY(exp), &new_deleg, + new_stp, lfp, rflagsp, delegstateidp); } else { new_open->ls_stateid.seqid = 1; new_open->ls_stateid.other[0] = clp->lc_clientid.lval[0]; @@ -3269,52 +3245,9 @@ tryagain: /* * This is where we can choose to issue a delegation. */ - if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) - *rflagsp |= NFSV4OPEN_WDNOTWANTED; - else if (nfsrv_issuedelegs == 0) - *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; - else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) - *rflagsp |= NFSV4OPEN_WDRESOURCE; - else if (delegate == 0 || (writedeleg == 0 && - readonly == 0) || !NFSVNO_DELEGOK(vp) || - (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != - LCL_CALLBACKSON) - *rflagsp |= NFSV4OPEN_WDCONTENTION; - else { - new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; - new_deleg->ls_stateid.other[0] = delegstateidp->other[0] - = clp->lc_clientid.lval[0]; - new_deleg->ls_stateid.other[1] = delegstateidp->other[1] - = clp->lc_clientid.lval[1]; - new_deleg->ls_stateid.other[2] = delegstateidp->other[2] - = nfsrv_nextstateindex(clp); - if (writedeleg && !NFSVNO_EXRDONLY(exp) && - (nfsrv_writedelegifpos || !readonly) && - (new_stp->ls_flags & NFSLCK_WANTRDELEG) == 0) { - new_deleg->ls_flags = (NFSLCK_DELEGWRITE | - NFSLCK_READACCESS | NFSLCK_WRITEACCESS); - *rflagsp |= NFSV4OPEN_WRITEDELEGATE; - nfsrv_writedelegcnt++; - } else { - new_deleg->ls_flags = (NFSLCK_DELEGREAD | - NFSLCK_READACCESS); - *rflagsp |= NFSV4OPEN_READDELEGATE; - } - new_deleg->ls_uid = new_stp->ls_uid; - new_deleg->ls_lfp = lfp; - new_deleg->ls_clp = clp; - new_deleg->ls_filerev = filerev; - new_deleg->ls_compref = nd->nd_compref; - new_deleg->ls_lastrecall = 0; - LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); - LIST_INSERT_HEAD(NFSSTATEHASH(clp, - new_deleg->ls_stateid), new_deleg, ls_hash); - LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list); - new_deleg = NULL; - NFSD_VNET(nfsstatsv1_p)->srvdelegates++; - nfsrv_openpluslock++; - nfsrv_delegatecnt++; - } + nfsrv_issuedelegation(vp, clp, nd, delegate, writedeleg, + readonly, filerev, NFSVNO_EXRDONLY(exp), &new_deleg, + new_stp, lfp, rflagsp, delegstateidp); } } else { /* @@ -3337,78 +3270,28 @@ tryagain: if (new_stp->ls_flags & NFSLCK_RECLAIM) { new_stp->ls_flags = 0; } else if ((nd->nd_flag & ND_NFSV41) != 0) { - /* NFSv4.1 never needs confirmation. */ - new_stp->ls_flags = 0; + /* + * This is where we can choose to issue a delegation. + */ + nfsrv_issuedelegation(vp, clp, nd, delegate, writedeleg, + readonly, filerev, NFSVNO_EXRDONLY(exp), &new_deleg, + new_stp, lfp, rflagsp, delegstateidp); + /* NFSv4.1 never needs confirmation. */ + new_stp->ls_flags = 0; - /* - * This is where we can choose to issue a delegation. - */ - if (delegate && nfsrv_issuedelegs && - (writedeleg || readonly) && - (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) == - LCL_CALLBACKSON && - !NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt) && - NFSVNO_DELEGOK(vp) && - ((nd->nd_flag & ND_NFSV41) == 0 || - (new_stp->ls_flags & NFSLCK_WANTNODELEG) == 0)) { - new_deleg->ls_stateid.seqid = - delegstateidp->seqid = 1; - new_deleg->ls_stateid.other[0] = - delegstateidp->other[0] - = clp->lc_clientid.lval[0]; - new_deleg->ls_stateid.other[1] = - delegstateidp->other[1] - = clp->lc_clientid.lval[1]; - new_deleg->ls_stateid.other[2] = - delegstateidp->other[2] - = nfsrv_nextstateindex(clp); - if (writedeleg && !NFSVNO_EXRDONLY(exp) && - (nfsrv_writedelegifpos || !readonly) && - ((nd->nd_flag & ND_NFSV41) == 0 || - (new_stp->ls_flags & NFSLCK_WANTRDELEG) == - 0)) { - new_deleg->ls_flags = - (NFSLCK_DELEGWRITE | - NFSLCK_READACCESS | - NFSLCK_WRITEACCESS); - *rflagsp |= NFSV4OPEN_WRITEDELEGATE; - nfsrv_writedelegcnt++; - } else { - new_deleg->ls_flags = - (NFSLCK_DELEGREAD | - NFSLCK_READACCESS); - *rflagsp |= NFSV4OPEN_READDELEGATE; - } - new_deleg->ls_uid = new_stp->ls_uid; - new_deleg->ls_lfp = lfp; - new_deleg->ls_clp = clp; - new_deleg->ls_filerev = filerev; - new_deleg->ls_compref = nd->nd_compref; - new_deleg->ls_lastrecall = 0; - LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, - ls_file); - LIST_INSERT_HEAD(NFSSTATEHASH(clp, - new_deleg->ls_stateid), new_deleg, ls_hash); - LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, - ls_list); - new_deleg = NULL; - NFSD_VNET(nfsstatsv1_p)->srvdelegates++; - nfsrv_openpluslock++; - nfsrv_delegatecnt++; - } - /* - * Since NFSv4.1 never does an OpenConfirm, the first - * open state will be acquired here. - */ - if (!(clp->lc_flags & LCL_STAMPEDSTABLE)) { - clp->lc_flags |= LCL_STAMPEDSTABLE; - len = clp->lc_idlen; - NFSBCOPY(clp->lc_id, clidp, len); - gotstate = 1; - } + /* + * Since NFSv4.1 never does an OpenConfirm, the first + * open state will be acquired here. + */ + if (!(clp->lc_flags & LCL_STAMPEDSTABLE)) { + clp->lc_flags |= LCL_STAMPEDSTABLE; + len = clp->lc_idlen; + NFSBCOPY(clp->lc_id, clidp, len); + gotstate = 1; + } } else { - *rflagsp |= NFSV4OPEN_RESULTCONFIRM; - new_stp->ls_flags = NFSLCK_NEEDSCONFIRM; + *rflagsp |= NFSV4OPEN_RESULTCONFIRM; + new_stp->ls_flags = NFSLCK_NEEDSCONFIRM; } nfsrvd_refcache(new_stp->ls_op); new_stp->ls_noopens = 0; @@ -5179,6 +5062,11 @@ nfsrv_markreclaim(struct nfsclient *clp) * Now, just set the flag. */ sp->nst_flag |= NFSNST_RECLAIMED; + + /* + * Free up any old delegations. + */ + nfsrv_freedeleglist(&clp->lc_olddeleg); } /* @@ -8943,3 +8831,86 @@ nfsrv_checkmachcred(int op, struct nfsrv_descript *nd, struct nfsclient *clp) return (0); return (NFSERR_AUTHERR | AUTH_TOOWEAK); } + +/* + * Issue a delegation and, optionally set rflagsp for why not. + */ +static void +nfsrv_issuedelegation(struct vnode *vp, struct nfsclient *clp, + struct nfsrv_descript *nd, int delegate, int writedeleg, int readonly, + u_quad_t filerev, uint64_t rdonly, struct nfsstate **new_delegp, + struct nfsstate *new_stp, struct nfslockfile *lfp, uint32_t *rflagsp, + nfsv4stateid_t *delegstateidp) +{ + struct nfsstate *up_deleg, *new_deleg; + + new_deleg = *new_delegp; + up_deleg = LIST_FIRST(&lfp->lf_deleg); + if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) + *rflagsp |= NFSV4OPEN_WDNOTWANTED; + else if (nfsrv_issuedelegs == 0) + *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; + else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) + *rflagsp |= NFSV4OPEN_WDRESOURCE; + else if (delegate == 0 || !NFSVNO_DELEGOK(vp) || + (writedeleg == 0 && (readonly == 0 || + (new_stp->ls_flags & NFSLCK_WANTWDELEG) != 0)) || + (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != + LCL_CALLBACKSON) { + /* Is this a downgrade attempt? */ + if (up_deleg != NULL && up_deleg->ls_clp == clp && + (up_deleg->ls_flags & NFSLCK_DELEGWRITE) != 0 && + (new_stp->ls_flags & NFSLCK_WANTRDELEG) != 0) + *rflagsp |= NFSV4OPEN_WDNOTSUPPDOWNGRADE; + else + *rflagsp |= NFSV4OPEN_WDCONTENTION; + } else if (up_deleg != NULL && + (up_deleg->ls_flags & NFSLCK_DELEGREAD) != 0 && + (new_stp->ls_flags & NFSLCK_WANTWDELEG) != 0) { + /* This is an atomic upgrade. */ + up_deleg->ls_stateid.seqid++; + delegstateidp->seqid = up_deleg->ls_stateid.seqid; + delegstateidp->other[0] = up_deleg->ls_stateid.other[0]; + delegstateidp->other[1] = up_deleg->ls_stateid.other[1]; + delegstateidp->other[2] = up_deleg->ls_stateid.other[2]; + up_deleg->ls_flags = (NFSLCK_DELEGWRITE | + NFSLCK_READACCESS | NFSLCK_WRITEACCESS); + *rflagsp |= NFSV4OPEN_WRITEDELEGATE; + nfsrv_writedelegcnt++; + } else { + new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; + new_deleg->ls_stateid.other[0] = delegstateidp->other[0] + = clp->lc_clientid.lval[0]; + new_deleg->ls_stateid.other[1] = delegstateidp->other[1] + = clp->lc_clientid.lval[1]; + new_deleg->ls_stateid.other[2] = delegstateidp->other[2] + = nfsrv_nextstateindex(clp); + if (writedeleg && !rdonly && + (nfsrv_writedelegifpos || !readonly) && + (new_stp->ls_flags & (NFSLCK_WANTRDELEG | + NFSLCK_WANTWDELEG)) != NFSLCK_WANTRDELEG) { + new_deleg->ls_flags = (NFSLCK_DELEGWRITE | + NFSLCK_READACCESS | NFSLCK_WRITEACCESS); + *rflagsp |= NFSV4OPEN_WRITEDELEGATE; + nfsrv_writedelegcnt++; + } else { + new_deleg->ls_flags = (NFSLCK_DELEGREAD | + NFSLCK_READACCESS); + *rflagsp |= NFSV4OPEN_READDELEGATE; + } + new_deleg->ls_uid = new_stp->ls_uid; + new_deleg->ls_lfp = lfp; + new_deleg->ls_clp = clp; + new_deleg->ls_filerev = filerev; + new_deleg->ls_compref = nd->nd_compref; + new_deleg->ls_lastrecall = 0; + LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); + LIST_INSERT_HEAD(NFSSTATEHASH(clp, new_deleg->ls_stateid), + new_deleg, ls_hash); + LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list); + *new_delegp = NULL; + NFSD_VNET(nfsstatsv1_p)->srvdelegates++; + nfsrv_openpluslock++; + nfsrv_delegatecnt++; + } +} From nobody Fri Jul 5 01:17:37 2024 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 4WFbGn5fdsz5Psjw; Fri, 05 Jul 2024 01:17:37 +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 4WFbGn4swpz3wfD; Fri, 5 Jul 2024 01:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720142257; 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=vUzog6OIjXI/HqTsuca0C14uG4ih0I4p4J90m0QpaeQ=; b=g2rscjwcUXD5R9eQ3aPWehRJO5QxrIvSY/p9uZIXgpksN0m2Zb+FTL2wmbvUU2hEUn4zMT psjm5fqEijOXBOgX/tw7WMs7sKn98yeLvA9MbXqI2sQBLkZPp2YXo5JuMe6Gx9maVulUtl +OYx3NSCqpRpmVnHZrZiYfAC0BO6nnHpR1DtpUrGSp6jbCoiUbUV3AVN/DA3u/6aDC7FGc 2/XndEgaTEJ9uWnEs2X/a2vhv4P4DvT0ah3rVUYP0cLXl9VAsrrKwfB8RpLJvBJYjl98AW 57GilRdqfVd8D+XdSg70B1fcKUIUtIwcfdXyeFEUKLiD35oXzQB96Moy/lGU4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720142257; a=rsa-sha256; cv=none; b=vCPGTvUs2ndXXGdFfSVLDWqiCuvCvsd3MFMWs+sDgMTKZPtmKILI5llw2PGPMwMNyQF/tS vv3czARXzG4WxT+X+WfI1VT0SMtmzHYeeY+GjiSBntomfyznB2s3gbgMrbEVQsQJI41bFY E3oExnTuc9X5bn+vCRA3AU3l+svsIhfDspnMM/9/yf7HF1w+NXs4ZscTawaTbtgMRN5RRz TvE7pCAk/ASQugLdI1KbyUwgGFFrHkXyvLzq55iyMBYrPyngQETbHZdUpOK+UJmprkbQQU K1XqRDjakUfrWLZfjZKdgVww9ul2htuso7/PFTUoceEr/mO0O9eWzNwz9I8tqg== 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=1720142257; 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=vUzog6OIjXI/HqTsuca0C14uG4ih0I4p4J90m0QpaeQ=; b=M2qa6o3oQyM/ll91m1ROtxMz87doxBdSeSnoaA4zGpwNWSNkmKr9XA2Nyhp+fk2sYk+vCu icJWkhwBoH1gu8XBTn2HjD86Xz14et8rZIKSeZJiVboDOwAQpDhG36A+OpAp1kxYWpNkSY B0n04BGg9jCIAY64VS3s1QDQ9TTYMVv+R+i+W9IHXSw2aBlkBaDqxnAEMaqEGrt5CAzZoR KrPpl/3P1hYTQ01JwJHKz5BZrLvWG4hA5N0u5xnnCZNjcMX1t3NVCixaBTEuLVQFZ0fscl gbwGi8jrrTpX6kbPLeBp4ojj8b5QGcqaCizGJHIUjWX/BJwPPC4pXGZBuM4u4w== 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 4WFbGn4SySzcJN; Fri, 5 Jul 2024 01:17:37 +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 4651HbOn082728; Fri, 5 Jul 2024 01:17:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4651HbBE082725; Fri, 5 Jul 2024 01:17:37 GMT (envelope-from git) Date: Fri, 5 Jul 2024 01:17:37 GMT Message-Id: <202407050117.4651HbBE082725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: cbf54cdb36cf - stable/14 - nfsd: Update a file missed by commit e2c9fad2e0ae 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cbf54cdb36cf47dd98360a770707351cf336627c Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cbf54cdb36cf47dd98360a770707351cf336627c commit cbf54cdb36cf47dd98360a770707351cf336627c Author: Rick Macklem AuthorDate: 2024-06-05 01:54:15 +0000 Commit: Rick Macklem CommitDate: 2024-07-05 01:16:56 +0000 nfsd: Update a file missed by commit e2c9fad2e0ae (cherry picked from commit dbe7ff254e6c87a851a75caa7250b8fbcab90c9f) --- sys/fs/nfs/nfsproto.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index cef886755d5a..ca9c732b6a43 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -619,6 +619,8 @@ #define NFSV4OPEN_WDCONTENTION 0x00100000 #define NFSV4OPEN_WDNOTWANTED 0x00200000 #define NFSV4OPEN_WDSUPPFTYPE 0x00400000 +#define NFSV4OPEN_WDNOTSUPPDOWNGRADE 0x00800000 +#define NFSV4OPEN_WDNOTSUPPUPGRADE 0x01000000 /* * NFS V4 File Handle types From nobody Fri Jul 5 03:28:53 2024 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 4WFfBG15Z7z5QBkr; Fri, 05 Jul 2024 03:28:54 +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 4WFfBG0K9xz4Clm; Fri, 5 Jul 2024 03:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720150134; 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=u8lXSzMdIl2anMP/NZGKEQx54c6hnLJIiXXCgJtaNR8=; b=d7/zSkz/y2JqxzG9m7jaMNzf2ipt502Op280vj/B1NlZRHmaXI6gokoUH5TS+gcHuT2Iyr AtbOdbYYQsFCg8DwspEY1hVtEDOn9Q5WDxM5BvXNwJW0b8udAk4V+kA2ZANQrMb1BZt2tu 9OIHNKKbM/Kg9ILpcLnsKXOi0Woy71IloHezL/IwbFbc7GusVFBdXK0EmzzPCNKYD7vPe0 5yPTBISaxXCPuK8C0B8OCcfoakGgmi5GqtW+3orWjAA3z8HXjFwMWyiC9m11h3dmRZIyKs USSdq/sZ7DWbCRvpnOXNroQPMdISwfImLYJBj80VpfhY/LIW65X8Rx54GrxF2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720150134; a=rsa-sha256; cv=none; b=QpVkTHmzA/Iy4iSSDJQJ4yA5EeDvUfu8CyC0ec/hV18EqiWpSBNFqsraLf+qUREwxCzDYm +7z1kGn6ro428KtMuXzjpWAXEZF1dRV2fzj06iyeOBx+/etD5aChlbanON+pd6mDfUovsR X2DpXZmmz/ldbcARyVSIhp7wRPaaM2dSlRUwAK/ILsGAPGp5zK9rR4+aHmarBsbx2TKcEw mxD0+b1F2z3HOQac/cRjxX8Qx0j4ZR6WguIRe8U9jle+sJT3ozs23LMqrTDioSJtygybV9 vaXP6kPHj8TtOcNauv8FBpShwfA7/kUFmi2OSxnX/qpxnVjvLSHegbCc6+DBtg== 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=1720150134; 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=u8lXSzMdIl2anMP/NZGKEQx54c6hnLJIiXXCgJtaNR8=; b=LXNIV5hK9x9yZzgY7/6OOGjvOS1XoZobaa8r9eOjC9hQVjw5wV1l0KGEVHQGFkzBiyRnh4 r7c+tNHmAV4ze8nOfPkZx45KFCd5YrURRKFrhd7q75Kxqfd2LUwvuxjAyO6DTOVGcaQMbi qb76V+dRRrPRwCXqU4fQwy7jMs8sS1KRt/jhVILuCIGUJ2ibtxxshJNRG/3EC1jYzmbkRj oQ68V0DhP9Vp9FQklAh4tVRCNUf90AYdlnFOQRx6PGU2r1/y93OuZayYcJg650vM182P85 nQ5LcmFOjdiPr5tkeQdB4n0nCe3bgfN+aGBBkvnG0hwn2b/HvdxhL38/sFAT8Q== 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 4WFfBF6xPzzgkq; Fri, 5 Jul 2024 03:28:53 +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 4653SrLg003351; Fri, 5 Jul 2024 03:28:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4653SrdZ003348; Fri, 5 Jul 2024 03:28:53 GMT (envelope-from git) Date: Fri, 5 Jul 2024 03:28:53 GMT Message-Id: <202407050328.4653SrdZ003348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: dcdea9e8623e - releng/14.1 - UPDATING: correct typo in branch version 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: dcdea9e8623e83e3aef15fff0d6ead05382ad138 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=dcdea9e8623e83e3aef15fff0d6ead05382ad138 commit dcdea9e8623e83e3aef15fff0d6ead05382ad138 Author: Philip Paeps AuthorDate: 2024-07-05 03:26:59 +0000 Commit: Philip Paeps CommitDate: 2024-07-05 03:26:59 +0000 UPDATING: correct typo in branch version The most recent update was 14.1-RELEASE-p2, not 14.1-RELEASE-p1. Reported by: Graham Perrin Approved by: so --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 9972de7d6fac..34b099e2fe73 100644 --- a/UPDATING +++ b/UPDATING @@ -13,7 +13,7 @@ Items affecting the ports and packages system can be found in and/or ports. 20240701: - 14.1-RELEASE-p1 SA-24:04.openssh + 14.1-RELEASE-p2 SA-24:04.openssh Fix pre-authentication remote code execution in sshd [SA-24:04.openssh] From nobody Fri Jul 5 05:45:10 2024 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 4WFjCW04mfz5QW3s; Fri, 05 Jul 2024 05:45:10 +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 4WFjCV3xVqz4QcL; Fri, 5 Jul 2024 05:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720158310; 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=rv/9c80kkbHS6Zx/TjPmmbdZJiJbM2gjsEPpMrxBDjE=; b=UzkKXnI+cFzAZ2R1LSjbHOi+utCUHyLIjrowQl9LFfOH8wqqWanKwAk7nLsOEUWuZ4KcKU IkWSGFW1jfKafzHtfDTFF7/ncze1ACGFFbttYiMhyXBj5SErAHAwgpuqatrqfxyoyTEyFv AzMRymqNfDlg4HfaDZf7KJEEo7Bs0oZgsWA1T5cdf3oAweRclsi2KGzeCT+/OLX6uVj9Q4 rYJbvOgbVHtQiGm5vH8uoDXRJRSayVoFGcgpoM8NbhjWJdtTppibHqneQQjjQjilbeIkPA CqabMj3Vtwa0zgtfI68Qy8ye2xtpXCthms3dup0n1J2fmFMbDZPll20m7O2rHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720158310; a=rsa-sha256; cv=none; b=hAszu0fqWY1FFR7/vQyIytD1PYSwHr8rwiwagW+9HZYZert5nEIPbRMichOQES5RwNj6RF oGlKHFdu2v/zHyq6a04Gvmouehjv4CrXQfP2Trwj2W4I5zwHdhn3j81Ze0ltnS/dauyGCO XBcQ+LDofEEccrJvn30EOmF6G0DtewVccqZHUa5+NffBqYFW2ukWbZOAeh5kY2Fd0+bGt7 2lgWfb/a/m/pCg9BJSpxWlGZf4VOdCnCunti5cJO/m97MkViK83knjwYrkVuniQWA5zqLp F61C28bPQmK43scaOiTW30cWh34DOc/r97iJbMN2/iHQLXqLl+23i1iI7AcO9g== 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=1720158310; 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=rv/9c80kkbHS6Zx/TjPmmbdZJiJbM2gjsEPpMrxBDjE=; b=LKtji60rMSWQZ9GctdV3qgDgC+0BxmiGZz/Chc4itJCrM8Y7/YmZQQWAEQKjoHfjsvNiXF 182Rtw2UTFprkSQ6QJJEpRIi55mhBIeyC8CF+/Kq7hnWbmOphMQMsaJ7Gu6eIK5ATcTkMo K2hPl0T+CuTjNloJdWmVUbj/tNRdPdGjMQaHhPOdguqA9eYUnOThHuLM5nnOmGwP0/i3TV 5AjfK9c5PjyTIyGjsYeFfMYhB63cg+pBszo/ahrnQOsGuQf07C/+eU7c1E//YbK7/7zRmA dzioQ5WXbKOY7hw20RzyfWYR2uzAHOoMpF+F7Z7ydxmPEGG3bYzaemqKGTCjCw== 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 4WFjCV3Y1ZzlNT; Fri, 5 Jul 2024 05:45:10 +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 4655jAJF037749; Fri, 5 Jul 2024 05:45:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4655jAM1037746; Fri, 5 Jul 2024 05:45:10 GMT (envelope-from git) Date: Fri, 5 Jul 2024 05:45:10 GMT Message-Id: <202407050545.4655jAM1037746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 383fd3ea0012 - main - arm64: Handle an unaligned start in pmap_mask_set_locked() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 383fd3ea00128cf65fbea0e4cbdb9849945c854b Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=383fd3ea00128cf65fbea0e4cbdb9849945c854b commit 383fd3ea00128cf65fbea0e4cbdb9849945c854b Author: Alan Cox AuthorDate: 2024-07-03 05:15:35 +0000 Commit: Alan Cox CommitDate: 2024-07-05 05:42:52 +0000 arm64: Handle an unaligned start in pmap_mask_set_locked() In pmap_mask_set_locked(), correctly handle a starting address that is in the middle of an L3C page. The symptoms arising from this error included assertion failures in pmap_demote_l3c(). Reported by: andrew Reviewed by: markj Fixes: fd6cb031f577 "arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1]" Differential Revision: https://reviews.freebsd.org/D45851 --- sys/arm64/arm64/pmap.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index f4a46823428a..a9cb8c7fe468 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4403,8 +4403,22 @@ pmap_mask_set_locked(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t m va = va_next; } if ((l3 & ATTR_CONTIGUOUS) != 0) { - l3p += L3C_ENTRIES - 1; - sva += L3C_SIZE - L3_SIZE; + /* + * Does this L3C page extend beyond + * the requested range? Handle the + * possibility that "va_next" is zero. + */ + if ((sva | L3C_OFFSET) > va_next - 1) + break; + + /* + * Skip ahead to the last L3_PAGE + * within this L3C page. + */ + l3p = (pt_entry_t *)((uintptr_t)l3p | + ((L3C_ENTRIES - 1) * + sizeof(pt_entry_t))); + sva |= L3C_SIZE - L3_SIZE; } continue; } From nobody Fri Jul 5 13:16:50 2024 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 4WFvDf5Hjmz5PNYC; Fri, 05 Jul 2024 13:16:50 +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 4WFvDf4hlQz42KG; Fri, 5 Jul 2024 13:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720185410; 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=JU0TGMVQzJRhLhd9MgdhKZYO2rkGq5vDdKW+JtQoSOI=; b=Q2EnnNK+jY1ckVQPB9xSI1XT/6T9oTEH1lOzc0PMYJ2YcAu3A2Tn4RbO2lT5gBYooOnyCH z49scTn4WETcny6S9ndDQZlPp5m60KCTdFg3PzXlCUBmetBvY/Q9+FlG3M2CthPNaGIV0M fEttOo8wYaMoYj74CWmxJN18FpUbPMnPK3Ce74gghjdRgqZ5PT1znBStxv3YyqWuz0GuD5 Y4uEefCgHi5ynEd2MX2xMZHg/SZVvZ1CsqX80mbpuEt+ODDowk01fukhyzc3Kte2PQNWsH 3aHw5TI2uLp2xQLmRevojj5ASg4a3Dd+rbedXwG7UrpO07bQH+R67iT5gQDWrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720185410; a=rsa-sha256; cv=none; b=tF4rzep9nZq8E7F48NWDdv83YIAz+YiE71b1dRXFKYaGE/SKHdn1nVw04E4cejrMtlxouy shRN2CqVQxJbKfI1u5WQYUhOlTFBVdt+OVgzRKAd5MAKvv0fNthzK5bWCbXAEs4zoh1+AP jlVlZQPpOG4gS/435DG/jhEgwSSZM2fr1hOT4TIUG/qU/125L4WLAoR2LV8MWoq9R8yhiO bzacxjDj6zkuVyb4M20WAMmrdJTiXkgzbFI23Af8xVTTPPjY/5yHePgJy6+2m17FnmuF6W NxokXU0Pl9ECBtsrrO+kiAN0WYa3nvAtAm1o0hGVnrcZR4mG3hZQBHGNM4IE2Q== 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=1720185410; 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=JU0TGMVQzJRhLhd9MgdhKZYO2rkGq5vDdKW+JtQoSOI=; b=ECuarq4W+dUclh8Lb0KlQk6yP3AD7krieYAG1ekf3uy56FHIw3akVVFy1J+mOE7NgW5DLn 7l571qpVXY0lxWBZPVx7rq4qC4TrV4RZSW8ljUSDPwm3krGPbeOc7tbEePjFv5DVLxvuaY N0DMxbWJVAfjKO9FlvElWgSyXB6Qdob8Fajb4e1rJlFV98QrPMIrIH6Ghf5xRNMVrcEq63 VgpnDWwqT+RW+wlKxO/oLqJe4Iafpf1KWN/OD/dd4cJoaCIjgpNSWvFMAfKt6Zkc3Wtezf kCmmOk3D+aYTCz7ZHw5GrncZyDJ0UZzGhF+RIzjGQ4irfTbt8Ows0Ls4YV8Jcg== 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 4WFvDf4J9wzyLg; Fri, 5 Jul 2024 13:16:50 +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 465DGoCe097486; Fri, 5 Jul 2024 13:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465DGoJm097483; Fri, 5 Jul 2024 13:16:50 GMT (envelope-from git) Date: Fri, 5 Jul 2024 13:16:50 GMT Message-Id: <202407051316.465DGoJm097483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b81424adf718 - main - OpenSSH: correct logic error in ObscureKeystrokeTiming 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b81424adf7181d816c10b1345aaa3305ab0ec304 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b81424adf7181d816c10b1345aaa3305ab0ec304 commit b81424adf7181d816c10b1345aaa3305ab0ec304 Author: Ed Maste AuthorDate: 2024-07-01 13:14:15 +0000 Commit: Ed Maste CommitDate: 2024-07-05 13:16:40 +0000 OpenSSH: correct logic error in ObscureKeystrokeTiming Cherry-pick fix: upstream: when sending ObscureKeystrokeTiming chaff packets, we can't rely on channel_did_enqueue to tell that there is data to send. This flag indicates that the channels code enqueued a packet on _this_ ppoll() iteration, not that data was enqueued in _any_ ppoll() iteration in the timeslice. ok markus@ OpenBSD-Commit-ID: 009b74fd2769b36b5284a0188ade182f00564136 Obtained from: openssh-portable 146c420d29d0 Reviewed by: gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45823 --- crypto/openssh/clientloop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/clientloop.c b/crypto/openssh/clientloop.c index 8ec36af94b3f..6dcd6c8535aa 100644 --- a/crypto/openssh/clientloop.c +++ b/crypto/openssh/clientloop.c @@ -608,8 +608,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout, if (timespeccmp(&now, &chaff_until, >=)) { /* Stop if there have been no keystrokes for a while */ stop_reason = "chaff time expired"; - } else if (timespeccmp(&now, &next_interval, >=)) { - /* Otherwise if we were due to send, then send chaff */ + } else if (timespeccmp(&now, &next_interval, >=) && + !ssh_packet_have_data_to_write(ssh)) { + /* If due to send but have no data, then send chaff */ if (send_chaff(ssh)) nchaff++; } From nobody Fri Jul 5 15:14:23 2024 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 4WFxrH2D1tz5Pg85; Fri, 05 Jul 2024 15:14:23 +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 4WFxrH1hG5z4GY6; Fri, 5 Jul 2024 15:14:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720192463; 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=XZyekaBCeuTNwFS7fJsgA5xgLYAzHGSrGBPOCoLMjyg=; b=XmmjaIudgmUlk+Bm1BzgmKbe65FPc25lZahKRpQbFHT4vca//ZuCK5lBfvsAGebf2j6fOB B31NlxTTjZMtx9bADm3xJPEhqL/Dl1bchhR5C/zZUL27rYjx/rzmiLFCJSqlhn3/OyBuO4 5Ycl3zArux+6mopsnblb8kFBurQwVNdUrlcMwEpZJDCTJijw+TGBOYCnMG6tWETm52CU5Q Plh09v1M4fI+SZsSD2mSSyWoGdGxZt3Bm6oNOc6OnHzNJcNf/16HGvBN6oDoKrkbE5sguN 3+el4cPrgCrU4YNlpZw/UcVrBkFdtMSyTJ+tUc/iLOYS+cezA38j36hsUnsSVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720192463; a=rsa-sha256; cv=none; b=PyfThwSXp724x4+/65C/y2b6/KYH4i8kAXS/xMaRoB66ZFJNUF5jf+GWioYu9HTYHyVNQt uMEj4TAmQ5293DKlcd692MO8S88+671t+k4N2IBkoLIw2db9vhj/k3+PoYmq5SjzYN3/Vj 22gzR0LektU1YWVgo7EL6N69mlkSUyQZDkmDFnl7LCjYdrgXkJ3N3t0AkOQfT4XlWSdu4/ xED74Zu4fZINfBbgawhNEIKxmsALeda/ts4AcYNvAlD48cUzGdFZBqcxknTAAyJcvFZ+u3 U0plum4+Uuvf0cjH1tRLAzpVNBXnAval6ak66nQbrOMXMfUUhtcixwhJt0xRag== 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=1720192463; 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=XZyekaBCeuTNwFS7fJsgA5xgLYAzHGSrGBPOCoLMjyg=; b=SILcREYE+dyP0HQ0NhjvzUyHRG93ubILZ25YIVdCuO8iyLjLr/I5M6Dqij3mmSIYSmCemv j8PhsvtLsfOH9lI8acRJRPsQxa95A9S9Fl+CCHnXOJhOXRUU0SuKVs4EmgDI+kY4nHHhZu rsP4ymQTUK5DQ1jPf9VDpebyBGJGJeTuj+NP9ZgOdtpWKryyReimj0OxZ258nu8uvKFk7I 0iGxrAdHUwuxlerXo0nHTOM+sjp6nzJqFnwD/nB/hDdKWjoVY3C/0RJzP82iet/xa6YoeP o3kZCCTHD7O+K5K2BdupM0zxx43tpPTIfaTSQrMCW8E2Wid+yFoUHz3jbuDzQw== 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 4WFxrH1GpFz123F; Fri, 5 Jul 2024 15:14:23 +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 465FENOc098905; Fri, 5 Jul 2024 15:14:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FENsc098902; Fri, 5 Jul 2024 15:14:23 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:14:23 GMT Message-Id: <202407051514.465FENsc098902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: bd3696bdb24a - stable/14 - ip_mroute: Use NET_EPOCH_WAIT() macro 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bd3696bdb24ac349acb413a850208aff1ed3da81 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bd3696bdb24ac349acb413a850208aff1ed3da81 commit bd3696bdb24ac349acb413a850208aff1ed3da81 Author: Zhenlei Huang AuthorDate: 2024-06-24 09:57:14 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:11:51 +0000 ip_mroute: Use NET_EPOCH_WAIT() macro This makes it easier to grep the usage. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45715 (cherry picked from commit 08a98731ddf4459bcee25074bdbc21d6fa5ce4ca) --- sys/netinet/ip_mroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index cda5f160e8fb..f438ec5b45ea 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -766,7 +766,7 @@ X_ip_mrouter_done(void) * Wait for all epoch sections to complete to ensure * V_ip_mrouter = NULL is visible to others. */ - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); /* Stop and drain task queue */ taskqueue_block(V_task_queue); From nobody Fri Jul 5 15:14:24 2024 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 4WFxrJ3ZHtz5Pg8B; Fri, 05 Jul 2024 15:14:24 +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 4WFxrJ346qz4Gbb; Fri, 5 Jul 2024 15:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720192464; 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=gJte0R5Dj61iIraxldUB2H1DzO7AYozqLIHRenVKDmE=; b=Gilc9E0DiLKZj+qSU5mJSHQUK1cd7dtxCofWuwtD/WPbIRqnBSYrKKh5EACXBA7Egy9pk9 wKsKMmm6dc4ir60cpvnp6fX20B9Mpn8e5kMvQokWEa61nGQ1v+6dNXMSbyXmEkrZ6kFUWC jwpE+1y5kLUEQR5G17H9zyqfrojilCn9/RS2CUu6DggZdHZQr4tmRyNBpnkZgs88ZDPtNj uGO7xguO8d5IRxV63G4lH3LJGHa/abKGnTUCas8vwtz53EV0a/Z5CFIRVJ+rNuuVhtanUD 5PvNhJUUeNS0gsONIePUTTfCNEAPeNG1Z0SLxhyT0BQfk6y+2iFavXPmVTZlFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720192464; a=rsa-sha256; cv=none; b=ov5wjbToppKjBts2trnNs/sQuB4Aeu5g06rDJ3zuUOAmpU+vqCyVtJc/2d4ZSEw87BZ0u5 NeuhCLzjWdh169v5JP0Wa4O2Q1EpZ0kRo6YAAo/l8YEfZfZV8zjxBVTYtCBjeL/6q5BUPf qW1iG95AszJSXeXGetMZn4WQJARSi2zwbCqgEiIbY+HmVN5gkDuTY09NeIsT/EIuno1tGR QEuJqG6uoguetxpn8JdlNg8lOHUy75YB1fghYzlgiT4EHKkZ8oSHq36AYy3mOjy0OLlYZr AfVpXedpYFT7xjdLFpOCJGty/gRlXDGqd3KMaBvJQYlHGpMOSCAvoVsOXkV4Xw== 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=1720192464; 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=gJte0R5Dj61iIraxldUB2H1DzO7AYozqLIHRenVKDmE=; b=Rjje62TUV9gxILyxFTv4/NztsBG+74FaAKxpXRozWaZ3dHyL7g0nGqSU0J0zctcgApVvBB olAzevWZ20Scao8C7NR9eUVi7QCrKSk3nvt8EbRjvnkRXNe1vqWg/82F76lEeLD2SFcfyn D/fsnUFMY1O+H239p8Ie+Iu4CRjKtpnVAdULerhenShJ1vqTSmYL4gKrj/wvZS2a9SVXXn a19HKAASGS29jx1tfukYhG8lUstWUfd9t4y3+urksE1U8z1UN+b9TCUlNCd32a6YScbHf3 Tb1MY17pggwvf+KwZvNEzg79LGhJHxNJWKt+44S388Vi/2bXYOY4rlvaglZtuA== 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 4WFxrJ2Djcz120n; Fri, 5 Jul 2024 15:14:24 +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 465FEOnc098944; Fri, 5 Jul 2024 15:14:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FEOxP098941; Fri, 5 Jul 2024 15:14:24 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:14:24 GMT Message-Id: <202407051514.465FEOxP098941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 338bb091008f - stable/14 - ifnet: Use NET_EPOCH_WAIT() macro 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 338bb091008f32fda5cdd8cf9484fa942fa0937c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=338bb091008f32fda5cdd8cf9484fa942fa0937c commit 338bb091008f32fda5cdd8cf9484fa942fa0937c Author: Zhenlei Huang AuthorDate: 2024-06-24 09:57:14 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:11:51 +0000 ifnet: Use NET_EPOCH_WAIT() macro This makes it easier to grep the usage. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45715 (cherry picked from commit 71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352) --- sys/net/if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 1ca0893eb724..7c282277cb59 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -596,7 +596,7 @@ if_alloc_domain(u_char type, int numa_domain) old = ifindex_table; ck_pr_store_ptr(&ifindex_table, new); if_indexlim = newlim; - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); free(old, M_IFNET); } if (idx > if_index) @@ -1134,7 +1134,7 @@ if_detach_internal(struct ifnet *ifp, bool vmove) * At this point we know the interface still was on the ifnet list * and we removed it so we are in a stable state. */ - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); /* * Ensure all pending EPOCH(9) callbacks have been executed. This @@ -1546,7 +1546,7 @@ _if_delgroup_locked(struct ifnet *ifp, struct ifg_list *ifgl, } IFNET_WUNLOCK(); - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); EVENTHANDLER_INVOKE(group_change_event, groupname); if (freeifgl) { EVENTHANDLER_INVOKE(group_detach_event, ifgl->ifgl_group); From nobody Fri Jul 5 15:14:25 2024 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 4WFxrK5fsvz5PgHM; Fri, 05 Jul 2024 15:14:25 +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 4WFxrK3Vt3z4GQ6; Fri, 5 Jul 2024 15:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720192465; 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=J22gkM/yNg6ZlTkLR/0X317Tno7FwXJlkK0mhFZaS30=; b=AnudGumAjtHsQtaJQYkGBVd7hau2jGnDhN04/9EDA+WK/Etsiw3ZKZGLI4goBjaVgmFrbp VPj8HdJyyRDo6cX9tYvLinv98GA0EjyJDot0IrohmyjK3EtDyWqDTu+N8fgRolriDVXAae E9YkTFQmNT2HHIsNOvkV3BEN/DjbOuhqYug18v7palXpCSkKG7QORgn5rFdETPJ7Ej+94Q u7eirPCJnlCXXtODML+gkztHwwHGEOZk0hB+crjhvsfTcUmxwL0/Q4DnA7WbVT5hFls7Bw gZG/u4aa/cGLzakOvZL1Am+uxN/PoBkmZM2x1AtxN8Z6NN5TUtMrtv/VC/IFCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720192465; a=rsa-sha256; cv=none; b=EXyw+enuc7EYWEsWRiV02wV9GmwKrBBI4dh+QFnBYRuUFV5eVDl8tzzmUXPVIO8a16uBrd FgusJkZUxG69whXbrWt0JdAybwDP1ACQxfeFsYoSIe86PaYLoy3JiwBY4Vuo2WzTBvUEHL UPx4vScH0h2Y7vT+oXGOS/dEl1UL0Uz+3jUuw+lKtya+9m8cqikY+e8ibDQ2ccgwHttrVR gGfJgfKIK69q3crNsPUWlTjDgInDKZsFbe772ojnKgSz85yC8YzcXbXSd1UShPpYPr76+9 W8P+JJIjSB05yaRt0bEyynQz/r2eVxtMfnFOowomT3ZrKfmAgaEviyh5mO6UMQ== 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=1720192465; 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=J22gkM/yNg6ZlTkLR/0X317Tno7FwXJlkK0mhFZaS30=; b=hDrl5iPKWeXYIQ3kReeiR3PVoYUn3VslRAH6UodCmRyP6y2jX4VBK1tu9tyCeZxyifX97q stAeHvQd+R+rnbdtQ7yIwkHxquPCQUnibBdIPD3vVafWry9sNUZAWU4EPiKAkhavirTHhT /OltHb4YgRiEBCIbRYZBPWLwg+jg8v+SrFnYWVw2BAPno+7vNdUODiTrmEMUjYiHz7nov8 54AKw1vNTbELFG4aUZU5PNdpybc4uDZD6VvI4ZZ05nQjO8CfJds6IVf5HaIc+3kP9oZS3c iIHwtZobke+HlAgiV8lum+4NhuoHPWGMZ0fWEzz4rp4Rh8N8P+grCXXcmGL5wg== 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 4WFxrK36zpz11vG; Fri, 5 Jul 2024 15:14:25 +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 465FEP5q098990; Fri, 5 Jul 2024 15:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FEPE0098987; Fri, 5 Jul 2024 15:14:25 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:14:25 GMT Message-Id: <202407051514.465FEPE0098987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 3bae3e545e2e - stable/14 - ifnet: Restore curvnet earlier 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3bae3e545e2ef7ee26a94090fdc6962a127310a4 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3bae3e545e2ef7ee26a94090fdc6962a127310a4 commit 3bae3e545e2ef7ee26a94090fdc6962a127310a4 Author: Zhenlei Huang AuthorDate: 2024-06-27 04:38:04 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:11:51 +0000 ifnet: Restore curvnet earlier This improves readability a little. As a side effect, a redundant CURVNET_RESTORE is removed. No functional change intended. Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45595 (cherry picked from commit ef4f4a44d9134ddadede0e2e6e658d0688c5ab3c) --- sys/net/if.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 7c282277cb59..b38784622e92 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1345,8 +1345,8 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) /* XXX Lock interfaces to avoid races. */ CURVNET_SET_QUIET(pr->pr_vnet); difp = ifunit(ifname); + CURVNET_RESTORE(); if (difp != NULL) { - CURVNET_RESTORE(); prison_free(pr); return (EEXIST); } @@ -1356,16 +1356,13 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) shutdown = VNET_IS_SHUTTING_DOWN(ifp->if_vnet); if (shutdown) { sx_xunlock(&ifnet_detach_sxlock); - CURVNET_RESTORE(); prison_free(pr); return (EBUSY); } - CURVNET_RESTORE(); found = if_unlink_ifnet(ifp, true); if (! found) { sx_xunlock(&ifnet_detach_sxlock); - CURVNET_RESTORE(); prison_free(pr); return (ENODEV); } From nobody Fri Jul 5 15:14:26 2024 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 4WFxrM00kvz5PgF3; Fri, 05 Jul 2024 15:14:27 +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 4WFxrL4cKTz4GmV; Fri, 5 Jul 2024 15:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720192466; 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=B+2uG3H2CadRQvdamAT31QvwQq4UOyBosdsSmrod2nA=; b=Jb4bfaO1/AeDCeOLeunX9mMcs8HqjjkZBSF6mEo6d+g8QyBVEsEWDv4IzWoR+XBDMUER4w FL5InMn1OEjJI4t4mfr1K/RRDIGFjNoVO+hozzYDjyYIqcZ1ZRq1RwESAPR2erfzHqikGV qvYqlpFbLZIgGwm2WQR4E/7VlpbL6UWbk8mIPnm3yYdI1x0751Kk3ElSEdfOBfp2KjdW/F 1LRa+uwgp1RJ+A05BTGM4aOBD0+jVS0wH+uRezDScpIGrZD/5gOwAXq6WpfHffTqu4h1XO d0+tbG5ty3hjaHV6ACBzhjsoTmVLjYjOuAm7FawOIajkhhnsOXeyuXJn2ey7uA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720192466; a=rsa-sha256; cv=none; b=AD5wRddDnUCaAHOXfjA5F0UcmMR4dKj+kF4kEASEMOdbZhXAm83u3uu9S9DstyAX5XhZfL Yyqcgkdev+rbsMkcnLGS6aBOJGzR8vEdg3WCyDRhmywCqVXHzI47lffkTOdixT/42EVyZh kLc71TGx/U6sjrFCx19M+kLSimZdHmmgpQUwKjdwXvjdRrFi0ffmU5MrzQN1fCV1wRuOzJ XUI/cXaPvNwmFa3Vty80x2OCrVgIRfScy1XKhzLdew7LsWkqaBHH2QSuIbQswZD+ZuXQLQ VO/3C3rDj7exRMSpZ0wE0bO+iE1UI4RJHtFSheZBcG3V+XS30kTRSWrdCIU6Rw== 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=1720192466; 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=B+2uG3H2CadRQvdamAT31QvwQq4UOyBosdsSmrod2nA=; b=rShQ7Uvh4uFuIoOdF78f3faOdnGh78NIQkCdr57dlsga7PldWa7fq2tutAlDbmnfeOW04M Pvuti6WUwQs01LhsdFspDGPKrJCvPSUONxIKRR2EX4FZFp6P63pksNr+6NZsK3e0ZVjhga uVblNtD/GoeAYMqokBDbv0bUGo63cHwrymTwVbecgbLgpKogC/9M8m6K8SIeu7Y3pCnI34 puN70QlhzcbtmWnXVbHhvUviF9ZxMR8Oed3mZJWT32acznMhBej1lwOTua0k6hzOs2Uoo7 r3Jui0QfClPzgg7QuQXp/LjYotiSRwGjzNBJilssubKhMvbavtgogtW8xGsgGw== 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 4WFxrL48Dxz11d4; Fri, 5 Jul 2024 15:14:26 +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 465FEQo3099047; Fri, 5 Jul 2024 15:14:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FEQmp099044; Fri, 5 Jul 2024 15:14:26 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:14:26 GMT Message-Id: <202407051514.465FEQmp099044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 4a253ccbe813 - stable/14 - lo: Use new KPI to assign the first loop interface 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4a253ccbe8135afdbb5c6552e140aab6eae35ef9 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=4a253ccbe8135afdbb5c6552e140aab6eae35ef9 commit 4a253ccbe8135afdbb5c6552e140aab6eae35ef9 Author: Zhenlei Huang AuthorDate: 2024-06-26 10:00:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:11:51 +0000 lo: Use new KPI to assign the first loop interface While here remove a pointless static local variable lo_cloner. No functional change intended. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45728 (cherry picked from commit 2cb7605a2415a1c0dd35374a88f815ef00e31de9) --- sys/net/if_loop.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index e135acef18bb..5558fe5a71ab 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -95,13 +95,9 @@ static int looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro); VNET_DEFINE(struct ifnet *, loif); /* Used externally */ - -#ifdef VIMAGE VNET_DEFINE_STATIC(struct if_clone *, lo_cloner); #define V_lo_cloner VNET(lo_cloner) -#endif -static struct if_clone *lo_cloner; static const char loname[] = "lo"; static int @@ -143,8 +139,6 @@ lo_clone_create(struct if_clone *ifc, char *name, size_t len, ifp->if_hwassist = LO_CSUM_FEATURES | LO_CSUM_FEATURES6; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); - if (V_loif == NULL) - V_loif = ifp; *ifpp = ifp; return (0); @@ -158,12 +152,9 @@ vnet_loif_init(const void *unused __unused) .destroy_f = lo_clone_destroy, .flags = IFC_F_AUTOUNIT, }; - lo_cloner = ifc_attach_cloner(loname, &req); -#ifdef VIMAGE - V_lo_cloner = lo_cloner; -#endif + V_lo_cloner = ifc_attach_cloner(loname, &req); struct ifc_data ifd = { .unit = 0 }; - ifc_create_ifp(loname, &ifd, NULL); + ifc_create_ifp(loname, &ifd, &V_loif); } VNET_SYSINIT(vnet_loif_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_loif_init, NULL); From nobody Fri Jul 5 15:14:27 2024 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 4WFxrM6s3Cz5PgHQ; Fri, 05 Jul 2024 15:14:27 +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 4WFxrM5WMTz4GTT; Fri, 5 Jul 2024 15:14:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720192467; 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=MvPAtvO1zdiEiURJ7YsNKZcappQ+kWdqE3mg697eBTQ=; b=qNbEE93YT2LAyxLofnwlBYQXPKvC8k4a3GvNuye6Kj3IX2Gk7equ19Xzf6SJ2nfhQ6mSD7 ueiiEY8wPRDObFfbzflnE+IY4wrdIMP2fZP7rgD11SCUCcCs2ZzRV+pBqTwAO8wJRF6i7r hM6zBnD7Gz/yjKw79F4kpILmyKDVE4ugHFnmI+96Q4zZ965vC9rrIoJa4qgThfUwwTXBVZ J4CDOrEghrGYC8jovlpQR2W9sbWAk/BbWKTmPhkjsBQM3GiFyky0nBiAAqeSZLR5Xe83TP smbrXqv/sSA5AyzUPE9dFWUgpbSseLU33W6KQK3t3haFb3y03azPVAO8es7W1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720192467; a=rsa-sha256; cv=none; b=JsTDtE7sGMjupKhfWlxLxSR7l5vnEnVtd/6uvJ6B5YHrR6THfzd9dKbvy+92f4rKz2t5Cc b7sFDbOZ1OI6dCLnh174jDZrJsDuN+frvP2hnDNFkQzLos3qsnfUIy6joiZ6uCzXDDwDEt cOGTkjGhrCDGKK7lEG8KoSK8rgZDfMFy95cCmDjjAk9xv5qM2RYNslcFr2r9U5OnpcWG6C klUfJPJczNQH0yJlBZH1lDkgn+eQpGGamQGqq+jVlewxH0OLAHh63x+KLook3yHz8UxeBI kH5eKQZbFnuIqc8iD+wPjr2hUd/1aAjgwJmtyan6ep5fdoASaM6g3EorEtuBLg== 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=1720192467; 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=MvPAtvO1zdiEiURJ7YsNKZcappQ+kWdqE3mg697eBTQ=; b=FZdjtccUNX/TnvH1SvJnu14O2+YOLnjc0eh6X7Pdww6WeNhzHWZttqzFt+lZBnAL6SNlPR mDvEKbIRDhIu8TwdOx4w5UR1ad7T8ZtQlJU6nEpqQlJGGInzKlj/NVmOaeEn0aEOFwBZVF MQuvZ29s4u3TsFb/SjhJFMdlTEbh6592eia2hgvgRq7eRKaLy7LqTaTW/84t0Df8QfRZmr dg4TmhSNOodTd65oUHwAn92oz8KehoMjzXkE5Crha06hrYFi7KSbOS9wpQfcabR4QIlQ/I h6ZqZOg3WctrIHC5zz3srMmtjxT7x6ZsSCWmBos3TmFXoNilsvgUKnR982qkPQ== 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 4WFxrM57BTz11d5; Fri, 5 Jul 2024 15:14:27 +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 465FERpV099089; Fri, 5 Jul 2024 15:14:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FERUl099086; Fri, 5 Jul 2024 15:14:27 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:14:27 GMT Message-Id: <202407051514.465FERUl099086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d25d517db2e6 - stable/14 - enc.4: Remove a redundant word 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d25d517db2e6b21753de39c68fd440c62dfe58d6 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d25d517db2e6b21753de39c68fd440c62dfe58d6 commit d25d517db2e6b21753de39c68fd440c62dfe58d6 Author: Igor Ostapenko AuthorDate: 2024-06-30 09:27:05 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:11:52 +0000 enc.4: Remove a redundant word Reviewed by: zlei MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45706 (cherry picked from commit 4ca4a3b1c8e33cafcd9462e2d068246153846d57) --- share/man/man4/enc.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/enc.4 b/share/man/man4/enc.4 index 87ff46878266..86f14d2bf290 100644 --- a/share/man/man4/enc.4 +++ b/share/man/man4/enc.4 @@ -126,7 +126,7 @@ The special value 0x4 can be configured in the .Ar ipsec_bpf_mask and packets will be also captured after firewall processing. .Sh EXAMPLES -To see the packets the processed via +To see the packets processed via .Xr ipsec 4 , adjust the .Xr sysctl 8 From nobody Fri Jul 5 15:45:22 2024 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 4WFyX23XM9z5PlD5; Fri, 05 Jul 2024 15:45:22 +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 4WFyX225kLz4KTD; Fri, 5 Jul 2024 15:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720194322; 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=nRYLVqFVp4DuTJchpCaKubcc66nsbe0Tqq1juL45HbI=; b=hnjqP6zj/5HcwtnwYE/cVvnn5g1J4ilxVRypNp6O+YocLhknZb2owPpV6y+aJTjp1WKfkn Rt0VLlSsO1EFQ7UBdJXScFWoL8U1UEB7cu/iUDNP+8Oa9c811KNeeaW3WAHIfnxw606rPK 7ebYiPi3wy+T3NykhS9N/4rPz5KS2Kj4Uicat8+uXN6+gfbygIgMpS63obeEvex3+bNdNC 1xoXANOj711qBnVUQcg0Xv9DDUvgzWMSpk9Uz1qGxukiqi6RdfY+LcunuTTtrZ2J8khyMT hQj7v0ndOZqGDFcUxmksygZGyoI/y2iQ9fwxhAAFvBkkUG9qUKDGpt5pQA/5sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720194322; a=rsa-sha256; cv=none; b=HWMOlgIsyHBKFmCcGyyGysSX9R6POoza43wrtV0438/TeK4PVNl9mON4sNe2iZZ5FjR/Yq 5JW8HgEw2wDdnvDbYJD6HCgauRNJVhkRQCfgq45BkRK94JI+I5vVFpzsIBo03XW3Mx4skS 8YQ07HrEcv5r4Rs3j99Qqr9zb3AOwAl0yjkKlMdXSIFoF9KqlS/vO64+7TBelxQZZTGByt Q3WqwoPRIHHo8sYfPlH4NqNsz/Xv4Tuc68fI3suvDAvxTpID9AcNhyPNFR5kzoJlzrs/Mw 22KLud+jbVvG4v44V7Ae3YMP0uzg3WrIk/Ma9nhrRnQZScy+epYzrwDNwmNqNA== 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=1720194322; 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=nRYLVqFVp4DuTJchpCaKubcc66nsbe0Tqq1juL45HbI=; b=JGX64xO7xhB7sEGfqFzAONfc4VCbU+zz+F4gDCwi6O62BOhRLVgn7tfElOyQebTohwmNU5 mGu/wLhuSVVAgvB+JgM/ecl4/QY1ppsBXfz8Q/iXbQuX1M8I0G7fdwUYA3/GYAtTvEb7VK mAuDJm/YIoJ4cbMAEu+ZRaHXR6BNlqAY3a124lNAbt0vNgtUHfbvOrc/fT7UlopYHxO69Y lkHCxwq2m3FTi1RCbZDinBSJnjnbAcWN7XH/IxcDAQbgWN6gNLUC9HcBgvmc8m9XCOv7bQ ENH8i1+0iIeplipom6xOduotKVjyrPtX12GbxTqODTjb8fI3pFciimTrHXUtrA== 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 4WFyX21jdnz132P; Fri, 5 Jul 2024 15:45:22 +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 465FjMv0048993; Fri, 5 Jul 2024 15:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FjMCV048990; Fri, 5 Jul 2024 15:45:22 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:45:22 GMT Message-Id: <202407051545.465FjMCV048990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ea9ed799ebdf - stable/13 - ifnet: Use NET_EPOCH_WAIT() macro 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ea9ed799ebdf895e1e029cfffdf8499dc7b36782 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ea9ed799ebdf895e1e029cfffdf8499dc7b36782 commit ea9ed799ebdf895e1e029cfffdf8499dc7b36782 Author: Zhenlei Huang AuthorDate: 2024-06-24 09:57:14 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:43:44 +0000 ifnet: Use NET_EPOCH_WAIT() macro This makes it easier to grep the usage. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45715 (cherry picked from commit 71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352) (cherry picked from commit 338bb091008f32fda5cdd8cf9484fa942fa0937c) --- sys/net/if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 4de0cbcb985c..850d1030a16e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1170,7 +1170,7 @@ if_detach_internal(struct ifnet *ifp, int vmove, struct if_clone **ifcp) * At this point we know the interface still was on the ifnet list * and we removed it so we are in a stable state. */ - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); /* * Ensure all pending EPOCH(9) callbacks have been executed. This @@ -1615,7 +1615,7 @@ _if_delgroup_locked(struct ifnet *ifp, struct ifg_list *ifgl, } IFNET_WUNLOCK(); - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); EVENTHANDLER_INVOKE(group_change_event, groupname); if (freeifgl) { EVENTHANDLER_INVOKE(group_detach_event, ifgl->ifgl_group); From nobody Fri Jul 5 15:45:23 2024 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 4WFyX33sMWz5PlHH; Fri, 05 Jul 2024 15:45:23 +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 4WFyX335p1z4KmL; Fri, 5 Jul 2024 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720194323; 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=mlZ9ZUZH+I2TEGEFZ7a3iFAJFDNYSaHjMbA4JPzSjuo=; b=sl+xQfU88TupRk3io6u0/FWIeM3/h9vUd4tg69ZX8S/ow/ylsAwQ9U8TTwG0emjQH6I0Mj guR6pCtpmB2H8A/Z7ESS8VjN2lD5LsDHWX78AT/0BCBlWYZAIaxjceDrKM/t/zzp7C9ztM yqHNusmAJfMw87PN94zf02mtoBFN8BylVqJl90AkPDOEGmrxbYv1tKPa1PanC/C6EwI7dS QPbS8bXiRj32SmVzHADaR2Lli973hWku8S0txe/nONT9iCQZ8ImsjdoMX0hMwaT5YElURi +E/Ag5RKuZCKYAAuU81cuRNViyqZWmkUteEnm9CVppyPmz1owlPY07jq93noUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720194323; a=rsa-sha256; cv=none; b=FB5mOEr7iZo7YvSqXjKF6PL4xN91JbpvNBRrl1Ht+VA5yavkj2GqwyrJ5tlC7hV3XsYG8U Qf8bM1Jz1YtDDHY4N53W+ZjkhLtZb83uo5TIEzCiUazEo0wdHYHRLZd/J1PWCPfgIS5iYH We/yzV071q/s4AEZV51p7PG79Z9GUs9RYsUbIYXV6G5u3W34wM5Kfe7vRDKCT6v7t+GJbE VuOUWO9roq0S615Zaz2550dOp/x6twm849/r5W+8DRvJ3Vi6CkrJYVLGfAHc/w3LvCUk6Y MU9BWbNm7D/fA5tNaWl7PLcnNbd6Fa9ekptL6DwvtWevTTS/6W1abFAilZpW7Q== 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=1720194323; 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=mlZ9ZUZH+I2TEGEFZ7a3iFAJFDNYSaHjMbA4JPzSjuo=; b=XB2UffCdbDHZRXfc7yLhyvqLh42Mhwa2pGgzWH+QkvTJkxSrzVqq478IGUcW6o+VbH+dlX gvf0D/fYfErQUM2SzLmb2GUYOXB4xg7JkZOpoMfVHFYi1HiED8D0qtN21i+VUmTVotckgM +Xe/7EML21qLjaV31cB4Oi0I+1JrDoc2epahWcF25lf/Hf0SI8jS92poML1+lZytqBoqDk fuNJog2zxSP3z12pv8Ikr0VEuBDfimemorq4XW4MmkpvDYqJU66OkNa99Kgz1rsHhl7bhx t32W1Ek2vULK9UqjjfDtAI4UeDUTxcavjWaCkoDQmC75KztYu35clGMaPxyMIA== 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 4WFyX32gw2z12c7; Fri, 5 Jul 2024 15:45:23 +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 465FjNfh049032; Fri, 5 Jul 2024 15:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FjNJZ049029; Fri, 5 Jul 2024 15:45:23 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:45:23 GMT Message-Id: <202407051545.465FjNJZ049029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 541f915f421f - stable/13 - ifnet: Restore curvnet earlier 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 541f915f421f80467f6e356d74b3cc971bcd74f6 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=541f915f421f80467f6e356d74b3cc971bcd74f6 commit 541f915f421f80467f6e356d74b3cc971bcd74f6 Author: Zhenlei Huang AuthorDate: 2024-06-27 04:38:04 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:43:44 +0000 ifnet: Restore curvnet earlier This improves readability a little. As a side effect, a redundant CURVNET_RESTORE is removed. No functional change intended. Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45595 (cherry picked from commit ef4f4a44d9134ddadede0e2e6e658d0688c5ab3c) (cherry picked from commit 3bae3e545e2ef7ee26a94090fdc6962a127310a4) --- sys/net/if.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 850d1030a16e..e457ce5c4705 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1414,8 +1414,8 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) /* XXX Lock interfaces to avoid races. */ CURVNET_SET_QUIET(pr->pr_vnet); difp = ifunit(ifname); + CURVNET_RESTORE(); if (difp != NULL) { - CURVNET_RESTORE(); prison_free(pr); return (EEXIST); } @@ -1425,16 +1425,13 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) shutdown = VNET_IS_SHUTTING_DOWN(ifp->if_vnet); if (shutdown) { sx_xunlock(&ifnet_detach_sxlock); - CURVNET_RESTORE(); prison_free(pr); return (EBUSY); } - CURVNET_RESTORE(); found = if_unlink_ifnet(ifp, true); if (! found) { sx_xunlock(&ifnet_detach_sxlock); - CURVNET_RESTORE(); prison_free(pr); return (ENODEV); } From nobody Fri Jul 5 15:45:24 2024 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 4WFyX46sp3z5PlD7; Fri, 05 Jul 2024 15:45:24 +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 4WFyX45Zbzz4KwV; Fri, 5 Jul 2024 15:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720194324; 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=V+OTdKRXOMh4g3JzNKol15Co/VSd8zqGxmac3tq3o9o=; b=kZqF/FnFbqv98QHueCVgr8cQoL1UCNb+0H2pp7zP8B2d5wVytVJEvz1uSu+9nC59LnuorG Iaz45URDqzd3u2El027oBxGdiiaIY4a7iw7UFlKrMYvOzVHfZKzR5tXdP2LJnjYQV0lQ0J mIj7s+T+p/yPx876SBMSaPzUtqOdcm+5PUFufiMGDEO+xAYz1HIrH1+RlljFdj14YvwUqv ++R8op54WTvtdIJsAkDaHTFE2kbmf+2coDjIyTQnR+FyRkLqR/t6d3r/3VQoWPmekax+JV zJDE+PUCUm+MxHtzgJVCGwcrcftEs9hpnp4N+xBV/FKxZ3RAP9YhO7eLNpwuRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720194324; a=rsa-sha256; cv=none; b=H30J3t3RG8UjOZ0UbaM2FoXmFevXIBt3xuuTqhQe1UfQTRjGhX/JWYw7UwAiUHYE4gZqkV XW9J7r/pr4qv1hZPeu5vIpBQmYWbqsmEDaQpJyHoiOGtBz+3J+zPLxU4HiunGGN2AnAuWz 4O6iBWf/ZqkaRWDWTOr1xoYdWah7dPOT5c6VqfFCUFOhOCTmBW5juGkeMk81oe8wi1bLZD PDlj2k46bGSl74+k5abt04DGvdBnhBkRR5BrBjTbW6oc5uNo2zZ4fXtSykoksQ8tkITz5B sRIDO/o/L4Jv+fvKWU4qRsgvsqB6hGLpnbmzI9krXqCDM+2IAzAmCjNMO7uaxQ== 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=1720194324; 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=V+OTdKRXOMh4g3JzNKol15Co/VSd8zqGxmac3tq3o9o=; b=x+Nn7Y4F3uvo+NKrDIUTIvxbIotLiqJMtuy8HvfQvSpltyYS4WLdjyYysbmghispXjIMKn I3lrh+2dwofdbZ51pTuGQx3I4DLosQAaMbX8KviOlSYLqSiWGz4YW5sB079UsNNDnvBuXl rcfL5sS9wVgAHLgGHQdkADRCic7ggupMHf/rxLxUmqulo94ccWre9qG7UWKoblMpke6R1x K8VWqsT8UnQ9yoZv8SUe27Ripcz9TfCgsEJ/EWYT2B9y1bkOp6yYiVNDRywp4iCX8XED9S up8vnGfUzkjx47lKOjNut0KwnR9U3NRkr7ANiHIu5i4Lg2sa6ClKGJPilO9Qgw== 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 4WFyX43d4Vz12c8; Fri, 5 Jul 2024 15:45:24 +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 465FjOe5049080; Fri, 5 Jul 2024 15:45:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FjOCO049077; Fri, 5 Jul 2024 15:45:24 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:45:24 GMT Message-Id: <202407051545.465FjOCO049077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c5d9624226e5 - stable/13 - enc.4: Remove a redundant word 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c5d9624226e54e1edeb07b7233a7f9ffe156ca34 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c5d9624226e54e1edeb07b7233a7f9ffe156ca34 commit c5d9624226e54e1edeb07b7233a7f9ffe156ca34 Author: Igor Ostapenko AuthorDate: 2024-06-30 09:27:05 +0000 Commit: Zhenlei Huang CommitDate: 2024-07-05 15:43:44 +0000 enc.4: Remove a redundant word Reviewed by: zlei MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45706 (cherry picked from commit 4ca4a3b1c8e33cafcd9462e2d068246153846d57) (cherry picked from commit d25d517db2e6b21753de39c68fd440c62dfe58d6) --- share/man/man4/enc.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/enc.4 b/share/man/man4/enc.4 index 87ff46878266..86f14d2bf290 100644 --- a/share/man/man4/enc.4 +++ b/share/man/man4/enc.4 @@ -126,7 +126,7 @@ The special value 0x4 can be configured in the .Ar ipsec_bpf_mask and packets will be also captured after firewall processing. .Sh EXAMPLES -To see the packets the processed via +To see the packets processed via .Xr ipsec 4 , adjust the .Xr sysctl 8 From nobody Fri Jul 5 22:06:07 2024 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 4WG6zM59SHz5QdVC; Fri, 05 Jul 2024 22:06:07 +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 4WG6zM4fMyz428p; Fri, 5 Jul 2024 22:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720217167; 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=ewKGB+zcJrKKOoDd6yHcOZDNhRFX6jniLvOOun+3hBU=; b=x6SVvASCvRY9MAg4wcnHm+6MlSBHwL3JV18z0ACuRxwgTbUfxg+RHgx5UIH0MxScLYhxX5 EsbVNgFV8A4Dgb6TCUwaH/f46cFzM7kAePjSGgAjvfKojrvia25SboYVQsLpawEYneqNHL kJcimR+6hrJBQK2t46WyidtjdLl/OlonbCvdlCYnD+PfKWy2gRtZIfEFuDZUUoYeZrkdz8 rKcwnkF2Ub9AMjLXZCfc4+U3rimyqA7pXyQqESXuW6ZZ+C+T13mVgug/RNf2fUpZim6Ih1 ahNkx1WkKvHhsTaoVEetg1J9cqGGFJ08U1R3CxhMYkgrYIBe6HYqI47szt1W7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720217167; a=rsa-sha256; cv=none; b=ussantwqDpxPa4HkwJmHiDHAur3Ao8+ZUm7u0PfEt4eVR0KVIkyV596rQzJCXV2sQZQUU1 rtj1j7XjzE3N1DMD+oH+Uz6yjKZM1DcLLTaAVtwGgbBuKTERBxc7miTyKYaXA0boa+OuyT iKl9f8ErPIKXzUzpByKm5mcAxJg+bUy0+qVYHQgU0QwcnZIngM2+rSFgSKY15vmr1O1mCn 8ukCM7O3ATRni/RECtAs0lVuhXKavWSAiPz+j+LaRRTbgIzVGAPaBU3UwFGvetYwjWUqR/ 6Xalj98MNhb9uBRYpyJSDUPtLttSjxvOMQOyMBj1i+XjoAjctpUu0DOaqXma7Q== 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=1720217167; 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=ewKGB+zcJrKKOoDd6yHcOZDNhRFX6jniLvOOun+3hBU=; b=PnHpyKBmxykcT/wgwWfEQeLNbzhgCehYWt+UiVoRsxwh6Ge+oHKLOhmiVHOTHvk0/ldM2y ga/q/0Ar2hFnVOZzr4tCd84L1htiTwEsFJQ5cNx+nFNMdjYKIOD0sbbfq0kOjmyaslyLRH JFBKpDdQLJ6YfVb/cwbWMHMT8dRzAJHWQJNQ5erimra3Z6OyTHFRY1zXYy6BxgW3ZPmwzN 11sbQJcPl/UL1Ol2s7xF1D8Gplep7qVsFOwqq7NhTPWvkk1EIjuV8C+fcz8WqTnlHs7i/D MAS64PwqMNVCgIBMpR9wV2C6JnQVlXzwZpNUh2wbAE7/u0XFzKPzTAWcFGvI5Q== 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 4WG6zM47LLzDsq; Fri, 5 Jul 2024 22:06:07 +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 465M67Lx088602; Fri, 5 Jul 2024 22:06:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465M673P088599; Fri, 5 Jul 2024 22:06:07 GMT (envelope-from git) Date: Fri, 5 Jul 2024 22:06:07 GMT Message-Id: <202407052206.465M673P088599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c15290fb9d8f - main - tftpd: Code cleanup. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c15290fb9d8fdf4b11b9c6e7406b67c73a98402d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c15290fb9d8fdf4b11b9c6e7406b67c73a98402d commit c15290fb9d8fdf4b11b9c6e7406b67c73a98402d Author: Dag-Erling Smørgrav AuthorDate: 2024-07-05 22:05:49 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-05 22:05:49 +0000 tftpd: Code cleanup. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45871 --- libexec/tftpd/tftpd.c | 91 +++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 50 deletions(-) diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index 3f67ad2920cf..a51fb4742985 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -680,28 +680,27 @@ find_next_name(char *filename, int *fd) int validate_access(int peer, char **filep, int mode) { - struct stat stbuf; - int fd; - int error; - struct dirlist *dirp; static char pathname[MAXPATHLEN]; + struct stat sb; + struct dirlist *dirp; char *filename = *filep; + int err, fd; /* * Prevent tricksters from getting around the directory restrictions */ - if (strstr(filename, "/../")) + if (strncmp(filename, "../", 3) == 0 || + strstr(filename, "/../") != NULL) return (EACCESS); if (*filename == '/') { /* - * Allow the request if it's in one of the approved locations. - * Special case: check the null prefix ("/") by looking - * for length = 1 and relying on the arg. processing that - * it's a /. + * Absolute file name: allow the request if it's in one of the + * approved locations. */ for (dirp = dirs; dirp->name != NULL; dirp++) { if (dirp->len == 1) + /* Only "/" can have len 1 */ break; if (strncmp(filename, dirp->name, dirp->len) == 0 && filename[dirp->len] == '/') @@ -710,30 +709,20 @@ validate_access(int peer, char **filep, int mode) /* If directory list is empty, allow access to any file */ if (dirp->name == NULL && dirp != dirs) return (EACCESS); - if (stat(filename, &stbuf) < 0) + if (stat(filename, &sb) != 0) return (errno == ENOENT ? ENOTFOUND : EACCESS); - if ((stbuf.st_mode & S_IFMT) != S_IFREG) + if (!S_ISREG(sb.st_mode)) return (ENOTFOUND); if (mode == RRQ) { - if ((stbuf.st_mode & S_IROTH) == 0) + if ((sb.st_mode & S_IROTH) == 0) return (EACCESS); } else { - if (check_woth && ((stbuf.st_mode & S_IWOTH) == 0)) + if (check_woth && (sb.st_mode & S_IWOTH) == 0) return (EACCESS); } } else { - int err; - /* * Relative file name: search the approved locations for it. - * Don't allow write requests that avoid directory - * restrictions. - */ - - if (!strncmp(filename, "../", 3)) - return (EACCESS); - - /* * If the file exists in one of the directories and isn't * readable, continue looking. However, change the error code * to give an indication that the file exists. @@ -741,18 +730,20 @@ validate_access(int peer, char **filep, int mode) err = ENOTFOUND; for (dirp = dirs; dirp->name != NULL; dirp++) { snprintf(pathname, sizeof(pathname), "%s/%s", - dirp->name, filename); - if (stat(pathname, &stbuf) == 0 && - (stbuf.st_mode & S_IFMT) == S_IFREG) { - if (mode == RRQ) { - if ((stbuf.st_mode & S_IROTH) != 0) - break; - } else { - if (!check_woth || ((stbuf.st_mode & S_IWOTH) != 0)) - break; - } - err = EACCESS; + dirp->name, filename); + if (stat(pathname, &sb) != 0) + continue; + if (!S_ISREG(sb.st_mode)) + continue; + err = EACCESS; + if (mode == RRQ) { + if ((sb.st_mode & S_IROTH) == 0) + continue; + } else { + if (check_woth && (sb.st_mode & S_IWOTH) == 0) + continue; } + break; } if (dirp->name != NULL) *filep = filename = pathname; @@ -766,27 +757,27 @@ validate_access(int peer, char **filep, int mode) * This option is handled here because it (might) require(s) the * size of the file. */ - option_tsize(peer, NULL, mode, &stbuf); + option_tsize(peer, NULL, mode, &sb); - if (mode == RRQ) + if (mode == RRQ) { fd = open(filename, O_RDONLY); - else { - if (create_new) { - if (increase_name) { - error = find_next_name(filename, &fd); - if (error > 0) - return (error + 100); - } else - fd = open(filename, - O_WRONLY | O_TRUNC | O_CREAT, - S_IRUSR | S_IWUSR | S_IRGRP | - S_IWGRP | S_IROTH | S_IWOTH ); - } else - fd = open(filename, O_WRONLY | O_TRUNC); + } else if (create_new) { + if (increase_name) { + err = find_next_name(filename, &fd); + if (err > 0) + return (err + 100); + } else { + fd = open(filename, + O_WRONLY | O_TRUNC | O_CREAT, + S_IRUSR | S_IWUSR | S_IRGRP | + S_IWGRP | S_IROTH | S_IWOTH ); + } + } else { + fd = open(filename, O_WRONLY | O_TRUNC); } if (fd < 0) return (errno + 100); - file = fdopen(fd, (mode == RRQ)? "r":"w"); + file = fdopen(fd, mode == RRQ ? "r" : "w"); if (file == NULL) { close(fd); return (errno + 100); From nobody Sat Jul 6 16:03:05 2024 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 4WGZt15xy7z5Qsqf; Sat, 06 Jul 2024 16:03:05 +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 4WGZt13TZhz4kwc; Sat, 6 Jul 2024 16:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720281785; 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=KbTAJm9qfZzyHUf8pqI2CQctfsra5kM2iWMV5YNbvP4=; b=pD7lDKBDjptkyauo4W55BorOq2OugTmHCa5YxQSx11Y1dluhpTE5QpmHNZPGrlAQOjPtCi vfVyRRfYjg5ArswgLrRbF67HKBuO8IlSoWeMI27ibpFNcMTFL9DiEmuDgVFE+/Xn220p/E z1hLZNC/6lWtWcC5qdZnbjQICMwyA0XHoh1zcdC936Zq1A8HlhoGCMdGArmOkhsT4jecrE 6vmODQVT/VjiA8HJLjGNDY8Bh3KejDMw15CBpG8fZ57e1zHic1v5rCSs7hAJazfzUvD6Zl L9jeRRtEcWNKTOcPgCSXrpTNbRddLZD7KXvIO2Odh8UmOVjNgFr+7Ktfq1TfBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720281785; a=rsa-sha256; cv=none; b=ihp8UveDaLSo8iQKWvrFoDxOAJp5qta87/FtVYyHXEEvseQvCy6jmr5u5LrX/xKVW0RFnA 4+uua4Ahaqde+ztKvJcdDxfve4z0/dMECytxUjOf8Tj/pyCZeT+563b5YCWpTGGh/VPIJ3 04vzj+IbszUpcowrfB1NOfDaVRbkHHhbljQNQgKFYiSuSgele7RIzB6KgcfFoQW2ipxHZY cbTs+XZ4wRlQp2X1PSS+o6FtKY2c2VwImxFgPPiyj6YVUYxJ4UcdeEQ8fPRtp25z/cempO bl7bj2RKu9Nqf4+D5mjzSwlaZs10cpdxTTZk5DaldogI43bEdMET91efMNfj3Q== 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=1720281785; 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=KbTAJm9qfZzyHUf8pqI2CQctfsra5kM2iWMV5YNbvP4=; b=ShsiJtwyiXJ5ZrAg7LvZWkaqBqc5kcO6phFRE7xLtqN8dB3fpfmZQA6jCr8ASZJekff4iG elbAArIKgatfzojf4GLz50eyb3pk8a+VH2B89duCV0B+mJrVA9hgFHtQmwKaqSL3fzweRt N7LsEBMivRZ9ZHaTqKNSFDEnA5Exiojn7d+RIFiWfj71oTCkeMjL26Np2m3ywXGuu2ET73 5hskt7Odh4sb4hIDZgViqftY8W5K4EEEhJBW/jjFCOA4DKyq3OkoZ+nS7xqvL7dOg8isXg CSQa4dCLzV9sVdBominvIsO7WHfptbEEYYlMyxJv22m7/TcH7t+We5n9tdrNMw== 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 4WGZt12Q46zmn0; Sat, 6 Jul 2024 16:03:05 +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 466G35BY020211; Sat, 6 Jul 2024 16:03:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466G359I020208; Sat, 6 Jul 2024 16:03:05 GMT (envelope-from git) Date: Sat, 6 Jul 2024 16:03:05 GMT Message-Id: <202407061603.466G359I020208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9a04df0515c9 - main - cdefs.h: Remove NO_ANSI_KEYWORDS 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a04df0515c9bdc21cc26b31b0cdba14c0e12584 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a04df0515c9bdc21cc26b31b0cdba14c0e12584 commit 9a04df0515c9bdc21cc26b31b0cdba14c0e12584 Author: Warner Losh AuthorDate: 2024-07-06 16:02:35 +0000 Commit: Warner Losh CommitDate: 2024-07-06 16:02:35 +0000 cdefs.h: Remove NO_ANSI_KEYWORDS Remove very old, deletion of ANSI keywords. Once upon a time, it was common to want to do this. Then we only did it for non gcc compilers, then all compilers claimed to be gcc, so we never did it. These days, it's about useless to keep around since there's no compilers we can test it with. It's an odd little artifact. Also, the advice in the comment is wrong: if you define NO_ANSI_KEYWORDS, you can't have progams that use const, etc as identifiers because they will be deleted. Further, our header files have the 'bare' ANSI forms of these, so it's a catch 22: You'd need them deleted for .h files, but not for the code. It's such a niche case these days that it's best to just remove it. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45861 --- sys/sys/cdefs.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index e08da15e1d91..b8908138bd65 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -137,24 +137,10 @@ #define __P(protos) () /* traditional C preprocessor */ #define __CONCAT(x,y) x/**/y #define __STRING(x) "x" - #if !defined(__CC_SUPPORTS___INLINE) +/* Just delete these in a K&R environment */ #define __inline #define __volatile -/* - * In non-ANSI C environments, new programs will want ANSI-only C keywords - * deleted from the program and old programs will want them left alone. - * When using a compiler other than gcc, programs using the ANSI C keywords - * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. - * When using "gcc -traditional", we assume that this is the intent; if - * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. - */ -#ifndef NO_ANSI_KEYWORDS -#define const /* delete ANSI C keywords */ -#define inline -#define signed -#define volatile -#endif /* !NO_ANSI_KEYWORDS */ #endif /* !__CC_SUPPORTS___INLINE */ #endif /* !(__STDC__ || __cplusplus) */ From nobody Sat Jul 6 16:16:45 2024 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 4WGb9n72pYz5Nx9x; Sat, 06 Jul 2024 16:16:45 +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 4WGb9n6TF7z4nd9; Sat, 6 Jul 2024 16:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720282605; 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=7hHOaOca4eIE2lOzGWOa7x3Y0Y0Xi4uZUxybnYpgRCU=; b=hquWYCxu6JGOx1cRixe4zmQ7cOA4vzY7M+sIxzB6x4jCR3nk9G83qrylz00iytOyDTm/Yw bgTyTqYKctYwGu9SEPRMSsVZPkm09UR0jJZk5vhuGpJMUBMqzZQQ+MOMvTAh7VQnk037dz q0INVdEFoRopUxMcM7OAEgQLyXki3St/x6q2YIs+E1/E2kuy6XJWhwl12GVfkc4OUWxkp3 MvTluN3CnbpvGLILqybjsUE3WGvuPx75kur3iarn/RxSZKOi4600SaH3/7dUXPUCTgvMkB JaOiGSIc5wcwV32N4cTy9D296R9BkO9FCmJO01tVKJHVm2rLuyfNui8FybnGOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720282605; a=rsa-sha256; cv=none; b=wK9qG9LngUPXgcFyhx9pyY0RoVvaa3DuxscqPuA6YGZ2oUOjE97u4Ac1yDsQZ8G3JFxDQr V2GeR/4Qm4rqraUkWLSzX+NpAp/ZBWIhtkqpyRDSgKMUyYq8U7IqTNTdgahDKpuD4ZgrvH +8RNl/KQigg+IElMCa9gaB1KTivzkKoNi1QnXy0x3WUEpeO3Zi/V7WltaNPcKI8wIv0OOS mER5LljsTK9uoKWttqYY1O6BzoKrBZTdcCMH0lk9REV+iPVWxsf7EQA9zhHymxTzMs3CPL TwMSFZKuEvH4UwhAlIMYW+I+0gJ3PumfpWtpYPyzNgNfBHqe+IY6erH4OdYunQ== 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=1720282605; 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=7hHOaOca4eIE2lOzGWOa7x3Y0Y0Xi4uZUxybnYpgRCU=; b=Rihn5IJYbweHaldLmSNZF28A1UfsA10sTi8UGjnPwSVCdaWOALqBZlambrfR3inSPEXLOH tP6XcjsHMt637LZOHI95/HMYeUHSPfhM4Fcu1QY7ddfJcDdr9xGvQ+m/nkcjlKMVo3fHVF o/Np7IJDitaMVjNtRvRWYVZFw3hrsGX/NyH4wGaTxa1bCsgepue/ubAm+5dHQTg3eVi6l5 UoQLSIPYMuzmAsEvxdFeKNQ+6rZLBhZM9uRlk/2TNpigmmf9bEF278G/cakSeKm3lQL+Ne 6OY13eoqKIMoNduCwqtZCaKP5Yd1kGKuKPaCllG/xnpm5P8p32EfKiHoWMY+MA== 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 4WGb9n5jJjzmR0; Sat, 6 Jul 2024 16:16:45 +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 466GGjXi038338; Sat, 6 Jul 2024 16:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466GGjTK038334; Sat, 6 Jul 2024 16:16:45 GMT (envelope-from git) Date: Sat, 6 Jul 2024 16:16:45 GMT Message-Id: <202407061616.466GGjTK038334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0b82dac337e7 - main - cdefs.h: Add back fallback define for __printf0like 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b82dac337e7db79fa1a78bb29f2de6825a877ab Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0b82dac337e7db79fa1a78bb29f2de6825a877ab commit 0b82dac337e7db79fa1a78bb29f2de6825a877ab Author: Warner Losh AuthorDate: 2024-07-06 16:07:52 +0000 Commit: Warner Losh CommitDate: 2024-07-06 16:15:12 +0000 cdefs.h: Add back fallback define for __printf0like The format function printf0 is originally a FreeBSD extension. clang has adopted it as an alias for printf. Starting with gcc 11, gcc doesn't do a NULL pointer check for fmtarg. Instead, it has to be tagged with a nonnull attribute, so this gives us the behavior we want. For earlier gcc and other cmopilers, define it away so do not get false positives for NULL pointers for the err*/warn* family of functions. This also fixes -Wsystem-headers by avoiding print0 entirely. My testing for 67d1a1cd9e77 didn't test that case, so I introduced a regression. All these compilers need to be considered because __printf0like is used in err.h and stdlib.h. Since it's used in system headers, it has to work on all the compilers we support on FreeBSD, not just the ones that can build FreeBSD itself. __printf0like will likely be deleted in the future, since the proper way to do this is with _Nullable or _Nonnull, but the compiler support for those hasn't been completely evaluated. Noticed by: jhb Fixes: 67d1a1cd9e77 Sponsored by: Netflix Suggestions by: jhb Differential Revision: https://reviews.freebsd.org/D45836 --- sys/sys/cdefs.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index b8908138bd65..6b861b1903f6 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -338,9 +338,7 @@ /* * Compiler-dependent macros to declare that functions take printf-like - * or scanf-like arguments. They are null except for versions of gcc - * that are known to support the features properly (old versions of gcc-2 - * didn't permit keeping the keywords out of the application namespace). + * or scanf-like arguments. */ #define __printflike(fmtarg, firstvararg) \ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) @@ -352,8 +350,18 @@ #define __strftimelike(fmtarg, firstvararg) \ __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) -#define __printf0like(fmtarg, firstvararg) \ - __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) +/* + * Like __printflike, but allows fmtarg to be NULL. FreeBSD invented 'printf0' + * for this because older versions of gcc issued warnings for NULL first args. + * Clang has always had printf and printf0 as aliases. gcc 11.0 now follows + * clang. So now this is an alias for __printflike, or nothing. In the future + * _Nullable or _Nonnull will replace this. + */ +#if defined(__clang__) || __GNUC_PREREQ__(11, 0) +#define __printf0like(fmtarg, firstvararg) __printflike(fmtarg, firstvararg) +#else +#define __printf0like(fmtarg, firstvararg) +#endif #define __strong_reference(sym,aliassym) \ extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) From nobody Sat Jul 6 17:18:12 2024 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 4WGcXh4rKFz5PBwH; Sat, 06 Jul 2024 17:18:12 +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 4WGcXh4GsYz4vWl; Sat, 6 Jul 2024 17:18:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720286292; 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=QDG73dA0B4ElcAdvxpf4Re6GE6ysvUXZFWzGLNHhXQw=; b=bFvNpCRo1Orj3qMTdvKTaI9sBcZUdVoGl2wwN23z5VzJJievBZSX7WSBVvKqKQCRp/9WCt b7PtftZXBjJanwPEiOQnt0WAY2h7G/IAuEGKkQ1oBuOGROjFmtRlinG4EiqZ+CZ6ahN6sv yT841v7SWu9GWpS2sRhm6DU6+lXRnnkBk+Rn7zFIUBk2mO6VWy5SVZcW5YrRfmnCOP9O/H 2ihn81aTm6ZLlO5Wm7pnZ46nG9leucN8qBITvMN2XkmC621/7NzQ04dViSbKyHmEGk1icu GwHIMoQ8uHhDHis1V/klhWpuCLhzWahmcebdbEpeNq/1iC1v7Davy4HJ7EtdOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720286292; a=rsa-sha256; cv=none; b=xe+ibjPeGSjGTUbO9MNx79aP9PQlgPaDj/i2iw7PyGHyk3VcQxEz9xRkG4TjQ6EszeCAm7 wqsBAdL8FlCAotF0Hy8vmBBS0z4Y0w4tyr3ZWd756BJe8qqywZdiJeEKgVdMnscpCD7NUO 6C0aTCntQ1GUFNPyHQzfeGIkus5JVSynEMUO8BMg9KEHeL5r4i/3vrABkVuAIN8/ZjvNxi ionsmwv/GXX8y7jPnyMrMF0yfGhaK1SDlcpo8UJGJ8yuJS2kIhwKJzuY0ZtFCTAeHOXCtc u3QeKOyh3upCql+401f5K1zMkFkhjRh/1bqMvA+gTWgH+OGVMkGpw0GEc6raeA== 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=1720286292; 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=QDG73dA0B4ElcAdvxpf4Re6GE6ysvUXZFWzGLNHhXQw=; b=ck5pZhAkLiY8vY4i3Yt6vcbnToSsPSN0NSJCdKAvAWgxBLzvS9Z2gh06MiX8XyzhuKlYEy qs5oVTLlivBy54wC/0jtV80HXg2Ql/tdBKCOUh3sAXjkuNA8URdzrecn6NmL/epHLWbdV+ qlHXr/2y2KVStybkifetF/2RljjKZw1N9OAXJvu6rOfspkzInn5v4gg8X58zLUKVZeANN1 A2g+cTM9MpeoxfWf2WASxesQlyKHWsdz9aMb6spYUWcN9xba/eZjMYMakZ3XI+iey4wKoR RuDuoG5LpYKYmDwwwdtJKLgm8IVn0NLZpfqwbFluWFnjtIyndQIY/GRYFBhKIg== 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 4WGcXh3t90zpNt; Sat, 6 Jul 2024 17:18:12 +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 466HICjM071942; Sat, 6 Jul 2024 17:18:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466HICA9071939; Sat, 6 Jul 2024 17:18:12 GMT (envelope-from git) Date: Sat, 6 Jul 2024 17:18:12 GMT Message-Id: <202407061718.466HICA9071939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: ed807f7bcaec - main - release.sh: Pass ARCH_FLAGS when setting VMSIZE 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed807f7bcaecbf32b0b81a7d18cee489a3666157 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ed807f7bcaecbf32b0b81a7d18cee489a3666157 commit ed807f7bcaecbf32b0b81a7d18cee489a3666157 Author: Colin Percival AuthorDate: 2024-07-06 17:15:22 +0000 Commit: Colin Percival CommitDate: 2024-07-06 17:18:03 +0000 release.sh: Pass ARCH_FLAGS when setting VMSIZE The default VM size may depend on the architecture. In particular, it is currently larged on riscv64 due to a toolchain issue which results in bloated binaries. MFC after: 3 days Fixes: 59c21ed6e811 "release: Bump default VM size for riscv64 to 6 GB" Sponsored by: Amazon --- release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/release.sh b/release/release.sh index 3c68f89c2cc3..cee0fbd5643d 100755 --- a/release/release.sh +++ b/release/release.sh @@ -337,7 +337,7 @@ chroot_build_release() { fi if [ -z "${VMSIZE}" ]; then VMSIZE="$(eval chroot ${CHROOTDIR} \ - make -C /usr/src/release -V VMSIZE)" + make -C /usr/src/release ${ARCH_FLAGS} -V VMSIZE)" fi RELEASE_RMAKEFLAGS="${RELEASE_RMAKEFLAGS} \ VMFORMATS=\"${VMFORMATS}\" VMSIZE=${VMSIZE}" From nobody Sat Jul 6 17:49:58 2024 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 4WGdFL3bTHz5PGYB; Sat, 06 Jul 2024 17:49: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WGdFL2wgGz4yxM; Sat, 6 Jul 2024 17:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720288198; 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=OqDcnP5d2f2rZd2kHKJZSt5Z4lri4zD1B6cNv9RWWTg=; b=JFlLr/4R2VXwBqOldGci64R90VEz7aKq8PeoetFq5YMFktn27pNoDOJaKhFlH6D81kbZbg o88FsgkFWPVlKQSORkjhkx5rEbzvQugvfLzIO3nG7tTkewslwRPRQ9yULBijg1omCXfr7b tr+SQnA4XUOD/Faa07vbvgFS0cq60pB/6oBQ5C26WPtiQJzEU0xmHsvd+TESSob8czC9fE YJvj2mF+yyg5a0HOshJYv6jpzMb5EWd/Jui58ZWhQsStBjnmfGjUJMLvxrf0gnhGcyWPHE Qxpfs8lXNk6oG5U86kxmqaJ3pHbcXQzqlSWtizx/Gc0omqQIR9hzySUbtukwQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720288198; a=rsa-sha256; cv=none; b=aP4CQJqaAfj9R+BZvCMIyGnDoT/A1XRiJqtESkHAvsaz5ZV7sCbJZDtINZIBicOF/eo+21 CsOnLlmBW2/YnuBhN1vrpf7nqdVhjIBNSLF1tSE2pY5m8g6BK56kfs4efXvdAAUYbxLUCP ZuUz4KMKissbGgHgzRlReiklwdOre1kLOX85HN7+oL9yuS1rSdw/gtpk0m8EJJk17AJ+/+ IxMJgceu/KP7T2oxwEtwHncKRkPm+PCar517H/tNlUqVsvfjuHifPzq9HxdzFOHoIlNk5u RluM6OPp1v7PtHSanhoGLG5HFySl1X3wF7nG2riitAWmC4LH/gLpVCU4YOvd+w== 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=1720288198; 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=OqDcnP5d2f2rZd2kHKJZSt5Z4lri4zD1B6cNv9RWWTg=; b=brwGAF7WZ2oopXwTV49j9ZK4PwxYEpxShMwIewRZDaUUB/vaRwVX0efIsBZ92F3hSv5rkt dTiV1lG9cgQ7Q4Ld23gQmhnIuCK94hZ7j7UWMn/eBJ3NAp/UIS6hZk5+t2MFc6HwO+vOMO TwT40bkxz2fk6yExwR+tOg+XXBC3Xq3tcJDBxHa78KA2MlOtpHIVuE/rs724lEMPBkHL5w gJbse4d8Ir+XhVHgVfq4kXqfJUp5VT4yWQ8OPkonjF+Cc2UOV0hHj7/Z2pNLQLV7zuRrln 3oJrBaEx6kJS++TzBtTYK5a0Odsx9sGKyUGpNHLF+iDuSX76q7/5fCMMUr0UPw== 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 4WGdFL29Byzq54; Sat, 6 Jul 2024 17:49:58 +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 466Hnwmo022703; Sat, 6 Jul 2024 17:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466HnwtV022700; Sat, 6 Jul 2024 17:49:58 GMT (envelope-from git) Date: Sat, 6 Jul 2024 17:49:58 GMT Message-Id: <202407061749.466HnwtV022700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: a9d7f098b865 - main - mps(4): Correct a typo in a source code comment 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9d7f098b86576006f5aeb312521bfde5ac77c77 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=a9d7f098b86576006f5aeb312521bfde5ac77c77 commit a9d7f098b86576006f5aeb312521bfde5ac77c77 Author: Gordon Bergling AuthorDate: 2024-07-06 17:49:30 +0000 Commit: Gordon Bergling CommitDate: 2024-07-06 17:49:30 +0000 mps(4): Correct a typo in a source code comment - s/vender/vendor/ MFC after: 3 days --- sys/dev/mps/mps_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mps/mps_pci.c b/sys/dev/mps/mps_pci.c index ece49435b39e..7a0c577eb72a 100644 --- a/sys/dev/mps/mps_pci.c +++ b/sys/dev/mps/mps_pci.c @@ -122,8 +122,8 @@ struct mps_ident { 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2208" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_1, 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2308" }, - // Add Customer specific vender/subdevice id before generic - // (0xffff) vender/subdevice id. + // Add Customer specific vendor/subdevice id before generic + // (0xffff) vendor/subdevice id. { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_2, 0x8086, 0x3516, 0, "Intel(R) Integrated RAID Module RMS25JB080" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_2, From nobody Sat Jul 6 18:24:04 2024 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 4WGf0h3HPJz5PMJk; Sat, 06 Jul 2024 18:24:04 +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 4WGf0h2ZdHz546d; Sat, 6 Jul 2024 18:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290244; 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=Dtgr7IAPGw1nSIHAzb5zRcm9SYyScFEB2VmKLdyT+NI=; b=dI2P5bbqfXXUIs2G/2+AZkSgUbVrMa+GdGTq1eZpVOFB/LJtu/y81xCnOaqHkJ1Mthecfn wQgOjYG4wHQ4veX9lJLNmb3AwGNZYE3brCeToziBJB7C0r7RWXQiVozxnkb6obOWKJbLwu Rx02USAEz9pFSa6JfiUvzYTcJhTS3+ibAvD5lx+yw/b0TbJ0Xp6jihA8vlEQz5UzB+X31T YGWmH+bd+VkcAgsYioGg9M6SRERO6Vr9dcKTQc6ND0PczxU8S2nwiai1Pu1m75tRGjTdca ZLhq/Gd+IQiLSnBXFuy7PRkuxL0lpSv0xbHqsZRa94La1dNDW6meU201LqFPUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290244; a=rsa-sha256; cv=none; b=wMfKtDR9KVQpIAxdy96wvLakpKyS+IyCIWUFD3wk/XKhRoDsCsrCn+mWeT1PI+/VAG7cZs dRzciK0wo4Z43N8OiDDTWQRSOR/KkyvO6CBaxI2arvKNHVzy/6P4oI5ZJT7fNuhW9UHCX1 DHbv8v0aX8jNfUvICKj97SdrBtOJR90iwdcIpP10RSe3mhaGjs4xcR/i+tdY3SQ7WCrHEP Zksbe8J3U4X7Nv6QyKync5dD+OHGmSM+YT3VjxLa2yTgxl+tdV/vEud1iaFL+G4aPlFJbS IonZJhp7Nm7/PiAOevciffBfgmxwFqDghrD9ZDmiJSXaKNIhXzVd63rkXDyrrg== 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=1720290244; 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=Dtgr7IAPGw1nSIHAzb5zRcm9SYyScFEB2VmKLdyT+NI=; b=tREcKEF2LukbWYXDPpsvY9csVO7hMs6aYH1pxAM8O7XMN4rUIc7zcMNnz4D0aDO1VjQV4K Bl32OcxLbtGdwr6L/D6+nT+Xj6af684BRzH1gIrD7bs0/cwft1lwIPLrvpFJpHVAeZxYOp L8azYy+D6feDkcDjmVD/M06fn6fUp8Da6KWIyqzmR/SE16zqhjHQ63f7z7KbX6cdwx7Tx1 B0rhhQR+BmtYVdtDtTDCkGHYoJmlWXECS3n3e5x4sUbxvBkEqnvc0FF7L5sAuPa5wnS0sU NlZMdejJvuoz6zAtVlLWM+EYBwz/UyJfTVZREqpv6b+Sn1MyQ7cX9Dpii1TnMw== 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 4WGf0h26Xczqw8; Sat, 6 Jul 2024 18:24:04 +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 466IO45d090487; Sat, 6 Jul 2024 18:24:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IO4bp090484; Sat, 6 Jul 2024 18:24:04 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:04 GMT Message-Id: <202407061824.466IO4bp090484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: f30af1f037a6 - main - sound: SNDCTL_AUDIOINFO: Do not skip physical channels if VCHANs are disabled 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f30af1f037a68947edbabebc7ab495cd1b7a4ec8 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f30af1f037a68947edbabebc7ab495cd1b7a4ec8 commit f30af1f037a68947edbabebc7ab495cd1b7a4ec8 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:08 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:08 +0000 sound: SNDCTL_AUDIOINFO: Do not skip physical channels if VCHANs are disabled Currently, we are skipping physical channels when servicing SNDCTL_AUDIOINFO, and VCHANs when servicing SNDCTL_AUDIOINFO_EX. However, if we call SNDCTL_AUDIOINFO with VCHANs disabled, we'll eventually skip all channels, resulting in some of oss_audioinfo's fields containing wrong information (e.g min/max_channels). Fix this by adding an exception to SNDCTL_AUDIOINFO not to skip physical channels when VCHANs are disabled. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45722 --- sys/dev/sound/pcm/dsp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 0eb41faaae45..6ac85635b080 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2159,9 +2159,13 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) /* * Skip physical channels if we are servicing SNDCTL_AUDIOINFO, * or VCHANs if we are servicing SNDCTL_AUDIOINFO_EX. + * + * For SNDCTL_AUDIOINFO do not skip the physical channels if + * there are no VCHANs. */ if ((ex && (ch->flags & CHN_F_VIRTUAL) != 0) || - (!ex && (ch->flags & CHN_F_VIRTUAL) == 0)) { + ((!ex && (ch->flags & CHN_F_VIRTUAL) == 0) && + (d->pvchancount > 0 || d->rvchancount > 0))) { CHN_UNLOCK(ch); continue; } From nobody Sat Jul 6 18:24:05 2024 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 4WGf0j5cTlz5PMGn; Sat, 06 Jul 2024 18:24:05 +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 4WGf0j3DPlz544Y; Sat, 6 Jul 2024 18:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290245; 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=u8GpEtRvW5z8moZeHm5wndQ5E/8qIsZAEZg849KGu1Q=; b=Bhpp5zZs6Dq37lSuipHXxU9RDFnkEnNARSAgE0ELbMlkfN6nGTIHfp2uvH9Xp/slwZfrye TaNCsvbbqoD/pJIN402awaZ3SNdImEwn75LeNIKJEUuV1gYUoZqD82Px1X400qgcw48GZ0 AzWQg0m9rXVi8YgX9vdqDakSpx76f51VtTCgt3+xD1Lj7F5f9IypwKBq6VD4vxF0ctZ42q H7WBFOHNysrFyUK20BSyIMq0MOqOTVQu4TxmTZ00zcfk8vb3d/AHnikqEJk9Kxjs3aPXFW lmfdYb/kiIHkyjO+3tDQXNEQgu3OGvPGUnwdaKKgERQ9SjVy7FylMLCgCGosFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290245; a=rsa-sha256; cv=none; b=tKbtVrP1/W3BNYq06AcoYhU3n4ez+jhi539/bTq4Va4wvItpqG9PMtq6rA9dptWme/HeZ2 Ka9sNnVtl+a1OsO0/CL637y3es1EIOvnJxds6fOCosckLSxW6c4EipdBgzWjr8oKhcn1Zp 38OIknBFWkDM0pU+DfWu+7m9OwShbQIwldOg2POMvv1lAhOpewo7DruKxPPsnGc1EgT6lo G/I01X1TrP3YYOQ8xbgUUSvpnfrmFjIEXeBGjLDphPAhwF+rMInGZoAfqHooupZ8STO81H kpoUJOpoNpEof9F/GEu1e74j+2lOzDNJNFPR/c0W70V0Py3yi7exg8cE9S/m7Q== 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=1720290245; 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=u8GpEtRvW5z8moZeHm5wndQ5E/8qIsZAEZg849KGu1Q=; b=LPhoTVaM9R/QQxHbGqhFsXKqMtBSJ3aafygH7u4/6uu9MwJwEqC8/2jNqmRPwtGw48lDrq Gu/usbkVXeQr5QD2Q3JDfknzwcssDfUUpgO4dOwg1ATQhAkchDD/KJrdlJQb5dZpFpUxEw y08EgpIn1ltt1DKjNR4mxx8zWxUl151UaP5ds0XZiHl6pLgF+iO6VrcFSsL3BGZYMbDI+T c6TK2Tr/cbs+weRBJnhogW8dz8pFUyiincNZ9gwtW9AKFEnavjoiFEx9IAafIdupwDth2G kw5RgHbjB8zaOTXO0hd87qjLRhefwQqiQCSjTSNvl7x1gnzqBZ6UKtCO2q6TOw== 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 4WGf0j2qxqzrWZ; Sat, 6 Jul 2024 18:24:05 +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 466IO5QM090540; Sat, 6 Jul 2024 18:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IO5X9090537; Sat, 6 Jul 2024 18:24:05 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:05 GMT Message-Id: <202407061824.466IO5X9090537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: d6d4586b0b7e - main - sound: Get rid of snd_sb16 workaround in vchan_create() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6d4586b0b7e3b01812e6c26818af78bf9b680a3 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d6d4586b0b7e3b01812e6c26818af78bf9b680a3 commit d6d4586b0b7e3b01812e6c26818af78bf9b680a3 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:16 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:16 +0000 sound: Get rid of snd_sb16 workaround in vchan_create() The snd_sb16 driver was removed in 716924cb4832 ("Retire snd_sbc ISA sound card driver"). While here, simplify sample rate assignment a bit. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D45662 --- sys/dev/sound/pcm/vchan.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 528c6fa62621..fa4fa2023b71 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -768,25 +768,10 @@ vchan_create(struct pcm_channel *parent) &vchanspd); CHN_LOCK(parent); if (r != 0) { - /* - * No saved value, no hint, NOTHING. - * - * Workaround for sb16 running - * poorly at 45k / 49k. - */ - switch (parent_caps->maxspeed) { - case 45000: - case 49000: - vchanspd = 44100; - break; - default: - vchanspd = VCHAN_DEFAULT_RATE; - if (vchanspd > parent_caps->maxspeed) - vchanspd = parent_caps->maxspeed; - break; - } - if (vchanspd < parent_caps->minspeed) - vchanspd = parent_caps->minspeed; + /* No saved value, no hint, NOTHING. */ + vchanspd = VCHAN_DEFAULT_RATE; + RANGE(vchanspd, parent_caps->minspeed, + parent_caps->maxspeed); } save = 1; } @@ -795,10 +780,7 @@ vchan_create(struct pcm_channel *parent) /* * Limit the speed between feeder_rate_min <-> feeder_rate_max. */ - if (vchanspd < feeder_rate_min) - vchanspd = feeder_rate_min; - if (vchanspd > feeder_rate_max) - vchanspd = feeder_rate_max; + RANGE(vchanspd, feeder_rate_min, feeder_rate_max); if (feeder_rate_round) { RANGE(vchanspd, parent_caps->minspeed, From nobody Sat Jul 6 18:24:06 2024 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 4WGf0k5dzsz5PMTp; Sat, 06 Jul 2024 18:24:06 +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 4WGf0k52Mtz53qM; Sat, 6 Jul 2024 18:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290246; 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=bE6bobQyOTZ4VkqfaovvcYgC1iEKou8QmVUbIcBGC6Y=; b=A7GZRepFbXYCPPaeZlzXPdzbMhOCv3m0971H/MYv8CPcDqrWNK0U7A35GS0HpGgCgKtUu4 5xxptHj8XLRxTdTIVyE0vDmyZJTGp764K5jy9C9RfpuTTal6RLaTSOjHYQQkfaNUPYzCJc wD8bVWXolatIM6KEn54aWjP9mAD5B8byHeG4ofa+j6hecngFqwDSrcTIVWxtuRRdFP3QMK RCJHcyc3L9yO6YvQDZ/y7NNTnTckIHy15KYX2+Qh4HeUnIvvBgAFlRw2DM8TaDiLfbbQ5w PQ+bvz685con8iGgNDaHq2gcXmMsgF44YAv4kA1OQ7/qLJKXQ45vG8VAwEm41Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290246; a=rsa-sha256; cv=none; b=qtujmc9nm/jHNd2ntGV7GjqA8KpJfulw390niL6dCjrtZxzRWuL2xx3LG9frRGNa++Ot97 25iSCjUGlcMBEXz49z7SPjKhOP7ISDCmsCrUOjtumWD8GI6LbtOS8c2t1Llkgtc7rfE9yV r+R6A7oqFBR2eeiceuzQb0X9okiyxCY6Q1WsU7lMHCRRVg0ofgQwxE3TIrjEXymrkpHirc c1m/7fIQ7SHYsFDQGxoRERdE6XN9zKowTqwkJCyb7fglZLGvHvVwJp+YyGSIeqmOU2vYL3 Etzly6hZsTKY4erv3PtLACZnv+8zd2vEdqQHIH+xeOP53H6lwI+cnm8vw+WCag== 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=1720290246; 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=bE6bobQyOTZ4VkqfaovvcYgC1iEKou8QmVUbIcBGC6Y=; b=L7DgYlDw2ODgCE9V0vrBgmT9xKPZVTERmm/KI291A9Hvqr2RsGIg93+gqkoZWHwt7pl1bD 10ec6NJUcKeIP8k3uHhyS7mE1VjfYfCd55jg1TnIvBcqfxNcttCyXPgSEHbQ8tePPi04Gc mynUXRKpm4cZHyKjxZeA3B/32t0GKgjGqGhwhdkata43A7FXYoLCOqq3K1DAoLw96Q140Y awztgR5eayuQm5RrBME4PQ2AByZ/nAVbZ/dMPIiS7oTvQ2dJBeV8fCfmykcpl9rBJXdWKL 9BpWnfWVdFB5uREjEsfp0ktyNNC2ynfw3nWDBsaqh5WqKirprZcdVTPsYMf2hg== 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 4WGf0k48pczrVt; Sat, 6 Jul 2024 18:24:06 +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 466IO6gS090588; Sat, 6 Jul 2024 18:24:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IO6uQ090585; Sat, 6 Jul 2024 18:24:06 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:06 GMT Message-Id: <202407061824.466IO6uQ090585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: fc76e24e583d - main - sound: Fix lock order reversals in mseq_open() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc76e24e583d45a3a59fd7ad4e603c0679eaf572 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=fc76e24e583d45a3a59fd7ad4e603c0679eaf572 commit fc76e24e583d45a3a59fd7ad4e603c0679eaf572 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:21 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:21 +0000 sound: Fix lock order reversals in mseq_open() Opening /dev/sequencer after a clean reboot yields: lock order reversal: (sleepable after non-sleepable) 1st 0xfffffe004a2c2c08 seqflq (seqflq, sleep mutex) @ /mnt/src/sys/dev/sound/midi/sequencer.c:754 2nd 0xffffffff84197ed8 midistat lock (midistat lock, sx) @ /mnt/src/sys/dev/sound/midi/midi.c:1478 lock order seqflq -> midistat lock attempted at: 0xffffffff811c9029 at witness_checkorder+0x12b9 0xffffffff810f18a7 at _sx_xlock+0xf7 0xffffffff8417f992 at midimapper_open+0x22 0xffffffff84182770 at mseq_open+0xf0 0xffffffff80e3380f at devfs_open+0x30f 0xffffffff81b8b4b7 at VOP_OPEN_APV+0x57 0xffffffff812da1e7 at vn_open_vnode+0x397 0xffffffff812d96b3 at vn_open_cred+0xb23 0xffffffff812c2c6b at openatfp+0x52b 0xffffffff812c2711 at sys_openat+0x81 0xffffffff84110579 at filemon_wrapper_openat+0x19 0xffffffff81a223ae at amd64_syscall+0x39e 0xffffffff819dd0eb at fast_syscall_common+0xf8 Expose midistat_lock to midi/midi.c so that we can acquire the lock from mseq_open() before we lock seq_lock, and introduce _locked variants of midimapper_open() and midimapper_fetch_synth(). Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45770 --- sys/dev/sound/midi/midi.c | 41 ++++++++++++++++++++++++++++++++--------- sys/dev/sound/midi/midi.h | 4 ++++ sys/dev/sound/midi/sequencer.c | 8 ++++++-- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 81c20580f7b8..d31d6ce0fa8e 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -181,7 +181,8 @@ TAILQ_HEAD(, snd_midi) midi_devs; * /dev/midistat variables and declarations, protected by midistat_lock */ -static struct sx midistat_lock; +struct sx midistat_lock; + static int midistat_isopen = 0; static struct sbuf midistat_sbuf; static struct cdev *midistat_dev; @@ -1470,16 +1471,28 @@ midimapper_addseq(void *arg1, int *unit, void **cookie) } int -midimapper_open(void *arg1, void **cookie) +midimapper_open_locked(void *arg1, void **cookie) { int retval = 0; struct snd_midi *m; - sx_xlock(&midistat_lock); + sx_assert(&midistat_lock, SX_XLOCKED); TAILQ_FOREACH(m, &midi_devs, link) { retval++; } + + return retval; +} + +int +midimapper_open(void *arg1, void **cookie) +{ + int retval; + + sx_xlock(&midistat_lock); + retval = midimapper_open_locked(arg1, cookie); sx_xunlock(&midistat_lock); + return retval; } @@ -1490,22 +1503,32 @@ midimapper_close(void *arg1, void *cookie) } kobj_t -midimapper_fetch_synth(void *arg, void *cookie, int unit) +midimapper_fetch_synth_locked(void *arg, void *cookie, int unit) { struct snd_midi *m; int retval = 0; - sx_xlock(&midistat_lock); + sx_assert(&midistat_lock, SX_XLOCKED); TAILQ_FOREACH(m, &midi_devs, link) { - if (unit == retval) { - sx_xunlock(&midistat_lock); + if (unit == retval) return (kobj_t)m->synth; - } retval++; } - sx_xunlock(&midistat_lock); + return NULL; } +kobj_t +midimapper_fetch_synth(void *arg, void *cookie, int unit) +{ + kobj_t synth; + + sx_xlock(&midistat_lock); + synth = midimapper_fetch_synth_locked(arg, cookie, unit); + sx_xunlock(&midistat_lock); + + return synth; +} + DEV_MODULE(midi, midi_modevent, NULL); MODULE_VERSION(midi, 1); diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index 567279d1e654..b200eed9bc74 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -41,6 +41,8 @@ MALLOC_DECLARE(M_MIDI); #define MIDI_TYPE unsigned char +extern struct sx midistat_lock; + struct snd_midi; struct snd_midi * @@ -50,8 +52,10 @@ int midi_out(struct snd_midi *_m, MIDI_TYPE *_buf, int _size); int midi_in(struct snd_midi *_m, MIDI_TYPE *_buf, int _size); kobj_t midimapper_addseq(void *arg1, int *unit, void **cookie); +int midimapper_open_locked(void *arg1, void **cookie); int midimapper_open(void *arg1, void **cookie); int midimapper_close(void *arg1, void *cookie); +kobj_t midimapper_fetch_synth_locked(void *arg, void *cookie, int unit); kobj_t midimapper_fetch_synth(void *arg, void *cookie, int unit); #endif diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c index 817540f1545a..68b06a4f4ca4 100644 --- a/sys/dev/sound/midi/sequencer.c +++ b/sys/dev/sound/midi/sequencer.c @@ -64,6 +64,7 @@ #include #include #include +#include #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_snd.h" @@ -751,6 +752,7 @@ mseq_open(struct cdev *i_dev, int flags, int mode, struct thread *td) * Mark this device busy. */ + sx_xlock(&midistat_lock); mtx_lock(&scp->seq_lock); if (scp->busy) { mtx_unlock(&scp->seq_lock); @@ -768,14 +770,15 @@ mseq_open(struct cdev *i_dev, int flags, int mode, struct thread *td) * Enumerate the available midi devices */ scp->midi_number = 0; - scp->maxunits = midimapper_open(scp->mapper, &scp->mapper_cookie); + scp->maxunits = midimapper_open_locked(scp->mapper, &scp->mapper_cookie); if (scp->maxunits == 0) SEQ_DEBUG(2, printf("seq_open: no midi devices\n")); for (i = 0; i < scp->maxunits; i++) { scp->midis[scp->midi_number] = - midimapper_fetch_synth(scp->mapper, scp->mapper_cookie, i); + midimapper_fetch_synth_locked(scp->mapper, + scp->mapper_cookie, i); if (scp->midis[scp->midi_number]) { if (SYNTH_OPEN(scp->midis[scp->midi_number], scp, scp->fflags) != 0) @@ -787,6 +790,7 @@ mseq_open(struct cdev *i_dev, int flags, int mode, struct thread *td) } } } + sx_xunlock(&midistat_lock); timer_setvals(scp, 60, 100); From nobody Sat Jul 6 18:24:07 2024 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 4WGf0m2pK5z5PMDn; Sat, 06 Jul 2024 18:24: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WGf0l66tbz544r; Sat, 6 Jul 2024 18:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290247; 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=G3Xpbw9JWEtuwJFAqesCpDlS8HVrgyeM/zm9ZBudyiQ=; b=SaUPn5I30BXrUXXg7nrbmRkTEFPKEDdxkSqrtL6T07EltcmLkfnva/jm7JW1IeDFDBITeZ PzKsFujt1gdowih+M0E4fUxTFD08c4Q5fFDG5cpq2+GF9QB4Tdh1V++V3sHhnDJFeLBQTn TfOOP62CZEHRf1FjlGowUq8+yUEOAqB92BBFY/FyTvrNWwQ0dKxX5NKOa9+uijvrUc+5IQ E2IN4oxMb5LNPx+Q6fhc2wNBAMwTzVCoEpCmdbjjBluDNZblEvxvuF273OdxcvRfp55+BB XDb67+9kRP9HOSZj6983DnC709l9oLP+p5NB1owMu4Ja+WcRt7LsH0ikHrXeGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290247; a=rsa-sha256; cv=none; b=WjzMhSvU1a9/gUy5h3GNmqhl7bLwWlgyfSameId4wr2saQX0eYkgd5U1NfnDmWpA8WVtxF qGWSeNBxPUVReGI6o+5SYyn96FV21Y593p/Jy0L98uEOzTFAEs4q7Jbn7/cXrEGJkESYmD E2gcc3WF/bv1BazJyUPixf01cPV6Gkc/KTKS53HxMpx9LFU7k4HxKABaQDuTbrc71dc0cz DBCpKRoT3U4yWRsifl+6q1XvpmqZbBDBTknbPYKeIiChAVGMx5TKZfLJlKXDPg+J1G232l tt6YH3Ykv06IMHJKrQE1teR8E/U0QbRz6y0qlXZZp5g7rY5Qzk6IPWCiNNoCtQ== 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=1720290247; 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=G3Xpbw9JWEtuwJFAqesCpDlS8HVrgyeM/zm9ZBudyiQ=; b=uDjWZsfg4f0yFhg7HQ4k67RD2LVHG9YqbNMVkpiMgdMjlW8ZF03kGxNFqIkujFTM8L07qr ZTUY0XlxMr/3gywCoxHx00jfMYL4mH5FWFgLEnujJoeCi6JE8vh/GNUft2l2snVCr/F33j tl+nS7pNSAVBPBGCZwZ83+UmvyaUQcx4QCTTq5utI8XKAjC2KiXOGyfijSV2Hgj99BUwS1 POnRU1WJ2xSsNULUruu/h3VRrP9ICQIsC9A4XDPuqXbq9UE9+aHexxkUzH5J1oi1z40poj Ilsk700OkprSCCZYjNbDc6EswKcDqk4VSJNTQ2dBbT+aVuD0FE4VzDj2a69kvw== 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 4WGf0l4sGCzrLB; Sat, 6 Jul 2024 18:24:07 +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 466IO78h090632; Sat, 6 Jul 2024 18:24:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IO71F090629; Sat, 6 Jul 2024 18:24:07 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:07 GMT Message-Id: <202407061824.466IO71F090629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 3402d474ceb8 - main - snd_uaudio: Remove unused sc_sndstat sbuf 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3402d474ceb8541d07689bad6960f90739129997 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3402d474ceb8541d07689bad6960f90739129997 commit 3402d474ceb8541d07689bad6960f90739129997 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:26 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:26 +0000 snd_uaudio: Remove unused sc_sndstat sbuf This information is also printed to dmesg(8) on attach. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45771 --- sys/dev/sound/usb/uaudio.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index d47eb86ed271..c202ac581119 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -368,7 +368,6 @@ struct uaudio_softc_child { }; struct uaudio_softc { - struct sbuf sc_sndstat; struct sndcard_func sc_sndcard_func; struct uaudio_chan sc_rec_chan[UAUDIO_MAX_CHILD]; struct uaudio_chan sc_play_chan[UAUDIO_MAX_CHILD]; @@ -391,7 +390,6 @@ struct uaudio_softc { uint8_t sc_mixer_iface_index; uint8_t sc_mixer_iface_no; uint8_t sc_mixer_chan; - uint8_t sc_sndstat_valid:1; uint8_t sc_uq_audio_swap_lr:1; uint8_t sc_uq_au_inp_async:1; uint8_t sc_uq_au_no_xu:1; @@ -1293,8 +1291,6 @@ uaudio_detach(device_t dev) if (bus_generic_detach(dev) != 0) { DPRINTF("detach failed!\n"); } - sbuf_delete(&sc->sc_sndstat); - sc->sc_sndstat_valid = 0; umidi_detach(dev); @@ -2149,15 +2145,6 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, struct usb_device *udev, if (rate > chan->pcm_cap.maxspeed || chan->pcm_cap.maxspeed == 0) chan->pcm_cap.maxspeed = rate; - if (sc->sc_sndstat_valid != 0) { - sbuf_printf(&sc->sc_sndstat, "\n\t" - "mode %d.%d:(%s) %dch, %dbit, %s, %dHz", - curidx, alt_index, - (ep_dir == UE_DIR_IN) ? "input" : "output", - channels, p_fmt->bPrecision, - p_fmt->description, rate); - } - next_ep: sed.v1 = NULL; ed1 = NULL; @@ -2230,9 +2217,6 @@ uaudio_chan_fill_info(struct uaudio_softc *sc, struct usb_device *udev) if (channels == 0) channels = channels_max; - if (sbuf_new(&sc->sc_sndstat, NULL, 4096, SBUF_AUTOEXTEND)) - sc->sc_sndstat_valid = 1; - /* try to search for a valid config */ for (x = channels; x; x--) { @@ -2263,8 +2247,6 @@ uaudio_chan_fill_info(struct uaudio_softc *sc, struct usb_device *udev) if (x == (channels + 1)) x--; } - if (sc->sc_sndstat_valid) - sbuf_finish(&sc->sc_sndstat); } static void From nobody Sat Jul 6 18:24:08 2024 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 4WGf0n19lGz5PMXC; Sat, 06 Jul 2024 18:24:09 +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 4WGf0m72fQz5490; Sat, 6 Jul 2024 18:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290249; 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=5Ra+lgEcyio3QGCVaT8EAz1ObQESf+eJeqh4CL4KHrs=; b=MtbrsP9WhmquMLXxuLA4AXMJX/SEhM8aFFfSahOWlUNsWW8iNH/7VvhXEBx8YxbW6lDaHz LVJGHsEPQ8s/DHgu6IHh9eLxJ8hZh1RUxC/G/lDBB7Wlxwq04cA58ZnBbBEAdA9RmxAPwb hVwbs2iNOZt1GV4ji6djcObzlatZi4R9y1+V1Ukj4NVGZBhAS83YZPtKtTGABaLxucOLJi vLhPi6JRQVkIz8JSwqiBj3ebNA13KzaM10wY/aOLO7Oms+zuVFvjdxBix0yoT272ALLpDi 5vlbcxh+LPV/lqD7XeZmJ2Io4o8mQjaHaGgPVtIdxTpJflaxRaQZbGc5H5BP2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290249; a=rsa-sha256; cv=none; b=M0FJPCFnjcNY9BmiN6Ss/GYzAR0LBZlytDLJ/n0M+NEjWsA16smuua64EKWkeHH51vfyL/ +WL7QqFy5gyMkbuaXij9c7pn3+v2PHh+oS9GQl0O9mrYsnAYm3Tsv0iia9XPcIr8cXg0fe tXf8iPGx7HwR5cPqaW40SsV3fDlL3C5byByZmLa8LIOhAg3de4gM/ZxVX46EwAMZUsQ/+5 6U2QOHn3lNXFpNEDneg3ha/gFsS0rWcqKflkY9o4EdPM27pfA+x9FWhRlQECfrCfONoWc6 2UV0GXCh2iWyw+j1t9sYKloyw8zaNucCKJirJKTyyqoNDTCNXFiN+IAq4xSoVg== 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=1720290249; 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=5Ra+lgEcyio3QGCVaT8EAz1ObQESf+eJeqh4CL4KHrs=; b=D5C/AeJF+L/dhAsVBKE89fFEoPnxkXFIScD9thrxIC5CoMvwHtTWqE70nB4oaufCxAt/tu xQMWzCyXsn+6MCCyJjNyiVRFmq7/HCPhPQwhYPsF8o/anD0s9AtXHWleWcfdSwnkxPCipj a3UeedDEuh/589sC4OnkYnZc1hji74fn5b4sU6gSHu4a/y5q09w5rDIyEsomxc3ui5uFea nK5W0gzH85ue9VJgtiO1zDwdEVmMLC14HDJQgzLeNb5da7WZuxabCXi+HdydHbQ6vt/Mt4 VlmA/K9+fW/ollnOCOZARmPODkd5fYavOw2uEZys5hXivQQRapWI0tf5KlEsHQ== 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 4WGf0m69CRzqd0; Sat, 6 Jul 2024 18:24:08 +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 466IO8M0090673; Sat, 6 Jul 2024 18:24:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IO8OW090670; Sat, 6 Jul 2024 18:24:08 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:08 GMT Message-Id: <202407061824.466IO8OW090670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 526bd1d87ec9 - main - sound: Remove MIDI_TYPE 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 526bd1d87ec997e1c090262da6f2d9b6da0e8f89 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=526bd1d87ec997e1c090262da6f2d9b6da0e8f89 commit 526bd1d87ec997e1c090262da6f2d9b6da0e8f89 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:31 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:31 +0000 sound: Remove MIDI_TYPE No good reason to have this. It only makes things harder to read. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45773 --- sys/dev/sound/midi/midi.c | 12 ++++++------ sys/dev/sound/midi/midi.h | 6 ++---- sys/dev/sound/midi/mpu401.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index d31d6ce0fa8e..f31496df025b 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -281,7 +281,7 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) struct snd_midi *m; int i; int inqsize, outqsize; - MIDI_TYPE *buf; + uint8_t *buf; MIDI_DEBUG(1, printf("midiinit: unit %d/%d.\n", unit, channel)); sx_xlock(&midistat_lock); @@ -330,14 +330,14 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) mtx_lock(&m->qlock); if (inqsize) - buf = malloc(sizeof(MIDI_TYPE) * inqsize, M_MIDI, M_NOWAIT); + buf = malloc(sizeof(uint8_t) * inqsize, M_MIDI, M_NOWAIT); else buf = NULL; MIDIQ_INIT(m->inq, buf, inqsize); if (outqsize) - buf = malloc(sizeof(MIDI_TYPE) * outqsize, M_MIDI, M_NOWAIT); + buf = malloc(sizeof(uint8_t) * outqsize, M_MIDI, M_NOWAIT); else buf = NULL; m->hiwat = outqsize / 2; @@ -448,12 +448,12 @@ static int midi_lengths[] = {2, 2, 2, 2, 1, 1, 2, 0}; #define MIDI_SYSEX_END 0xF7 int -midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size) +midi_in(struct snd_midi *m, uint8_t *buf, int size) { /* int i, sig, enq; */ int used; - /* MIDI_TYPE data; */ + /* uint8_t data; */ MIDI_DEBUG(5, printf("midi_in: m=%p size=%d\n", m, size)); /* @@ -578,7 +578,7 @@ midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size) * midi_out: The only clearer of the M_TXEN flag. */ int -midi_out(struct snd_midi *m, MIDI_TYPE *buf, int size) +midi_out(struct snd_midi *m, uint8_t *buf, int size) { int used; diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index b200eed9bc74..afbfdfa6abbc 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -39,8 +39,6 @@ MALLOC_DECLARE(M_MIDI); #define M_RXEN 0x04 #define M_TXEN 0x08 -#define MIDI_TYPE unsigned char - extern struct sx midistat_lock; struct snd_midi; @@ -48,8 +46,8 @@ struct snd_midi; struct snd_midi * midi_init(kobj_class_t _mpu_cls, int _unit, int _channel, void *cookie); int midi_uninit(struct snd_midi *_m); -int midi_out(struct snd_midi *_m, MIDI_TYPE *_buf, int _size); -int midi_in(struct snd_midi *_m, MIDI_TYPE *_buf, int _size); +int midi_out(struct snd_midi *_m, uint8_t *_buf, int _size); +int midi_in(struct snd_midi *_m, uint8_t *_buf, int _size); kobj_t midimapper_addseq(void *arg1, int *unit, void **cookie); int midimapper_open_locked(void *arg1, void **cookie); diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index a344801d1982..2be285bc0040 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -118,7 +118,7 @@ static int mpu401_intr(struct mpu401 *m) { #define MPU_INTR_BUF 16 - MIDI_TYPE b[MPU_INTR_BUF]; + uint8_t b[MPU_INTR_BUF]; int i; int s; From nobody Sat Jul 6 18:24:09 2024 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 4WGf0p2xdwz5PMP4; Sat, 06 Jul 2024 18:24:10 +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 4WGf0p0NW4z54HT; Sat, 6 Jul 2024 18:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290250; 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=3CTqroJun3RhzxVc5wU4ksH5E4QYp60wAR4tFeqpsJ4=; b=RNdwpUkKdYsG4SP43aRwt3VSegTgykGqosGN48huqFh+M6blQSPsJFxcc2Y0G7pW86R9Qy Z24cuP+6LwzJyZ6fLE+/QGfBp04Ho1wHvAW/6CWoX+3GRg3sy9Db+UzljSYLkAvEqK+OQh tIosm0TKx15BxJsm3B9ekss4a15SmDojTSVppBSnwaTCz4pAImLDbMDqrpLafZ2QCjEkSk XfKd+Z3g4MUoljMT9waIDY3ay06eFYDnuwi67aoXQ2PEULj+Rg8eEscm8RRN9eO+kmKqaW 14slSkA4FV/fQ3fe2YaRM671+2vmaIxTbsvtKKdsXQDIAcE2lKerPuyJF/xIaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290250; a=rsa-sha256; cv=none; b=l30Z45T7/7hXp93RLwTnpTe3Uraje8yeitA10E4SoDTQvbOaeNVCwY/MLPH32a0SbRogkz QOJjA+9/wrXjC6TOqWw+508eu5zPIc5063V03Pu2g4ZjcawzRkOfJSXoD1pBMPWMRBC8BT s2lDtZJk1o3KFgqFrrqaLi/lPy+n4dHo5UHDp/+OErngM4fVzSwY89IEk3NvzefKU8tJ2X WZAKdmR6QzJNSBtdoxD8RmWKtss7DS+uvgOtexm/qweM4FSImbepXgAZDhEO4DRi4x1sFU sJoNnH+Sj2TJnheYDBAI0GWG9CCLJ2rRt3z9AVYT9ROsKkA/18aIKQA2Y22Psw== 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=1720290250; 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=3CTqroJun3RhzxVc5wU4ksH5E4QYp60wAR4tFeqpsJ4=; b=MGLDbwwGIPE4JyDiocaRs/LMeYV9Q77DxZ1ikcY1e/QzWLXlj8v+AFYqqCF+WePzPlz1Rg iu2mwGAtKSD6Z8/YmFcagA3WMkDFhrb7n23iqK1proavh8Ped1R5yMQ2tIKyK+XD467S1g PvuksgXemTrCSfd59ogsDjlOZ8MCSQl9jvpBDy9IO1RzfyfkAi+BlRWgiWLBsXs3kJ4SRK BZkoeNc1I1hQvng9i0A5IIXFm4BsNoKzX9FIOTlBOXhq5xgLbW+Spw3HuZ7Czp14YnbyxM v/IUPrOjhg/soYiBhBkWQBO6l2Ci0eqsoFiUJTGhSc9VxBukLCdLdjyFWCel4A== 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 4WGf0n75KTzrWb; Sat, 6 Jul 2024 18:24:09 +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 466IO9cm090715; Sat, 6 Jul 2024 18:24:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IO900090712; Sat, 6 Jul 2024 18:24:09 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:09 GMT Message-Id: <202407061824.466IO900090712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8b9e1b628064 - main - sound: Remove *MINOR from midi/ 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b9e1b628064daba3650d04fa83cf79808877981 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8b9e1b628064daba3650d04fa83cf79808877981 commit 8b9e1b628064daba3650d04fa83cf79808877981 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:36 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:36 +0000 sound: Remove *MINOR from midi/ Sponsored by: The FreeBSD Foundation MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D45772 --- sys/dev/sound/midi/midi.c | 14 ++++---------- sys/dev/sound/midi/sequencer.c | 12 +++--------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index f31496df025b..66fb67b31e7a 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -73,10 +73,6 @@ MALLOC_DEFINE(M_MIDI, "midi buffers", "Midi data allocation area"); #define KOBJMETHOD_END { NULL, NULL } #endif -#define PCMMKMINOR(u, d, c) ((((c) & 0xff) << 16) | (((u) & 0x0f) << 4) | ((d) & 0x0f)) -#define MIDIMKMINOR(u, d, c) PCMMKMINOR(u, d, c) - -#define MIDI_DEV_RAW 2 #define MIDI_DEV_MIDICTL 12 enum midi_states { @@ -364,9 +360,8 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) sx_xunlock(&midistat_lock); - m->dev = make_dev(&midi_cdevsw, - MIDIMKMINOR(unit, MIDI_DEV_RAW, channel), - UID_ROOT, GID_WHEEL, 0666, "midi%d.%d", unit, channel); + m->dev = make_dev(&midi_cdevsw, unit, UID_ROOT, GID_WHEEL, 0666, + "midi%d.%d", unit, channel); m->dev->si_drv1 = m; return m; @@ -1387,9 +1382,8 @@ midi_load(void) sx_init(&midistat_lock, "midistat lock"); TAILQ_INIT(&midi_devs); - midistat_dev = make_dev(&midistat_cdevsw, - MIDIMKMINOR(0, MIDI_DEV_MIDICTL, 0), - UID_ROOT, GID_WHEEL, 0666, "midistat"); + midistat_dev = make_dev(&midistat_cdevsw, MIDI_DEV_MIDICTL, UID_ROOT, + GID_WHEEL, 0666, "midistat"); return 0; } diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c index 68b06a4f4ca4..01f9d0b4809b 100644 --- a/sys/dev/sound/midi/sequencer.c +++ b/sys/dev/sound/midi/sequencer.c @@ -91,10 +91,6 @@ #define LOOKUP_OPEN (1) #define LOOKUP_CLOSE (2) -#define PCMMKMINOR(u, d, c) \ - ((((c) & 0xff) << 16) | (((u) & 0x0f) << 4) | ((d) & 0x0f)) -#define MIDIMKMINOR(u, d, c) PCMMKMINOR(u, d, c) -#define MIDIUNIT(y) ((dev2unit(y) >> 4) & 0x0f) #define MIDIDEV(y) (dev2unit(y) & 0x0f) /* These are the entries to the sequencer driver. */ @@ -567,12 +563,10 @@ seq_addunit(void) if (scp->mapper == NULL) goto err; - scp->seqdev = make_dev(&seq_cdevsw, - MIDIMKMINOR(scp->unit, SND_DEV_SEQ, 0), UID_ROOT, - GID_WHEEL, 0666, "sequencer%d", scp->unit); + scp->seqdev = make_dev(&seq_cdevsw, SND_DEV_SEQ, UID_ROOT, GID_WHEEL, + 0666, "sequencer%d", scp->unit); - scp->musicdev = make_dev(&seq_cdevsw, - MIDIMKMINOR(scp->unit, SND_DEV_MUSIC, 0), UID_ROOT, + scp->musicdev = make_dev(&seq_cdevsw, SND_DEV_MUSIC, UID_ROOT, GID_WHEEL, 0666, "music%d", scp->unit); if (scp->seqdev == NULL || scp->musicdev == NULL) From nobody Sat Jul 6 18:24:11 2024 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 4WGf0q2cR5z5PMRc; Sat, 06 Jul 2024 18:24:11 +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 4WGf0q1PNTz542N; Sat, 6 Jul 2024 18:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290251; 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=BYFt2LXLpTqyoxy2vPivAozE1eTNQKGSVJCnuTXd7/Q=; b=UqcGCKEACi7W1hreZpL7pW5ChtrAM9v2edoR0Uv2OodD42l44eZPV1UerOT84MPdsW8MK+ PjVaoFdd+mOaYAaOpJDWtw20pJNw5lpeqBojny2MJoigmw3lGxb2tpAusxn9cDwtdm75AP LizUGtvyKH5WnChfRqOURN1pAh15ZhVPvctHsIZOkmt8T8aiA4xpmnGkRQn2crLWESDThJ R6tzHwEQWUnWs5gHvptv3fdkdeJgwBsZUAcxBRyK7htcNgF+K6FWL0bujYHsD2iaD46cjE zAEPpcJa6T5FLrnmSc6Ds5ss0wWUXCLFq6IpP0NiWUppu/aceKZfegHCW3bU0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290251; a=rsa-sha256; cv=none; b=s1npDRCM0BuXGIVtr35nSjmosORKGYgWSNEfQa4gjuhor9NfyHHX/H2yMzrvupwfW5Vdfk UcMJdl2tpUqa+TfnALj1VsEnfmT7RHpQgub/fNZzA9am2YHPgTP4kldWH4yCDzzUckWNeB KkdnjsJY3By+6TovagQHdJjyNnf6+O8Z74r+0agn0xgT4pAYkvzHuL4ZZATKG+7NG+TJxO FrK6cqZIfIxxOJafsg1ibf9JcKam0XJx+sYVrwAOWXH7EQTizVcaG7Dhz256XrEbkzYG7G Z3Vy03LpxoRApFBZoLgLIUjgeqY5Pc7qIPbAKRBgb4gMrLUTlAuF7Sb6lBWceg== 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=1720290251; 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=BYFt2LXLpTqyoxy2vPivAozE1eTNQKGSVJCnuTXd7/Q=; b=npQlLkXYeBquLMkxkvZavMxtzFCyNNgiyKxmQh4duJGn8QmIx25sp6heYvz3xzi0+1E1WS h3G0bHHHkV18rvGd7wBrkxWEyRIdY5GnDeFll8A6aS8v+XCiarFiAjna6oURuKxLnTK3yR fRMRm2PkUC82QPEWorxKqeM+/t0/NvZZZb+wc0KjM/ADLzUmeqAUZ6uE245OU+mSNt5hDh icWpPv+Im1bI0G9VBvb8m3KLaaAH9itoHw4vzlTGsSRyaESbvGktfNvkoIYP8ntus2XXYl YZTzwmNXS8jIfcuHFDhUFrpuJMMA+pgv7h82dgiAFeiaoFq4k9oeowwQ5OcR2A== 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 4WGf0q0fDvzqpx; Sat, 6 Jul 2024 18:24:11 +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 466IOBdP090752; Sat, 6 Jul 2024 18:24:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOBsk090749; Sat, 6 Jul 2024 18:24:11 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:11 GMT Message-Id: <202407061824.466IOBsk090749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 46e92a41cb53 - main - sound: Simplify getchns() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46e92a41cb539e327dd059d571fa381d0fbe779c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=46e92a41cb539e327dd059d571fa381d0fbe779c commit 46e92a41cb539e327dd059d571fa381d0fbe779c Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:40 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:40 +0000 sound: Simplify getchns() Remove all special handling for SIMPLEX, since we can just fetch the channel directly. While here: - Get rid of a no-op getchns() call in dsp_ioctl(). - Rename getchns() to dsp_lock_chans(), and relchns() to dsp_unlock_chans(). - Simplify DSP_FIXUP_ERROR(), as we do not longer assign SD_F_PRIO* flags to the softc. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45775 --- sys/dev/sound/pcm/dsp.c | 74 ++++++++----------------------------------------- 1 file changed, 12 insertions(+), 62 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 6ac85635b080..f2cead08783c 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -142,52 +142,8 @@ dsp_destroy_dev(device_t dev) } static void -getchns(struct dsp_cdevpriv *priv, uint32_t prio) +dsp_lock_chans(struct dsp_cdevpriv *priv, uint32_t prio) { - struct snddev_info *d; - struct pcm_channel *ch; - uint32_t flags; - - if (priv->simplex) { - d = priv->sc; - if (!PCM_REGISTERED(d)) - return; - PCM_LOCK(d); - PCM_WAIT(d); - PCM_ACQUIRE(d); - /* - * Note: order is important - - * pcm flags -> prio query flags -> wild guess - */ - ch = NULL; - flags = pcm_getflags(d->dev); - if (flags & SD_F_PRIO_WR) { - ch = priv->rdch; - } else if (flags & SD_F_PRIO_RD) { - ch = priv->wrch; - } else if (prio & SD_F_PRIO_WR) { - ch = priv->rdch; - flags |= SD_F_PRIO_WR; - } else if (prio & SD_F_PRIO_RD) { - ch = priv->wrch; - flags |= SD_F_PRIO_RD; - } else if (priv->wrch != NULL) { - ch = priv->rdch; - flags |= SD_F_PRIO_WR; - } else if (priv->rdch != NULL) { - ch = priv->wrch; - flags |= SD_F_PRIO_RD; - } - pcm_setflags(d->dev, flags); - if (ch != NULL) { - CHN_LOCK(ch); - chn_ref(ch, -1); - chn_release(ch); - } - PCM_RELEASE(d); - PCM_UNLOCK(d); - } - if (priv->rdch != NULL && (prio & SD_F_PRIO_RD)) CHN_LOCK(priv->rdch); if (priv->wrch != NULL && (prio & SD_F_PRIO_WR)) @@ -195,7 +151,7 @@ getchns(struct dsp_cdevpriv *priv, uint32_t prio) } static void -relchns(struct dsp_cdevpriv *priv, uint32_t prio) +dsp_unlock_chans(struct dsp_cdevpriv *priv, uint32_t prio) { if (priv->rdch != NULL && (prio & SD_F_PRIO_RD)) CHN_UNLOCK(priv->rdch); @@ -333,17 +289,12 @@ skip: } #define DSP_FIXUP_ERROR() do { \ - prio = pcm_getflags(d->dev); \ if (!DSP_F_VALID(flags)) \ error = EINVAL; \ if (!DSP_F_DUPLEX(flags) && \ ((DSP_F_READ(flags) && d->reccount == 0) || \ (DSP_F_WRITE(flags) && d->playcount == 0))) \ error = ENOTSUP; \ - else if (!DSP_F_DUPLEX(flags) && (prio & SD_F_SIMPLEX) && \ - ((DSP_F_READ(flags) && (prio & SD_F_PRIO_WR)) || \ - (DSP_F_WRITE(flags) && (prio & SD_F_PRIO_RD)))) \ - error = EBUSY; \ } while (0) static int @@ -352,7 +303,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) struct dsp_cdevpriv *priv; struct pcm_channel *rdch, *wrch; struct snddev_info *d; - uint32_t fmt, spd, prio; + uint32_t fmt, spd; int error, rderror, wrerror; /* Kind of impossible.. */ @@ -533,18 +484,18 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) runpid = buf->uio_td->td_proc->p_pid; - getchns(priv, prio); + dsp_lock_chans(priv, prio); if (*ch == NULL || !((*ch)->flags & CHN_F_BUSY)) { if (priv->rdch != NULL || priv->wrch != NULL) - relchns(priv, prio); + dsp_unlock_chans(priv, prio); PCM_GIANT_EXIT(d); return (EBADF); } if (((*ch)->flags & (CHN_F_MMAP | CHN_F_DEAD)) || (((*ch)->flags & CHN_F_RUNNING) && (*ch)->pid != runpid)) { - relchns(priv, prio); + dsp_unlock_chans(priv, prio); PCM_GIANT_EXIT(d); return (EINVAL); } else if (!((*ch)->flags & CHN_F_RUNNING)) { @@ -563,7 +514,7 @@ dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf) CHN_BROADCAST(&(*ch)->cv); - relchns(priv, prio); + dsp_unlock_chans(priv, prio); PCM_GIANT_LEAVE(d); @@ -799,7 +750,6 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, return (ret); } - getchns(priv, 0); rdch = priv->rdch; wrch = priv->wrch; @@ -1858,7 +1808,7 @@ dsp_poll(struct cdev *i_dev, int events, struct thread *td) ret = 0; - getchns(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); + dsp_lock_chans(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); wrch = priv->wrch; rdch = priv->rdch; @@ -1874,7 +1824,7 @@ dsp_poll(struct cdev *i_dev, int events, struct thread *td) ret |= chn_poll(rdch, e, td); } - relchns(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); + dsp_unlock_chans(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); PCM_GIANT_LEAVE(d); @@ -1936,7 +1886,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset, PCM_GIANT_ENTER(d); - getchns(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); + dsp_lock_chans(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); wrch = priv->wrch; rdch = priv->rdch; @@ -1945,7 +1895,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset, (*offset + size) > sndbuf_getallocsize(c->bufsoft) || (wrch != NULL && (wrch->flags & CHN_F_MMAP_INVALID)) || (rdch != NULL && (rdch->flags & CHN_F_MMAP_INVALID))) { - relchns(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); + dsp_unlock_chans(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); PCM_GIANT_EXIT(d); return (EINVAL); } @@ -1956,7 +1906,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset, rdch->flags |= CHN_F_MMAP; *offset = (uintptr_t)sndbuf_getbufofs(c->bufsoft, *offset); - relchns(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); + dsp_unlock_chans(priv, SD_F_PRIO_RD | SD_F_PRIO_WR); *object = vm_pager_allocate(OBJT_DEVICE, i_dev, size, nprot, *offset, curthread->td_ucred); From nobody Sat Jul 6 18:24:12 2024 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 4WGf0r5kVHz5PMV4; Sat, 06 Jul 2024 18:24:12 +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 4WGf0r20hPz54CD; Sat, 6 Jul 2024 18:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290252; 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=jlu/3g4JXzF7I8m3hkxqwfe4WsgaVlWMEGSMqaDfT8k=; b=lCxe7flPZZme7bJ6+y4gqF93ramkldbKNQEcbuaFmP7HpTvlgrTih/kj0MeFoj+P1eShfL VhF6Qg5hwMTy2PpBeQGPEfew5vHZglZWdKLukgxfanKwhCmK+lN8iQ8ij++8W0M5xSpycG DZzqIdI4dJgP82zvRginVFeMqkyJXyQXQvFPk9vJY7vHSON/DoVJeq3XZCW6sjK7v6iIyJ 4bPuWkoOEFrbPPL5LJOQaghfNQPKBJEIAwGQ4T0/6Xet7EqVZaIUjc2a5DqQYx7ahONtVQ fIlEpW+BF/zNgLhzYgcd/XClxxjJWMR8Lae7pHHWO8X+pW2RUNITvBJV6ut/Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290252; a=rsa-sha256; cv=none; b=xgHjC4K6VGOcPP2FJotpjrE+HqlA+PBRaRR1c8ZaLIbeyeuz8+0txyM3V+MNCKWhzoJzMb pjqAEtXpHuccSkT2u3YllhgX7qGfH4cJ3ii1ZK7dmuZW3V3soMYudfaoaR5EKD4FMmW4Em nnxmdCbc82epJXCTZevMn8CyEmZgQ5/zH7OZ2aSP2MfymFkME0eljkcfxIiZDznYHVGfe3 7Pw1NQh+kU/DXqxbS0TqOQrAuwrdpXa2IzohFnVUSPlZBMPOq2h7FGedag75bMQrnk4rXt EIYl+05dHRVfRr8BOt/gF3LnTZh5wu2/lLansMntxGUUpsO/dxvrMJ4SLeuZ7A== 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=1720290252; 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=jlu/3g4JXzF7I8m3hkxqwfe4WsgaVlWMEGSMqaDfT8k=; b=s8cTriWkvXvyRhusC4KKrvHSPQU7Hq0qdKswfSymjfmN33uogzZi9/4tLqNSysrbW693CO Jqjlco3n+02GKaBe2936njVglZTyvjgvJTAm52Dz0LKcztqe9mI3FRFLH5z2kkcsqhijWA z4mIuB2jWCjw/itO1NBPvohxk/Smqez+D1ew4vHG3EBciFUkgqyQAyjgBsdhafbIKTMTzK AhZHl2tB3gyIaeHD0bHAnk/vOsfBWy5d3LOWx3NhhGvM8FrAQD9x90YNpZ4JY7Njp5ASNC V7QWTX8RAYBBWYwSmW2FwvMifFH/2fPW038UEm99QV3zpOq5W2geT5DY/Ph3xQ== 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 4WGf0r1cVPzrVv; Sat, 6 Jul 2024 18:24:12 +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 466IOCWa090797; Sat, 6 Jul 2024 18:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOCWo090794; Sat, 6 Jul 2024 18:24:12 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:12 GMT Message-Id: <202407061824.466IOCWo090794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: be04a9d9387f - main - sound: Improve simplex handling in dsp_open() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be04a9d9387f6b5d4e83fc4976d8d83bb03fe5af Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=be04a9d9387f6b5d4e83fc4976d8d83bb03fe5af commit be04a9d9387f6b5d4e83fc4976d8d83bb03fe5af Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:45 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:45 +0000 sound: Improve simplex handling in dsp_open() If we are in simplex mode, make sure we do not open in both directions (read/write) and also that we do not open in a direction opposite of what is already opened. For example, if the device is already doing playback, we cannot open the device for recording at the same time, and vice-versa. While here, remove dsp_cdevpriv->simplex as it's no longer needed. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45835 --- sys/dev/sound/pcm/dsp.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index f2cead08783c..26a2919ed1da 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -52,7 +52,6 @@ struct dsp_cdevpriv { struct pcm_channel *rdch; struct pcm_channel *wrch; struct pcm_channel *volch; - int simplex; }; static int dsp_mmap_allow_prot_exec = 0; @@ -301,10 +300,10 @@ static int dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct dsp_cdevpriv *priv; - struct pcm_channel *rdch, *wrch; + struct pcm_channel *rdch, *wrch, *ch; struct snddev_info *d; uint32_t fmt, spd; - int error, rderror, wrerror; + int error, rderror, wrerror, dir; /* Kind of impossible.. */ if (i_dev == NULL || td == NULL) @@ -319,7 +318,6 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) priv->rdch = NULL; priv->wrch = NULL; priv->volch = NULL; - priv->simplex = (pcm_getflags(d->dev) & SD_F_SIMPLEX) ? 1 : 0; error = devfs_set_cdevpriv(priv, dsp_close); if (error != 0) @@ -333,6 +331,36 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) error = 0; DSP_FIXUP_ERROR(); + if (pcm_getflags(d->dev) & SD_F_SIMPLEX) { + if (DSP_F_DUPLEX(flags)) { + /* + * If no channels are opened yet, and we request + * DUPLEX, limit to playback only, otherwise open one + * channel in a direction that already exists. + */ + if (CHN_EMPTY(d, channels.pcm.opened)) { + if (d->playcount > 0) + flags &= ~FREAD; + else if (d->reccount > 0) + flags &= ~FWRITE; + } else { + ch = CHN_FIRST(d, channels.pcm.opened); + if (ch->direction == PCMDIR_PLAY) + flags &= ~FREAD; + else if (ch->direction == PCMDIR_REC) + flags &= ~FWRITE; + } + } else if (!CHN_EMPTY(d, channels.pcm.opened)) { + /* + * If we requested SIMPLEX, make sure we do not open a + * channel in the opposite direction. + */ + ch = CHN_FIRST(d, channels.pcm.opened); + dir = DSP_F_READ(flags) ? PCMDIR_REC : PCMDIR_PLAY; + if (ch->direction != dir) + error = ENOTSUP; + } + } if (error != 0) { PCM_UNLOCK(d); PCM_GIANT_EXIT(d); From nobody Sat Jul 6 18:24:13 2024 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 4WGf0s59hkz5PMZh; Sat, 06 Jul 2024 18:24:13 +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 4WGf0s3pcbz54Fj; Sat, 6 Jul 2024 18:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290253; 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=JVg5AnNs2EWTO3y1Hi4EZwFUVVTbAxFznd0/1FpZD5g=; b=dzhq56lNwyVQoXnUSm0+wbzt80MW408ptARhSxUJsIs3t9Vkq+bIXru0BM9HYdg1d03dqw 9m1DRU4gJImpBjA6d1WhoU+NIeTJ93nazhLK7lrMKIYc9MAE+EJMAj5SYkID2vH6NZeuoN QaWkkS/9hkjZXZMNOCxXSl2aZmiG5wGMgg01EWKnUaUZDGiUzoz8mpI3R7nc2tqOWDkONg rYPaplNAfeR/1Z71rjhwAyx9QzUMbM+EJiP0Vr1BPFEBTe5i5OcNEkzZHzXwZBSRGyd/iz E+TLKr1TZ31wR3bHOb5/XPXKNtHo1FDQWC8qXnUr9JSKI4ohFf0qXr36UmS60w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290253; a=rsa-sha256; cv=none; b=rZEQbAC0CF5zbF2AeBWEI745uw1Lk+Xk9Ae/B44Wts85z/DsWel4uVrmmmTLPVHlR3dp5V kJE5Czg4JQrGzmsDU+T9A9AXnClsAXf9cLSW8XPTQlFZdZoJe684K1n0PdVixKRcbwYsBs iDuXBezrro/knGdin0341Dj1kz7EyylJWYRGmKyWyp0TChETDp7AQmBFEHWawOGQjUDz+3 GeD1cpIVv/4iCHcxtiE0SOP+9vG4bCrJN/EASdISYtNnAKGA9xvRVRGo8MMblfIqMZI42Y Tk+qf8eFMqGQj/09Z90/a55C3fRYaqCJXXiAVnifo6QpaQiO7z38dbHuNwh6ew== 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=1720290253; 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=JVg5AnNs2EWTO3y1Hi4EZwFUVVTbAxFznd0/1FpZD5g=; b=ZfxTJ9aTQO12BG+6EbIdOTF0GeBir2jkBZsNzPKWpRRsNyeimi2X46JSSJv0xTOueL3cv5 FJMTip8ERBi9mVnjDr7JDh4o/QG/jCk8hymp91kcHgeYSYyl0zP28qEr597viDL+6dyK6p 5+Kh1yygdfP48Ru7yUZQXMkTxJsLJ/wHYkBUBSJiWZTiejE/TyFbc+9f9pxXsVLlIGAg8H BqrgjRYxfYl3fNVhBz+Tl76jcdao0g48ok7ni4nAtU20wz5pWyYipUyVANhGBvnTzJ4xTJ xQh0xwtqusvp0i07HeI2WjslNpSjSh7qghJ9ErGZ9VMWSmHaoT5CeSfpxkH3QQ== 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 4WGf0s2hYpzqwB; Sat, 6 Jul 2024 18:24:13 +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 466IODvI090840; Sat, 6 Jul 2024 18:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IODAx090837; Sat, 6 Jul 2024 18:24:13 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:13 GMT Message-Id: <202407061824.466IODAx090837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: adc1713fb13f - main - sound: Make DSP_FIXUP_ERROR() regular code 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adc1713fb13f89a6eb33f5de840c981d0e17e4b7 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=adc1713fb13f89a6eb33f5de840c981d0e17e4b7 commit adc1713fb13f89a6eb33f5de840c981d0e17e4b7 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:50 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:50 +0000 sound: Make DSP_FIXUP_ERROR() regular code No reason to have this as a macro. While here, change the second case to an "else if" as there is no reason to check it if the open flags are invalid. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D45776 --- sys/dev/sound/pcm/dsp.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 26a2919ed1da..27c89c3231b7 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -287,15 +287,6 @@ skip: priv = NULL; } -#define DSP_FIXUP_ERROR() do { \ - if (!DSP_F_VALID(flags)) \ - error = EINVAL; \ - if (!DSP_F_DUPLEX(flags) && \ - ((DSP_F_READ(flags) && d->reccount == 0) || \ - (DSP_F_WRITE(flags) && d->playcount == 0))) \ - error = ENOTSUP; \ -} while (0) - static int dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { @@ -330,7 +321,12 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) PCM_WAIT(d); error = 0; - DSP_FIXUP_ERROR(); + if (!DSP_F_VALID(flags)) + error = EINVAL; + else if (!DSP_F_DUPLEX(flags) && + ((DSP_F_READ(flags) && d->reccount == 0) || + (DSP_F_WRITE(flags) && d->playcount == 0))) + error = ENOTSUP; if (pcm_getflags(d->dev) & SD_F_SIMPLEX) { if (DSP_F_DUPLEX(flags)) { /* From nobody Sat Jul 6 18:24:15 2024 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 4WGf0w0DsHz5PMRr; Sat, 06 Jul 2024 18:24:16 +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 4WGf0v5KgMz54G9; Sat, 6 Jul 2024 18:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290255; 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=s82fzPSiuoi06iSxPPbviBKrH0nAVeF26bJx30CMjao=; b=fpPaZHktvCfS+j82jugHksPtEXcc8Bndi5W6s/lurb6FG+GF+gfD9o1dLVYOZYCQP53uD0 nT9P1dlp771Jmgh+gHA1ut8ya7oSAYgv29gACUJtfjJAo4so9pMi1pWtoLFXx4inInkPmS djvpI30g6VSCuvkbk/ga3S+rAZpaBhlVspWhNN1fAiAl2SwimHo+dJRR1Kfh0U0R2Advr6 yFFw7nlaovCjsrSJbb0x+GvYoeC4SQ/EdtYVLXPbV3cU7NEkMTlnl8WMY9F1J/6r/l7QyC OhQ+ttxrKjSgoJ9jtMpdeV9Q6eRfzivAmO+fNZKHdOmOvZ4uhZTX0TsV7ibm2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290255; a=rsa-sha256; cv=none; b=AzKGnZhGDqV8qc/trZd2+PBDqAJD85FBHyOTRn/URE/OQBLuHumhFY/8As8tfwohsC/oPR NCyF+IAJJ8p1ujEUAfeicNntdpa6XsYFfPZgBqyfXWdbnhPRHOlmgGS+iluWb+Hqxo9Tqu TGZIt/c1ikU+c++tRMvXhs/obvI1gxkr+nMoibCCmoys3fYlUldoe4otZ2WVuZjeambgNS gASPrOBYIk06ryQ2GEZSf7RGSJXjeZ16AEDOA1/Fkq7wg0YpfnaedA8YFx/qVKtZOWmCLS nzhdvykoz5Iz/ai+795wQ1ezYeUQDZd9GxQkADjUr8XUyopoa21LwsLx/MxeUQ== 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=1720290255; 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=s82fzPSiuoi06iSxPPbviBKrH0nAVeF26bJx30CMjao=; b=iz/c4ZVzvLmsioT+4LpeO/WuWhFEsEJivofAwI8854OGZVoDXxdOgjIcw4V9/t0FdV3tEk n9woT0pmb/SKs/lc7/5L5dljakWWK+8FOkQPNNYVBIHOKuv5PN9V+xeFx3kSSvn0MJ8EtH mRCt0obYsMpW7CJRB90xWeXttN7v0qYEo4tikO1uYBwcT+rFXreWAW8xzpPkvVgTirqngl IKutKXcgv7+PJTXqnNH7jNExlf0k8objG7UuQzo7QCTKoz/4JdZssn22YIb+wCSFXiklsS FV15duO4rJvWuJS0eJ+Yl3Hj0+zaI4gMl43FvRM2jAxMN6XV/+72XOA8TlkJBw== 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 4WGf0v4xGQzqpy; Sat, 6 Jul 2024 18:24:15 +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 466IOFtL090937; Sat, 6 Jul 2024 18:24:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOF5P090934; Sat, 6 Jul 2024 18:24:15 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:15 GMT Message-Id: <202407061824.466IOF5P090934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2d6fc24673cc - main - sound: Handle midistat_lock through function interface 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d6fc24673ccc97020c94094f97ee015f1db9702 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2d6fc24673ccc97020c94094f97ee015f1db9702 commit 2d6fc24673ccc97020c94094f97ee015f1db9702 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:59 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:59 +0000 sound: Handle midistat_lock through function interface midistat_lock is used outside midi/midi.c as well, so implement lock, unlock and lockassert functions in order not to expose the lock in the header file. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45857 --- sys/dev/sound/midi/midi.c | 76 ++++++++++++++++++++++++++---------------- sys/dev/sound/midi/midi.h | 6 ++-- sys/dev/sound/midi/sequencer.c | 4 +-- 3 files changed, 53 insertions(+), 33 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 66fb67b31e7a..c42cb1d7a90c 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -177,7 +177,7 @@ TAILQ_HEAD(, snd_midi) midi_devs; * /dev/midistat variables and declarations, protected by midistat_lock */ -struct sx midistat_lock; +struct sx mstat_lock; static int midistat_isopen = 0; static struct sbuf midistat_sbuf; @@ -258,6 +258,24 @@ SYSCTL_INT(_hw_midi_stat, OID_AUTO, verbose, CTLFLAG_RW, * CODE START */ +void +midistat_lock(void) +{ + sx_xlock(&mstat_lock); +} + +void +midistat_unlock(void) +{ + sx_xunlock(&mstat_lock); +} + +void +midistat_lockassert(void) +{ + sx_assert(&mstat_lock, SA_XLOCKED); +} + /* * Register a new rmidi device. cls midi_if interface unit == 0 means * auto-assign new unit number unit != 0 already assigned a unit number, eg. @@ -280,7 +298,7 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) uint8_t *buf; MIDI_DEBUG(1, printf("midiinit: unit %d/%d.\n", unit, channel)); - sx_xlock(&midistat_lock); + midistat_lock(); /* * Protect against call with existing unit/channel or auto-allocate a * new unit number. @@ -358,7 +376,7 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) TAILQ_INSERT_TAIL(&midi_devs, m, link); - sx_xunlock(&midistat_lock); + midistat_unlock(); m->dev = make_dev(&midi_cdevsw, unit, UID_ROOT, GID_WHEEL, 0666, "midi%d.%d", unit, channel); @@ -378,7 +396,7 @@ err1: free(m->synth, M_MIDI); free(m, M_MIDI); err0: - sx_xunlock(&midistat_lock); + midistat_unlock(); MIDI_DEBUG(1, printf("midi_init ended in error\n")); return NULL; } @@ -396,7 +414,7 @@ midi_uninit(struct snd_midi *m) int err; err = EBUSY; - sx_xlock(&midistat_lock); + midistat_lock(); mtx_lock(&m->lock); if (m->busy) { if (!(m->rchan || m->wchan)) @@ -418,7 +436,7 @@ midi_uninit(struct snd_midi *m) err: mtx_unlock(&m->lock); exit: - sx_xunlock(&midistat_lock); + midistat_unlock(); return err; } @@ -926,9 +944,9 @@ midistat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) MIDI_DEBUG(1, printf("midistat_open\n")); - sx_xlock(&midistat_lock); + midistat_lock(); if (midistat_isopen) { - sx_xunlock(&midistat_lock); + midistat_unlock(); return EBUSY; } midistat_isopen = 1; @@ -940,7 +958,7 @@ midistat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) out: if (error) midistat_isopen = 0; - sx_xunlock(&midistat_lock); + midistat_unlock(); return error; } @@ -948,14 +966,14 @@ static int midistat_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { MIDI_DEBUG(1, printf("midistat_close\n")); - sx_xlock(&midistat_lock); + midistat_lock(); if (!midistat_isopen) { - sx_xunlock(&midistat_lock); + midistat_unlock(); return EBADF; } sbuf_delete(&midistat_sbuf); midistat_isopen = 0; - sx_xunlock(&midistat_lock); + midistat_unlock(); return 0; } @@ -966,13 +984,13 @@ midistat_read(struct cdev *i_dev, struct uio *uio, int flag) int err; MIDI_DEBUG(4, printf("midistat_read\n")); - sx_xlock(&midistat_lock); + midistat_lock(); if (!midistat_isopen) { - sx_xunlock(&midistat_lock); + midistat_unlock(); return EBADF; } if (uio->uio_offset < 0 || uio->uio_offset > sbuf_len(&midistat_sbuf)) { - sx_xunlock(&midistat_lock); + midistat_unlock(); return EINVAL; } err = 0; @@ -981,7 +999,7 @@ midistat_read(struct cdev *i_dev, struct uio *uio, int flag) err = uiomove(sbuf_data(&midistat_sbuf) + uio->uio_offset, l, uio); } - sx_xunlock(&midistat_lock); + midistat_unlock(); return err; } @@ -994,7 +1012,7 @@ midistat_prepare(struct sbuf *s) { struct snd_midi *m; - sx_assert(&midistat_lock, SA_XLOCKED); + midistat_lockassert(); sbuf_printf(s, "FreeBSD Midi Driver (midi2)\n"); if (TAILQ_EMPTY(&midi_devs)) { @@ -1353,7 +1371,7 @@ midisynth_bender(void *n, uint8_t chn, uint16_t val) static int midi_destroy(struct snd_midi *m, int midiuninit) { - sx_assert(&midistat_lock, SA_XLOCKED); + midistat_lockassert(); mtx_assert(&m->lock, MA_OWNED); MIDI_DEBUG(3, printf("midi_destroy\n")); @@ -1379,7 +1397,7 @@ midi_destroy(struct snd_midi *m, int midiuninit) static int midi_load(void) { - sx_init(&midistat_lock, "midistat lock"); + sx_init(&mstat_lock, "midistat lock"); TAILQ_INIT(&midi_devs); midistat_dev = make_dev(&midistat_cdevsw, MIDI_DEV_MIDICTL, UID_ROOT, @@ -1396,7 +1414,7 @@ midi_unload(void) MIDI_DEBUG(1, printf("midi_unload()\n")); retval = EBUSY; - sx_xlock(&midistat_lock); + midistat_lock(); if (midistat_isopen) goto exit0; @@ -1409,19 +1427,19 @@ midi_unload(void) if (retval) goto exit1; } - sx_xunlock(&midistat_lock); + midistat_unlock(); destroy_dev(midistat_dev); /* * Made it here then unload is complete */ - sx_destroy(&midistat_lock); + sx_destroy(&mstat_lock); return 0; exit1: mtx_unlock(&m->lock); exit0: - sx_xunlock(&midistat_lock); + midistat_unlock(); if (retval) MIDI_DEBUG(2, printf("midi_unload: failed\n")); return retval; @@ -1470,7 +1488,7 @@ midimapper_open_locked(void *arg1, void **cookie) int retval = 0; struct snd_midi *m; - sx_assert(&midistat_lock, SX_XLOCKED); + midistat_lockassert(); TAILQ_FOREACH(m, &midi_devs, link) { retval++; } @@ -1483,9 +1501,9 @@ midimapper_open(void *arg1, void **cookie) { int retval; - sx_xlock(&midistat_lock); + midistat_lock(); retval = midimapper_open_locked(arg1, cookie); - sx_xunlock(&midistat_lock); + midistat_unlock(); return retval; } @@ -1502,7 +1520,7 @@ midimapper_fetch_synth_locked(void *arg, void *cookie, int unit) struct snd_midi *m; int retval = 0; - sx_assert(&midistat_lock, SX_XLOCKED); + midistat_lockassert(); TAILQ_FOREACH(m, &midi_devs, link) { if (unit == retval) return (kobj_t)m->synth; @@ -1517,9 +1535,9 @@ midimapper_fetch_synth(void *arg, void *cookie, int unit) { kobj_t synth; - sx_xlock(&midistat_lock); + midistat_lock(); synth = midimapper_fetch_synth_locked(arg, cookie, unit); - sx_xunlock(&midistat_lock); + midistat_unlock(); return synth; } diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index afbfdfa6abbc..2254fab690e9 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -39,10 +39,12 @@ MALLOC_DECLARE(M_MIDI); #define M_RXEN 0x04 #define M_TXEN 0x08 -extern struct sx midistat_lock; - struct snd_midi; +void midistat_lock(void); +void midistat_unlock(void); +void midistat_lockassert(void); + struct snd_midi * midi_init(kobj_class_t _mpu_cls, int _unit, int _channel, void *cookie); int midi_uninit(struct snd_midi *_m); diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c index 01f9d0b4809b..6b3a2711e951 100644 --- a/sys/dev/sound/midi/sequencer.c +++ b/sys/dev/sound/midi/sequencer.c @@ -746,7 +746,7 @@ mseq_open(struct cdev *i_dev, int flags, int mode, struct thread *td) * Mark this device busy. */ - sx_xlock(&midistat_lock); + midistat_lock(); mtx_lock(&scp->seq_lock); if (scp->busy) { mtx_unlock(&scp->seq_lock); @@ -784,7 +784,7 @@ mseq_open(struct cdev *i_dev, int flags, int mode, struct thread *td) } } } - sx_xunlock(&midistat_lock); + midistat_unlock(); timer_setvals(scp, 60, 100); From nobody Sat Jul 6 18:24:14 2024 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 4WGf0v1NBDz5PMKQ; Sat, 06 Jul 2024 18:24: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WGf0t4Rh4z54CP; Sat, 6 Jul 2024 18:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290254; 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=UBl5QC25BDplYBP16w3Shd413sffDrORP8w7fZza0wo=; b=bZKi1mqKTCL0eARVYGqy00sjLXiplc9WzL5BJB4kRPSQImeT9sU4+Jqjg1qqA6j1anS38b iTjBUwk/410lt7mLXI2Jq70rrwhOnmWYRmbMlj33YTOdMwakXkFOojlSbHewiPVbPxt8aI Cr/HRuV0mmiMAH0s2o4odBkD6cnrepfouytKLZMQoazM+GCuJzcIuqSrd9bZAJM1pQl3kN z1892Gib/b/DLEYQUS4sNAtAk5VY27ySk/0/nqGFEqUNU2Vx/MQh7m8P7MboQGxXa596VJ EVwTlDoXqAqhBDRSiMSK3Nr3PChazui3aL6AW8TsfNx3ffHeRw1yKWFeGhfZew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290254; a=rsa-sha256; cv=none; b=fX3vus15DXKHmC2CkgInz1IgK7gdZlPrIIIf1RbNxjW4thJRpg5blF4BsFXm6le+eOLvob 6m1CPeV4FOIMjt5W4maaF66P/FTPiFTwu7rKS0ib4q4klxRGxBT+r0XypuVW3MLmG/oJDo ttd2CFugV+J5H520c4nX+SDIiLWBszlGyUwLdWBhDSbjEg3JZqRnZ+KVhsRyLId/FpP0FR rjzOIf3kM6xXOK20+gMMWeeNKVrg3CVR48D+gfTm+CMd6gfROEvQGjOCZCgtSLHAnrgk6B R57XgV94gTC2QSPjkHKh/RoWk4ob9imJQvdHvp/FpbD0c/PJ87cQY2diZ3X/PA== 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=1720290254; 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=UBl5QC25BDplYBP16w3Shd413sffDrORP8w7fZza0wo=; b=f3QA+JZsg3LjIZrpco1Rm91tZIC7s8mVpKw8chXZeqpob6Bbb5q9J60/6cDxKyrE9QGaBB oY8bnK25SOmewOpyclEnR4ckRv0jXMUA4HYrDSY9sYE+Wz5f4TGi4iHv9KLuCtDw2Pr16u 6jT/I3UDzVwVPiJUk59XA1jwgDgKmTcTxu0Zm8tkUM80xD4qd+CqPeWmpDFgfh69b+0gtU /i6CBYNjTMP/Ko2TNUfImZWq/h+pTl+ul8EDb7FnGMkRLlMqJLH2yN0oRiGfVNY95Lr01n 4TgslluUgby+fkNVMT/gwRTrTa2qIPBrF921O12A68n3EoxnMSNteNj/Gv46yA== 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 4WGf0t3p6Mzqd1; Sat, 6 Jul 2024 18:24:14 +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 466IOExU090891; Sat, 6 Jul 2024 18:24:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOE41090888; Sat, 6 Jul 2024 18:24:14 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:14 GMT Message-Id: <202407061824.466IOE41090888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: a9f08df3e900 - main - sound: Remove dead code in pcm_register() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9f08df3e9004f431e98f67afc1ac2b2f773ec14 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f08df3e9004f431e98f67afc1ac2b2f773ec14 commit a9f08df3e9004f431e98f67afc1ac2b2f773ec14 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:55 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:22:55 +0000 sound: Remove dead code in pcm_register() Sponsored by: The FreeBSD Foundation MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D45831 --- sys/dev/sound/pcm/sound.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 8d97dcd60231..b18b83468150 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -558,14 +558,7 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec) d->lock = snd_mtxcreate(device_get_nameunit(dev), "sound cdev"); cv_init(&d->cv, device_get_nameunit(dev)); PCM_ACQUIRE_QUICK(d); -#if 0 - /* - * d->flags should be cleared by the allocator of the softc. - * We cannot clear this field here because several devices set - * this flag before calling pcm_register(). - */ - d->flags = 0; -#endif + i = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "vpc", &i) != 0 || i != 0) From nobody Sat Jul 6 18:24:16 2024 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 4WGf0x10tPz5PMHM; Sat, 06 Jul 2024 18:24:17 +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 4WGf0w6108z54SV; Sat, 6 Jul 2024 18:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290256; 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=W3aPSSvS20R5Cn264TO5cZ3Uwbt98IK1RohgBNutW58=; b=LFnaEQfGnjtX9J/P+0uPdXy+qwwee1NZzET3SkXedGV3awVefJxiL+c82eNi47I8j/ZNX8 jSiMlYX2mHrNhHZxlzr03jA0dvrjBO455OH1gpOyCk0mD/Iz4/7FwmOkpQym3BVzVrOtmd XLowveMP0u8SvGNyFml+jle7Uye3jzKKRscAmZ0BjHU92alAotjjmN6NXBSDna2/E0cfOl gZtNXNhBiGbEYp6+xNAvgFxMfMPz93cOZonbWuciuDzbVs6BlRqOE1SiVR06dPJ8Pk4hIX ZK9EhHGjYaTtP9MAey0Lt8BG/s5utDFhFq3UtnLNpizm1svvP1Rz1I75FjQKvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290256; a=rsa-sha256; cv=none; b=UXydZFXGAU699UaBxv8Xuu90ZaCT2sU10UYzAuoAzqwUw6jIVRU027TqKXr49yFyR3hlAN gS0DFouZhuA0lYZ3AE1ykcLhRl//iJo+1QLr/wlssdX2wDF4+Yzxm5yAdwrjeMqBORzpzW Yeh9jzDxxWj+p07dgpn3wIxWjJNHpoYkmA1UPWnWlpT2FnsdwuEQrWOkpHMakLeKBHcTYV n1XuD+30WJo9+fNAhKUlH57/MJymZCI0Y68mfJdeCLLqSWpCRLFSw4hz7c3ashY/mZvd1e lGKjT2+2I1XPpiOniMXQDItferOdvL6b/bmN5zElSoCXyV+8A7uuTPTMTfwReg== 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=1720290256; 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=W3aPSSvS20R5Cn264TO5cZ3Uwbt98IK1RohgBNutW58=; b=YlIPYlo2RHgDQ+wy6iLg4wLhcvQ5Uw6qEeiXu3lDcp1Kojl65FfEkzXRQ5jhjEjC3KJEOA dLRdSpbon//P3HBCDI/GRaZmg8bYDzBz2R4igmL5ySHahU5o5kQG1gQCCETEAG3oxgQQdO AT4MgTRDVeug6UMn2HeQyCGNIEc8VRmxVH9ux6RRwt6I7pr6oqjt5gG5KhYSRAnrryB/1T MvD2V+Lk7PS8T5HV1Uqd6OBi8Fk8ZL+Rf5klKVyQCkD8PsEDqr7p3w9hh4XW9BIc7XOJdo wN1R3dhphgehSm+LgTFP+Zw6bi0cimYeV4loKXPEijFL5BGPFefpLBxxptI36Q== 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 4WGf0w5bXPzrWc; Sat, 6 Jul 2024 18:24:16 +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 466IOGsu090988; Sat, 6 Jul 2024 18:24:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOGTK090985; Sat, 6 Jul 2024 18:24:16 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:16 GMT Message-Id: <202407061824.466IOGTK090985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 86585210fd56 - main - sound: Fix min/max rate for SNDCTL_AUDIOINFO and SNDCTL_ENGINEINFO 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86585210fd5657542884b22eb52b21e960b7be6c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=86585210fd5657542884b22eb52b21e960b7be6c commit 86585210fd5657542884b22eb52b21e960b7be6c Author: Christos Margiolis AuthorDate: 2024-07-06 18:23:04 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:23:04 +0000 sound: Fix min/max rate for SNDCTL_AUDIOINFO and SNDCTL_ENGINEINFO Since we allow feeding of any rate within the [feeder_rate_min, feeder_rate_max] range, report this as the min/max rate as well. Only exceptions are when we the device is opened in exclusive or bitperfect mode. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45862 --- sys/dev/sound/pcm/dsp.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 27c89c3231b7..0689dfedb9c2 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2170,8 +2170,13 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) else ai->iformats |= fmts; - ai->min_rate = min(ai->min_rate, caps->minspeed); - ai->max_rate = max(ai->max_rate, caps->maxspeed); + if (ex || (pcm_getflags(d->dev) & SD_F_BITPERFECT)) { + ai->min_rate = min(ai->min_rate, caps->minspeed); + ai->max_rate = max(ai->max_rate, caps->maxspeed); + } else { + ai->min_rate = min(ai->min_rate, feeder_rate_min); + ai->max_rate = max(ai->max_rate, feeder_rate_max); + } ai->min_channels = min(ai->min_channels, minch); ai->max_channels = max(ai->max_channels, maxch); @@ -2369,8 +2374,15 @@ dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) * @todo @c handle - haven't decided how to generate * this yet; bus, vendor, device IDs? */ - ai->min_rate = caps->minspeed; - ai->max_rate = caps->maxspeed; + + if ((ch->flags & CHN_F_EXCLUSIVE) || + (pcm_getflags(d->dev) & SD_F_BITPERFECT)) { + ai->min_rate = caps->minspeed; + ai->max_rate = caps->maxspeed; + } else { + ai->min_rate = feeder_rate_min; + ai->max_rate = feeder_rate_max; + } ai->min_channels = minch; ai->max_channels = maxch; From nobody Sat Jul 6 18:24:17 2024 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 4WGf0y5gK7z5PMVN; Sat, 06 Jul 2024 18:24:18 +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 4WGf0y0JYpz54QK; Sat, 6 Jul 2024 18:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290258; 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=Xy4XKOaz1l3HzHSWNVCYFQj1qkm5N4BaHuYxjfWX+8E=; b=Vbv6cbylt17uxapuuHii6SmYcy8ezVSFkZGWPc17YtGc2Cc4lBIIxSQ2WkyRJrfaVU8QI+ vL+B4gL0FYTjB48B9g7PkO0/Idzhbjd5RxFTRw6BFb93fKv3ePRIYJwoBqZTTLtWiQFJlC T2JP5ZvVhfAI/gPRBFcVzuGiDkvMnCiTyomBuIZu2ntwHc707FFewJjtf6cJkvZRHyF4RU Pio+JY+KBzkAaHmoyfdc5xW6rhzTnpbj0ypwvlUm4cXTuehd917HtjLETPMVL6FU7UfGlx OK37nXkOkgd0jH241nGN0DFdSRHcKUyg0CokTrJ+wGNvyf3SekZ5k14+ckW0uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290258; a=rsa-sha256; cv=none; b=EvLOokvXrT5wkzy0svT3R75N0+n1uO78DTOrT0M3nFcPR9UsyyMLN7Bs6iLbsZbPKs+WwU SZqWYRIbBoVSOW3UVC337+R4eDd3+srzyV3yvxc3OEM7+5g8R9E3Wlfh146QH4m9iubSHx z5KSkFBUVIuAEpKX98Ib3leI3xrcOK/vAfVhvri9tyKHbHzQ2StN5dmtOmU12M731kdm+Q V4tPysNPeNwfPxVV+v2hL37tES74OLd1LQ2gu+gZEmN7BV+mdOF0h2AYC9EyAIQKrpdubb LSJ2qtb537W1Lfzu4O0jq9awxeNPA8bHGPGNz/v7F/UTcxywJ/AFyb6t8vDR1w== 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=1720290258; 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=Xy4XKOaz1l3HzHSWNVCYFQj1qkm5N4BaHuYxjfWX+8E=; b=iEEcg4guSdtA9zZ1S41u/NaiRqSzmMWFw0WYN6xoHxKW85txI2F/BkfSRS7F1Ua/sLBTfJ FiXd2l7a6md20Y8m8IMlsaZQw+pSTs5MzwmtvlZ3jvw8+bLPrB9WLkC82wgwsaDKvQQ5ey 4eFCdGHCNoLgNCLslvVtdDJUPcXQ56Bv8ItgXk8N27yS2/1BPxCT3eY1EwaJytVdKJMbn3 lX1kgzS8aZUZxfvzcBcl3OGDnC1NaZtdRXEIEX4PqYBj1701D2oObLeUAulEYdHsAMzk2R Qt9Nw5lIW33ifXlFyMf1ybb8yLIoHO+2GN7jHp3VVf3hSIx0vJxVWYFJNBMpvg== 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 4WGf0x70wFzrVw; Sat, 6 Jul 2024 18:24:17 +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 466IOHqJ091024; Sat, 6 Jul 2024 18:24:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOH54091021; Sat, 6 Jul 2024 18:24:17 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:17 GMT Message-Id: <202407061824.466IOH54091021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9d8b93bc9cce - main - sound: Refactor sndstat_get_caps() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d8b93bc9ccea82b648ffa9354200c9e4d3f211b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9d8b93bc9ccea82b648ffa9354200c9e4d3f211b commit 9d8b93bc9ccea82b648ffa9354200c9e4d3f211b Author: Christos Margiolis AuthorDate: 2024-07-06 18:23:09 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:23:09 +0000 sound: Refactor sndstat_get_caps() The current implementation of sndstat_get_caps() does not work properly when VCHANs are enabled, as it skips all information about physical channels, and also assigns the min/max rates and channels to same values, which is usually not the case. A device either supports any sample rate within the [feeder_rate_min, feeder_rate_max] range, or [hw_rate_min, hw_rate_max] range when the device is opened in exclusive or bitperfect mode. The number of channels can also vary and is not always the same for both min and max. Refactor the whole function to resemble the way we handle fetching of these values in dsp_oss_audioinfo() and dsp_oss_engineinfo(). Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45872 --- sys/dev/sound/pcm/sndstat.c | 44 +++++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 3be376e1da01..5b770810d19b 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -323,47 +323,37 @@ sndstat_write(struct cdev *i_dev, struct uio *buf, int flag) } static void -sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, +sndstat_get_caps(struct snddev_info *d, int dir, uint32_t *min_rate, uint32_t *max_rate, uint32_t *fmts, uint32_t *minchn, uint32_t *maxchn) { struct pcm_channel *c; - int dir; - - dir = play ? PCMDIR_PLAY : PCMDIR_REC; - - if (play && d->pvchancount > 0) { - *min_rate = *max_rate = d->pvchanrate; - *fmts = AFMT_ENCODING(d->pvchanformat); - *minchn = *maxchn = AFMT_CHANNEL(d->pvchanformat); - return; - } else if (!play && d->rvchancount > 0) { - *min_rate = *max_rate = d->rvchanrate; - *fmts = AFMT_ENCODING(d->rvchanformat); - *minchn = *maxchn = AFMT_CHANNEL(d->rvchanformat); - return; - } + struct pcmchan_caps *caps; + int i; *fmts = 0; *min_rate = UINT32_MAX; *max_rate = 0; *minchn = UINT32_MAX; *maxchn = 0; - CHN_FOREACH(c, d, channels.pcm) { - struct pcmchan_caps *caps; - int i; - if (c->direction != dir || (c->flags & CHN_F_VIRTUAL) != 0) + CHN_FOREACH(c, d, channels.pcm) { + if (c->direction != dir) continue; - CHN_LOCK(c); caps = chn_getcaps(c); - *min_rate = min(caps->minspeed, *min_rate); - *max_rate = max(caps->maxspeed, *max_rate); for (i = 0; caps->fmtlist[i]; i++) { *fmts |= AFMT_ENCODING(caps->fmtlist[i]); *minchn = min(AFMT_CHANNEL(caps->fmtlist[i]), *minchn); *maxchn = max(AFMT_CHANNEL(caps->fmtlist[i]), *maxchn); } + if ((c->flags & CHN_F_EXCLUSIVE) || + (pcm_getflags(d->dev) & SD_F_BITPERFECT)) { + *min_rate = min(*min_rate, caps->minspeed); + *max_rate = max(*max_rate, caps->maxspeed); + } else { + *min_rate = min(*min_rate, feeder_rate_min); + *max_rate = max(*max_rate, feeder_rate_max); + } CHN_UNLOCK(c); } if (*min_rate == UINT32_MAX) @@ -422,8 +412,8 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_add_number(di, SNDST_DSPS_PCHAN, d->playcount); nvlist_add_number(di, SNDST_DSPS_RCHAN, d->reccount); if (d->playcount > 0) { - sndstat_get_caps(d, true, &minrate, &maxrate, &fmts, &minchn, - &maxchn); + sndstat_get_caps(d, PCMDIR_PLAY, &minrate, &maxrate, &fmts, + &minchn, &maxchn); nvlist_add_number(di, "pminrate", minrate); nvlist_add_number(di, "pmaxrate", maxrate); nvlist_add_number(di, "pfmts", fmts); @@ -435,8 +425,8 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_move_nvlist(di, SNDST_DSPS_INFO_PLAY, diinfo); } if (d->reccount > 0) { - sndstat_get_caps(d, false, &minrate, &maxrate, &fmts, &minchn, - &maxchn); + sndstat_get_caps(d, PCMDIR_REC, &minrate, &maxrate, &fmts, + &minchn, &maxchn); nvlist_add_number(di, "rminrate", minrate); nvlist_add_number(di, "rmaxrate", maxrate); nvlist_add_number(di, "rfmts", fmts); From nobody Sat Jul 6 18:24:20 2024 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 4WGf105WVhz5PMHT; Sat, 06 Jul 2024 18:24:20 +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 4WGf102kdfz54ZH; Sat, 6 Jul 2024 18:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290260; 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=Yx5KRZ/lDSZR4klCEABzwzPNhsdyuSVjnm0Tw+cic6Q=; b=T6iz7NhQ+tSjohr8xYUWoqzf/6bjpY/vex0YS9QFmOVjmFf39dXZvCZWHH7HgPor10z3GR Fv5qGPAB0OlkkXFiNHEUIawwnkQCl7HkQ8zsb/RT7ovlkgBkevzBSYaIeW7vpo0F8sJjOL wqIE5Omq9Tai1xaFXUkuH5qf6N//FXHkDvQEI/93IPYibygeEst6zDceui/uJKcpp/Sf9A LDahLcXhj3u5PYfRW+BHLjy5E0EZNrHuqmjhqjW2e4l4gFPKRc35Zti50DwulUNQVMJlq+ YaphvPDT/aDAj97YOBZXcqY3e/8QR2oO2zj9s8/zlFgC4YibTDr4T1xp6JrqtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290260; a=rsa-sha256; cv=none; b=XdkMggbHYWVEqJrDdtAERRSohrw/QI+XcyVGTtpK5N8PVh63F3Xb+8sQ/yP7uRZMNMpH+G DAKwzGBDYUUAcrvt+QOSVA+pyxURImZW9azx3C6EK1VCRWM/9y0qgVoP9GICTiPstvEgNU OQ8xpfeafEw4Z7eR3vxNUFoo28UmeN5dcajUzxpAwVYXyw1RA8T0CMHMGlO6W6w5JUcJQa yx+VqlrSBpGo1FLod7osz3b1KTY16UU5+GCWm92MKYSZQ9snApnqJNhGYVEJDmMURaiyB8 q4Htk4jxbRvs66o4eilWZWgTQF2Wz6OSHoD6WQ0ts9q+yX6ga4/i8PD/Dm67Xg== 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=1720290260; 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=Yx5KRZ/lDSZR4klCEABzwzPNhsdyuSVjnm0Tw+cic6Q=; b=ZRUbpymxSjr+4EMz/cg/k8JM90QJCXDwtbhNEDANwsuAWCFJaAnoAxX6AcAN6BTsQMzXej OrB24mfx6jYo9LpQjJyxn7ubjWQPqgnb2Xz89EWCDDYNaSLhKz6cDGHCdZiby56+ABqKSf xcFHFzwIIHQApXIb21VRlJ5SaNx495kTp1EeRiQ/Dpyl/TrOKoAQNMokLNZMX3OJ51R1TA u6L7KENgsFCT46NRWNcVw6fvcldG74IEjtTKqdHVlLbQ4A8SujOYP4BZ5iQ969SbjExidt up+EwEs+xDEcVtsW3cQQ0OaXo+m7V5FImK/zhSDE556zEXWCYxAI7dDy87jh/w== 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 4WGf102LlTzqwC; Sat, 6 Jul 2024 18:24:20 +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 466IOKer091129; Sat, 6 Jul 2024 18:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOK3K091126; Sat, 6 Jul 2024 18:24:20 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:20 GMT Message-Id: <202407061824.466IOK3K091126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: e850bd36dfda - main - sound: Add missing CHN_[UN]LOCKs in sndstat 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e850bd36dfda98608432d2459800627d16119fec Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e850bd36dfda98608432d2459800627d16119fec commit e850bd36dfda98608432d2459800627d16119fec Author: Christos Margiolis AuthorDate: 2024-07-06 18:23:22 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:23:22 +0000 sound: Add missing CHN_[UN]LOCKs in sndstat In sndstat_build_sound4_nvlist(), if we have INVARIANTS or SND_DIAGNOSTIC enabled, we will hit a lock assertion panic when we call CHN_GETVOLUME(). Also lock the channel in the sndstat_prepare_pcm() loop for good measure. Fixes: bbca3a75bb41 ("sound: Include sound(4) channel information in sndstat nvlist") Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45898 --- sys/dev/sound/pcm/sndstat.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 5b770810d19b..753531f3694e 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -456,6 +456,8 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) goto done; } + CHN_LOCK(c); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_NAME, c->name); nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_PARENTCHAN, c->parentchannel != NULL ? c->parentchannel->name : ""); @@ -537,6 +539,8 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) sbuf_printf(&sb, "%s]", (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + CHN_UNLOCK(c); + sbuf_finish(&sb); nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_FEEDERCHAIN, sbuf_data(&sb)); @@ -1230,6 +1234,8 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) KASSERT(c->bufhard != NULL && c->bufsoft != NULL, ("hosed pcm channel setup")); + CHN_LOCK(c); + sbuf_printf(s, "\n\t"); sbuf_printf(s, "%s[%s]: ", @@ -1321,6 +1327,8 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + + CHN_UNLOCK(c); } return (0); From nobody Sat Jul 6 18:24:19 2024 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 4WGf0z2sQKz5PMPY; Sat, 06 Jul 2024 18:24:19 +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 4WGf0z1Y1Zz54Jf; Sat, 6 Jul 2024 18:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720290259; 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=oWxvXHiLeeE/HJHN+HBsbW2RslG+en2ndnyHHscFqps=; b=RjvhUjpK6jqekTVjiT6cqOlLMz8V5BtJsmnlo5zbPmQWW9CEPv+8HRPdvkj+pm+88mpWGB zjUCi+P6VmBGSdSqRZX/0rwPb+Gyhi8/NXAmF13U0cEqEMO2y/v4hYyJYokN8wQv5aFXIO WRDJOn4KO/Hhge5uxS6qISXeaosCTh/MvDLSykeIFFOlBuiQDLWN0omfBLhz9adetz1SHN tD/nKyDIf47Vp0Z+h2IgnFVD4iciAK5gY8NObgCbcMDDLs8rUN9LrLsS1CmP4mrAneJhKC wWdK5e1GUVQFprFSMNQa9BhGG21LtgB5Nd4GDDc/kggToFHJPKNod6azPNVQBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720290259; a=rsa-sha256; cv=none; b=pEgwcGfgN2O4wK+0JY3TStqO7f83FNjVuh+/o0ShLsQi+Ji4PyDLhFq3Mdsxw2VAG2+Gcr zWeAfMLEgwNQWO3aHUZtjcS07HDP08he/9TrClA+WgO1M58xlvfyI/tXKZ3svN97/4X+Tc hxGz1lHNyxRAWDQwjNVsoAtcinF7B/TguYZdXNiM1K9KbJFzDwxctd79YXmQNX62HzHurn 3rwavLcJaRaRJYnAFOIm7IMY3bhOzBWjX3PaoaSMDrKeAypOjaHThJNH0G4rJdorWf2SEA lXMGkEfjdnEc2oRUPnYSuPZ0RFprjKUhiiarj9wttSScvoSepiaTp7wIlyHUpg== 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=1720290259; 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=oWxvXHiLeeE/HJHN+HBsbW2RslG+en2ndnyHHscFqps=; b=YcjPfXh4kyKLhH6Hs+Kosi2OkpXPv0HHLY+Rvq+hw7B0uHda5THGf5qMLf27iIXo/IwjM5 oINq/LHk2js6FVIp2I/diDHHhgouP43MTPXIBa+DWPsgTLs/3xFUtQ9Hbl/d8on29TNUei phGr0Yw3gVbZSpybVzaCTSwA+QcGEzSeC7V1mXLxc96kYOFNvUo+iINtdo72b0+rIQ9Agg wsLYezSaBqTMNNv8FAAGz8xyVCtzC2LiyCsPmqjB/TljFauBC0q3iz0zR8def7t56w0o5e wP3Lylv+TEhkgCsCnCdQA4u+UzZthRdvTRz1BjuT3p959ma766ztEdw/qCW/+g== 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 4WGf0z16cbzqq0; Sat, 6 Jul 2024 18:24:19 +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 466IOJpm091078; Sat, 6 Jul 2024 18:24:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466IOJwK091075; Sat, 6 Jul 2024 18:24:19 GMT (envelope-from git) Date: Sat, 6 Jul 2024 18:24:19 GMT Message-Id: <202407061824.466IOJwK091075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 1a768ea9db3d - main - sound: Add min_rate and min_channels safety check in SNDCTL_AUDIOINFO 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a768ea9db3d66941b0dc5340ac028ef548808b8 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1a768ea9db3d66941b0dc5340ac028ef548808b8 commit 1a768ea9db3d66941b0dc5340ac028ef548808b8 Author: Christos Margiolis AuthorDate: 2024-07-06 18:23:15 +0000 Commit: Christos Margiolis CommitDate: 2024-07-06 18:23:15 +0000 sound: Add min_rate and min_channels safety check in SNDCTL_AUDIOINFO If the channel list is empty, min_rate and min_channels will be INT_MAX. Instead, assign them to 0, like we do in sndstat_get_caps(). Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45876 --- sys/dev/sound/pcm/dsp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 0689dfedb9c2..2b765bc8b115 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2182,6 +2182,10 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) CHN_UNLOCK(ch); } + if (ai->min_rate == INT_MAX) + ai->min_rate = 0; + if (ai->min_channels == INT_MAX) + ai->min_channels = 0; PCM_UNLOCK(d); From nobody Sat Jul 6 19:44:44 2024 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 4WGgnn0DMLz5PnNY; Sat, 06 Jul 2024 19:44:45 +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 4WGgnm6fvDz483k; Sat, 6 Jul 2024 19:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720295084; 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=8rnaGh+cYFGKhRz5+GwsZRNGSubj8lOUn5wx4Zk+efU=; b=h/rKaE9c/KRPx64mq/gy9z1JqBvCntK8DMhgnKSl8XItd39K4g/CoQfDPiY1QST7IJUtx+ 5sCOqKDCdHS8E1rngxNH0lm9aYPl9XNIFKxQxjeXppAQ7VuVugaPCUtGTcKHNFKI1JS9TN 8QPbhneFkNB0DUuyGx+lsp30kbda7zR6x65xjSYLtvzqLCn5aALtNuk800TWjzedGDbLam iI4ZXVwULSjWwEVYE3klRg6s7ggqHTuEHLoqkbxaSeTCoPQ9qoQDB0nFmX7QB/cJIJplTH MrdzG0i728Aoj0v8oeSt7LwFANjGVUezho5kYv+EVQ5mA6lXpc3VMMYWQCunWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720295084; a=rsa-sha256; cv=none; b=vt4osGdtfHE1uidX2jcvW/TtrAQQfuD8SYHxp19Bz7bZHDqvYAONHPcHjomng+t3KlToSr 2nRKPOLMA8oQzOF4SZlp0ee5xc8OJrV9tdacnM6iExx8y7JKeycL4JDmJAIBEDHPXJf8MK gOudOyxv8v6FlvRmQG0qLLqmaqVaB10WfU6Md0nBmpGJH5UKVxfJECjBGbofU8vyf8EgPS 6IgLA/E7EtOmsIJQIzACoZVXomi9xshUGz/ERIaqXeH1zsJbFYA/8xFYoASZKer/LBIJmf bkh+I6idadEJ357Mx6cmrMTvZEOP9Ij6K/m9c26moCvSVPkSTEjZt5BgmrRWqQ== 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=1720295084; 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=8rnaGh+cYFGKhRz5+GwsZRNGSubj8lOUn5wx4Zk+efU=; b=XjpdpzcVprrisPoPsXQ5lGUntuL+4nrVPzR68l8jXM8fp5OE+z/xWOAdBtQlLdo5oSh093 QH7BweCUAtVWXEiwLrz7UEt7xTkdbeXpREXCJel0HckFh+zAO7jxiMz2mATiPwBIgA2FC9 k+sQ60K1UfDJgmpT+kM10VPwfBnSygny7WPr3q3SiAS9Gf/UAkml8ALYg33ai2jAJ+cFTh +4+VboAkKWCBCzlmriFwg12LTCqjPYyHTTF93fe506LHkpb+LbdWs5E3ooQmGGfDMFpSPM 6lFwQc5bSylG/+matU8lglhSXbURw0aPS+uF//c98LwZNo2Qa0+0jJhfH2oawQ== 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 4WGgnm687czsbG; Sat, 6 Jul 2024 19:44:44 +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 466JiigI026413; Sat, 6 Jul 2024 19:44:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466JiiQ3026410; Sat, 6 Jul 2024 19:44:44 GMT (envelope-from git) Date: Sat, 6 Jul 2024 19:44:44 GMT Message-Id: <202407061944.466JiiQ3026410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6677621bad00 - main - cdefs.h: Fallback to printf0 for __printf0like 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6677621bad00191dfec1b0a20ae1618b92745d9b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6677621bad00191dfec1b0a20ae1618b92745d9b commit 6677621bad00191dfec1b0a20ae1618b92745d9b Author: Warner Losh AuthorDate: 2024-07-06 19:42:37 +0000 Commit: Warner Losh CommitDate: 2024-07-06 19:45:03 +0000 cdefs.h: Fallback to printf0 for __printf0like For some reason, my tests were fine with this like it was, but CI for gcc12 and gcc13 is complaining. Revert to the old form until that can be worked out why the mismatch. Fixes: 0b82dac337e7 Sponsored by: Netflix --- sys/sys/cdefs.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 6b861b1903f6..a56839d57c7a 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -356,9 +356,12 @@ * Clang has always had printf and printf0 as aliases. gcc 11.0 now follows * clang. So now this is an alias for __printflike, or nothing. In the future * _Nullable or _Nonnull will replace this. + * XXX Except that doesn't work, so for now revert to printf0 for clang and + * the FreeBSD gcc until I can work this out. */ -#if defined(__clang__) || __GNUC_PREREQ__(11, 0) -#define __printf0like(fmtarg, firstvararg) __printflike(fmtarg, firstvararg) +#if defined(__clang__) || (defined(__GNUC__) && defined (__FreeBSD_cc_version)) +#define __printf0like(fmtarg, firstvararg) \ + __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) #else #define __printf0like(fmtarg, firstvararg) #endif From nobody Sat Jul 6 20:42:20 2024 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 4WGj4D360Fz5Pvkb; Sat, 06 Jul 2024 20:42:20 +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 4WGj4D2M3Cz4FCD; Sat, 6 Jul 2024 20:42:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720298540; 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=IRibl8fUmuj7bBE22A3seAbrTJlC7DggreH6s8IJuAI=; b=Mj9f0Xt/o03FpXBSXIW6ySCYeiO3wBDkZI1hV5UT7PwpxW2oCOEXTmMWR9Hsy3jAxl7LAy kcpyG7NbZ28gf8rbf8EcfddCx8+6hdUScz1z2D1xeoZCbRsLIJvnnEzpUp4QfkCrHYh2lL 9kIgugSU+cBhf3/uVXeKrrusWgsoQj69ZyQ6YnEOCLlOH0C/k7tpxpwhLp/AwHeQsDaN8i W4yu5ocd3kz4OCQlMHHzf5D/GJAg/OMttY42n0DtYGNFnIO3Ud3WcmNBEQZcWlqlz5/MY+ Ii+XbQT9Lx7Y2n11EYKa0SeTnqEmFfUy6+sD+Fx/K1hRQu3WpFCgwrfNRCT/pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720298540; a=rsa-sha256; cv=none; b=OgVL/Asc1T+FBI3jCwWlY1GwDfCVpUaUi1dDNupkRbYSMNeck8pHRhwn5ZQ2kmXsLo8PlG XKRFgslAMTpffwGGCPbFUJdSTiJFJOOwRdhXOrzvPFaqsnKgPK7RfY329tnaPfxG66EhxN k72kopK8NOi0vJlBlHQEO/LqRqbkTXPUDudOqKqHA6RoUtqaT08MBQaM+JggcYvecnhDoc Py5873f4P8jZtrP2hmd4JFRAs6j9uZ6PVh9bwyrKt/47jMqDyqQ71JwkLqPt7I6xXLzW51 CzCQEYmmoe97LeUyPBfLgJs18UOjBvpIixSGgsIBXx7ke33F8AQmtXhzxwpjTQ== 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=1720298540; 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=IRibl8fUmuj7bBE22A3seAbrTJlC7DggreH6s8IJuAI=; b=qW61lvQ4OcnZz+fkXG1KGxWJCFsv2ou5dX4Kf1+YSM1zYlNqkfeHxhSX6RBxEI3a7Y7tJ0 SiEGhNOkASvwlKXjH4Mum5jiFF1y7TlXmSQ5czHI0pfJTfM+JqJHzyRrb9XUS8shU7oxue FzA0u9KRDyrLi0L/BUcCaQNAHPp/iQGptaO8NY6StlORdJSYrBBrKPU7Nn4CHzYuq/EMWl N6Sw70WQz2hl+GPC2+MQYi+7sSOMgdk1A6QiMTmRCj4lRoWtSgtwMK30UQEh7VBf1eMoKb RvwtEDWqFovCIjVyi8PgQCZDUDlarNZ6pfQWyzxzmoNHK6I60sI2otxCdOq4Kg== 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 4WGj4D1fJLzvkc; Sat, 6 Jul 2024 20:42:20 +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 466KgKkj027164; Sat, 6 Jul 2024 20:42:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466KgKlC027161; Sat, 6 Jul 2024 20:42:20 GMT (envelope-from git) Date: Sat, 6 Jul 2024 20:42:20 GMT Message-Id: <202407062042.466KgKlC027161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: d8a99eaa1f06 - main - rpcbind: Add option to disable local host binding 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8a99eaa1f06bc3b3c017dce3e6ddf6b1fa37bcb Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=d8a99eaa1f06bc3b3c017dce3e6ddf6b1fa37bcb commit d8a99eaa1f06bc3b3c017dce3e6ddf6b1fa37bcb Author: Joyu Liao AuthorDate: 2024-07-06 20:39:07 +0000 Commit: Rick Macklem CommitDate: 2024-07-06 20:39:07 +0000 rpcbind: Add option to disable local host binding In our products, we need those options to support our features. Add daemon mode option for mountd, nfsd. Add skip local host binding option for rpcd. Add skip local host binding option for mountd. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D45118 --- usr.sbin/rpcbind/rpcbind.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index de05330d0ca5..44adae366bed 100644 --- a/usr.sbin/rpcbind/rpcbind.c +++ b/usr.sbin/rpcbind/rpcbind.c @@ -88,6 +88,7 @@ int libwrap = 0; #endif int nofork = 0; int verboselog = 0; +int nobind_localhost = 0; static char **hosts = NULL; static struct sockaddr **bound_sa; @@ -342,9 +343,9 @@ init_transport(struct netconfig *nconf) if (nhostsbak == 1) hosts[0] = "*"; else { - if (hints.ai_family == AF_INET) { + if (hints.ai_family == AF_INET && nobind_localhost == 0) { hosts[nhostsbak - 1] = "127.0.0.1"; - } else if (hints.ai_family == AF_INET6) { + } else if (hints.ai_family == AF_INET6 && nobind_localhost == 0) { hosts[nhostsbak - 1] = "::1"; } else return 1; @@ -802,7 +803,7 @@ parseargs(int argc, char *argv[]) #else #define WRAPOP "" #endif - while ((c = getopt(argc, argv, "6adh:iLlNs" WRAPOP WSOP)) != -1) { + while ((c = getopt(argc, argv, "6adh:IiLlNs" WRAPOP WSOP)) != -1) { switch (c) { case '6': ipv6_only = 1; @@ -823,6 +824,9 @@ parseargs(int argc, char *argv[]) if (hosts[nhosts - 1] == NULL) errx(1, "Out of memory"); break; + case 'I': + nobind_localhost = 1; + break; case 'i': insecure = 1; break; @@ -850,7 +854,7 @@ parseargs(int argc, char *argv[]) #endif default: /* error */ fprintf(stderr, - "usage: rpcbind [-6adiLls%s%s] [-h bindip]\n", + "usage: rpcbind [-6adIiLls%s%s] [-h bindip]\n", WRAPOP, WSOP); exit (1); } From nobody Sat Jul 6 20:49:34 2024 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 4WGjDb0SNKz5PwW0; Sat, 06 Jul 2024 20:49:35 +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 4WGjDZ6yw6z4G9v; Sat, 6 Jul 2024 20:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720298975; 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=NrLuodkjIwdDvG5g00oWfeghvczJg7pgVTIxOyqoHDk=; b=tZvVDb+pWSqPKlNmhIrcsOl5duAyFfl6gggsrheFgnwxxgXl4bAakJE1VVFivTk+dQOWQ0 EUVRPYimSx/JksXqvCqKMJEV3jc6LiuiIR3Hvz3bXT2jrME23irnQFbvBc6feAfdP59yzg Qj4D3E8/GO2BRW5LbXnCyd3FYFs8HgyCrcncxgjhnQeY9qFUVaEuK8+ES/KfJtdK51Sp7W IOM7UuN+VWyu1cFzYwoK8IoACFQzYAIj9+8MOfYxtxQjSGoErAT3iJPFWvKzPkyTkWqib6 aqWoN00YV/u1pPcuRoUQpb+ZlS+mDyhdELOk5K0sT1rozn9fEl71drswY7ostg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720298975; a=rsa-sha256; cv=none; b=sxL3NhHZME5cFQ3qIGyq9+bqhb8oaPljouYhPn7BKXqxmsS8HmgumxsxaEFr/J0svCLrCr Kj5uTJlob/lztInHhSDsgokfRcErd4qv5TZ/sG+FNNC+rSWj6O8JCOH1SMRlLfa7QPPPBj yc1gFX3DQ16B7/xn40RhP1dkG7SVgLl8lCngp0IS/gWEWb26CpLkpa7D6KCV6NH6E129l6 8nVgSujRcGPyl6NkXOsRPPt5Erw9PRdbV3Y8+XGYMQ5wk/w+mNZbCl/AnvMnscv20jaYwE Vw2fznss/uYJ1B13r8/Zkk7x6ewIMdOFUOgRnuOHmqnTJmjZfYbZVdAmRSEMeA== 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=1720298975; 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=NrLuodkjIwdDvG5g00oWfeghvczJg7pgVTIxOyqoHDk=; b=uVJLMO9KVSXbg6am1+kGsCrN+KqHuUbuqRudKze7eFhW2188Nn4QoWOzIBDKZk9QVYjwSv 2IEyE717VEyCyisRlu0blRkJRfjfxfxYCaps4WRY3xgT5myWE4Bfyj2EWBoACXrt6BPNIK 6JdfqeeaTyrAdKOG2Wr9N1wi4utlhi0w8C68n6pTyVgEcDXtaub3hR7XW8IUvSd5eHDbrX QPHyqHShK4K8rZngnqdtTjADqRpXxM/8ZTEBVNVSl+rghxhU3tmQHloaWICuSH1wLdRGma IMs5yahTwx80ztatjaaPExAClZwTnZwLHBidgPpIqcFQCRO/MqJm/HakMdq26w== 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 4WGjDZ6XkWzvkl; Sat, 6 Jul 2024 20:49:34 +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 466KnYtl029220; Sat, 6 Jul 2024 20:49:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466KnYlQ029217; Sat, 6 Jul 2024 20:49:34 GMT (envelope-from git) Date: Sat, 6 Jul 2024 20:49:34 GMT Message-Id: <202407062049.466KnYlQ029217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: fb32ba6aa44d - main - amd64/arm64: Eliminate unnecessary demotions in pmap_protect() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb32ba6aa44dc86e70ad06b44f93a9709e78f3d1 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=fb32ba6aa44dc86e70ad06b44f93a9709e78f3d1 commit fb32ba6aa44dc86e70ad06b44f93a9709e78f3d1 Author: Alan Cox AuthorDate: 2024-07-05 18:20:01 +0000 Commit: Alan Cox CommitDate: 2024-07-06 20:48:10 +0000 amd64/arm64: Eliminate unnecessary demotions in pmap_protect() In pmap_protect(), when the mapping isn't changing, we don't need to perform a superpage demotion, even though the requested change doesn't cover the entire superpage. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45886 --- sys/amd64/amd64/pmap.c | 21 +++++++++++++++++---- sys/arm64/arm64/pmap.c | 3 ++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 57943e815b5b..2bcf671be243 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -6796,8 +6796,7 @@ retry_pdpe: */ if ((ptpaddr & PG_PS) != 0) { /* - * Are we protecting the entire large page? If not, - * demote the mapping and fall through. + * Are we protecting the entire large page? */ if (sva + NBPDR == va_next && eva >= va_next) { /* @@ -6807,9 +6806,23 @@ retry_pdpe: if (pmap_protect_pde(pmap, pde, sva, prot)) anychanged = true; continue; - } else if (!pmap_demote_pde(pmap, pde, sva)) { + } + + /* + * Does the large page mapping need to change? If so, + * demote it and fall through. + */ + pbits = ptpaddr; + if ((prot & VM_PROT_WRITE) == 0) + pbits &= ~(PG_RW | PG_M); + if ((prot & VM_PROT_EXECUTE) == 0) + pbits |= pg_nx; + if (ptpaddr == pbits || !pmap_demote_pde(pmap, pde, + sva)) { /* - * The large page mapping was destroyed. + * Either the large page mapping doesn't need + * to change, or it was destroyed during + * demotion. */ continue; } diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index a9cb8c7fe468..29552f722aa4 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4373,7 +4373,8 @@ pmap_mask_set_locked(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t m if (sva + L2_SIZE == va_next && eva >= va_next) { pmap_protect_l2(pmap, l2, sva, mask, nbits); continue; - } else if (pmap_demote_l2(pmap, l2, sva) == NULL) + } else if ((pmap_load(l2) & mask) == nbits || + pmap_demote_l2(pmap, l2, sva) == NULL) continue; } KASSERT((pmap_load(l2) & ATTR_DESCR_MASK) == L2_TABLE, From nobody Sat Jul 6 21:56:15 2024 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 4WGkjY24x2z5Q3sx; Sat, 06 Jul 2024 21:56:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WGkjY1CDTz4MJZ; Sat, 6 Jul 2024 21:56:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720302977; 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: in-reply-to:in-reply-to:references:references; bh=0cNBNMkcNRZaZgY9aNFdPN5Ylh1GLaAAFC0k+cb8yao=; b=uURUKF8PJ4wK1m9H/jNwi1WY9DqB07KVZlZa7k+IHVttQjx3/4P2NxzJgAOeLlU8uuQecW k5coCk3P3/3J+Dt+RfWPCeYSMPescIrYJBMuIQnQ5B0KXw/SALmWeARmP2jGKZYNaZA9Gh QMYpW1x6kerF+vYxqqRRhUVh7AjWSCJFhXdTMFsO0BsL7CDpdTVQcy7CTHlI8HjAi/tl+3 Q6oPJzZg+y27/mz2282DU5D9BJDZFe6MFwOUM9LVBkWuwx4GHe2RHtjZZKEedRsOM/1CAn cQiEn5ASUnODMPdPtOpm+aZKvccRVwz1yXvc+5TRLD+duz8Jw5dykNuPGcPOcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720302977; a=rsa-sha256; cv=none; b=j+FbEjWi60ehHwlmGhQsDL7xiUgsQKOOCi+WtxZcZr2GM/DRr/OXUzHrgfecSgUxSjQ068 UU8ZdL1nDpNKS3u0o+4tzk9P9cGXLJgmFbt+C5sehj0d48LA3y6coMlKIiuzr4leVDA/0i 09MewDBB9A/iG0gSY3VGdq5gDXRbNLlwF9oAN9tEQ3lCsLJDgX4Ifl9hQxkNWghGKNu72O lwnW7Xrb/mRcmy8w5h7LKXgfy/fCQmTsSJrSlzej1rCSWJDJATS3rfgoWIVhUfXwP+bzVd IGWaB2JtvEknC5d9+4mNMqfEknoAr343BiFx0LqxX7LUF5YucJEgsbjpNeLfCA== 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=1720302977; 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: in-reply-to:in-reply-to:references:references; bh=0cNBNMkcNRZaZgY9aNFdPN5Ylh1GLaAAFC0k+cb8yao=; b=OPjwv/MmZsOOG2esA6HcsQWQdlgmrbla6FfJcWyzEz3a3W22rxLIik7zy7sXEUOuw/kAcv 7g1Z50Vfpjue2BKpyuTI3gSkCiZw9uNDfkH/KoPhQ1qH3j5cbe18X/7JZJhwZsnlT38t/B 6sd5yPjb0KTneMjpizIyt0UB5NM5lw833cXxGZgAtkTSwutSFyk+VF2JbIfzA0P5ECEzcE 8bc+YrrIXHb+vAXWyo0ZoGVxL5VN01mMq6s9h3MfbUH6xqEmKpIX1lsWVHOANYLnNH0zQU 3Xy8k9jdApiUPNhEKgK+Bl04a7x3AjNYzYeu71r1I21aoeue1nXQNqMgGDI54Q== Received: from [IPV6:2601:5c0:4200:b830:7973:4abc:b518:de1] (unknown [IPv6:2601:5c0:4200:b830:7973:4abc:b518:de1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WGkjX6PMzz11dT; Sat, 6 Jul 2024 21:56:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Sat, 6 Jul 2024 17:56:15 -0400 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6677621bad00 - main - cdefs.h: Fallback to printf0 for __printf0like Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407061944.466JiiQ3026410@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202407061944.466JiiQ3026410@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/6/24 15:44, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6677621bad00191dfec1b0a20ae1618b92745d9b > > commit 6677621bad00191dfec1b0a20ae1618b92745d9b > Author: Warner Losh > AuthorDate: 2024-07-06 19:42:37 +0000 > Commit: Warner Losh > CommitDate: 2024-07-06 19:45:03 +0000 > > cdefs.h: Fallback to printf0 for __printf0like > > For some reason, my tests were fine with this like it was, but CI for > gcc12 and gcc13 is complaining. Revert to the old form until that can be > worked out why the mismatch. > > Fixes: 0b82dac337e7 > Sponsored by: Netflix > --- > sys/sys/cdefs.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 6b861b1903f6..a56839d57c7a 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -356,9 +356,12 @@ > * Clang has always had printf and printf0 as aliases. gcc 11.0 now follows > * clang. So now this is an alias for __printflike, or nothing. In the future > * _Nullable or _Nonnull will replace this. > + * XXX Except that doesn't work, so for now revert to printf0 for clang and > + * the FreeBSD gcc until I can work this out. > */ > -#if defined(__clang__) || __GNUC_PREREQ__(11, 0) > -#define __printf0like(fmtarg, firstvararg) __printflike(fmtarg, firstvararg) > +#if defined(__clang__) || (defined(__GNUC__) && defined (__FreeBSD_cc_version)) > +#define __printf0like(fmtarg, firstvararg) \ > + __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) > #else > #define __printf0like(fmtarg, firstvararg) > #endif It's because my patch for devel/freebsd-gcc{12,13} is kind of wrong. I had a mismerge when updating the printf0 patch from gcc9 to gcc12 that ended up re-adding the warn on NULL. I need to update the ports to remove that part of the patch. I will probably leave printf0 working for now in the ports just as an alias for regular printf to give us some transition time. -- John Baldwin From nobody Sun Jul 7 11:41:44 2024 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 4WH5202Tydz5PDpL; Sun, 07 Jul 2024 11:41:44 +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 4WH52023VQz4Wmm; Sun, 7 Jul 2024 11:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720352504; 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=MvcH2+FtdLtzB9SJ/w39BQhYYRNSZA3hK1rGOQmHLZI=; b=fW9DHy0IF298BYjaRy14ZGItPgz09EPCyvUQLT4VxdiReiCYBkb1XsZejPacc/LK8rYW1b oLBfkwdRfys3oNRgGQzBxVeBsxHm3XVlml512zwicXw9603+IMshNQBzVp4mC7NjCS7RfG zwHL9GLhBGLTLtb+9QhrPm2uwC8Pt1Icv9j1PFp4fzdYjnJkNkT6tbnfNxPm2Tyt2r2kwS OBTYKLaELGK+Fm/H24JOXYRWCPj5UH6HN6iSoihnWSdxqhRn/b+W04UU19cun9MyFmCpLK g1USm4jniLpo44lvZULhfP8wfAwM699A8gKEDYgjgfEtubEx0GdhNug+XZGebQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720352504; a=rsa-sha256; cv=none; b=pySIiRUd0Cs52KQ9TgDoastn8am5yCrW48eRC0wKuVjwZQbDpTvumcK581PzOCikb1GWKC XjcC38gcAuNVbsUcXaJUR4TQ/TD7yWLJ/lAd4texHjER851/a74wzUKrglVdillUKlI5W4 3BzvTgyojJ2v44UiNUEK4Q2/oJUbqgJJQ9bYP/PNam5z4RviSx++iVE/7Nd1YhzzUHrX7C UrYC/PJhT0Q7YqQvuoKIU/9oUbGHTsaj0CjJ3ruimFLBwQ4qAlKvq5fHnGooeaVAk+vulg fpVBYU+j51eNGhj8YC0J3uz4hmG0HS9SldKjsK9EhxSzo0TClRxSuRPmfqjdNg== 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=1720352504; 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=MvcH2+FtdLtzB9SJ/w39BQhYYRNSZA3hK1rGOQmHLZI=; b=XlBkgIwg52fgubv0xfm8tdBpon1pH2HbO8+qAw2unjnMFMyiFFlRtACFOV20fpYcAB7Awf dzTqNq1AfX8r0Nfia6Q/HW9Ub9ISsKS7cxgh54edR1EwO5jiE8H+tLj6Kem67jE4oluwqa Owi2moK/GeTsUj9uFKPK6eaXVgnLydKKDF4CAgCgvsMmKf0fn/GdxkNWsUK8pjLs9yiV0Y VyetYFl06GByH0oTtqY4tlBYVPeCfaZd4r51yITPSp/2Vq1EVEDJiNHdeDUbtviii3n+GV kFjobsCKdyuAJxwQAunA5AXJfdIziPVakRLjjYLgjq855EaZ/Uod21vZ6L8FnA== 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 4WH5201ggdz1Llx; Sun, 7 Jul 2024 11:41:44 +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 467Bfio6052338; Sun, 7 Jul 2024 11:41:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467BfiP5052335; Sun, 7 Jul 2024 11:41:44 GMT (envelope-from git) Date: Sun, 7 Jul 2024 11:41:44 GMT Message-Id: <202407071141.467BfiP5052335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 814bf1fddd27 - main - virtio_p9fs: fix panic on qemu/kvm 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 814bf1fddd27aea69740f9e7426302354285cad4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=814bf1fddd27aea69740f9e7426302354285cad4 commit 814bf1fddd27aea69740f9e7426302354285cad4 Author: Danilo Egea Gondolfo AuthorDate: 2024-07-06 16:51:51 +0000 Commit: Warner Losh CommitDate: 2024-07-07 11:39:27 +0000 virtio_p9fs: fix panic on qemu/kvm When the module is loaded on a system running on qemu/kvm the "modern" virtio infrastructure is used and virtio_read_device_config() will end up calling vtpci_modern_read_dev_config(). This function cannot read values of arbitrary sizes and will panic if the p9fs mount tag size is not supported by it. Use virtio_read_device_config_array() instead. It was tested on both bhyve and qemu/kvm. PR: 280098 Co-authored-by: Mark Peek Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1320 --- sys/dev/virtio/p9fs/virtio_p9fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index aa174d3bd5ba..3600e0ea09c9 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -352,9 +352,9 @@ vt9p_attach(device_t dev) mount_tag = malloc(mount_tag_len + 1, M_P9FS_MNTTAG, M_WAITOK | M_ZERO); - virtio_read_device_config(dev, + virtio_read_device_config_array(dev, offsetof(struct virtio_9pnet_config, mount_tag), - mount_tag, mount_tag_len); + mount_tag, 1, mount_tag_len); device_printf(dev, "Mount tag: %s\n", mount_tag); From nobody Sun Jul 7 11:43:21 2024 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 4WH53s36FBz5PDq1; Sun, 07 Jul 2024 11:43:21 +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 4WH53s2RZ3z4XfQ; Sun, 7 Jul 2024 11:43:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720352601; 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=LqdCZ9fifM3zp+rSPfqaceg0ofm++nuwuhpt1emnH1M=; b=DsAM12GYfvS0e4uBIgx8X0X3s3U/PjgTSCxaZuLqGQ+hLRlICYviooL2GKi5kr36FMINcW Dz7BAGtWTwA1wfj/prEFBAV88qeK7M4XWrWbUqRXtCRw8ZdakrQrb9EgUxvMgwzGXXSzNw J9jFak9l8l3slVTFksKIu49OeEeAjQTzSG9O8SKc0e7GfwvIOAIUdysLP9fedZHUHXL+Ug mKZWoVPHSK8vc1xlnQLbrQ69bXz/p0ab6MHh/ng9a+yAGhcR66Vrx9bCfVcavWFWDTCAqo peb0HnSKIaNAN6k/elwh5eiKc5GNliorarsnV/CjA2qhkTLBZ+m3E8PS39GjQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720352601; a=rsa-sha256; cv=none; b=mFCKTi+CnIPYYROTVoJu2FdceaYTuIM0N/nj2NqQJd2d8Rsc0cJe+3V2CEqqkdZrwAWaNV J/1J5rZPa+rN9KUm6+hrSxZ5lr6038xG1KAv7Fe/rBiSJNB551ZL0MTXFl3tFDUer7M8+0 dfiL8hThToWsgpnKagmUGznram4q41x4QUPdDno6R8EcvOVR8U2VRcOPkRs6JNUtClGuih c1JbNry5vpRvAd+jJKg3sp5PHYKCw9AWY8Ml6jCXjUXtbx4fMomwahxnjLeOrIUEoSjZOS iz0EQEw0qHQatXBAr2lYZL+9veJQzE4YYEQMCQwLa33a+Fs0Ysj75kJB8JM8VA== 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=1720352601; 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=LqdCZ9fifM3zp+rSPfqaceg0ofm++nuwuhpt1emnH1M=; b=Uagy7MYjtU5eZ0KG/zqsfxzc3Axw2qxvCYRylPQtViB67cPvACBEcn/O1wta1alK+lfEyT DQVC/S/abYlFxy7+x4Qgss3rYE/n0ZQfeAQI2KPvGsYZEglTPvHu4Pt2oGLnDnJS6dJzm4 yUoN42cuwcXCFjgmYkvAvYtIAh5fNeTZnip9Fk1i7qYwWn1G5ADrdBXhIUYJyORJSpFiwW L/RNGgt4V6Ip/Gcn+EHFALrku6eIE6Ev6GjINDimEiOkRZDiDgJleLGXo9H86RLjJgqyUZ cpg6X/zPmY0/mLt4d2fy/dmK27lGlQWi/+V5pefS6c+xlCHbMIXNXYxE3c0ESQ== 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 4WH53s22xBz1LV5; Sun, 7 Jul 2024 11:43:21 +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 467BhLlr055373; Sun, 7 Jul 2024 11:43:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467BhL7r055370; Sun, 7 Jul 2024 11:43:21 GMT (envelope-from git) Date: Sun, 7 Jul 2024 11:43:21 GMT Message-Id: <202407071143.467BhL7r055370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4c6cf054c959 - main - Stop forcing -g in mpi3mr module because it breaks non-debug install. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c6cf054c9599a9a520edde8dc19956e5a4e826b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c6cf054c9599a9a520edde8dc19956e5a4e826b commit 4c6cf054c9599a9a520edde8dc19956e5a4e826b Author: Eric Melville AuthorDate: 2024-07-04 23:56:45 +0000 Commit: Warner Losh CommitDate: 2024-07-07 11:43:29 +0000 Stop forcing -g in mpi3mr module because it breaks non-debug install. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1314 --- sys/modules/mpi3mr/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/modules/mpi3mr/Makefile b/sys/modules/mpi3mr/Makefile index 39aa2e3f0ddd..1c44ed920d1b 100644 --- a/sys/modules/mpi3mr/Makefile +++ b/sys/modules/mpi3mr/Makefile @@ -7,7 +7,6 @@ SRCS+= opt_cam.h SRCS+= device_if.h bus_if.h pci_if.h CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include -DEBUG_FLAGS= -g .include From nobody Sun Jul 7 11:45:50 2024 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 4WH56l0wqqz5PFC0; Sun, 07 Jul 2024 11:45:51 +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 4WH56l0Nspz4XsL; Sun, 7 Jul 2024 11:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720352751; 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=1J/Mc6RtuaCvmUK5nXrEmEgHIveJMAX+fMXfeB0dsIk=; b=UMJVGxjhTl8ceaFk+VXlKWl6/KuUv8OCHlgCQlM5+3x8E4AuEeBzEzdejsR/qzwS+MhKNj sQtHR5ALrkPeS4cmY4Sw/OmCOV21VxJw3Krh7GVuN1QUxGbBXpiVyX20OIt9Xa0NgWf4fj rmnlie3JPLp1vGW77gxGG0Aqs19WWiauwRlI5EmPkOlBIAO17ydM86Z7aqZtIySEo+354r zB+g07GUMcLhPeoxCBtorBrV/edBF+eWDdViwsdmfktiI6neGX8Dde+LPXqc6+T70Nd5GP BfcB7sbbzjjSWg4ErYkxmiBO6DxXJHrfON3cMRdrptZeC0CCvwyU17dT9j4q0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720352751; a=rsa-sha256; cv=none; b=W9b8UO9JzzHF/FCeAUMUicK4FdPbanH4HSNZFwF6tgT56Gqx3J6WGQ4HOljm9SLo15ft7G LqZfooT3+aQeg5ZVfuMlfiTgt7Fq5uXfS7lnt5GHgpx4OXDL6jfovnR0pF3mCrudcj1sE9 dxWiJbTV82zgRswDsbctyB1QPQDnyw0Ahyovwxgc2yFmzzf7Gl3v+S2SnS+pseEn6cvUhB yX+jgL1gA9Pi/ef+c08iuG3ay3VLM7IRWh8eNg0KcwXXtsI75xSB1tQfM1wbMpyKMqJX37 C/XJy4YxtA76361Nwu91NKBtg7h2LAKUQSoOUZ6KfPZyA8T51SuNKFA0d135vw== 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=1720352751; 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=1J/Mc6RtuaCvmUK5nXrEmEgHIveJMAX+fMXfeB0dsIk=; b=RjcdE0AhplhkwrxRw/ZsP8lfUeAIoXa1hrLppj8JRZrl9pY0Ol5IX7qKz0jZBZwaM21Ua5 gPKJSzel/3eOc2FEmGYltJk3U0loAxOqRjnfVndpxvF8Rve914mkwjLhbSBHnX4Dcz7Luq g5TePeYXGqWJpfip63IWf58rsP6d+T2CbUDZcIsSErWwDfx08tFz+kzW6AzWx8Nrd6OPux fygeTg8KWXU7c7q52MbG0OMUWiay21Mf3rRLvXFpaDlDkfNDcjaDQ+32FjyQxsBvWnVghs l3TEC2ki5bwoiQfAGmxuvPqeS3JmmWib3wXuToIOMUGLxS4nf1DdE54iPyd2uQ== 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 4WH56k704jz1Lpf; Sun, 7 Jul 2024 11:45:50 +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 467BjoCM055829; Sun, 7 Jul 2024 11:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467Bjolv055826; Sun, 7 Jul 2024 11:45:50 GMT (envelope-from git) Date: Sun, 7 Jul 2024 11:45:50 GMT Message-Id: <202407071145.467Bjolv055826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 12545b85834f - main - fwget: add needed firmware for AMD Raphael GPUs 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12545b85834f32e0fdb831489503c3c4f6db715a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=12545b85834f32e0fdb831489503c3c4f6db715a commit 12545b85834f32e0fdb831489503c3c4f6db715a Author: Danilo Egea Gondolfo AuthorDate: 2024-06-30 17:56:22 +0000 Commit: Warner Losh CommitDate: 2024-07-07 11:45:37 +0000 fwget: add needed firmware for AMD Raphael GPUs This GPU is found in Ryzen 7000 series CPUs. For future reference, the list of firmware versions for amdgpu drivers can be found in [1]. [1] - https://docs.kernel.org/gpu/amdgpu/driver-misc.html Reviewed by: imp, Christos Longros Pull Request: https://github.com/freebsd/freebsd-src/pull/1308 --- usr.sbin/fwget/pci/pci_video_amd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.sbin/fwget/pci/pci_video_amd b/usr.sbin/fwget/pci/pci_video_amd index 5f89b12dce7c..7ad41be12d57 100644 --- a/usr.sbin/fwget/pci/pci_video_amd +++ b/usr.sbin/fwget/pci/pci_video_amd @@ -26,6 +26,9 @@ pci_video_amd() { + # A table listing the required firmware versions for each GPU series + # is available at https://docs.kernel.org/gpu/amdgpu/driver-misc.html + case "$1" in 0x678*|0x679*) addpkg "gpu-firmware-amd-kmod-tahiti" @@ -150,5 +153,12 @@ pci_video_amd() addpkg "gpu-firmware-amd-kmod-sdma-6-0-1" addpkg "gpu-firmware-amd-kmod-vcn-4-0-2" ;; + 0x164e) + addpkg "gpu-firmware-amd-kmod-gc-10-3-6" + addpkg "gpu-firmware-amd-kmod-psp-13-0-5" + addpkg "gpu-firmware-amd-kmod-dcn-3-1-5" + addpkg "gpu-firmware-amd-kmod-sdma-5-2-6" + addpkg "gpu-firmware-amd-kmod-vcn-3-1-2" + ;; esac } From nobody Sun Jul 7 11:47:02 2024 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 4WH5865ZbJz5PF2g; Sun, 07 Jul 2024 11:47:02 +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 4WH5863grLz4Y2y; Sun, 7 Jul 2024 11:47:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720352822; 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=29Rv6p9bL6zsB4TuC/P0YcRd1P0nw+9rSkePi8XZBkc=; b=v0dJXfO54H/FPQuuvW9iZhq69LNOBOuSEa0Ov0dHqRVtIgKZxiRO+JRjMT0PLSqREjhb0d QaEfYGQ8ThVfIbg70r4ZoOBdygba/aICsgaZhA2UaBdB8pnwuNR4gwGsTbcyueFG21XYjC HMkgkNE5Yh/aTLGgL4V2DNsq/keUuVzwzv2mD+LKp49NID+TBfZ4zk0lA8oHcGLcG/gZA1 q9f9YA4e9F0IbRhNB8zdGxZUu9IYDCpk130JvY+UBMssio1zZJw7IZ+hXo82yzvI2j3ogy F12+8iPvzX9fTpfwpG+/dGN3xkeAVYC8XWIyRLwoH1JjepeH3bS9khw0WXfNqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720352822; a=rsa-sha256; cv=none; b=I9mJYH6+2oJtE9zRuj1p5q8kllHJWV5eq/0w0oBHW1GJhwhLHMSF+NgEQjHusOjPB4LyC9 iDPzTZlq2tTcZafMb3oD/DneclEB3G9of1Se3MmdywmlJEqMTSu0B0+V8rEu/crJUWzEJV yikPW4l8AXC2alGjk1o8mAZBPqZitse76oaJz1up07IU1pSmqxLxCQZ6kJixNPa2y6km/V Y0RLvhcQj99GmpFROx5v+jngNHxgGO27Z3OZKP/Fv7g07Jtsrm5uDpInXjkVd0sTo/a9rc mQpSLzrEP1l4MpXOyD//qCy4Uh/wp3+jpk/o1y+dh9dv1kCvbTIUWDJyDQBmHg== 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=1720352822; 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=29Rv6p9bL6zsB4TuC/P0YcRd1P0nw+9rSkePi8XZBkc=; b=OzWtBZsPa7UqPABF+q5nu14dtOOq5buAYIFmyzr6bkkORFW9aV7ipCerHkWkkI7070u3Se 071EDPmkXcdPaWxOqvPkKd8KzY1aLNt7HndUEl3nc7YnPekcGYn4e82w9d11EilI+MPwBQ pxyUXcGoeCJshq65H31tnS1ufLj35yfeeCPcSxxf5bbgDORYmw7qRmZ5EvLy7wB3k1W6lT gPfCLFbhTKnqa670U5p482NlOGx1wDVWbgMPl7thUWIDpw+wi52pBiUGw2FiOpfKfQ+uCI AWD0zK9UrGd815ueh4omVgTbHf4D5TxUerZvZTWREGVga6kg/OlFc4oOlNJqUA== 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 4WH5863FtXz1M09; Sun, 7 Jul 2024 11:47:02 +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 467Bl26i056180; Sun, 7 Jul 2024 11:47:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467Bl2FE056177; Sun, 7 Jul 2024 11:47:02 GMT (envelope-from git) Date: Sun, 7 Jul 2024 11:47:02 GMT Message-Id: <202407071147.467Bl2FE056177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7220a45bccbd - main - freebsd-update: rsautl is deprecated, use pkeyutl 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7220a45bccbd0496b1cf304f236d3f9d2e15e7d3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7220a45bccbd0496b1cf304f236d3f9d2e15e7d3 commit 7220a45bccbd0496b1cf304f236d3f9d2e15e7d3 Author: Jose Luis Duran AuthorDate: 2024-06-24 07:08:01 +0000 Commit: Warner Losh CommitDate: 2024-07-07 11:46:58 +0000 freebsd-update: rsautl is deprecated, use pkeyutl The command openssl-rsautl(1) has been deprecated in OpenSSL 3.0. The openssl-pkeyutl(1) command should be used instead. Signed-off-by: Jose Luis Duran Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1309 --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 1456601edf26..459d54db0c57 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1307,7 +1307,7 @@ fetch_tag () { return 1 fi - openssl rsautl -pubin -inkey pub.ssl -verify \ + openssl pkeyutl -pubin -inkey pub.ssl -verifyrecover \ < latest.ssl > tag.new 2>${QUIETREDIR} || true rm latest.ssl From nobody Sun Jul 7 11:52:23 2024 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 4WH5GJ01tsz5PFVC; Sun, 07 Jul 2024 11:52:24 +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 4WH5GH6cxbz4YpK; Sun, 7 Jul 2024 11:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720353143; 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=hVp5AoVY9Z1tKvkc2o5elvnlvah8e+JmqOfXajSBvxY=; b=aPoKS5LqykprzM54BVEaHZVDgWQbgeAgKpp6iOz0x64x+MLGfZOKHvCg0hMD4FsLL57sMa jsBzDZ9s8Z04hqosczwvarlBzhN6xySvAumjpTjNSPmricmoPrvhwDhg4LJ9E4aBVmzpNI zCs/Q0Ixa0+hpWCGKJgtwhIIB8vi4nvpOkxLSOyTYzfJ4zj6KmkI39dGQf4JKnOrhNbsHU tS3la+EN0Yn0G645gRGFAFUfez/pbBB4asg7JimlW3BXdGg9pDXNTwNtBKIqRirleOjZNb jDomS1I/KZrSmLh4XqqNElV7XopCmbP/AnBAKNtS7jDTCD+G/31uEVDfpwfW9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720353143; a=rsa-sha256; cv=none; b=gOrjWb/ET32XBLXcAFB6h7N5WLqk6QLw2xBHJmODkyj4WkhZEZJ07ej8+n//J7d4RMyiLc FWEUtaLZzfP/J5IRJKkDMiv/Xh8WliYPohF4ic5ZqmkfKzo962kph2BeADPfy4Ez57GNy7 aQu7fHg/CTq1I8Cnz3puYeMeiTc14FlXlrJ/uFUEBu5O/2QGzdY/xbWBn0esHO7itOPS5Y qLd3MUW9OS6UNYn8QkEYTbV0gTJa65nvH0mkWhH0IQecD94XQOlXMLuRwHvEygZwhqqp3a WK3n2R55xfved+KNNFRz1kVVMvNASDqlVFv3WvzMavmYEofgV/6gMtGWKmwlyw== 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=1720353143; 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=hVp5AoVY9Z1tKvkc2o5elvnlvah8e+JmqOfXajSBvxY=; b=DVWdYeXvsG/NJA+fu1MfJJU6JLheH05i1QNlaLg+1zLEumkWroZKAV0XhAhhlxLBxxam07 ULMb09Zn/40BIFKCfahy/cy7c0GjZXk/ELFP+lgeLR+YBdDdZq+D2s2jMqiCKbtpa9USFN NUmTZPV1AqO6ymYHkPHE9cO2lT10diiifx5lhtNjfGp+wsajOjehIyEW3ufFqyuyuuwO3Q W5yPJbPA7UTj5Yk79s3/H66rNe9mKKQPtDtEcbRzGB6m+RaDco+st+g7mDlTfg5kvuZwUB Dp1FnoIswNLKb4AkkvE0wVPLijiJAwiehMjRP5iEdS/+giMsR2f2NRVTBbojFw== 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 4WH5GH6Djvz1Ln0; Sun, 7 Jul 2024 11:52:23 +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 467BqNps072147; Sun, 7 Jul 2024 11:52:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467BqNZU072144; Sun, 7 Jul 2024 11:52:23 GMT (envelope-from git) Date: Sun, 7 Jul 2024 11:52:23 GMT Message-Id: <202407071152.467BqNZU072144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0bff71667441 - main - /sys/dev/bnxt: Enable NPAR support on BCM57504 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bff716674418ec9f8c48131fb34cafc0af671e8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0bff716674418ec9f8c48131fb34cafc0af671e8 commit 0bff716674418ec9f8c48131fb34cafc0af671e8 Author: Vinícius Ferrão AuthorDate: 2024-06-29 05:16:43 +0000 Commit: Warner Losh CommitDate: 2024-07-07 11:49:34 +0000 /sys/dev/bnxt: Enable NPAR support on BCM57504 This commit enables NPAR support for Broadcom 57504 10/25GbE NICs Signed-off-by: Vinícius Ferrão Reviewed by: imp,ssaxena,nightquick@proton.me Pull Request: https://github.com/freebsd/freebsd-src/pull/1306 --- sys/dev/bnxt/bnxt_en/bnxt.h | 1 + sys/dev/bnxt/bnxt_en/if_bnxt.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index cf4f99077b58..c5fadeafa181 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -86,6 +86,7 @@ #define BCM58700 0x16cd #define BCM57508 0x1750 #define BCM57504 0x1751 +#define BCM57504_NPAR 0x1801 #define BCM57502 0x1752 #define NETXTREME_C_VF1 0x16cb #define NETXTREME_C_VF2 0x16e1 diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 6c0ec892f2c6..00d37f5e0151 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -143,6 +143,8 @@ static const pci_vendor_info_t bnxt_vendor_info_array[] = "Broadcom BCM57508 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet"), PVID(BROADCOM_VENDOR_ID, BCM57504, "Broadcom BCM57504 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57504_NPAR, + "Broadcom BCM57504 NetXtreme-E Ethernet Partition"), PVID(BROADCOM_VENDOR_ID, BCM57502, "Broadcom BCM57502 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet"), PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF1, @@ -2087,6 +2089,7 @@ bnxt_attach_pre(if_ctx_t ctx) case BCM57414_NPAR2: case BCM57416_NPAR1: case BCM57416_NPAR2: + case BCM57504_NPAR: softc->flags |= BNXT_FLAG_NPAR; break; case NETXTREME_C_VF1: @@ -2170,6 +2173,7 @@ bnxt_attach_pre(if_ctx_t ctx) if ((softc->ver_info->chip_num == BCM57508) || (softc->ver_info->chip_num == BCM57504) || + (softc->ver_info->chip_num == BCM57504_NPAR) || (softc->ver_info->chip_num == BCM57502)) softc->flags |= BNXT_FLAG_CHIP_P5; From nobody Sun Jul 7 11:56:40 2024 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 4WH5MD6TNMz5PGBJ; Sun, 07 Jul 2024 11:56:40 +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 4WH5MD5Ykwz4ZQd; Sun, 7 Jul 2024 11:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720353400; 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=B9cFzKQv8KEkx3i2Eia8hE57YxjrPXRmBWqrqZOdNbc=; b=P1Sinthk5v0TH2Zs8Z8Nk+THXJhsLrt/65jfoOrA9VDTdhGsZLTnYKsy2zTpS8CyyISHMc 32lMIWjusd4iwB9usl1Md5SU5t2bIw2QdY7VtzBqpuiQX/8QhwPWasLWGypx22Z93qQjsP Bk+Vr8qREzzYkNg48yW9lRL5EzfE1wZr5iARVaD4bmxfheci8s2wr2Pb4kScX6bNKyIGvm kdaLkQcNOJc25lkk1h1qbFOVqr8WE8L4ylC0HrJYlGFPZicebtLuZuXBlMxWfQkEKWx7u8 M9RtaBxQeosxRcUkCi1mxpNkiI2Hfs/139Yy7dM3ewrycAl/RQaIRD8fB8mtsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720353400; a=rsa-sha256; cv=none; b=OJszMmJjXiXtyD6+i3rSDi+mTQ+CyD3CXcmUVz46piXhIKUosn6dvIp6kQfNwEC0bHD9vg STP7HemxH+ajq3FfF5CJHB5bw9KZjWy2Ewb8gZVZvZHCkhIlZrbjGBn4UrGEoMDt3m7sL9 taeMEjIJOjxD12T9OJoXa3Hri9hkbBP5uHB/H5+4TtkoskWJ4e2AEXAQURigFV7PEt6D9H jvMq3Eb2pUzD46Q7eHyfNu7mtq9cUid2budRzmFkAIWoMjlPa0TQkBK5hBogD3xr3LNXnC 2b89prCYmrDjbowQpgs8bQ/jxI80XAIYE360L//uPDI33jsJU0U2Li74jtZCEg== 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=1720353400; 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=B9cFzKQv8KEkx3i2Eia8hE57YxjrPXRmBWqrqZOdNbc=; b=AmaRt9baZqtyBFulkAgqr/SBccjOIdoaU1yPeVtUlupXBA0sMKlcoOWlUQg4dThlXi9su9 PZR58XvdhiJu7ubH1Tp/TBmAWzxNHKyBFII41MZUIJ+UD+ahFE4nBTJOjNhQ3Qh8lmm0mQ ACJ2Hng2ZI9OcIDRqicLd2mXHhGiSgfbuziS6A8tQCC5dJ7jNrRGCs/7dFZbVSlmss5p+l eQAgDKm8hMgjOtq/WWInva0yrfjb+AqJq14dmAXVJgec+FWf1IsIcK5zcXtuopfpFexhaI V6mn2yzy0F8HT4pYJXWWXSdvjPdpo0NKExV9O2NLHCId1v9g9j9HbspcPYxfKg== 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 4WH5MD4myyz1Lq7; Sun, 7 Jul 2024 11:56:40 +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 467BuehC074116; Sun, 7 Jul 2024 11:56:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467BueQh074113; Sun, 7 Jul 2024 11:56:40 GMT (envelope-from git) Date: Sun, 7 Jul 2024 11:56:40 GMT Message-Id: <202407071156.467BueQh074113@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8c108b341cd8 - main - ncal: add -M to start week on Monday in cal mode 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c108b341cd82d0ed9fcd573764bc94682e84125 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8c108b341cd82d0ed9fcd573764bc94682e84125 commit 8c108b341cd82d0ed9fcd573764bc94682e84125 Author: Valentine Astakhov AuthorDate: 2024-06-17 17:58:02 +0000 Commit: Warner Losh CommitDate: 2024-07-07 11:55:36 +0000 ncal: add -M to start week on Monday in cal mode MFC after: 2 weeks Reviewed by: imp, Alexander Ziaee, Pull Request: https://github.com/freebsd/freebsd-src/pull/1294 --- usr.bin/ncal/ncal.1 | 16 ++++++++++------ usr.bin/ncal/ncal.c | 34 +++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/usr.bin/ncal/ncal.1 b/usr.bin/ncal/ncal.1 index a0b6889dca31..8ece31b79cc1 100644 --- a/usr.bin/ncal/ncal.1 +++ b/usr.bin/ncal/ncal.1 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1997 Wolfgang Helbig .\" All rights reserved. .\" @@ -31,7 +34,7 @@ .Nd displays a calendar and the date of Easter .Sh SYNOPSIS .Nm -.Op Fl 3hjy +.Op Fl 3hjMy .Op Fl A Ar number .Op Fl B Ar number .Oo @@ -39,7 +42,7 @@ .Ar year .Oc .Nm -.Op Fl 3hj +.Op Fl 3hjM .Op Fl A Ar number .Op Fl B Ar number .Fl m Ar month @@ -85,6 +88,10 @@ option, display date of Easter according to the Julian Calendar. Display date of Easter (for western churches). .It Fl j Display Julian days (days one-based, numbered from January 1). +.It Fl M +Display Monday as the first day of the week in +.Nm cal +mode. .It Fl m Ar month Display the specified .Ar month . @@ -186,7 +193,7 @@ X/Open System Interfaces option of the specification. .Pp The flags -.Op Fl 3hyJeopw , +.Op Fl 3ehJMopwy , as well as the ability to specify a month name as a single argument, are extensions to that specification. .Pp @@ -215,6 +222,3 @@ codes is historically naive for many countries. .Pp Not all options are compatible and using them in different orders will give varying results. -.Pp -It is not possible to display Monday as the first day of the week with -.Nm cal . diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 6f5e1e89bf93..2829caf8a6a0 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -162,6 +163,7 @@ static int flag_weeks; /* user wants number of week */ static int nswitch; /* user defined switch date */ static int nswitchb; /* switch date for backward compatibility */ static int highlightdate; +static bool flag_monday; /* user wants week starts on Monday */ static char *center(char *s, char *t, int w); static wchar_t *wcenter(wchar_t *s, wchar_t *t, int w); @@ -216,6 +218,7 @@ main(int argc, char *argv[]) flag_nohighlight = 0; flag_weeks = 0; + flag_monday = false; /* * Use locale to determine the country code, @@ -256,7 +259,7 @@ main(int argc, char *argv[]) before = after = -1; - while ((ch = getopt(argc, argv, "3A:B:Cd:eH:hjJm:Nops:wy")) != -1) + while ((ch = getopt(argc, argv, "3A:B:Cd:eH:hjJm:Nops:wyM")) != -1) switch (ch) { case '3': flag_3months = 1; @@ -306,6 +309,9 @@ main(int argc, char *argv[]) case 'j': flag_julian_day = 1; break; + case 'M': + flag_monday = true; + break; case 'm': if (flag_specifiedmonth) errx(EX_USAGE, "Double -m specified"); @@ -509,7 +515,7 @@ usage(void) " cal [general options] [-hj] [-m month] [year]\n" " ncal [general options] [-hJjpwy] [-s country_code] [[month] year]\n" " ncal [general options] [-hJeo] [year]\n" -"General options: [-NC3] [-A months] [-B months]\n" +"General options: [-NCM3] [-A months] [-B months]\n" "For debug the highlighting: [-H yyyy-mm-dd] [-d yyyy-mm]\n", stderr); exit(EX_USAGE); @@ -652,10 +658,13 @@ monthrangeb(int y, int m, int jd_flag, int before, int after) /* Day of the week names. */ for (i = 0; i < count; i++) { wprintf(L"%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls ", - wdss, wds.names[6], wdss, wds.names[0], - wdss, wds.names[1], wdss, wds.names[2], - wdss, wds.names[3], wdss, wds.names[4], - wdss, wds.names[5]); + wdss, wds.names[flag_monday ? 0 : 6], + wdss, wds.names[flag_monday ? 1 : 0], + wdss, wds.names[flag_monday ? 2 : 1], + wdss, wds.names[flag_monday ? 3 : 2], + wdss, wds.names[flag_monday ? 4 : 3], + wdss, wds.names[flag_monday ? 5 : 4], + wdss, wds.names[flag_monday ? 6 : 5]); } printf("\n"); @@ -860,7 +869,7 @@ mkmonthb(int y, int m, int jd_flag, struct monthlines *mlines) date dt; /* handy date */ int dw; /* width of numbers */ int first; /* first day of month */ - int firsts; /* sunday of first week of month */ + int firstsm; /* sunday or monday of first week of month */ int i, j, k, l; /* just indices */ int jan1 = 0; /* the first day of this year */ int last; /* the first day of next month */ @@ -911,10 +920,13 @@ mkmonthb(int y, int m, int jd_flag, struct monthlines *mlines) } /* - * Set firsts to the day number of sunday of the first week of - * this month. (This might be in the last month) + * Set firstsm to the day number of sunday or monday of the first week + * of this month. (This might be in the last month) */ - firsts = first - (weekday(first)+1) % 7; + if (flag_monday) + firstsm = first - weekday(first); + else + firstsm = first - (weekday(first) + 1) % 7; /* * Fill the lines with day of month or day of year (Julian day) @@ -923,7 +935,7 @@ mkmonthb(int y, int m, int jd_flag, struct monthlines *mlines) */ for (i = 0; i != 6; i++) { l = 0; - for (j = firsts + 7 * i, k = 0; j < last && k != dw * 7; + for (j = firstsm + 7 * i, k = 0; j < last && k != dw * 7; j++, k += dw) { if (j >= first) { if (jd_flag) From nobody Sun Jul 7 13:11:35 2024 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 4WH71g6yLvz5Pf10; Sun, 07 Jul 2024 13:11:35 +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 4WH71g5KWlz4hJd; Sun, 7 Jul 2024 13:11:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720357895; 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=9MxoMiArZyIEU7XIheqvMnp16yGNOftjObWqO3ei1Jw=; b=DZ6lixIOogyodU1O5lRfV54FwQof0gITmDH40hRORmVHcbGkIWMizeUF58NXgFFKNelZb3 i3hhnTMbrwN90t6lEqyX1py3gvdu1Cx2Hw+mTScS17odJxO8fasdD7DllTZzv08SU4DKIw I5jc9BMx5VaYxAirIffO6nKXpey1ehI6fs56YSTkpt3PyfFyuVDslPHWTUBIOpsqz6D+iZ Ia8JVN7kyB4aZGvvRlkIBcdbGzZI/+HcYjVZ5EAllQLTzrK8OjTn0P0DXZLgFXCRAIc4MT YCjNkcPlljMQs62Niij6YfkfNW7wuFMaKBJw98DardWqXpRfBlpISW6hWRQQVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720357895; a=rsa-sha256; cv=none; b=Vdu46MRSNQVTTWS7XReW5gE3u43SikpMkl9+ZsvgrTHOlVTkGZQMeTDScpfBCcSqmlUWf0 Ybn3K+tzHAt/hS0VlPtmZPos2YPUx/0NzJF1LI9cHIRC6A441/QXfDlO4iSdeuOp56wYEk v0rbFyjJfL3iakFVuuYQyZJOTwHFiZwhRiNSNCtBLQINaeSFS35oVVnOvldvMvBtXcRwWl OGougCq8r/V9DSUqEwZdz9p51n2qDn3qqZTe12gJz4MEbubj502iRWJm6+Iv+I/Rd1RnDx Px1h6AEqNXF5QkONd5cfvpfsYDh9S4cQsmdfBtP0EJLkT4oBq1veL8Y5hhazNA== 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=1720357895; 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=9MxoMiArZyIEU7XIheqvMnp16yGNOftjObWqO3ei1Jw=; b=l8Qyrt5jDOovvkgSNmPnTKvgqDvsGVy+cP/8w6d1fl8TFsXhIHlhboCWFqHZLbiEhSyJqy KaRdQyf0LQAf4ojpGT5WJiSPsJ1JR/QWAKb7I48TjqEE1nVnefcx463m/uvLEyMN1edaRW awAx+hPXTlCqUk1sjV1cb5fnxaLfvDAVrWiMdvZ3oOsDWYnm0s49JnWAz1EU/0sjwJNNmE hB50qlyhOSTr9ci0h4BVyWbm06rbbbtKoMTrNxcs58NGW5m2wdN72WhZGyStGnAdtkLK7P 5gMDFB+pnEOjlOiSaLzBnx9Pn7ZcD+b+rhyx1rbpBhkbtiPx0zDuvAYCV5UkhQ== 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 4WH71g4y2Xz1NwP; Sun, 7 Jul 2024 13:11:35 +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 467DBZDD005920; Sun, 7 Jul 2024 13:11:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467DBZZ9005917; Sun, 7 Jul 2024 13:11:35 GMT (envelope-from git) Date: Sun, 7 Jul 2024 13:11:35 GMT Message-Id: <202407071311.467DBZZ9005917@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: e880dd644f63 - main - stale-symlink-buildworld.sh: a script to check for stale symlinks on a FreeBSD system 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e880dd644f63fbe068c38b73b44aa7e7c5f176f3 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=e880dd644f63fbe068c38b73b44aa7e7c5f176f3 commit e880dd644f63fbe068c38b73b44aa7e7c5f176f3 Author: Wolfram Schneider AuthorDate: 2024-07-07 12:59:20 +0000 Commit: Wolfram Schneider CommitDate: 2024-07-07 12:59:20 +0000 stale-symlink-buildworld.sh: a script to check for stale symlinks on a FreeBSD system You can run the script before or after `make installworld' You may also check your local ports with: env STALE_SYMLINK_BUILDWORLD_DIRS=/usr/local ./stale-symlink-buildworld.sh PR: 276235 --- tools/build/stale-symlink-buildworld.sh | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/tools/build/stale-symlink-buildworld.sh b/tools/build/stale-symlink-buildworld.sh new file mode 100755 index 000000000000..a4515db3fccb --- /dev/null +++ b/tools/build/stale-symlink-buildworld.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# Copyright (c) Feb 2024 Wolfram Schneider +# SPDX-License-Identifier: BSD-2-Clause +# +# stale-symlink-buildworld.sh - check for stale symlinks on a FreeBSD system +# +# You can run the script before or after `make installworld' +# + +PATH="/bin:/usr/bin"; export PATH + +: ${ncpu=$(nproc)} + +# check other directories as well +: ${STALE_SYMLINK_BUILDWORLD_DIRS="/usr/obj"} + +trap 'rm -f $script' 0 +script=$(mktemp -t stale-symlink) +chmod u+x $script + +# create a temporary shell script to check for stale symbolic links +cat << 'EOF' > $script +file="$1" + +if [ ! -e "$file" ]; then + echo "stale symlink detected: $(ls -ld $file)" >&2 + exit 1 +else + exit 0 +fi +EOF + +find -s -H \ + /bin \ + /boot \ + /etc \ + /lib \ + /libexec \ + /sbin \ + /usr/bin \ + /usr/include \ + /usr/lib \ + /usr/lib32 \ + /usr/libdata \ + /usr/libexec \ + /usr/sbin \ + /usr/src \ + /usr/share \ + $STALE_SYMLINK_BUILDWORLD_DIRS \ + -type l \ + -print0 | xargs -n1 -0 -P${ncpu} $script + +#EOF From nobody Sun Jul 7 14:17:45 2024 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 4WH8V21zlqz5Plpj; Sun, 07 Jul 2024 14:17:46 +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 4WH8V219h2z4pGq; Sun, 7 Jul 2024 14:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720361866; 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=R5IPAE7SJQg55BQpvtoQzt2HTMcwahEPMs2IkHlgE4E=; b=lZbCEts7UamPPBX0FRygjGLBQ+oov2FQ6ttnkMketmSVNltyDMqjUUX/DuWIrMuBxXJvF0 vCiTnJiOrXSiFP5UMshphVWuOf+dMJeZ9lmzI/TzcZuu8MR5rK9QlgjZcpiXQSPBCTfriZ JSc2Y+57G4rGbYrZW/SJk1AKieQmuQujc9QFLcg75fU0ktZa8dwtMYeFGtJ130+5MjTlQJ 2MQANzGT5zJjXdGduuqZfX3Q1t4UVoBD2PKmezLRYTMep/CJaS+yXPHZLSHsfHUIl/luH4 PUXG9qLvHtoIW+oGuy1K10+jgw3tDqygHe8egyyclJhLjeonOWmn3Yjv4rHzZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720361866; a=rsa-sha256; cv=none; b=fBlWAtqcQD2Yr6K6mlS18kwkUlf0Vnx7I/FSOSppWsoOdzrgM0JpaiHnc8o0wD+xmqDhM0 OnOQH2uY2xE8BQgDE1ODj0ZGr57e8ZlBHV1s8Z/2H44KaScLsHTQ/tx90+gv3mAYZ6+1i8 3a32y7Rpw5x4IAWUIJuPmOE3fbF8+lOLBXSCdSPA9y4h5ZstQXKORi1FS5/uifNOazR8U2 FtA/Li+VtMRTLUZFJKnePu6cljKKF4McGH10QPG4SDT5aNfQ5LRYC0Uo3JfKXpq8UzN/jh suJ7hvZqZPIlKsO0bCOOJ1WOnOyiIuRM1KlU5N9uxo8XiQf545aIyXPQaav0yA== 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=1720361866; 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=R5IPAE7SJQg55BQpvtoQzt2HTMcwahEPMs2IkHlgE4E=; b=RIcw7R2/jWewPfVHMAd0a1lAC2UZspgSkfx5rk8Lw14VQdCILdxz2/AjDAeJBea9qsXyJi 5V0WM9uabBSDTEJuVUR4PSncHoS5uKaEyFc5qn95GiO5xz8Y2bGJjmgQIbCNp9jJnz+ki1 5i4uCfjuj6CbVTQFXI6Yn7/Bfs2tjM/NgSbiqWxc8XScANejEj0TllYvZtaKzNBSkJoktX 7GR+3RbRga5VeOhdO2MNxuePAF7CS2R+Zq06DV020aehEnS/rJhmgyozXpXCMQ6LvzkobE o6KmVaUbPkBp6bG1SFY3azmcrNxr9KfN1mGOdzQEpbnHeOSuR+psD/U8tw5kFA== 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 4WH8V20fWlz1QSH; Sun, 7 Jul 2024 14:17:46 +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 467EHj8n012228; Sun, 7 Jul 2024 14:17:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467EHjlK012225; Sun, 7 Jul 2024 14:17:45 GMT (envelope-from git) Date: Sun, 7 Jul 2024 14:17:45 GMT Message-Id: <202407071417.467EHjlK012225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 6ea81bcaf8ad - main - ocs_fc(4): Fix a typo in a kernel message 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ea81bcaf8adcf6a8546407e93e97f3d920396d2 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=6ea81bcaf8adcf6a8546407e93e97f3d920396d2 commit 6ea81bcaf8adcf6a8546407e93e97f3d920396d2 Author: Gordon Bergling AuthorDate: 2024-07-07 14:17:23 +0000 Commit: Gordon Bergling CommitDate: 2024-07-07 14:17:23 +0000 ocs_fc(4): Fix a typo in a kernel message - s/elasped/elapsed/ MFC after: 5 days --- sys/dev/ocs_fc/ocs_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c index cfb9d4f8f536..c368e09aef8c 100644 --- a/sys/dev/ocs_fc/ocs_hw.c +++ b/sys/dev/ocs_fc/ocs_hw.c @@ -11214,7 +11214,7 @@ target_wqe_timer_nop_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) getmicrouptime(&cur_time); timevalsub(&cur_time, &io->submit_time); if (cur_time.tv_sec > io->wqe_timeout) { - ocs_log_info(hw->os, "IO timeout xri=0x%x tag=0x%x type=%d elasped time:%u\n", + ocs_log_info(hw->os, "IO timeout xri=0x%x tag=0x%x type=%d elapsed time:%u\n", io->indicator, io->reqtag, io->type, cur_time.tv_sec); /* remove from active_wqe list so won't try to abort again */ From nobody Sun Jul 7 14:55:17 2024 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 4WH9KK5f83z5PqlW; Sun, 07 Jul 2024 14:55:17 +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 4WH9KK37xTz3xdR; Sun, 7 Jul 2024 14:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720364117; 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=jFRWXlu1EabJfDRTB9T8gCbogN5vlu4my4+xVkouCZ0=; b=OAc10GABkZopIQZMNqpshar7gJwN1SAc+LmCiZiJIJYBpYtcoUm0XY/Fwvmf/qcLnZWNKq b1xvbeWEsOrzsir0sb7acXzd/ozoC7t5zYDPS/F3Xq+22MQvq26INlZ5wCdhEtrxPECDxn iD2VyxpCgRogcWOx6rUGCbwlgS4ZoFTm41DU8osIKewj/b1+EcHAlE6sbXFe97A/vVSNGj AUfa8Y0n0qmudvJAsOvL+bQtbTDGunqve9SxV8dkeffUv4x97hEdVj/Jg+/6glXTNqR2RI S1hZ8DCtM9EPjtOpoBjeBOIJqfo1ByUVBZWMFbpXzEnmQj4zgeHfEw7AdB2aNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720364117; a=rsa-sha256; cv=none; b=ok4enn99ROehPkNIavCCkkbDVdKGS9Iv7e2dpfoDvFaDH5iadUf9LBaZF3+nSYUTS8F7AM g4cIw1sM/51ujH5sSItVL6eo326cifE0ZXp7LbjgRvVyUza7WGBEVUa0RG6eSopRuNNgWl IutzcT0Jj2mO5L069F3ncsrbHFEbkhLO8T8qoBARfRDlXJRR9TZsWea7g0JDjppwYGAREU KU0Gc/kFHwb8gVl3ERrct1DI0/VkQ3WasevOcyZp1R1CBTl0U6pKxc6TYYdp4BRpDhun7n DrdxW32Xp7TIFvGD7CQQfKwZcM2ZOSHdWFyj+o+61/Wy4Pox1viMlOBmn9Xokg== 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=1720364117; 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=jFRWXlu1EabJfDRTB9T8gCbogN5vlu4my4+xVkouCZ0=; b=FeAZcv5JWZhX/YpyQxRxTUeIEcErNvREgTsCDJrGTQBKQp038zYRRDo4/JBki/nSID08Yx KiVLts21Doox+pyVdftkvhb1qf3YRUxIfuowj6/pDJ/cDncY1O745WupTQo1e9Q2ohL7ur SvqGTAD3dJNr/w7J+zkqK8Fi0qM3vpIHUKdowpwKNKSaX/nUWR6l1OCP7GX9M3+ayNW1Y9 kksdwTEs4Q/iYehOewtejLWdZorAJi8LRh8a4lxLGWO+ukHEkkp5Hrzse/gdLonNJdFyd9 5kNQVXO5LpSOjnSneRoNsculaEmzZvgZ2D5jfvgDZcoZ1cM+MqAUE4gPwf8C6Q== 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 4WH9KK2l0mz1RH2; Sun, 7 Jul 2024 14:55:17 +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 467EtHCX085066; Sun, 7 Jul 2024 14:55:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467EtHGQ085063; Sun, 7 Jul 2024 14:55:17 GMT (envelope-from git) Date: Sun, 7 Jul 2024 14:55:17 GMT Message-Id: <202407071455.467EtHGQ085063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 580dc180c7eb - main - kbcontrol.1+kbdmap.1: improve manual descriptions 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 580dc180c7ebd84a4aee27938a5f4a62520ac5d9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=580dc180c7ebd84a4aee27938a5f4a62520ac5d9 commit 580dc180c7ebd84a4aee27938a5f4a62520ac5d9 Author: Alexander Ziaee AuthorDate: 2024-06-04 07:49:43 +0000 Commit: Warner Losh CommitDate: 2024-07-07 14:54:17 +0000 kbcontrol.1+kbdmap.1: improve manual descriptions Update the man page descriptions so that apropos {console,keyboard} finds more relevant man pages. MFC after: 3 days Reviewed by: imp, emase Pull Request: https://github.com/freebsd/freebsd-src/pull/1275 --- usr.sbin/kbdcontrol/kbdcontrol.1 | 8 +++++--- usr.sbin/kbdmap/kbdmap.1 | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/usr.sbin/kbdcontrol/kbdcontrol.1 b/usr.sbin/kbdcontrol/kbdcontrol.1 index dcadf1b7414d..34126c718ed9 100644 --- a/usr.sbin/kbdcontrol/kbdcontrol.1 +++ b/usr.sbin/kbdcontrol/kbdcontrol.1 @@ -1,5 +1,7 @@ +.\"- +.\" SPDX-License-Identifer: BSD-2-Clause .\" -.\" kbdcontrol - a utility for manipulating the syscons or vt keyboard driver section +.\" kbdcontrol - syscons or vt keyboard driver configuration utility .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -10,12 +12,12 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd March 16, 2016 +.Dd July 7, 2024 .Dt KBDCONTROL 1 .Os .Sh NAME .Nm kbdcontrol -.Nd keyboard control and configuration utility +.Nd system video console keyboard control/configuration utility .Sh SYNOPSIS .Nm .Op Fl dFKix diff --git a/usr.sbin/kbdmap/kbdmap.1 b/usr.sbin/kbdmap/kbdmap.1 index 4c7f01d84745..002d8b2b9773 100644 --- a/usr.sbin/kbdmap/kbdmap.1 +++ b/usr.sbin/kbdmap/kbdmap.1 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) March 1995 Wolfram Schneider . Berlin. .\" All rights reserved. .\" @@ -21,13 +24,13 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd July 3, 2002 +.Dd July 7, 2024 .Dt KBDMAP 1 .Os .Sh NAME .Nm kbdmap , .Nm vidfont -.Nd front end for syscons and vt +.Nd system video console keyboard map/font dialog utilities .Sh SYNOPSIS .Nm .Op Fl K From nobody Sun Jul 7 14:55:18 2024 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 4WH9KL5hHxz5Pqgj; Sun, 07 Jul 2024 14:55:18 +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 4WH9KL3t2Jz3xLG; Sun, 7 Jul 2024 14:55:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720364118; 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=r1EjE3rRpMkn8wEhd7Nd0QJMncak7Suee2NWAT4neGo=; b=KBRfH5AvzWtGVKI+MNSbUgzb5t/zHIvFPMBODDoubx9lNegPF+jpO2BA8XTHxD+rycqWry VTrEu2LRYEbje0EhXRptRiUFWUDWLvNa5WfdNvg9EUvH0AJF0+UGpMdK+g6zSz0s9Nx18n sdVzVPlG95qNfC6E/OSmkFN0OV9IhqPg6vJOE73LFLPgB3P0Eh+Jaiw9asmPUZAMZngAAy y0LamsftmwD9HTlQUERLNEjvelSUvzA6XQ0F0j9sAAZLG3tklBva/8QjyfkGmpVKYBigZA az2fcL1nx53Pohdm70UIWtJZwwzghh8W5eKiKLcRTCu1wdG9PJwndxOrihkgDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720364118; a=rsa-sha256; cv=none; b=q3b5Zm8TzfgAr0Slm6csdw2DcNCUiTUTnjv9J1Mk5SAjVDiJGzeQJAYk7mhw1Hw/SxZw+7 37WLtJT6P7wbbV8alm55jDSV89FX5vYOR5i2Rag0fQMR7+DQtWKYMxRWohDRryIVmzeP52 cw1JJYR8s+yenq7lXAMgh3mb50spaoxw+EgT7Glbd4Da4M8FV/cQHFyKS1zo973CeS5+Dx KR59GigcZ1yYA3J3cktD/kZNFEs9UjB6e3qjBUGOFqxWzhCRIrRvkvG/tEuBLfkijDxMWA U2RbodYq0AaO69pKdd+sXCgFkJvqyu/9hW8o3Vr8yFrOwSqYUtyIxUukCIYGIA== 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=1720364118; 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=r1EjE3rRpMkn8wEhd7Nd0QJMncak7Suee2NWAT4neGo=; b=Anl2IoV4zWv5G6XxRlYWH10XHpUJIH1qWVOhn4c4r5C7DaHAYT/AAqyj2SpaVWLBs7WOKq Efc0dMYrQAyjODtSeTHCO6fjDnfpigWrNEtUPqCeoRiOqdns05BoNOF8vExMVh8Emy4kkC rKoZ98VV5fWx4eTVDHiV7KGudG18sf9iJvuIp4n2EKd+hDX9H/pSAk4QQFkTgQ6hEj2i/G X/O5cfiThbpnLHu1wqxcG0ycvglv2VVIkuNYs/24Esbim8xL29MlOq42lBVn/9fjV5Fe28 KtxwXuHA1uOmVyIXKHSmh5eFFOxsl2f9EsExQsiZHp53ryV5CAEBQNc9ajvdPA== 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 4WH9KL3R5vz1RPP; Sun, 7 Jul 2024 14:55:18 +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 467EtIeN085155; Sun, 7 Jul 2024 14:55:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467EtIpk085152; Sun, 7 Jul 2024 14:55:18 GMT (envelope-from git) Date: Sun, 7 Jul 2024 14:55:18 GMT Message-Id: <202407071455.467EtIpk085152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: de2ab11ff955 - main - manuals/description: system video console utilitys 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de2ab11ff955faa32bfffe5b2401b444a7c138f2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=de2ab11ff955faa32bfffe5b2401b444a7c138f2 commit de2ab11ff955faa32bfffe5b2401b444a7c138f2 Author: Alexander Ziaee AuthorDate: 2024-06-04 09:03:41 +0000 Commit: Warner Losh CommitDate: 2024-07-07 14:54:22 +0000 manuals/description: system video console utilitys Update the man page descriptions so that apropos are more consistent for console related man pages. Motive: apropos results: clarify consistently MFC after: 3 days Reviewed by: emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1275 --- sbin/conscontrol/conscontrol.8 | 6 ++++-- share/man/man4/vt.4 | 7 +++++-- usr.sbin/moused/moused.8 | 7 +++++-- usr.sbin/vidcontrol/vidcontrol.1 | 6 ++++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/sbin/conscontrol/conscontrol.8 b/sbin/conscontrol/conscontrol.8 index 54c89d5e5c1b..c11a1f7db5d9 100644 --- a/sbin/conscontrol/conscontrol.8 +++ b/sbin/conscontrol/conscontrol.8 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifer: BSD-2-Clause .\" .\" Copyright (c) 2001 Jonathan Lemon .\" All rights reserved. @@ -23,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 14, 2011 +.Dd July 7, 2024 .Dt CONSCONTROL 8 .Os .Sh NAME .Nm conscontrol -.Nd control physical console devices +.Nd control physical system video console devices .Sh SYNOPSIS .Nm .Op Cm list diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index 45e6c0ceb979..6f223d67eb09 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 Warren Block .\" All rights reserved. .\" @@ -22,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 24, 2024 +.Dd July 7, 2024 .Dt "VT" 4 .Os .Sh NAME .Nm vt -.Nd virtual terminal console driver +.Nd virtual terminal system video console driver .Sh SYNOPSIS .Cd "options TERMINAL_KERN_ATTR=_attribute_" .Cd "options TERMINAL_NORM_ATTR=_attribute_" diff --git a/usr.sbin/moused/moused.8 b/usr.sbin/moused/moused.8 index 9eeb48547866..cd5d8ddde339 100644 --- a/usr.sbin/moused/moused.8 +++ b/usr.sbin/moused/moused.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-4-Clause +.\" .\" Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. .\" @@ -28,12 +31,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 15, 2008 +.Dd July 7, 2024 .Dt MOUSED 8 .Os .Sh NAME .Nm moused -.Nd pass mouse data to the console driver +.Nd pass mouse data to the system video console driver .Sh SYNOPSIS .Nm .Op Fl DPRacdfs diff --git a/usr.sbin/vidcontrol/vidcontrol.1 b/usr.sbin/vidcontrol/vidcontrol.1 index 44e0950294cb..09855df6b60f 100644 --- a/usr.sbin/vidcontrol/vidcontrol.1 +++ b/usr.sbin/vidcontrol/vidcontrol.1 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" vidcontrol - a utility for manipulating the syscons or vt video driver .\" @@ -10,12 +12,12 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd April 6, 2022 +.Dd July 7, 2024 .Dt VIDCONTROL 1 .Os .Sh NAME .Nm vidcontrol -.Nd system console control and configuration utility +.Nd system video console control and configuration utility .Sh SYNOPSIS .Nm .Op Fl CdHLPpx From nobody Sun Jul 7 14:58:39 2024 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 4WH9PD2X4bz5Ps50; Sun, 07 Jul 2024 14:58:40 +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 4WH9PC0zZXz464K; Sun, 7 Jul 2024 14:58:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720364319; 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=8Bu4dWpOjqmeIt20t2c5T3bU1RFkj4fmDf3+WQfOqd0=; b=pJmBhpCj5MTD8EUdcVcLgk0oM0Hlr8FImfBF5mU9sgcx1z0JlX0hygM5Ju6x9d51juMMP3 D7CwDfSIEHgHngQPn6q88toofLaIecJ+p8wReV++7VjMsA145+zl5O3pE+8dXZj+aT04LS l7oQ4LDTp09U1sXf0VwDesmc01CTYuB7IWA/mIyr5jdSrHuatP3QrgNBaTCp7jA3rI2axO 7yDmY8BkLd+iGtnFndg5QvsqmfnCx4spU+KkUsVR498+6isz53CQMNMdQFTS4eaC6kaehX tNTAYo+Z89zPz9/fEyuNnIJb1L4M2rnwIKJtkJ7fDeQDv4x6+zEhiuyW1qHu0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720364319; a=rsa-sha256; cv=none; b=dvA1HpnNHkTFsfeRUIZOFxOCMLDd16ovC1LeEml6zEZ6BtfIsJ9Q+hEKJe249mWE7kS78u i4pncKq2uvg+WFs4aKEsMnVkYtFWpJ2xkND0U1ZweML9xWrMZWLXixDVYRhJrhEd0hyT4a KXO4U5gQMWAvqiElsuGBaaQnPWyEF49Yr5hFrNZoDs5HLNltYTkx0EonAS948yhDp8OmOW Ciq//4uwksVMMw+DF2nZBZ2eF/9wZdsMOLgYpQ5b5VmmPZHPzSXMSaqa7t5sznq6DHQsKK VVcoY3ocT/bg0YXqfa3L3U7oCzCt14y9CdUKEBAkN9i8Eyso5+D6zkWysZCGDQ== 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=1720364319; 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=8Bu4dWpOjqmeIt20t2c5T3bU1RFkj4fmDf3+WQfOqd0=; b=IT4Vz6yAZnf60IU4sff1y1vXwO8CY/uV5CVhNX2j7CwYtvJMSeyNcdd/9OKtOlAYC/r9xO oZj5It9G84REJ3GPcOOqb7Nqr6xEdfDQATbya+E2FYSx6s94ZaNGm3S8W2o0TSAfdsK/Fu jHtj4yuynb1eOMlCYhNSlfGkY7+hJ5H1/5EIsJN6i18cf6emwlKhj2yKMSh6fQ2EuR47gc k52Lc8Goi/DlutWz0++QZXeSUIXWk+ZjJdiCZrDn7EYU275ZoLnIv7IevIiY7JryfJkPuV c2fkER8zD7demi5v2d6+wvjIROl/bMUR67E/DqYTBzkev8tC6lDjCUG5GxnO3w== 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 4WH9PC0ZThz1RKm; Sun, 7 Jul 2024 14:58:39 +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 467EwdlH092634; Sun, 7 Jul 2024 14:58:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467Ewdr6092631; Sun, 7 Jul 2024 14:58:39 GMT (envelope-from git) Date: Sun, 7 Jul 2024 14:58:39 GMT Message-Id: <202407071458.467Ewdr6092631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c2c6f08c8b47 - main - development.7/FILES: add CONTRIBUTING + git-arc.sh 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2c6f08c8b47cfda79529e0a1016b8f7803c0ec8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c2c6f08c8b47cfda79529e0a1016b8f7803c0ec8 commit c2c6f08c8b47cfda79529e0a1016b8f7803c0ec8 Author: Alexander Ziaee AuthorDate: 2024-06-18 11:02:42 +0000 Commit: Warner Losh CommitDate: 2024-07-07 14:58:37 +0000 development.7/FILES: add CONTRIBUTING + git-arc.sh MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1300 --- share/man/man7/development.7 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/man/man7/development.7 b/share/man/man7/development.7 index 9af9bfb66fa8..eb5a57a464fc 100644 --- a/share/man/man7/development.7 +++ b/share/man/man7/development.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 1, 2022 +.Dd July 7, 2024 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -119,6 +119,14 @@ build and test status of CURRENT and STABLE branches, the continuous integration system is at: .Pp .Lk https://ci.FreeBSD.org +.Sh FILES +.Bl -compact -tag -width "/usr/src/tools/tools/git/git-arc.sh" +.It Pa /usr/src/CONTRIBUTING.md +.Fx +contribution guidelines +.It Pa /usr/src/tools/tools/git/git-arc.sh +Phabricator review tooling +.El .Sh EXAMPLES Check out the CURRENT branch, build it, and install, overwriting the current system: From nobody Sun Jul 7 19:19:58 2024 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 4WHHBk3ylcz5QKk7; Sun, 07 Jul 2024 19:19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WHHBk3SFPz4659; Sun, 7 Jul 2024 19:19:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720379998; 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=gZ1RC69wlyRlwRb1jcRZQCKEUMp3tc8ijDR7XiiJ+IU=; b=wqlmBHGHSIWF0i28yFLqAuV3yMur1p4eq8QOt8iymwhsUwge53uGCl74B6EUxpiXr1pZZw SF7BEHOUiyPH70JlCRu98zx8QuecDFlTEEKIIHGOQQhxG0Ddx7mcrvX1jtRuN1lYkbkyZX TPJb6mcKrJr8rtTwRewchq2jQYv0bjNzbvD2x0G1MmTk5PaPQ1Ihbh4AC28FiHHo9Jq0dI DKqQWsB2WIR7ZrIIoXiHZ2kDWQeOj8ZlIeIDQXjfJ9KzqNWRFFV1ctoclUd5NVzh1YD+PI 5oG5Qp7y+X1gX8sODxl52O0viNiVTRNcxEgcNulN4u1iy5qfe+4GwJtkjvZSfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720379998; a=rsa-sha256; cv=none; b=KxZ4Ys7OONxq3NcCZOvEAKE4wt25jnGZ9aC6M6mE5xIilGx0QyyoXd1k+n65PV672twXTd gegk19mAyjPOJnayQumCL66pXUtxllg5xfm3YwVaN3k2DTJhCuo3I9RrBFD1JlrhIdmqIy CiVZb8k+LqJ6T2QX+JKe14iuURjcZZFzRduX9i7T7nPIetFuDgx/GWfeHKXwYRc8zfjDSX TqVkAEFrgDj/nLLi6FR+L70bdTX7yGQuXvUsIFH/kfAuX+V2UcYfSFhepdQ4bGNjpSPykU TLNSZTaFbmPTz3qW7s3JX6H3JPo8o8zZJL31cFwT46fmhpNqv0ssR92YXgEiQg== 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=1720379998; 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=gZ1RC69wlyRlwRb1jcRZQCKEUMp3tc8ijDR7XiiJ+IU=; b=ATZ+T1B+JQ/YrTZWb9pGfB4PfHgGThhMP/yYBIkIWRxINbTkTiw7t17mCmTc/mtUc5X7fN D1PuISBR2YbeCkhCLQvnM7XwSjUJdjkLbRfb5TPXNql95nxogYKZezFjBeQcqOXfWca9kg iHpSfd3xXTX8qi6VxfpVtl+h/0MjqbpbHbaxuEv4XsVQbxCZt59l/ws4I5Q+htJTjofWQW DAqTXpEJOKm/oS+Hq5u91X2HLABwaNLgtPsHA86cWK3mjWpzrowM8wRoSwzsjjBYi9aoM2 fq2sYfYn6CRT84BbqH4s46yI6e/dELSBajCeHwpj+2ZOKS0BSj5h/v+xlkQdkg== 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 4WHHBk2xxHzKhH; Sun, 7 Jul 2024 19:19:58 +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 467JJwOf044953; Sun, 7 Jul 2024 19:19:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467JJwf6044950; Sun, 7 Jul 2024 19:19:58 GMT (envelope-from git) Date: Sun, 7 Jul 2024 19:19:58 GMT Message-Id: <202407071919.467JJwf6044950@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: df3f247e4696 - main - rpcbind.8: Update the man page for -I 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df3f247e46969a71f3db1bfa5714603c99717579 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=df3f247e46969a71f3db1bfa5714603c99717579 commit df3f247e46969a71f3db1bfa5714603c99717579 Author: Joyu Liao AuthorDate: 2024-07-07 19:17:57 +0000 Commit: Rick Macklem CommitDate: 2024-07-07 19:17:57 +0000 rpcbind.8: Update the man page for -I Commit d8a99eaa1f06 added a new command line option "-I". This patch updates the man page for this. This is a content change. Reviewed by: Alexander Ziaee (manpages) Differential Revision: https://reviews.freebsd.org/D45118 --- usr.sbin/rpcbind/rpcbind.8 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rpcbind/rpcbind.8 b/usr.sbin/rpcbind/rpcbind.8 index 814e95c46722..1dd145f945f4 100644 --- a/usr.sbin/rpcbind/rpcbind.8 +++ b/usr.sbin/rpcbind/rpcbind.8 @@ -1,6 +1,6 @@ .\" Copyright 1989 AT&T .\" Copyright 1991 Sun Microsystems, Inc. -.Dd August 31, 2023 +.Dd July 5, 2024 .Dt RPCBIND 8 .Os .Sh NAME @@ -99,12 +99,21 @@ returning a UDP packet from a different IP address than it was sent to. Note that when specifying IP addresses with .Fl h , +and no +.Fl I +option is specified, .Nm will automatically add .Li 127.0.0.1 and if IPv6 is enabled, .Li ::1 to the list. +.It Fl I +Cause +.Nm +not to bind to the localhost when +.Fl h +has been specified. .It Fl i .Dq Insecure mode. From nobody Sun Jul 7 23:21:45 2024 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 4WHNYj4NsNz5QKRD; Sun, 07 Jul 2024 23:21:45 +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 4WHNYj3yLZz4dL2; Sun, 7 Jul 2024 23:21:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720394505; 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=KeSEKXO6UUBRW/QFAt2RtxBlwzBymoaazlf70h7TecQ=; b=ArNHnuTn3MfBcdsnYTjTvHVQrmGXKnekeCoTmHtaDx6c3ZsBb+a+JnZBr2VAdMSzkkOr1a v7mQ2UTip0/+vOYi1fOZj/86gDXspt2L+yhF8yGS/RMvYj5y6V5BYsobc1O/Pn814LPp/t tG1/PcEu2rbsmnxEfVGOAF68hG2O9H1gvKQuxS3R7CraoEUdP0WZkiSqw6YRRz9Wgtl9+a w69UhtIq3n5jOCF9Hqu+iUjY+m12STWS5Ie40epzKDprqpNiHETYlWDE2+3bIT0ufneG2H t9iHtfNP1iNcwpUnwqqwYZfWrJlpRiQIEJU1R/D3SoagYqb3beFQNWVIeDNFcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720394505; a=rsa-sha256; cv=none; b=lXSlSOK4UpZhY/mDhZBcMHvWfCzvJV2Scf6ofjZvfYti6FsPonuVSnQW80mXhBZ2IllyXD ngIxISEEFwtb5cUtYmhhuYO14oCpc9mbDK3zUefLySeqfASTT07BjYjKuPvuXaZz9C9FX3 3REB0RS3sXizbpThEZsB5MyJGQLz7o1fq+nC97zIN3NFHrcxqw/c3aQzM3aIrFsruzCPWL bPakkmywFmTmfzYKwtiiACAWe8CR9DSIaezH1sh3ZIb+yRU26PgH8N5z9iuRl3ANeAxV3L B6S3dlqJm5olna+7C3JpRlt7neemEE8us0u0ZMDwaUVNULwANoqT8k7D+mcqZw== 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=1720394505; 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=KeSEKXO6UUBRW/QFAt2RtxBlwzBymoaazlf70h7TecQ=; b=YgU9ssAAtTV8jbIkixGN64d+LcerHu5I06U8iCO7Jy2e+NpDJ6yZ0soCt1lpirBqqeuExO HoUZQUoUK/YM5h987XCa0Vv5WG21BNwOkswYHworn1Me3VMO+MVG9H74Fwn8xFpE9LteFQ xxhO7tMo9NpzJUFDUdSlTkwRotQngtORfnyO0zLRfNHa5LilLZwfacAbV3dFhza41JDHnd DOTQun8EnUSLO5B3v4DD1duZEuofYikPYYHgWoFjL/UQ/Z93KrJzyICKDViowQCiMuGHvD 2A09jdhqg+qdH+QYfPIP2B3trID96YDJE24G1YoFHRZBvCGE/54CPknLdeWtWQ== 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 4WHNYj3Z4vzSP8; Sun, 7 Jul 2024 23:21:45 +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 467NLjK4063157; Sun, 7 Jul 2024 23:21:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467NLj9S063154; Sun, 7 Jul 2024 23:21:45 GMT (envelope-from git) Date: Sun, 7 Jul 2024 23:21:45 GMT Message-Id: <202407072321.467NLj9S063154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 75694e650ed9 - main - swap_pager: speedup meta_transfer 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75694e650ed99e43cf8418629ae7a3a596ef4f5d Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=75694e650ed99e43cf8418629ae7a3a596ef4f5d commit 75694e650ed99e43cf8418629ae7a3a596ef4f5d Author: Doug Moore AuthorDate: 2024-07-07 23:19:22 +0000 Commit: Doug Moore CommitDate: 2024-07-07 23:19:22 +0000 swap_pager: speedup meta_transfer Add a parameter to swp_pager_meta_build, for the benefit of swp_pager_meta_transfer. swp_pager_meta_transfer calls swp_pager_xfer_source, which may look up the same trie entry twice - first, by calling sw_pager_meta_lookup, and then as the first step in swp_pager_meta_build. A boolean parameter to swp_pager_meta_build tells that function not to replace a previously assigned swapblk with a new one, and setting it in this call makes the first meta_lookup call unnecessary. swp_pager_meta_transfer calls swp_pager_xfer_source, which may release and reacquire the source object write lock, because the call to swp_pager_meta_build may acquire and then release the destination object write block. But it probably doesn't, so fiddling with the source object write block was probably unnecessary. This boolean parameter to swp_pager_meta_build tells it to return immediately if memory allocation problems are about to require a lock release/reacquisitiion, so that the caller can release/reacquire the source object write lock only if truly necessary, around a second call the swp_pager_meta_build with that boolean parameter not set. This should make manipulation of the source object write lock rarer. Reviewed by: alc, kib (previous version) Tested by: pho Differential Revision: https://reviews.freebsd.org/D45781 --- sys/vm/swap_pager.c | 94 ++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 79986842d814..9df1521858c1 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -486,7 +486,8 @@ static daddr_t swp_pager_getswapspace(int *npages); /* * Metadata functions */ -static daddr_t swp_pager_meta_build(vm_object_t, vm_pindex_t, daddr_t); +static daddr_t swp_pager_meta_build(vm_object_t, vm_pindex_t, daddr_t, + bool); static void swp_pager_meta_free(vm_object_t, vm_pindex_t, vm_pindex_t, vm_size_t *); static void swp_pager_meta_transfer(vm_object_t src, vm_object_t dst, @@ -1031,7 +1032,7 @@ swap_pager_reserve(vm_object_t object, vm_pindex_t start, vm_pindex_t size) } for (j = 0; j < n; ++j) { addr = swp_pager_meta_build(object, - start + i + j, blk + j); + start + i + j, blk + j, false); if (addr != SWAPBLK_NONE) swp_pager_update_freerange(&range, addr); } @@ -1041,35 +1042,6 @@ swap_pager_reserve(vm_object_t object, vm_pindex_t start, vm_pindex_t size) return (0); } -static bool -swp_pager_xfer_source(vm_object_t srcobject, vm_object_t dstobject, - vm_pindex_t pindex, daddr_t addr) -{ - daddr_t dstaddr __diagused; - - KASSERT((srcobject->flags & OBJ_SWAP) != 0, - ("%s: srcobject not swappable", __func__)); - KASSERT((dstobject->flags & OBJ_SWAP) != 0, - ("%s: dstobject not swappable", __func__)); - - if (swp_pager_meta_lookup(dstobject, pindex) != SWAPBLK_NONE) { - /* Caller should destroy the source block. */ - return (false); - } - - /* - * Destination has no swapblk and is not resident, transfer source. - * swp_pager_meta_build() can sleep. - */ - VM_OBJECT_WUNLOCK(srcobject); - dstaddr = swp_pager_meta_build(dstobject, pindex, addr); - KASSERT(dstaddr == SWAPBLK_NONE, - ("Unexpected destination swapblk")); - VM_OBJECT_WLOCK(srcobject); - - return (true); -} - /* * SWAP_PAGER_COPY() - copy blocks from source pager to destination pager * and destroy the source. @@ -1548,7 +1520,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, int count, mreq = ma[i + j]; vm_page_aflag_clear(mreq, PGA_SWAP_FREE); addr = swp_pager_meta_build(mreq->object, mreq->pindex, - blk + j); + blk + j, false); if (addr != SWAPBLK_NONE) swp_pager_update_freerange(&range, addr); MPASS(mreq->dirty == VM_PAGE_BITS_ALL); @@ -2052,16 +2024,22 @@ swp_pager_free_empty_swblk(vm_object_t object, struct swblk *sb) uma_zfree(swblk_zone, sb); } } - + /* * SWP_PAGER_META_BUILD() - add swap block to swap meta data for object * - * The specified swapblk is added to the object's swap metadata. If - * the swapblk is not valid, it is freed instead. Any previously - * assigned swapblk is returned. + * Try to add the specified swapblk to the object's swap metadata. If + * nowait_noreplace is set, add the specified swapblk only if there is no + * previously assigned swapblk at pindex. If the swapblk is invalid, and + * replaces a valid swapblk, empty swap metadata is freed. If memory + * allocation fails, and nowait_noreplace is set, return the specified + * swapblk immediately to indicate failure; otherwise, wait and retry until + * memory allocation succeeds. Return the previously assigned swapblk, if + * any. */ static daddr_t -swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk) +swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk, + bool nowait_noreplace) { static volatile int swblk_zone_exhausted, swpctrie_zone_exhausted; struct swblk *sb, *sb1; @@ -2088,6 +2066,8 @@ swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk) printf("swblk zone ok\n"); break; } + if (nowait_noreplace) + return (swapblk); VM_OBJECT_WUNLOCK(object); if (uma_zone_exhausted(swblk_zone)) { if (atomic_cmpset_int(&swblk_zone_exhausted, @@ -2118,6 +2098,10 @@ swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk) printf("swpctrie zone ok\n"); break; } + if (nowait_noreplace) { + uma_zfree(swblk_zone, sb); + return (swapblk); + } VM_OBJECT_WUNLOCK(object); if (uma_zone_exhausted(swpctrie_zone)) { if (atomic_cmpset_int(&swpctrie_zone_exhausted, @@ -2144,14 +2128,16 @@ allocated: modpi = pindex % SWAP_META_PAGES; /* Return prior contents of metadata. */ prev_swapblk = sb->d[modpi]; - /* Enter block into metadata. */ - sb->d[modpi] = swapblk; + if (!nowait_noreplace || prev_swapblk == SWAPBLK_NONE) { + /* Enter block into metadata. */ + sb->d[modpi] = swapblk; - /* - * Free the swblk if we end up with the empty page run. - */ - if (swapblk == SWAPBLK_NONE) - swp_pager_free_empty_swblk(object, sb); + /* + * Free the swblk if we end up with the empty page run. + */ + if (swapblk == SWAPBLK_NONE) + swp_pager_free_empty_swblk(object, sb); + } return (prev_swapblk); } @@ -2168,6 +2154,7 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, { struct page_range range; struct swblk *sb; + daddr_t blk; vm_page_t m; vm_pindex_t offset, last; vm_size_t mc; @@ -2193,12 +2180,25 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, limit = last - sb->p < SWAP_META_PAGES ? last - sb->p : SWAP_META_PAGES; for (i = start; i < limit; i++) { - if (sb->d[i] == SWAPBLK_NONE) + blk = sb->d[i]; + if (blk == SWAPBLK_NONE) continue; if (dstobject == NULL || - !swp_pager_xfer_source(srcobject, dstobject, - sb->p + i - offset, sb->d[i])) { + (blk = swp_pager_meta_build(dstobject, + sb->p + i - offset, blk, true), + blk != sb->d[i] && blk != SWAPBLK_NONE)) swp_pager_update_freerange(&range, sb->d[i]); + else if (blk == sb->d[i]) { + /* + * Destination has no swapblk and is not + * resident, so transfer source. + * swp_pager_meta_build() failed memory + * allocation already, likely to sleep in retry. + */ + VM_OBJECT_WUNLOCK(srcobject); + swp_pager_meta_build(dstobject, + sb->p + i - offset, blk, false); + VM_OBJECT_WLOCK(srcobject); } if (moved != NULL) { if (m != NULL && m->pindex != pindex + i - 1) From nobody Sun Jul 7 23:47:23 2024 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 4WHP7H73Nzz5QNDk; Sun, 07 Jul 2024 23:47:23 +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 4WHP7H6H9Rz4gc3; Sun, 7 Jul 2024 23:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720396043; 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=k9X78hr07sZgKwAOWzweNgppgBXSPZU3MBslctjE6tg=; b=aTREN9lPxr9Dvc6KU6dlZakIsymSXXwQagJ9y5DqRH5Rc3fuy2s2CMcxS3wuGRwcV7bn+2 2BNmxqQQtAPqigNWAwWD2E59IzyBdInl754QllFqNJQNE8HXBUkZ+T0lF3qmVgVE0+rDa2 qZYfb2sKVqG7kg8b5o36hWxMvjKykHjbryER3JiUDoy57EH59N9aZPDcZvCMyDKA7N29rP PX8d/UZ8NjMuEWXbkc3VNHZiUpXtY/fCtlOxw9cVKC03+0twSL8gc8vDpA9asy9r5eVPcB 25rwTkk5CAszeup5RExmJwU3UsqPyLLUSR2jV2g+WrntmyfClMrts/Wwte6drg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720396043; a=rsa-sha256; cv=none; b=Dfh5ONTNX9a+Zw3IXd60SrbFljbnz1H2QKvYRke19G6wmWlcaH9tRFyRdAZ9FkbU4z56ko q15zzssLbHWK6afszLjbgADIhDCfrsjMUFvl+/ADCCGdfc8rrXGbxHysRdUHh65iLtKVtG ip6cYKCbbnRBaID3iQEKSDHhvnjMY6VntzjlmBEJ3pL6P/6cX8M1osDphkZFze7Sf4H9pz 5CKksbm50NZpT8bs+4ze0YiaYodI9j9PZPXieGU9saWBn74mwcoL3YWqGLfbtGdIQZDEW8 sn1YOOY6Xkt7pV7v17Yr/k90cbl4k6JwM/Q+ot0JfE2UhwpvJ/U8Dhb+wBNsMQ== 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=1720396043; 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=k9X78hr07sZgKwAOWzweNgppgBXSPZU3MBslctjE6tg=; b=cUks1gRFKhu2Hk+NEBAAwQ+wHANp6EPTieckDWNdsyLfaeq2BGOEMeFQHmou3bppbb/u2/ LyDhurZuDwPRsaUUAnrrdUTF8ve+GYlKkiT9xZ4Hn3AigoZ1y4a9lE9TgUl5jPURtqEyt4 PUyCDYwPgqpKvtT+rPyas7llow2/uTlFN8ozldFvc2kdDmfIXohIEo9xg4GrTj1lAe24yI tFk/vWXfa/3ZWodLrLfeEAF94vliRIVfpVfcFuaIRaNZrAd1bKvNCpTBR37GXzYkYACF7C pJgjwH06R3kFj21etmlpvj9CTbUPF963LKfp/9IeB/8aj6Ljp0Wup3C+YRHGNA== 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 4WHP7H5mkjzSZD; Sun, 7 Jul 2024 23:47:23 +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 467NlNiA002103; Sun, 7 Jul 2024 23:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467NlNHW002100; Sun, 7 Jul 2024 23:47:23 GMT (envelope-from git) Date: Sun, 7 Jul 2024 23:47:23 GMT Message-Id: <202407072347.467NlNHW002100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 39733922edc4 - main - rtld: actually resolve memcpy plt 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39733922edc43001e8750307704daa835a14b5ac Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=39733922edc43001e8750307704daa835a14b5ac commit 39733922edc43001e8750307704daa835a14b5ac Author: Ryan Libby AuthorDate: 2024-07-07 23:46:49 +0000 Commit: Ryan Libby CommitDate: 2024-07-07 23:46:49 +0000 rtld: actually resolve memcpy plt The call to memcpy() meant to cause plt resolution in _thr_rtld_init() was getting optimized by the compiler. Tell the compiler not to use its builtins in thr_rtld.c. We could avoid just the memcpy builtin but disabling all will be more robust against future changes. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45891 --- lib/libthr/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 85c028f521a1..d3c69a7dc8b7 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -32,6 +32,10 @@ CFLAGS+=-I${SRCTOP}/lib/libthread_db CFLAGS.thr_stack.c+= -Wno-cast-align CFLAGS.rtld_malloc.c+= -Wno-cast-align +# Disable compiler builtins so that the compiler does not optimize away rtld's +# attempts to force early PLT resolution for certain functions that may be +# replaced by builtins. +CFLAGS.thr_rtld.c+= -fno-builtin CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations .if ${MK_ASAN} != "no" # False-positive ASAN error claiming the local "struct sigaction act;" is From nobody Sun Jul 7 23:47:24 2024 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 4WHP7K0cVKz5QN6F; Sun, 07 Jul 2024 23:47:25 +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 4WHP7J6T61z4gYn; Sun, 7 Jul 2024 23:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720396044; 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=lTLfyklUpDPpvAPLcIyFb/ypqOow4D3u8Qe3Q8PcMLw=; b=CYuEnuMyUPlcyQoMVPhmzFxeFxp19Lki8BWItSBJBOTXvh+67YXuEi0x6w2qCdgWD2kIw/ tdCFzMd3ZNRRJGT9+JxZNYdyztpGziOnHQ+oFdZCvFKnwwv/dM21h+7mmlMpk+LYp/ICnc pwh+xLNn45kZCh2PExYD0z+aq88iIeT+A5Q1Da9PHpU9mMl8soeuTKOQl1RN5HtO7h7tPk IEGzljLBY+z+tnCQ1N9ghlKdQE/M87PSUnlp2z1+wsi2prxuvcFxPCyF95FnNwHBflGNU7 mS+QTVvwIrNokE/sFqDd7tmlUcGTploZzGi85bQpXUoKJB/vwF6sSH090u0tXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720396044; a=rsa-sha256; cv=none; b=tYLzLO7HsrDnHgvAefMCnb1EKQ0lK3Dw/rrVBLgw0kFbvzkyXr+ICr84LX7x3YHAXRHwKT J8PJNl1cyLWp1y9sldYLEke2wARJFtJyet9vAAEfjkhUGmOASaAjsJesNErFRhdCJtnTor U8jXQMo69cyhRQ1clZoD/pT/1A/wK1pp2hLEKdWH4u4E71Smy7N+RcCCMc1TsWeLMIsrGL 9Ez8ZUyEqK3+L1rOEwcUXSD3cPXoDjXGJ7+a4rRTxEE5uPYmNMueobdkWfYLImW1GXfVIR ClUYFgNRUAn6k2IEpOv688af+O5n95tGZDef7PdjjcsA2mDqCitobFwODUxP1A== 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=1720396044; 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=lTLfyklUpDPpvAPLcIyFb/ypqOow4D3u8Qe3Q8PcMLw=; b=BQfe+9r7epZapoxIGWUJkhrajr/jo4iN8LBnG7iHWpct6J9JRExfkBgfF/7/J7UvrhgV7a r0HprZ4WdiS6IW3pjZ+/nP2lPlXFTHW2jF0sGLVkUAcA+D/rb54RvHMaUtohTDgdAJbMlS +plL6ce41WRSyjW+v1OQ6YlKyWnBl+8/l24UOyaLUe/VUMUi7K+fu+bch3w91jxy/BvgpF f3rFeCJx80SRTEAiSa9n2yJpBUEydk2HXBSvYULb4UHtAmLLP1gyP4QRctllD4iP43qNrv Aaufrrb1V30yECgOH2+n40biUoO9G7v1OQE90CGTAdTt4xyczEkTMrxUa9CHDA== 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 4WHP7J65b4zSjN; Sun, 7 Jul 2024 23:47:24 +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 467NlOm5002143; Sun, 7 Jul 2024 23:47:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467NlOj6002140; Sun, 7 Jul 2024 23:47:24 GMT (envelope-from git) Date: Sun, 7 Jul 2024 23:47:24 GMT Message-Id: <202407072347.467NlOj6002140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: f7f9a033f3ec - main - rtld: quiet gcc -Wrestrict 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7f9a033f3ec755c8f1657103ba083294eb155d4 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=f7f9a033f3ec755c8f1657103ba083294eb155d4 commit f7f9a033f3ec755c8f1657103ba083294eb155d4 Author: Ryan Libby AuthorDate: 2024-07-07 23:46:49 +0000 Commit: Ryan Libby CommitDate: 2024-07-07 23:46:49 +0000 rtld: quiet gcc -Wrestrict Reported by: GCC -Wrestrict Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45892 --- lib/libthr/thread/thr_rtld.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 54560a2f7df2..25ecb83a11a3 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -220,19 +220,19 @@ _thr_rtld_init(void) struct RtldLockInfo li; struct pthread *curthread; ucontext_t *uc; - long dummy = -1; int uc_len; + char dummy[2] = {}; curthread = _get_curthread(); /* force to resolve _umtx_op PLT */ - _umtx_op_err((struct umtx *)&dummy, UMTX_OP_WAKE, 1, 0, 0); + _umtx_op_err(&dummy, UMTX_OP_WAKE, 1, 0, 0); /* force to resolve errno() PLT */ __error(); /* force to resolve memcpy PLT */ - memcpy(&dummy, &dummy, sizeof(dummy)); + memcpy(&dummy[0], &dummy[1], 1); mprotect(NULL, 0, 0); _rtld_get_stack_prot(); From nobody Sun Jul 7 23:47:25 2024 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 4WHP7L3Dzvz5QN8D; Sun, 07 Jul 2024 23:47:26 +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 4WHP7L0K0dz4gWb; Sun, 7 Jul 2024 23:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720396046; 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=mVKKmhjHX66I70+LMg3XOkzzmRAivPwgottr4ZI89Do=; b=EiBZzU5m/skMdMUEsVZcvkcwV06cUtUDLfcYUblAAHvN7saxbYWtKC2MVI08OKTszGh5yx D5GXm7p8AMYUIzBcPONBWl0tkMSWmhco7FSq33wcGxZ9HJG4X6rpHlycmdOjMWBgd6Zs7F v74GhzSI0Dvi63gf7oErH29qPqOwRp3Kdy6PQguOR7ltmInCEnTK17oisxTnD6Ksv7H7WB g6Uudd2fd1TNoA7uXmUVNkHHacvyP7L4pmWyRvltwsxKUAHiLqdl3BRCk1a8ewCxzjieS8 Cxzt0yNG8+jhMa5tL3uo2Lxb308MxDDboRknV1dSGe0ZhxXNgJO7Mh0oilGCvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720396046; a=rsa-sha256; cv=none; b=dAKN3fVnycUHUUbuxkyOhmzSv5A4fj6QV4GXohQ1Hdw0dnpHv6kUCymjRI1GVo8eqIdVKM 8/h5/5WxEGs1AaHvtZUhHMwt2ojFn83sKzFzXXhae5LlRrVsIg2nW92s84ikkXMsw6QNRP wtKEjB1hdW8PIskkfKXkI4igS2eockOKS1Kw907OaodYrmREnDP4MOI7wM7BlDwIfr22B0 RKodmavRv5OFHETF7RPwIitBPpH5MAJ3syxddS/bpwXI5t9CZ9NXbRGS1iDN321WyMhsmS CEPzvH6gf+Veez1IpHxV/qdRU/QgmeTVMbxb4GiGmD4wMAAuKyvBGQQ1UmQCXA== 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=1720396046; 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=mVKKmhjHX66I70+LMg3XOkzzmRAivPwgottr4ZI89Do=; b=YCBGhPPwmT0/xRaMmj+hKut6KoKqlzwr74GjkwP8z+AC6SqGQL52+d8ZtAHfuxgK1ZFEb+ fjk1P0x4IwF9piMIx6SsNEiudevTfoFd44NcgZyOrbQOxOq2PPJapciztA3PN8eFATF2sn T1VjPKAeXk1RAMRuPgTqUCZK5/FN2nMuQLwTtUbxC+DJM66rzAZeoD3HIGyw384Ivb23Nu 46KShau3UnCnhxFdasxMOAZZySvk/QVHlpbD3Lf03zYWr8OH2oWHje4UIT2IjmTCa+xu20 ZWu33pGX7s27JHMZ/XK8+N+yhe9+0p8KJqoBxRaHPhnkmQl1X6MVszd/oGg9Uw== 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 4WHP7K6n82zSR0; Sun, 7 Jul 2024 23:47:25 +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 467NlPhg002192; Sun, 7 Jul 2024 23:47:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 467NlP0r002189; Sun, 7 Jul 2024 23:47:25 GMT (envelope-from git) Date: Sun, 7 Jul 2024 23:47:25 GMT Message-Id: <202407072347.467NlP0r002189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 39bda097c037 - main - pci: propagate vpd read error 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39bda097c03780e26e6a25ff59a3e8e77c77563f Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=39bda097c03780e26e6a25ff59a3e8e77c77563f commit 39bda097c03780e26e6a25ff59a3e8e77c77563f Author: Ryan Libby AuthorDate: 2024-07-07 23:46:58 +0000 Commit: Ryan Libby CommitDate: 2024-07-07 23:46:58 +0000 pci: propagate vpd read error On read error, we would return -1, but not handle it, causing a zero size malloc of value, and then we wouldd unconditionally write value[-1 + 1] = '\0'. This should be harmless in terms of buffer overflow because we should get a minimum non-zero size allocation from malloc, but it also effectively swallowed the error. Reported by: GCC -Wstringop-overflow Reviewed by: kib, se Differential Revision: https://reviews.freebsd.org/D45895 --- sys/dev/pci/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 9661cfd19db7..171c6b710a32 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1190,7 +1190,7 @@ vpd_read_elem_data(struct vpd_readstate *vrs, char keyword[2], char **value, int int len; len = vpd_read_elem_head(vrs, keyword); - if (len > maxlen) + if (len < 0 || len > maxlen) return (-1); *value = vpd_read_value(vrs, len); @@ -1211,7 +1211,7 @@ vpd_fixup_cksum(struct vpd_readstate *vrs, char *rvstring, int len) } /* fetch one read-only element and return size of heading + data */ -static size_t +static int next_vpd_ro_elem(struct vpd_readstate *vrs, int maxsize) { struct pcicfg_vpd *vpd; @@ -1245,7 +1245,7 @@ next_vpd_ro_elem(struct vpd_readstate *vrs, int maxsize) } /* fetch one writable element and return size of heading + data */ -static size_t +static int next_vpd_rw_elem(struct vpd_readstate *vrs, int maxsize) { struct pcicfg_vpd *vpd;