[lkml]   [2011]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 07/12] perf_events: add LBR software filter support for Intel X86
    On Fri, Oct 7, 2011 at 12:38 PM, Stephane Eranian <> wrote:
    > On Thu, Oct 6, 2011 at 5:32 PM, Andi Kleen <> wrote:
    >>> +     kernel_insn_init(&insn, kaddr);
    >>> +     insn_get_opcode(&insn);
    >> This makes me uncomfortable. AFAIK that's the first use of the opcode
    >> decoder being used directly for user space. It has a quite large attack
    >> surface. Who says it cannot be exploited?
    > This is not new, it's already used for the PEBS fixups and that includes
    > user level fixups, if possible.
    > We are not executing the instruction here, just decoding it to filter it out
    > from a buffer if necessary.
    I would add that in this particular usage, the source address is coming
    straight from LBR, it's not made up my SW. That means it corresponds
    to a point where there was a control flow change. But it can certainly
    be any x86 opcode (not just branches). LBR captures control flow changes
    due to traps, faults, interrupts.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2011-10-07 12:43    [W:0.021 / U:123.072 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site