In the existing code, the compiler is allowed to allocate the RSI register for outputs m0, m1, or m2, which are written to before the input in RSI is read from. Fix this by marking them as early clobber.
Make a similar change in the field logic, even though not triggerable there.
real-or-random added the label
bug
on May 12, 2023
real-or-random added the label
assurance
on May 12, 2023
real-or-random removed the label
assurance
on May 12, 2023
Bugfix: mark outputs as early clobber in scalar x86_64 asm
In the existing code, the compiler is allowed to allocate the RSI register
for outputs m0, m1, or m2, which are written to before the input in RSI is
read from. Fix this by marking them as early clobber.
Reported by ehoffman2 in https://github.com/bitcoin-core/secp256k1/issues/766
0c729ba70d
Mark stack variables as early clobber for technical correctness
In the field 5x52 asm for x86_64, stack variables are provided as outputs.
The existing inputs are all forcibly allocated to registers, so cannot
coincide, but mark them as early clobber anyway to make this clearer.
350b4bd6e6
sipa force-pushed
on May 12, 2023
real-or-random added the label
needs-changelog
on May 12, 2023
Add release note8c9ae37a5a
sipa added this to the milestone 0.3.2 (or 0.4.0)
on May 12, 2023
real-or-random approved
real-or-random
commented at 12:56 pm on May 12, 2023:
contributor
ACK8c9ae37a5a26cdeb6365624fee43f41b238830e4
jonasnick
commented at 1:34 pm on May 12, 2023:
contributor
ACK8c9ae37a5a26cdeb6365624fee43f41b238830e4
I’m reasonably sure that we with this PR we found all outputs that needed to be marked as early clobbers.
jonasnick merged this
on May 12, 2023
jonasnick closed this
on May 12, 2023
hebasto referenced this in commit
49c52ea2b1
on May 13, 2023
real-or-random removed the label
needs-changelog
on May 13, 2023
vmta referenced this in commit
e1120c94a1
on Jun 4, 2023
sipa referenced this in commit
901336eee7
on Jun 21, 2023
vmta referenced this in commit
8f03457eed
on Jul 1, 2023
This is a metadata mirror of the GitHub repository
bitcoin-core/secp256k1.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-21 13:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me