From: Ingo Molnar <mingo@elte.hu>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Stable Kernel Team <stable@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Adrian Bunk <bunk@stusta.de>,
Manfred Spraul <manfred@colorfullife.com>
Subject: Re: [PATCH] i386: fix file_read_actor() and pipe_read() for original i386 systems
Date: Mon, 2 Apr 2007 14:34:49 +0200 [thread overview]
Message-ID: <20070402123449.GB7747@elte.hu> (raw)
In-Reply-To: <1175516731.28263.129.camel@localhost.localdomain>
* Thomas Gleixner <tglx@linutronix.de> wrote:
> The __copy_to_user_inatomic() calls in file_read_actor() and
> pipe_read() are broken on original i386 machines, where WP-works-ok ==
> false, as __copy_to_user_inatomic() on such systems calls functions
> which might sleep and/or contain cond_resched() calls inside of a
> kmap_atomic() region.
>
> The original check for WP-works-ok was in access_ok(), but got moved
> during the 2.5 series to fix a race vs. swap.
>
> Return the number of bytes to copy in the case where we are in an
> atomic region, so the non atomic code pathes in file_read_actor() and
> pipe_read() are taken.
neat trick! (v2.6.21 must-have me thinks.)
> This could be optimized to avoid the kmap_atomicby moving the check
^---- add space
> for WP-works-ok into fault_in_pages_writeable(), but this is more
> intrusive and can be done later.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
next prev parent reply other threads:[~2007-04-02 12:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-25 8:07 [BUG] __copy_to_user_inatomic broken on non Pentium machines Thomas Gleixner
2007-03-25 18:14 ` Linus Torvalds
2007-03-25 18:30 ` Ingo Molnar
2007-03-25 19:41 ` Thomas Gleixner
2007-04-02 12:25 ` [PATCH] i386: fix file_read_actor() and pipe_read() for original i386 systems Thomas Gleixner
2007-04-02 12:34 ` Ingo Molnar [this message]
2007-04-13 23:06 ` Adrian Bunk
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=20070402123449.GB7747@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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®