From: Vivek Goyal <vgoyal@redhat.com>
To: dyoung@redhat.com
Cc: jwboyer@fedoraproject.org, tytso@mit.edu,
kexec@lists.infradead.org, ptesarik@suse.cz,
linux-kernel@vger.kernel.org, dhowells@redhat.com,
geert@linux-m68k.org, ebiederm@xmission.com,
akpm@linux-foundation.org
Subject: Re: [PATCH V2 2/2] kexec: split kexec_load syscall from kexec core code
Date: Tue, 21 Jul 2015 09:03:08 -0400 [thread overview]
Message-ID: <20150721130308.GB5053@redhat.com> (raw)
In-Reply-To: <20150720084558.645442047@redhat.com>
On Mon, Jul 20, 2015 at 04:37:15PM +0800, dyoung@redhat.com wrote:
> Now there's two kexec load syscall, one is kexec_load another is
> kexec_file_load, kexec_file_load has been splited as kernel/kexec_file.c.
> In this patch I split kexec_load syscall code to kernel/kexec.c.
Hi Dave,
Nice work. Thanks for doing this. I have couple of minor comments.
- We might have to audit kernel/kexec_core.c. I think there are some
functions in there which are used by only old syscall and not the new
one. All that code should be in kernel/kexec.c. Only the code which is
shared between two syscalls should be in kernel/kexec_core.c.
For example, I think kimage_alloc_init() is used by old syscall only.
New syscall uses kimage_file_alloc_init().
[..]
> --- linux.orig/include/linux/kexec.h
> +++ linux/include/linux/kexec.h
> @@ -16,7 +16,7 @@
>
> #include <uapi/linux/kexec.h>
>
> -#ifdef CONFIG_KEXEC
> +#ifdef CONFIG_KEXEC_CORE
> #include <linux/list.h>
> #include <linux/linkage.h>
> #include <linux/compat.h>
> @@ -318,12 +318,18 @@ int crash_shrink_memory(unsigned long ne
> size_t crash_get_memory_size(void);
> void crash_free_reserved_phys_range(unsigned long begin, unsigned long end);
>
> -#else /* !CONFIG_KEXEC */
> +#ifdef CONFIG_KEXEC
> +int kimage_alloc_init(struct kimage **rimage, unsigned long entry,
> + unsigned long nr_segments,
> + struct kexec_segment __user *segments,
> + unsigned long flags);
> +#endif
I am wondering why this needs to be in kexec.h. Who needs this? Even if
somebody needs this, this should probably be outside of KEXEC_CORE.
#ifdef CONFIG_KEXEC
int kimage_alloc_init(struct kimage **rimage, unsigned long entry,....
#else
#endif
#ifdef CONFIG_KEXEC_CORE
.
..
Thanks
Vivek
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: dyoung@redhat.com
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
ebiederm@xmission.com, ptesarik@suse.cz, tytso@mit.edu,
jwboyer@fedoraproject.org, dhowells@redhat.com,
akpm@linux-foundation.org, geert@linux-m68k.org
Subject: Re: [PATCH V2 2/2] kexec: split kexec_load syscall from kexec core code
Date: Tue, 21 Jul 2015 09:03:08 -0400 [thread overview]
Message-ID: <20150721130308.GB5053@redhat.com> (raw)
In-Reply-To: <20150720084558.645442047@redhat.com>
On Mon, Jul 20, 2015 at 04:37:15PM +0800, dyoung@redhat.com wrote:
> Now there's two kexec load syscall, one is kexec_load another is
> kexec_file_load, kexec_file_load has been splited as kernel/kexec_file.c.
> In this patch I split kexec_load syscall code to kernel/kexec.c.
Hi Dave,
Nice work. Thanks for doing this. I have couple of minor comments.
- We might have to audit kernel/kexec_core.c. I think there are some
functions in there which are used by only old syscall and not the new
one. All that code should be in kernel/kexec.c. Only the code which is
shared between two syscalls should be in kernel/kexec_core.c.
For example, I think kimage_alloc_init() is used by old syscall only.
New syscall uses kimage_file_alloc_init().
[..]
> --- linux.orig/include/linux/kexec.h
> +++ linux/include/linux/kexec.h
> @@ -16,7 +16,7 @@
>
> #include <uapi/linux/kexec.h>
>
> -#ifdef CONFIG_KEXEC
> +#ifdef CONFIG_KEXEC_CORE
> #include <linux/list.h>
> #include <linux/linkage.h>
> #include <linux/compat.h>
> @@ -318,12 +318,18 @@ int crash_shrink_memory(unsigned long ne
> size_t crash_get_memory_size(void);
> void crash_free_reserved_phys_range(unsigned long begin, unsigned long end);
>
> -#else /* !CONFIG_KEXEC */
> +#ifdef CONFIG_KEXEC
> +int kimage_alloc_init(struct kimage **rimage, unsigned long entry,
> + unsigned long nr_segments,
> + struct kexec_segment __user *segments,
> + unsigned long flags);
> +#endif
I am wondering why this needs to be in kexec.h. Who needs this? Even if
somebody needs this, this should probably be outside of KEXEC_CORE.
#ifdef CONFIG_KEXEC
int kimage_alloc_init(struct kimage **rimage, unsigned long entry,....
#else
#endif
#ifdef CONFIG_KEXEC_CORE
.
..
Thanks
Vivek
next prev parent reply other threads:[~2015-07-21 13:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 8:37 [PATCH V2 0/2] kexec: refactor CONFIG_KEXEC/CONFIG_KEXEC_FILE Kconfig dyoung
2015-07-20 8:37 ` dyoung
2015-07-20 8:37 ` [PATCH V2 1/2] kexec: split kexec_file syscall code to kexec_file.c dyoung
2015-07-20 8:37 ` dyoung
2015-07-20 8:37 ` [PATCH V2 2/2] kexec: split kexec_load syscall from kexec core code dyoung
2015-07-20 8:37 ` dyoung
2015-07-21 13:03 ` Vivek Goyal [this message]
2015-07-21 13:03 ` Vivek Goyal
2015-07-22 2:14 ` Dave Young
2015-07-22 2:14 ` Dave Young
2015-07-22 2:19 ` [PATCH V2 2/2 update] " Dave Young
2015-07-22 2:19 ` Dave Young
2015-07-22 2:31 ` Dave Young
2015-07-22 2:31 ` Dave Young
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=20150721130308.GB5053@redhat.com \
--to=vgoyal@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=geert@linux-m68k.org \
--cc=jwboyer@fedoraproject.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ptesarik@suse.cz \
--cc=tytso@mit.edu \
/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.