robmur01 has quit [Remote host closed the connection]
stikonas has quit [Ping timeout: 260 seconds]
stikonas_ has quit [Client Quit]
stikonas has joined #linux-rockchip
stikonas has quit [Read error: Connection reset by peer]
stikonas has joined #linux-rockchip
robmur01 has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stikonas has quit [Quit: Konversation terminated!]
stikonas_ has joined #linux-rockchip
stikonas_ is now known as stikonas
stikonas has quit [Quit: Konversation terminated!]
stikonas has joined #linux-rockchip
Kwiboo has quit [Server closed connection]
Kwiboo has joined #linux-rockchip
warpme has joined #linux-rockchip
Helenah has quit [Ping timeout: 248 seconds]
Daanct12 has quit [Quit: WeeChat 4.1.1]
<warpme>
dsimic: indeed this is qll. Cristian's 3588 hdmi work progressing also nicely! (albeit currently it breaks other rk socs. lets hope this will be also addressed soon... )
<dsimic>
things are progressing well
<warpme>
i hope this maybe will make vop3 addion possible....(i spent some time to get mainline working on rk3528. Having clk, pins then SD, USB, Eth working. Also dry dw-hdmi shows-up - but I can't move forward due no vop3 support. I'm too weak in vop to do vop3 port from bsp...)
CounterPillow has quit [Server closed connection]
CounterPillow has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 252 seconds]
kevery1 is now known as kevery
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
macromorgan has quit [Read error: Connection reset by peer]
macromorgan has joined #linux-rockchip
droidrage has quit [Server closed connection]
warpme has joined #linux-rockchip
alpernebbi has quit [Server closed connection]
alpernebbi has joined #linux-rockchip
tucanae47 has quit [Read error: Connection reset by peer]
tucanae47 has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stikonas has quit [Ping timeout: 268 seconds]
stikonas has joined #linux-rockchip
kevery1 has joined #linux-rockchip
stikonas_ has joined #linux-rockchip
stikonas has quit [Ping timeout: 240 seconds]
kevery has quit [Ping timeout: 246 seconds]
kevery1 is now known as kevery
vagrantc has joined #linux-rockchip
sre has quit [Server closed connection]
sre has joined #linux-rockchip
serdarth has quit [Server closed connection]
serdarth has joined #linux-rockchip
stikonas has joined #linux-rockchip
stikonas has quit [Read error: Connection reset by peer]
stikonas_ has quit [Ping timeout: 268 seconds]
stikonas has joined #linux-rockchip
dliviu has quit [Server closed connection]
dliviu has joined #linux-rockchip
stikonas_ has joined #linux-rockchip
stikonas has quit [Ping timeout: 245 seconds]
hl has quit [Server closed connection]
hl has joined #linux-rockchip
stikonas_ is now known as stikonas
<linkmauve>
montjoie, hi, I think I found a bug in your driver, I wrote a small userland program which tests the result of hashing a single page full of zeroes, and comparing it with RustCrypto’s hashes crates, but when I test it with rk_crypto2 loaded it produces corrupted hashes: https://linkmauve.fr/files/hashes-fc178dc98fcedc00
<linkmauve>
---- sha256 stdout ----
<linkmauve>
thread 'sha256' panicked at tests/hashes.rs:36:5:
<linkmauve>
Now every request is super slow, and prints that in dmesg.
<linkmauve>
---- sha1 stdout ----
<linkmauve>
called `Result::unwrap()` on an `Err` value: Errno(-1)
<linkmauve>
thread 'sha1' panicked at tests/hashes.rs:17:33:
<linkmauve>
With approximately 2.02s of delay between two timeouts.
<linkmauve>
I believe doing a rmmod && modprobe of the driver will lock my kernel again, do you want me to try?
<linkmauve>
It happened in the middle of running that test program with 8192-sized input.
<linkmauve>
But the previous one was at 4096.
<montjoie>
I will try to reproduce it on my side, with some debug to see where it fail
<linkmauve>
Ah, how can I enable the debug?
<linkmauve>
I have the _DEBUG config set to y, but it doesn’t print much to dmesg.
<montjoie>
replace dev_dbg by dev_info in drivers/crypto/rockchip/rk2_crypto_ahash.c
<montjoie>
but it will produce log of dmesg logs
minute has quit [Server closed connection]
minute has joined #linux-rockchip
<linkmauve>
Ah, these aren’t pages, they aren’t aligned.
<linkmauve>
If I align to a page, the tests pass.
<linkmauve>
If I align to anything else, it fails.
<linkmauve>
… Sometimes.
<linkmauve>
If I align to a page, but request 8192 instead of 4096, it fails too.
<linkmauve>
So it seems the issue is triggered by hashes requests which span to more than one page.
<montjoie>
that's a good starting point
<linkmauve>
Btw, is there some alignment requirement in the hardware? A previous sha1 driver I wrote some years ago (for the Nintendo Wii and Wii U), which I should finish someday, was requiring blocks to be aligned to 64 B.
<montjoie>
there is some alignement need, but the driver is checking them
<montjoie>
but perhaps there is some extra need I fail to see
<linkmauve>
Does it copy if this isn’t correct, or does it fallback to a software driver?
<montjoie>
if fallback to software
<linkmauve>
But no, the issue isn’t alignment, since it also fails for 8 KiB of data split into two aligned pages.
<montjoie>
the crypto selftest already trigger lot of strange things
<linkmauve>
Ah, I should run it perhaps.
<montjoie>
you need CRYPTO_MANAGER_EXTRA_TESTS
<montjoie>
I need to go, thanks for the report, it seems that I have still lot of work to do...
<linkmauve>
Thanks for your work already!
<linkmauve>
On some especially large input it’s already quite faster than the crypto extensions of the CPU. :)