From nobody Fri Jul 31 11:30:16 2026 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 4hBP4s5yLxz6mZ4X for ; Fri, 31 Jul 2026 11:30: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hBP4s3SHJz49KR for ; Fri, 31 Jul 2026 11:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785497421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EDHADqrOUM+gZ23heR0E1U7DSq7WdqDFXia9jKUXo6M=; b=Na3GQ0xlueO2cHJKWd4R/xv8KW8zJ2PkCQyLeNiAPCpJiSqDbWczu9Z3sSCVgeTRXXM3g1 TG1E+CoQtW9BUGeWUn4BRRMZ6av8zeP6Lr7N6hJySb9b86p+g7h4L1AZ4QTpq8TQOOk+SO fKK8QIqTse9V6ZD2cCTo/dvLdwv4f+Q+ZMDKrXp1VmgjMOdVJQQ2HYSCF+eBJeXkFAgtFd H8SVUS2hPAYO60fv9KZo+V3B2A2Soike/7HQ4gxim5zBMnT4eZrzRkvN9KPirkDMxFLl95 gpPNVfOsE0zpZ458RAbgSAmnFNasUTLPpuQc6unHP9DdcRi71oFyy9PP02ly1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785497421; a=rsa-sha256; cv=none; b=Q83Z9EM4j4D3qU7cM+XiRX+sNDfOyLwPxpOwuhdOltMCuBj2TqbsQ6AmZIazw0yLVFtqzJ 3I9rK/m0oNOHOHd8htdk7xPadkUaN2QVw99yRimMuGU8MbeJ7vCA8qFl+cuyqd3KNetGm1 v8Cc/kDVXUxOT7XWMQRzxdI/WQ9h6odv7TwZ2SoHTQd5BHi7zHrVRhpB6upoHGGO3GkId2 T+c57ICGT4mNCPHO+8IYIOx3DcnRYi/7UcuV0mH2bO/ts+Q+6P5Ywc3CkG4Vmb1JOIYALy /34ej+hix+D0AywexJkcSMWh6aODbBFVNLLMiC2JWOONMGHTox9o7/pQrxjAGQ== 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=1785497421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EDHADqrOUM+gZ23heR0E1U7DSq7WdqDFXia9jKUXo6M=; b=n0iPVR7YBiv1BB7PaZ3V5bmvis53O0XUuQAYSHRtcrvOUIn9xq9bi9t8cFESaY0vvjI307 vNyV+T5joJ5vRhXInVNEQeuKjvo8JriGmvuGYxD5cqs9EgJyd8XBTgOpA0nK9OHJQXuk5Z On6FaOtiW3t9nodfmNUH3L3i8BT79Lxy6DKR9RXzgw4T4rk/j/luKfLkdYfoOCHXlxeDud q4U5NH4F+U8bq3HGbSJyqd4E4R7MAPTgARjTCXsXjHq/gIr1JHfHSvTGeWyTNcGvp5iwXI 9S+vsolMLYbzXOsX7zdKrPELaorYVE4ER8biRHa3MFjkKEn2CXKUi2luP2EEdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hBP4s2471zxFD for ; Fri, 31 Jul 2026 11:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d8ff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 31 Jul 2026 11:30:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 35374c3ec69a - main - ixgbe: avoid signed overflow in pause time calculation 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35374c3ec69aa87561431e6236706c485bdeeacc Auto-Submitted: auto-generated Date: Fri, 31 Jul 2026 11:30:16 +0000 Message-Id: <6a6c8748.3d8ff.7ba7364f@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=35374c3ec69aa87561431e6236706c485bdeeacc commit 35374c3ec69aa87561431e6236706c485bdeeacc Author: Kevin Bowling AuthorDate: 2026-07-28 11:10:09 +0000 Commit: Kevin Bowling CommitDate: 2026-07-31 11:29:53 +0000 ixgbe: avoid signed overflow in pause time calculation pause_time is promoted to signed int before multiplication. Its default value of 65535 multiplied by 65537 exceeds INT_MAX and triggers UBSAN, even though the result is assigned to a u32. Make the multiplier unsigned so the calculation has the intended u32 semantics. Linux commit 3b70683fc4d6 reported the failure in the generic path and used the same mechanical correction. The 82598-specific flow control operation contains the identical expression, so correct it as well. MFC after: 1 week --- sys/dev/ixgbe/ixgbe_82598.c | 2 +- sys/dev/ixgbe/ixgbe_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82598.c b/sys/dev/ixgbe/ixgbe_82598.c index e32fdb8f039c..f27f263dd07f 100644 --- a/sys/dev/ixgbe/ixgbe_82598.c +++ b/sys/dev/ixgbe/ixgbe_82598.c @@ -535,7 +535,7 @@ s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw) } /* Configure pause time (2 TCs per register) */ - reg = hw->fc.pause_time * 0x00010001; + reg = hw->fc.pause_time * 0x00010001U; for (i = 0; i < (IXGBE_DCB_MAX_TRAFFIC_CLASS / 2); i++) IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), reg); diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index a8676c731711..0b6bf728f25e 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -2932,7 +2932,7 @@ s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw) } /* Configure pause time (2 TCs per register) */ - reg = hw->fc.pause_time * 0x00010001; + reg = hw->fc.pause_time * 0x00010001U; for (i = 0; i < (IXGBE_DCB_MAX_TRAFFIC_CLASS / 2); i++) IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), reg);