Skip to content

Fix detection of interfering branches for syscall at end of patch#3579

Merged
rocallahan merged 1 commit intomasterfrom
kf/interferingrdtsc
Aug 19, 2023
Merged

Fix detection of interfering branches for syscall at end of patch#3579
rocallahan merged 1 commit intomasterfrom
kf/interferingrdtsc

Conversation

@Keno
Copy link
Copy Markdown
Member

@Keno Keno commented Aug 18, 2023

The interfering branch check was assuming that the syscall (or rdtsc instruction) is at the start of the patch region. As a result, it was incorrectly ignoring interfering branches for
PATCH_SYSCALL_INSTRUCTION_IS_LAST hooks (as well as detecting interfering branches that actually do not interfere).

found_potential_interfering_branch = true;
break;
if (hook.flags & PATCH_SYSCALL_INSTRUCTION_IS_LAST) {
if (!(hook.flags & PATCH_IS_MULTIPLE_INSTRUCTIONS)) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the ! by swapping the if/else blocks

…S_LAST

The interfering branch check was assuming that the syscall (or rdtsc
instruction) is at the start of the patch region. As a result, it
was incorrectly ignoring interfering branches for
PATCH_SYSCALL_INSTRUCTION_IS_LAST hooks (as well as detecting
interfering branches that actually do not interfere).
@Keno Keno force-pushed the kf/interferingrdtsc branch from 9363924 to 22896db Compare August 19, 2023 00:45
@rocallahan rocallahan merged commit 55012fb into master Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants