From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796502926; b=T3hX7cj62tE4ISzkKzGH85plVQd3KgdUk6BI5p0WroqENV/Mxr4pHjpEPn2KX2QHElPx 9Sl1Q/wfPl1CAkUd1e8zoQcJlgfwhw9d+izP+oc9TNvFkuWBESN/QhS1rRTsudmC+NekF LTQ1DsSnAnz1KXA1demwwvL9k+CZDXeit9TYfXfiyf4EjRqeMfeiiejLPxhrujm9Ty0qK ce2tTEe7WoVEjdeIiqyhL0HoG6F4bL61sXk6z+tlyu7o5ZgkJOO1Mur23KKU4bWlTq+xy cszPluLOacJyPjCR0rJn/SmD8/c9d7j5VKY6I09tPtuqyw+LOZzdfD6Gk6WumuzXClQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796502926; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type; bh=rqHR8rjYD5qypifDvT1ADJ3XR2hgEepwZLTTccd+dLA=; b=5NCfIE/VTRaSFcOSHc7ISDLDEeWSjJNGK8fUwq/L9UPqvu1P/51c8tzue2Oe9AivS0Uv hhO+IWcrbcVP/To76vAHUCGP/lSXiJnEHt1M+Vl/7JVE4+Tfywow8dVTAKsvyfeC6vk2j YM2MA5/V1tDshZqk2wgMUuTEIBzqTOZN4MAKSiuMY6wSIS7pZEby6K0S8tE4KnooF2NSq HY0j7NXLrpaNP6AwIwLsRV4b1JShoaR//tUNlaq+gGVhvtj+xXbGouxzpTEbd4LvjIzl1 dd1pT2LahaySe03HP9UzZTNVTh0gw7TRk9zObSpZWCn3bJQpUSwoRWWK4S1id/N/kPA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WRa1UR6x; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37F19606A31F; Sat, 5 Dec 2026 20:35:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WRa1UR6x Received: by smtp.kernel.org (Postfix) with ESMTPSA id 104041F0092B; Sat, 5 Dec 2026 20:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796502925; bh=rqHR8rjYD5qypifDvT1ADJ3XR2hgEepwZLTTccd+dLA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=WRa1UR6xFG0nwEnNwu0okHrZQOEwgvoqx5BZP1WGblpsmTQg7FQQxudqLCOgDRf7V htc7cVi9K4e0PP7bZdRxsOHSDIePp1+viYye2STdJxAOW3jWT2/nehA1H5FOXUmM5J 43BUZBiyqnLZbATS/v4Bec0LZmjzSdgEvrCLE41kSUc8tPMLl8qVkMmHCrkWy69w3P JNFfnTk1JG3229tuiZD5zyZ6XdIPn0+7MfmGTQwdQFHUCBkCkTtN3n+8WN9YikvLy+ Msge1OFt3WGjoIGbUj5aoWvA6Oh6cOU/HRvvw1MLrwpjUw7MU6vRlnwiflS00x8UYV QQ0FlOyc7kxqw== From: Thomas Gleixner To: Kyle Zeng , kernel test robot Cc: oe-lkp@lists.linux.dev, lkp@intel.com, Lukas Maar , linux-kernel@vger.kernel.org, mingo@redhat.com, outbounddisclosures@openai.com Subject: Re: [PATCH v2] futex: Use a keyed hash for global futex buckets In-Reply-To: References: <20261019183334.29433-1-kylebot@openai.com> <202611050816.9e42490c-lkp@intel.com> Date: Sat, 05 Dec 2026 21:35:22 +0100 Message-ID: <87qzfvlb3p.ffs@fw13> X-Mailing-List: oe-lkp@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain On Fri, Nov 06 2026 at 10:19, Kyle Zeng wrote: > On Thu, Nov 05, 2026 at 09:04:47AM +0800, kernel test robot wrote: >> 0fcb05b723 ("Merge tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux") >> c44a057178 ("[PATCH v2] futex: Use a keyed hash for global futex buckets") >> >> 0fcb05b72344f408 c44a057178cbedbc04c63404258 >> ---------------- --------------------------- >> %stddev %change %stddev >> \ | \ >> 7.026e+08 -6.0% 6.607e+08 will-it-scale.224.threads >> 3136755 -6.0% 2949754 will-it-scale.per_thread_ops >> 7.026e+08 -6.0% 6.607e+08 will-it-scale.workload > > I wonder what is the best way to run this above regression test and what The answer is in the quoted text to which you replied to: >> The kernel config and materials to reproduce are available at: >> https://download.01.org/0day-ci/archive/20261105/202611050816.9e42490c-lkp@intel.com No? > will be an acceptable threshold for the patch to be merged. > I'd like to iterate on the patch, fixing the issue while avoiding the > the performance regression. You might try the following: futex_init() { ... get_random_bytes(&futex_hash_key, sizeof(futex_hash_key)); ... } struct futex_hash_bucket **futex_queues(void) { ... u32 hash_key = (*(u32 *)key) ^ futex_hash_key); hash = jhash2(&hask_key, offsetof(typeof(*key), both.offset) / sizeof(u32), key->both.offset); ... ) or something like that, which would remove the compile time constant from the hash function while at the same time preserving the performance. I know that's not the same in a cryptographic sense, but it might be sufficient to remove the initial threat you are looking at. Because your proposed solution is also prone to the collision checking approach because it's just a matter of effort to decode the extra inconveniance of the boot time established siphash seed value, no? Thanks, tglx