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

2016-08-21 Thread Thiago Jung Bauermann
Am Montag, 22 August 2016, 11:21:35 schrieb Dave Young: > On 08/13/16 at 12:18am, Thiago Jung Bauermann wrote: > > diff --git a/arch/powerpc/kernel/machine_kexec_64.c > > b/arch/powerpc/kernel/machine_kexec_64.c index > > a484a6346146..190c652e49b7 100644 > > ---

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

2016-08-21 Thread Thiago Jung Bauermann
Am Montag, 22 August 2016, 11:36:43 schrieb Dave Young: > On 08/22/16 at 12:25am, Thiago Jung Bauermann wrote: > > Am Montag, 22 August 2016, 11:17:45 schrieb Dave Young: > > > On 08/18/16 at 06:09pm, Thiago Jung Bauermann wrote: > > > > Hello Dave, > > > > > > > > Thanks for your review! > > > >

Re: TM Bad Thing exception easily raised from userspace

2016-08-21 Thread Cyril Bur
On Fri, 2016-08-19 at 19:21 +0200, Laurent Dufour wrote: > Hi, > > While working on the TM support for CRIU, I faced a TM Bad Thing > exception. > > Digging further, I found that it is *easy* to raised it from the user > space. I attached below a simple program which raise it all the time, >

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

2016-08-21 Thread Thiago Jung Bauermann
Am Montag, 22 August 2016, 11:17:45 schrieb Dave Young: > On 08/18/16 at 06:09pm, Thiago Jung Bauermann wrote: > > Hello Dave, > > > > Thanks for your review! > > > > [ Trimming down Cc: list a little to try to clear the "too many > > recipients"> > > mailing list restriction. ] > > I also

Re: TM Bad Thing exception easily raised from userspace

2016-08-21 Thread Michael Neuling
On Fri, 2016-08-19 at 19:21 +0200, Laurent Dufour wrote: > Hi, > > While working on the TM support for CRIU, I faced a TM Bad Thing exception. > > Digging further, I found that it is *easy* to raised it from the user > space. I attached below a simple program which raise it all the time, > like

Re: [PATCH] powerpc/tm: do not use r13 for tabort_syscall

2016-08-21 Thread Michael Neuling
On Fri, 2016-07-22 at 17:27 +1000, Nicholas Piggin wrote: > tabort_syscall runs with RI=1, so a nested recoverable machine > check will load the paca into r13 and overwrite what we loaded > it with, because exceptions returning to privileged mode do not > restore r13. > > This has survived

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

2016-08-21 Thread Dave Young
On 08/18/16 at 06:09pm, Thiago Jung Bauermann wrote: > Hello Dave, > > Thanks for your review! > > [ Trimming down Cc: list a little to try to clear the "too many recipients" > mailing list restriction. ] I also got "too many recipients".. Thanks for the trimming. > > Am Donnerstag, 18

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

2016-08-21 Thread Dave Young
On 08/13/16 at 12:18am, Thiago Jung Bauermann wrote: > 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

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

2016-08-21 Thread Dave Young
On 08/22/16 at 12:25am, Thiago Jung Bauermann wrote: > Am Montag, 22 August 2016, 11:17:45 schrieb Dave Young: > > On 08/18/16 at 06:09pm, Thiago Jung Bauermann wrote: > > > Hello Dave, > > > > > > Thanks for your review! > > > > > > [ Trimming down Cc: list a little to try to clear the "too

[PATCH] powerpc: signals: Discard transaction state from signal frames

2016-08-21 Thread Cyril Bur
Userspace can begin and suspend a transaction within the signal handler which means they might enter sys_rt_sigreturn() with the processor in suspended state. sys_rt_sigreturn() wants to restore process context (which may have been in a transaction before signal delivery). To do this it must

Re: [PATCH] ppc64: allow ptrace to set TM bits

2016-08-21 Thread Cyril Bur
On Tue, 2016-08-02 at 13:43 +0800, Simon Guo wrote: > Hi Laurent, > On Fri, Jul 29, 2016 at 11:51:22AM +0200, Laurent Dufour wrote: > > > >  static int set_user_msr(struct task_struct *task, unsigned long > > msr) > >  { > > +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM > > + if

Re: [PATCH V2 2/5] powerpc/mm: Add radix flush all with IS=3

2016-08-21 Thread Benjamin Herrenschmidt
On Fri, 2016-08-19 at 14:22 +0530, Aneesh Kumar K.V wrote: > Signed-off-by: Aneesh Kumar K.V > --- >  arch/powerpc/include/asm/book3s/64/tlbflush-radix.h |  1 + >  arch/powerpc/mm/tlb-radix.c | 15 > +++ >  2 files changed, 16

[PATCH 1/2] Enable storage keys for radix - user mode execution

2016-08-21 Thread Balbir Singh
ISA 3 defines new encoded access authority that allows instruction access prevention in privileged mode and allows normal access to problem state. This patch just enables IAMR (Instruction Authority Mask Register), enabling AMR would require more work. I've tested this with a buggy driver and a

[PATCH 2/2] Detect instruction fetch denied and report

2016-08-21 Thread Balbir Singh
ISA 3 allows for prevention of instruction fetch and execution of user mode pages. If such an error occurs, SRR1 bit 35 reports the error. We catch and report the error in do_page_fault() Signed-off-by: Balbir Singh --- arch/powerpc/mm/fault.c | 4 1 file changed, 4

Re: [PATCH v4] powerpc: Do not make the entire heap executable

2016-08-21 Thread Aneesh Kumar K.V
Denys Vlasenko writes: > On 32-bit powerpc the ELF PLT sections of binaries (built with --bss-plt, > or with a toolchain which defaults to it) look like this: > > [17] .sbss NOBITS 0002aff8 01aff8 14 00 WA 0 0 > 4 > [18] .plt

Re: [RFC v2 0/2] powerpc/mm: enable memory hotplug on radix

2016-08-21 Thread Aneesh Kumar K.V
Reza Arbab writes: > Memory hotplug is leading to hash page table calls, even on radix: > > ... > arch_add_memory > create_section_mapping > htab_bolt_mapping > BUG_ON(!ppc_md.hpte_insert); > >