From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D240F2517AC; Wed, 28 Jan 2026 15:27:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769614068; cv=none; b=kLLFr1EtIqgfyYhKFznQtAeLtkNPLEaIpCmdmpAA0BoKi4karptZxDnY+naf3Ojixzybl2Uq1qJmuBySkSW0fnh3JN63xfObLXfrVBaoKgIwcyB6Ys85/g7uHnMHo4r4JqDLdyhtFT2q7jaq9CgDJJimO+3nfGR1pkcLFeh/Pq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769614068; c=relaxed/simple; bh=xETikN5Dc3PhNjUzxP4g2FfXIOqW5wefrDUsJuJjy5s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ta1LXFIcICq0FGl8kAzjDGrpAlvQtOJk16TmaX6aKcvCH3caSIyGqxWH+q6Ktt8StdAeZsHJ774i6FvSgM70w0bk8VAM3y7CdBBLLXjpVeZUXcBJsQKsapevGSzByX3na/+NMuLvvPEBNxmTh1yU2nSHEER2izJ5YHg6iOWMQ2E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sqpeLJs8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sqpeLJs8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7F7BC4CEF7; Wed, 28 Jan 2026 15:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769614068; bh=xETikN5Dc3PhNjUzxP4g2FfXIOqW5wefrDUsJuJjy5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sqpeLJs84+ky3I4D4V8misvweMMUfYnwvS/CFdtX3z6KbDHPk7XUVhiG75RFnVRhv zq/acdznHR0U1yuxDpwemBm5fSsHBEnUkizc5w0MJLyI9O/rAwsb3t8AtWqKMlu1aH AOM3+nKehFXfW/z057XTuQMrd52gXIYZXM7DW1no= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nimrod Oren , Gal Pressman , Willem de Bruijn , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 026/254] selftests: drv-net: fix RPS mask handling for high CPU numbers Date: Wed, 28 Jan 2026 16:20:02 +0100 Message-ID: <20260128145345.645019070@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260128145344.698118637@linuxfoundation.org> References: <20260128145344.698118637@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gal Pressman [ Upstream commit cf055f8c000445aa688c53a706ef4f580818eedb ] The RPS bitmask bounds check uses ~(RPS_MAX_CPUS - 1) which equals ~15 = 0xfff0, only allowing CPUs 0-3. Change the mask to ~((1UL << RPS_MAX_CPUS) - 1) = ~0xffff to allow CPUs 0-15. Fixes: 5ebfb4cc3048 ("selftests/net: toeplitz test") Reviewed-by: Nimrod Oren Signed-off-by: Gal Pressman Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260112173715.384843-3-gal@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- tools/testing/selftests/net/toeplitz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/toeplitz.c b/tools/testing/selftests/net/toeplitz.c index 9ba03164d73a6..5099157f01b9a 100644 --- a/tools/testing/selftests/net/toeplitz.c +++ b/tools/testing/selftests/net/toeplitz.c @@ -473,8 +473,8 @@ static void parse_rps_bitmap(const char *arg) bitmap = strtoul(arg, NULL, 0); - if (bitmap & ~(RPS_MAX_CPUS - 1)) - error(1, 0, "rps bitmap 0x%lx out of bounds 0..%lu", + if (bitmap & ~((1UL << RPS_MAX_CPUS) - 1)) + error(1, 0, "rps bitmap 0x%lx out of bounds, max cpu %lu", bitmap, RPS_MAX_CPUS - 1); for (i = 0; i < RPS_MAX_CPUS; i++) -- 2.51.0