Re: Does CONFIG_HARDENED_USERCOPY break /dev/mem?

2017-11-23 Thread Michael Holzheu
Am Wed, 22 Nov 2017 09:43:19 -0800 schrieb Kees Cook : > On Wed, Nov 22, 2017 at 1:28 AM, Michael Holzheu > wrote: > > Am Mon, 13 Nov 2017 11:19:38 +0100 > > schrieb Michael Holzheu : > > > >> Am Fri, 10 Nov 2017 10:46:49 -0800 > >> schrieb Kees Cook : &

Re: Does CONFIG_HARDENED_USERCOPY break /dev/mem?

2017-11-22 Thread Michael Holzheu
Am Mon, 13 Nov 2017 11:19:38 +0100 schrieb Michael Holzheu : > Am Fri, 10 Nov 2017 10:46:49 -0800 > schrieb Kees Cook : > > > On Fri, Nov 10, 2017 at 7:45 AM, Michael Holzheu > > wrote: > > > Hello Kees, > > > > > > When I try to run the

Re: Does CONFIG_HARDENED_USERCOPY break /dev/mem?

2017-11-13 Thread Michael Holzheu
Am Fri, 10 Nov 2017 10:46:49 -0800 schrieb Kees Cook : > On Fri, Nov 10, 2017 at 7:45 AM, Michael Holzheu > wrote: > > Hello Kees, > > > > When I try to run the crash tool on my s390 live system I get a kernel panic > > when reading memory within the ker

Does CONFIG_HARDENED_USERCOPY break /dev/mem?

2017-11-10 Thread Michael Holzheu
Hello Kees, When I try to run the crash tool on my s390 live system I get a kernel panic when reading memory within the kernel image: # uname -a Linux r3545011 4.14.0-rc8-00066-g1c9dbd4615fd #45 SMP PREEMPT Fri Nov 10 16:16:22 CET 2017 s390x s390x s390x GNU/Linux # crash /boot/vmlinux-devel

Re: [PATCH] s390/crash: Fix KEXEC_NOTE_BYTES definition

2017-06-21 Thread Michael Holzheu
the ELF header in the new kernel anyway. Therefore remove the macro. Reported-by: Xunlei Pang Reviewed-by: Mikhail Zaslonko Signed-off-by: Michael Holzheu --- arch/s390/include/asm/kexec.h | 18 -- include/linux/crash_core.h| 5 + include/linux/kexec.h | 9 --

Re: [PATCH] s390/crash: Fix KEXEC_NOTE_BYTES definition

2017-06-21 Thread Michael Holzheu
Hi Xunlei, Sorry for the late reply - I was on vacation up to now. Give us some time to look into this issue. Michael Am Fri, 9 Jun 2017 10:17:05 +0800 schrieb Xunlei Pang : > S390 KEXEC_NOTE_BYTES is not used by note_buf_t as before, which > is now defined as follows: > typedef u32 note_b

Re: [PATCH v4 1/3] kexec: Move vmcoreinfo out of the kernel's .bss section

2017-04-24 Thread Michael Holzheu
extra pages for these vmcoreinfo_XXX variables, > one advantage is that it enhances some safety of vmcoreinfo, because > vmcoreinfo now is kept far away from other kernel data structures. > > Suggested-by: Eric Biederman > Cc: Michael Holzheu > Cc: Juergen Gross > Signed-off-by:

Re: [PATCH v3 1/3] kexec: Move vmcoreinfo out of the kernel's .bss section

2017-03-23 Thread Michael Holzheu
Am Thu, 23 Mar 2017 17:23:53 +0800 schrieb Xunlei Pang : > On 03/23/2017 at 04:48 AM, Michael Holzheu wrote: > > Am Wed, 22 Mar 2017 12:30:04 +0800 > > schrieb Dave Young : > > > >> On 03/21/17 at 10:18pm, Eric W. Biederman wrote: > >>> Dave Young w

Re: [PATCH v3 1/3] kexec: Move vmcoreinfo out of the kernel's .bss section

2017-03-22 Thread Michael Holzheu
Am Wed, 22 Mar 2017 12:30:04 +0800 schrieb Dave Young : > On 03/21/17 at 10:18pm, Eric W. Biederman wrote: > > Dave Young writes: > > [snip] > > > I think makedumpfile is using it, but I also vote to remove the > > > CRASHTIME. It is better not to do this while crashing and a makedumpfile > >

[PATCH] bpf/samples: Fix PT_REGS_IP on s390x and use it

2016-11-23 Thread Michael Holzheu
The files "sampleip_kern.c" and "trace_event_kern.c" directly access "ctx->regs.ip" which is not available on s390x. Fix this and use the PT_REGS_IP() macro instead. Besides of that also fix the macro for s390x and use psw.addr from pt_regs. Reported-by: Zvo

Re: [PATCH] s390/hypfs: Use kmalloc_array() in diag0c_store()

2016-09-01 Thread Michael Holzheu
Am Thu, 1 Sep 2016 17:39:02 +0200 schrieb Paolo Bonzini : > > > On 01/09/2016 12:32, Heiko Carstens wrote: > > On Thu, Sep 01, 2016 at 11:38:15AM +0200, SF Markus Elfring wrote: > >> From: Markus Elfring > >> Date: Thu, 1 Sep 2016 11:30:58 +0200 > >> > >> A multiplication for the size determina

Re: [bisected] "sched: Allow per-cpu kernel threads to run on online && !active" causes warning

2016-08-19 Thread Michael Holzheu
Am Thu, 18 Aug 2016 10:42:08 -0400 schrieb Tejun Heo : > Hello, Michael. > > On Thu, Aug 18, 2016 at 11:30:51AM +0200, Michael Holzheu wrote: > > Well, "no requirement" this is not 100% correct. Currently we use > > the CPU topology information to assign new

Re: [bisected] "sched: Allow per-cpu kernel threads to run on online && !active" causes warning

2016-08-18 Thread Michael Holzheu
Am Wed, 17 Aug 2016 09:58:55 -0400 schrieb Tejun Heo : > Hello, Heiko. > > On Wed, Aug 17, 2016 at 12:19:53AM +0200, Heiko Carstens wrote: > > I think the easiest solution would be to simply assign all cpus, > > for which we do not have any topology information, to an arbitrary > > node; e.g. rou

Re: [bisected] "sched: Allow per-cpu kernel threads to run on online && !active" causes warning

2016-08-17 Thread Michael Holzheu
Am Wed, 17 Aug 2016 00:19:53 +0200 schrieb Heiko Carstens : > On Tue, Aug 16, 2016 at 11:42:05AM -0400, Tejun Heo wrote: > > Hello, Peter. > > > > On Tue, Aug 16, 2016 at 05:29:49PM +0200, Peter Zijlstra wrote: > > > On Tue, Aug 16, 2016 at 11:20:27AM -0400, Tejun Heo wrote: > > > > As long as th

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

2016-04-05 Thread Michael Holzheu
; crash_map/unmap_reserved_pages() which by now has been only > used by S390. > > The consolidation work needs the crash memory to be mapped > initially, so get rid of S390 crash kernel memblock removal > in reserve_crashkernel(). If you fix this comment, I am fine with your patch. Acked-by: Michael Holzheu

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

2016-04-04 Thread Michael Holzheu
Hello Xunlei, On Sat, 2 Apr 2016 09:23:50 +0800 Xunlei Pang wrote: > On 2016/04/02 at 01:41, Michael Holzheu wrote: > > Hello Xunlei again, > > > > Some initial comments below... > > > > On Wed, 30 Mar 2016 19:47:21 +0800 &

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

2016-04-01 Thread Michael Holzheu
49b0>] crash_shrink_memory+0xb8/0x1a0) > ([<0015bcae>] kexec_crash_size_store+0x46/0x60) > ([<0033d326>] kernfs_fop_write+0x136/0x180) > ([<0000002b253c>] __vfs_write+0x3c/0x100) > ([<002b35ce>] vfs_write+0x8e/0x190) > ([<000

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

2016-04-01 Thread Michael Holzheu
e+0x46/0x60) > ([<0033d326>] kernfs_fop_write+0x136/0x180) > ([<0000002b253c>] __vfs_write+0x3c/0x100) > ([<002b35ce>] vfs_write+0x8e/0x190) > ([<002b4ca0>] SyS_write+0x60/0xd0) > ([<0063067c>] system_cal

Re: [PATCH] kexec: unmap reserved pages for each error-return way

2016-01-28 Thread Michael Holzheu
On Thu, 28 Jan 2016 21:12:54 +0800 Xunlei Pang wrote: > On 2016/01/28 at 20:44, Michael Holzheu wrote: > > On Thu, 28 Jan 2016 19:56:56 +0800 > > Xunlei Pang wrote: > > > >> On 2016/01/28 at 18:32, Michael Holzheu wrote: > >>> On Wed, 27 Jan 2016

Re: [PATCH] kexec: unmap reserved pages for each error-return way

2016-01-28 Thread Michael Holzheu
On Thu, 28 Jan 2016 19:56:56 +0800 Xunlei Pang wrote: > On 2016/01/28 at 18:32, Michael Holzheu wrote: > > On Wed, 27 Jan 2016 11:15:46 -0800 > > Andrew Morton wrote: > > > >> On Wed, 27 Jan 2016 14:48:31 +0300 Dmitry Safonov > >> wrote: > &g

Re: [PATCH] kexec: unmap reserved pages for each error-return way

2016-01-28 Thread Michael Holzheu
On Wed, 27 Jan 2016 11:15:46 -0800 Andrew Morton wrote: > On Wed, 27 Jan 2016 14:48:31 +0300 Dmitry Safonov > wrote: > > > For allocation of kimage failure or kexec_prepare or load segments > > errors there is no need to keep crashkernel memory mapped. > > It will affect only s390 as map/unmap

Re: [PATCH] numa: fix /proc//numa_maps for hugetlbfs on s390

2016-01-26 Thread Michael Holzheu
On Mon, 25 Jan 2016 14:51:16 -0800 Andrew Morton wrote: > On Mon, 25 Jan 2016 17:30:42 +0100 Michael Holzheu > wrote: > > > When working with hugetlbfs ptes (which are actually pmds) is not > > valid to directly use pte functions like pte_present() because the > >

[PATCH] numa: fix /proc//numa_maps for hugetlbfs on s390

2016-01-25 Thread Michael Holzheu
the "numa_maps" output. 2) The pte_dirty() function always returns false for all hugetlb ptes. Therefore these pages are reported as "mapped=xxx" instead of "dirty=xxx". Therefore use huge_ptep_get() to correctly convert the hugetlb ptes. Reviewed-by: Gerald Sc

[PATCH] numa: fix /proc//numa_maps on s390

2016-01-20 Thread Michael Holzheu
the two missing functions calls to do this. Reviewed-by: Gerald Schaefer Signed-off-by: Michael Holzheu --- fs/proc/task_mmu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 65a1b6c..e287e32 100644 --- a/fs/proc

Re: [RFC][PATCH] sched: Start stopper early

2015-10-26 Thread Michael Holzheu
> > > > > > [ FWIW, I will be offline for the next two weeks ] > > > > So the series from Oleg would be good to try; I can make a git tree for > > you, or otherwise stuff the lot into a single patch. > > > > Should I be talking to someone else whilst y

Re: [RFC PATCH] drivers/base: use cpu->node_id for from_nid

2015-08-06 Thread Michael Holzheu
On Wed, 5 Aug 2015 13:51:21 -0700 Greg Kroah-Hartman wrote: > On Thu, Jul 30, 2015 at 08:35:51PM +0200, Michael Holzheu wrote: > > Hello Greg, > > > > Is it possible to use "from_nid = cpu->node_id"? > > > > Background: > > > >

[RFC PATCH] drivers/base: use cpu->node_id for from_nid

2015-07-30 Thread Michael Holzheu
is that each CPU that was deconfigured at boot time stays in node 0 because cpu_to_node() returns the same node before and after setting the CPU online. Using "cpu->node_id" for "from_nid" instead of calling cpu_to_node() would help in our case. Signed-off-by: Michael

Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-14 Thread Michael Holzheu
On Tue, 14 Jul 2015 10:09:20 -0400 Vivek Goyal wrote: > On Fri, Jul 10, 2015 at 11:14:06AM +0200, Michael Holzheu wrote: > > [..] > > What about the following patch: > > --- > > diff --git a/kernel/kexec.c b/kernel/kexec.c > > index 7a36fdc..7837c4e 100644 &

Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-10 Thread Michael Holzheu
On Fri, 10 Jul 2015 11:14:06 +0200 Michael Holzheu wrote: > On Fri, 10 Jul 2015 17:03:22 +0800 > Minfei Huang wrote: [snip] > +static int __kexec_load(unsigned long entry, unsigned long nr_segments, > + struct kexec_segment __us

Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-10 Thread Michael Holzheu
On Fri, 10 Jul 2015 17:03:22 +0800 Minfei Huang wrote: > On 07/10/15 at 10:54P, Michael Holzheu wrote: > > On Fri, 10 Jul 2015 13:12:17 +0800 > > Minfei Huang wrote: > > > > > For some arch, kexec shall map the reserved pages, then use them, when > >

Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-10 Thread Michael Holzheu
On Fri, 10 Jul 2015 13:12:17 +0800 Minfei Huang wrote: > For some arch, kexec shall map the reserved pages, then use them, when > we try to start the kdump service. > > Now kexec will never unmap the reserved pages, once it fails to continue > starting the kdump service. So we make a pair of map

Re: [PATCH v3] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-10 Thread Michael Holzheu
On Fri, 10 Jul 2015 12:05:27 +0800 Minfei Huang wrote: > On 07/09/15 at 05:54P, Michael Holzheu wrote: > > On Tue, 7 Jul 2015 17:18:40 -0400 > > Vivek Goyal wrote: > > > > > On Thu, Jul 02, 2015 at 09:45:52AM +0800, Minfei Huang wrote: > > > > [snip]

Re: [PATCH v3] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-09 Thread Michael Holzheu
On Tue, 7 Jul 2015 17:18:40 -0400 Vivek Goyal wrote: > On Thu, Jul 02, 2015 at 09:45:52AM +0800, Minfei Huang wrote: [snip] > I am thinking of moving kernel loading code in a separate function to > make things little simpler. Right now it is confusing. > > Can you please test attached patch. I

Re: [PATCH v2] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-01 Thread Michael Holzheu
Hello Minfei, Regarding functionality your patch looks ok for me. But the code is not easy to read. What about replacing the "failure" label with "fail_unmap_pages"? Michael On Tue, 30 Jun 2015 13:44:46 +0800 Minfei Huang wrote: > For some arch, kexec shall map the reserved pages, then use th

Re: [PATCH RFC] s390/sclp: pass timeout as HZ independent value

2015-05-29 Thread Michael Holzheu
On Fri, 29 May 2015 13:49:36 +0200 Nicholas Mc Guire wrote: > On Fri, 29 May 2015, Heiko Carstens wrote: > > > On Fri, May 29, 2015 at 11:51:54AM +0200, Nicholas Mc Guire wrote: > > > On Fri, 29 May 2015, Heiko Carstens wrote: > > > > Yes, the orginal code seems to be broken. Since I've no idea

Re: [PATCH] samples/bpf: Fix test_maps/bpf_get_next_key() test

2015-01-23 Thread Michael Holzheu
On Thu, 22 Jan 2015 09:32:43 -0800 Alexei Starovoitov wrote: > On Thu, Jan 22, 2015 at 8:01 AM, Michael Holzheu > wrote: > > Looks like the "test_maps" test case expects to get the keys in > > the wrong order when iterating over the elements: > > > &g

Re: [PATCH] bpf: Call rcu_read_unlock() before copy_to_user()

2015-01-22 Thread Michael Holzheu
On Thu, 22 Jan 2015 09:27:21 -0800 Alexei Starovoitov wrote: > On Thu, Jan 22, 2015 at 7:57 AM, Michael Holzheu > wrote: > > We must not hold locks when calling copy_to_user(): > > > > BUG: sleeping function called from invalid context at mm/memory.c:3732 > > in_a

[PATCH] samples/bpf: Fix test_maps/bpf_get_next_key() test

2015-01-22 Thread Michael Holzheu
rted Fix this and test for the correct order. Signed-off-by: Michael Holzheu --- samples/bpf/test_maps.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/samples/bpf/test_maps.c +++ b/samples/bpf/test_maps.c @@ -69,9 +69,9 @@ static void test_hashmap_sanity(int i, v

[PATCH] bpf: Call rcu_read_unlock() before copy_to_user()

2015-01-22 Thread Michael Holzheu
lock earlier because it is not needed for copy_to_user(). Signed-off-by: Michael Holzheu --- kernel/bpf/syscall.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -172,17 +172,16 @@ static int map_lookup_elem(union bpf_att

Re: [PATCH 0/6] kexec: A new system call to allow in kernel loading

2013-11-25 Thread Michael Holzheu
On Mon, 25 Nov 2013 10:36:20 -0500 Vivek Goyal wrote: > On Mon, Nov 25, 2013 at 11:04:28AM +0100, Michael Holzheu wrote: > > On Fri, 22 Nov 2013 05:34:03 -0800 > > ebied...@xmission.com (Eric W. Biederman) wrote: > > > > > Vivek Goyal writes: > > > >

Re: [PATCH 0/6] kexec: A new system call to allow in kernel loading

2013-11-25 Thread Michael Holzheu
On Fri, 22 Nov 2013 05:34:03 -0800 ebied...@xmission.com (Eric W. Biederman) wrote: > Vivek Goyal writes: > >> There is also a huge missing piece of this in that your purgatory is not > >> checking a hash of the loaded image before jumping too it. Without that > >> this is a huge regression at

Re: [PATCH 0/3] procfs, vmcore: fix regression of mmap on /proc/vmcore since v3.12-rc1

2013-10-15 Thread Michael Holzheu
Hello Hatayama, We successfully tested your patches on s390, mmap for /proc/vmcore seems to work again. Thanks! Michael On Mon, 14 Oct 2013 18:36:06 +0900 HATAYAMA Daisuke wrote: > This patch set fixes regression of mmap on /proc/vmcore since > v3.12-rc1. The primary one is the 2nd patch. The

mmap for /proc/vmcore broken since 3.12-rc1

2013-10-02 Thread Michael Holzheu
Hello Alexey, Looks like the following commit broke mmap for /proc/vmcore: commit c4fe24485729fc2cbff324c111e67a1cc2f9adea Author: Alexey Dobriyan Date: Tue Aug 20 22:17:24 2013 +0300 sparc: fix PCI device proc file mmap(2) Because /proc/vmcore (fs/proc/vmcore.c) does not implement the g

[PATCH] mm: Fix bootmem error handling in pcpu_page_first_chunk()

2013-09-17 Thread Michael Holzheu
] [<00b14814>] setup_per_cpu_areas+0x5c/0x28c Signed-off-by: Michael Holzheu --- mm/percpu.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1705,9 +1705,12 @@ int __init pcpu_embed_first_chunk(size_t goto out_free;

[PATCH v8 0/6] kdump: Allow ELF header creation in new kernel

2013-07-23 Thread Michael Holzheu
l memory for memory above HSA_SIZE Jan Willeke (1): s390/vmcore: Implement remap_oldmem_pfn_range for s390 Michael Holzheu (5): vmcore: Introduce ELF header in new memory feature s390/vmcore: Use ELF header in new memory feature vmcore: Introduce remap_oldmem_pfn_range() vmcore: Enable /

[PATCH v8 1/6] vmcore: Introduce ELF header in new memory feature

2013-07-23 Thread Michael Holzheu
architecture backend code to read from new memory: * elfcorehdr_alloc: Allocate ELF header * elfcorehdr_free: Free the memory of the ELF header * elfcorehdr_read: Read from ELF header * elfcorehdr_read_notes: Read from ELF notes Signed-off-by: Michael Holzheu Acked-by: Vivek Goyal --- fs

[PATCH v8 4/6] s390/vmcore: Implement remap_oldmem_pfn_range for s390

2013-07-23 Thread Michael Holzheu
From: Jan Willeke This patch introduces the s390 specific way to map pages from oldmem. The memory area below OLDMEM_SIZE is mapped with offset OLDMEM_BASE. The other old memory is mapped directly. Signed-off-by: Jan Willeke Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c

[PATCH v8 3/6] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-23 Thread Michael Holzheu
This handler works as follows: * Get already available or new page from page cache (find_or_create_page) * Check if /proc/vmcore page is filled with data (PageUptodate) * If yes: Return that page * If no: Fill page using __vmcore_read(), set PageUptodate, and return page Signed-off-by: Michael Ho

[PATCH v8 6/6] s390/vmcore: Use vmcore for zfcpdump

2013-07-23 Thread Michael Holzheu
This patch modifies the s390 copy_oldmem_page() and remap_oldmem_pfn_range() function for zfcpdump to read from the HSA memory if memory below HSA_SIZE bytes is requested. Otherwise real memory is used. Signed-off-by: Michael Holzheu --- arch/s390/Kconfig | 3 +- arch/s390/include

[PATCH v8 5/6] vmcore: Enable /proc/vmcore mmap for s390

2013-07-23 Thread Michael Holzheu
The patch "s390/vmcore: Implement remap_oldmem_pfn_range for s390" allows now to use mmap also on s390. So enable mmap for s390 again. Signed-off-by: Michael Holzheu --- fs/proc/vmcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/vmcore.c b/fs/pro

[PATCH v8 2/6] s390/vmcore: Use ELF header in new memory feature

2013-07-23 Thread Michael Holzheu
This patch now exchanges the old relocate mechanism with the new arch function call override mechanism that allows to create the ELF core header in the 2nd kernel. Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c | 81 --- 1 file changed

Re: [PATCH v7 0/5] kdump: Allow ELF header creation in new kernel

2013-07-18 Thread Michael Holzheu
On Thu, 18 Jul 2013 09:27:57 -0400 Vivek Goyal wrote: > On Thu, Jul 18, 2013 at 12:40:04PM +0200, Michael Holzheu wrote: > > On Wed, 17 Jul 2013 17:42:07 -0400 > > Vivek Goyal wrote: > > > On Wed, Jul 17, 2013 at 06:00:49PM +0200, Michael Holzheu wrote: > > >

Re: [PATCH v7 0/5] kdump: Allow ELF header creation in new kernel

2013-07-18 Thread Michael Holzheu
On Wed, 17 Jul 2013 17:42:07 -0400 Vivek Goyal wrote: > On Wed, Jul 17, 2013 at 06:00:49PM +0200, Michael Holzheu wrote: [snip] > > But this is all additional effort now and would not be necessary if we > > integrate this patch series in 3.11. > > > > Perhaps we sh

Re: [PATCH v7 0/5] kdump: Allow ELF header creation in new kernel

2013-07-17 Thread Michael Holzheu
> On Tue, Jul 16, 2013 at 06:18:10PM +0200, Michael Holzheu wrote: > > Hello Andrew, > > > > Here a new kdump patch series that we have discussed with Vivek and > > Hatayama during the last months. > > > > Besides of the feature described below, this patc

[PATCH v7 4/5] s390/vmcore: Implement remap_oldmem_pfn_range for s390

2013-07-16 Thread Michael Holzheu
From: Jan Willeke This patch introduces the s390 specific way to map pages from oldmem. The memory area below OLDMEM_SIZE is mapped with offset OLDMEM_BASE. The other old memory is mapped directly. Signed-off-by: Jan Willeke Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c

[PATCH v7 2/5] s390/vmcore: Use ELF header in new memory feature

2013-07-16 Thread Michael Holzheu
This patch now exchanges the old relocate mechanism with the new arch function call override mechanism that allows to create the ELF core header in the 2nd kernel. Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c | 81 --- 1 file changed

[PATCH v7 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-16 Thread Michael Holzheu
This handler works as follows: * Get already available or new page from page cache (find_or_create_page) * Check if /proc/vmcore page is filled with data (PageUptodate) * If yes: Return that page * If no: Fill page using __vmcore_read(), set PageUptodate, and return page Signed-off-by: Michael Ho

[PATCH v7 0/5] kdump: Allow ELF header creation in new kernel

2013-07-16 Thread Michael Holzheu
py_oldmem_page() copies from HSA for memory below HSA_SIZE - copy_oldmem_page() copies from real memory for memory above HSA_SIZE --- Jan Willeke (1): s390/vmcore: Implement remap_oldmem_pfn_range for s390 Michael Holzheu (4): vmcore: Introduce ELF header in new memory feature s390/v

[PATCH v7 1/5] vmcore: Introduce ELF header in new memory feature

2013-07-16 Thread Michael Holzheu
architecture backend code to read from new memory: * elfcorehdr_alloc: Allocate ELF header * elfcorehdr_free: Free the memory of the ELF header * elfcorehdr_read: Read from ELF header * elfcorehdr_read_notes: Read from ELF notes Signed-off-by: Michael Holzheu Acked-by: Vivek Goyal --- fs

[PATCH v7 5/5] s390/vmcore: Use vmcore for zfcpdump

2013-07-16 Thread Michael Holzheu
This patch modifies the s390 copy_oldmem_page() and remap_oldmem_pfn_range() function for zfcpdump to read from the HSA memory if memory below HSA_SIZE bytes is requested. Otherwise real memory is used. Signed-off-by: Michael Holzheu --- arch/s390/Kconfig | 3 +- arch/s390/include

Re: [PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-16 Thread Michael Holzheu
On Tue, 16 Jul 2013 10:04:18 -0400 Vivek Goyal wrote: > On Tue, Jul 16, 2013 at 11:25:27AM +0200, Michael Holzheu wrote: > > [..] > > > > Hello Vivek and Andrew, > > > > > > > > We just realized that Hatayama's mmap patches went into v3.11-rc1.

Re: [PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-16 Thread Michael Holzheu
On Mon, 15 Jul 2013 10:27:08 -0400 Vivek Goyal wrote: > On Mon, Jul 15, 2013 at 03:44:51PM +0200, Michael Holzheu wrote: > > On Tue, 2 Jul 2013 11:42:14 -0400 > > Vivek Goyal wrote: > > > > > On Mon, Jul 01, 2013 at 09:32:37PM +0200, Michael Holzheu wrote: > &g

Re: [PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-15 Thread Michael Holzheu
On Tue, 2 Jul 2013 11:42:14 -0400 Vivek Goyal wrote: > On Mon, Jul 01, 2013 at 09:32:37PM +0200, Michael Holzheu wrote: > > For zfcpdump we can't map the HSA storage because it is only available > > via a read interface. Therefore, for the new vmcore mmap feature we have

Re: [PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-10 Thread Michael Holzheu
On Wed, 10 Jul 2013 18:50:18 +0900 HATAYAMA Daisuke wrote: [snip] > (2013/07/10 17:42), Michael Holzheu wrote: > > My suggestion is to add the WARN_ONCE() for #ifndef CONFIG_S390. This has > > the same > > effect as your suggestion for all architectures besides of s390.

Re: [PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-10 Thread Michael Holzheu
Hello Hatayama, On Tue, 09 Jul 2013 14:49:48 +0900 HATAYAMA Daisuke wrote: > (2013/07/08 23:28), Vivek Goyal wrote: > > On Mon, Jul 08, 2013 at 11:28:39AM +0200, Michael Holzheu wrote: > >> On Mon, 08 Jul 2013 14:32:09 +0900 > >> HATAYAMA Daisuke wrote: [snip] >

Re: [PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-08 Thread Michael Holzheu
On Mon, 08 Jul 2013 14:32:09 +0900 HATAYAMA Daisuke wrote: > (2013/07/02 4:32), Michael Holzheu wrote: > > For zfcpdump we can't map the HSA storage because it is only available > > via a read interface. Therefore, for the new vmcore mmap feature we have > > introduce

Re: [PATCH v6 2/5] s390/vmcore: Use ELF header in new memory feature

2013-07-03 Thread Michael Holzheu
On Wed, 3 Jul 2013 10:15:29 -0400 Vivek Goyal wrote: > On Wed, Jul 03, 2013 at 09:59:13AM +0200, Michael Holzheu wrote: > > On Tue, 2 Jul 2013 12:23:23 -0400 > > Vivek Goyal wrote: > > > > > On Mon, Jul 01, 2013 at 09:32:36PM +0200, Michael Holzheu wrote: >

Re: [PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-03 Thread Michael Holzheu
On Tue, 2 Jul 2013 11:42:14 -0400 Vivek Goyal wrote: > On Mon, Jul 01, 2013 at 09:32:37PM +0200, Michael Holzheu wrote: [snip] > > This handler works as follows: > > > > * Get already available or new page from page cache (find_or_create_page) > > * Check if /proc

Re: [PATCH v6 2/5] s390/vmcore: Use ELF header in new memory feature

2013-07-03 Thread Michael Holzheu
On Tue, 2 Jul 2013 12:23:23 -0400 Vivek Goyal wrote: > On Mon, Jul 01, 2013 at 09:32:36PM +0200, Michael Holzheu wrote: > > [..] > > +ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos) > > +{ > > + void *src = (void *)(unsigned long)*ppos; > > + >

[PATCH v6 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-07-01 Thread Michael Holzheu
This handler works as follows: * Get already available or new page from page cache (find_or_create_page) * Check if /proc/vmcore page is filled with data (PageUptodate) * If yes: Return that page * If no: Fill page using __vmcore_read(), set PageUptodate, and return page Signed-off-by: Michael Ho

[PATCH v6 2/5] s390/vmcore: Use ELF header in new memory feature

2013-07-01 Thread Michael Holzheu
This patch now exchanges the old relocate mechanism with the new arch function call override mechanism that allows to create the ELF core header in the 2nd kernel. Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c | 81 --- 1 file changed

[PATCH v6 5/5] s390/vmcore: Use vmcore for zfcpdump

2013-07-01 Thread Michael Holzheu
This patch modifies the s390 copy_oldmem_page() and remap_oldmem_pfn_range() function for zfcpdump to read from the HSA memory if memory below HSA_SIZE bytes is requested. Otherwise real memory is used. Signed-off-by: Michael Holzheu --- arch/s390/Kconfig | 3 +- arch/s390/include

[PATCH v6 1/5] vmcore: Introduce ELF header in new memory feature

2013-07-01 Thread Michael Holzheu
architecture backend code to read from new memory: * elfcorehdr_alloc: Allocate ELF header * elfcorehdr_free: Free the memory of the ELF header * elfcorehdr_read: Read from ELF header * elfcorehdr_read_notes: Read from ELF notes Signed-off-by: Michael Holzheu --- fs/proc/vmcore.c

[PATCH v6 0/5] kdump: Allow ELF header creation in new kernel

2013-07-01 Thread Michael Holzheu
emap_oldmem_pfn_range for s390 Michael Holzheu (4): vmcore: Introduce ELF header in new memory feature s390/vmcore: Use ELF header in new memory feature vmcore: Introduce remap_oldmem_pfn_range() s390/vmcore: Use vmcore for zfcpdump arch/s390/Kconfig | 3 +- arch/s390/

[PATCH v6 4/5] s390/vmcore: Implement remap_oldmem_pfn_range for s390

2013-07-01 Thread Michael Holzheu
From: Jan Willeke This patch introduces the s390 specific way to map pages from oldmem. The memory area below OLDMEM_SIZE is mapped with offset OLDMEM_BASE. The other old memory is mapped directly. Signed-off-by: Jan Willeke Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c

Re: [PATCH v5 1/5] vmcore: Introduce ELF header in new memory feature

2013-07-01 Thread Michael Holzheu
On Mon, 1 Jul 2013 13:37:27 -0400 Vivek Goyal wrote: > On Fri, Jun 28, 2013 at 10:15:52AM +0200, Michael Holzheu wrote: > > On Thu, 27 Jun 2013 16:23:34 -0400 > > Vivek Goyal wrote: > > > > > On Thu, Jun 27, 2013 at 03:32:02PM -0400, Vivek Goyal wrote: > &g

Re: [PATCH v5 1/5] vmcore: Introduce ELF header in new memory feature

2013-06-28 Thread Michael Holzheu
On Thu, 27 Jun 2013 16:23:34 -0400 Vivek Goyal wrote: > On Thu, Jun 27, 2013 at 03:32:02PM -0400, Vivek Goyal wrote: > > On Fri, Jun 21, 2013 at 04:17:03PM +0200, Michael Holzheu wrote: > > > On Fri, 14 Jun 2013 14:54:02 -0400 > > > Vivek Goyal wrote: [snip] > T

Re: [PATCH v5 1/5] vmcore: Introduce ELF header in new memory feature

2013-06-21 Thread Michael Holzheu
On Fri, 14 Jun 2013 14:54:02 -0400 Vivek Goyal wrote: > On Fri, Jun 07, 2013 at 06:55:57PM +0200, Michael Holzheu wrote: > > [..] > > @@ -935,10 +967,17 @@ static int __init vmcore_init(void) > > { > > int rc = 0; > > > > - /* If elfcorehdr= has b

Re: [PATCH v5 0/5] kdump: Allow ELF header creation in new kernel

2013-06-21 Thread Michael Holzheu
On Fri, 14 Jun 2013 14:54:54 -0400 Vivek Goyal wrote: > On Fri, Jun 07, 2013 at 06:55:56PM +0200, Michael Holzheu wrote: > > [..] > > In this patch series I did not include the discussed ELF header swap trick > > patch because with the ELF header read functions this patch

Re: [PATCH v5 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-06-13 Thread Michael Holzheu
On Thu, 13 Jun 2013 10:32:48 +0900 HATAYAMA Daisuke wrote: > > Perhaps one open issue remains: > > > > Can we remove the page from the page cache if __read_vmcore() fails? > > > > Yes, use page_cache_release() after unlocking the page like: > > if (__read_vmcore(buf, PAGE_

Re: [PATCH v5 5/5] s390/vmcore: Use vmcore for zfcpdump

2013-06-12 Thread Michael Holzheu
On Wed, 12 Jun 2013 08:47:52 +0900 HATAYAMA Daisuke wrote: > (2013/06/08 1:56), Michael Holzheu wrote: [snip] > > +static int remap_oldmem_pfn_range_zfcpdump(struct vm_area_struct *vma, > > + uns

Re: [PATCH v5 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-06-12 Thread Michael Holzheu
On Tue, 11 Jun 2013 21:42:15 +0900 HATAYAMA Daisuke wrote: > 2013/6/11 Michael Holzheu : > > On Mon, 10 Jun 2013 22:40:24 +0900 > > HATAYAMA Daisuke wrote: > > > >> 2013/6/8 Michael Holzheu : > >> > >> > @@ -225,6 +251,56 @@ static ssize_t

Re: [PATCH v5 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-06-10 Thread Michael Holzheu
On Mon, 10 Jun 2013 22:40:24 +0900 HATAYAMA Daisuke wrote: > 2013/6/8 Michael Holzheu : > > > @@ -225,6 +251,56 @@ static ssize_t read_vmcore(struct file *file, char > > __user *buffer, > > return acc; > > } > > > > +static ssize_t read_vmc

Re: [PATCH v5 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-06-10 Thread Michael Holzheu
On Mon, 10 Jun 2013 22:40:24 +0900 HATAYAMA Daisuke wrote: > > +static int mmap_vmcore_fault(struct vm_area_struct *vma, struct vm_fault > > *vmf) > > +{ > > + struct address_space *mapping = vma->vm_private_data; > > + pgoff_t index = vmf->pgoff; > > + struct page *page; > > +

Re: [PATCH v5 1/5] vmcore: Introduce ELF header in new memory feature

2013-06-10 Thread Michael Holzheu
On Mon, 10 Jun 2013 22:35:30 +0900 HATAYAMA Daisuke wrote: > 2013/6/8 Michael Holzheu : > > > @@ -935,10 +967,17 @@ static int __init vmcore_init(void) > > { > > int rc = 0; > > > > - /* If elfcorehdr= has been passed in cmdline, then cap

Re: [PATCH v5 2/5] s390/vmcore: Use ELF header in new memory feature

2013-06-10 Thread Michael Holzheu
On Mon, 10 Jun 2013 22:36:57 +0900 HATAYAMA Daisuke wrote: > > -static int setup_kdump_elfcorehdr(void) > > +void elfcorehdr_free(void) > > { > > - size_t elfcorebuf_sz; > > - char *elfcorebuf; > > - > > - if (!OLDMEM_BASE || is_kdump_kernel()) > > - return -EINVA

Re: [PATCH v5 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-06-10 Thread Michael Holzheu
On Sat, 8 Jun 2013 11:38:00 +0400 Maxim Uvarov wrote: [snip] > > +static int copy_to(void *target, void *src, size_t size, int > > userbuf) +{ > > + if (userbuf) { > > + if (copy_to_user(target, src, size)) > > + return -EFAULT; > > + retur

[PATCH v5 2/5] s390/vmcore: Use ELF header in new memory feature

2013-06-07 Thread Michael Holzheu
This patch now exchanges the old relocate mechanism with the new arch function call override mechanism that allows to create the ELF core header in the 2nd kernel. Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c | 70 ++- 1 file changed

[PATCH v5 5/5] s390/vmcore: Use vmcore for zfcpdump

2013-06-07 Thread Michael Holzheu
This patch modifies the s390 copy_oldmem_page() and remap_oldmem_pfn_range() function for zfcpdump to read from the HSA memory if memory below HSA_SIZE bytes is requested. Otherwise real memory is used. Signed-off-by: Michael Holzheu --- arch/s390/Kconfig | 3 +- arch/s390/include

[PATCH v5 1/5] vmcore: Introduce ELF header in new memory feature

2013-06-07 Thread Michael Holzheu
architecture backend code to read from new memory: * elfcorehdr_alloc: Return the address and size of the ELF header * elfcorehdr_free: Free the memory of the ELF header * elfcorehdr_read: Read from ELF header * elfcorehdr_read_notes: Read from ELF notes Signed-off-by: Michael Holzheu --- fs

[PATCH v5 0/5] kdump: Allow ELF header creation in new kernel

2013-06-07 Thread Michael Holzheu
oldmem_page() copies from HSA for memory below HSA_SIZE - copy_oldmem_page() copies from real memory for memory above HSA_SIZE Jan Willeke (1): s390/kdump/mmap: Implement remap_oldmem_pfn_range for s390 Michael Holzheu (4): kdump: Introduce ELF header in new memory feature s390/kdump: Use EL

[PATCH v5 4/5] s390/vmcore: Implement remap_oldmem_pfn_range for s390

2013-06-07 Thread Michael Holzheu
From: Jan Willeke This patch introduces the s390 specific way to map pages from oldmem. The memory area below OLDMEM_SIZE is mapped with offset OLDMEM_BASE. The other old memory is mapped directly. Signed-off-by: Jan Willeke Signed-off-by: Michael Holzheu --- arch/s390/kernel/crash_dump.c

[PATCH v5 3/5] vmcore: Introduce remap_oldmem_pfn_range()

2013-06-07 Thread Michael Holzheu
This handler does the following: * Check if /proc/vmcore page cache page is already available * If yes: - Return that page * If no: - Allocate new page - Fill page using __vmcore_read() - Add new page to page cache Signed-off-by: Michael Holzheu --- fs/proc/vmcore.c

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-06-03 Thread Michael Holzheu
On Mon, 3 Jun 2013 11:59:40 -0400 Vivek Goyal wrote: > On Mon, Jun 03, 2013 at 03:27:18PM +0200, Michael Holzheu wrote: > > [..] > > > If not, how would remap_pfn_range() work with HSA region when > > > /proc/vmcore is mmaped()? > > > > I am no memory

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-06-03 Thread Michael Holzheu
On Fri, 31 May 2013 12:01:58 -0400 Vivek Goyal wrote: > On Fri, May 31, 2013 at 04:21:27PM +0200, Michael Holzheu wrote: > > On Thu, 30 May 2013 16:38:47 -0400 > > Vivek Goyal wrote: > > > > > On Wed, May 29, 2013 at 01:51:44PM +0200, Michael Holzheu wrote: &

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-05-31 Thread Michael Holzheu
On Thu, 30 May 2013 16:38:47 -0400 Vivek Goyal wrote: > On Wed, May 29, 2013 at 01:51:44PM +0200, Michael Holzheu wrote: > > [..] > > >>> START QUOTE > > > > [PATCH v3 1/3] kdump: Introduce ELF header in new memory feature > > > > Currently f

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-05-29 Thread Michael Holzheu
On Wed, 29 May 2013 12:23:26 -0400 Vivek Goyal wrote: > On Wed, May 29, 2013 at 01:51:44PM +0200, Michael Holzheu wrote: > > On Tue, 28 May 2013 09:55:01 -0400 > > Vivek Goyal wrote: > > > > > On Sat, May 25, 2013 at 02:52:17PM +0200, Michael Holzheu wrote: > &

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-05-29 Thread Michael Holzheu
On Tue, 28 May 2013 09:55:01 -0400 Vivek Goyal wrote: > On Sat, May 25, 2013 at 02:52:17PM +0200, Michael Holzheu wrote: [snip] > > Besides of the newmem mechanism, for completeness, we also > > implemented the oldmem ELF header mechansim in kexec. But this is > >

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-05-25 Thread Michael Holzheu
On Fri, 24 May 2013 13:05:07 -0400 Vivek Goyal wrote: > On Fri, May 24, 2013 at 06:46:53PM +0200, Michael Holzheu wrote: > > On Fri, 24 May 2013 11:28:49 -0400 > > Vivek Goyal wrote: > > > > > On Fri, May 24, 2013 at 05:06:26PM +0200, Michael Holzheu wrote: > &

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-05-25 Thread Michael Holzheu
On Sat, 25 May 2013 16:31:58 +0800 Zhang Yanfei wrote: [snip] > For s390, if we put swap info into the elf header, This will > change /sbin/kexec. But at this point, copy_oldmem_page is still > doing the swap when we try to read the pages among [0 - OLDMEM_SIZE] > and [OLDMEM_BASE - OLDMEM_BASE

  1   2   >