From: Takanori Kawano <t-kawano@ebina.hitachi.co.jp>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] free_initrd_mem fix
Date: Tue, 24 Jul 2001 05:29:18 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005893@msgid-missing> (raw)
Hello,
Let me do some bug report of your code.
I found that free_initrd_mem() may free the area reserved for
platform hardware/firmware if initrd_end is not PAGE_SIZE aligned.
When this happened, kernel will use the hw/fw area and will corrupt
data in it.
For this data corupption, our ia64 SMP box have crashed when kernel
calls EFI runtime services.
My case is as follows:
1) EFI memory map:
Type Start End # Pages Attributes
.
.
.
available 0000000000100000-000000007F932FFF 000000000007F833 0000000000000009
RT_data 000000007F933000-000000007F933FFF 0000000000000001 8000000000000009
.
.
.
2) initrd_end = 0xe00000007f933000
3) PAGE_SIZE is 16KB
I checked the following patch correct this problem.
--- arch/ia64/mm/init.c.orig Tue Jul 24 01:07:27 2001
+++ arch/ia64/mm/init.c Tue Jul 24 01:08:59 2001
@@ -111,7 +111,7 @@
*
* To avoid freeing/using the wrong page (kernel sized) we:
* - align up the beginning of initrd
- * - keep the end untouched
+ * - align down the end of initrd
*
* | |
* |=======| a000
@@ -135,6 +135,7 @@
* initrd_start and keep initrd_end as is.
*/
start = PAGE_ALIGN(start);
+ end = end & PAGE_MASK;
if (start < end)
printk ("Freeing initrd memory: %ldkB freed\n", (end - start) >> 10);
Please take the fix in, and also consider the patch I sent to linux-ia64-ML
few weeks ago(Subject: [Linux-ia64] [PATCH] free_initrd_mem() need to be correct).
regards,
---
Takanori Kawano
Hitachi Ltd,
Internet Systems Platform Division
t-kawano@ebina.hitachi.co.jp
next reply other threads:[~2001-07-24 5:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-24 5:29 Takanori Kawano [this message]
2001-07-25 20:25 ` [Linux-ia64] free_initrd_mem fix Stephane Eranian
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=marc-linux-ia64-105590693005893@msgid-missing \
--to=t-kawano@ebina.hitachi.co.jp \
--cc=linux-ia64@vger.kernel.org \
/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