All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Huang <huangtao@rock-chips.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Heiko Stuebner <heiko@sntech.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Zain Wang <wzz@rock-chips.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-rockchip@lists.infradead.org,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE" 
	<linux-crypto@vger.kernel.org>, Olof Johansson <olof@lixom.net>,
	ezequiel@collabora.com,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Zhang Zhijie <zhangzj@rock-chips.com>
Subject: Re: [Bug] Rockchip crypto driver sometimes produces wrong ciphertext
Date: Mon, 28 Jan 2019 11:14:32 +0800	[thread overview]
Message-ID: <f7a0d04c-339e-d9f8-7188-a27d55ad8b4d@rock-chips.com> (raw)
In-Reply-To: <1894799.pWIprST79S@phil>

Hi Eric and Heiko:

>> On Sat, 26 Jan 2019 at 22:05, Eric Biggers <ebiggers@kernel.org> wrote:
>>>
>>> Hello,
>>>
>>> I don't know whether anyone is actually maintaining the Rockchip crypto driver
>>> in drivers/crypto/rockchip/, but it's failing the improved crypto tests
>>> that I currently have out for review: https://patchwork.kernel.org/cover/10778089/

Zhang Zhijie, engineer from Rockchip, will try to fix this software bug.

>>>
>>> See the boot logs for RK3288 from the KernelCI job here:
>>>
>>> https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-rock2-square.txt
>>> https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-veyron-jaq.txt
>>>
>>> alg: skcipher: ecb-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: use_digest src_divs=[15.64%@+3258, 84.36%@+4059] dst_divs=[69.11%@+1796, 8.49%@+4027, 6.34%@+1, 16.6%@+4058] iv_offset=21\"
>>> alg: skcipher: cbc-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@alignmask+3993] dst_divs=[65.31%@alignmask+1435, 34.69%@+14]\"
>>> alg: skcipher: ecb-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_final src_divs=[<flush> 66.52%@+11, 33.48%@+1519] dst_divs=[58.82%@+1, 19.43%@+4082, 21.75%@+8]\"
>>> alg: skcipher: cbc-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_finup src_divs=[100.0%@+3980] dst_divs=[60.4%@+3763, 23.9%@+4011, 16.87%@+4046]\"
>>> alg: skcipher: ecb-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@+4] dst_divs=[47.25%@+19, 14.83%@+22, 37.92%@+31]\"
>>> alg: skcipher: cbc-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"two even aligned splits\"
>>>
>>> In other words: the ecb-aes-rk, cbc-aes-rk, ecb-des-rk, cbc-des-rk,
>>> ecb-des3-ede-rk, and cbc-des3-ede-rk algorithms are failing because they produce
>>> the wrong ciphertext on some scatterlist layouts.
>>>
>>> You can reproduce by pulling from
>>> https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
>>> branch "testmgr-improvements", unsetting CONFIG_CRYPTO_MANAGER_DISABLE_TESTS,
>>> setting CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y, rebooting and checking dmesg.
>>>
>>> Note that I don't have this hardware myself, so if it turns out that no one is
>>> interested in fixing this anytime soon I'll instead have to propose disabling
>>> these algorithms until they can be fixed.
>>>
>>> Thanks,
>>>
>>> - Eric
>>
> 



WARNING: multiple messages have this Message-ID (diff)
From: Tao Huang <huangtao@rock-chips.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Zain Wang <wzz@rock-chips.com>, Heiko Stuebner <heiko@sntech.de>,
	Arnd Bergmann <arnd@arndb.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Zhang Zhijie <zhangzj@rock-chips.com>,
	linux-rockchip@lists.infradead.org,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
	<linux-crypto@vger.kernel.org>, Olof Johansson <olof@lixom.net>,
	ezequiel@collabora.com,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [Bug] Rockchip crypto driver sometimes produces wrong ciphertext
Date: Mon, 28 Jan 2019 11:14:32 +0800	[thread overview]
Message-ID: <f7a0d04c-339e-d9f8-7188-a27d55ad8b4d@rock-chips.com> (raw)
In-Reply-To: <1894799.pWIprST79S@phil>

Hi Eric and Heiko:

>> On Sat, 26 Jan 2019 at 22:05, Eric Biggers <ebiggers@kernel.org> wrote:
>>>
>>> Hello,
>>>
>>> I don't know whether anyone is actually maintaining the Rockchip crypto driver
>>> in drivers/crypto/rockchip/, but it's failing the improved crypto tests
>>> that I currently have out for review: https://patchwork.kernel.org/cover/10778089/

Zhang Zhijie, engineer from Rockchip, will try to fix this software bug.

>>>
>>> See the boot logs for RK3288 from the KernelCI job here:
>>>
>>> https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-rock2-square.txt
>>> https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-veyron-jaq.txt
>>>
>>> alg: skcipher: ecb-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: use_digest src_divs=[15.64%@+3258, 84.36%@+4059] dst_divs=[69.11%@+1796, 8.49%@+4027, 6.34%@+1, 16.6%@+4058] iv_offset=21\"
>>> alg: skcipher: cbc-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@alignmask+3993] dst_divs=[65.31%@alignmask+1435, 34.69%@+14]\"
>>> alg: skcipher: ecb-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_final src_divs=[<flush> 66.52%@+11, 33.48%@+1519] dst_divs=[58.82%@+1, 19.43%@+4082, 21.75%@+8]\"
>>> alg: skcipher: cbc-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_finup src_divs=[100.0%@+3980] dst_divs=[60.4%@+3763, 23.9%@+4011, 16.87%@+4046]\"
>>> alg: skcipher: ecb-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@+4] dst_divs=[47.25%@+19, 14.83%@+22, 37.92%@+31]\"
>>> alg: skcipher: cbc-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"two even aligned splits\"
>>>
>>> In other words: the ecb-aes-rk, cbc-aes-rk, ecb-des-rk, cbc-des-rk,
>>> ecb-des3-ede-rk, and cbc-des3-ede-rk algorithms are failing because they produce
>>> the wrong ciphertext on some scatterlist layouts.
>>>
>>> You can reproduce by pulling from
>>> https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
>>> branch "testmgr-improvements", unsetting CONFIG_CRYPTO_MANAGER_DISABLE_TESTS,
>>> setting CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y, rebooting and checking dmesg.
>>>
>>> Note that I don't have this hardware myself, so if it turns out that no one is
>>> interested in fixing this anytime soon I'll instead have to propose disabling
>>> these algorithms until they can be fixed.
>>>
>>> Thanks,
>>>
>>> - Eric
>>
> 

WARNING: multiple messages have this Message-ID (diff)
From: Tao Huang <huangtao@rock-chips.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Zain Wang <wzz@rock-chips.com>, Heiko Stuebner <heiko@sntech.de>,
	Arnd Bergmann <arnd@arndb.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Zhang Zhijie <zhangzj@rock-chips.com>,
	linux-rockchip@lists.infradead.org,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
	<linux-crypto@vger.kernel.org>, Olof Johansson <olof@lixom.net>,
	ezequiel@collabora.com,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [Bug] Rockchip crypto driver sometimes produces wrong ciphertext
Date: Mon, 28 Jan 2019 11:14:32 +0800	[thread overview]
Message-ID: <f7a0d04c-339e-d9f8-7188-a27d55ad8b4d@rock-chips.com> (raw)
In-Reply-To: <1894799.pWIprST79S@phil>

Hi Eric and Heiko:

>> On Sat, 26 Jan 2019 at 22:05, Eric Biggers <ebiggers@kernel.org> wrote:
>>>
>>> Hello,
>>>
>>> I don't know whether anyone is actually maintaining the Rockchip crypto driver
>>> in drivers/crypto/rockchip/, but it's failing the improved crypto tests
>>> that I currently have out for review: https://patchwork.kernel.org/cover/10778089/

Zhang Zhijie, engineer from Rockchip, will try to fix this software bug.

>>>
>>> See the boot logs for RK3288 from the KernelCI job here:
>>>
>>> https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-rock2-square.txt
>>> https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-veyron-jaq.txt
>>>
>>> alg: skcipher: ecb-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: use_digest src_divs=[15.64%@+3258, 84.36%@+4059] dst_divs=[69.11%@+1796, 8.49%@+4027, 6.34%@+1, 16.6%@+4058] iv_offset=21\"
>>> alg: skcipher: cbc-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@alignmask+3993] dst_divs=[65.31%@alignmask+1435, 34.69%@+14]\"
>>> alg: skcipher: ecb-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_final src_divs=[<flush> 66.52%@+11, 33.48%@+1519] dst_divs=[58.82%@+1, 19.43%@+4082, 21.75%@+8]\"
>>> alg: skcipher: cbc-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_finup src_divs=[100.0%@+3980] dst_divs=[60.4%@+3763, 23.9%@+4011, 16.87%@+4046]\"
>>> alg: skcipher: ecb-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@+4] dst_divs=[47.25%@+19, 14.83%@+22, 37.92%@+31]\"
>>> alg: skcipher: cbc-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"two even aligned splits\"
>>>
>>> In other words: the ecb-aes-rk, cbc-aes-rk, ecb-des-rk, cbc-des-rk,
>>> ecb-des3-ede-rk, and cbc-des3-ede-rk algorithms are failing because they produce
>>> the wrong ciphertext on some scatterlist layouts.
>>>
>>> You can reproduce by pulling from
>>> https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
>>> branch "testmgr-improvements", unsetting CONFIG_CRYPTO_MANAGER_DISABLE_TESTS,
>>> setting CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y, rebooting and checking dmesg.
>>>
>>> Note that I don't have this hardware myself, so if it turns out that no one is
>>> interested in fixing this anytime soon I'll instead have to propose disabling
>>> these algorithms until they can be fixed.
>>>
>>> Thanks,
>>>
>>> - Eric
>>
> 



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-01-28  3:22 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-26 21:05 [Bug] Rockchip crypto driver sometimes produces wrong ciphertext Eric Biggers
2019-01-26 21:05 ` Eric Biggers
2019-01-27  8:54 ` Ard Biesheuvel
2019-01-27  8:54   ` Ard Biesheuvel
2019-01-27  8:54   ` Ard Biesheuvel
2019-01-27 10:29   ` Heiko Stuebner
2019-01-27 10:29     ` Heiko Stuebner
2019-01-27 10:29     ` Heiko Stuebner
2019-01-28  3:14     ` Tao Huang [this message]
2019-01-28  3:14       ` Tao Huang
2019-01-28  3:14       ` Tao Huang
2019-03-15  3:31       ` Eric Biggers
2019-03-15  3:31         ` Eric Biggers
2019-03-15  3:31         ` Eric Biggers
2019-03-16 22:31         ` Ezequiel Garcia
2019-03-16 22:31           ` Ezequiel Garcia
2019-03-16 22:31           ` Ezequiel Garcia
2019-03-18 15:03           ` Gael PORTAY
2019-03-18 15:03             ` Gael PORTAY
2019-03-18 15:03             ` Gael PORTAY
2019-03-21 17:04             ` Gael PORTAY
2019-03-21 17:04               ` Gael PORTAY
2019-03-25  6:31               ` Zhang Zhijie
2019-03-25  6:31                 ` Zhang Zhijie
2019-04-04 13:41         ` Pascal Van Leeuwen
2019-04-04 13:41           ` Pascal Van Leeuwen
2019-04-04 13:41           ` Pascal Van Leeuwen
2019-04-04 17:12           ` Eric Biggers
2019-04-04 17:12             ` Eric Biggers
2019-04-04 17:12             ` Eric Biggers
2019-04-07 12:42             ` Herbert Xu
2019-04-07 12:42               ` Herbert Xu
2019-04-07 12:42               ` Herbert Xu
2019-04-07 19:12               ` Pascal Van Leeuwen
2019-04-07 19:12                 ` Pascal Van Leeuwen
2019-04-07 19:12                 ` Pascal Van Leeuwen
2019-04-08  5:58                 ` Herbert Xu
2019-04-08  5:58                   ` Herbert Xu
2019-04-08  5:58                   ` Herbert Xu
2019-04-08  8:59                   ` Pascal Van Leeuwen
2019-04-08  8:59                     ` Pascal Van Leeuwen
2019-04-08  8:59                     ` Pascal Van Leeuwen
2019-04-08  9:06                     ` Herbert Xu
2019-04-08  9:06                       ` Herbert Xu
2019-04-08  9:06                       ` Herbert Xu
2019-04-09 15:53                       ` Pascal Van Leeuwen
2019-04-09 15:53                         ` Pascal Van Leeuwen
2019-04-09 15:53                         ` Pascal Van Leeuwen
2019-04-08 18:09                     ` Eric Biggers
2019-04-08 18:09                       ` Eric Biggers
2019-04-08 18:09                       ` Eric Biggers
2019-04-09 16:43                       ` Pascal Van Leeuwen
2019-04-09 16:43                         ` Pascal Van Leeuwen
2019-04-09 16:43                         ` Pascal Van Leeuwen
2019-04-08 18:27                 ` Eric Biggers
2019-04-08 18:27                   ` Eric Biggers
2019-04-08 18:27                   ` Eric Biggers
2019-04-08 21:17                   ` Ard Biesheuvel
2019-04-08 21:17                     ` Ard Biesheuvel
2019-04-08 21:17                     ` Ard Biesheuvel
2019-04-09 16:58                   ` Pascal Van Leeuwen
2019-04-09 16:58                     ` Pascal Van Leeuwen
2019-04-09 16:58                     ` Pascal Van Leeuwen
2019-03-21 10:46 ` [Bug] STM32 crc driver failed on selftest 1 Lionel DEBIEVE
2019-03-21 13:41   ` Eric Biggers

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=f7a0d04c-339e-d9f8-7188-a27d55ad8b4d@rock-chips.com \
    --to=huangtao@rock-chips.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=ebiggers@kernel.org \
    --cc=ezequiel@collabora.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=olof@lixom.net \
    --cc=wzz@rock-chips.com \
    --cc=zhangzj@rock-chips.com \
    /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.