Re: [PATCH V3] asm-generic: add a generic uaccess.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 04 May 2009, Michal Simek wrote:
> #define MAKE_MM_SEG(s)  ((mm_segment_t) { (s) })
> 
> #ifndef KERNEL_DS
> #define KERNEL_DS       MAKE_MM_SEG(~0UL)
> #endif
> 
> #ifndef USER_DS
> #define USER_DS         MAKE_MM_SEG(TASK_SIZE - 1)
> #endif
> 
> 
> #ifndef get_fs
> #define get_ds() (KERNEL_DS)
> #define get_fs() (current_thread_info()->addr_limit)
> 
> static inline void set_fs(mm_segment_t fs)
> {
>         current_thread_info()->addr_limit = fs;
> }
> #endif
> 

yes, looks good. Thanks for the suggestion.

	Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux