From: Stas Sergeev <stsp@aknet.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: petkov@uni-muenster.de, jamagallon@able.es, linux-kernel@vger.kernel.org
Subject: [patch 0/3] Re: 2.6.12-rc2-mm3
Date: Tue, 12 Apr 2005 23:37:58 +0400 [thread overview]
Message-ID: <425C2396.6070200@aknet.ru> (raw)
In-Reply-To: <20050411212712.0dbd821d.akpm@osdl.org>
Hello.
Andrew Morton wrote:
> OK, the `int $3' is part of the CONFIG_TRAP_BAD_SYSCALL_EXITS thing which I
> never use.
> I'm not sure what problem is actually being reported here, now you mention it.
The problem being reported here is that
CONFIG_TRAP_BAD_SYSCALL_EXITS does nothing
but locking up your machine. Actually the
bug was so obvious, that I had real troubles
finding it (the obvious things are difficult
to spot), so I found some more bugs in a
mean time.
What was the bug? GET_THREAD_INFO(%ebp) was
missing before TI_preempt_count(%ebp), hence
the accesses beyond the stack. I'll have
troubles beleiving this code worked without
a lock-ups for someone sometimes.
I fixed it differently though. The subsequent
patches are addressing the issue.
> Yup. But are you sure that the "+ 8" is correct, given these offsets are<>
> larger than that?
I don't think they are indeed larger. The %esp
points to "struct pt_regs", which is 60 bytes
in size, and without the xss/esp = 52. Adding
8 to this gives 60, so 56(+3) looks safe to me.
> Probably it decided that some syscall got a "bad exit". Disable
> CONFIG_TRAP_BAD_SYSCALL_EXITS.
Yes, that's the fix too.
>> > - p->thread.esp0 = (unsigned long) (childregs+1) - 8;
>> > + p->thread.esp0 = (unsigned long) (childregs+1) - 15;
>> 15 is somewhat nasty - it will make the
>> stack unaligned, should better be 16 I
>> think.
> ? It's still 4-byte-aligned.
I don't see your point. Why do you think that
I substract the stack pointer by 32 bytes, for
example? I literally substract it by 8 bytes,
you propose to substract it by 15 *bytes* (not
dwords), so why would it still be aligned?
But anyway, fortunately this bug is not about
the esp0 stuff at all.
> I'm suspecting this is all due to CONFIG_TRAP_BAD_SYSCALL_EXITS taking the
> debug trap..
Sure. And that looks silly. I removed "int $3".
Patches follow. Seems to work reliable now,
but I don't know how to test it since there
seem to be no such an offending syscalls here
to test.
next prev parent reply other threads:[~2005-04-12 20:41 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-11 8:25 2.6.12-rc2-mm3 Andrew Morton
2005-04-11 8:56 ` 2.6.12-rc2-mm3 J.A. Magallon
2005-04-11 9:43 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-11 21:59 ` 2.6.12-rc2-mm3 Borislav Petkov
2005-04-11 22:22 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-12 4:20 ` 2.6.12-rc2-mm3 Stas Sergeev
2005-04-12 4:27 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-12 19:37 ` Stas Sergeev [this message]
2005-04-12 19:42 ` [patch 1/3]: move config option for BAD_SYSCALL_EXIT Stas Sergeev
2005-04-12 19:47 ` [patch 2/3]: entry.S trap return fixes Stas Sergeev
2005-04-13 2:09 ` Andrew Morton
2005-04-13 3:18 ` Stas Sergeev
2005-04-12 19:54 ` [patch 3/3]: fix BAD_SYSCALL_EXIT lockup Stas Sergeev
2005-04-12 12:22 ` 2.6.12-rc2-mm3 Borislav Petkov
2005-04-11 10:34 ` 2.6.12-rc2-mm3 Jan Dittmer
2005-04-11 17:33 ` 2.6.12-rc2-mm3 Benoit Boissinot
2005-04-11 19:11 ` 2.6.12-rc2-mm3 Jindrich Makovicka
2005-04-12 0:22 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-12 8:21 ` 2.6.12-rc2-mm3 Jindrich Makovicka
2005-04-11 20:46 ` 2.6.12-rc2-mm3 Martin J. Bligh
2005-04-11 22:24 ` 2.6.12-rc2-mm3 Benoit Boissinot
2005-04-12 22:32 ` 2.6.12-rc2-mm3 Martin J. Bligh
2005-04-11 21:05 ` 2.6.12-rc2-mm3: CONFIG_MODULES=n MTD compile error Adrian Bunk
2005-04-12 1:18 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-12 2:09 ` 2.6.12-rc2-mm3 Benjamin Herrenschmidt
2005-04-12 3:26 ` 2.6.12-rc2-mm3 Benjamin Herrenschmidt
2005-04-12 4:42 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-12 6:34 ` 2.6.12-rc2-mm3 Benjamin Herrenschmidt
2005-04-12 18:08 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-12 22:40 ` 2.6.12-rc2-mm3 Benjamin Herrenschmidt
2005-04-13 1:44 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-15 18:23 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-15 23:23 ` 2.6.12-rc2-mm3 Benjamin Herrenschmidt
2005-04-17 8:40 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-24 0:01 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-24 1:59 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-24 2:15 ` 2.6.12-rc2-mm3 Benjamin Herrenschmidt
2005-04-24 3:14 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-24 4:25 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-24 9:53 ` 2.6.12-rc2-mm3 Oleg Nesterov
2005-04-24 23:11 ` 2.6.12-rc2-mm3 Juergen Kreileder
2005-04-25 0:09 ` 2.6.12-rc2-mm3 Benjamin Herrenschmidt
2005-05-03 6:29 ` 2.6.12-rc2-mm3 Andrew Morton
2005-05-03 10:42 ` 2.6.12-rc2-mm3 Oleg Nesterov
2005-04-12 5:00 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-12 5:51 ` 2.6.12-rc2-mm3 Nick Piggin
2005-04-12 6:19 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-12 6:49 ` 2.6.12-rc2-mm3 Nick Piggin
2005-04-12 7:50 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-12 19:03 ` 2.6.12-rc2-mm3 Steven Pratt
2005-04-12 17:01 ` 2.6.12-rc2-mm3 Steven Pratt
2005-04-12 7:06 ` 2.6.12-rc2-mm3 Jens Axboe
2005-04-12 11:32 ` 2.6.12-rc2-mm3 Ed Tomlinson
2005-04-12 11:39 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-14 0:15 ` 2.6.12-rc2-mm3 Ed Tomlinson
2005-04-14 0:20 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-14 0:38 ` 2.6.12-rc2-mm3 Ed Tomlinson
2005-04-14 0:54 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-17 21:32 ` [-mm patch] fix "make mandocs" Adrian Bunk
2005-04-17 22:27 ` 2.6.12-rc2-mm3 Alexander Nyberg
2005-04-17 22:36 ` 2.6.12-rc2-mm3 Alexander Nyberg
2005-04-19 2:03 ` 2.6.12-rc2-mm3: hostap: do not #include .c files Adrian Bunk
2005-04-19 2:12 ` Jouni Malinen
2005-04-26 0:49 ` 2.6.12-rc2-mm3 Randy.Dunlap
2005-04-26 1:06 ` 2.6.12-rc2-mm3 Andrew Morton
2005-04-26 3:17 ` 2.6.12-rc2-mm3 Greg KH
2005-04-26 16:15 ` 2.6.12-rc2-mm3 Randy.Dunlap
2005-04-27 10:41 ` 2.6.12-rc2-mm3 Alexander Nyberg
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=425C2396.6070200@aknet.ru \
--to=stsp@aknet.ru \
--cc=akpm@osdl.org \
--cc=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.org \
--cc=petkov@uni-muenster.de \
/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