Skip to content

Conversation

@nickdesaulniers
Copy link
Member

I was pulling my hair out trying to debug
ClangBuiltLinux/linux#852 since breakpoints I
set were never hit.

Sami Tolvanen (@samitolvanen) reminded me I need to disable KASLR via
nokaslr kernel command line parameter.

Separate out the -append string from QEMU_ARCH_ARGS, since we need to
change it both for interactive and debug mode.

I was pulling my hair out trying to debug
ClangBuiltLinux/linux#852 since breakpoints I
set were never hit.

Sami Tolvanen (@samitolvanen) reminded me I need to disable KASLR via
nokaslr kernel command line parameter.

Separate out the -append string from QEMU_ARCH_ARGS, since we need to
change it both for interactive and debug mode.
@nickdesaulniers nickdesaulniers merged commit 54aecc5 into master May 7, 2020
@nickdesaulniers nickdesaulniers deleted the nokaslr branch May 7, 2020 18:52
@ojeda
Copy link

ojeda commented May 7, 2020

Perhaps a comment somewhere could be nice as a remainder.

@nickdesaulniers
Copy link
Member Author

I wonder if I can extend vmlinux-gdb.py to warn if the kernel was booted with KASLR that it's basically not going to work for any debugging.

@ojeda
Copy link

ojeda commented May 8, 2020

@nickdesaulniers That would be way better, yeah!

@kees
Copy link
Contributor

kees commented May 14, 2020

There's only so many places the kernel can be in memory. It shouldn't be too hard to search quickly for the correct KASLR base. What is the right way to update gdb's sense of the base address, though, once its has been located?

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.

4 participants