Messages in this thread | | | Date | Sat, 4 May 2013 08:34:20 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH 2/3] perf, x86, lbr: Fix LBR filter |
| |
* Andi Kleen <ak@linux.intel.com> wrote:
> > + } 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)) > > Sorry doing it this way is just incredible expensive and dumb.
If anyone using this feature notices the __module_address() overhead then a 'module addresses RCU rbtree' could be added, which should solve the overhead impact.
In any case Peter's patch fixes the bug without regressing the feature as it is implemented today. Do you have a better solution that does not break the ABI? The solution you proposed before regresses existing functionality.
Thanks,
Ingo
| |