From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.formilux.org (mta1.formilux.org [51.159.59.229]) (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 C90AA29CB24 for ; Sun, 24 May 2026 04:25:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.159.59.229 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779596747; cv=none; b=mmFoB1dGaff/s5OkzmPMG/t4Dm3TaTX7huZ+vPXiGaWSuzy8GMYNE0zePaWLQ3JW01r9Mrxw+aVZNqhP84DSqG5CGOa5i5K+aj9/CgTDABEQ4iQHrrfXcVEN70DWWW/U30XUsFITLDWE+VfARQ+IgaT20Z8POxi00pCSxx48x/M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779596747; c=relaxed/simple; bh=pRwMC8zP8bnat1UyHNExE6WQkuDl7jEKpfbeV7B4wLM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OhZKRu9wEHfQDgnMjra5VKaDu1Dfc2UpjNrdnL8bA7AwZhEU7xgGxBxwAMrLWDFmsS/5zv7D+o29GxqGC6hSteOGob6ZhuepIgmJ1wkCUqBY/yh1uiKHfjP7ggLT0EQxGETz91mrmnGAl53wAhiZfSWumEL3cbzP1V8TGSOBmRM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu; spf=pass smtp.mailfrom=1wt.eu; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b=acthPoCo; arc=none smtp.client-ip=51.159.59.229 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=1wt.eu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b="acthPoCo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1wt.eu; s=mail; t=1779596738; bh=1OrXVXfuvaBmQy+rpyMqyuVeDuSTYcQmWwd/5T18yPQ=; h=From:Message-ID:From; b=acthPoCo+sHlW9UjND8LjbW3rBuLIVIC0f7WExk+I/8vgBKWloZjo5CLmv5S6y4Mu 7dGn01Po1X5UCWNOCY/2tyxNx2X18VJONp3NPDOKh6Zwo3QJfsapNkam0BDhOdUWl+ ju75wvtu2dqMyc6hNgLe0nhAE9DyO1E0FUsBlzAQ= Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by mta1.formilux.org (Postfix) with ESMTP id 0280DC096D; Sun, 24 May 2026 06:25:37 +0200 (CEST) Date: Sun, 24 May 2026 06:25:37 +0200 From: Willy Tarreau To: Daniel Palmer Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools/nolibc: stackprotector: Avoid stalling program startup if crng is not init yet Message-ID: References: <20260522090726.726985-1-daniel@thingy.jp> <40174437-57c6-49cb-b03a-b8842aa244b1@t-8ch.de> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Sat, May 23, 2026 at 07:29:53AM +0900, Daniel Palmer wrote: > Hi Thomas, > > On Fri, 22 May 2026 at 23:46, Thomas Weißschuh wrote: > > > > > Anyhow, I switched compilers for my nommu target and everything > > > > stopped working, tracked it down to this. my other compiler must > > > > have not supported the stack protector. > > > > Did the random pool *never* fully initialize? > > That sounds weird. > > The crng init message is eventually printed after a while if I > interact with the shell[0]. > Since my init, shell, everything is written with nolibc now there is > so little disk activity etc I don't think there are enough interrupts > happening to collect any randomness. Yeah I've known this problem as well for years on small headless systems that never finish to boot if you ever called getrandom(), before GRND_INSECURE existed. Several of us used to patch it not to wait or used to change boot code not to call this function. > Maybe something to save some seeding data between boots is the next > tool I need to write. Since modern kernels support GRND_INSECURE, I suspect you would just be wasting your time. Better rely on this for boot code. Willy