Re: [PATCH v2 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2016-01-06 Thread Xunlei Pang
On 01/07/2016 at 10:36 AM, Minfei Huang wrote: > On 01/07/16 at 10:14am, Xunlei Pang wrote: +static int +kexec_mark_range(unsigned long start, unsigned long end, bool protect) +{ + struct page *page; + unsigned int nr_pages; + + /* For physical range: [start, e

Re: [PATCH v2 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2016-01-06 Thread Minfei Huang
On 01/07/16 at 10:14am, Xunlei Pang wrote: > >> +static int > >> +kexec_mark_range(unsigned long start, unsigned long end, bool protect) > >> +{ > >> + struct page *page; > >> + unsigned int nr_pages; > >> + > >> + /* For physical range: [start, end] */ > >> + if (!start || !end || start > end)

Re: [PATCH v2 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2016-01-06 Thread Xunlei Pang
On 01/07/2016 at 10:14 AM, Xunlei Pang wrote: > On 01/07/2016 at 01:08 AM, Minfei Huang wrote: >> On 01/06/16 at 05:50pm, Xunlei Pang wrote: >>> diff --git a/arch/x86/kernel/machine_kexec_64.c >>> b/arch/x86/kernel/machine_kexec_64.c >>> index 819ab3f..cda867d 100644 >>> --- a/arch/x86/kernel/mach

Re: [PATCH v2 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2016-01-06 Thread Xunlei Pang
On 01/07/2016 at 01:08 AM, Minfei Huang wrote: > On 01/06/16 at 05:50pm, Xunlei Pang wrote: >> diff --git a/arch/x86/kernel/machine_kexec_64.c >> b/arch/x86/kernel/machine_kexec_64.c >> index 819ab3f..cda867d 100644 >> --- a/arch/x86/kernel/machine_kexec_64.c >> +++ b/arch/x86/kernel/machine_kexec

Re: [PATCH v2 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2016-01-06 Thread Minfei Huang
On 01/06/16 at 05:50pm, Xunlei Pang wrote: > diff --git a/arch/x86/kernel/machine_kexec_64.c > b/arch/x86/kernel/machine_kexec_64.c > index 819ab3f..cda867d 100644 > --- a/arch/x86/kernel/machine_kexec_64.c > +++ b/arch/x86/kernel/machine_kexec_64.c > @@ -536,3 +536,44 @@ overflow: > return

[PATCH v2 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2016-01-06 Thread Xunlei Pang
Implement the protection method for the crash kernel memory reservation for the 64-bit x86 kdump. Signed-off-by: Xunlei Pang --- arch/x86/kernel/machine_kexec_64.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/arch/x86/kernel/machine_kexec_64.c b/ar