mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Can Peng <pengcan@kylinos.cn>
Cc: davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] crypto: fips: annotate fips_enable() with __init to free init memory after boot
Date: Fri, 19 Dec 2025 15:07:44 +0800	[thread overview]
Message-ID: <aUT5wK9AXAzFvIy3@gondor.apana.org.au> (raw)
In-Reply-To: <20251208095010.2712698-1-pengcan@kylinos.cn>

On Mon, Dec 08, 2025 at 05:50:10PM +0800, Can Peng wrote:
> The fips_enable() function is only invoked early during kernel boot via the
> __setup() macro ("fips=" command line parameter), and is never used again
> after initialization completes.
> 
> Annotating it with __init places the function in the .init.text section,
> allowing the kernel to free its memory after init (when freeing_initmem()
> runs), reducing runtime memory footprint.
> 
> This is a standard practice for setup/early-parse functions and has no
> functional impact — the parsing logic, return values, and fips mode
> setting behavior remain unchanged.
> 
> Signed-off-by: Can Peng <pengcan@kylinos.cn>
> ---
>  crypto/fips.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2025-12-19  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08  9:50 Can Peng
2025-12-19  7:07 ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aUT5wK9AXAzFvIy3@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pengcan@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®