Subject: Re: [BUG -next] "futex: switch to USER_DS for futex test" breaks s390

From: Andreas Schwab <[email-masked]>
Date: Fri, 03 Jan 2014 16:41:10 +0100

Heiko Carstens <[email-masked]> writes:

> There is also other code that relies on this: e.g. copy_mount_options() my be
> called with KERNEL_DS.

With KERNEL_DS you can *only* access kernel memory, which is unpagable.
If you want to access user memory, you _must_ use USER_DS.

> If DEBUG_PAGEALLOC is turned on, it would crash badly in kernel space
> if it crosses page boundaries and touches an invalid page, even though
> it should survive...

Accessing an invalid page in kernel space is _always_ a bug.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."