lkml.org 
[lkml]   [2012]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/3] perf, x86: Don't leak kernel data via callchains
On Fri, Apr 20, 2012 at 12:35 PM, Arun Sharma <asharma@fb.com> wrote:
>
> +       set_fs(USER_DS);

NAK.

I really don't think this is the right thing to do. We're in random
NMI context, set_fs() is not at all necessarily safe.

No, the code needs to check the frame range by hand, not depend on current-fs.

In fact, I'd argue that this is a bug in copy_from_user_nmi(), which
should simply check the *user* address space explicitly, not using
access_ok().

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-04-20 21:59    [W:0.042 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site