Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 20 Apr 2012 12:57:00 -0700 | Subject | Re: [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/
| |