Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1752657175, "reponame":"openssl", "desc":"OpenSSL", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl", "f":3, "items": [ {"schema":"libjg2-1", "cid":"eae5e8c6fcf636854f0a76ea28fc30ec", "commit": {"type":"commit", "time": 1574255484, "time_ofs": 60, "oid_tree": { "oid": "d5d2bfd892207e87a4ee5eed1e8b266eb7b455d0", "alias": []}, "oid":{ "oid": "1ae28ac78171207399b3cf725430ebc0052c67de", "alias": []}, "msg": "Fix sha512_block_data_order_avx2 backtrace info", "sig_commit": { "git_time": { "time": 1574255484, "offset": 60 }, "name": "Bernd Edlinger", "email": "bernd.edlinger@hotmail.de", "md5": "954aa9518ec67215541482fb5302b745" }, "sig_author": { "git_time": { "time": 1566086081, "offset": 120 }, "name": "Bernd Edlinger", "email": "bernd.edlinger@hotmail.de", "md5": "954aa9518ec67215541482fb5302b745" }}, "body": "Fix sha512_block_data_order_avx2 backtrace info\n\nWe store a secondary frame pointer info for the debugger\nin the red zone.\n\nFixes #8853\n\n[extended tests]\n\nReviewed-by: Richard Levitte \u003clevitte@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/9624)\n\n(cherry picked from commit 9ce91035bcf7d74fe15c94650f3bc1f89b7c0f07)\n" , "diff": "diff --git a/crypto/sha/asm/sha512-x86_64.pl b/crypto/sha/asm/sha512-x86_64.pl\nindex f2ebdfd..2e3b4fd 100755\n--- a/crypto/sha/asm/sha512-x86_64.pl\n+++ b/crypto/sha/asm/sha512-x86_64.pl\n@@ -1992,7 +1992,23 @@ $code.\u003d\u003c\u003c___;\n \tvmovdqa\t$t0,0x00(%rsp)\n \txor\t$a1,$a1\n \tvmovdqa\t$t1,0x20(%rsp)\n+___\n+$code.\u003d\u003c\u003c___ if (!$win64);\n+# temporarily use %rdi as frame pointer\n+\tmov\t$_rsp,%rdi\n+.cfi_def_cfa\t%rdi,8\n+___\n+$code.\u003d\u003c\u003c___;\n \tlea\t-$PUSH8(%rsp),%rsp\n+___\n+$code.\u003d\u003c\u003c___ if (!$win64);\n+# the frame info is at $_rsp, but the stack is moving...\n+# so a second frame pointer is saved at -8(%rsp)\n+# that is in the red zone\n+\tmov\t%rdi,-8(%rsp)\n+.cfi_cfa_expression\t%rsp-8,deref,+8\n+___\n+$code.\u003d\u003c\u003c___;\n \tmov\t$B,$a3\n \tvmovdqa\t$t2,0x00(%rsp)\n \txor\t$C,$a3\t\t\t# magic\n@@ -2012,7 +2028,18 @@ my @X \u003d @_;\n my @insns \u003d (\u0026$body,\u0026$body,\u0026$body,\u0026$body);\t# 96 instructions\n my $base \u003d \u0022+2*$PUSH8(%rsp)\u0022;\n \n-\t\u0026lea\t(\u0022%rsp\u0022,\u0022-$PUSH8(%rsp)\u0022)\tif (($j%2)\u003d\u003d0);\n+\tif (($j%2)\u003d\u003d0) {\n+\t\u0026lea\t(\u0022%rsp\u0022,\u0022-$PUSH8(%rsp)\u0022);\n+$code.\u003d\u003c\u003c___ if (!$win64);\n+.cfi_cfa_expression\t%rsp+`$PUSH8-8`,deref,+8\n+# copy secondary frame pointer to new location again at -8(%rsp)\n+\tpushq\t$PUSH8-8(%rsp)\n+.cfi_cfa_expression\t%rsp,deref,+8\n+\tlea\t8(%rsp),%rsp\n+.cfi_cfa_expression\t%rsp-8,deref,+8\n+___\n+\t}\n+\n \tforeach (Xupdate_256_AVX()) {\t\t# 29 instructions\n \t eval;\n \t eval(shift(@insns));\n@@ -2083,7 +2110,23 @@ $code.\u003d\u003c\u003c___;\n \tvmovdqa\t$t2,0x40(%rsp)\n \tvpaddq\t0x40($Tbl),@X[6],$t2\n \tvmovdqa\t$t3,0x60(%rsp)\n+___\n+$code.\u003d\u003c\u003c___ if (!$win64);\n+# temporarily use %rdi as frame pointer\n+\tmov\t$_rsp,%rdi\n+.cfi_def_cfa\t%rdi,8\n+___\n+$code.\u003d\u003c\u003c___;\n \tlea\t-$PUSH8(%rsp),%rsp\n+___\n+$code.\u003d\u003c\u003c___ if (!$win64);\n+# the frame info is at $_rsp, but the stack is moving...\n+# so a second frame pointer is saved at -8(%rsp)\n+# that is in the red zone\n+\tmov\t%rdi,-8(%rsp)\n+.cfi_cfa_expression\t%rsp-8,deref,+8\n+___\n+$code.\u003d\u003c\u003c___;\n \tvpaddq\t0x60($Tbl),@X[7],$t3\n \tvmovdqa\t$t0,0x00(%rsp)\n \txor\t$a1,$a1\n@@ -2107,7 +2150,18 @@ my @X \u003d @_;\n my @insns \u003d (\u0026$body,\u0026$body);\t\t\t# 48 instructions\n my $base \u003d \u0022+2*$PUSH8(%rsp)\u0022;\n \n-\t\u0026lea\t(\u0022%rsp\u0022,\u0022-$PUSH8(%rsp)\u0022)\tif (($j%4)\u003d\u003d0);\n+\tif (($j%4)\u003d\u003d0) {\n+\t\u0026lea\t(\u0022%rsp\u0022,\u0022-$PUSH8(%rsp)\u0022);\n+$code.\u003d\u003c\u003c___ if (!$win64);\n+.cfi_cfa_expression\t%rsp+`$PUSH8-8`,deref,+8\n+# copy secondary frame pointer to new location again at -8(%rsp)\n+\tpushq\t$PUSH8-8(%rsp)\n+.cfi_cfa_expression\t%rsp,deref,+8\n+\tlea\t8(%rsp),%rsp\n+.cfi_cfa_expression\t%rsp-8,deref,+8\n+___\n+\t}\n+\n \tforeach (Xupdate_512_AVX()) {\t\t# 23 instructions\n \t eval;\n \t if ($_ !~ /\u005c;$/) {\n@@ -2182,6 +2236,8 @@ $code.\u003d\u003c\u003c___;\n \tadd\t$a1,$A\n \t#mov\t`2*$SZ*$rounds+8`(%rsp),$inp\t# $_inp\n \tlea\t`2*$SZ*($rounds-8)`(%rsp),%rsp\n+# restore frame pointer to original location at $_rsp\n+.cfi_cfa_expression\t$_rsp,deref,+8\n \n \tadd\t$SZ*0($ctx),$A\n \tadd\t$SZ*1($ctx),$B\n@@ -2207,22 +2263,24 @@ $code.\u003d\u003c\u003c___;\n \n \tjbe\t.Loop_avx2\n \tlea\t(%rsp),$Tbl\n+# temporarily use $Tbl as index to $_rsp\n+# this avoids the need to save a secondary frame pointer at -8(%rsp)\n+.cfi_cfa_expression\t$Tbl+`16*$SZ+3*8`,deref,+8\n \n .Ldone_avx2:\n-\tlea\t($Tbl),%rsp\n-\tmov\t$_rsp,%rsi\n+\tmov\t`16*$SZ+3*8`($Tbl),%rsi\n .cfi_def_cfa\t%rsi,8\n \tvzeroupper\n ___\n $code.\u003d\u003c\u003c___ if ($win64);\n-\tmovaps\t16*$SZ+32(%rsp),%xmm6\n-\tmovaps\t16*$SZ+48(%rsp),%xmm7\n-\tmovaps\t16*$SZ+64(%rsp),%xmm8\n-\tmovaps\t16*$SZ+80(%rsp),%xmm9\n+\tmovaps\t16*$SZ+32($Tbl),%xmm6\n+\tmovaps\t16*$SZ+48($Tbl),%xmm7\n+\tmovaps\t16*$SZ+64($Tbl),%xmm8\n+\tmovaps\t16*$SZ+80($Tbl),%xmm9\n ___\n $code.\u003d\u003c\u003c___ if ($win64 \u0026\u0026 $SZ\u003e4);\n-\tmovaps\t16*$SZ+96(%rsp),%xmm10\n-\tmovaps\t16*$SZ+112(%rsp),%xmm11\n+\tmovaps\t16*$SZ+96($Tbl),%xmm10\n+\tmovaps\t16*$SZ+112($Tbl),%xmm11\n ___\n $code.\u003d\u003c\u003c___;\n \tmov\t-48(%rsi),%r15\n","s":{"c":1752657175,"u": 40037}} ],"g": 41211,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}