public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Kit Dallege <xaum.io@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] kexec: add missing kernel-doc parameters for ELF loading functions
Date: Mon, 16 Mar 2026 13:58:06 +0800	[thread overview]
Message-ID: <abeb7qDkOnmsFMOB@fedora> (raw)
In-Reply-To: <20260315171011.66068-1-xaum.io@gmail.com>

On 03/15/26 at 06:10pm, Kit Dallege wrote:
> 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:claude-opus-4-6


> Signed-off-by: Kit Dallege <xaum.io@gmail.com>

Is this Claude-opus produced patch checked by people? There's no
changelog in this v2, I don't know what's improved since v1. Is it
created automatically?

> ---
>  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-16  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-15 17:10 [PATCH v2] kexec: add missing kernel-doc parameters for ELF loading functions Kit Dallege
2026-03-16  5:58 ` Baoquan He [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=abeb7qDkOnmsFMOB@fedora \
    --to=bhe@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xaum.io@gmail.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