qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	zhenwei pi <pizhenwei@bytedance.com>,
	Gonglei <arei.gonglei@huawei.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: Re: [PULL 54/54] crypto: Introduce RSA algorithm
Date: Fri, 10 Jun 2022 11:05:13 -0700	[thread overview]
Message-ID: <fff6fbb7-b1be-610d-c48d-0498df879ae2@linaro.org> (raw)
In-Reply-To: <93d111a8-222e-b46f-2f36-1d1784cf0373@amsat.org>

On 6/10/22 08:55, Philippe Mathieu-Daudé wrote:
> On 10/6/22 09:59, Michael S. Tsirkin wrote:
>> From: zhenwei pi <pizhenwei@bytedance.com>
>> +static int cryptodev_builtin_set_rsa_options(
>> +                    int virtio_padding_algo,
>> +                    int virtio_hash_algo,
>> +                    QCryptoAkCipherOptionsRSA *opt,
>> +                    Error **errp)
>> +{
>> +    if (virtio_padding_algo == VIRTIO_CRYPTO_RSA_PKCS1_PADDING) {
>> +        opt->padding_alg = QCRYPTO_RSA_PADDING_ALG_PKCS1;
>> +        opt->hash_alg =
>> +            cryptodev_builtin_get_rsa_hash_algo(virtio_hash_algo, errp);
>> +        if (opt->hash_alg < 0) {
>> +            return -1;
>> +        }
>> +        return 0;
>> +    }
>> +
>> +    if (virtio_padding_algo == VIRTIO_CRYPTO_RSA_RAW_PADDING) {
>> +        opt->padding_alg = QCRYPTO_RSA_PADDING_ALG_RAW;
>> +        return 0;
>> +    }
>> +
>> +    error_setg(errp, "Unsupported rsa padding algo: %d", virtio_padding_algo);
>> +    return -1;
>> +}
> 
> Build failure:
> 
> ../backends/cryptodev-builtin.c:187:27: error: result of comparison of unsigned enum 
> expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare]
>          if (opt->hash_alg < 0) {
>              ~~~~~~~~~~~~~ ^ ~

Yep, e.g.

https://gitlab.com/qemu-project/qemu/-/jobs/2574418442


r~


  reply	other threads:[~2022-06-10 18:07 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10  7:56 [PULL 00/54] virtio,pc,pci: fixes,cleanups,features Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 01/54] acpi: add interface to build device specific AML Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 02/54] acpi: make isa_build_aml() support AcpiDevAmlIf interface Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 03/54] acpi: fdc-isa: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 04/54] acpi: parallel port: " Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 05/54] acpi: serial-is: " Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 06/54] acpi: mc146818rtc: " Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 07/54] acpi: pckbd: " Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 08/54] isa-bus: drop no longer used ISADeviceClass::build_aml Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 09/54] tests: acpi: add and whitelist DSDT.ipmismbus expected blob Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 10/54] tests: acpi: q35: add test for smbus-ipmi device Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 11/54] tests: acpi: update expected blob DSDT.ipmismbus Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 12/54] tests: acpi: whitelist DSDT.ipmismbus expected blob Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 13/54] ipmi: acpi: use relative path to resource source Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 14/54] tests: acpi: update expected DSDT.ipmismbus blob Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 15/54] acpi: ich9-smb: add support for AcpiDevAmlIf interface Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 16/54] acpi: ipmi: use AcpiDevAmlIf interface to build IPMI device descriptors Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 17/54] q35: acpi: drop not needed PCMachineClass::do_not_add_smb_acpi Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 18/54] tests: acpi: white-list to be re-factored pc/q35 DSDT Michael S. Tsirkin
2022-06-10  7:57 ` [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors Michael S. Tsirkin
2023-03-28 12:58   ` Fiona Ebner
2023-03-30  8:22     ` Igor Mammedov
2023-03-30 11:58       ` Fiona Ebner
2023-04-12 12:18         ` Igor Mammedov
2023-04-13 10:32           ` Fiona Ebner
2023-04-13 11:46             ` Mike Maslenkin
2023-04-13 12:09               ` Fiona Ebner
2023-04-14  0:07                 ` Mike Maslenkin
2023-04-14  7:19                   ` Fiona Ebner
2022-06-10  7:58 ` [PULL 20/54] acpi: q35: " Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 21/54] tests: acpi: update expected blobs Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 22/54] tests: acpi: add and white-list DSDT.applesmc expected blob Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 23/54] tests: acpi: add applesmc testcase Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 24/54] acpi: applesmc: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 25/54] tests: acpi: update expected blobs Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 26/54] tests: acpi: white-lists expected DSDT.pvpanic-isa blob Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 27/54] tests: acpi: add pvpanic-isa: testcase Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 28/54] acpi: pvpanic-isa: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 29/54] tests: acpi: update expected DSDT.pvpanic-isa blob Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 30/54] tests: acpi: white-list DSDT.tis.tpm2/DSDT.tis.tpm12 expected blobs Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 31/54] acpi: pc/q35: tpm-tis: fix TPM device scope Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 32/54] acpi: pc/q35: remove not needed 'if' condition on pci bus Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 33/54] acpi: tpm-tis: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 34/54] tests: acpi: update expected DSDT.tis.tpm2/DSDT.tis.tpm12 blobs Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 35/54] x86: acpi-build: do not include hw/isa/isa.h directly Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 36/54] hw/cxl: Make the CXL fixed memory window setup a machine parameter Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 37/54] hw/acpi/cxl: Pass in the CXLState directly rather than MachineState Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 38/54] hw/cxl: Push linking of CXL targets into i386/pc rather than in machine.c Michael S. Tsirkin
2022-06-10  7:58 ` [PULL 39/54] tests/acpi: Allow modification of q35 CXL CEDT table Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 40/54] pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 41/54] tests/acpi: Update q35/CEDT.cxl for new memory addresses Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 42/54] hw/cxl: Move the CXLState from MachineState to machine type specific state Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 43/54] hw/machine: Drop cxl_supported flag as no longer useful Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 44/54] pci: fix overflow in snprintf string formatting Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 45/54] hw/cxl: Fix missing write mask for HDM decoder target list registers Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 46/54] hw/acpi/viot: rename build_pci_range_node() to enumerate_pci_host_bridges() Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 47/54] hw/acpi/viot: move the individual PCI host bridge entry generation to a new function Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 48/54] hw/acpi/viot: build array of PCI host bridges before generating VIOT ACPI table Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 49/54] tests/acpi: virt: allow VIOT acpi table changes Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 50/54] hw/acpi/viot: sort VIOT ACPI table entries by PCI host bridge min_bus Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 51/54] tests/acpi: virt: update golden masters for VIOT Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 52/54] hw/virtio/vhost-user: don't use uninitialized variable Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 53/54] hw/vhost-user-scsi|blk: set `supports_config` flag correctly Michael S. Tsirkin
2022-06-10  7:59 ` [PULL 54/54] crypto: Introduce RSA algorithm Michael S. Tsirkin
2022-06-10 15:55   ` Philippe Mathieu-Daudé via
2022-06-10 18:05     ` Richard Henderson [this message]
2022-06-11  0:35       ` Michael S. Tsirkin
2022-06-11  6:17         ` Richard Henderson
2022-06-11  2:03       ` zhenwei pi
2022-06-11  0:29     ` Michael S. Tsirkin
2022-07-14  9:16 ` [PULL 00/54] virtio,pc,pci: fixes,cleanups,features Peter Maydell
2022-07-14 11:41   ` Igor Mammedov
2022-07-14 16:09     ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fff6fbb7-b1be-610d-c48d-0498df879ae2@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=arei.gonglei@huawei.com \
    --cc=f4bug@amsat.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pizhenwei@bytedance.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).