[PATCH] powerpc: Fix size of st_nlink on 64bit

2012-06-02 Thread Anton Blanchard
commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures. Signed-off-by: Anton Blanchard --- Index: linux-build/arch/powerpc/include/asm/stat.h ===

Re: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL

2012-06-02 Thread Joakim Tjernlund
> > On Fri, 2012-06-01 at 17:42 -0500, Scott Wood wrote: > > On 06/01/2012 05:30 PM, Benjamin Herrenschmidt wrote: > > > BTW. My point of view is that this whole business about MSR:DE is a HW > > > design bug. There should be -no- (absolutely 0) interaction between the > > > SW state and the HW deb

Re: [PATCH] powerpc: Fix size of st_nlink on 64bit

2012-06-02 Thread Benjamin Herrenschmidt
On Sat, 2012-06-02 at 21:34 +1000, Anton Blanchard wrote: > commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to > explicitly-sized type) changed the size of st_nlink on ppc64 from > a long to a short, resulting in boot failures. > > Signed-off-by: Anton Blanchard Acked-by: Benjamin

Re: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL

2012-06-02 Thread Benjamin Herrenschmidt
On Sat, 2012-06-02 at 20:29 +0200, Joakim Tjernlund wrote: > > hmm, where does this go w.r.t the patch? Got the feeling that the > best thing is to just turn MSR:DE on and be done with it? Not unconditionally, we need to have a close look, that might be ok specifically for BookE 32-bit, it's cer

Re: [PATCH] powerpc: Fix size of st_nlink on 64bit

2012-06-02 Thread Stephen Rothwell
Hi Anton, On Sat, 2 Jun 2012 21:34:52 +1000 Anton Blanchard wrote: > > commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to > explicitly-sized type) changed the size of st_nlink on ppc64 from > a long to a short, resulting in boot failures. > > Signed-off-by: Anton Blanchard Would

Re: [PATCH] powerpc: Fix size of st_nlink on 64bit

2012-06-02 Thread Anton Blanchard
Hi Stephen, > > commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to > > explicitly-sized type) changed the size of st_nlink on ppc64 from > > a long to a short, resulting in boot failures. > > > > Signed-off-by: Anton Blanchard > > Would this affect my (early user mode) boot probl

Re: [PATCH v2 2/3] ppc32/kprobe: complete kprobe and migrate exception frame

2012-06-02 Thread tiejun.chen
On 05/10/2012 11:50 AM, Benjamin Herrenschmidt wrote: > On Thu, 2011-12-15 at 19:00 +0800, Tiejun Chen wrote: >> We can't emulate stwu since that may corrupt current exception stack. >> So we will have to do real store operation in the exception return code. >> >> Firstly we'll allocate a trampolin

[v3 PATCH 1/3] powerpc/kprobe: introduce a new thread flag

2012-06-02 Thread Tiejun Chen
We need to add a new thread flag, TIF_EMULATE_STACK_STORE, for emulating stack store operation while exiting exception. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/thread_info.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/thread

[v3 PATCH 2/3] ppc32/kprobe: complete kprobe and migrate exception frame

2012-06-02 Thread Tiejun Chen
We can't emulate stwu since that may corrupt current exception stack. So we will have to do real store operation in the exception return code. Firstly we'll allocate a trampoline exception frame below the kprobed function stack and copy the current exception frame to the trampoline. Then we can do

[v3 PATCH 3/3] ppc32/kprobe: don't emulate store when kprobe stwu r1

2012-06-02 Thread Tiejun Chen
We don't do the real store operation for kprobing 'stwu Rx,(y)R1' since this may corrupt the exception frame, now we will do this operation safely in exception return code after migrate current exception frame below the kprobed function stack. So we only update gpr[1] here and trigger a thread fla

[v3 PATCH 0/3] ppc32/kprobe: Fix a bug for kprobe stwu r1

2012-06-02 Thread Tiejun Chen
Changes from V2: * populate those existed codes to reorganize codes * add check if we'll trigger kernel stack over flow Changes from V1: * use memcpy simply to withdraw copy_exc_stack * add !(regs->msr & MSR_PR)) and WARN_ON(test_thread_flag(TIF_EMULATE_STACK_STORE)); to make sure we'r

Re: [v3 PATCH 0/3] ppc32/kprobe: Fix a bug for kprobe stwu r1

2012-06-02 Thread tiejun.chen
On 06/03/2012 01:07 PM, Tiejun Chen wrote: > Changes from V2: > > * populate those existed codes to reorganize codes > * add check if we'll trigger kernel stack over flow BTW, I always validate this on mpc8536ds(UP)/mpc8572ds(SMP) with/without CONFIG_PREEMPT. Tiejun > > Changes from V1: > > *

Re: [PATCH] powerpc: Fix size of st_nlink on 64bit

2012-06-02 Thread Stephen Rothwell
Hi Anton, On Sun, 3 Jun 2012 13:48:36 +1000 Anton Blanchard wrote: > > > > commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to > > > explicitly-sized type) changed the size of st_nlink on ppc64 from > > > a long to a short, resulting in boot failures. > > > > > > Signed-off-by: Anto