[Pcsclite-muscle] High CPU load with pcscd and Kerkey security Module

Oliver Graute oliver.graute at gmail.com
Mon Nov 14 08:11:06 UTC 2016


Hello Ludovic,

This is the Statement from Kerkey User Manual:

"By default PCSCDLite will call the driver Kerkey every 400ms to check card
status. This is not usefull because in any case there´s no call from CCID
driver to Kerkey to avoid so many traffic between host an Kerkey

We suggest the following to change the polling time:

#define PCSC_LITE_STATUS_POLL_RATE 60000000 from pcscd.h set the pooling to
60 seconds"

But even with this patch there is a lot of communication towards the
security module and
pcscd utilize our cpu.


here the tar packed log.

Best Regards,

Oliver

On Fri, Nov 11, 2016 at 5:30 PM, Ludovic Rousseau
<ludovic.rousseau at free.fr> wrote:
> Le 11/11/2016 à 14:49, Oliver Graute a écrit :
>>
>> Hello,
>
>
> Hello,
>
>>
>> we use a ST Kerkey security module together with pcsc-lite and we observe
>> some
>> CPU load problems with pcscd. Pcscd is running on an embedded Yocto Linux
>> on
>> a ARM Based CPU imx6ul.
>>
>> We store some TLS related certificates inside our security module. If we
>> access our Webserver over TLS the CPU Load of pcscd is >60%.  What can be
>> the
>> cause for such a high CPU load?
>>
>> The components which are involved are
>> apache2/nss3.21/pkcs11/pcscd/ccid/Linux
>> kerkey driver/kerkey HW.
>>
>> The only changes in source code we made on pcscd is this one, because its
>> recommended in the ST Kerkey User Manual.
>>
>> diff --git a/src/pcscd.h.in b/src/pcscd.h.in
>> index c0cda6d..7354262 100644
>> --- a/src/pcscd.h.in
>> +++ b/src/pcscd.h.in
>> @@ -54,7 +54,7 @@
>>  #define PCSCLITE_CSOCK_NAME            PCSCLITE_IPC_DIR "/pcscd.comm"
>>
>>  #define PCSCLITE_VERSION_NUMBER                "@VERSION@"     /**<
>> Current version */
>> -#define PCSCLITE_STATUS_POLL_RATE      400000          /**< Status
>> polling rate */
>> +#define PCSCLITE_STATUS_POLL_RATE      60000000                /**<
>> Status polling rate */
>>  #define PCSCLITE_LOCK_POLL_RATE                100000          /**<
>> Lock polling rate */
>
>
> Strange patch. I dont know why this is needed.
>
>> sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu
>> --color | tee pcscd_log.txt
>
>
> Please try again to generate the log and send me the generated pcscd_log.txt
> file as an attachement.
>
> Bye
>
> --
> Dr. Ludovic Rousseau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcscd_log.txt.tar.gz
Type: application/x-gzip
Size: 485807 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20161114/1c6f5fb4/attachment-0001.bin>


More information about the Pcsclite-muscle mailing list