From: David Woodhouse <dwmw2@infradead.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: torvalds@transmeta.com, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Fix stack handling in acpi_wakeup.S
Date: 13 Feb 2003 19:17:13 +0000 [thread overview]
Message-ID: <1045163832.304.46.camel@passion.cambridge.redhat.com> (raw)
In-Reply-To: <20030211184452.GA24966@elf.ucw.cz>
On Tue, 2003-02-11 at 18:44, Pavel Machek wrote:
> Hi!
>
> This fixes stack handling in acpi_wakeup.S, and makes stack smaller so
> that wakeup code actually fits inside memory allocated for it. Plus
> someone renamed .L1432 to something meaningfull. Please apply,
I am confused. If I apply your patch, I get a failure to resume (precise
symptoms below) on both boards I've tried it on. Applying this obviously
broken patch 'fixes' it:
--- arch/i386/kernel/acpi.c.orig Thu Feb 13 19:07:34 2003
+++ arch/i386/kernel/acpi.c Thu Feb 13 19:07:36 2003
@@ -483,6 +483,7 @@
if (!acpi_wakeup_address)
return 1;
init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD);
+ memset((void *)acpi_wakeup_address, 0, 0x3000);
memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end
- &wakeup_start);
acpi_copy_wakeup_routine(acpi_wakeup_address);
If I reserve the whole three pages I scribble on in the above patch (and
which we used to scribble on), by calling alloc_bootmem_low(3*PAGE_SIZE)
in acpi_reserve_bootmem(), then the failure to resume returns. I _need_
to scribble on whatever's after us :)
Failure mode is as follows:
Upon resume, _all_ processes with a userspace VM will oops on being
rescheduled. In every case, %eip is zero and %esp is the very top of the
8KiB area allocated for the task structure and stack. For example:
portmap left refrigerator
Unable to handle kernel NULL pointer dereference at virtual address
00000000
printing eip:
00000000
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0060:[<00000000>] Not tainted
EFLAGS: 00010046
EIP is at 0x0
eax: 000000a8 ebx: 08054db0 ecx: 00000003 edx: ffffffff
esi: 08054db0 edi: 08054db0 ebp: bffffd3c esp: ce14e000
ds: 007b es: 007b ss: 0068
Process portmap (pid: 550, threadinfo=ce14c000 task=ce4f80a0)
Stack:
Call Trace:
Code: Bad EIP value.
--
dwmw2
next prev parent reply other threads:[~2003-02-13 19:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-11 18:44 Pavel Machek
2003-02-13 19:17 ` David Woodhouse [this message]
2003-02-15 12:15 ` Alfred E. Heggestad
2003-02-15 17:49 ` Pavel Machek
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=1045163832.304.46.camel@passion.cambridge.redhat.com \
--to=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®