<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic We found a problem, thank you in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145675#M26219</link>
    <description>&lt;P&gt;We found a problem, thank you for the reporting. The problem will be fixed in next release.&lt;/P&gt;

&lt;P&gt;Pavel&lt;/P&gt;</description>
    <pubDate>Tue, 23 Oct 2018 10:54:02 GMT</pubDate>
    <dc:creator>Pavel_B_Intel1</dc:creator>
    <dc:date>2018-10-23T10:54:02Z</dc:date>
    <item>
      <title>how to use ippcp in linux kernel-mode</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145670#M26214</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I only called&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;ippcpGetLibVersion&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;in the kernel-level source file test.c,&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp; class-name:dark;"&gt;/* Some other headers */

#include "ippcp.h"
#include "ippcpdefs.h"

MODULE_DESCRIPTION("ipp sm3 test for crypto module");
MODULE_LICENSE("GPL");

static int __init ipp_sm3_test_init(void)
{ 
    const IppLibraryVersion* lib = ippcpGetLibVersion();
    printk("get ippcp version:\n%s %s %d.%d.%d.%d\n\n", lib-&amp;gt;Name, lib-&amp;gt;Version, lib-&amp;gt;major, lib-&amp;gt;minor, lib-&amp;gt;majorBuild, lib-&amp;gt;build);
    return 0;
}    
    
static void __exit ipp_sm3_test_free(void)
{        
        printk("ipp_sm3_test_free.\n");
}

module_init(ipp_sm3_test_init); 
module_exit(ipp_sm3_test_free);&lt;/PRE&gt;

&lt;P&gt;And in Makefile:&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;TARGET = test.ko
test-objs := /nonpic/libippcp.a
ccflags-y += $(FLAG) -I$(KERNELDIR)/include -D__KERNEL__ -DMODULE -fno-pic -DEXPORT_SYMTAB -mcmodel=kernel&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;After excuting 'insmod test.ko', the console outputs:&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;overflow in relocation type 10 val ****
'test' likely not compiled with -mcmodel=kernel&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;How do I resolve this issue? Can ippcp be used in linux kernel-mode?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Some informations:&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;" style="font-size: 13.008px;"&gt;&lt;SPAN style="font-size: 13.008px;"&gt;ippcpGetLibVersion in user mode returns: 
&amp;nbsp; &lt;/SPAN&gt;ippCP AVX (e9) 2019.0.0 (r0x438f167) 2019.0.0.7084067

ippcp version: l_ippcp_2019.0.117
     Compiler: cc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
 Architecture: Linux 3.4.87 x86_64
           OS: CentOS release 6.4&amp;nbsp;(Final)
          CPU: Intel(R) Xeon(R) CPU E3-1275 V2 @ 3.50GHz&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;----&lt;/P&gt;

&lt;P&gt;I installed different versions of ippcp library in two machines. The other machine is&amp;nbsp;&lt;EM&gt;Linux algo 3.13.0-32-generic #57-Ubuntu x86_64 GNU/Linux&lt;/EM&gt;.&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;If I copied libippcp.a (version 2019.0.117) to the other machine, same error occurs ('likely not compiled with mcmodel=kernel').&lt;/LI&gt;
	&lt;LI&gt;But if I copied libippcp.a (version&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;2018.1.176)&lt;/SPAN&gt; from the other machine to this one, it works!!&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Now my module can be successfully loaded.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 10:20:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145670#M26214</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-10-19T10:20:08Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145671#M26215</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;please provide all output from the ippcpGetLibVersion() (guess you can run it in the user mode), or please provide: library version, architecture (ia32 or x64), cpu, OS, cctools version, etc.&lt;/P&gt;

&lt;P&gt;regards, Igor&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:28:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145671#M26215</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2018-10-19T15:28:15Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145672#M26216</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;also please provide part of code where you call the IPP function.&lt;/P&gt;

&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 16:51:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145672#M26216</guid>
      <dc:creator>Pavel_B_Intel1</dc:creator>
      <dc:date>2018-10-19T16:51:44Z</dc:date>
    </item>
    <item>
      <title>Hi Igor, Pavel,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145673#M26217</link>
      <description>&lt;P&gt;Hi Igor, Pavel,&lt;/P&gt;

&lt;P&gt;I've added more details to my question.&lt;/P&gt;

&lt;P&gt;Maybe I should recompile the ippcp library with mcmodel=kernel, but I didn't see any configuration about mcmodel in the installation process.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 02:25:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145673#M26217</guid>
      <dc:creator>huang__zhongqiang</dc:creator>
      <dc:date>2018-10-22T02:25:05Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145674#M26218</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;thanks for information. Please give us some time to investigate the problem. I will return 2-3 weeks late.&lt;/P&gt;

&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 13:37:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145674#M26218</guid>
      <dc:creator>Pavel_B_Intel1</dc:creator>
      <dc:date>2018-10-22T13:37:59Z</dc:date>
    </item>
    <item>
      <title>We found a problem, thank you</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145675#M26219</link>
      <description>&lt;P&gt;We found a problem, thank you for the reporting. The problem will be fixed in next release.&lt;/P&gt;

&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 10:54:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145675#M26219</guid>
      <dc:creator>Pavel_B_Intel1</dc:creator>
      <dc:date>2018-10-23T10:54:02Z</dc:date>
    </item>
    <item>
      <title>Hi, Huang,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145676#M26220</link>
      <description>&lt;P&gt;Hi, Huang,&lt;/P&gt;&lt;P&gt;Thanks you for reporting of the problem.&amp;nbsp;Definitely, wrong tool has been used inside IPP Crypto build procedures. Believe I've fixed that.&lt;/P&gt;&lt;P&gt;I've successfully re-build your sample using updated library. I don't have root rights and our IT guys did the insertion of the "test_kernel" into the Linux kernel.&amp;nbsp;Seems,&amp;nbsp;the module has been inserted. At least "lsmod" reports:&lt;/P&gt;&lt;P&gt;-bash-4.2$ lsmod | grep test&lt;BR /&gt;test_kernel &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8255 &amp;nbsp;0&lt;/P&gt;&lt;P&gt;Both Open Source and commercial version of IPP Crypto will be updated soon.&amp;nbsp;I'll inform you as soon as update will be available,&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;Sergey&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 11:34:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/how-to-use-ippcp-in-linux-kernel-mode/m-p/1145676#M26220</guid>
      <dc:creator>Sergey_K_Intel4</dc:creator>
      <dc:date>2018-11-02T11:34:36Z</dc:date>
    </item>
  </channel>
</rss>

