From: "machael" <dony.he@huawei.com>
To: <linux-mips@oss.sgi.com>
Subject: vmalloc bugs in 2.4.5???
Date: Mon, 5 Nov 2001 15:34:44 +0800 [thread overview]
Message-ID: <013301c165cc$5d030fa0$4a1c690a@huawei.com> (raw)
hello:
I use linux-2.4.5 and I think VMALLOC may have some bugs which i don't
know how to fixup.
I try to replace some kernel functions with my own implementations.I
will explain it in the following:
Let's say:
void (*my_func)(void)=func1;
where "my_func" is a function pointer defined in kernel, and "func1" is
a function(void func1(void)) implemented in kernel.And "my_func" is an
EXPORTED SYMBOL in mips_ksyms.c.
Now I want to replace "func1" with my own "func2" in a module
my_module.o:
extern void (*my_func)(void);
my_func = func2;
where "func2" is a function (void fun2(void)) implemented in
"my_module.o".
If I do "insmod my_module.o", the kernel should run OK. In fact, it is
often met an "unhandled kernel unaligned access" or "do_page_fault"
exception and then panics.
We know "func1" should be in KSEG0(unmapped , cached) ,So it's address
should be 0x8XXXXXXX.And "my_func" should also pointed to this same address
before inserting
my_module.o. "func2" should be in KSEG2(mapped, cached) since it is
implemented in module, So it's address should be 0xCXXXXXXX.After inserting
my_module.o, "my_func" should be changed to pointed to this new address in
KSEG2. But kernel panics......
If I change "module_map()" in include/asm/module.h from vmalloc to
kmalloc, kernel runs ok after inserting my module. So I think vmalloc may
have some bugs.
Anyone knows how to fixup it?
machael
WARNING: multiple messages have this Message-ID (diff)
From: "machael" <dony.he@huawei.com>
To: linux-mips@oss.sgi.com
Subject: vmalloc bugs in 2.4.5???
Date: Mon, 5 Nov 2001 15:34:44 +0800 [thread overview]
Message-ID: <013301c165cc$5d030fa0$4a1c690a@huawei.com> (raw)
Message-ID: <20011105073444.R8zEWdikwg0T8th7_sRskrcEuJuPZudy1CCjlTAR450@z> (raw)
hello:
I use linux-2.4.5 and I think VMALLOC may have some bugs which i don't
know how to fixup.
I try to replace some kernel functions with my own implementations.I
will explain it in the following:
Let's say:
void (*my_func)(void)=func1;
where "my_func" is a function pointer defined in kernel, and "func1" is
a function(void func1(void)) implemented in kernel.And "my_func" is an
EXPORTED SYMBOL in mips_ksyms.c.
Now I want to replace "func1" with my own "func2" in a module
my_module.o:
extern void (*my_func)(void);
my_func = func2;
where "func2" is a function (void fun2(void)) implemented in
"my_module.o".
If I do "insmod my_module.o", the kernel should run OK. In fact, it is
often met an "unhandled kernel unaligned access" or "do_page_fault"
exception and then panics.
We know "func1" should be in KSEG0(unmapped , cached) ,So it's address
should be 0x8XXXXXXX.And "my_func" should also pointed to this same address
before inserting
my_module.o. "func2" should be in KSEG2(mapped, cached) since it is
implemented in module, So it's address should be 0xCXXXXXXX.After inserting
my_module.o, "my_func" should be changed to pointed to this new address in
KSEG2. But kernel panics......
If I change "module_map()" in include/asm/module.h from vmalloc to
kmalloc, kernel runs ok after inserting my module. So I think vmalloc may
have some bugs.
Anyone knows how to fixup it?
machael
next reply other threads:[~2001-11-05 8:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-05 7:34 machael [this message]
2001-11-05 7:34 ` vmalloc bugs in 2.4.5??? machael
2001-11-06 21:08 ` Ralf Baechle
2001-11-07 0:47 ` machael
2001-11-07 0:47 ` machael
2001-11-07 1:39 ` Atsushi Nemoto
2001-11-07 2:09 ` machael
2001-11-07 2:09 ` machael
2001-11-07 10:41 ` Ralf Baechle
2001-11-07 11:29 ` machael
2001-11-07 11:29 ` machael
2001-11-08 15:16 ` Maciej W. Rozycki
2001-12-26 3:32 ` Ralf Baechle
2001-12-27 1:55 ` Atsushi Nemoto
2001-12-27 3:12 ` Ralf Baechle
2001-12-27 3:51 ` Atsushi Nemoto
2001-12-27 4:29 ` Ralf Baechle
2001-12-27 16:01 ` Tommy S. Christensen
2001-12-27 21:19 ` Ralf Baechle
2001-12-28 0:48 ` machael thailer
2001-12-28 0:48 ` machael thailer
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='013301c165cc$5d030fa0$4a1c690a@huawei.com' \
--to=dony.he@huawei.com \
--cc=linux-mips@oss.sgi.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