Re: [RFC:PATCH 00/03] powerpc: Expose BookE debug registers through extended ptrace interface

2009-12-11 Thread Thiago Jung Bauermann
a feature flag, but it would be equivalent to num_condition_regs 0. I don't have a strong opinion either way. The current GDB code we have here uses num_condition_regs 0 to discover if DVCs are supported, so a PPC_DEBUG_FEATURE constant for that is redundant IMHO. -- []'s Thiago Jung

Re: [PATCH 2/2] [PowerPC Book3E] Introduce new ptrace debug feature flag

2011-08-24 Thread Thiago Jung Bauermann
and only uses BP_EXACT ones when the user sets a flag. I want GDB to fail when the user sets the flag on BookS since it can't provide the feature. -- []'s Thiago Jung Bauermann IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev

Re: [PATCH 2/2] [PowerPC Book3E] Introduce new ptrace debug feature flag

2011-08-30 Thread Thiago Jung Bauermann
On Fri, 2011-08-26 at 14:41 +1000, David Gibson wrote: On Wed, Aug 24, 2011 at 09:41:43PM -0300, Thiago Jung Bauermann wrote: On Wed, 2011-08-24 at 14:00 +1000, David Gibson wrote: On Tue, Aug 23, 2011 at 02:57:56PM +0530, K.Prasad wrote: On Tue, Aug 23, 2011 at 03:09:31PM +1000, David

Re: [PATCH 1/2] [hw-breakpoint] Use generic hw-breakpoint interfaces for new PPC ptrace flags

2011-12-07 Thread Thiago Jung Bauermann
expects DEL to return ENOENT is there's no existing bp. -- []'s Thiago Jung Bauermann IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 2/2] [PowerPC Book3E] Introduce new ptrace debug feature flag

2012-02-15 Thread Thiago Jung Bauermann
filtering. And since that leaves no hardware that *can't* implement exact breakpoints (directly or indirectly), I'm not yet convinced of the need for a flag bit. I agree. -- []'s Thiago Jung Bauermann IBM Linux Technology Center ___ Linuxppc-dev mailing

[PATCH 1/8] kexec_file: Remove unused members from struct kexec_buf.

2016-06-11 Thread Thiago Jung Bauermann
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along its own arguments buffer and bufsz, but since they aren't used anywhere else, it's pointless. Cc: Eric Biederman Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- kernel/kexec_file.c

[PATCH 0/8] kexec_file_load implementation for PowerPC

2016-06-11 Thread Thiago Jung Bauermann
intend to submit shortly. This code is based on kexec-tools, but with many modifications to adapt it to the kernel environment and facilities. Except the purgatory, which only has minimal changes. Thiago Jung Bauermann (8): kexec_file: Remove unused members from struct kexec_buf. kexec_file

[PATCH 3/8] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-06-11 Thread Thiago Jung Bauermann
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 elf_util_64.c with as few changes as possible. The following changes were needed:

[PATCH 2/8] kexec_file: Generalize kexec_add_buffer.

2016-06-11 Thread Thiago Jung Bauermann
Allow architectures to specify different memory walking functions for kexec_add_buffer. Intel uses iomem to track reserved memory ranges, but PowerPC uses the memblock subsystem. Also, factor kexec_locate_mem_hole out of kexec_add_buffer. It will be used by the PowerPC kexec_file_load

[PATCH 8/8] powerpc: Add purgatory for kexec_file_load implementation.

2016-06-11 Thread Thiago Jung Bauermann
This purgatory implementation comes from kexec-tools, almost unchanged. The only changes were that the sha256_regions global variable was renamed to sha_regions to match what kexec_file_load expects, and to use the sha256.c file from x86's purgatory to avoid adding yet another SHA-256

[PATCH 6/8] powerpc: Implement kexec_file_load.

2016-06-11 Thread Thiago Jung Bauermann
Adds the machinery needed by kexec_file_load, except actually loading a kernel and initrd. elf64_apply_relocate_add was extended to support relative symbols. This is necessary because before relocation, the module loading mechanism adjusts Elf64_Sym.st_value to point to the absolute memory

[PATCH 7/8] powerpc: Add support for loading ELF kernels with kexec_file_load.

2016-06-11 Thread Thiago Jung Bauermann
) + * Copyright (C) 2006 Mohan Kumar M (mo...@in.ibm.com) + * Copyright (C) 2016 IBM Corporation + * + * Based on kexec-tools' kexec-elf-exec.c and kexec-elf-ppc64.c. + * Heavily modified for the kernel by + * Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>. + * + * This program is free so

[PATCH 5/8] powerpc: Add functions to read ELF files of any endianness.

2016-06-11 Thread Thiago Jung Bauermann
pc/kernel/elf_util.c @@ -0,0 +1,476 @@ +/* + * Utility functions to work with ELF files. + * + * Copyright (C) 2016, IBM Corporation + * + * Based on kexec-tools' kexec-elf.c. Heavily modified for the + * kernel by Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>. + * + * This program is free so

[PATCH 4/8] powerpc: Generalize elf64_apply_relocate_add.

2016-06-11 Thread Thiago Jung Bauermann
When apply_relocate_add is called, modules are already loaded at their final location in memory so Elf64_Shdr.sh_addr can be used for accessing the section contents as well as the base address for relocations. This is not the case for kexec's purgatory, because it will only be copied to its final

[PATCH v2 0/9] kexec_file_load implementation for PowerPC

2016-06-14 Thread Thiago Jung Bauermann
d relocation changes and the arch_kexec_walk_mem implementation to the next patch in the series. - Removed pr_fmt from machine_kexec_64.c, since the patch doesn't add any call to pr_debug in that file. - Changed arch_kexec_kernel_image_probe to reject crash kernels. Thiago Jung Bauermann (9): kexec

[PATCH v2 5/9] powerpc: Generalize elf64_apply_relocate_add.

2016-06-14 Thread Thiago Jung Bauermann
location by adding an addr_base argument to specify the address at which the section will be loaded, and rela, loc_base and syms_base to point to the sections' contents. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org&

[PATCH v2 1/9] kexec_file: Remove unused members from struct kexec_buf.

2016-06-14 Thread Thiago Jung Bauermann
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along its own arguments buffer and bufsz, but since they aren't used anywhere else, it's pointless. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Eric Biederman <ebied...@xmission.co

[PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-14 Thread Thiago Jung Bauermann
Allow architectures to specify different memory walking functions for kexec_add_buffer. Intel uses iomem to track reserved memory ranges, but PowerPC uses the memblock subsystem. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Eric Biederman <ebied...@xmission.com&

[PATCH v2 7/9] powerpc: Implement kexec_file_load.

2016-06-14 Thread Thiago Jung Bauermann
Adds the basic machinery needed by kexec_file_load. Signed-off-by: Josh Sklar <sk...@linux.vnet.ibm.com> Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/Kconfig

[PATCH v2 8/9] powerpc: Add support for loading ELF kernels with kexec_file_load.

2016-06-14 Thread Thiago Jung Bauermann
by the purgatory. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/include/asm/elf_util.h | 1 + arch/powerpc/include/asm/kexec_elf_64.h | 10 + arch/powerpc/kernel/Makefile| 5 +-

[PATCH v2 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-14 Thread Thiago Jung Bauermann
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load implementation to find free memory for the purgatory stack. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Eric Biederman <ebied...@xmission.com> Cc: Dave Young <dyo...@red

[PATCH v2 4/9] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-06-14 Thread Thiago Jung Bauermann
from elf64_apply_relocate_add. local_entry_offset and squash_toc_save_inst were only used by apply_rellocate_add, so they were moved to elf_util_64.c as well. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> Cc: Pa

[PATCH v2 9/9] powerpc: Add purgatory for kexec_file_load implementation.

2016-06-14 Thread Thiago Jung Bauermann
implementation. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/Makefile | 4 + arch/powerpc/purgatory/.gitignore | 2 + arch/powerpc/purgatory/Makefile

[PATCH v2 6/9] powerpc: Add functions to read ELF files of any endianness.

2016-06-14 Thread Thiago Jung Bauermann
the ELF structs. These functions will be used in the next patch in the series. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/include/asm/elf_util.h | 19 ++ arch/powerpc/kernel/Ma

Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-15 Thread Thiago Jung Bauermann
d, thus it is not necessary to pass these two in arguments. > > Moving above to arch_kexec_walk_mem will make it cleaner. That's true. What about this version? []'s Thiago Jung Bauermann IBM Linux Technology Center kexec_file: Generalize kexec_add_buffer. Allow architectures to

Re: [PATCH 2/8] kexec_file: Generalize kexec_add_buffer.

2016-06-13 Thread Thiago Jung Bauermann
/12/16 at 12:10am, Thiago Jung Bauermann wrote: > > Allow architectures to specify different memory walking functions for > > kexec_add_buffer. Intel uses iomem to track reserved memory ranges, > > but PowerPC uses the memblock subsystem. > > Can the crashk_res be inserted to

Re: [PATCH 2/8] kexec_file: Generalize kexec_add_buffer.

2016-06-13 Thread Thiago Jung Bauermann
Hi Dave, Am Montag, 13 Juni 2016, 16:08:19 schrieb Thiago Jung Bauermann: > Am Montag, 13 Juni 2016, 15:29:39 schrieb Dave Young: > > On 06/12/16 at 12:10am, Thiago Jung Bauermann wrote: > > > Allow architectures to specify different memory walking functions for > > > k

Re: [PATCH v3 0/9] kexec_file_load implementation for PowerPC

2016-06-22 Thread Thiago Jung Bauermann
Hello Balbir, Am Mittwoch, 22 Juni 2016, 23:29:46 schrieb Balbir Singh: > On Tue, 21 Jun 2016 16:48:32 -0300 > Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> wrote: > > This patch series implements the kexec_file_load system call on > > PowerPC. > > > >

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

2016-06-22 Thread Thiago Jung Bauermann
Hello Dave, Thanks for your considerations on this feature. Am Mittwoch, 22 Juni 2016, 09:20:46 schrieb Dave Young: > On 06/20/16 at 10:44pm, Thiago Jung Bauermann wrote: > > This feature was implemented because the Integrity Measurement > > Architecture subsystem needs

Re: [PATCH v2 0/9] kexec_file_load implementation for PowerPC

2016-06-16 Thread Thiago Jung Bauermann
Am Donnerstag, 16 Juni 2016, 15:48:30 schrieb Michael Ellerman: > On Tue, 2016-06-14 at 11:59 -0300, Thiago Jung Bauermann wrote: > > Hello, > > > > This patch series implements the kexec_file_load system call on PowerPC. > > Can you tell me what this syscall does and

Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-16 Thread Thiago Jung Bauermann
Am Donnerstag, 16 Juni 2016, 09:58:53 schrieb Dave Young: > On 06/15/16 at 01:21pm, Thiago Jung Bauermann wrote: > > +/** > > + * arch_kexec_walk_mem - call func(data) on free memory regions > > + * @image_type:kimage.type > > + * @top_down: Start from the hig

Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-20 Thread Thiago Jung Bauermann
Am Montag, 20 Juni 2016, 10:26:05 schrieb Dave Young: > kexec_buf should go within #ifdef for kexec file like struct > purgatory_info > > Other than that it looks good. Great! Here it is. -- []'s Thiago Jung Bauermann IBM Linux Technology Center kexec_file: Generalize kexe

[PATCH v3 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-21 Thread Thiago Jung Bauermann
Allow architectures to specify different memory walking functions for kexec_add_buffer. Intel uses iomem to track reserved memory ranges, but PowerPC uses the memblock subsystem. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Eric Biederman <ebied...@xmission.com&

[PATCH v3 8/9] powerpc: Add support for loading ELF kernels with kexec_file_load.

2016-06-21 Thread Thiago Jung Bauermann
by the purgatory. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/include/asm/elf_util.h | 1 + arch/powerpc/include/asm/kexec_elf_64.h | 10 + arch/powerpc/kernel/Makefile| 5 +-

[PATCH v3 1/9] kexec_file: Remove unused members from struct kexec_buf.

2016-06-21 Thread Thiago Jung Bauermann
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along its own arguments buffer and bufsz, but since they aren't used anywhere else, it's pointless. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Eric Biederman <ebied...@xmission.co

[PATCH v3 7/9] powerpc: Implement kexec_file_load.

2016-06-21 Thread Thiago Jung Bauermann
Adds the basic machinery needed by kexec_file_load. Signed-off-by: Josh Sklar <sk...@linux.vnet.ibm.com> Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/Kconfig

[PATCH v3 5/9] powerpc: Generalize elf64_apply_relocate_add.

2016-06-21 Thread Thiago Jung Bauermann
location by adding an addr_base argument to specify the address at which the section will be loaded, and rela, loc_base and syms_base to point to the sections' contents. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org&

[PATCH v3 0/9] kexec_file_load implementation for PowerPC

2016-06-21 Thread Thiago Jung Bauermann
ec_locate_mem_hole. - Patch "powerpc: Implement kexec_file_load.": - Moved relocation changes and the arch_kexec_walk_mem implementation to the next patch in the series. - Removed pr_fmt from machine_kexec_64.c, since the patch doesn't add any call to pr_debug in that

[PATCH v3 4/9] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-06-21 Thread Thiago Jung Bauermann
from elf64_apply_relocate_add. local_entry_offset and squash_toc_save_inst were only used by apply_rellocate_add, so they were moved to elf_util_64.c as well. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> Cc: Pa

[PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-21 Thread Thiago Jung Bauermann
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load implementation to find free memory for the purgatory stack. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: Eric Biederman <ebied...@xmission.com> Cc: Dave Young <dyo...@red

[PATCH v3 6/9] powerpc: Add functions to read ELF files of any endianness.

2016-06-21 Thread Thiago Jung Bauermann
the ELF structs. These functions will be used in the next patch in the series. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/include/asm/elf_util.h | 19 ++ arch/powerpc/kernel/Ma

[PATCH v3 9/9] powerpc: Add purgatory for kexec_file_load implementation.

2016-06-21 Thread Thiago Jung Bauermann
implementation. Also, some formatting warnings found by checkpatch.pl were fixed. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/Makefile | 4 + arch/powerpc/purgatory/.git

Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-17 Thread Thiago Jung Bauermann
Am Freitag, 17 Juni 2016, 15:35:23 schrieb Dave Young: > On 06/16/16 at 05:39pm, Thiago Jung Bauermann wrote: > > Am Donnerstag, 16 Juni 2016, 09:58:53 schrieb Dave Young: > > > On 06/15/16 at 01:21pm, Thiago Jung Bauermann wrote: > > > > +int __weak arch_kexec_wa

Re: [PATCH v3 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-22 Thread Thiago Jung Bauermann
also changed the description to refer to x86 arch instead of Intel arch. []'s Thiago Jung Bauermann IBM Linux Technology Center Subject: [PATCH 2/9] kexec_file: Allow arch-specific memory walking for kexec_add_buffer Allow architectures to specify a different memory walking function for kexec_add

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-22 Thread Thiago Jung Bauermann
Am Mittwoch, 22 Juni 2016, 18:18:01 schrieb Dave Young: > On 06/21/16 at 04:48pm, Thiago Jung Bauermann wrote: > > +/** > > + * kexec_locate_mem_hole - find free memory to load segment or use in > > purgatory + * @image: kexec image being updated. > > + * @size:

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-23 Thread Thiago Jung Bauermann
> "static"). > > We also recommend providing kernel-doc formatted documentation > for private (file "static") routines, for consistency of kernel > source code layout. But this is lower priority and at the > discretion of the MAINTAINER of that kernel source file. If

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

2016-06-20 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 <bauer...@linux.vnet.ibm.com> --- i

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

2016-06-20 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 1/6] kexec_file: Add buffer hand-over support for the next kernel

2016-06-20 Thread Thiago Jung Bauermann
Jung Bauermann <bauer...@linux.vnet.ibm.com> --- include/linux/kexec.h | 40 ++ kernel/kexec_file.c | 79 +++ 2 files changed, 119 insertions(+) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index a08cd9

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

2016-06-20 Thread Thiago Jung Bauermann
the purgatory checksum verification to fail when the machine is rebooted. As a bonus, we don't need to special-case the purgatory segment anymore to avoid checksumming it. Adjust call sites for the new argument. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/p

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

2016-06-20 Thread Thiago Jung Bauermann
une/016078.html Thiago Jung Bauermann (6): kexec_file: Add buffer hand-over support for the next kernel powerpc: kexec_file: Add buffer hand-over support for the next kernel kexec_file: Allow skipping checksum calculation for some segments. kexec_file: Add mechanism to update kexec segment

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

2016-06-20 Thread Thiago Jung Bauermann
This shows how kernel code can use the kexec buffer passing mechanism to pass information to the next kernel. This patch is not intended to be committed. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- include/linux/ima.h | 11 + kernel/kexec_

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

2016-06-20 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 <bauer...@linux.vnet.ibm.com> --- kernel/kexec_core.c | 159 +++- 1 file changed, 95 insertions(

Re: [PATCH v3 0/9] kexec_file_load implementation for PowerPC

2016-06-23 Thread Thiago Jung Bauermann
Am Freitag, 24 Juni 2016, 08:33:24 schrieb Balbir Singh: > On 24/06/16 02:44, Thiago Jung Bauermann wrote: > > Sorry, I still don't understand your concern. What kind of cheating? > > Which values? If it's the values in the event log, there's no need to > > trust the old k

Re: [PATCH v3 0/9] kexec_file_load implementation for PowerPC

2016-06-23 Thread Thiago Jung Bauermann
Am Donnerstag, 23 Juni 2016, 09:57:51 schrieb Balbir Singh: > On 23/06/16 03:02, Thiago Jung Bauermann wrote: > >>> 3. have IMA pass-on its event log (where integrity measurements are > >>> > >>>registered) accross kexec to the second kernel, so that

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-27 Thread Thiago Jung Bauermann
Am Dienstag, 28 Juni 2016, 00:19:48 schrieb Dave Young: > On 06/23/16 at 12:37pm, Thiago Jung Bauermann wrote: > > Am Donnerstag, 23 Juni 2016, 01:44:07 schrieb Dave Young: > > What is bad about the description of top_down? > It is not clear enough to me, I personally thin

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-27 Thread Thiago Jung Bauermann
Am Montag, 27 Juni 2016, 13:37:58 schrieb Thiago Jung Bauermann: > Should I add a separate top_down argument to kexec_locate_mem_hole to > control if the memory walk should be from top to bottom, and then the > bottom_up member of struct kexec_buf controls where inside each memory

Re: [PATCH v20 14/14] Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec

2016-06-27 Thread Thiago Jung Bauermann
uring early boot, the kernel goes through the /memory nodes to find usable memory and for each node, if there's a linux,usable-memory property it will use it instead of the reg property to find the ranges of memory it can use (see early_init_dt_scan_memory in drivers/of/fdt.c). []'s Thiago

[PATCH] Remove kretprobe_trampoline_holder.

2016-03-28 Thread Thiago Jung Bauermann
size (as determined by choose_best_symbol). With this patch, all vmlinux symbols match /proc/kallsyms and the testcase passes. Commit c1c355c gets rid of kretprobe_trampoline_holder altogether on x86. This commit does the same on powerpc. Signed-off-by: Thiago Jung Bauermann <ba

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-28 Thread Thiago Jung Bauermann
Am Montag, 28 März 2016, 17:06:32 schrieb Thiago Jung Bauermann: > /home/bauermann/src/linux/tools/testing/selftests/ftrace/test.d/kprobe/kp > robe_ftrace.tc: line 9: echo: write error: Invalid argument > > But even without my patch that testcase fails in the

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-30 Thread Thiago Jung Bauermann
Am Mittwoch, 30 März 2016, 20:09:36 schrieb Michael Ellerman: > On Wed, 2016-03-30 at 13:34 +0530, Naveen N. Rao wrote: > > On 2016/03/29 08:35PM, Thiago Jung Bauermann wrote: > > > Am Dienstag, 29 März 2016, 14:31:34 schrieb Michael Ellerman: > > > > On Mon, 2016-03-

[PATCH] Make kretprobe_trampoline symbol look like a function.

2016-03-24 Thread Thiago Jung Bauermann
and it gets rid of kretprobe_trampoline_holder altogether on x86. I believe that would fix this problem as well, but I don't know enough about kprobes to know whether kretprobe_trampoline_holder has any use on powerpc. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/p

Re: [PATCH] ftrace: filter: Match dot symbols when searching functions on ppc64.

2016-04-01 Thread Thiago Jung Bauermann
cc1: all warnings being treated as errors I forgot to use defined() in the #if expression. Here’s the fixed version. -- []'s Thiago Jung Bauermann IBM Linux Technology Center 8< 8< 8< 8< From 27660a3b6c4147f9e1811b103cc47a34a53817c1 Mon Sep 17 00:00:00 2001

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-29 Thread Thiago Jung Bauermann
Am Dienstag, 29 März 2016, 10:45:57 schrieb Michael Ellerman: > On Mon, 2016-03-28 at 17:29 -0300, Thiago Jung Bauermann wrote: > > If I do s/_do_fork/._do_fork/ in kprobe_ftrace.tc then all ftrace kprobe > > tests pass: > > OK. We fixed that in 'perf probe', but not if y

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-29 Thread Thiago Jung Bauermann
Am Dienstag, 29 März 2016, 14:31:34 schrieb Michael Ellerman: > On Mon, 2016-03-28 at 17:06 -0300, Thiago Jung Bauermann wrote: > > With this patch, all vmlinux symbols match /proc/kallsyms and the > > testcase passes. > > Have you tested this on an LE system? No, I

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-31 Thread Thiago Jung Bauermann
. I fixed the issue you mentioned and sent a new patch with your Reviewed-by. Also thanks for fixing the vmlinux-kallsyms issue in ppc64le. I didn’t comment on the patches because I’m not very familiar with the code in question. -- []'s Thiago Jung Baue

[PATCH] powerpc/kprobes: Remove kretprobe_trampoline_holder.

2016-03-31 Thread Thiago Jung Bauermann
aveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/powerpc/kernel/kprobes.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 7c053f2814

[PATCH] ftrace: filter: Match dot symbols when searching functions on ppc64.

2016-03-31 Thread Thiago Jung Bauermann
Cc: Ingo Molnar <mi...@redhat.com> Cc: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/ftrace.h | 9 + kernel/trace/ftrace.c | 13 + 2 files changed, 22 inser

[PATCH v2] ftrace: Match dot symbols when searching functions on ppc64

2016-04-25 Thread Thiago Jung Bauermann
Cc: Ingo Molnar <mi...@redhat.com> Cc: Michael Ellerman <m...@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- Notes: Changes from v1 to v2: - Use __weak mechanism instead of #ifdef. - Return modified

Re: [PATCH] ftrace: filter: Match dot symbols when searching functions on ppc64.

2016-04-14 Thread Thiago Jung Bauermann
tr, search); > /* use tmp_str and then ignore */ > kfree(str); If you decide against either of my alternatives for using arch__compare_symbol_names, I'll change arch_ftrace_match_adjust to work as you suggested above in the next version of this patch. > ** Disclaimer ** > > Note, I just took the red-eye (2 hours of sleep on the plane) and > waiting for my next flight. My focus may be off in this email. Ouch. Thanks for having a look at the patch and responding to my ping! -- []'s Thiago Jung Bauermann IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] ftrace: filter: Match dot symbols when searching functions on ppc64.

2016-04-13 Thread Thiago Jung Bauermann
Hello, Am Freitag, 01 April 2016, 18:28:06 schrieb Thiago Jung Bauermann: > Am Samstag, 02 April 2016, 03:51:21 schrieb kbuild test robot: > > >> arch/powerpc/include/asm/ftrace.h:62:5: error: "CONFIG_PPC64" is not > > >> defined [-Werror=undef] > >

Re: [PATCH] powerpc/kprobes: Remove kretprobe_trampoline_holder.

2016-04-13 Thread Thiago Jung Bauermann
Hello, People seem to be considering patches for next, so this looks like a good moment to ping about this one. -- []'s Thiago Jung Bauermann IBM Linux Technology Center Am Donnerstag, 31 März 2016, 17:10:40 schrieb Thiago Jung Bauermann: > Fixes the following testsuite fail

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

2016-07-26 Thread Thiago Jung Bauermann
]; } Signed-off-by: AKASHI Takahiro <takahiro.aka...@linaro.org> Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- Notes: This is a new version of the last patch in this series which adds a function where each architecture can verify if the DTB i

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-14 Thread Thiago Jung Bauermann
Am Donnerstag, 14 Juli 2016, 10:29:11 schrieb Arnd Bergmann: > On Wednesday, July 13, 2016 11:18:04 PM CEST Thiago Jung Bauermann wrote: > > Am Mittwoch, 13 Juli 2016, 21:59:18 schrieb Arnd Bergmann: > > > On Wednesday, July 13, 2016 3:45:41 PM CEST Thiago Jung Bauermann

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-22 Thread Thiago Jung Bauermann
Am Freitag, 22 Juli 2016, 12:54:28 schrieb Michael Ellerman: > Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> writes: > > So even if not ideal, the solution above is desirable for powerpc. We > > would like to preserve the ability of allowing userspace to pass > &g

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-21 Thread Thiago Jung Bauermann
Am Freitag, 15 Juli 2016, 18:03:35 schrieb Thiago Jung Bauermann: > Am Freitag, 15 Juli 2016, 22:26:09 schrieb Arnd Bergmann: > > However, the powerpc specific RTAS runtime services provide a similar > > interface to the UEFI runtime support and allow to call into > > binary

[PATCH v2 0/2] extend kexec_file_load system call

2016-08-11 Thread Thiago Jung Bauermann
atibility." [1] http://lists.infradead.org/pipermail/kexec/2016-June/016276.html AKASHI Takahiro (1): kexec: add dtb info to struct kimage Thiago Jung Bauermann (1): kexec: extend kexec_file_load system call include/linux/fs.h | 1 + include/linux/kexec.h | 10 -- incl

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

2016-08-11 Thread Thiago Jung Bauermann
int nr_fds; struct kexec_file_fd fds[0]; } Signed-off-by: AKASHI Takahiro <takahiro.aka...@linaro.org> Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- include/linux/fs.h | 1 + include/linux/kexec.h | 7 ++-- include/lin

[PATCH v5 03/13] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-08-11 Thread Thiago Jung Bauermann
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load implementation to find free memory for the purgatory stack. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Acked-by: Dave Young <dyo...@redhat.com> --- include/linux/kexec.h | 1 + kernel/kexec_f

[PATCH v5 05/13] powerpc: Generalize elf64_apply_relocate_add.

2016-08-11 Thread Thiago Jung Bauermann
location by adding an addr_base argument to specify the address at which the section will be loaded, and rela, loc_base and syms_base to point to the sections' contents. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/elf_util.h | 6 ++-- arch/p

Re: [PATCH v5 11/13] powerpc: Allow userspace to set device tree properties in kexec_file_load

2016-08-11 Thread Thiago Jung Bauermann
Hello Sam, Thanks for the quick response. Am Freitag, 12 August 2016, 10:45:00 schrieb Samuel Mendoza-Jonas: > On Thu, 2016-08-11 at 20:08 -0300, Thiago Jung Bauermann wrote: > > @@ -908,4 +909,245 @@ bool find_debug_console(const void *fdt, int > > chosen_nod

[PATCH v2 1/2] kexec: add dtb info to struct kimage

2016-08-11 Thread Thiago Jung Bauermann
From: AKASHI Takahiro Device tree blob must be passed to a second kernel on DTB-capable archs, like powerpc and arm64, but the current kernel interface lacks this support. This patch adds dtb buffer information to struct kimage. When users don't specify dtb

[PATCH v5 00/13] kexec_file_load implementation for PowerPC

2016-08-11 Thread Thiago Jung Bauermann
ralize kexec_add_buffer.": broke in two, one adding arch_kexec_walk_mem and the other adding kexec_locate_mem_hole. - Patch "powerpc: Implement kexec_file_load.": - Moved relocation changes and the arch_kexec_walk_mem implementation to the next patch in the series. - Removed pr

[PATCH v5 01/13] kexec_file: Allow arch-specific memory walking for kexec_add_buffer

2016-08-11 Thread Thiago Jung Bauermann
Allow architectures to specify a different memory walking function for kexec_add_buffer. x86 uses iomem to track reserved memory ranges, but PowerPC uses the memblock subsystem. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Acked-by: Dave Young <dyo...@r

[PATCH v5 08/13] powerpc: Implement kexec_file_load.

2016-08-11 Thread Thiago Jung Bauermann
arch_kexec_walk_mem and arch_kexec_apply_relocations_add are used by generic kexec code, while setup_purgatory is powerpc-specific and sets runtime variables needed by the powerpc purgatory implementation. Signed-off-by: Josh Sklar <sk...@linux.vnet.ibm.com> Signed-off-by: Thiago Jung Bau

[PATCH v5 11/13] powerpc: Allow userspace to set device tree properties in kexec_file_load

2016-08-11 Thread Thiago Jung Bauermann
Ellerman <m...@ellerman.id.au> Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/kexec.h | 1 + arch/powerpc/kernel/kexec_elf_64.c | 9 ++ arch/powerpc/kernel/machine_kexec_64.c | 242 + 3 files

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Thiago Jung Bauermann
Am Mittwoch, 10 August 2016, 13:41:08 schrieb Michael Ellerman: > Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> writes: > > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > >> On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > >> >

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

2016-08-12 Thread Thiago Jung Bauermann
Hello Balbir, Thank you for the review! Am Freitag, 12 August 2016, 18:17:39 schrieb Balbir Singh: > On Thu, Aug 11, 2016 at 08:03:58PM -0300, Thiago Jung Bauermann wrote: > > diff --git a/include/linux/fs.h b/include/linux/fs.h > > index 3523bf62f328..847d9c31f428 100644 > >

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

2016-08-12 Thread Thiago Jung Bauermann
the purgatory checksum verification to fail when the machine is rebooted. As a bonus, we don't need to special-case the purgatory segment anymore to avoid checksumming it. Adjust call sites for the new argument. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/p

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

2016-08-12 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 <bauer...@linux.vnet.ibm.com> --- i

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

2016-08-12 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 <bauer...@linux.vnet.ibm.com> --- include/linux/ima.h | 11 + kernel/kexec_

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

2016-08-12 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 <bauer...@linux.vnet.ibm.com> --- kernel/kexec_core.c | 159 +++- 1 file changed, 95 insertions(

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

2016-08-12 Thread Thiago Jung Bauermann
y "#include " in kexec_file.c. - Round up memsz argument to PAGE_SIZE. - Check if kexec_image is NULL in kexec_update_segment. - Patch "IMA: Demonstration code for kexec buffer passing." - Avoid registering reboot notifier again if kexec_file_load is called more than once

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

2016-08-12 Thread Thiago Jung Bauermann
Jung Bauermann <bauer...@linux.vnet.ibm.com> --- include/linux/kexec.h | 29 ++ kernel/kexec_file.c | 68 +++ 2 files changed, 97 insertions(+) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index ceccc5

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

2016-08-12 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 v5 06/13] powerpc: Adapt elf64_apply_relocate_add for kexec_file_load.

2016-08-11 Thread Thiago Jung Bauermann
before relocating the module, while the latter does that adjustment during relocation of the purgatory. Also, add a check_symbols argument so that the kexec code can be stricter about undefined symbols. Finally, add relocation types used by the purgatory. Signed-off-by: Thiago Jung Bauermann

[PATCH v5 10/13] powerpc: Add support for loading ELF kernels with kexec_file_load.

2016-08-11 Thread Thiago Jung Bauermann
(shar...@in.ibm.com) + * Copyright (C) 2006 Mohan Kumar M (mo...@in.ibm.com) + * Copyright (C) 2016 IBM Corporation + * + * Based on kexec-tools' kexec-elf-exec.c and kexec-elf-ppc64.c. + * Heavily modified for the kernel by + * Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>. + * + * This pro

[PATCH v5 09/13] powerpc: Add code to work with device trees in kexec_file_load.

2016-08-11 Thread Thiago Jung Bauermann
kexec_file_load needs to set up the device tree that will be used by the next kernel and check whether it provides a console that can be used by the purgatory. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/kexec.h | 3 + arch/p

[PATCH v5 12/13] powerpc: Add purgatory for kexec_file_load implementation.

2016-08-11 Thread Thiago Jung Bauermann
implementation. Also, some formatting warnings found by checkpatch.pl were fixed. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/powerpc/Makefile | 4 + arch/powerpc/purgatory/.gitignore | 2 + arch/powerpc/purgatory/Makefile

[PATCH v5 13/13] powerpc: Enable CONFIG_KEXEC_FILE in powerpc server defconfigs.

2016-08-11 Thread Thiago Jung Bauermann
Enable CONFIG_KEXEC_FILE in powernv_defconfig, ppc64_defconfig and pseries_defconfig. It depends on CONFIG_CRYPTO_SHA256=y, so add that as well. Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> --- arch/powerpc/configs/powernv_defconfig | 2 ++ arch/powerpc/c

  1   2   3   4   5   6   7   8   9   >