From: Brian Gerst <bgerst@quark.didntduck.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC, PATCH] fix verify_write for 80386 support
Date: Mon, 21 Apr 2003 22:13:35 -0400 [thread overview]
Message-ID: <3EA4A54F.6060709@quark.didntduck.org> (raw)
In-Reply-To: <3EA4565D.4070302@colorfullife.com>
Manfred Spraul wrote:
> [ 2nd part of the mail, after hitting the send button in the middle of
> the sentence]
>
> The solution is to perform the check for write protection in the actual
> access functions, not during access_ok.
>
> The attached patch does that:
> - remove the check from access_ok
> - redirect all user space write access into __copy_to_user_ll
> - within __copy_to_user_ll: use get_user_pages, and write directly to
> the obtained kernel address.
>
> This fixes all swapout & data corruption bugs, and even removes 26 lines
> from the kernel.
>
> What do you think? The alternative would be to drop support for real
> 80386 cpus.
>
> Not tested on a real 80386, I've just replace wp_works_ok with
> !wp_works_ok.
>
> --
> Manfred
>
Close, but there is still a race here. You need to hold mmap_sem over
the memcpy. Another thread will expect the memory to not be written to
after write-protecting it.
--
Brian Gerst
prev parent reply other threads:[~2003-04-22 2:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-21 20:28 Manfred Spraul
2003-04-21 20:36 ` Manfred Spraul
2003-04-22 2:13 ` Brian Gerst [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=3EA4A54F.6060709@quark.didntduck.org \
--to=bgerst@quark.didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.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
all inboxes | Powered by JetHome®