[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070402123449.GB7747@elte.hu>
Date: Mon, 2 Apr 2007 14:34:49 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Stable Kernel Team <stable@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Adrian Bunk <bunk@...sta.de>,
Manfred Spraul <manfred@...orfullife.com>
Subject: Re: [PATCH] i386: fix file_read_actor() and pipe_read() for original i386 systems
* Thomas Gleixner <tglx@...utronix.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@...utronix.de>
Acked-by: Ingo Molnar <mingo@...e.hu>
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists