From: Manfred Spraul <manfred@colorfullife.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: BUG? race between kswapd and ptrace (access_process_vm )
Date: Thu, 08 Mar 2001 21:12:52 +0100 [thread overview]
Message-ID: <3AA7E7C4.4D89E280@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0103071356140.1409-100000@duckman.distro.conectiva>
Rik van Riel wrote:
>
> On Wed, 7 Mar 2001, Manfred Spraul wrote:
>
> > Is kswapd now running without lock_kernel()?
>
> Indeed ...
>
> > Then there is a race between swapout and ptrace:
> > access_process_vm() accesses the page table entries, only protected with
> > the mmap_sem semaphore and lock_kernel().
> >
> > Isn't
> >
> > spin_lock(&mm->page_table_lock);
> >
> > missing in access_one_page() [in linux/kernel/ptrace.c]?
>
> You're probably right here ...
>
Fixing the bug is more difficult than I thought:
Initially I assumed it would be a two-liner (lock, unlock) but kmap()
can sleep.
Can I reuse a kmap_atomic() type or should I add a new type?
I could add local_irq_save() and (ab)use KMAP_BOUNCE_READ, but I'm not
sure if that's the Right Thing(tm)
--
Manfred
next prev parent reply other threads:[~2001-03-08 20:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-07 16:32 BUG? race between kswapd and ptrace (access_process_vm ) Manfred Spraul
2001-03-07 16:56 ` Rik van Riel
2001-03-08 20:12 ` Manfred Spraul [this message]
2001-03-12 11:55 ` Stephen C. Tweedie
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=3AA7E7C4.4D89E280@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/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;
as well as URLs for NNTP newsgroup(s).