From: "Pengfei Hu" <hpfei.cn@gmail.com>
To: Valdis.Kletnieks@vt.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.6.27: add a kernel hacking option to protect kernel memory between different modules
Date: Mon, 3 Nov 2008 21:58:56 +0800 [thread overview]
Message-ID: <a5f59d880811030558v63da516dh3f46fb6a2fd7a6a5@mail.gmail.com> (raw)
In-Reply-To: <67704.1225715379@turing-police.cc.vt.edu>
>
> And your solution is to create a large slowdown, which will just make them
> look for ways to make it go faster... perhaps including even *more* stupid-crazy
> kernel thread tricks?
>
Maybe you don't like it, but it is true. My company's product use
linux but most of
programmer even don'nt knot splin lock. There are many bugs in their code. It is
nessary to avoid mistiake automaticly. My patch is just a kernel
hacking option and
it won't slowdonw kernel in release version. How do you think
CONFIG_DEBUG_PAGEALLOC,
it also slowdonw kernel. And if you ever used bounds checker or valgrind, they
slowdown even worse.
> Can you point at any bugs/failure modes that this patch would detect, but
> would *not* be found by any of the already-existing memory debugging tools?
You know the worst bug of memory allocation is dangling pointer if tow module
use one allocator. Although there are some tool can detect this bug, but all of
them works in user space. They can use in kernel.
> Is it at all sane to expect that a reasonable setting can be done for
> things like slab and vmalloc? What happens when multiple modules allocate
> out of the same slab, or even worse, get vmalloc/kmalloc for *different*
> things on the same physical page? It seems that unless you can separate
> memory allocations by module, this isn't going to provide a lot of help in
> finding memory allocation/usage issues.
>
I want to let every registered module use it own caches just like
general caches.
The unit of vmalloc's size is page, so it won't have any trouble. The
protection must
work on page. I know the current code of kernel doesn't need this "private page"
feature. But maybe in the future it will get some help. And this
feature is compitable
with the current "globle page". It just like kernel support
SCHED_FIFO. Do you think
SCHED_FIFO is helpful to normal linux system?
prev parent reply other threads:[~2008-11-03 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-02 14:15 Pengfei Hu
2008-11-03 12:29 ` Valdis.Kletnieks
2008-11-03 13:58 ` Pengfei Hu [this message]
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=a5f59d880811030558v63da516dh3f46fb6a2fd7a6a5@mail.gmail.com \
--to=hpfei.cn@gmail.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®