Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1684988 > unrolled thread

Re: in:imklog segfault in 4.12+git on most sparc64's

Started byMeelis Roos <mroos@linux.ee>
First post2017-07-11 13:50 +0200
Last post2017-07-12 06:10 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: in:imklog segfault in 4.12+git on most sparc64's Meelis Roos <mroos@linux.ee> - 2017-07-11 13:50 +0200
    Re: in:imklog segfault in 4.12+git on most sparc64's David Miller <davem@davemloft.net> - 2017-07-12 05:20 +0200
    Re: in:imklog segfault in 4.12+git on most sparc64's David Miller <davem@davemloft.net> - 2017-07-12 06:10 +0200
      Re: in:imklog segfault in 4.12+git on most sparc64's Meelis Roos <mroos@linux.ee> - 2017-07-12 09:20 +0200
        Re: in:imklog segfault in 4.12+git on most sparc64's David Miller <davem@davemloft.net> - 2017-07-12 18:10 +0200
          Re: in:imklog segfault in 4.12+git on most sparc64's Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-12 18:20 +0200
    Re: in:imklog segfault in 4.12+git on most sparc64's Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-12 06:10 +0200

#1684988 — Re: in:imklog segfault in 4.12+git on most sparc64's

FromMeelis Roos <mroos@linux.ee>
Date2017-07-11 13:50 +0200
SubjectRe: in:imklog segfault in 4.12+git on most sparc64's
Message-ID<u21PX-1KO-7@gated-at.bofh.it>
> I tested yesterdays git with 4.13 sparc merge on a big bunch of my test 
> machines.
> 
> Good news: the timestamps starting from boot seem to work on all the 
> machines, starting with Ultra 1 and Ultra 2.
> 
> Bad news: all working sun4u machines have the following line in dmesg 
> (PID varies):
> in:imklog[1036]: segfault at 49 ip 0000000000035bb0 (rpc 00000000f779dfa0) sp 00000002f7a78818 error 30002 in rsyslogd[10000+88000]
> 
> This is with Debian unstable 32-bit userland as of 2015 summer. It did 
> not happen with 4.12.

I bisected it to the commit below. CC Al Viro.

In following commits around this one (some bisect steps before, and the 
last step) the crashes were slightly different from the original crash 
yersterday, like

in:imuxsock[1606]: segfault at fffffff8 ip 00000000f774e154 (rpc 00000000f774dfe8) sp 00000001f7965a68 error 30002 in libc-2.19.so[f76cc000+16a000]

but this was the first commit introducing the crashes.

d9e968cb9f849770288f5fde3d8d3a5f7e339052 is the first bad commit
commit d9e968cb9f849770288f5fde3d8d3a5f7e339052
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Wed May 31 04:33:51 2017 -0400

    getrlimit()/setrlimit(): move compat to native

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

:040000 040000 5e1a0c25f4554ccdc824b18dc50078d379cdbf9a 
6d820451a388c5771a2a410578365d14a0194e4e M      kernel

-- 
Meelis Roos (mroos@linux.ee)

[toc] | [next] | [standalone]


#1685481

FromDavid Miller <davem@davemloft.net>
Date2017-07-12 05:20 +0200
Message-ID<u2glX-2Cm-5@gated-at.bofh.it>
In reply to#1684988
From: Meelis Roos <mroos@linux.ee>
Date: Tue, 11 Jul 2017 14:48:27 +0300 (EEST)

>> I tested yesterdays git with 4.13 sparc merge on a big bunch of my test 
>> machines.
>> 
>> Good news: the timestamps starting from boot seem to work on all the 
>> machines, starting with Ultra 1 and Ultra 2.
>> 
>> Bad news: all working sun4u machines have the following line in dmesg 
>> (PID varies):
>> in:imklog[1036]: segfault at 49 ip 0000000000035bb0 (rpc 00000000f779dfa0) sp 00000002f7a78818 error 30002 in rsyslogd[10000+88000]
>> 
>> This is with Debian unstable 32-bit userland as of 2015 summer. It did 
>> not happen with 4.12.
> 
> I bisected it to the commit below. CC Al Viro.
> 
> In following commits around this one (some bisect steps before, and the 
> last step) the crashes were slightly different from the original crash 
> yersterday, like
> 
> in:imuxsock[1606]: segfault at fffffff8 ip 00000000f774e154 (rpc 00000000f774dfe8) sp 00000001f7965a68 error 30002 in libc-2.19.so[f76cc000+16a000]
> 
> but this was the first commit introducing the crashes.
> 
> d9e968cb9f849770288f5fde3d8d3a5f7e339052 is the first bad commit
> commit d9e968cb9f849770288f5fde3d8d3a5f7e339052
> Author: Al Viro <viro@zeniv.linux.org.uk>
> Date:   Wed May 31 04:33:51 2017 -0400
> 
>     getrlimit()/setrlimit(): move compat to native
> 
>     Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> 
> :040000 040000 5e1a0c25f4554ccdc824b18dc50078d379cdbf9a 
> 6d820451a388c5771a2a410578365d14a0194e4e M      kernel

I can't figure out what is wrong in this change, except that it does
two things at once.

It moves code, and changes it at the same time.  That should have been
done in two changes.

Because of that, we can't tell which of the two things introduced the
regression.

Al?

[toc] | [prev] | [next] | [standalone]


#1685504

FromDavid Miller <davem@davemloft.net>
Date2017-07-12 06:10 +0200
Message-ID<u2h8m-39O-13@gated-at.bofh.it>
In reply to#1684988
From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Wed, 12 Jul 2017 04:59:45 +0100

> Again, my apologies for format of that all - I'm almost completely
> off-net and while typing an ed script is feasible, context diff is
> too far over the top.  Usimg mutt in ssh session from android is
> not fun, to put it mildly...  

Yes, that might be it.

Meelis, please test this:

====================
fix a braino in compat_sys_getrlimit()

Fixes: commit d9e968cb9f84 "getrlimit()/setrlimit(): move compat to native"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>

diff --git a/kernel/sys.c b/kernel/sys.c
index 73fc0af..2855ee7 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1362,7 +1362,7 @@ COMPAT_SYSCALL_DEFINE2(getrlimit, unsigned int, resource,
 
 	ret = do_prlimit(current, resource, NULL, &r);
 	if (!ret) {
-		struct rlimit r32;
+		struct compat_rlimit r32;
 		if (r.rlim_cur > COMPAT_RLIM_INFINITY)
 			r32.rlim_cur = COMPAT_RLIM_INFINITY;
 		else

[toc] | [prev] | [next] | [standalone]


#1685557

FromMeelis Roos <mroos@linux.ee>
Date2017-07-12 09:20 +0200
Message-ID<u2k6e-57j-1@gated-at.bofh.it>
In reply to#1685504
> From: Al Viro <viro@ZenIV.linux.org.uk>
> Date: Wed, 12 Jul 2017 04:59:45 +0100
> 
> > Again, my apologies for format of that all - I'm almost completely
> > off-net and while typing an ed script is feasible, context diff is
> > too far over the top.  Usimg mutt in ssh session from android is
> > not fun, to put it mildly...  
> 
> Yes, that might be it.
> 
> Meelis, please test this:
> 
> ====================
> fix a braino in compat_sys_getrlimit()
> 
> Fixes: commit d9e968cb9f84 "getrlimit()/setrlimit(): move compat to native"
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> Acked-by: David S. Miller <davem@davemloft.net>

Yes, it works right on top of 4.12.0-rc1-00007-gd9e968c and on top of 
todays git as well. 

-- 
Meelis Roos (mroos@linux.ee)

[toc] | [prev] | [next] | [standalone]


#1685881

FromDavid Miller <davem@davemloft.net>
Date2017-07-12 18:10 +0200
Message-ID<u2sn7-1Zx-1@gated-at.bofh.it>
In reply to#1685557
From: Meelis Roos <mroos@linux.ee>
Date: Wed, 12 Jul 2017 10:09:50 +0300 (EEST)

>> From: Al Viro <viro@ZenIV.linux.org.uk>
>> Date: Wed, 12 Jul 2017 04:59:45 +0100
>> 
>> > Again, my apologies for format of that all - I'm almost completely
>> > off-net and while typing an ed script is feasible, context diff is
>> > too far over the top.  Usimg mutt in ssh session from android is
>> > not fun, to put it mildly...  
>> 
>> Yes, that might be it.
>> 
>> Meelis, please test this:
>> 
>> ====================
>> fix a braino in compat_sys_getrlimit()
>> 
>> Fixes: commit d9e968cb9f84 "getrlimit()/setrlimit(): move compat to native"
>> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
>> Acked-by: David S. Miller <davem@davemloft.net>
> 
> Yes, it works right on top of 4.12.0-rc1-00007-gd9e968c and on top of 
> todays git as well. 

Al, please push this to Linus soon.

Thanks.

[toc] | [prev] | [next] | [standalone]


#1685889

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2017-07-12 18:20 +0200
Message-ID<u2swO-22z-15@gated-at.bofh.it>
In reply to#1685881
On Wed, Jul 12, 2017 at 9:09 AM, David Miller <davem@davemloft.net> wrote:
>
> Al, please push this to Linus soon.

I'll take it directly, Al is currently in Boston without a real
computer methinks.

             Linus

[toc] | [prev] | [next] | [standalone]


#1685507

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2017-07-12 06:10 +0200
Message-ID<u2h8m-39O-15@gated-at.bofh.it>
In reply to#1684988
> In following commits around this one (some bisect steps before, and the 
> last step) the crashes were slightly different from the original crash 
> yersterday, like
> 
> in:imuxsock[1606]: segfault at fffffff8 ip 00000000f774e154 (rpc 00000000f774dfe8) sp 00000001f7965a68 error 30002 in libc-2.19.so[f76cc000+16a000]
> 
> but this was the first commit introducing the crashes.
> 
> d9e968cb9f849770288f5fde3d8d3a5f7e339052 is the first bad commit
> commit d9e968cb9f849770288f5fde3d8d3a5f7e339052
> Author: Al Viro <viro@zeniv.linux.org.uk>
> Date:   Wed May 31 04:33:51 2017 -0400
> 
w     getrlimit()/setrlimit(): move compat to native
> 
>     Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> 
> :040000 040000 5e1a0c25f4554ccdc824b18dc50078d379cdbf9a 
> 6d820451a388c5771a2a410578365d14a0194e4e M      kernel
> 
> -- 
> Meelis Roos (mroos@linux.ee)

With apologies for ed scripts,

ed kernel/sys.c <<'EOF'
/struct rlimit r32/s/rlimit/compat_&/
w
q
EOF

AFAICS, that should fix it.  If it does, commit message would be

fix a braino in compat_sys_getrlimit()

Fixes: commit d9e968cb9f84 "getrlimit()/setrlimit(): move compat to native"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---

Again, my apologies for format of that all - I'm almost completely
off-net and while typing an ed script is feasible, context diff is
too far over the top.  Usimg mutt in ssh session from android is
not fun, to put it mildly...  

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web