From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Peter Maydell <peter.maydell@linaro.org>
Cc: qemu devel list <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Drew Jones <drjones@redhat.com>, Alexander Graf <agraf@suse.de>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write()
Date: Wed, 31 Dec 2014 19:26:44 +0100 [thread overview]
Message-ID: <54A43FE4.9040102@redhat.com> (raw)
In-Reply-To: <CAKv+Gu_XKwPbQ6UNj7YvLRKV-9BEux7DpJT7XhuE2tHnXB4MOA@mail.gmail.com>
On 12/31/14 19:08, Ard Biesheuvel wrote:
> On 31 December 2014 at 17:37, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 31 December 2014 at 17:17, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> One thing I did notice in the dmesg:
>>>
>>> [ 35.798423] alg: hash: Test 1 failed for sha1-ce
>>> [ 35.799135] 00000000: d3 5b 9a 85 7f 18 48 21 97 5c 12 72 a8 96 62 88
>>> [ 35.799815] 00000010: c3 d2 e1 f0
>>> [ 35.807121] alg: hash: Test 1 failed for sha224-ce
>>> [ 35.807458] 00000000: 75 49 49 85 18 97 6f 0c a7 d3 c3 ee 54 5d b3 59
>>> [ 35.807910] 00000010: a0 97 b3 34 f8 9c ab c1 91 e1 24 9e
>>> [ 35.814059] alg: hash: Test 1 failed for sha256-ce
>>> [ 35.814450] 00000000: b9 cb b3 d4 f5 29 fa 2c 8f 9b 8e 67 e9 6d 24 9b
>>> [ 35.814897] 00000010: 83 da e8 b1 ba 32 6c bb 4e 53 77 76 fc 11 e4 aa
>>> [ 35.827619] alg: cipher: Test 1 failed on encryption for aes-ce
>>> [ 35.828042] 00000000: ba 4a ec ea df 05 7d 76 56 af 92 77 5d 00 e0 90
>>>
>>> ...does that happen on little endian TCG hosts too, or do we have
>>> a bug in our encryption emulation?
>>
>> It doesn't happen on LE TCG hosts. Joy :-)
>>
>
> I will need to find out first if this is the kernel driver or the
> emulation failing. I never tested the former on BE, as the models
> don't support the crypto extensions (at least, not without a plugin
> that I don't have access to) and the actual hardware boots via EFI
> which is LE only, and with no 'ground truth' as a reference, it is
> hard to be 100% certain both implementations are in spec, even if they
> work in combination.
>
> The SHA emulation code only operates on 32-bit quantities, and the
> only memory access it does is populating the CRYPTO_STATE union using
> float64_val(). Does anyone feel there is anything obviously wrong with
> that?
I'm not sure, but I seem to recall that Peter said that TCG held all the
virtual registers in host-endianness.
Laszlo
next prev parent reply other threads:[~2014-12-31 18:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-31 11:21 [Qemu-devel] [PATCH] fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write() Laszlo Ersek
2014-12-31 13:20 ` Paolo Bonzini
2014-12-31 14:07 ` Laszlo Ersek
2014-12-31 15:17 ` Peter Maydell
2014-12-31 16:23 ` Paolo Bonzini
2014-12-31 17:04 ` Laszlo Ersek
2014-12-31 17:56 ` Paolo Bonzini
2014-12-31 17:29 ` Peter Maydell
2014-12-31 19:25 ` Paolo Bonzini
2014-12-31 19:32 ` Laszlo Ersek
2014-12-31 16:27 ` Laszlo Ersek
2014-12-31 17:17 ` Peter Maydell
2014-12-31 17:37 ` Peter Maydell
2014-12-31 17:59 ` Laszlo Ersek
2014-12-31 18:08 ` Ard Biesheuvel
2014-12-31 18:25 ` Peter Maydell
2015-01-01 10:27 ` Ard Biesheuvel
2014-12-31 18:26 ` Laszlo Ersek [this message]
2014-12-31 17:44 ` Peter Maydell
2014-12-31 17:58 ` Laszlo Ersek
2014-12-31 18:22 ` Laszlo Ersek
2015-01-05 15:24 ` Peter Maydell
2015-01-05 15:33 ` Laszlo Ersek
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=54A43FE4.9040102@redhat.com \
--to=lersek@redhat.com \
--cc=agraf@suse.de \
--cc=ard.biesheuvel@linaro.org \
--cc=drjones@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).