[aarch64-port-dev ] RFR: AArch64: SEGV in stub code cipherBlockChaining_decryptAESCrypt
Andrew Haley
aph at redhat.com
Wed Oct 12 10:23:58 UTC 2016
On 21/09/16 10:35, Andrew Dinn wrote:
> I think this patch looks like it will suffice to fix the AArch64 code.
> However, I don't understand why this is only an AArch64 issue. For
> example, it looks to me as if the x86_64 code is also susceptible to the
> same problem should input value 0 be passed in len_reg (c_rarg4). So,
> this might need fixing for all archs. Alternatively, it might be better
> fixed in the jdk (Java) code.
x86 is OK, but the reason why is a bit hard to find. It goes like this:
__ align(OptoLoopAlignment);
__ BIND(L_multiBlock_loopTop[k]);
__ cmpptr(len_reg, PARALLEL_FACTOR * AESBlockSize); // see if at least 4 blocks left
__ jcc(Assembler::less, L_singleBlock_loopTopHead[k]);
...
__ BIND(L_singleBlock_loopTopHead[k]);
if (k == 1) {
__ addptr(rsp, 6 * wordSize);
} else if (k == 2) {
__ addptr(rsp, 10 * wordSize);
}
__ cmpptr(len_reg, 0); // any blocks left??
__ jcc(Assembler::equal, L_exit);
So it firsts tests to see if 4 blocks are left, then tests to see if there
are any blocks left.
More information about the hotspot-dev
mailing list