Two different fixes for the same problem making some ARM nommu configurations

not boot since 3.6-rc1. The problem is that user_addr_max returned the biggest
 available RAM address which makes some copy_from_user variants fail to read
 from XIP memory.
 
 Even in the presence of one of the two fixes the other still makes sense, so
 both patches are included here.
 
 This problem was the last one preventing efm32 boot to a prompt with mainline.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlOyfhsACgkQ6suMTIUe0hZWggCePaoe/S+aDki9B2ASCY0zVkRq
 XE8AoM5G4yRgnL3zitI2ftvvlp4xx1mS
 =4Vjn
 -----END PGP SIGNATURE-----

Merge tag 'nommu-for-rmk' of git://git.pengutronix.de/git/ukl/linux into devel-stable

Two different fixes for the same problem making some ARM nommu configurations
not boot since 3.6-rc1. The problem is that user_addr_max returned the biggest
available RAM address which makes some copy_from_user variants fail to read
from XIP memory.

Even in the presence of one of the two fixes the other still makes sense, so
both patches are included here.

This problem was the last one preventing efm32 boot to a prompt with mainline.
This commit is contained in:
Russell King 2014-08-01 19:54:26 +01:00
commit c70fbb01b1
2 changed files with 2 additions and 4 deletions

View File

@ -91,9 +91,7 @@
* of this define that was meant to.
* Fortunately, there is no reference for this in noMMU mode, for now.
*/
#ifndef TASK_SIZE
#define TASK_SIZE (CONFIG_DRAM_SIZE)
#endif
#define TASK_SIZE UL(0xffffffff)
#ifndef TASK_UNMAPPED_BASE
#define TASK_UNMAPPED_BASE UL(0x00000000)

View File

@ -224,7 +224,7 @@ static inline void set_fs(mm_segment_t fs)
#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
#define user_addr_max() \
(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL)
(segment_eq(get_fs(), KERNEL_DS) ? ~0UL : get_fs())
/*
* The "__xxx" versions of the user access functions do not verify the