All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Pingfan Liu <piliu@redhat.com>
Cc: kexec@lists.infradead.org, horms@verge.net.au, ardb@kernel.org,
	jeremy.linton@arm.com
Subject: Re: [PATCH 3/5] arm64: change the prototype of image probe function
Date: Fri, 5 May 2023 17:42:04 +0200	[thread overview]
Message-ID: <ZFUjzEwHZ6o+C9NO@kernel.org> (raw)
In-Reply-To: <20230505025438.11943-4-piliu@redhat.com>

On Fri, May 05, 2023 at 10:54:35AM +0800, Pingfan Liu wrote:
> Changing the aarch64 probe's prototype  from
> 	typedef int (probe_t)(const char *kernel_buf, off_t kernel_size);
> to
> 	typedef int (probe_t)(const char *kernel_buf, off_t kernel_size, struct kexec_info *info);
> 
> Later, info can be used to return both the file descriptor and parsed kernel
> buffer. The fd is passed to sys_kexec_file_load, and the parsed kernel
> buffer is used by image's load function.
> 
> Signed-off-by: Pingfan Liu <piliu@redhat.com>

Hi Pingfan,

I am seeing a build failure on ARM (32bit).

  138 | int zImage_arm_probe(const char *UNUSED(buf), off_t UNUSED(len))
      |     ^~~~~~~~~~~~~~~~
In file included from ../../kexec/arch/arm/kexec-zImage-arm.c:21:
../../kexec/arch/arm/kexec-arm.h:12:5: note: previous declaration of ‘zImage_arm_probe’ was here
   12 | int zImage_arm_probe(const char *buf, off_t len, struct kexec_info *info);
      |     ^~~~~~~~~~~~~~~~
make[1]: *** [Makefile:124: kexec/arch/arm/kexec-zImage-arm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/runner/work/kexec-tools/kexec-tools/kexec-tools-2.0.26.git/_build/sub'
make: *** [Makefile:276: distcheck] Error 2
Error: Process completed with exit code 2.

Link: https://github.com/horms/kexec-tools/actions/runs/4895124719/jobs/8740272103

...

> diff --git a/kexec/kexec.h b/kexec/kexec.h
> index 0d820ad..6e8430e 100644
> --- a/kexec/kexec.h
> +++ b/kexec/kexec.h
> @@ -191,7 +191,13 @@ unsigned long locate_hole(struct kexec_info *info,
>  	unsigned long hole_min, unsigned long hole_max,
>  	int hole_end);
>  
> +#ifndef __aarch64__
>  typedef int (probe_t)(const char *kernel_buf, off_t kernel_size);
> +#else
> +typedef int (probe_t)(const char *kern_fname, off_t kernel_size,
> +	struct kexec_info *info);
> +#endif
> +

This seems kind of unfortunate.
Could we update the prototype for all architectures?

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2023-05-05 15:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05  2:54 [PATCH 0/5] arm64: zboot support Pingfan Liu
2023-05-05  2:54 ` [PATCH 1/5] kexec: Adding missing free for kernel_buf Pingfan Liu
2023-05-05 15:32   ` Simon Horman
2023-05-05  2:54 ` [PATCH 2/5] arm64/zImage: Remove unnecessary allocation for kernel_uncompressed_buf Pingfan Liu
2023-05-05  2:54 ` [PATCH 3/5] arm64: change the prototype of image probe function Pingfan Liu
2023-05-05 15:42   ` Simon Horman [this message]
2023-05-06  3:14     ` Pingfan Liu
2023-05-05  2:54 ` [PATCH 4/5] arm64: Scatter the logic of reading of kernel file into each probe Pingfan Liu
2023-05-05  2:54 ` [PATCH 4/5] arm64: Scatter the " Pingfan Liu
2023-05-05 22:38 ` [PATCH 0/5] arm64: zboot support Jeremy Linton
2023-05-06  3:12   ` Pingfan Liu
2023-05-06  3:05 ` [PATCH 5/5] arm64: add support for zboot image Pingfan Liu
2023-05-12  3:10 ` [PATCH 0/5] arm64: zboot support Pingfan Liu

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=ZFUjzEwHZ6o+C9NO@kernel.org \
    --to=horms@kernel.org \
    --cc=ardb@kernel.org \
    --cc=horms@verge.net.au \
    --cc=jeremy.linton@arm.com \
    --cc=kexec@lists.infradead.org \
    --cc=piliu@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.