Re: [tip:perfcounters/core] x86: Add NMI types for kmap_atomic
From: Hugh Dickins
Date: Mon Jun 15 2009 - 12:03:53 EST
On Mon, 15 Jun 2009, Ingo Molnar wrote:
>
> Note that Oprofile uses the same method of __copy_user_inatomic() in
> arch/x86/oprofile/backtrace.c, but i believe that code is broken - i
> doubt the call-chain support for user-space stacks ever worked in
> oprofile - with perfcounters i can make this method crash under
> load. (we re-enter the NMI which due to IST executes over the exact
> same, still pending NMI frame. Kaboom.)
>
> I saw you being involved with the Oprofile code 3 years ago:
>
> | commit c34d1b4d165c67b966bca4aba026443d7ff161eb
> | Author: Hugh Dickins <hugh@xxxxxxxxxxx>
> | Date: Sat Oct 29 18:16:32 2005 -0700
> |
> | [PATCH] mm: kill check_user_page_readable
>
> That method of __copy_user_inatomic(), while elegant, is subtly
> wrong in an NMI context. We really must avoid taking faults there.
Yes, I'm afraid that subtlety escaped me - thanks for explaining.
Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/