Re: kprobes sanity test fails on next-20190708

2019-07-09 Thread Masami Hiramatsu
On Tue, 9 Jul 2019 11:40:45 -0400
Steven Rostedt  wrote:

> On Tue, 9 Jul 2019 16:37:55 +0100
> Mark Rutland  wrote:
> 
> > > I agree. I pushed to my repo in the for-next branch. Care to test that?
> > > 
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git  
> > 
> > I've just given that a spin with KPROBES and KPROBES_SANITY_TEST
> > selected, and it boots cleanly for me. FWIW:
> > 
> > Tested-by: Mark Rutland 
> 
> Thanks, then I'm guessing no more changes need to be made.
> 
> I usually don't rebase my for-next branch for tags, but since I just
> pushed it, I guess I can add this one ;-)

Thanks Steve!



-- 
Masami Hiramatsu 


Re: kprobes sanity test fails on next-20190708

2019-07-09 Thread Steven Rostedt
On Tue, 9 Jul 2019 16:37:55 +0100
Mark Rutland  wrote:

> > I agree. I pushed to my repo in the for-next branch. Care to test that?
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git  
> 
> I've just given that a spin with KPROBES and KPROBES_SANITY_TEST
> selected, and it boots cleanly for me. FWIW:
> 
> Tested-by: Mark Rutland 

Thanks, then I'm guessing no more changes need to be made.

I usually don't rebase my for-next branch for tags, but since I just
pushed it, I guess I can add this one ;-)

-- Steve


Re: kprobes sanity test fails on next-20190708

2019-07-09 Thread Mark Rutland
On Tue, Jul 09, 2019 at 11:25:48AM -0400, Steven Rostedt wrote:
> On Tue, 9 Jul 2019 21:36:57 +0900
> Masami Hiramatsu  wrote:
> 
> > On Tue, 9 Jul 2019 12:19:15 +0200
> > Anders Roxell  wrote:
> > 
> > > On Mon, 8 Jul 2019 at 17:56, James Morse  wrote:  
> > > >
> > > > Hi,
> > > >
> > > > On 08/07/2019 15:11, Anders Roxell wrote:  
> > > > > argh... resending, with plaintext... Sorry =/
> > > > >
> > > > > I tried to build a next-201908 defconfig + CONFIG_KPROBES=y and
> > > > > CONFIG_KPROBES_SANITY_TEST=y
> > > > >
> > > > > I get the following Call trace, any ideas?
> > > > > I've tried tags back to next-20190525 and they also failes... I 
> > > > > haven't
> > > > > found a commit that works yet.
> > > > >
> > > > > [0.098694] Kprobe smoke test: started
> > > > > [0.102001] audit: type=2000 audit(0.088:1): state=initialized
> > > > > audit_enabled=0 res=1
> > > > > [0.104753] Internal error: aarch64 BRK: f204 [#1] PREEMPT SMP 
> > > > >  
> > > >
> > > > This sounds like the issue Mark reported:
> > > > https://lore.kernel.org/r/20190702165008.gc34...@lakrids.cambridge.arm.com
> > > >
> > > > It doesn't look like Steve's patch has percolated into next yet:
> > > > https://lore.kernel.org/lkml/20190703103715.32579...@gandalf.local.home/
> 
> I forgot to push it after sending it. :-(
> 
> > > >
> > > > Could you give that a try to see if this is a new issue?  
> > > 
> > > The patch didn't apply cleanly.
> > > However, when I resolved the issue it works.
> > > I'm a bit embarrassed since I now remembered that I reported it a while 
> > > back.
> > > https://lore.kernel.org/lkml/20190625191545.245259...@goodmis.org/
> > > 
> > > Both patches resolved the issue.
> > > I've tested both.  
> > 
> > In that case, the later one (move postcore to subsys) seems good to me.
> > 
> > Delaying the test is just avoiding the issue that the selftest found,
> > since right after init_kprobes() are called, the kprobe is ready for use.
> > This means that the selftest must be run as the first user of the kprobes
> > and it must be run right after initialize kprobes.
> 
> I agree. I pushed to my repo in the for-next branch. Care to test that?
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git

I've just given that a spin with KPROBES and KPROBES_SANITY_TEST
selected, and it boots cleanly for me. FWIW:

Tested-by: Mark Rutland 

Thanks,
Mark.


Re: kprobes sanity test fails on next-20190708

2019-07-09 Thread Steven Rostedt
On Tue, 9 Jul 2019 21:36:57 +0900
Masami Hiramatsu  wrote:

> On Tue, 9 Jul 2019 12:19:15 +0200
> Anders Roxell  wrote:
> 
> > On Mon, 8 Jul 2019 at 17:56, James Morse  wrote:  
> > >
> > > Hi,
> > >
> > > On 08/07/2019 15:11, Anders Roxell wrote:  
> > > > argh... resending, with plaintext... Sorry =/
> > > >
> > > > I tried to build a next-201908 defconfig + CONFIG_KPROBES=y and
> > > > CONFIG_KPROBES_SANITY_TEST=y
> > > >
> > > > I get the following Call trace, any ideas?
> > > > I've tried tags back to next-20190525 and they also failes... I haven't
> > > > found a commit that works yet.
> > > >
> > > > [0.098694] Kprobe smoke test: started
> > > > [0.102001] audit: type=2000 audit(0.088:1): state=initialized
> > > > audit_enabled=0 res=1
> > > > [0.104753] Internal error: aarch64 BRK: f204 [#1] PREEMPT SMP  
> > >
> > > This sounds like the issue Mark reported:
> > > https://lore.kernel.org/r/20190702165008.gc34...@lakrids.cambridge.arm.com
> > >
> > > It doesn't look like Steve's patch has percolated into next yet:
> > > https://lore.kernel.org/lkml/20190703103715.32579...@gandalf.local.home/

I forgot to push it after sending it. :-(

> > >
> > > Could you give that a try to see if this is a new issue?  
> > 
> > The patch didn't apply cleanly.
> > However, when I resolved the issue it works.
> > I'm a bit embarrassed since I now remembered that I reported it a while 
> > back.
> > https://lore.kernel.org/lkml/20190625191545.245259...@goodmis.org/
> > 
> > Both patches resolved the issue.
> > I've tested both.  
> 
> In that case, the later one (move postcore to subsys) seems good to me.
> 
> Delaying the test is just avoiding the issue that the selftest found,
> since right after init_kprobes() are called, the kprobe is ready for use.
> This means that the selftest must be run as the first user of the kprobes
> and it must be run right after initialize kprobes.

I agree. I pushed to my repo in the for-next branch. Care to test that?

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git

-- Steve



Re: kprobes sanity test fails on next-20190708

2019-07-09 Thread Masami Hiramatsu
On Tue, 9 Jul 2019 12:19:15 +0200
Anders Roxell  wrote:

> On Mon, 8 Jul 2019 at 17:56, James Morse  wrote:
> >
> > Hi,
> >
> > On 08/07/2019 15:11, Anders Roxell wrote:
> > > argh... resending, with plaintext... Sorry =/
> > >
> > > I tried to build a next-201908 defconfig + CONFIG_KPROBES=y and
> > > CONFIG_KPROBES_SANITY_TEST=y
> > >
> > > I get the following Call trace, any ideas?
> > > I've tried tags back to next-20190525 and they also failes... I haven't
> > > found a commit that works yet.
> > >
> > > [0.098694] Kprobe smoke test: started
> > > [0.102001] audit: type=2000 audit(0.088:1): state=initialized
> > > audit_enabled=0 res=1
> > > [0.104753] Internal error: aarch64 BRK: f204 [#1] PREEMPT SMP
> >
> > This sounds like the issue Mark reported:
> > https://lore.kernel.org/r/20190702165008.gc34...@lakrids.cambridge.arm.com
> >
> > It doesn't look like Steve's patch has percolated into next yet:
> > https://lore.kernel.org/lkml/20190703103715.32579...@gandalf.local.home/
> >
> > Could you give that a try to see if this is a new issue?
> 
> The patch didn't apply cleanly.
> However, when I resolved the issue it works.
> I'm a bit embarrassed since I now remembered that I reported it a while back.
> https://lore.kernel.org/lkml/20190625191545.245259...@goodmis.org/
> 
> Both patches resolved the issue.
> I've tested both.

In that case, the later one (move postcore to subsys) seems good to me.

Delaying the test is just avoiding the issue that the selftest found,
since right after init_kprobes() are called, the kprobe is ready for use.
This means that the selftest must be run as the first user of the kprobes
and it must be run right after initialize kprobes.

Thank you,

> 
> Cheers,
> Anders


-- 
Masami Hiramatsu


Re: kprobes sanity test fails on next-20190708

2019-07-09 Thread Anders Roxell
On Mon, 8 Jul 2019 at 17:56, James Morse  wrote:
>
> Hi,
>
> On 08/07/2019 15:11, Anders Roxell wrote:
> > argh... resending, with plaintext... Sorry =/
> >
> > I tried to build a next-201908 defconfig + CONFIG_KPROBES=y and
> > CONFIG_KPROBES_SANITY_TEST=y
> >
> > I get the following Call trace, any ideas?
> > I've tried tags back to next-20190525 and they also failes... I haven't
> > found a commit that works yet.
> >
> > [0.098694] Kprobe smoke test: started
> > [0.102001] audit: type=2000 audit(0.088:1): state=initialized
> > audit_enabled=0 res=1
> > [0.104753] Internal error: aarch64 BRK: f204 [#1] PREEMPT SMP
>
> This sounds like the issue Mark reported:
> https://lore.kernel.org/r/20190702165008.gc34...@lakrids.cambridge.arm.com
>
> It doesn't look like Steve's patch has percolated into next yet:
> https://lore.kernel.org/lkml/20190703103715.32579...@gandalf.local.home/
>
> Could you give that a try to see if this is a new issue?

The patch didn't apply cleanly.
However, when I resolved the issue it works.
I'm a bit embarrassed since I now remembered that I reported it a while back.
https://lore.kernel.org/lkml/20190625191545.245259...@goodmis.org/

Both patches resolved the issue.
I've tested both.

Cheers,
Anders


Re: kprobes sanity test fails on next-20190708

2019-07-08 Thread James Morse
Hi,

On 08/07/2019 15:11, Anders Roxell wrote:
> argh... resending, with plaintext... Sorry =/
> 
> I tried to build a next-201908 defconfig + CONFIG_KPROBES=y and
> CONFIG_KPROBES_SANITY_TEST=y
> 
> I get the following Call trace, any ideas?
> I've tried tags back to next-20190525 and they also failes... I haven't
> found a commit that works yet.
> 
> [0.098694] Kprobe smoke test: started
> [0.102001] audit: type=2000 audit(0.088:1): state=initialized
> audit_enabled=0 res=1
> [0.104753] Internal error: aarch64 BRK: f204 [#1] PREEMPT SMP

This sounds like the issue Mark reported:
https://lore.kernel.org/r/20190702165008.gc34...@lakrids.cambridge.arm.com

It doesn't look like Steve's patch has percolated into next yet:
https://lore.kernel.org/lkml/20190703103715.32579...@gandalf.local.home/

Could you give that a try to see if this is a new issue?


Thanks,

James


kprobes sanity test fails on next-20190708

2019-07-08 Thread Anders Roxell
Hi,

argh... resending, with plaintext... Sorry =/

I tried to build a next-201908 defconfig + CONFIG_KPROBES=y and
CONFIG_KPROBES_SANITY_TEST=y

I get the following Call trace, any ideas?
I've tried tags back to next-20190525 and they also failes... I haven't
found a commit that works yet.

[0.098694] Kprobe smoke test: started
[0.102001] audit: type=2000 audit(0.088:1): state=initialized
audit_enabled=0 res=1
[0.104753] Internal error: aarch64 BRK: f204 [#1] PREEMPT SMP
[0.106845] Modules linked in:
[0.107897] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
5.2.0-next-20190708 #1
[0.110403] Hardware name: linux,dummy-virt (DT)
[0.112104] pstate: 6005 (nZCv daif -PAN -UAO)
[0.113852] pc : kprobe_target+0x0/0x18
[0.115268] lr : init_test_probes+0x1ac/0x3a0
[0.116890] sp : 1000bd40
[0.118122] x29: 1000bd40 x28:  
[0.120049] x27:  x26: 11190518 
[0.122029] x25: 1117e7d8 x24: 11261078 
[0.123977] x23:  x22: 1169bb70 
[0.125930] x21: 1186c000 x20: 116796c8 
[0.127886] x19: 1186cf10 x18: 0010 
[0.129836] x17:  x16: 80007b078000 
[0.131829] x15:  x14: 116796c8 
[0.133759] x13:  x12:  
[0.135736] x11:  x10: 0990 
[0.137693] x9 : 1000ba10 x8 : 80007b0789f0 
[0.139659] x7 : 80007dbe1dc0 x6 : 80007dbe1d40 
[0.141615] x5 : 0237 x4 : 21f2 
[0.143599] x3 : 1169bfb8 x2 :  
[0.145582] x1 : 10184e40 x0 : 40a0d76d 
[0.147556] Call trace:
[0.148459]  kprobe_target+0x0/0x18
[0.149754]  init_kprobes+0x120/0x134
[0.151103]  do_one_initcall+0x74/0x1b0
[0.152511]  kernel_init_freeable+0x194/0x22c
[0.154133]  kernel_init+0x10/0x100
[0.155411]  ret_from_fork+0x10/0x1c
[0.156717] Code: a8c97bfd d65f03c0 d421 97fd5cdd (d4200080) 
[0.158949] ---[ end trace 823556350f0e2d55 ]---
[0.160681] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x000b
[0.163247] ---[ end Kernel panic - not syncing: Attempted to kill
init! exitcode=0x000b ]---


Cheers,
Anders