Article View: linux.kernel.netdev
Article #2724Re: [PATCH net-next] calipso: hash the cache key, not the option start, in calipso_cache_add()
From: patchwork-bot+netdevbpf
Date: Tue, 13 Oct 2026 10:10
Date: Tue, 13 Oct 2026 10:10
28 lines
6585 bytes
6585 bytes
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Wed, 07 Oct 2026 12:25:00 -0300 you wrote:
> calipso_cache_add() stores calipso_ptr + 2 as the cache key, but
> computes entry->hash over calipso_ptr, i.e. starting two bytes earlier
> at the option type and length. calipso_opt_getattr() looks entries up
> with calipso_cache_check(calipso + 2, calipso[1], ...), which hashes the
> key itself.
>
> The two hashes only match on a jhash collision, so the CALIPSO label
> cache never hits and every labelled packet takes the full DOI lookup and
> category conversion path. The memcmp() on the key keeps lookups
> correct, so this is a performance bug only.
>
> [...]
Here is the summary with links:
- [net-next] calipso: hash the cache key, not the option start, in calipso_cache_add()
https://git.kernel.org/netdev/net-next/c/d538cc3ec0bc
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Technical Details
Message-ID:
<179188620452.191181.12068195457732970673.git-patchwork-notify@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345535-linux-kernel-netdev=dewy.ruReferences:
<179138670045.80227.16155454353416856947@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345535-linux-kernel-netdev=dewy.ru From: patchwork-bot+netdevbpf@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next] calipso: hash the cache key, not the option start, in calipso_cache_add() Date: Tue, 13 Oct 2026 10:10:04 +0000 Organization: Usenet Network Message-ID: <179188620452.191181.12068195457732970673.git-patchwork-notify@kernel.org> References: <179138670045.80227.16155454353416856947@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2025569"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Cz1pzOU2YxuJkjpj3JogKtDebLo= sha256:SouNFu6KglWqTQXFb3ySZoeH/dAZwternHO/T2I5WA0= sha1:9h7ZjQYv6PBxfb6ee+sFbKQp6lo= sha256:5Z6XIYrKr/OgJY1gPtsxG/vZW2Q88pDilN4IA66vlnA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id C811C10FDFB; Tue, 13 Oct 2026 13:35:56 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.34 X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7FzeNMu6yMXs; Tue, 13 Oct 2026 13:35:53 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-345535-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 6155910FDF5; Tue, 13 Oct 2026 13:35:44 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 3724AA3B77; Tue, 13 Oct 2026 10:10:35 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C0A43E8338; Tue, 13 Oct 2026 10:10:07 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PYpD2m2W" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3CE763A83B1; Tue, 13 Oct 2026 10:10:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791886207; cv=none; b=Nkni5FyGel6ZDcNNtkbmq0ZBd32Ds4AyV2KE4Mh+h7rCWH89ZVhQL1ViIveUnjN9pV1D7/iDgTFY4/z3xefAHPcPh7zvsPMsqcxvHUD7AHsl+HrdeNlGtcla4R8z2BACXutmWT48WsBohLLVdbO86jA1FDISTOjXZ3+bl/J+Wbs= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791886207; c=relaxed/simple; bh=xp+PgL5DDnyHx+ebR4oX4SVhOdKUA4bH8GqZTXmBCC4=; h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; b=QTdB7tTqmYZF0lNhTzE14GK3mJbjiP2W41NZurKK8Z/4/D7XZ4ux44dkZHIHTDnTil6bxAmJUaJlTwwyNm7BGJ8nUai19UcswG7XPcfOokUMTB77BsCvqmNN2TFpKJ/tP9V2iBA9UY332i7IMEGihQT5Sa7oFduL+eCPgTZxNhM= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PYpD2m2W; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDEE61F000FF; Tue, 13 Oct 2026 10:10:05 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791886205; bh=5sgeYGqUn15szmOLtnTRbionXGUFCUv4tj8tz96K9lY=; h=Subject:From:Date:References:In-Reply-To:To:Cc; b=PYpD2m2WaUC1FEEA+nXsFJxmuYvR2LW/+4YkJQQTrUXOTqeoqaM2L08NRRbNn+d81 ChJg54xkk9aK0DoVvgUGIpzuuV21l225kbZyfQIqFXxEhW/Y74NvQxSrw4UxfFPNFO 1b6EZ33Q/VJp6+AhfhRMyqc55tLTOMKBNeytSYUA0BUj2gj+Dezhj1aNgm/iWnIXOF AytS35OwtSx2TInq/udRC9yHoYC/nlhoy2Ul1u5DF48quorVj12zAhJWA+GuZEb97Y ZRuZ2une0lk1nvujSGKY3rOLGRlA57hC7SC2CbUysBCvt0GPnHFBoKdUqw9A1oKDpW KnYDFcl4u1bbA== X-Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id B44383926662; Tue, 13 Oct 2026 10:10:05 +0000 (UTC) X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <179138670045.80227.16155454353416856947@gmail.com> X-Cc: paul@paul-moore.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org, linux-security-module@vger.kernel.org