-
Notifications
You must be signed in to change notification settings - Fork 103
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 bad 'bp' value
warning
#2281
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1658,7 +1658,9 @@ SYM_FUNC_END(mpi_from_mont_p256_x86_64) | |
*/ | ||
SYM_FUNC_START_32(mpi_mul_mont_mod_p256_x86_64) | ||
pushq %rbx | ||
#if defined(__KERNEL__) && !defined(CONFIG_FRAME_POINTER) | ||
pushq %rbp | ||
#endif | ||
pushq %r12 | ||
pushq %r13 | ||
pushq %r14 | ||
|
@@ -1727,8 +1729,15 @@ SYM_FUNC_START_32(mpi_mul_mont_mod_p256_x86_64) | |
# A[3] * B[0] | ||
movq 24(%rsi), %rdx | ||
adcxq %rax, %r12 | ||
#if defined(__KERNEL__) && !defined(CONFIG_FRAME_POINTER) | ||
mulxq (%rcx), %rbp, %rax | ||
adoxq %rbp, %r11 | ||
#else | ||
pushq %rdi | ||
mulxq (%rcx), %rdi, %rax | ||
adoxq %rdi, %r11 | ||
popq %rdi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In https://patchwork.kernel.org/project/linux-crypto/patch/[email protected]/ they just removed the code as it is not performance crucial - this is very different for our case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. About wolfssl it seems that it is not a kernel library, which works in irq context. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be we can not use rbp with CONFIG_FRAME_POINTER and kasan. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. old
new
|
||
#endif | ||
adoxq %rax, %r12 | ||
# A[3] * B[2] | ||
mulxq 16(%rcx), %rdx, %rax | ||
|
@@ -1748,7 +1757,9 @@ SYM_FUNC_START_32(mpi_mul_mont_mod_p256_x86_64) | |
popq %r14 | ||
popq %r13 | ||
popq %r12 | ||
#if defined(__KERNEL__) && !defined(CONFIG_FRAME_POINTER) | ||
popq %rbp | ||
#endif | ||
popq %rbx | ||
retq | ||
SYM_FUNC_END(mpi_mul_mont_mod_p256_x86_64) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the copyright year