diff options
author | Dan Williams <[email protected]> | 2018-01-29 17:02:28 -0800 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2018-01-30 21:54:29 +0100 |
commit | babdde2698d482b6c0de1eab4f697cf5856c5859 (patch) | |
tree | 54cd8df04b47db35a7c707638e1d7d3cad1f44e1 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | f3804203306e098dae9ca51540fcd5eb700d7f40 (diff) |
x86: Implement array_index_mask_nospec
array_index_nospec() uses a mask to sanitize user controllable array
indexes, i.e. generate a 0 mask if 'index' >= 'size', and a ~0 mask
otherwise. While the default array_index_mask_nospec() handles the
carry-bit from the (index - size) result in software.
The x86 array_index_mask_nospec() does the same, but the carry-bit is
handled in the processor CF flag without conditional instructions in the
control flow.
Suggested-by: Linus Torvalds <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://lkml.kernel.org/r/151727414808.33451.1873237130672785331.stgit@dwillia2-desk3.amr.corp.intel.com
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions