http://lxr.oss.org.cn/source/fs/exec.c
798 int kernel_read(struct file *file, loff_t offset, 799 char *addr, unsigned long count) 800 { 801 mm_segment_t old_fs; 802 loff_t pos = offset; 803 int result; 804 805 old_fs = get_fs(); 806 set_fs(get_ds()); 807 /* The cast to a user pointer is valid due to the set_fs() */ 808 result = vfs_read(file, (void __user *)addr, count, &pos); 809 set_fs(old_fs); 810 return result; 811 } 812 813 EXPORT_SYMBOL(kernel_read);