Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AARCH64 syscalls2 and OSI #1537

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Fix AARCH64 syscalls2 and OSI #1537

merged 2 commits into from
Oct 17, 2024

Conversation

lacraig2
Copy link
Member

@lacraig2 lacraig2 commented Oct 10, 2024

This PR fixes assumptions in AARCH64 OSI and syscalls2.

@lacraig2 lacraig2 force-pushed the fix_aarch64_syscalls branch from a59f3c3 to 16678b9 Compare October 16, 2024 19:14
@lacraig2 lacraig2 changed the title Fix AARCH64 syscall check Fix AARCH64 syscalls2 and OSI Oct 16, 2024
void aarch64_sbe(CPUState *cpu, TranslationBlock *tb) {
if (unlikely(panda_in_kernel_code_linux(cpu) && ((CPUARMState*) cpu->env_ptr)->sp_el[0] != 0)){
aarch64_initialized = true;
spel0 = ((CPUARMState*) cpu->env_ptr)->sp_el[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you be happier to have this logic in https://github.com/panda-re/panda/tree/dev/panda/plugins/hw_proc_id? We're doing something similar in there for mips - that way OSI itself isn't doing block-level analysis, just consuming the results of another analyses.

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about that, but the frustrating part is that it's only enabled for kernels later than ~4.6. Additionally, it's not actually producing a hwid value like r28 is used in MIPS.

@lacraig2 lacraig2 merged commit 81cb6a0 into dev Oct 17, 2024
8 checks passed
@lacraig2 lacraig2 deleted the fix_aarch64_syscalls branch October 17, 2024 16:30
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