qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 13/24] linux-user: Call qcrypto_init if not u


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v4 13/24] linux-user: Call qcrypto_init if not using -seed
Date: Tue, 7 May 2019 21:11:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 5/7/19 7:13 AM, Laurent Vivier wrote:
>> -    if (seed_optarg != NULL) {
>> -        qemu_guest_random_seed_main(seed_optarg, &error_fatal);
>> +    {
>> +        Error *err = NULL;
>> +        if (seed_optarg != NULL) {
>> +            qemu_guest_random_seed_main(seed_optarg, &err);
>> +        } else {
>> +            /* ??? Assumes qcrypto is only used by qemu_guest_getrandom.  */
> 
> perhaps you can add a qemu_guest_random_init() function close to this
> assumption to call qcrypto_init()? So we will not forget to change this if we
> use something else in the future.

I'm not sure what you're suggesting.

Why would putting qcrypto_init within qemu_guest_random_init make it more
likely that, if something else within linux-user required qcrypto routines, we
would remember to remove qemu_guest_random_init and call qcrypto_init exactly 
once?


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]