History

rseq: Avoid CPU/MM CID updates when no event pending

There is no need to update these values unconditionally if there is no event pending.

Thomas Gleixner committed 1 year ago

Commit 566d8011 parent 83409981 file · +6 −5Browse files

Unified · Split

kernel/rseq.c+6−5
@@ -464,11 +464,12 @@ void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs) · 463 unmodified lines
464464 t->rseq_event_pending = false;
465465 }
466466
467− if (IS_ENABLED(CONFIG_DEBUG_RSEQ) || event) {
468− ret = rseq_ip_fixup(regs, event);
469− if (unlikely(ret < 0))
470− goto error;
471− }
467+ if (!IS_ENABLED(CONFIG_DEBUG_RSEQ) && !event)
468+ return;
469+
470+ ret = rseq_ip_fixup(regs, event);
471+ if (unlikely(ret < 0))
472+ goto error;
472473
473474 if (unlikely(rseq_update_cpu_node_id(t)))
474475 goto error;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t