Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-28 Thread Christophe Leroy
Le 26/04/2023 à 14:29, Michael Ellerman a écrit : > Joel Fernandes writes: >> On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > ... >> >> Out of curiosity for PPC folks, why cannot 64-bit PPC use per-task >> canary? Michael, is this an optimization? Adding Christophe as well >> since it came

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-27 Thread Zhouyi Zhou
On Thu, Apr 27, 2023 at 10:13 PM Michael Ellerman wrote: > > Zhouyi Zhou writes: > > On Thu, Apr 27, 2023 at 11:09 AM Michael Ellerman > > wrote: > >> > >> Zhouyi Zhou writes: > >> > On Tue, Apr 25, 2023 at 2:01 PM Zhouyi Zhou wrote: > >> >> On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-27 Thread Michael Ellerman
Zhouyi Zhou writes: > On Thu, Apr 27, 2023 at 11:09 AM Michael Ellerman wrote: >> >> Zhouyi Zhou writes: >> > On Tue, Apr 25, 2023 at 2:01 PM Zhouyi Zhou wrote: >> >> On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman >> >> wrote: >> ... >> >> > >> >> > There's 12.2.0 here: >> >> > >> >> > h

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-27 Thread Zhouyi Zhou
On Thu, Apr 27, 2023 at 11:09 AM Michael Ellerman wrote: > > Zhouyi Zhou writes: > > On Tue, Apr 25, 2023 at 2:01 PM Zhouyi Zhou wrote: > >> On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman > >> wrote: > ... > >> > > >> > There's 12.2.0 here: > >> > > >> > https://mirrors.edge.kernel.org/pu

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-26 Thread Zhouyi Zhou
On Thu, Apr 27, 2023 at 11:09 AM Michael Ellerman wrote: > > Zhouyi Zhou writes: > > On Tue, Apr 25, 2023 at 2:01 PM Zhouyi Zhou wrote: > >> On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman > >> wrote: > ... > >> > > >> > There's 12.2.0 here: > >> > > >> > https://mirrors.edge.kernel.org/pu

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-26 Thread Michael Ellerman
Zhouyi Zhou writes: > On Tue, Apr 25, 2023 at 2:01 PM Zhouyi Zhou wrote: >> On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman wrote: ... >> > >> > There's 12.2.0 here: >> > >> > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/ >> > >> > https://mirrors.edge.kerne

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-26 Thread Michael Ellerman
Peter Zijlstra writes: > On Wed, Apr 26, 2023 at 09:44:22AM -0400, Joel Fernandes wrote: > >> How could you control which code paths don't have the stack protector? >> Just curious. > > https://lkml.kernel.org/r/20230412-no_stackp-v2-0-116f9fe4b...@google.com We also have some entire files disabl

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-26 Thread Peter Zijlstra
On Wed, Apr 26, 2023 at 09:44:22AM -0400, Joel Fernandes wrote: > How could you control which code paths don't have the stack protector? > Just curious. https://lkml.kernel.org/r/20230412-no_stackp-v2-0-116f9fe4b...@google.com

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-26 Thread Joel Fernandes
On Wed, Apr 26, 2023 at 8:30 AM Michael Ellerman wrote: > > Joel Fernandes writes: > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > ... > > > > Out of curiosity for PPC folks, why cannot 64-bit PPC use per-task > > canary? Michael, is this an optimization? Adding Christophe as well > > s

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-26 Thread Michael Ellerman
Joel Fernandes writes: > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: ... > > Out of curiosity for PPC folks, why cannot 64-bit PPC use per-task > canary? Michael, is this an optimization? Adding Christophe as well > since it came in a few years ago via the following commit: I think Christ

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Wed, Apr 26, 2023 at 10:15 AM Joel Fernandes wrote: > > Hi Zhouyi, > > On Wed, Apr 26, 2023 at 09:31:17AM +0800, Zhouyi Zhou wrote: > [..] > > Joel makes the learning process easier for me, indeed! > > I know that feeling being a learner myself ;-) > > > One question I have tried very hard to u

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
Hi Zhouyi, On Wed, Apr 26, 2023 at 09:31:17AM +0800, Zhouyi Zhou wrote: [..] > Joel makes the learning process easier for me, indeed! I know that feeling being a learner myself ;-) > One question I have tried very hard to understand, but still confused. > for now, I know > r13 is fixed, but r1 i

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Wed, Apr 26, 2023 at 8:33 AM Joel Fernandes wrote: > > On Tue, Apr 25, 2023 at 9:50 AM Zhouyi Zhou wrote: > > > > Hi > > > > On Tue, Apr 25, 2023 at 9:40 PM Christophe Leroy > > wrote: > > > > > > > > > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > > > On Tue, Apr 25, 2023 at 6:58

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 9:40 AM Christophe Leroy wrote: > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > >> > >> hi > >> > >> On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra > >> wrote: > >>> > >>> On Mon, Apr 24, 2023 at 02:55:11PM

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 9:50 AM Zhouyi Zhou wrote: > > Hi > > On Tue, Apr 25, 2023 at 9:40 PM Christophe Leroy > wrote: > > > > > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > > >> > > >> hi > > >> > > >> On Tue, Apr 25, 2023 at

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
Hi On Tue, Apr 25, 2023 at 9:40 PM Christophe Leroy wrote: > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > >> > >> hi > >> > >> On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra > >> wrote: > >>> > >>> On Mon, Apr 24, 2023 at 02:55:

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Christophe Leroy
Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: >> >> hi >> >> On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: >>> >>> On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: This is amazing debugging Boqun, like a boss! On

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Christophe Leroy
Le 25/04/2023 à 13:53, Peter Zijlstra a écrit : > On Tue, Apr 25, 2023 at 06:59:29AM -0400, Joel Fernandes wrote: >>> I'm a little confused; the way I understand the whole stack protector >>> thing to work is that we push a canary on the stack at call and on >>> return check it is still valid. Si

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2023 at 06:59:29AM -0400, Joel Fernandes wrote: > > I'm a little confused; the way I understand the whole stack protector > > thing to work is that we push a canary on the stack at call and on > > return check it is still valid. Since in general tasks randomly migrate, > > the per-c

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Tue, Apr 25, 2023 at 7:06 PM Joel Fernandes wrote: > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > > > > hi > > > > On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: > > > > > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > > > This is amazing debugging Boqu

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > > hi > > On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: > > > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > > This is amazing debugging Boqun, like a boss! One comment below: > > > > > > > > > Or something simple

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 6:13 AM Peter Zijlstra wrote: > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > This is amazing debugging Boqun, like a boss! One comment below: > > > > > > > Or something simple I haven't thought of? :) > > > > > > > > At what points can r13 change?

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
hi On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > This is amazing debugging Boqun, like a boss! One comment below: > > > > > > > Or something simple I haven't thought of? :) > > > > > > > > At what points can r13 chang

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Peter Zijlstra
On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > This is amazing debugging Boqun, like a boss! One comment below: > > > > > Or something simple I haven't thought of? :) > > > > > > At what points can r13 change? Only when some particular functions are > > > called? > > > > > > >

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Tue, Apr 25, 2023 at 2:01 PM Zhouyi Zhou wrote: > > hi > > On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman wrote: > > > > Zhouyi Zhou writes: > > > Dear PowerPC and RCU developers: > > > During the RCU torture test on mainline (on the VM of Opensource Lab > > > of Oregon State University), S

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Zhouyi Zhou
hi On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman wrote: > > Zhouyi Zhou writes: > > Dear PowerPC and RCU developers: > > During the RCU torture test on mainline (on the VM of Opensource Lab > > of Oregon State University), SRCU-P failed with __stack_chk_fail: > ... > > by debugging, I see the

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Zhouyi Zhou
On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman wrote: > > Zhouyi Zhou writes: > > Dear PowerPC and RCU developers: > > During the RCU torture test on mainline (on the VM of Opensource Lab > > of Oregon State University), SRCU-P failed with __stack_chk_fail: > ... > > by debugging, I see the r10

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Michael Ellerman
Zhouyi Zhou writes: > Dear PowerPC and RCU developers: > During the RCU torture test on mainline (on the VM of Opensource Lab > of Oregon State University), SRCU-P failed with __stack_chk_fail: ... > by debugging, I see the r10 is assigned with r13 on c0226eb4, > but if there is a context-

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Boqun Feng
On Mon, Apr 24, 2023 at 12:29:00PM -0500, Segher Boessenkool wrote: > On Mon, Apr 24, 2023 at 08:28:55AM -0700, Boqun Feng wrote: > > On Mon, Apr 24, 2023 at 10:13:51AM -0500, Segher Boessenkool wrote: > > > At what points can r13 change? Only when some particular functions are > > > called? > >

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Joel Fernandes
This is amazing debugging Boqun, like a boss! One comment below: > > > Or something simple I haven't thought of? :) > > > > At what points can r13 change? Only when some particular functions are > > called? > > > > r13 is the local paca: > > register struct paca_struct *local_paca asm("r1

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Segher Boessenkool
On Mon, Apr 24, 2023 at 08:28:55AM -0700, Boqun Feng wrote: > On Mon, Apr 24, 2023 at 10:13:51AM -0500, Segher Boessenkool wrote: > > At what points can r13 change? Only when some particular functions are > > called? > > r13 is the local paca: > > register struct paca_struct *local_paca as

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Boqun Feng
On Mon, Apr 24, 2023 at 10:13:51AM -0500, Segher Boessenkool wrote: > Hi! > > On Mon, Apr 24, 2023 at 11:14:00PM +1000, Michael Ellerman wrote: > > Boqun Feng writes: > > > On Sat, Apr 22, 2023 at 09:28:39PM +0200, Joel Fernandes wrote: > > >> On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou wrote: >

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Segher Boessenkool
Hi! On Mon, Apr 24, 2023 at 11:14:00PM +1000, Michael Ellerman wrote: > Boqun Feng writes: > > On Sat, Apr 22, 2023 at 09:28:39PM +0200, Joel Fernandes wrote: > >> On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou wrote: > >> > by debugging, I see the r10 is assigned with r13 on c0226eb4, > >>

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-24 Thread Michael Ellerman
Hi Boqun, Thanks for debugging this ... Boqun Feng writes: > On Sat, Apr 22, 2023 at 09:28:39PM +0200, Joel Fernandes wrote: >> On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou wrote: >> > >> > Dear PowerPC and RCU developers: >> > During the RCU torture test on mainline (on the VM of Opensource Lab

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-23 Thread Zhouyi Zhou
Thank Boqun for your wonderful analysis! On Mon, Apr 24, 2023 at 8:33 AM Boqun Feng wrote: > > On Sat, Apr 22, 2023 at 09:28:39PM +0200, Joel Fernandes wrote: > > On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou wrote: > > > > > > Dear PowerPC and RCU developers: > > > During the RCU torture test on

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-23 Thread Boqun Feng
On Sat, Apr 22, 2023 at 09:28:39PM +0200, Joel Fernandes wrote: > On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou wrote: > > > > Dear PowerPC and RCU developers: > > During the RCU torture test on mainline (on the VM of Opensource Lab > > of Oregon State University), SRCU-P failed with __stack_chk_fai

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-22 Thread Zhouyi Zhou
On Sun, Apr 23, 2023 at 9:37 AM Zhouyi Zhou wrote: > > On Sun, Apr 23, 2023 at 3:19 AM Joel Fernandes wrote: > > > > Hi Zhouyi, > Thank Joel for your quick response ;-) > I will gradually provide all the necessary information to facilitate > our chasing. Please do not hesitate email me > if I hav

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-22 Thread Zhouyi Zhou
On Sun, Apr 23, 2023 at 3:19 AM Joel Fernandes wrote: > > Hi Zhouyi, Thank Joel for your quick response ;-) I will gradually provide all the necessary information to facilitate our chasing. Please do not hesitate email me if I have ignored any ;-) > > On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou w

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-22 Thread Joel Fernandes
On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou wrote: > > Dear PowerPC and RCU developers: > During the RCU torture test on mainline (on the VM of Opensource Lab > of Oregon State University), SRCU-P failed with __stack_chk_fail: > [ 264.381952][ T99] [c6c7bab0] [c10c67c0] > dump_s

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-22 Thread Joel Fernandes
Hi Zhouyi, On Sat, Apr 22, 2023 at 2:47 PM Zhouyi Zhou wrote: > > Dear PowerPC and RCU developers: > During the RCU torture test on mainline (on the VM of Opensource Lab > of Oregon State University), SRCU-P failed with __stack_chk_fail: > [ 264.381952][ T99] [c6c7bab0] [c10c67

BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-22 Thread Zhouyi Zhou
Dear PowerPC and RCU developers: During the RCU torture test on mainline (on the VM of Opensource Lab of Oregon State University), SRCU-P failed with __stack_chk_fail: [ 264.381952][ T99] [c6c7bab0] [c10c67c0] dump_stack_lvl+0x94/0xd8 (unreliable) [ 264.383786][ T99] [c000