lkml.org 
[lkml]   [2008]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kgdb: fix optional arch functions and probe_kernel_*
On Fri, 18 Apr 2008 17:42:54 GMT
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:

> --- a/mm/maccess.c
> +++ b/mm/maccess.c
> @@ -17,11 +17,14 @@
> long probe_kernel_read(void *dst, void *src, size_t size)
> {
> long ret;
> + mm_segment_t old_fs = get_fs();
>
> + set_fs(KERNEL_DS);
> pagefault_disable();
> ret = __copy_from_user_inatomic(dst,
> (__force const void __user *)src, size);
> pagefault_enable();
> + set_fs(old_fs);
>
> return ret ? -EFAULT : 0;
> }

Oh. Well that rather invalidates my earlier comments. It looks like this
change could have been folded, but I understand that this sometimes gets
wearisome and isn't terribly important if

a) the fix doesn't repair build breakage and

b) the fix doesn't fix runtime breakage and

c) the fix fixes code which the git-bisect user won't have enabled in
config anyway.


Still. Do we need the set_fs() in there? __copy_from_user_inatomic() is a
"__" uaccess function and hence shouldn't be running access_ok()?



\
 
 \ /
  Last update: 2008-04-19 00:51    [W:0.049 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site