From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: Issues with "x86, um: switch to generic fork/vfork/clone" commit
Date: Mon, 21 Jan 2013 10:00:54 +0100 [thread overview]
Message-ID: <50FD03C6.1060000@6wind.com> (raw)
In-Reply-To: <20130120031253.GO4939@ZenIV.linux.org.uk>
Le 20/01/2013 04:12, Al Viro a écrit :
> On Sat, Jan 19, 2013 at 06:38:08AM +0000, Al Viro wrote:
>>> [ 64.313636] kbd[2563]: segfault at 9fe ip 000009fe sp b758293c
>>> error 4 in dash[8048000+18000]
>>>
>>> After bisecting, the following commit seems responsible:
>>> 1d4b4b2994b5fc208963c0b795291f8c1f18becf (x86, um: switch to generic
>>> fork/vfork/clone)
>>
>> Er... Bisect of the guest kernel, I take it? Could you check if building
>> the guest !SMP affects anything?
>
> OK... I think I understand what's going on. We need asmlinkage_protect
> in sys_clone() ;-/ For what it's worth, I really wonder if we ought to
> treat that as syscall wrappers - i.e. have SYSCALL_DEFINEx on i386 add
> a wrapper that would do asmlinkage_protect itself. IMO it's the same kind
> of thing as argument normalization handled by syscall wrappers - we make
> sure that C function plays well with what asm glue is doing and expecting.
>
> Anyway, the following seems to fix the problem here (and yes, I could reproduce
> it with your config); could you verify that it fixes things on your setup?
Yes, I confirm it's fixed with this patch.
> If it does, this sucker should go into mainline and -stable...
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index a31b823..e05cff2 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -1660,8 +1660,10 @@ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
> int, tls_val)
> #endif
> {
> - return do_fork(clone_flags, newsp, 0,
> - parent_tidptr, child_tidptr);
> + long ret = do_fork(clone_flags, newsp, 0, parent_tidptr, child_tidptr);
> + asmlinkage_protect(5, ret, clone_flags, newsp,
> + parent_tidptr, child_tidptr, tls_val);
> + return ret;
> }
> #endif
>
>
next prev parent reply other threads:[~2013-01-21 9:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 9:42 Issues with "x86, um: switch to generic fork/vfork/clone" commit Nicolas Dichtel
2013-01-19 6:38 ` Al Viro
2013-01-20 3:12 ` Al Viro
2013-01-20 20:53 ` Linus Torvalds
2013-01-20 21:28 ` Al Viro
2013-01-21 1:22 ` Al Viro
2013-01-21 1:40 ` Linus Torvalds
2013-01-21 2:30 ` Al Viro
2013-01-21 2:39 ` Linus Torvalds
2013-01-21 6:02 ` Al Viro
2013-01-21 22:55 ` [RFC] making HAVE_SYSCALL_WRAPPERS universal (Re: Issues with "x86, um: switch to generic fork/vfork/clone" commit) Al Viro
2013-01-22 12:47 ` James Hogan
2013-01-22 14:23 ` Al Viro
2013-01-22 13:16 ` Arnd Bergmann
2013-01-22 15:33 ` Arnd Bergmann
2013-01-21 9:00 ` Nicolas Dichtel [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-11-10 4:36 Issues with "x86, um: switch to generic fork/vfork/clone" commit Michel Lespinasse
2012-11-10 4:51 ` Al Viro
2012-11-10 4:57 ` Michel Lespinasse
2012-11-10 5:33 ` Al Viro
2012-11-10 5:47 ` Michel Lespinasse
2012-11-10 7:33 ` Al Viro
2012-11-10 8:08 ` Michel Lespinasse
2012-11-10 18:59 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50FD03C6.1060000@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox