crypto/modes/asm/aesni-gcm-x86_64.pl uses %rax as frame pointer, not %rbp
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 30.8k
- Forks
- 11.5k
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
The functions aesni_gcm_decrypt and aesni_gcm_encrypt use %rax pretty much as frame pointer. They store a rounds count in %rbp. This corrupts the frame pointer chain, impacting frame-pointer-based profiling tools.
It is possible to reverse the roles of %rax and %rbp and switch a standard frame layout in those functions. I don't know what Red Hat's CLA status is, so I'm not going to send a patch here.
I think it's possible to adapt the Windows structured exception handler to this, however it's purpose is unclear, see #31503.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with crypto/modes/asm/aesni-gcm-x86_64.pl and inspect aesni_gcm_decrypt and aesni_gcm_encrypt, focusing on their frame layout and register roles. Check how the Windows structured exception handler relates to these functions; done means the functions use a standard frame layout without corrupting the frame-pointer chain while preserving the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- cryptography
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100