qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] crypto/luks: Support creating LUKS image on Darwin


From: Daniel P . Berrangé
Subject: Re: [PATCH] crypto/luks: Support creating LUKS image on Darwin
Date: Wed, 24 Aug 2022 13:53:07 +0100
User-agent: Mutt/2.2.6 (2022-06-05)

On Wed, Aug 24, 2022 at 09:37:06PM +0900, Jungmin Park wrote:
> When the user creates a LUKS-encrypted qcow2 image using the qemu-img
> program, the passphrase is hashed using PBKDF2 with a dynamic
> number of iterations. The number of iterations is determined by
> measuring thread cpu time usage, such that it takes approximately
> 2 seconds to compute the hash.
> 
> Because Darwin doesn't implement getrusage(RUSAGE_THREAD), we get an
> error message:
> > qemu-img: test.qcow2: Unable to calculate thread CPU usage on this platform
> for this command:
> > qemu-img create --object secret,id=key,data=1234 -f qcow2 -o 
> > 'encrypt.format=luks,encrypt.key-secret=key' test.qcow2 100M
> 
> This patch implements qcrypto_pbkdf2_get_thread_cpu() for Darwin so that
> the above command works.
> 
> Signed-off-by: Jungmin Park <pjm0616@gmail.com>
> ---
>  crypto/pbkdf.c | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Afraid this is too late to get into 7.1 release, but I'll queue it for
the next dev cycle.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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