[lkml]   [2018]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/4] objtool: Implement jump_assert for _static_cpu_has()
On Mon, Jan 15, 2018 at 05:44:30PM +0100, Peter Zijlstra wrote:
> Unlike the jump_label bits, static_cpu_has is implemented with
> alternatives. Sadly it doesn't readily distinguish itself from any
> other alternatives.
> Use a heuristic to guess at it :/
> But like jump_labels, make static_cpu_has set br_static on the
> instructions after the static branch such that we can assert on it.

This seems a bit heavy handed and fragile, though maybe it is the best
way. Still I wonder if there's a better way to do it.

Some quick ideas:

a) Somehow use __jump_table in the _static_cpu_has() macro?

b) Add another special annotation to tell objtool where
_static_cpu_has() locations are?

May need to ruminate on this one a bit...


 \ /
  Last update: 2018-01-15 19:05    [W:0.135 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site