path: root/security/apparmor/label.c
diff options
authorDaniel Bristot de Oliveira <>2019-06-12 11:57:31 +0200
committerIngo Molnar <>2019-06-17 12:09:23 +0200
commitba54f0c3f7c400a392c413d8ca21d3ada35f2584 (patch)
tree57cc0415e0431c9f61e70e5ad14a678fed0a5be3 /security/apparmor/label.c
parentc2ba8a15f310d915f8748dd8324c91c82b12b5ff (diff)
x86/jump_label: Batch jump label updates
Currently, the jump label of a static key is transformed via the arch specific function: void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type) The new approach (batch mode) uses two arch functions, the first has the same arguments of the arch_jump_label_transform(), and is the function: bool arch_jump_label_transform_queue(struct jump_entry *entry, enum jump_label_type type) Rather than transforming the code, it adds the jump_entry in a queue of entries to be updated. This functions returns true in the case of a successful enqueue of an entry. If it returns false, the caller must to apply the queue and then try to queue again, for instance, because the queue is full. This function expects the caller to sort the entries by the address before enqueueuing then. This is already done by the arch independent code, though. After queuing all jump_entries, the function: void arch_jump_label_transform_apply(void) Applies the changes in the queue. Signed-off-by: Daniel Bristot de Oliveira <> Signed-off-by: Peter Zijlstra (Intel) <> Cc: Borislav Petkov <> Cc: Chris von Recklinghausen <> Cc: Clark Williams <> Cc: Greg Kroah-Hartman <> Cc: H. Peter Anvin <> Cc: Jason Baron <> Cc: Jiri Kosina <> Cc: Josh Poimboeuf <> Cc: Linus Torvalds <> Cc: Marcelo Tosatti <> Cc: Masami Hiramatsu <> Cc: Peter Zijlstra <> Cc: Scott Wood <> Cc: Steven Rostedt (VMware) <> Cc: Thomas Gleixner <> Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'security/apparmor/label.c')
0 files changed, 0 insertions, 0 deletions