Re: [PATCH v2] kexec: Set KEXEC_TYPE_CRASH before sanity_check_segment_list()

2015-12-10 Thread Baoquan He
TYPE_CRASH; > } Good catch. This is hard to be found because kexec-tools user space utility has make sure it's well located. It must be a code reviewing finding. Ack it. Acked-by: Baoquan He Thanks Baoquan > > + ret = sanity_check_segment_list(image); > + if (ret)

Re: [PATCH] proc-vmcore: wrong data type casting fix

2016-03-11 Thread Baoquan He
~ our > 1) read_vmcore will refuse to continue so makedumpfile fails. > 2) mmap_vmcore will trigger BUG_ON() in remap_pfn_range(). > > Use unsigned long long in min_t instead so that the variables are not > truncated. > > Signed-off-by: Baoquan He > Signed-off-by: D

Re: [PATCH V2] proc-vmcore: wrong data type casting fix

2016-03-12 Thread Baoquan He
> >> > >>> During our tests there are two problems caused by it: > >>> 1) read_vmcore will refuse to continue so makedumpfile fails. > >>> 2) mmap_vmcore will trigger BUG_ON() in remap_pfn_range(). > >>> > >>> Use unsign

Re: [PATCH V2] proc-vmcore: wrong data type casting fix

2016-03-13 Thread Baoquan He
> > > During our tests there are two problems caused by it: > > 1) read_vmcore will refuse to continue so makedumpfile fails. > > 2) mmap_vmcore will trigger BUG_ON() in remap_pfn_range(). > > > > Use unsigned long long in min_t instead so that the variables are

Re: [PATCH V2] proc-vmcore: wrong data type casting fix

2016-03-13 Thread Baoquan He
, this is also not expected value but > the execution doesn't result in error). Then, fpos proceeds so that > (m->offset + m->size - *fpos) is aligned with 4GB in the next loop, > and we after all reach the errors. > > I think your patch description needs a bit more d

Re: [PATCH V2] proc-vmcore: wrong data type casting fix

2016-03-13 Thread Baoquan He
On 03/14/16 at 11:47am, Baoquan He wrote: > On 03/14/16 at 12:25pm, HATAYAMA Daisuke wrote: > > From: Dave Young > > Subject: [PATCH V2] proc-vmcore: wrong data type casting fix > > Date: Fri, 11 Mar 2016 16:42:48 +0800 > > > > > On i686 PAE enabled machine t

[PATCH] makdumpfile: clean up the in-accurate message printing about mmap

2016-03-16 Thread Baoquan He
mmap() is not used either caused by failure of mmap() in initialize_mmap(), or because user explictly specify '--non-mmap'. So the message need be changed according these different cases. Signed-off-by: Baoquan He --- makedumpfile.c | 19 +++ 1 file changed, 11 insert

Re: [PATCH] makdumpfile: clean up the in-accurate message printing about mmap

2016-03-19 Thread Baoquan He
On 03/17/16 at 06:46am, Atsushi Kumagai wrote: > Hello Baoquan, > > >mmap() is not used either caused by failure of mmap() in initialize_mmap(), > >or because user explictly specify '--non-mmap'. So the message need be > >changed > >according these differ

Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path

2016-03-22 Thread Baoquan He
On 03/01/16 at 05:53pm, Xunlei Pang wrote: > This is a bug fix. > > After this, I will try to do a cleanup for crash_unmap/map_reserved_pages() > (only used by S390) to consolidate it with > arch_kexec_unprotect/protect_crashkres(). Hi Xunlei, Minfei, I think you need discuss together about how

Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path

2016-03-23 Thread Baoquan He
On 03/23/16 at 11:32am, Xunlei Pang wrote: > On 2016/03/23 at 10:48, Baoquan He wrote: > > On 03/01/16 at 05:53pm, Xunlei Pang wrote: > >> This is a bug fix. > >> > >> After this, I will try to do a cleanup for crash_unmap/map_reserved_pages() > >&g

Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path

2016-03-23 Thread Baoquan He
On 03/23/16 at 05:59pm, Xunlei Pang wrote: > On 2016/03/23 at 16:23, Baoquan He wrote: > > On 03/23/16 at 11:32am, Xunlei Pang wrote: > >> On 2016/03/23 at 10:48, Baoquan He wrote: > >>> On 03/01/16 at 05:53pm, Xunlei Pang wrote: > >>>> This is a bug fi

Re: [PATCH] s390/kexec: Consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres()

2016-03-30 Thread Baoquan He
Hi Xunlei, I have two questions. One is do we still need Minfei's patch if this patch is applied since you have completely delete crash_map/unmap_reserved_pages in kernel/kexec.c ? On 03/30/16 at 07:47pm, Xunlei Pang wrote: > Commit 3f625002581b ("kexec: introduce a protection mechanism > for th

Re: [PATCH] s390/kexec: Consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres()

2016-03-30 Thread Baoquan He
On 03/31/16 at 10:43am, Minfei Huang wrote: > On 03/30/16 at 08:30pm, Baoquan He wrote: > > Hi Xunlei, > > > > I have two questions. > > > > One is do we still need Minfei's patch if this patch is applied since > > you have completely delete crash_ma

Re: Removal of the kernel code/data/bss resources does break kexec/kdump

2016-04-14 Thread Baoquan He
On 04/14/16 at 06:14pm, Freeman Zhang wrote: > Mr. Torvalds, > > I do notice your recent commit: > > > commit c4004b02f8e5b9ce357a0bb1641756cc86962664 > > Author: Linus Torvalds > > Date: Wed Apr 6 13:45:07 2016 -0700 > > > > x86: remove the kernel code/data/bss resources from /proc/iomem

Re: [PATCH 1/3] kexec: don't invoke OOM-killer for control page allocation

2016-04-17 Thread Baoquan He
On 04/14/16 at 09:00pm, Russell King wrote: > If we are unable to find a suitable page when allocating the control > page, do not invoke the OOM-killer: killing processes probably isn't > going to help. Originally kexec was made to reboot to test kernel quickly. If 1st kernel is palyed and hurted

Re: [PATCH 2/3] kexec: ensure user memory sizes do not wrap

2016-04-17 Thread Baoquan He
On 04/14/16 at 09:00pm, Russell King wrote: > Ensure that user memory sizes do not wrap around when validating the > user input, which can lead to the following input validation working > incorrectly. > > Signed-off-by: Russell King > --- > kernel/kexec_core.c | 2 ++ > 1 file changed, 2 inserti

Re: [PATCH 3/3] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-04-17 Thread Baoquan He
On 04/14/16 at 09:00pm, Russell King wrote: > On PAE systems (eg, ARM LPAE) the vmcore note may be located above > 4GB physical on 32-bit architectures, so we need a wider type than > "unsigned long" here. Arrange for paddr_vmcoreinfo_note() to return > a phys_addr_t, thereby allowing it to be loc

Re: [PATCH 1/3] kexec: don't invoke OOM-killer for control page allocation

2016-04-18 Thread Baoquan He
On 04/18/16 at 09:39am, Russell King - ARM Linux wrote: > On Mon, Apr 18, 2016 at 01:32:53PM +0800, Baoquan He wrote: > > On 04/14/16 at 09:00pm, Russell King wrote: > > > If we are unable to find a suitable page when allocating the control > > > page, do not inv

Re: [PATCH 2/3] kexec: ensure user memory sizes do not wrap

2016-04-18 Thread Baoquan He
On 04/18/16 at 09:37am, Russell King - ARM Linux wrote: > On Mon, Apr 18, 2016 at 01:35:34PM +0800, Baoquan He wrote: > > On 04/14/16 at 09:00pm, Russell King wrote: > > > Ensure that user memory sizes do not wrap around when validating the > > > user input, which can

Re: [PATCH 3/3] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-04-18 Thread Baoquan He
On 04/18/16 at 09:36am, Russell King - ARM Linux wrote: > On Mon, Apr 18, 2016 at 01:38:20PM +0800, Baoquan He wrote: > > On 04/14/16 at 09:00pm, Russell King wrote: > > > On PAE systems (eg, ARM LPAE) the vmcore note may be located above > > > 4GB physical on 32-bit

Re: [PATCH 3/3] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-04-18 Thread Baoquan He
On 04/18/16 at 11:52am, Russell King - ARM Linux wrote: > On Mon, Apr 18, 2016 at 06:32:58PM +0800, Baoquan He wrote: > > On 04/18/16 at 09:36am, Russell King - ARM Linux wrote: > > > On Mon, Apr 18, 2016 at 01:38:20PM +0800, Baoquan He wrote: > > > > On 04/14/16

Re: [PATCH 1/3] kexec: don't invoke OOM-killer for control page allocation

2016-04-28 Thread Baoquan He
On 04/18/16 at 06:12pm, Baoquan He wrote: > On 04/18/16 at 09:39am, Russell King - ARM Linux wrote: > > On Mon, Apr 18, 2016 at 01:32:53PM +0800, Baoquan He wrote: > > > On 04/14/16 at 09:00pm, Russell King wrote: > > > > If we are unable to find a suitable pa

Re: [PATCH 2/3] kexec: ensure user memory sizes do not wrap

2016-04-28 Thread Baoquan He
gt; mstart = image->segment[i].mem; > mend = mstart + image->segment[i].memsz; > + if (mstart > mend) > + return result; Though this checking has been done in kexec utitlity, I am fine it's re-check in kernel space. Anyway i

Re: [PATCH 3/3] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-04-28 Thread Baoquan He
t now. Hope other ARM people can also help to have a look. Acked-by: Baoquan He Thanks > --- > arch/ia64/kernel/machine_kexec.c | 2 +- > include/linux/kexec.h| 2 +- > kernel/kexec_core.c | 2 +- > kernel/ksysfs.c | 4 ++-- > 4 f

Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-05-02 Thread Baoquan He
This patch is clearly related to kdump. The prefix of subject should be changed to kdump. Kexec doesn't need to handle vmcore things. And patches realted to kexec/kdump should be CCed to Andrew, he usually picks up and add them into akpm tree. Hi Pratyush, Could you please help tell why arm PAE

Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-05-03 Thread Baoquan He
On 05/03/16 at 11:23am, Pratyush Anand wrote: > Hi Baoquan, > > On 03/05/2016:12:24:41 PM, Baoquan He wrote: > > Hi Pratyush, > > > > Could you please help tell why arm PAE kernel can be put above 4G? > > PAE system can have physical addresses above 4G. So, if

Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t

2016-05-03 Thread Baoquan He
On 05/03/16 at 11:12am, Russell King - ARM Linux wrote: > On Tue, May 03, 2016 at 12:24:41PM +0800, Baoquan He wrote: > > Could you please help tell why arm PAE kernel can be put above 4G? > > Since the change is related to common code, I am curious about how > > it's so

Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-04 Thread Baoquan He
On 04/27/16 at 07:21am, Corey Minyard wrote: > Any comments on this? If no one else cares I'd be willing to take over > maintenance of this. Vivek is busy with some other issues. He asked Dave and me to test and review this patch. Will check this recently. Thanks Baoquan > > -corey > > On 02/

Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-08 Thread Baoquan He
Hi Corey, I am trying to review this patch now, and these fixes contained are very great. Just several concerns are added in inline comment. By the way, did you run this in your side? Hi Vivek, Member variable was added into task_struct in below commit replacing pids[PIDTYPE_TGID], and from the

Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-09 Thread Baoquan He
On 05/09/16 at 07:10am, Corey Minyard wrote: > On 05/09/2016 12:18 AM, Baoquan He wrote: > >Hi Corey, > > > >I am trying to review this patch now, and these fixes contained are very > >great. Just several concerns are added in inline comment. > > > >By

Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-09 Thread Baoquan He
On 05/09/16 at 10:40am, Corey Minyard wrote: > > define bttnobp > > set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) > >-set $pid_off=((size_t)&((struct task_struct > >*)0)->pids[1].pid_list.next) > >+set $pid_off=((size_t)&((struct task_struc

Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-09 Thread Baoquan He
Hi Corey, On 05/09/16 at 07:10am, Corey Minyard wrote: > >>>diff --git a/Documentation/kdump/gdbmacros.txt > >>>b/Documentation/kdump/gdbmacros.txt > >>>index 9b9b454..e5bbd8d 100644 > >>>--- a/Documentation/kdump/gdbmacros.txt > >>>+++ b/Documentation/kdump/gdbmacros.txt > >>>@@ -54,42 +54,43 @@

Re: [PATCH 11/12] kexec: allow architectures to override boot mapping

2016-05-11 Thread Baoquan He
On 04/28/16 at 10:28am, Russell King wrote: > diff --git a/include/linux/kexec.h b/include/linux/kexec.h > index 52a3a221bcb2..99cb9dac7909 100644 > --- a/include/linux/kexec.h > +++ b/include/linux/kexec.h > @@ -318,6 +318,44 @@ int __weak arch_kexec_apply_relocations_add(const > Elf_Ehdr *ehdr,

Re: [PATCH v2] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-16 Thread Baoquan He
On 05/10/16 at 07:30pm, miny...@acm.org wrote: > From: Corey Minyard > > Lots of little changes needed to be made to clean these up, remove the > four byte pointer assumption and traverse the pid queue properly. > Also consolidate the traceback code into a single function instead > of having thre

Re: [PATCH v2] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-16 Thread Baoquan He
On 05/16/16 at 05:32pm, Baoquan He wrote: > On 05/10/16 at 07:30pm, miny...@acm.org wrote: > > From: Corey Minyard > > > > Lots of little changes needed to be made to clean these up, remove the > > four byte pointer assumption and traverse the pid queue properl

Re: [PATCH v2] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-16 Thread Baoquan He
On 05/16/16 at 06:52am, Corey Minyard wrote: > On 05/16/2016 04:32 AM, Baoquan He wrote: > >On 05/10/16 at 07:30pm, miny...@acm.org wrote: > >>From: Corey Minyard > >> > >>Lots of little changes needed to be made to clean these up, remove the > >>four

Re: [PATCH v2] kdump: Fix gdb macros work work with newer and 64-bit kernels

2016-05-16 Thread Baoquan He
Cc Andrew and Jonathan. On 05/10/16 at 07:30pm, miny...@acm.org wrote: > From: Corey Minyard > > Lots of little changes needed to be made to clean these up, remove the > four byte pointer assumption and traverse the pid queue properly. > Also consolidate the traceback code into a single function

Re: [PATCH kexec-tools 05/32] arm: fix kdump to work on LPAE systems

2016-05-28 Thread Baoquan He
umber of blocks cannot be represented in, respectively, the types off_t, ino_t, or blkcnt_t. This error can occur when, for example, an application compiled on a 32-bit platform without -D_FILE_OFFSET_BITS=64 calls stat() on a file whos

Re: [PATCH kexec-tools 07/32] kexec: fix warnings caused by selecting 64-bit file IO on 32-bit platforms

2016-05-28 Thread Baoquan He
On 05/03/16 at 11:21am, Russell King wrote: > Fix warnings caused by selecting 64-bit file IO on 32-bit platforms. > > kexec/kexec.c:710:2: warning: format '%lx' expects argument of type 'long > unsigned int', but argument 4 has type 'off_t' [-Wformat] > kexec/zlib.c:63:4: warning: format '%ld' e

Re: [PATCH kexec-tools 07/32] kexec: fix warnings caused by selecting 64-bit file IO on 32-bit platforms

2016-05-29 Thread Baoquan He
On 05/28/16 at 02:53pm, Russell King - ARM Linux wrote: > On Sat, May 28, 2016 at 07:33:54PM +0800, Baoquan He wrote: > > On 05/03/16 at 11:21am, Russell King wrote: > > > diff --git a/kexec/kexec-uImage.c b/kexec/kexec-uImage.c > > > index 9df601b..5e24629 100644 >

Re: [PATCH kexec-tools v2 10/32] kexec: add generic helper to add to memory_regions

2016-06-07 Thread Baoquan He
On 06/06/16 at 05:59pm, Russell King wrote: > diff --git a/kexec/mem_regions.c b/kexec/mem_regions.c > new file mode 100644 > index 000..a4952ff > --- /dev/null > +++ b/kexec/mem_regions.c > @@ -0,0 +1,30 @@ > +#include "kexec.h" > +#include "mem_regions.h" > + > +/** > + * mem_regions_add() -

Re: kexec failures with DEBUG_RODATA

2016-06-14 Thread Baoquan He
On 06/14/16 at 11:05am, Kees Cook wrote: > On Tue, Jun 14, 2016 at 10:59 AM, Russell King - ARM Linux > wrote: > > Since the kernel now has CONFIG_DEBUG_RODATA by default, this means > > that these kinds of ratio-based assumptions are even more invalid > > than they have been. > > > > Right now, a

Re: [PATCH v20 13/14] arm64: kdump: update a kernel doc

2016-06-30 Thread Baoquan He
On 06/23/16 at 05:54pm, Geoff Levand wrote: > From: AKASHI Takahiro > > This patch adds arch specific descriptions about kdump usage on arm64 > to kdump.txt. > > Signed-off-by: AKASHI Takahiro > --- > Documentation/kdump/kdump.txt | 15 ++- > 1 file changed, 14 insertions(+), 1 del

Re: [PATCH v20 13/14] arm64: kdump: update a kernel doc

2016-07-01 Thread Baoquan He
On 07/01/16 at 04:37pm, AKASHI Takahiro wrote: > Dave, Boaquan, > > Thank you for your reviewing. > > On Thu, Jun 30, 2016 at 05:00:45PM +0800, Baoquan He wrote: > > On 06/23/16 at 05:54pm, Geoff Levand wrote: > > > From: AKASHI Takahiro > > > > >

Re: [PATCH v2] kexec: Fix kdump failure with notsc

2016-07-12 Thread Baoquan He
On 07/12/16 at 02:52pm, Xunlei Pang wrote: > On 2016/07/07 at 18:17, Wei Jiangang wrote: > > Signed-off-by: Wei Jiangang > > --- > > +/* Local APIC is disabled by the kernel for crash or reboot path */ > > +static int disabled_local_apic; > > + > > /* > > * Knob to control our willingness to en

Re: [PATCH v2] kexec: Fix kdump failure with notsc

2016-07-12 Thread Baoquan He
On 07/12/16 at 09:09am, Wei, Jiangang wrote: > On Tue, 2016-07-12 at 14:52 +0800, Xunlei Pang wrote: > > On 2016/07/07 at 18:17, Wei Jiangang wrote: > > > diff --git a/arch/x86/kernel/machine_kexec_32.c > > > b/arch/x86/kernel/machine_kexec_32.c > > > index 469b23d6acc2..c934a7868e6b 100644 > > >

Re: [PATCH v2] kexec: Fix kdump failure with notsc

2016-07-13 Thread Baoquan He
On 07/13/16 at 07:46am, Wei, Jiangang wrote: > On Mon, 2016-07-11 at 18:28 +0800, Wei Jiangang wrote: > > Hi , Ingo > > > > On Fri, 2016-07-08 at 09:38 +0200, Ingo Molnar wrote: > > > * Eric W. Biederman wrote: > > > > > > > Sigh. Can we please just do the work to rip out the apic shutdown code

Re: [PATCH] kexec: Add option to fallback to old kexec syscall when kexec file based syscall failed

2016-07-14 Thread Baoquan He
On 07/14/16 at 04:45pm, Lee, Chun-Yi wrote: > This patch adds a new "--fallback-kexec" option to give a chance to > fallback to old kexec syscall when file based kexec syscall operation > failed. > > This option works with --kexec-file-syscall to provide more flexible > way to adapt to different k

Re: [PATCH] kexec: Add option to fallback to old kexec syscall when kexec file based syscall failed

2016-07-14 Thread Baoquan He
On 07/14/16 at 05:51pm, Baoquan He wrote: > On 07/14/16 at 04:45pm, Lee, Chun-Yi wrote: > > This patch adds a new "--fallback-kexec" option to give a chance to > > fallback to old kexec syscall when file based kexec syscall operation > > failed. > > > >

Re: [PATCH] kexec: Add option to fallback to old kexec syscall when kexec file based syscall failed

2016-07-14 Thread Baoquan He
On 07/14/16 at 06:35pm, joeyli wrote: > Hi Baoquan, > > Thanks for your response! > > On Thu, Jul 14, 2016 at 05:51:24PM +0800, Baoquan He wrote: > > On 07/14/16 at 04:45pm, Lee, Chun-Yi wrote: > > > This patch adds a new "--fallback-kexec" option to give

[PATCH 1/3] x86/apic/kexec: Enable legacy irq mode before jump to kexec/kdump kernel

2016-07-19 Thread Baoquan He
mode. Then only call clear_IO_APIC when IO-APIC need be disabled. And call switch_to_legacy_irq_mode before kexec/kdump jumping. Reported-by: Wei Jiangang Signed-off-by: Baoquan He --- arch/x86/include/asm/io_apic.h | 3 ++- arch/x86/kernel/apic/io_apic.c | 12 arch

[PATCH 0/3] Enable legacy irq mode before jump to kexec/kdump kernel

2016-07-19 Thread Baoquan He
sable_IO_APIC is changed to only contain code of changeing system to be PIC mode or virtual wire mode and is renamed as switch_to_legacy_irq_mode. Now only call clear_IO_APIC where IO-APIC need be disabled, and call switch_to_legacy_irq_mode before jump to kexe/kdump kernel. Patch 2/3 and 3/3 are

[PATCH 2/3] x86/apic: Clean up the names of legacy irq mode setting related functions

2016-07-19 Thread Baoquan He
ke IO-APIC Virtual Wire mode setting code out and wrap it inot a new function ioapic_set_virtual_wire_mode. Meanwhile change the name of disconnect_bsp_APIC as lapic_set_legacy_irq_mode. These makes the legacy irq mode setting more understandable. Signed-off-by: Baoquan He --- arch/x86/include/

[PATCH 3/3] x86/apic: Clean up the apic delivery mode macro definition

2016-07-19 Thread Baoquan He
only be set for LVT LINT0/1, ICR can't use ExtINT either. However the current code defines APIC_DM_EXTINT and mixed the usage of it with APIC_MODE_EXTINT. Here clean it up. Signed-off-by: Baoquan He --- arch/x86/include/asm/apicdef.h | 1 - arch/x86/kernel/apic/apic.c| 8 +--- arc

Re: [PATCH 3/3] x86/apic: Improved the setting of interrupt mode for bsp

2016-07-22 Thread Baoquan He
Hi Jiangang, This is very nice, should be the stuff Eric and Ingo would like to see. But I have several questions: 1) Are you not going to clean up the old legacy irq mode setting code in 1st kernel? 2)I call them legacy irq mode because not only apic virtual wire mode exists, but the PIC mode i

Re: [PATCH 3/3] x86/apic: Clean up the apic delivery mode macro definition

2016-07-27 Thread Baoquan He
e system] > > url: > https://github.com/0day-ci/linux/commits/Baoquan-He/Enable-legacy-irq-mode-before-jump-to-kexec-kdump-kernel/20160724-054857 > base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next > reproduce: > # apt-get install sparse >

Re: [PATCH] makedumpfile: Add more descriptions of multi-threads feature

2016-07-29 Thread Baoquan He
On 07/29/16 at 11:34am, Zhou Wenjian wrote: > It will have a bad performance if the threads number is larger than > the usable cpu number. So we should remind user of it. > > Signed-off-by: Zhou Wenjian It makes sense to tell people who use option "-num-threads". Ack it.

Re: [PATCH 1/2] Documentation: kdump: update maxcpus to nr_cpus

2016-07-29 Thread Baoquan He
On 07/29/16 at 11:23am, Zhou Wenjian wrote: > Parameter nr_cpus is used to bring up a SMP dump-capture kernel, > instead of the old parameter maxcpus. This commit update it in > Documentation/kdump/kdump.txt. > > Signed-off-by: Zhou Wenjian > --- > Documentation/kdump/kdump.txt | 2 +- > 1 file

Re: [PATCH v2] Documentation: kdump: add description of bringing up SMP dump-capture kernel

2016-08-02 Thread Baoquan He
Hi Wenjian, On 08/01/16 at 08:23am, Zhou Wenjian wrote: > v1->v2: change nr_cpus to maxcpus > > SMP dump-capture kernel is useful to improve the performance of kdump in > some cases. So add the description of bringing up SMP dump-capture kernel. > > Signed-off-by: Zhou Wenjian Discussed with p

Re: [PATCH v2] Documentation: kdump: add description of bringing up SMP dump-capture kernel

2016-08-02 Thread Baoquan He
On 08/02/16 at 04:49pm, "Zhou, Wenjian/周文剑" wrote: > Hi Baoquan, > > On 08/02/2016 03:46 PM, Baoquan He wrote: > >Hi Wenjian, > > > >On 08/01/16 at 08:23am, Zhou Wenjian wrote: > >>v1->v2: change nr_cpus to maxcpus > >> > >>SMP d

Re: [PATCH v3 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-02 Thread Baoquan He
xt | 2 ++ > 1 file changed, 2 insertions(+) Looks good to me! Thanks, Wenjian. Ack this series Acked-by: Baoquan He Hi Andrew, Could you please help merge this patchset? Thanks Baoquan > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > index 88ff63d..

Re: [PATCH v3 2/2] Documentation: kdump: add description of bringing up SMP dump-capture kernel

2016-08-02 Thread Baoquan He
On 08/03/16 at 08:59am, Zhou Wenjian wrote: > SMP dump-capture kernel is useful to improve the performance of kdump in > some cases. So add the description of bringing up SMP dump-capture kernel. > > Signed-off-by: Zhou Wenjian > --- > Documentation/kdump/kdump.txt | 7 +++ > 1 file changed,

Re: [PATCH v3 2/2] Documentation: kdump: add description of bringing up SMP dump-capture kernel

2016-08-02 Thread Baoquan He
On 08/03/16 at 10:05am, "Zhou, Wenjian/周文剑" wrote: > On 08/03/2016 09:58 AM, Baoquan He wrote: > >On 08/03/16 at 08:59am, Zhou Wenjian wrote: > >>SMP dump-capture kernel is useful to improve the performance of kdump in > >>some cases. So add the description o

Re: [PATCH v4 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-02 Thread Baoquan He
c related patches. Except for this, I am fine with this patchset. Ack it again. Acked-by: Baoquan He Thanks Baoquan > --- > Documentation/kdump/kdump.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdum

Re: [PATCH v1] kexec/arch/i386: Add support for KASLR memory randomization

2016-08-17 Thread Baoquan He
On 08/17/16 at 09:47am, Thomas Garnier wrote: > Multiple changes were made on KASLR (right now in linux-next). One of > them is randomizing the virtual address of the physical mapping, vmalloc > and vmemmap memory sections. It breaks kdump ability to read physical > memory. > > This change identif

Re: [PATCH v1] kdump, vmcoreinfo: report memory sections virtual addresses

2016-08-18 Thread Baoquan He
This makes sense. Makedumpfile need this to parse memory sections. Ack. Acked-by: Baoquan He On 08/18/16 at 07:47am, Thomas Garnier wrote: > KASLR memory randomization can randomize the base of the physical memory > mapping (PAGE_OFFSET), vmalloc (VMALLOC_START) and vmemmap > (VMEM

Re: [PATCH v9 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-23 Thread Baoquan He
ified, smp is disabled. I am not very sure why this is introduced, number of possible cpu is decided by the min value of nr_cpus= and possible_cpus=. nr_cpus and maxcpus might not be very clear to people which are described in Documentation/kernel-parameters.txt. Hi Jon, do you think change as belo

Re: [PATCH] kexec: Fix double-free when failing to relocate the purgatory.

2016-08-24 Thread Baoquan He
It's reasonable. Ack. Acked-by: Baoquan He On 08/24/16 at 09:05pm, Thiago Jung Bauermann wrote: > If kexec_apply_relocations fails, kexec_load_purgatory frees pi->sechdrs > and pi->purgatory_buf. This is redundant, because in case of error > kimage_file_pr

Re: [PATCH] kexec: socket not released when error situation occur.

2016-08-25 Thread Baoquan He
On 08/25/16 at 11:15am, YoungHyun Yoo wrote: > Fix resourceleek in ifdown function when error occur. resource leak? > > Signed-off-by: YoungHyun Yoo > --- > kexec/ifdown.c | 26 +++--- > 1 file changed, 15 insertions(+), 11 deletions(-) > > diff --git a/kexec/ifdown.c b/ke

Re: Capturing crash with 4.6.0 and above kernel does not work

2016-08-25 Thread Baoquan He
On 08/25/16 at 05:45pm, Himanshu Madhani wrote: > crashkernel has been reserved successfully. Aug 25 10:36:44 dut4062 kernel: Reserving 512MB of memory at 368MB for crashkernel (System RAM: 130847MB) So what's the result of executing "grep Crash /porc/iomem" on your system? > > On 8/25/16, 1

Re: Capturing crash with 4.6.0 and above kernel does not work

2016-08-26 Thread Baoquan He
On 08/26/16 at 04:47pm, Himanshu Madhani wrote: > > > On 8/25/16, 10:39 PM, "Baoquan He" wrote: > > >On 08/25/16 at 05:45pm, Himanshu Madhani wrote: > >> > > > >crashkernel has been reserved successfully. > >Aug 25 10:36:44

Re: [PATCH v9 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-26 Thread Baoquan He
On 08/25/16 at 01:10pm, Jonathan Corbet wrote: > On Wed, 24 Aug 2016 13:06:45 +0800 > Baoquan He wrote: > > > Hi Jon, do you think change as below is OK to you? > > So nr_cpus is the maximum value, and maxcpus is the current number. > Figures. No wonder the documentat

Re: [PATCH v9 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-26 Thread Baoquan He
think it's OK. Let's wait for Jon's feekback. > > -- > Thanks > Zhou > > On 08/24/2016 01:06 PM, Baoquan He wrote: > >On 08/22/16 at 09:14am, "Zhou, Wenjian/周文剑" wrote: > >>On 08/19/2016 11:57 PM, Jonathan Corbet wrote: > >>

[PATCH 0/3] makedumpfile: Add support of mm randomization

2016-08-29 Thread Baoquan He
ernel patch need be adjusted so that number_table.X of makedumpfile can be used. Will add comment to Thomas's kernel patch. Baoquan He (3): makedumpfile: Get info->kernel_version from SYMBOL(init_uts_ns) earlier makedumpfile: Move get_versiondep_info calling earlier makedumpfile

[PATCH 3/3] makedumpfile: Add support for MM randomization

2016-08-29 Thread Baoquan He
to support MM randomization. Signed-off-by: Baoquan He --- arch/x86_64.c | 26 +- makedumpfile.c | 29 - makedumpfile.h | 3 +++ 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/arch/x86_64.c b/arch/x86_64.c index ddf7be6..ff78

[PATCH 1/3] makedumpfile: Get info->kernel_version from SYMBOL(init_uts_ns) earlier

2016-08-29 Thread Baoquan He
sed in is_vmalloc_addr_x86_64(). This looks a weird circle. Since we have export "OSRELEASE=%s\n" explicitly in kernel, we should always use it to get kernel version. And this breaks above weird circle. Otherwise MM randomization will come and make it worse. Signed-off-by: Baoquan He --- mak

[PATCH 2/3] makedumpfile: Move get_versiondep_info calling earlier

2016-08-29 Thread Baoquan He
Because is_vmalloc_addr_x86_64 need called very early, e.g in readmem(). So we have to move get_versiondep_info calling earlier to make PAGE_OFFSET/VMALLOC_START/VMEMMAP_START get value before use them. Signed-off-by: Baoquan He --- makedumpfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [PATCH 0/3] makedumpfile: Add support of mm randomization

2016-08-29 Thread Baoquan He
Sorry, I just copied Atsushi's mail address from an very old git commit. CC again. On 08/29/16 at 04:54pm, Baoquan He wrote: > Hi Atsushi and Thomas, > > This is a draft patchset. I just checked x86_64 implementation according to > Thomas's mm randomization related pat

Re: [PATCH v1] kdump, vmcoreinfo: report memory sections virtual addresses

2016-08-29 Thread Baoquan He
Hi Thomas, I used below code and it works. Since using VMCOREINFO_NUMBER can reuse the existing struct number_table to import the data. It makes change easier. But the place could be next to KERNEL_IMAGE_SIZE, or as your patch did, both is fine. --- kernel/kexec_core.c | 3 +++ 1 file changed, 3

Re: [PATCH v1] kdump, vmcoreinfo: report memory sections virtual addresses

2016-09-06 Thread Baoquan He
On 09/07/16 at 03:09pm, AKASHI Takahiro wrote: > On Mon, Aug 29, 2016 at 06:11:37PM +0800, Baoquan He wrote: > > Hi Thomas, > > > > I used below code and it works. Since using VMCOREINFO_NUMBER can reuse > > the existing struct number_table to import the data. It makes

[PATCH] bnx2: Reset device during driver initialization

2016-09-09 Thread Baoquan He
red to net device up stage. This will cause hardware iommu handling failure on bnx2 device. And its resetting relies on firmware. So in this patch move the firmware requesting code to earlier bnx2_init_one(), then next call bnx2_reset_chip to reset device. Signed-off-by: Baoquan He --- drivers/net/et

Re: [PATCH] bnx2: Reset device during driver initialization

2016-09-09 Thread Baoquan He
ntry calling to __map_single calling, the principal should be similar. Thanks Baoquan On 09/09/16 at 04:11pm, Baoquan He wrote: > When system enters into kdump kernel because of kernel panic, it won't > shutdown devices. On-flight DMA will continue transferring data until > device driver

Re: [PATCH] bnx2: Reset device during driver initialization

2016-09-09 Thread Baoquan He
On 09/09/16 at 10:41am, Joerg Roedel wrote: > > Hi Baoquan, > > On Fri, Sep 09, 2016 at 04:22:25PM +0800, Baoquan He wrote: > > Recently I tried to fix the kdump failure in amd iommu system again, and > > now the latest code works, IO_PAGE_FAULT can't be seen any

Re: [PATCH] bnx2: Reset device during driver initialization

2016-09-09 Thread Baoquan He
Hi Joerg, On 09/09/16 at 10:41am, Joerg Roedel wrote: > > Hi Baoquan, > > On Fri, Sep 09, 2016 at 04:22:25PM +0800, Baoquan He wrote: > > Recently I tried to fix the kdump failure in amd iommu system again, and > > now the latest code works, IO_PAGE_FAULT can&#x

Re: [PATCH] bnx2: Reset device during driver initialization

2016-09-09 Thread Baoquan He
On 09/09/16 at 04:11pm, Baoquan He wrote: > When system enters into kdump kernel because of kernel panic, it won't > shutdown devices. On-flight DMA will continue transferring data until > device driver initializes. All devices are supposed to reset during > driver initial

[PATCH v2] bnx2: Reset device during driver initialization

2016-09-09 Thread Baoquan He
net device up stage. This will cause hardware iommu handling failure on bnx2 device. And its resetting relies on firmware. So in this patch move the firmware requesting code to earlier bnx2_init_one(), then next call bnx2_reset_chip to reset device. Signed-off-by: Baoquan He --- v1->

Re: [PATCH v1] kdump, vmcoreinfo: report memory sections virtual addresses

2016-09-13 Thread Baoquan He
Hi Thomas, I used below code and it works. Since using VMCOREINFO_NUMBER can reuse the existing struct number_table to import the data. It makes change easier. But the place could be next to KERNEL_IMAGE_SIZE, or as your patch did, both is fine. --- kernel/kexec_core.c | 3 +++ 1 file changed, 3

[PATCH v1] kexec/arch/i386: Add support for KASLR memory randomization

2016-09-13 Thread Baoquan He
From: Thomas Garnier Multiple changes were made on KASLR (right now in linux-next). One of them is randomizing the virtual address of the physical mapping, vmalloc and vmemmap memory sections. It breaks kdump ability to read physical memory. This change identifies if KASLR memories randomization

Re: [PATCH v2] bnx2: Reset device during driver initialization

2016-09-13 Thread Baoquan He
On 09/13/16 at 11:25am, David Miller wrote: > > Just to be clear, I did actually apply this v2 of the patch > rather than the initial version.:) Thanks a lot! ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo

[PATCH v5 2/8] iommu/amd: add early_enable_iommu() wrapper function

2016-09-15 Thread Baoquan He
Move per iommu enabling code into a wrapper function early_enable_iommu(). This can make later kdump change easier. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu_init.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/iommu

[PATCH v5 6/8] iommu/amd: Do not re-enable dev table entries in kdump

2016-09-15 Thread Baoquan He
This enabling should have been done in normal kernel. It's unnecessary to enable it again in kdump kernel. And clean up the function comments of init_device_table_dma. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu_init.c | 10 +++--- 1 file changed, 7 insertions(+), 3 dele

[PATCH v5 8/8] iommu/amd: Update domain into to dte entry during device driver init

2016-09-15 Thread Baoquan He
es to. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 6c37300..00b64ee 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2310,6 +23

[PATCH v5 7/8] iommu/amd: Don't update domain info to dte entry at iommu init stage

2016-09-15 Thread Baoquan He
;t be updated to dte entry. We should wait until device driver init stage. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index fcb69ff..6c37300 100644 --- a/drivers/

[PATCH v5 5/8] iommu/amd: copy old trans table from old kernel

2016-09-15 Thread Baoquan He
caches Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu_init.c | 44 +++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index ce49641..47a8fc9 100644 --- a/drivers/iommu

[PATCH v5 0/8] Fix kdump faults on system with amd iommu

2016-09-15 Thread Baoquan He
the pte_root to dev table entry to device driver init stage. Baoquan He (8): iommu/amd: Detect pre enabled translation iommu/amd: add early_enable_iommu() wrapper function iommu/amd: Define bit fields for DTE particularly iommu/amd: Add function copy_dev_tables iommu/amd: copy old trans

[PATCH v5 4/8] iommu/amd: Add function copy_dev_tables

2016-09-15 Thread Baoquan He
occupied in 1st kernel need be reserved to avoid touching the old io-page tables so that on-flight DMA can continue looking up. And define MACRO DEV_DOMID_MASK to replace magic number 0xULL because it need be reused in copy_dev_tables. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu.c

[PATCH v5 1/8] iommu/amd: Detect pre enabled translation

2016-09-15 Thread Baoquan He
Add functions to check whether translation is already enabled in IOMMU. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu_init.c | 25 + drivers/iommu/amd_iommu_proto.h | 1 + drivers/iommu/amd_iommu_types.h | 4 3 files changed, 30 insertions(+) diff --git

[PATCH v5 3/8] iommu/amd: Define bit fields for DTE particularly

2016-09-15 Thread Baoquan He
In amd-vi spec several bits of IO PTE fields and DTE fields are similar so that both of them can share the same MACRO definition. However defining their respecitve bit fields can make code more read-able. So do it in this patch. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu.c | 8

[PATCH v10 2/3] Documentation: kdump: remind user of nr_cpus

2016-09-18 Thread Baoquan He
From: Zhou Wenjian nr_cpus can help to save memory. So we should remind user of it. Signed-off-by: Zhou Wenjian Acked-by: Baoquan He Acked-by: Xunlei Pang Signed-off-by: Baoquan He --- Documentation/kdump/kdump.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/kdump

[PATCH v10 3/3] Documentation: kdump: add description of enable multi-cpus support

2016-09-18 Thread Baoquan He
From: Zhou Wenjian Multi-cpu support is useful to improve the performance of kdump in some cases. So add the description of enable multi-cpu support in dump-capture kernel. Signed-off-by: Zhou Wenjian Acked-by: Baoquan He Acked-by: Xunlei Pang Signed-off-by: Baoquan He --- Documentation

  1   2   3   4   5   6   7   8   9   10   >