Monday, 2022-05-02

*** tpb <[email protected]> has joined #openrisc00:00
*** knz <knz!~kena@2001:41d0:a:f6e9::1> has quit IRC (*.net *.split)04:28
*** knz <knz!~kena@2001:41d0:a:f6e9::1> has joined #openrisc04:28
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)05:05
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc05:15
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)16:01
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc16:04
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)16:47
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc17:05
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)19:17
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc19:18
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)19:47
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc19:47
shornezx2c4: ok, let me look at the math test failing, adding a second uart should be relatively easy, could you use a network interface instead why uart?20:32
zx2c4shorne: network interface not a viable option20:33
zx2c4also: openrisc is the only platform that doesnt enable me to add a second serial port20:33
zx2c4(since it doesnt have pci/mmio/virtio/etc)20:33
shorneI was actaully planning to add a virtio platform for the or1k target in qemu,  I got side tracked with a verilog bug though20:34
shorneIt might be a better option than to add it to the or1ksim platform20:38
zx2c4so long as it can work with VIRTIO_MMIO, works for me20:40
zx2c4shorne: specifically, https://א.cc/zB5uLaoi/diff is the change that should be required to use it20:41
shorneI see20:43
zx2c4alternativly, just add support for a second `-serial ...` -- seems like way less work :)20:43
zx2c4i can probably write the qemu patch for that myself20:43
zx2c4maybe ill do that when im back home tonight20:44
zx2c4the arithmetic bug, otoh, is way more concerning... and i dont know how to fix that20:44
shorneI tried to reproduce it, so far I don't see anything popping up for the curve25519 tests20:46
shorneI see thing like20:46
shorne[   11.050000] alg: self-tests for drbg_pr_hmac_sha256 (stdrng) failed (rc=-22)20:46
zx2c4sounds like that's another one?20:49
zx2c4might want to make sure youre actually running the tests...20:49
zx2c4shorne: https://א.cc/ijLK3IfJ/diff with something like that20:50
shornehttps://gist.github.com/stffrdhrn/a7add7242658679c8b7c943de345fb8120:50
shorneyeah, it might not be running the curve25519 test, I tried to make sure I enabled that one20:51
zx2c4shorne: https://א.cc/nQVjoFMu20:51
zx2c4shorne: enable CONFIG_WIREGUARD=y20:51
zx2c4https://א.cc/qmm8zCf4 differen tests fail on different runs20:52
zx2c4usually the failures are exactly a second apart...20:52
zx2c4so likely interrupt related20:52
zx2c4https://א.cc/VcD46tal 20:53
zx2c4https://א.cc/oONXmISR20:53
zx2c4https://א.cc/8yXAsXTX20:54
zx2c4anyway you get the idea20:54
shorneI see, yes, I am not hitting even the printf, Ill have to look at that20:54
shorneit is compiling the curve25519-selftest.o but not sure why its not running20:55
shorneI need to go20:55
zx2c4shorne: do not enable CONFIG_CRYPTO_MANAGER_DISABLE_TESTS20:56
zx2c4and make sure CONFIG_WIREGUARD=y, not =m20:56
shorneok I see [    0.230000] SARU running 25519 tests20:57
shornebut no failures20:57
zx2c4shorne: cool. Now run it a bunch of times20:58
zx2c4https://xn--4db.cc/JZujg1aZ here's a config file that im using20:58
zx2c4-cpu or1200 -machine or1k-sim -smp 1 -m 256M 20:59
zx2c4no initramfs, so using https://א.cc/rHI6JaCF/diff20:59
zx2c4using this compiler https://musl.cc/or1k-linux-musl-cross.tgz21:00
shornezx2c4: ok, I fixed the sha256 error, it was just because I didnt turn on hmac(sha256)22:32
shorneok, I will try to reproduce with what you have, then check the diff,  I am using this compiler: https://github.com/openrisc/or1k-gcc/releases/tag/or1k-12.0.1-20220210-2022030422:35
shornethe or1k-linux- build22:36
shorneI tried the musl toolchain, and tried rebooting qemu several times but cannot reproduce22:47
shorneI am using qemu with external initrd22:48
shorneQEMU emulator version 6.2.50 (v6.2.0-1769-g94c71f14e9-dirty)22:48
shorneqemu-system-or1k -cpu or1200 -M or1k-sim -kernel /home/shorne/work/linux/vmlinux -initrd /home/shorne/work/linux/initramfs.cpio.gz -serial mon:stdio -nographic -gdb tcp::10001 -m 6422:48
shornelet me try with your exact settings, I don't think it should be much different22:48
zx2c4shorne: im using qemu 722:53
zx2c4i can also repro with master22:53
zx2c4shorne: just emailed you the shutdown/reboot patch for qemu22:53
zx2c4now gonna work on serial port22:53
shornethe patch looks fine, ill try to reproduce after updating qemu22:58
shorneI might not have a lot of time left today, have a meeting now, then have to drive22:58
shornethanks for helping22:58
zx2c4aw darn23:02
zx2c4shorne: okay i emailed ya the serial port thing too23:21
zx2c4https://git.zx2c4.com/wireguard-linux/commit/?h=jd/openrisc23:22
tpbTitle: wireguard-linux - WireGuard for the Linux kernel (at git.zx2c4.com)23:22
zx2c4shorne: i cant reproduce the arithmetic error with CONFIG_PREEMPT23:32
zx2c4shorne: i cant reproduce the arithmetic error with CONFIG_PREEMPT_NONE=y, i mean23:32
zx2c4I can reproduce it with CONFIG_PREMPT=y23:32
zx2c4so maybe the interrupt code is wrong23:32
zx2c4some registers not being restored right23:32
zx2c4Another data point, I am unable to reproduce with CONFIG_SMP=y23:43
zx2c4so, this requires CONFIG_PREEMPTION=y and CONFIG_SMP=n23:43
zx2c4so this looks like a kernel bug23:43

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!