<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 17 September 2015 at 18:03, Kinsella, Ray <span dir="ltr">&lt;<a href="mailto:ray.kinsella@intel.com" target="_blank">ray.kinsella@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The cmpxchg instruction is encoded in functions such as OPENSSL_atomic_add<br>
as a perlasm data_word. This has the effect of hiding the instruction from<br>
the assembler. Stripping the LOCK prefix on cmpxchg via the assembler with<br>
--momit-lock-prefix=yes then becomes impossible (required on the Intel X1000).<br>
This patch converts the data_word into perlasm instructions.<br></blockquote><div><br></div><div>Could you resend this following the advice here: <a href="http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines">http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines</a> : mainly the patch file you add needs a message explaining the change as well as headers Upstream-Status &amp; Signed-off-by. </div><div><br></div><div>Thanks,</div><div>  Jussi</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Signed-off-by: Ray Kinsella &lt;<a href="mailto:ray.kinsella@intel.com">ray.kinsella@intel.com</a>&gt;<br>
---<br>
 .../openssl/remove-lock-data_word-from-x86cpuid.pl.patch   |   12 ++++++++++++<br>
 meta/recipes-connectivity/openssl/<a href="http://openssl_1.0.2d.bb" rel="noreferrer" target="_blank">openssl_1.0.2d.bb</a>        |    1 +<br>
 2 files changed, 13 insertions(+)<br>
 create mode 100644 meta/recipes-connectivity/openssl/openssl/remove-lock-data_word-from-x86cpuid.pl.patch<br>
<br>
diff --git a/meta/recipes-connectivity/openssl/openssl/remove-lock-data_word-from-x86cpuid.pl.patch b/meta/recipes-connectivity/openssl/openssl/remove-lock-data_word-from-x86cpuid.pl.patch<br>
new file mode 100644<br>
index 0000000..e969e91<br>
--- /dev/null<br>
+++ b/meta/recipes-connectivity/openssl/openssl/remove-lock-data_word-from-x86cpuid.pl.patch<br>
@@ -0,0 +1,12 @@<br>
+--- openssl-1.0.2d/crypto/x86cpuid.pl.orig     2015-09-16 21:11:01.927322252 +0100<br>
++++ openssl-1.0.2d/crypto/<a href="http://x86cpuid.pl" rel="noreferrer" target="_blank">x86cpuid.pl</a>  2015-09-16 21:14:45.795314992 +0100<br>
+@@ -275,7 +275,8 @@<br>
+ &amp;set_label(&quot;spin&quot;);<br>
+       &amp;lea    (&quot;ebx&quot;,&amp;DWP(0,&quot;eax&quot;,&quot;ecx&quot;));<br>
+       &amp;nop    ();<br>
+-      &amp;data_word(0x1ab10ff0); # lock; cmpxchg %ebx,(%edx)     # %eax is envolved and is always reloaded<br>
++      &amp;lock   ();<br>
++      &amp;cmpxchg(&amp;DWP(0,&quot;edx&quot;), &quot;ebx&quot;); # %eax is envolved and is always reloaded<br>
+       &amp;jne    (&amp;label(&quot;spin&quot;));<br>
+       &amp;mov    (&quot;eax&quot;,&quot;ebx&quot;);  # OpenSSL expects the new value<br>
+       &amp;pop    (&quot;ebx&quot;);<br>
diff --git a/meta/recipes-connectivity/openssl/<a href="http://openssl_1.0.2d.bb" rel="noreferrer" target="_blank">openssl_1.0.2d.bb</a> b/meta/recipes-connectivity/openssl/<a href="http://openssl_1.0.2d.bb" rel="noreferrer" target="_blank">openssl_1.0.2d.bb</a><br>
index 32d8dce..de2ec1a 100644<br>
--- a/meta/recipes-connectivity/openssl/<a href="http://openssl_1.0.2d.bb" rel="noreferrer" target="_blank">openssl_1.0.2d.bb</a><br>
+++ b/meta/recipes-connectivity/openssl/<a href="http://openssl_1.0.2d.bb" rel="noreferrer" target="_blank">openssl_1.0.2d.bb</a><br>
@@ -33,6 +33,7 @@ SRC_URI += &quot;file://configure-targets.patch \<br>
             file://openssl-fix-des.pod-error.patch \<br>
             file://Makefiles-ptest.patch \<br>
             file://ptest-deps.patch \<br>
+            file://remove-lock-data_word-from-x86cpuid.pl.patch \<br>
             file://run-ptest \<br>
             file://crypto_use_bigint_in_x86-64_perl.patch \<br>
             file://openssl-1.0.2a-x32-asm.patch \<br>
<span class=""><font color="#888888">--<br>
1.7.10.4<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br></div></div>