From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 529C71E5B68 for ; Fri, 2 Jan 2026 22:54:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767394449; cv=none; b=e33cyIU4bwwIDVU+IweXk1se1PiuTkphghHU2I+ilH6+FySSpqYWxJGfKQ57LD3rVYM22aWUpPB/1LzMifqeldGaDedAqw/IPb83aUl/45nExfagN7jNQoexvyE6OlmaBg2gUB5LiZvEAeGtxI247YNojG0rKXz+7pIRI5qGo1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767394449; c=relaxed/simple; bh=kPMxx2R7Gx5ZxYwa7SRt+S3sFaD5KMccJKMZB0MZviE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fA29PwsGDdcsCSHXgzsjlx4bOUJ9BSpEioVNXUKq3exGdWxDKr/BZ0qyo9tA+3IMKFIa5oD2y4hcoAKEQz0KAcus9OOQwYUs3xO8kkU3PSTkL+s6y0ZqNBxduTLjMCgqrjk6mCd7HPl/+s8EhEfyHXj/BsAev5KlwIIgwPQuhpY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SYXCMywc; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SYXCMywc" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-430f57cd471so5855748f8f.0 for ; Fri, 02 Jan 2026 14:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767394446; x=1767999246; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=StGZh5UIhFdeUEf/ngmSy2NSY5Z+LAPTFt5BciOr9oI=; b=SYXCMywc3jtTL3eeoySGXWzOryGNIh716Yk2bb5NqvXUeaI0YVh7snV0fnf7BsuMOa PIDk0tLAD/eNgqSMUAfaEYm6bsGmlCYPJ4SAP7mTO5V2ihUnjtY0paWhTe5U7mzXQGOF NXEO87yUbnAAxGQBEhwheV5eHqRRan5hrOmPSvYBaa6Zdyp1r1YfLjYOuR4x1j+yZh/h jzmvLp0XizDEgpnSmob3rsXlXJnnIaojUNjILlYXZq2Xbv990ROsc/xZEmRc733xZj3Z +IZHI69tinmTsmuc6iIiX48zrFX4tuN4Xe+UG4HvVwjsp5JWOQVZGscpJTZ23SeejvmI jL4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767394446; x=1767999246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=StGZh5UIhFdeUEf/ngmSy2NSY5Z+LAPTFt5BciOr9oI=; b=bKf5kXxAvRGCWT3LZun2cDLeivD/44O71AyyUUdUjK16nS43GpkQotSLVnLK2xKmjx WqEFOixh2vf94IZyCpAXMA3H+l09b66nEmjNJjDU/Q/L1tyzFzhZcUnXNhQgWnhXmnxh Ou4ceO1pOI+2iA36cFwRTv99cBtH5g5r8gmhtPB6eBoD47CRjVt2lnu4NLFJ1r7MWoaX FNw7hm6eytbWMZnh+ebqQezpfI8lnKBTWmLmTMAwG55Oe05Y7a9waRFG8n8hBOnXstka aAslZH5DZWTmg5RujZpmd4yoI5txb8NMc4kS7uSA0RAnhFKplYQfWe6EmmJ+a7ofccWN ZrIg== X-Forwarded-Encrypted: i=1; AJvYcCV48eIa5MGnOZtZpdaU+87Stf5qS7xrNfhbT9ROqa/442aAY+avTSblnqZGf8KXc35xzLWoAAYhZnDzMSQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3BldMbSslNY/GtHmsw5Rp0U0qsCkYv/R6nUn6NJUsxQ4bcafb JriHpYLXgAwAYl5YZab1PSln+8uTD1Jj4bAnCvv++xOAjz/qgbMrBI6A X-Gm-Gg: AY/fxX7uGnzqJpLJVWRhtX1Xlc0XR5e5ZTKwcoIka0GSSBWzQxCMMFm+T+D6HaVVNyc jyiqc+bHd7MKZJC6rTToDhjbaBoynTkO3f+cnRlb1fADDJ6eceOV6mn8Akb27QXq2JL0wSZ0dEO b44TdLPnzVQFxuSzcA/UYXdSoeGYmDYVYM3gi3W16EuYidDnxcSRHbZkhXayeCvXbsmVuH/dhwD F0QRQSZsr/xmVJEUyGtCSdqjXHAZIGFNqOtVObmnO141tsNeIgXqIH3ZKVqHvyRXx+jNr5kjF+V Jmh6SzZcX0IJOOWb4b8L1D2CPNorQTQUaCiFQ28/n9k/FmBd5IC8vZorBleXwuxT8hwlDyIgvGu LnthqUzB3qqdrOcrBUFYL52o6Kot6hToY1ZmMQH1BhR0VMmpW+z/0WM5PBV5nazsetrYUGoVwDM 4fe/ekqV/0NglwDRmX961I7w+Re8WBFBgJhe47+OWu9gJvosnqmYJ4 X-Google-Smtp-Source: AGHT+IHhZlcstoHojBz97OFk5owjy0cbb1cp4fYnQEbcnWo+WUycqSneA9mdGDNlnSrZ5xQclO2tXg== X-Received: by 2002:a5d:5392:0:b0:42f:edb6:3642 with SMTP id ffacd0b85a97d-4324e704c03mr44422531f8f.60.1767394445433; Fri, 02 Jan 2026 14:54:05 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eab2ebfsm86000586f8f.40.2026.01.02.14.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jan 2026 14:54:05 -0800 (PST) Date: Fri, 2 Jan 2026 22:54:03 +0000 From: David Laight To: "Jason A. Donenfeld" Cc: Ryan Roberts , Catalin Marinas , Will Deacon , Huacai Chen , Madhavan Srinivasan , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Kees Cook , "Gustavo A. R. Silva" , Arnd Bergmann , Mark Rutland , Ard Biesheuvel , Jeremy Linton , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v3 2/3] prandom: Convert prandom_u32_state() to __always_inline Message-ID: <20260102225403.78e26214@pumpkin> In-Reply-To: References: <20260102131156.3265118-1-ryan.roberts@arm.com> <20260102131156.3265118-3-ryan.roberts@arm.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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-Transfer-Encoding: 7bit On Fri, 2 Jan 2026 14:39:21 +0100 "Jason A. Donenfeld" wrote: > Hi Ryan, ... > > +static __always_inline u32 prandom_u32_state(struct rnd_state *state) > > Why not just normal `inline`? Is gcc disagreeing with the inlinability > of this function? gcc has a mind of its own when it comes to inlining. If there weren't some massive functions marked 'inline' that should never really be inlined then making 'inline' '__always_inline' would make sense. But first an audit would be needed. (This has come up several times in the past.) But if you need a function to be inlined (for any reason) it needs to be always_inline. Whether there should be an non-inlined 'option' here is another matter. There could be a normal function that calls the inlined version. David > > Jason >