Re: [PATCH v3] powerpc: Add support for function error injection

2018-06-07 Thread Samuel Mendoza-Jonas
update pt_regs rather > than redirecting execution to a dummy function that returns. > > Signed-off-by: Naveen N. Rao > --- > The only change is to add a comment in override_function_with_return() > to clarify that we don't need to worry about 32-bit userspace while > emul

Re: [PATCH] powerpc/ptrace: Use copy_{from, to}_user() rather than open-coding

2018-05-29 Thread Samuel Mendoza-Jonas
us and is less error prone. > > Signed-off-by: Al Viro > Signed-off-by: Michael Ellerman Reviewed-by: Samuel Mendoza-Jonas > --- > arch/powerpc/kernel/ptrace.c | 20 ++-- > 1 file changed, 6 insertions(+), 14 deletions(-) > > diff --git a/arch/

Re: [PATCH 1/3] powerpc/io: Add __raw_writeq_be() __raw_rm_writeq_be()

2018-05-17 Thread Samuel Mendoza-Jonas
hand in the code, which is more bug prone. > > Signed-off-by: Michael Ellerman For this and the following patches: Reviewed-by: Samuel Mendoza-Jonas > --- > arch/powerpc/include/asm/io.h | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/powerpc/include

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

2016-08-11 Thread Samuel Mendoza-Jonas
On Thu, 2016-08-11 at 20:08 -0300, Thiago Jung Bauermann wrote: > Implement the arch_kexec_verify_buffer hook to verify that a device > tree blob passed by userspace via kexec_file_load contains only nodes > and properties from a whitelist. > > In elf64_load we merge those properties into the devi

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

2016-08-09 Thread Samuel Mendoza-Jonas
On Tue, 2016-08-09 at 10:19 -0300, Thiago Jung Bauermann wrote: > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > > > > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > > > > > Mimi Zohar writes: > > > > > > > > diff --git a/security/integrity/ima/ima.h > > > > b/secur

[PATCH V2 2/2] tty/hvc: Use opal irqchip interface if available

2016-07-10 Thread Samuel Mendoza-Jonas
Update the hvc driver to use the OPAL irqchip if made available by the running firmware. If it is not present, the driver falls back to the existing OPAL event number. Signed-off-by: Samuel Mendoza-Jonas Cc: # 4.1.x- --- v2: Always try irq_of_parse_and_map before falling back drivers/tty/hvc

[PATCH V2 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles

2016-07-10 Thread Samuel Mendoza-Jonas
ned-off-by: Samuel Mendoza-Jonas Cc: # 4.1.x- --- drivers/tty/hvc/hvc_console.h | 1 + drivers/tty/hvc/hvc_irq.c | 7 +-- drivers/tty/hvc/hvc_opal.c| 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.h b/drivers/tty/hvc/hvc_console.h ind

Re: [2/2] tty/hvc: Use opal irqchip interface if available

2016-07-04 Thread Samuel Mendoza-Jonas
On Tue, 2016-07-05 at 15:31 +1000, Michael Ellerman wrote: > On Tue, 2016-28-06 at 03:11:39 UTC, Sam Mendoza-Jonas wrote: > > diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c > > index b7cd0ae..8c53f5b 100644 > > --- a/drivers/tty/hvc/hvc_opal.c > > +++ b/drivers/tty/hvc/hvc_opa

Re: device tree passing feature

2016-07-03 Thread Samuel Mendoza-Jonas
On Fri, 2016-07-01 at 13:15 -0300, Thiago Jung Bauermann wrote: > Hi Samuel, > > Thanks for your response. > > Am Freitag, 01 Juli 2016, 11:46:21 schrieb Samuel Mendoza-Jonas: > > On Thu, 2016-06-30 at 11:27 -0300, Thiago Jung Bauermann wrote: > > > I have a questi

[PATCH 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles

2016-06-27 Thread Samuel Mendoza-Jonas
ned-off-by: Samuel Mendoza-Jonas Cc: # 4.1.x- --- drivers/tty/hvc/hvc_console.h | 1 + drivers/tty/hvc/hvc_irq.c | 7 +-- drivers/tty/hvc/hvc_opal.c| 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.h b/drivers/tty/hvc/hvc_console.h ind

[PATCH 2/2] tty/hvc: Use opal irqchip interface if available

2016-06-27 Thread Samuel Mendoza-Jonas
Update the hvc driver to use the OPAL irqchip if made available by the running firmware. If it is not present, the driver falls back to the existing OPAL event number. Signed-off-by: Samuel Mendoza-Jonas Cc: # 4.1.x- --- drivers/tty/hvc/hvc_opal.c | 12 +++- 1 file changed, 11

[PATCH] tty/hvc: Use IRQF_SHARED for hvc consoles

2016-03-19 Thread Samuel Mendoza-Jonas
is closed, but OPAL will still generate interrupts that are not handled, leading to rcu_sched stall warnings. Set IRQF_SHARED when calling request_irq, allowing additional consoles to start properly. Signed-off-by: Samuel Mendoza-Jonas Cc: # 4.1.x- --- drivers/tty/hvc/hvc_irq.c | 5 - 1 file

Re: [RFC PATCH] powerpc/kexec: Wait 1s for secondaries to enter OPAL

2015-07-27 Thread Samuel Mendoza-Jonas
On 27/07/15 15:56, Stewart Smith wrote: > Samuel Mendoza-Jonas writes: >> Always include a timeout when waiting for secondary cpus to enter OPAL >> in the kexec path, rather than only when crashing. > > This *sounds* reasonable... but I wonder what actual worse case could

[RFC PATCH] powerpc/kexec: Wait 1s for secondaries to enter OPAL

2015-07-21 Thread Samuel Mendoza-Jonas
Always include a timeout when waiting for secondary cpus to enter OPAL in the kexec path, rather than only when crashing. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/platforms/powernv/setup.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a

[PATCH V4 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-21 Thread Samuel Mendoza-Jonas
sure the HILE bit is reset once we've finished waiting for all of the secondaries to be returned to OPAL. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/platforms/powernv/setup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/platforms/powernv/setup.c b

[PATCH V4 0/2] powerpc/kexec: Reset endianess before kexec

2015-07-21 Thread Samuel Mendoza-Jonas
code Neaten the endian check (and extra call to mfmsr!) by modifying the msr and branching to the target kernel in the same call to rfid. Samuel Mendoza-Jonas (2): powerpc/kexec: Reset secondary cpu endianess before kexec powerpc/kexec: Reset HILE before kexec_sequence arch/powerpc/kernel

[PATCH V4 1/2] powerpc/kexec: Reset secondary cpu endianess before kexec

2015-07-21 Thread Samuel Mendoza-Jonas
secondaries on powernv are returned to OPAL. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/kernel/misc_64.S | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 4e314b9..6e4168c 100644 --- a/arch

[PATCH V3 1/2] powerpc/kexec: Reset secondary cpu endianess before kexec

2015-07-09 Thread Samuel Mendoza-Jonas
secondaries on powernv are returned to OPAL. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/kernel/misc_64.S | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 4e314b9..6e4168c 100644 --- a/arch

[PATCH V3 0/2] powerpc/kexec: Reset endianess before kexec

2015-07-09 Thread Samuel Mendoza-Jonas
!CONFIG_PPC_BOOK3S_64 case in kexec_wait to correctly branch to 0x60 Changes in v2: Add an #ifdef for subarch-specific code Neaten the endian check (and extra call to mfmsr!) by modifying the msr and branching to the target kernel in the same call to rfid. Samuel Mendoza-Jonas (2): powerpc/kexec: Reset secondary

[PATCH V3 2/2] powerpc/kexec: Reset HILE before entering target kernel

2015-07-09 Thread Samuel Mendoza-Jonas
sure the HILE bit is reset before any thread branches into the target kernel. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/kernel/machine_kexec_64.c | 6 -- arch/powerpc/kernel/misc_64.S | 19 +-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git

Re: [PATCH V2 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-08 Thread Samuel Mendoza-Jonas
On 08/07/15 16:51, Stewart Smith wrote: > Michael Ellerman writes: >> On Wed, 2015-07-08 at 14:37 +1000, Samuel Mendoza-Jonas wrote: >>> On powernv secondary cpus are returned to OPAL, and will then enter the >>> target kernel in big-endian. However if it is se

[PATCH V2 1/2] powerpc/kexec: Reset secondary cpu endianess before kexec

2015-07-07 Thread Samuel Mendoza-Jonas
secondaries on powernv are returned to OPAL. Signed-off-by: Samuel Mendoza-Jonas --- v2: Add an #ifdef for subarch-specific code Neaten the endian check (and extra call to mfmsr!) by modifying the msr and branching to the target kernel in the same call to rfid. arch/powerpc/kernel/misc_64.S

[PATCH V2 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-07 Thread Samuel Mendoza-Jonas
switched off before entering kexec_sequence. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/kernel/machine_kexec_64.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c index 1a74446..2266135c 100644

Re: [kexec-lite PATCH V2] trampoline: Reset primary cpu endian to big-endian

2015-07-07 Thread Samuel Mendoza-Jonas
On 08/07/15 13:37, Scott Wood wrote: > On Wed, 2015-07-08 at 13:29 +1000, Samuel Mendoza-Jonas wrote: >> Older big-endian ppc64 kernels don't include the FIXUP_ENDIAN check, >> meaning if we kexec from a little-endian kernel the target kernel will >> fail to boot. >>

[kexec-lite PATCH V2] trampoline: Reset primary cpu endian to big-endian

2015-07-07 Thread Samuel Mendoza-Jonas
NDIAN. Signed-off-by: Samuel Mendoza-Jonas --- V2: As suggested by Anton take advantage of the rfid call and switch off MSR_LE and branch to the target kernel in the same step. kexec_trampoline.S | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kexec_trampolin

Re: [kexec-lite PATCH] trampoline: Reset primary cpu endian to big-endian

2015-07-07 Thread Samuel Mendoza-Jonas
On 08/07/15 11:56, Anton Blanchard wrote: > Hi Sam, > >> Older big-endian ppc64 kernels don't include the FIXUP_ENDIAN check, >> meaning if we kexec from a little-endian kernel the target kernel will >> fail to boot. >> Returning to big-endian before we enter the target kernel ensures that >> the

[kexec-lite PATCH] trampoline: Reset primary cpu endian to big-endian

2015-07-07 Thread Samuel Mendoza-Jonas
NDIAN. Signed-off-by: Samuel Mendoza-Jonas --- kexec_trampoline.S | 9 - kexec_trampoline.h | 17 +++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/kexec_trampoline.S b/kexec_trampoline.S index a3eb314..29537ab 100644 --- a/kexec_trampoline.S +++ b/kexec_trampol

[PATCH 1/2] powerpc/kexec: Reset secondary cpu endianess before kexec

2015-07-07 Thread Samuel Mendoza-Jonas
secondaries on powernv are returned to OPAL. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/kernel/misc_64.S | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 4e314b9..c73e587 100644 --- a

[PATCH 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-07 Thread Samuel Mendoza-Jonas
switched off before entering kexec_sequence. Signed-off-by: Samuel Mendoza-Jonas --- arch/powerpc/kernel/machine_kexec_64.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c index 1a74446..2266135c 100644

Re: [PATCH V2 2/2] powerpc/configs: Replace pseries_le_defconfig with a Makefile target using merge_config

2015-05-25 Thread Samuel Mendoza-Jonas
Reviewed-by: Samuel Mendoza-Jonas On 26/05/15 11:36, Cyril Bur wrote: > Rather than continuing to maintain a copy of pseries_defconfig with enabled > CONFIG_CPU_LITTLE_ENDIAN, use the generic merge_config script and use an > le.config to enable little endian on top of pseries_defconfi