Re: [Qemu-devel] [PATCH 0/6] usb-ccid (v8)
On Sat, Dec 11, 2010 at 03:55:10PM +, Blue Swirl wrote: On Sat, Dec 11, 2010 at 3:33 PM, Hans de Goede hdego...@redhat.com wrote: Hi, On 12/11/2010 10:43 AM, Blue Swirl wrote: On Tue, Dec 7, 2010 at 10:20 AM, Alon Levyal...@redhat.com wrote: ping. I don't think Anthony's concerns (or mine) have been addressed. Could you be a bit more verbose please ? I'm not sure if this answer was OK for Anthony given the previous discussion: http://article.gmane.org/gmane.comp.emulators.qemu/85793 I'm pretty sure it's ok by anthony since he suggested the inclusion of libcacard in qemu in the first place. (that's not a typo - I've renamed it to avoid the double card, I'll send an updated patch merging 4/6 and including this rename). About my concerns, see my previous mail about merging the shared library fix to 4/6 and about other stuff that does not belong to QEMU but which should be a separate project. your concerns were: usb-ccid.c: endianess - I've added network to host convertions (used as guest to host). coding style - answer_t and bulk_in_t renamed hungarian style usage - gave 'excuse' (spec uses those names) anonymous structs usage - named libcaccard: don't build a library that qemu doesn't use: v8.1, will fold in and send v9 Am I missing anything? Alon
Re: [Qemu-devel] [PATCH 0/6] usb-ccid (v8)
On Sun, Dec 12, 2010 at 11:35 AM, Alon Levy al...@redhat.com wrote: On Sat, Dec 11, 2010 at 03:55:10PM +, Blue Swirl wrote: On Sat, Dec 11, 2010 at 3:33 PM, Hans de Goede hdego...@redhat.com wrote: Hi, On 12/11/2010 10:43 AM, Blue Swirl wrote: On Tue, Dec 7, 2010 at 10:20 AM, Alon Levyal...@redhat.com wrote: ping. I don't think Anthony's concerns (or mine) have been addressed. Could you be a bit more verbose please ? I'm not sure if this answer was OK for Anthony given the previous discussion: http://article.gmane.org/gmane.comp.emulators.qemu/85793 I'm pretty sure it's ok by anthony since he suggested the inclusion of libcacard in qemu in the first place. (that's not a typo - I've renamed it to avoid the double card, I'll send an updated patch merging 4/6 and including this rename). About my concerns, see my previous mail about merging the shared library fix to 4/6 and about other stuff that does not belong to QEMU but which should be a separate project. your concerns were: usb-ccid.c: endianess - I've added network to host convertions (used as guest to host). coding style - answer_t and bulk_in_t renamed hungarian style usage - gave 'excuse' (spec uses those names) anonymous structs usage - named libcaccard: don't build a library that qemu doesn't use: v8.1, will fold in and send v9 Am I missing anything? No. But now that I tried to build it, there are other problems. There is a typo in configure: diff --git a/configure b/configure index 4b55904..7288b09 100755 --- a/configure +++ b/configure @@ -2142,7 +2142,7 @@ if test $smartcard != no ; then QEMU_CFLAGS=$QEMU_CFLAGS $smartcard_cflags $libcaccard_cflags LIBS=$libcaccard_libs $LIBS else -if test smartcard = yes ; then +if test $smartcard = yes ; then feature_not_found smartcard fi smartcard=no Build also fails when compiling in an object directory: make: *** libcaccard: No such file or directory. Stop. make: *** [subdir-libcaccard] Error 2 I'd even remove the configure option and build the card by default if the dependencies are found. There were also whitespace problems when applying: Applying ccid: add ccid-card-emulated device (v2) .dotest/patch:37: trailing whitespace. * for i in 1 2 3; do certutil -d /etc/pki/nssdb -x -t CT,CT,CT -S -s CN=user$i -n user$i; done warning: 1 line applied after fixing whitespace errors. Applying ccid: add docs .dotest/patch:121: trailing whitespace. [APDU-APDU repeats several times] warning: 1 line applied after fixing whitespace errors.
Re: [Qemu-devel] [PATCH 0/6] usb-ccid (v8)
On Sun, Dec 12, 2010 at 03:07:52PM +, Blue Swirl wrote: snip There is a typo in configure: diff --git a/configure b/configure index 4b55904..7288b09 100755 --- a/configure +++ b/configure @@ -2142,7 +2142,7 @@ if test $smartcard != no ; then QEMU_CFLAGS=$QEMU_CFLAGS $smartcard_cflags $libcaccard_cflags LIBS=$libcaccard_libs $LIBS else -if test smartcard = yes ; then +if test $smartcard = yes ; then feature_not_found smartcard fi smartcard=no Build also fails when compiling in an object directory: make: *** libcaccard: No such file or directory. Stop. make: *** [subdir-libcaccard] Error 2 ok, will fix. I'd even remove the configure option and build the card by default if the dependencies are found. ok, good idea. There were also whitespace problems when applying: Applying ccid: add ccid-card-emulated device (v2) .dotest/patch:37: trailing whitespace. * for i in 1 2 3; do certutil -d /etc/pki/nssdb -x -t CT,CT,CT -S -s CN=user$i -n user$i; done warning: 1 line applied after fixing whitespace errors. Applying ccid: add docs .dotest/patch:121: trailing whitespace. [APDU-APDU repeats several times] warning: 1 line applied after fixing whitespace errors. will fix as well.
Re: [Qemu-devel] [PATCH 0/6] usb-ccid (v8)
On Tue, Dec 7, 2010 at 10:20 AM, Alon Levy al...@redhat.com wrote: ping. I don't think Anthony's concerns (or mine) have been addressed. Blue Swirl - one patch I forgot is in a later message titled ..v8.1.. with the removal of the libcaccard build. This should be merged with 4/6.
Re: [Qemu-devel] [PATCH 0/6] usb-ccid (v8)
Hi, On 12/11/2010 10:43 AM, Blue Swirl wrote: On Tue, Dec 7, 2010 at 10:20 AM, Alon Levyal...@redhat.com wrote: ping. I don't think Anthony's concerns (or mine) have been addressed. Could you be a bit more verbose please ? Thanks Regards, Hans
Re: [Qemu-devel] [PATCH 0/6] usb-ccid (v8)
ping. Blue Swirl - one patch I forgot is in a later message titled ..v8.1.. with the removal of the libcaccard build. On Sun, Nov 28, 2010 at 04:46:41PM +0200, Alon Levy wrote: This patchset adds three new devices, usb-ccid, ccid-card-passthru and ccid-card-emulated, providing a CCID bus, a simple passthru protocol implementing card requiring a client, and a standalone emulated card. It also introduces a new directory libcaccard with CAC card emulation, CAC is a type of ISO 7816 smart card. v7-v8 changes: * Blue Swirl comments: * usb-ccid: deannonymize some structs * usb-ccid: coding style change - answer_t and bulk_in_t fixed * usb-ccid: handle endianess conversion between guest and host * usb-ccid: s/ccid_bulk_in_copy_out/ccid_bulk_in_copy_to_guest/ * ccid-card-emulated: fix segfault if backend not specified * ccid-card-emulated: let last reader inserted win * libcaccard: remove double vscard_common.h v6-v7 changes: * external libcaccard became internal directory libcaccard * statically link object files into qemu * produce libcaccard.so for usage by external projects * applied coding style to new code (please check me) - did not use the qemu options parsing for libcaccard, since it seems to draw large amounts of qemu code (monitor for instance). v5-v6 changes: * really remove static debug (I apologize for claiming to have done so before) v4-v5 changes: * rebased to latest * remove static debug in card devices * fix --enable-smartcard to link * stall instead of assert when exceeding BULK_OUT_DATA_SIZE * make ccid_reserve_recv_buf for too large len discard message, not exit * make ccid_reserve_recv_buf return void* * fix typo * remove commented code in VMState v3-v4: * remove ccid field in CCIDBus * remove static debug in bus * add back docs v2-v3: * split into bus (usb-ccid.c, uses ccid.h) and card (ccid-card-passthru.c). * removed documentation (being revised). v1-v2: * all QSIMPLEQ turned into fixed sized rings * all allocated buffers turned into fixed size buffers * added migration support * added a message to tell client qemu has migrated to ip:port * for lack of monitor commands ip:port are 0:0, which causes the updated vscclient to connect to one port higher on the same host. will add monitor commands in a separate patch. tested with current setup. Alon Levy (5): usb-ccid: add CCID bus ccid: add passthru card device libcaccard: update configure to build and use internal libcaccard ccid: add ccid-card-emulated device (v2) ccid: add docs Robert Relyea (1): libcaccard: initial commit after coding style fixes Makefile |6 +- Makefile.objs|6 + Makefile.target |2 + configure| 36 ++ docs/ccid.txt| 125 docs/libcaccard.txt | 482 +++ hw/ccid-card-emulated.c | 501 hw/ccid-card-passthru.c | 277 + hw/ccid.h| 34 ++ hw/usb-ccid.c| 1345 ++ libcaccard/Makefile | 18 + libcaccard/cac.c | 411 + libcaccard/cac.h | 20 + libcaccard/card_7816.c | 780 libcaccard/card_7816.h | 60 ++ libcaccard/card_7816t.h | 163 + libcaccard/config.h | 81 +++ libcaccard/event.c | 112 libcaccard/eventt.h | 28 + libcaccard/link_test.c | 20 + libcaccard/mutex.h | 59 ++ libcaccard/passthru.c| 608 +++ libcaccard/passthru.h| 50 ++ libcaccard/vcard.c | 350 +++ libcaccard/vcard.h | 85 +++ libcaccard/vcard_emul.h | 59 ++ libcaccard/vcard_emul_nss.c | 1147 +++ libcaccard/vcard_emul_type.c | 60 ++ libcaccard/vcard_emul_type.h | 29 + libcaccard/vcardt.h | 66 ++ libcaccard/vevent.h | 26 + libcaccard/vreader.c | 515 libcaccard/vreader.h | 53 ++ libcaccard/vreadert.h| 23 + libcaccard/vscard_common.h | 130 libcaccard/vscclient.c | 710 ++ 36 files changed, 8475 insertions(+), 2 deletions(-) create mode 100644 docs/ccid.txt create mode 100644 docs/libcaccard.txt create mode 100644 hw/ccid-card-emulated.c create mode 100644 hw/ccid-card-passthru.c create mode 100644 hw/ccid.h create mode 100644 hw/usb-ccid.c create mode 100644 libcaccard/Makefile create mode 100644 libcaccard/cac.c create mode 100644 libcaccard/cac.h create mode 100644 libcaccard/card_7816.c create mode 100644 libcaccard/card_7816.h create mode 100644 libcaccard/card_7816t.h create mode 100644 libcaccard/config.h create mode 100644 libcaccard/event.c
[Qemu-devel] [PATCH 0/6] usb-ccid (v8)
This patchset adds three new devices, usb-ccid, ccid-card-passthru and ccid-card-emulated, providing a CCID bus, a simple passthru protocol implementing card requiring a client, and a standalone emulated card. It also introduces a new directory libcaccard with CAC card emulation, CAC is a type of ISO 7816 smart card. v7-v8 changes: * Blue Swirl comments: * usb-ccid: deannonymize some structs * usb-ccid: coding style change - answer_t and bulk_in_t fixed * usb-ccid: handle endianess conversion between guest and host * usb-ccid: s/ccid_bulk_in_copy_out/ccid_bulk_in_copy_to_guest/ * ccid-card-emulated: fix segfault if backend not specified * ccid-card-emulated: let last reader inserted win * libcaccard: remove double vscard_common.h v6-v7 changes: * external libcaccard became internal directory libcaccard * statically link object files into qemu * produce libcaccard.so for usage by external projects * applied coding style to new code (please check me) - did not use the qemu options parsing for libcaccard, since it seems to draw large amounts of qemu code (monitor for instance). v5-v6 changes: * really remove static debug (I apologize for claiming to have done so before) v4-v5 changes: * rebased to latest * remove static debug in card devices * fix --enable-smartcard to link * stall instead of assert when exceeding BULK_OUT_DATA_SIZE * make ccid_reserve_recv_buf for too large len discard message, not exit * make ccid_reserve_recv_buf return void* * fix typo * remove commented code in VMState v3-v4: * remove ccid field in CCIDBus * remove static debug in bus * add back docs v2-v3: * split into bus (usb-ccid.c, uses ccid.h) and card (ccid-card-passthru.c). * removed documentation (being revised). v1-v2: * all QSIMPLEQ turned into fixed sized rings * all allocated buffers turned into fixed size buffers * added migration support * added a message to tell client qemu has migrated to ip:port * for lack of monitor commands ip:port are 0:0, which causes the updated vscclient to connect to one port higher on the same host. will add monitor commands in a separate patch. tested with current setup. Alon Levy (5): usb-ccid: add CCID bus ccid: add passthru card device libcaccard: update configure to build and use internal libcaccard ccid: add ccid-card-emulated device (v2) ccid: add docs Robert Relyea (1): libcaccard: initial commit after coding style fixes Makefile |6 +- Makefile.objs|6 + Makefile.target |2 + configure| 36 ++ docs/ccid.txt| 125 docs/libcaccard.txt | 482 +++ hw/ccid-card-emulated.c | 501 hw/ccid-card-passthru.c | 277 + hw/ccid.h| 34 ++ hw/usb-ccid.c| 1345 ++ libcaccard/Makefile | 18 + libcaccard/cac.c | 411 + libcaccard/cac.h | 20 + libcaccard/card_7816.c | 780 libcaccard/card_7816.h | 60 ++ libcaccard/card_7816t.h | 163 + libcaccard/config.h | 81 +++ libcaccard/event.c | 112 libcaccard/eventt.h | 28 + libcaccard/link_test.c | 20 + libcaccard/mutex.h | 59 ++ libcaccard/passthru.c| 608 +++ libcaccard/passthru.h| 50 ++ libcaccard/vcard.c | 350 +++ libcaccard/vcard.h | 85 +++ libcaccard/vcard_emul.h | 59 ++ libcaccard/vcard_emul_nss.c | 1147 +++ libcaccard/vcard_emul_type.c | 60 ++ libcaccard/vcard_emul_type.h | 29 + libcaccard/vcardt.h | 66 ++ libcaccard/vevent.h | 26 + libcaccard/vreader.c | 515 libcaccard/vreader.h | 53 ++ libcaccard/vreadert.h| 23 + libcaccard/vscard_common.h | 130 libcaccard/vscclient.c | 710 ++ 36 files changed, 8475 insertions(+), 2 deletions(-) create mode 100644 docs/ccid.txt create mode 100644 docs/libcaccard.txt create mode 100644 hw/ccid-card-emulated.c create mode 100644 hw/ccid-card-passthru.c create mode 100644 hw/ccid.h create mode 100644 hw/usb-ccid.c create mode 100644 libcaccard/Makefile create mode 100644 libcaccard/cac.c create mode 100644 libcaccard/cac.h create mode 100644 libcaccard/card_7816.c create mode 100644 libcaccard/card_7816.h create mode 100644 libcaccard/card_7816t.h create mode 100644 libcaccard/config.h create mode 100644 libcaccard/event.c create mode 100644 libcaccard/eventt.h create mode 100644 libcaccard/link_test.c create mode 100644 libcaccard/mutex.h create mode 100644 libcaccard/passthru.c create mode 100644 libcaccard/passthru.h create mode 100644 libcaccard/vcard.c create mode 100644 libcaccard/vcard.h create mode