- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to include IPP crypto libraray to Linux kernel with static link.
Now i can pass the kernel compile without errors.
But when i try to run the encryption procedure, i got some errors below:
using ippsDESGetSize function!
[ 162.408451] BUG: unable to handle kernel paging request at virtual address c0390614
[ 162.408462] printing eip: c01fa12c *pde = 37c11163 *pte = 00390161
[ 162.408477] Oops: 0003
I am only using the basic function:
int ctxSize;
ippsDESGetSize(&ctxSize);
Any help will be appreciated.
Regard.
I am trying to include IPP crypto libraray to Linux kernel with static link.
Now i can pass the kernel compile without errors.
But when i try to run the encryption procedure, i got some errors below:
using ippsDESGetSize function!
[ 162.408451] BUG: unable to handle kernel paging request at virtual address c0390614
[ 162.408462] printing eip: c01fa12c *pde = 37c11163 *pte = 00390161
[ 162.408477] Oops: 0003
I am only using the basic function:
int ctxSize;
ippsDESGetSize(&ctxSize);
Any help will be appreciated.
Regard.
Link Copied
14 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you please provide simple test case which reproduce the issue?
The ippsDESGetSize function basically just returns some sizeof(internal struct) kind of info. No internal memory allocation or pointer dereferencing (except pointer to output value) inside this function.
Regards,
Vladimir
Could you please provide simple test case which reproduce the issue?
The ippsDESGetSize function basically just returns some sizeof(internal struct) kind of info. No internal memory allocation or pointer dereferencing (except pointer to output value) inside this function.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik
Hello,
Could you please provide simple test case which reproduce the issue?
The ippsDESGetSize function basically just returns some sizeof(internal struct) kind of info. No internal memory allocation or pointer dereferencing (except pointer to output value) inside this function.
Regards,
Vladimir
Could you please provide simple test case which reproduce the issue?
The ippsDESGetSize function basically just returns some sizeof(internal struct) kind of info. No internal memory allocation or pointer dereferencing (except pointer to output value) inside this function.
Regards,
Vladimir
I just added these two lines below into the Linux kernel des_encrypt() in des_generic.c
int ctxSize;
ippsDESGetSize(&ctxSize);
When i try to involk the encrypt function, i got the errors.
If i just reomoved these two lines code, the encrypt procedure will be work fine.
And the same code can work under Linux user space application.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, whatyour linker command line look like?
Vladimr
Vladimr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik
Ok, whatyour linker command line look like?
Vladimr
Vladimr
#define IPPAPI(type,name,arg) extern type __STDCALL w7_##name arg;
#define IPPCALL(name) w7_##name
#include
and link with
libippcore.a, libippcpemerged.a, libippcpmerged.a
I only added these three ipp library into the linux kernel normal build procedure.
The kernel link command is shown below:
ld -m elf_i386 -m elf_i386 --emit-relocs --build-id -o .tmp_vmlinux1 -T arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_32.o arch/x86/kernel/init_task.o init/built-in.o --start-group usr/built-in.o arch/x86/kernel/built-in.o arch/x86/mm/built-in.o arch/x86/mach-default/built-in.o arch/x86/crypto/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/libippcore.a arch/x86/lib/libippcore.a lib/libippcpemerged.a arch/x86/lib/libippcpemerged.a lib/libippcpmerged.a arch/x86/lib/libippcpmerged.a lib/lib.a arch/x86/lib/lib.a lib/built-in.o arch/x86/lib/built-in.o drivers/built-in.o sound/built-in.o arch/x86/pci/built-in.o arch/x86/power/built-in.o arch/x86/video/built-in.o net/built-in.o --end-group
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use direct static linkage to processor specific code ('w7', for example), you do not need to link with *emerged libraries. Although pay attention to PIC or non-PIC IPP libraries, you may need to link with nonpic libraries for Linux kernel mode (check with Linux documentation for the details).
By the way, why library names happened twice in your command line, one with arch/x86/lib and second one with just lib?
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik
If you use direct static linkage to processor specific code ('w7', for example), you do not need to link with *emerged libraries. Although pay attention to PIC or non-PIC IPP libraries, you may need to link with nonpic libraries for Linux kernel mode (check with Linux documentation for the details).
By the way, why library names happened twice in your command line, one with arch/x86/lib and second one with just lib?
Vladimir
Should i invoke any initial function for ippsDESGetSize() function? Or just involk the ippsDESGetSize() at the first.
I have compiled the library with non-PIC.
About why the library names happed twice. Cause when i compile the linux kernel, it will check those two, i don't know why.
If i removed one of them, procedure will complain that he can not find the library, so i just copy the library to there.
Mix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may need to call ippStaticInit function.
Please refer to IPP kernel mode sample to see how to use IPP in Linux kernel mode
Vladimir
Please refer to IPP kernel mode sample to see how to use IPP in Linux kernel mode
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik
You may need to call ippStaticInit function.
Please refer to IPP kernel mode sample to see how to use IPP in Linux kernel mode
Vladimir
Please refer to IPP kernel mode sample to see how to use IPP in Linux kernel mode
Vladimir
Can you provide the IPP kernel mode sample link to me?
Thanks a lot :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey, I thought you started from this!
Please download IPP sample package from IPP web page (you should be registered IPP user. You may register for evaluation or for free non-commercial license available for Linux developers).
Then you will find IPP kernel mode sample in folder advanced-usage/ippsdrv
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik
Hey, I thought you started from this!
Please download IPP sample package from IPP web page (you should be registered IPP user. You may register for evaluation or for free non-commercial license available for Linux developers).
Then you will find IPP kernel mode sample in folder advanced-usage/ippsdrv
Vladimir
Actually i have download this example before, and have checked this example.
As you mentioned, i will try the ippStaticInit() function to do some further test.
Thanks again :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - peifang.hungcipherium.com.tw
Vladimir,
Actually i have download this example before, and have checked this example.
As you mentioned, i will try the ippStaticInit() function to do some further test.
Thanks again :)
Actually i have download this example before, and have checked this example.
As you mentioned, i will try the ippStaticInit() function to do some further test.
Thanks again :)
http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-i-do-not-find-good-performance-with-intel-ipp-codec-functions-what-can-i-do/
Is it means if i use the static linking without dispatching (merged), i should not to call ippStaticInit()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is specially dedicated sample of how to use static library linkage without dispatcher, please take a look at advanced-usagelinkagemergedlib sample
Vladimir
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik
There is specially dedicated sample of how to use static library linkage without dispatcher, please take a look at advanced-usagelinkagemergedlib sample
Vladimir
Vladimir
When i include the ippStaticInit(), i can not pass the compile. Then i found this in ippcore.h
/* /////////////////////////////////////////////////////////////////////////////
// Functions to control emerged library
///////////////////////////////////////////////////////////////////////////// */
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippStaticInit
// Purpose: Automatic switching to best for current cpu library code using.
// Returns:
// ippStsNoErr - the best code (static) successfully set
// ippStsNonIntelCpu - px version (static) of code was set
// ippStsNoOperationInDll - function does nothing in the dynamic version of the library
//
// Parameter: nothing
//
// Notes: At the moment of this function execution no any other IPP function
// has to be working
*/
IPPAPI( IppStatus, ippStaticInit, ( void ))
I am not using the emerged library, so i guess that i don't need to invoke the ippStaticInit().
Am i right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer to IPP Linkage Models, How To Build IPP Applications in Linux environment, IPP Getting Started Guideand IPP New Users Guidearticles on IPP Technical Support pages
Vladimir
Vladimir
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page