public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Kit Dallege <xaum.io@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>, Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	Kit Dallege <xaum.io@gmail.com>, Claude <noreply@anthropic.com>
Subject: [PATCH] kexec: add missing kernel-doc parameters for ELF loading functions
Date: Sun, 15 Mar 2026 16:38:08 +0100	[thread overview]
Message-ID: <20260315153808.49218-1-xaum.io@gmail.com> (raw)

Document all missing parameters across 6 functions in kexec_elf.c:
elf_is_ehdr_sane(), elf_is_phdr_sane(), elf_read_phdrs(),
kexec_free_elf_info(), kexec_build_elf_info(), and kexec_elf_load().

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Kit Dallege <xaum.io@gmail.com>
---
 kernel/kexec_elf.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c
index 3a5c25b2adc9..48f7c0677e87 100644
--- a/kernel/kexec_elf.c
+++ b/kernel/kexec_elf.c
@@ -58,6 +58,7 @@ static uint16_t elf16_to_cpu(const struct elfhdr *ehdr, uint16_t value)
 
 /**
  * elf_is_ehdr_sane - check that it is safe to use the ELF header
+ * @ehdr:	pointer to the ELF header to check.
  * @buf_len:	size of the buffer in which the ELF file is loaded.
  */
 static bool elf_is_ehdr_sane(const struct elfhdr *ehdr, size_t buf_len)
@@ -180,6 +181,7 @@ static int elf_read_ehdr(const char *buf, size_t len, struct elfhdr *ehdr)
 
 /**
  * elf_is_phdr_sane - check that it is safe to use the program header
+ * @phdr:	pointer to the ELF program header to check.
  * @buf_len:	size of the buffer in which the ELF file is loaded.
  */
 static bool elf_is_phdr_sane(const struct elf_phdr *phdr, size_t buf_len)
@@ -244,6 +246,9 @@ static int elf_read_phdr(const char *buf, size_t len,
 
 /**
  * elf_read_phdrs - read the program headers from the buffer
+ * @buf:	buffer to read ELF file from.
+ * @len:	size of @buf.
+ * @elf_info:	pointer to existing struct which will be populated.
  *
  * This function assumes that the program header table was checked for sanity.
  * Use elf_is_ehdr_sane() if it wasn't.
@@ -315,6 +320,7 @@ static int elf_read_from_buffer(const char *buf, size_t len,
 
 /**
  * kexec_free_elf_info - free memory allocated by elf_read_from_buffer
+ * @elf_info:	ELF info struct to free.
  */
 void kexec_free_elf_info(struct kexec_elf_info *elf_info)
 {
@@ -323,6 +329,10 @@ void kexec_free_elf_info(struct kexec_elf_info *elf_info)
 }
 /**
  * kexec_build_elf_info - read ELF executable and check that we can use it
+ * @buf:	buffer to read ELF file from.
+ * @len:	size of @buf.
+ * @ehdr:	pointer to existing struct which will be populated.
+ * @elf_info:	pointer to existing struct which will be populated.
  */
 int kexec_build_elf_info(const char *buf, size_t len, struct elfhdr *ehdr,
 			       struct kexec_elf_info *elf_info)
@@ -379,7 +389,11 @@ int kexec_elf_probe(const char *buf, unsigned long len)
 
 /**
  * kexec_elf_load - load ELF executable image
- * @lowest_load_addr:	On return, will be the address where the first PT_LOAD
+ * @image:		pointer to the kexec image being loaded.
+ * @ehdr:		pointer to the ELF header of the executable.
+ * @elf_info:		pointer to the ELF info struct with program headers.
+ * @kbuf:		pointer to the kexec buffer used for segment loading.
+ * @lowest_load_addr:	on return, will be the address where the first PT_LOAD
  *			section will be loaded in memory.
  *
  * Return:
-- 
2.53.0



                 reply	other threads:[~2026-03-15 15:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260315153808.49218-1-xaum.io@gmail.com \
    --to=xaum.io@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noreply@anthropic.com \
    /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