From: Stas Sergeev <stsp@aknet.ru>
To: prasanna@in.ibm.com
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch] kprobes: dont steal interrupts from vm86
Date: Tue, 07 Dec 2004 21:44:43 +0300 [thread overview]
Message-ID: <41B5FA1B.9090507@aknet.ru> (raw)
In-Reply-To: <20041207055348.GA1305@in.ibm.com>
Hi Prasanna.
You wrote:
> The patch below should fix this problem. Please
Thanks.
> let me know if you any issues.
Well, it kind of fixes the problem.
Actually it happened that it fixes
even the problem for the programs
that are using the segmentation.
Now am I happy? I am afraid, not.
To me your patch looks very wrong
(sorry), even though I am really not
the one to do such a claims.
Let's see how it "fixes" the problem
with segmentation, that I outlined
in my previous posting:
> - ret = 1;
> + ret = 0;
It is easy to notice that ret==0 at
that point *always*, so effectively
this code is now a no-op. Apparently
also gcc mentioned that, and removed
that code together with the surrounding
"if" clause. And it was exactly the
"if" condition where the bogus pointer
gets dereferenced. Now, since it gets
optimized away, the Oops is not any
more. But if I stick a simple printk()
in that block, the Oops is back.
So you "fixed" that based on the gcc
optimization.
Now the comments (that you just altered)
suggest that the break-point can be
removed by another CPU. I don't think
delivering the fault to the user-space
in this case is wise (but that's what
I'd care least, as I am not using the
kprobes myself yet). Maybe instead
it would be better to return 1 when
p!=NULL?
Also, you still use the completely
invalid addrress and pass it to several
functions like get_kprobe() (addr is
invalid in either v86 case or when the
segmentation is used). Since the
deref is now optimized away by gcc, I
can't write an Oops test-case for this,
but why you do not perform the sanity
checks to see whether or not the address
is valid? (the checks like I suggested
in previous posting)
Oh well. That said, your patch works
for me. I'd appreciate another patch
very much, that will address the problems
I see, but can't demonstrate by the
test-case any more. But of course at
least for me it is already better than
nothing, and of course it is not me to
decide whether the patch is to apply
or not. We'll see. Thanks anyway.
next prev parent reply other threads:[~2004-12-07 18:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20041109130407.6d7faf10.akpm@osdl.org>
2004-11-10 10:49 ` [patch] kprobes: dont steal interrupts from vm86 Prasanna S Panchamukhi
2004-11-10 18:53 ` Stas Sergeev
2004-11-17 13:15 ` Prasanna S Panchamukhi
2004-11-18 14:55 ` Stas Sergeev
2004-12-02 19:28 ` Stas Sergeev
2004-12-06 15:28 ` Prasanna S Panchamukhi
2004-12-04 18:09 ` Stas Sergeev
2004-12-07 5:53 ` Prasanna S Panchamukhi
2004-12-07 18:44 ` Stas Sergeev [this message]
2004-12-09 12:47 ` Prasanna S Panchamukhi
2004-12-09 19:28 ` Stas Sergeev
2005-01-07 11:37 ` Prasanna S Panchamukhi
2005-01-07 12:59 ` Andi Kleen
2005-01-13 8:10 ` Prasanna S Panchamukhi
2005-01-07 22:44 ` Stas Sergeev
2004-11-09 19:01 Stas Sergeev
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=41B5FA1B.9090507@aknet.ru \
--to=stsp@aknet.ru \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prasanna@in.ibm.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