All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Jungmin Park <pjm0616@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: Re: [PATCH] crypto/luks: Support creating LUKS image on Darwin
Date: Wed, 24 Aug 2022 13:53:07 +0100	[thread overview]
Message-ID: <YwYfM41JIb1VW457@redhat.com> (raw)
In-Reply-To: <20220824123705.2084720-1-pjm0616@gmail.com>

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	other threads:[~2022-08-24 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 12:37 [PATCH] crypto/luks: Support creating LUKS image on Darwin Jungmin Park
2022-08-24 12:53 ` Daniel P. Berrangé [this message]

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=YwYfM41JIb1VW457@redhat.com \
    --to=berrange@redhat.com \
    --cc=pjm0616@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.