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 D9BD727BF93 for ; Mon, 24 Nov 2025 14:36:30 +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=1763994990; cv=none; b=T/tObJwoTk66H6qvH6vINvXxygd+w5y90coTK1ZC9RhET5s+9L5ui28ztY1/WNrcDYQHNQfpuDXpdnoM9jxy6axJkHq4JRLUWjsr3HDsbrjNmiHzcYoRLAVT0NTYMIbZS6LLj/AwhM2ovxMWTtzYJRIDMm30bleW3sYeBLG1VJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763994990; c=relaxed/simple; bh=jv+kHE0CbbAmhUFnnaX4NXCqihvcaq32PQYDP3CMyI0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AiKtyZNH718u1TqssJSwmnOubr0YGKH/LFPVeR5wEGI1UWxxCTixnoy59siQLXsCnjZWT5HoxYLhTZjkJtlU+9173y96dE8lP3BwBabr7asjhjzgAYXueaXrmas4ZcfbC9DwxD7c/xT3QZTY0KgsIyfCeVY7fwxhuzdYsqE6si4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Lxfjr2T7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lxfjr2T7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A146C4CEF1; Mon, 24 Nov 2025 14:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763994990; bh=jv+kHE0CbbAmhUFnnaX4NXCqihvcaq32PQYDP3CMyI0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Lxfjr2T72UKaCpHYIhwm/V7poM7aGoLcwcP7CVLX2+F8oba3UvBNF/pqTl9RnpiFW W0aWtEGve2b/7c9356hgf5jdkxNNgQDw1VbY02GqGQUBNkKWKLLQ2NWbp/a7Ajmiby h63E/JG5HZP2jcANq5iqaMMToz4bIMnGBc/ygNq08beHtpZfmgL2MlaUQ3pNAV1Whh DiIc+t8kIm6boix6bpi5vQ1ME1sUweNx1g83nDvMlbtA6Bk962XrwuLfvFaSdqAkfM s9jqTjY4/7ntF1qbw42HQ+PkHSOZrJZkBLIOpvpqNUudmXvKg+rVJ8/I/8fRRdmF0o 2jtcxdw3YAQHA== Date: Mon, 24 Nov 2025 14:36:25 +0000 From: Will Deacon To: Ryan Roberts Cc: Kees Cook , Arnd Bergmann , Ard Biesheuvel , Jeremy Linton , Catalin Marinas , Mark Rutland , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List Subject: Re: [DISCUSSION] kstack offset randomization: bugs and performance Message-ID: References: <66c4e2a0-c7fb-46c2-acce-8a040a71cd8e@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Nov 17, 2025 at 11:31:22AM +0000, Ryan Roberts wrote: > On 17/11/2025 11:30, Ryan Roberts wrote: > > Could this give us a middle ground between strong-crng and > > weak-timestamp-counter? Perhaps the main issue is that we need to store the > > secret key for a long period? > > > > > > Anyway, I plan to work up a series with the bugfixes and performance > > improvements. I'll add the siphash approach as an experimental addition and get > > some more detailed numbers for all the options. But wanted to raise it all here > > first to get any early feedback. FWIW, I share Mark's concerns about using a counter for this. Given that the feature currently appears to be both slow _and_ broken I'd vote for either removing it or switching over to per-thread offsets as a first step. We already have a per-task stack canary with CONFIG_STACKPROTECTOR_PER_TASK so I don't understand the reluctance to do something similar here. Speeding up the crypto feels like something that could happen separately. Will