lkml.org 
[lkml]   [2009]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateFri, 06 Feb 2009 14:18:31 -0800 (PST)
SubjectRe: [BUG] binfmt_elf: get_user() called in vma_dump_size() after set_fs(KERNEL_DS)
FromDavid Miller <>
From: Roland McGrath <roland@redhat.com>
Date: Fri, 6 Feb 2009 14:07:17 -0800 (PST)

> set_fs is quite cheap at least on most machines. So a pair of set_fs calls
> around that get_user call doesn't seem so bad. OTOH, on the machines where
> this actually matters at all (maybe just sparc, arm, s390?) it is
> presumably (much?) more costly. But it seems like the best solution, and
> certainly is straightforward.

On sparc set_fs() is just a privileged register write, so pretty cheap
and definitely less expensive than get_user_pages() :-)


\
 
 \ /
  Last update: 2009-02-06 23:21    [from the cache]
©2003-2010