summaryrefslogtreecommitdiff
path: root/kernel/jump_label.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-05-06 21:33:58 +0200
committerIngo Molnar <mingo@kernel.org>2021-05-12 14:54:55 +0200
commitfa5e5dc39669b4427830c546ede8709323b8276c (patch)
tree9277ff40e9c2908a6a78b8e887c0740cc5a86251 /kernel/jump_label.c
parentf9510fa9caaf8229381d5f86ba0774bf1a6ca39b (diff)
jump_label, x86: Introduce jump_entry_size()
This allows architectures to have variable sized jumps. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20210506194157.786777050@infradead.org
Diffstat (limited to 'kernel/jump_label.c')
-rw-r--r--kernel/jump_label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index ba39fbb1f8e7..521cafcfcb69 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -309,7 +309,7 @@ EXPORT_SYMBOL_GPL(jump_label_rate_limit);
static int addr_conflict(struct jump_entry *entry, void *start, void *end)
{
if (jump_entry_code(entry) <= (unsigned long)end &&
- jump_entry_code(entry) + JUMP_LABEL_NOP_SIZE > (unsigned long)start)
+ jump_entry_code(entry) + jump_entry_size(entry) > (unsigned long)start)
return 1;
return 0;