Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372895
b: refs/heads/master
c: 6e15eb3
h: refs/heads/master
i:
  372893: 99bdcba
  372891: d67bf74
  372887: 619d769
  372879: efe0a8e
  372863: d05a1aa
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 4, 2013
1 parent 815fafa commit 58a754b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 741a698f420c34c458294a6accecfbad702a7c52
refs/heads/master: 6e15eb3ba6c0249c9e8c783517d131b47db995ca
14 changes: 12 additions & 2 deletions trunk/arch/x86/kernel/cpu/perf_event_intel_lbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,18 @@ static int branch_type(unsigned long from, unsigned long to)
return X86_BR_NONE;

addr = buf;
} else
addr = (void *)from;
} else {
/*
* The LBR logs any address in the IP, even if the IP just
* faulted. This means userspace can control the from address.
* Ensure we don't blindy read any address by validating it is
* a known text address.
*/
if (kernel_text_address(from))
addr = (void *)from;
else
return X86_BR_NONE;
}

/*
* decoder needs to know the ABI especially
Expand Down

0 comments on commit 58a754b

Please sign in to comment.