mmind00 changed the topic of #linux-rockchip to: Rockchip development discussion | public log at https://libera.irclog.whitequark.org/linux-rockchip
stikonas_ is now known as stikonas
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 260 seconds]
kevery1 is now known as kevery
hanetzer has quit [Ping timeout: 260 seconds]
hanetzer has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 240 seconds]
kevery1 is now known as kevery
naoki has joined #linux-rockchip
stikonas has quit [Ping timeout: 240 seconds]
rtp has quit [Server closed connection]
rtp has joined #linux-rockchip
a1batross has joined #linux-rockchip
Daanct12 has joined #linux-rockchip
maz has quit [Server closed connection]
maz has joined #linux-rockchip
npcomp has quit [Server closed connection]
npcomp has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 268 seconds]
kevery1 is now known as kevery
crabbedhaloablut has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 260 seconds]
kevery1 is now known as kevery
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 240 seconds]
kevery1 is now known as kevery
naoki has quit [Quit: naoki]
unkraut has quit [Remote host closed the connection]
mriesch has quit [Server closed connection]
mriesch has joined #linux-rockchip
unkraut has joined #linux-rockchip
qwestion has quit [Server closed connection]
phh has quit [Server closed connection]
phh has joined #linux-rockchip
phh has joined #linux-rockchip
warpme has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 240 seconds]
kevery1 is now known as kevery
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 245 seconds]
kevery1 is now known as kevery
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
diederik has quit [Server closed connection]
diederik has joined #linux-rockchip
mx08 has quit [Ping timeout: 240 seconds]
unkraut has quit [Ping timeout: 268 seconds]
bitstuff has quit [Ping timeout: 240 seconds]
Rayyan has quit [Ping timeout: 240 seconds]
Emantor has quit [Ping timeout: 240 seconds]
bitbang has quit [Ping timeout: 240 seconds]
mx08 has joined #linux-rockchip
Emantor has joined #linux-rockchip
stikonas has joined #linux-rockchip
unkraut has joined #linux-rockchip
bitstuff has joined #linux-rockchip
stikonas has quit [Quit: Konversation terminated!]
Rayyan has joined #linux-rockchip
stikonas has joined #linux-rockchip
bitbang has joined #linux-rockchip
stikonas has quit [Ping timeout: 252 seconds]
chewitt has joined #linux-rockchip
norris has quit [Server closed connection]
norris has joined #linux-rockchip
stikonas has joined #linux-rockchip
Tartarus has quit [Server closed connection]
Tartarus has joined #linux-rockchip
lucaceresoli has quit [Server closed connection]
lucaceresoli has joined #linux-rockchip
sjoerd has quit [Quit: Ping timeout (120 seconds)]
sjoerd has joined #linux-rockchip
warpme has joined #linux-rockchip
paulk has quit [Server closed connection]
paulk has joined #linux-rockchip
cyrozap has quit [Server closed connection]
cyrozap has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Read error: Connection reset by peer]
kevery1 is now known as kevery
linkmauve has quit [Server closed connection]
stikonas has quit [Ping timeout: 240 seconds]
linkmauve has joined #linux-rockchip
psydroid2 has joined #linux-rockchip
stikonas has joined #linux-rockchip
psydroid2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
psydroid2 has joined #linux-rockchip
dsimic has quit [Ping timeout: 240 seconds]
dsimic has joined #linux-rockchip
rembo10_ has quit [Server closed connection]
rembo10 has joined #linux-rockchip
daniels__ has quit [Server closed connection]
daniels__ has joined #linux-rockchip
Net147 has quit [Ping timeout: 258 seconds]
Net147 has joined #linux-rockchip
Net147 has quit [Changing host]
Net147 has joined #linux-rockchip
repk_ has quit [Server closed connection]
repk_ has joined #linux-rockchip
kilobyte_ch has quit [Server closed connection]
stikonas_ has joined #linux-rockchip
kilobyte_ch has joined #linux-rockchip
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> left: [28, 234, 247, 61, 244, 14, 83, 29, 102, 192, 4, 215, 209, 209, 107, 2, 79, 88, 5, 255, 124, 180, 124, 122, 133, 218, 189, 139, 72, 137, 44, 167]
<linkmauve> right: [173, 127, 172, 178, 88, 111, 198, 233, 102, 192, 4, 215, 209, 209, 107, 2, 79, 88, 5, 255, 124, 180, 124, 122, 133, 218, 189, 139, 72, 137, 44, 167]
<linkmauve> assertion `left == right` failed
psydroid has quit [Server closed connection]
<linkmauve> For instance here the first eight bytes have been overwritten by the previous sha1 value.
psydroid has joined #linux-rockchip
<linkmauve> The tests run in parallel, but even when I run them sequentially they fail.
<linkmauve> I don’t exclude issues on my end though.
<linkmauve> But they run fine when using the generic implementations from the kernel.
<linkmauve> sha224 always succeeds, because your driver (or the hardware) doesn’t implement it, but all of the other ones fail, but not all the time.
ldevulder has quit [Read error: No route to host]
ldevulder_ has joined #linux-rockchip
<linkmauve> Hmm, and now it seems to have crashed my kernel or something (at least ssh is unresponsive) after a modprobe.
<linkmauve> Perhaps it’s been a flake, I can’t reproduce.
jakllsch has quit [Ping timeout: 240 seconds]
Perflosopher has quit [Server closed connection]
chewitt has quit [Quit: Zzz..]
Perflosopher has joined #linux-rockchip
<montjoie> linkmauve: thanks for testing, let me know if it happend again
<montjoie> linkmauve: how your user space communcate with kernel ? AF_ALG ?
<linkmauve> Yes.
<linkmauve> I’m not super happy with my API yet, but I can publish the repository if you want.
<linkmauve> montjoie, % git clone https://git.linkmauve.fr/af_alg.git
<linkmauve> Then `cargo test --release`.
<linkmauve> montjoie, I’ve tested on another board of mine, using the sun4i-ss driver, the same userland works there.
<linkmauve> So it really seems like a bug of your driver.
<CounterPillow> or the hardware :P
<linkmauve> Brrrr, scary!
kevery1 has joined #linux-rockchip
fleg has quit [Server closed connection]
fleg_ has joined #linux-rockchip
fleg_ is now known as fleg
kevery has quit [Ping timeout: 260 seconds]
kevery1 is now known as kevery
jakllsch has joined #linux-rockchip
<montjoie> if the IP is good as their RNG, we are damned
<montjoie> I got random hash error in the past, but they was gone
<montjoie> perhaps not really, but it is a long time since I didnt encountered one
<montjoie> good news is that a simple page of zero could perhaps trigger them
<linkmauve> montjoie, even when I use a full page of ¬0 I can reproduce.
<linkmauve> If I use smaller input though, the success rate is much higher.
<linkmauve> See for instance this binary, which uses 2048-sized input: https://linkmauve.fr/files/hashes-5494a9bec5039c43
asriel has quit [Ping timeout: 240 seconds]
asriel has joined #linux-rockchip
<linkmauve> montjoie, ah, I’ve reproduced!
<linkmauve> [ 4017.055316] rk2-crypto fe380000.crypto: DMA timeout
<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. :)
psydroid2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
<linkmauve> The selftests seem to pass.
crabbedhaloablut has quit []
vagrantc has quit [Quit: leaving]