RE: [PATCH 3/3] close_dump_bitmap: simplify logic

2016-08-15 Thread Atsushi Kumagai
>> > The boolean expression replicates the logic of open_dump_bitmap(). >> > It's simpler and less error-prone to simply check if fd_bitmap is >> > valid. >> > >> > Signed-off-by: Martin Wilck >> > --- >> >  makedumpfile.c | 3 +-- >> >  1 file changed, 1 insertion(+), 2

[PATCH v2 2/2] kexec: extend kexec_file_load system call

2016-08-15 Thread Thiago Jung Bauermann
Here is a new version implementing your suggestions. I also changed it to kmalloc fdset instead of using the stack. What do you think? From: AKASHI Takahiro Device tree blob must be passed to a second kernel on DTB-capable archs, like powerpc and arm64, but the

Re: [PATCH v5 04/13] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-08-15 Thread Thiago Jung Bauermann
Am Montag, 15 August 2016, 17:46:34 schrieb Balbir Singh: > On Thu, Aug 11, 2016 at 08:08:09PM -0300, Thiago Jung Bauermann wrote: > > +/** > > + * elf64_apply_relocate_add - apply 64 bit RELA relocations > > + * @elf_info: Support information for the ELF binary being relocated. > >

Re: [V4 PATCH 2/2] mips/panic: Replace smp_send_stop() with kdump friendly version in panic path

2016-08-15 Thread Corey Minyard
On 08/15/2016 12:06 PM, Corey Minyard wrote: On 08/15/2016 06:35 AM, 河合英宏 / KAWAI,HIDEHIRO wrote: Hi Corey, From: Corey Minyard [mailto:cminy...@mvista.com] Sent: Friday, August 12, 2016 10:56 PM I'll try to test this, but I have one comment inline... Thank you very much! On 08/11/2016

Re: [V4 PATCH 2/2] mips/panic: Replace smp_send_stop() with kdump friendly version in panic path

2016-08-15 Thread Corey Minyard
On 08/15/2016 06:35 AM, 河合英宏 / KAWAI,HIDEHIRO wrote: Hi Corey, From: Corey Minyard [mailto:cminy...@mvista.com] Sent: Friday, August 12, 2016 10:56 PM I'll try to test this, but I have one comment inline... Thank you very much! On 08/11/2016 10:17 PM, Dave Young wrote: On 08/10/16 at

Re: [PATCH v5 02/13] kexec_file: Change kexec_add_buffer to take kexec_buf as argument.

2016-08-15 Thread Thiago Jung Bauermann
Am Montag, 15 August 2016, 17:30:49 schrieb Balbir Singh: > On Thu, Aug 11, 2016 at 08:08:07PM -0300, Thiago Jung Bauermann wrote: > > Adapt all callers to the new function prototype. > > Could you please expand on this? Is the following better? Adapt all callers to set up a kexec_buf to pass

RE: Re: [V4 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version in panic path

2016-08-15 Thread 河合英宏 / KAWAI,HIDEHIRO
Hi Dave, Thank you for the review. > From: Dave Young [mailto:dyo...@redhat.com] > Sent: Friday, August 12, 2016 12:17 PM > > Thanks for the update. > On 08/10/16 at 05:09pm, Hidehiro Kawai wrote: > > Daniel Walker reported problems which happens when > > crash_kexec_post_notifiers kernel

RE: Re: [V4 PATCH 2/2] mips/panic: Replace smp_send_stop() with kdump friendly version in panic path

2016-08-15 Thread 河合英宏 / KAWAI,HIDEHIRO
Hi Corey, > From: Corey Minyard [mailto:cminy...@mvista.com] > Sent: Friday, August 12, 2016 10:56 PM > I'll try to test this, but I have one comment inline... Thank you very much! > On 08/11/2016 10:17 PM, Dave Young wrote: > > On 08/10/16 at 05:09pm, Hidehiro Kawai wrote: [snip] > >> diff

Re: [PATCH] kexec: Account crashk_low_res to kexec_crash_size

2016-08-15 Thread Xunlei Pang
On 2016/08/15 at 15:17, Dave Young wrote: > Hi Xunlei, > > On 08/13/16 at 04:26pm, Xunlei Pang wrote: >> "/sys/kernel/kexec_crash_size" only includes crashk_res, it >> is fine in most cases, but sometimes we have crashk_low_res. >> For example, when "crashkernel=size[KMG],high" combined with >>

Re: [PATCH v5 04/13] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-08-15 Thread Balbir Singh
On Thu, Aug 11, 2016 at 08:08:09PM -0300, Thiago Jung Bauermann wrote: > The kexec_file_load system call needs to relocate the purgatory, so > factor out the module relocation code so that it can be shared. > > This patch's purpose is to move the ELF relocation logic from > apply_relocate_add to

Re: [PATCH v5 02/13] kexec_file: Change kexec_add_buffer to take kexec_buf as argument.

2016-08-15 Thread Balbir Singh
On Thu, Aug 11, 2016 at 08:08:07PM -0300, Thiago Jung Bauermann wrote: > Adapt all callers to the new function prototype. > Could you please expand on this? > In addition, change the type of kexec_buf.buffer from char * to void *. > There is no particular reason for it to be a char *, and the

[PATCH v2 3/6] kexec_file: Allow skipping checksum calculation for some segments.

2016-08-15 Thread Thiago Jung Bauermann
Adds checksum argument to kexec_add_buffer specifying whether the given segment should be part of the checksum calculation. The next patch will add a way to update segments after a kimage is loaded. Segments that will be updated in this way should not be checksummed, otherwise they will cause the

[PATCH v2 5/6] kexec: Share logic to copy segment page contents.

2016-08-15 Thread Thiago Jung Bauermann
Make kimage_load_normal_segment and kexec_update_segment share code which they currently duplicate. Signed-off-by: Thiago Jung Bauermann --- kernel/kexec_core.c | 159 +++- 1 file changed, 95 insertions(+), 64

[PATCH v2 6/6] IMA: Demonstration code for kexec buffer passing.

2016-08-15 Thread Thiago Jung Bauermann
This patch is not intended to be committed. It shows how kernel code can use the kexec buffer passing mechanism to pass information to the next kernel. Signed-off-by: Thiago Jung Bauermann --- include/linux/ima.h | 11 + kernel/kexec_file.c

[PATCH v2 2/6] powerpc: kexec_file: Add buffer hand-over support for the next kernel

2016-08-15 Thread Thiago Jung Bauermann
The buffer hand-over mechanism allows the currently running kernel to pass data to kernel that will be kexec'd via a kexec segment. The second kernel can check whether the previous kernel sent data and retrieve it. This is the architecture-specific part. Signed-off-by: Thiago Jung Bauermann

[PATCH v2 4/6] kexec_file: Add mechanism to update kexec segments.

2016-08-15 Thread Thiago Jung Bauermann
kexec_update_segment allows a given segment in kexec_image to have its contents updated. This is useful if the current kernel wants to send information to the next kernel that is up-to-date at the time of reboot. Signed-off-by: Thiago Jung Bauermann ---

[PATCH v2 0/6] kexec_file: Add buffer hand-over for the next kernel

2016-08-15 Thread Thiago Jung Bauermann
Hello, This patch series implements a mechanism which allows the kernel to pass on a buffer to the kernel that will be kexec'd. This buffer is passed as a segment which is added to the kimage when it is being prepared by kexec_file_load. How the second kernel is informed of this buffer is

[PATCH v2 1/6] kexec_file: Add buffer hand-over support for the next kernel

2016-08-15 Thread Thiago Jung Bauermann
The buffer hand-over mechanism allows the currently running kernel to pass data to kernel that will be kexec'd via a kexec segment. The second kernel can check whether the previous kernel sent data and retrieve it. This is the architecture-independent part of the feature. Signed-off-by: Thiago

Re: [PATCH] kexec: Account crashk_low_res to kexec_crash_size

2016-08-15 Thread Dave Young
Hi Xunlei, On 08/13/16 at 04:26pm, Xunlei Pang wrote: > "/sys/kernel/kexec_crash_size" only includes crashk_res, it > is fine in most cases, but sometimes we have crashk_low_res. > For example, when "crashkernel=size[KMG],high" combined with > "crashkernel=size[KMG],low" is used for 64-bit x86. >