*** tpb <[email protected]> has joined #openrisc | 00:00 | |
*** zx2c4 <zx2c4!sid204921@gentoo/developer/zx2c4> has joined #openrisc | 00:00 | |
zx2c4 | shorne: hey! | 00:00 |
---|---|---|
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 00:15 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 00:19 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 04:16 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 04:23 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 06:28 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 06:31 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 06:49 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 07:02 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 08:05 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 11:08 | |
shorne | zx2c4: hello | 12:06 |
zx2c4 | shorne: howdy! | 12:06 |
zx2c4 | as you can see, i've been quite busy with openrisc stuff :) | 12:07 |
zx2c4 | nearly managed to get the wireguard test suite CI ported to it, so that it runs on every commit on build.wireguard.com | 12:07 |
shorne | nice | 12:07 |
shorne | zx2c4: yeah, it seems you have been busy | 12:07 |
shorne | Are you mainly doing this on openrisc? or all platforms? | 12:08 |
zx2c4 | btw, in light of my reply to https://lore.kernel.org/lkml/[email protected]/ do you think you can Ack that? | 12:08 |
tpb | Title: [PATCH v6 11/17] openrisc: use fallback for random_get_entropy() instead of zero - Jason A. Donenfeld (at lore.kernel.org) | 12:08 |
zx2c4 | well the other platforms were easy... OpenRISC is the one that's required work | 12:08 |
shorne | I am doing another reply | 12:08 |
shorne | maybe we can discuss here | 12:08 |
zx2c4 | shorne: ahh and it's not a simple Ack? | 12:08 |
zx2c4 | we can just discuss it here, yea | 12:08 |
zx2c4 | you still object? | 12:08 |
shorne | the main thing I was thinking is that patch 6 just sets: | 12:08 |
shorne | #define random_get_entropy() ((unsigned long)get_cycles()) | 12:08 |
zx2c4 | yes. this is intentional | 12:08 |
zx2c4 | the fallback code should _not_ have that branch | 12:09 |
shorne | but it seems all architectures are defining random_get_entropy now | 12:09 |
shorne | are there any that are not? | 12:09 |
zx2c4 | no, many are not | 12:09 |
zx2c4 | yes | 12:09 |
zx2c4 | the bulk of that patchset is me getting rid of `#define get_cycles() (0)` from various archs | 12:10 |
zx2c4 | so that it can hit the fallback code | 12:10 |
shorne | yes so they will hit: | 12:10 |
shorne | #define random_get_entropy() random_get_entropy_fallback() | 12:10 |
zx2c4 | yes. | 12:11 |
shorne | which architectures no longer define random_get_entropy, but do define get_cycles? | 12:11 |
zx2c4 | ia64, parisc, sparc64, alpha, arm64, s390, powerpc... | 12:12 |
zx2c4 | look, you're coming to this a bit late at this point. the scheme in the patchset is coherent and minimized given the set of platforms | 12:13 |
zx2c4 | i played with every iteration of which is the fallback and which isnt | 12:13 |
shorne | ok, it's making sense | 12:16 |
zx2c4 | Explicit random_get_entropy(): x86, m68k, arm, nios2, openrisc, riscv | 12:16 |
zx2c4 | Always-functional get_cycles(): ia64, parisc, sparc64, alpha, arm64, s390, powerpc | 12:16 |
zx2c4 | No random_get_entropy() or get_cycles(): sparc32, arc, csky, h3800, hexagon, microblaze, sh, um, xtensa | 12:16 |
shorne | one more question, you mention openrisc you want to use the get_cycles/fallback_random_get_entropy because qemu returns 0? | 12:17 |
zx2c4 | Yup! | 12:17 |
shorne | but I see in qemu we do: | 12:17 |
shorne | r1k_timer->ttcr += (uint32_t)((now - or1k_timer->last_clk) ... | 12:17 |
shorne | so I would think get_cycles would not be returning 0 | 12:18 |
zx2c4 | let me check | 12:18 |
shorne | but I guess you can confirmed this | 12:18 |
zx2c4 | double checking... | 12:19 |
zx2c4 | yea, it returns 0 | 12:19 |
zx2c4 | everytime | 12:20 |
zx2c4 | so the qemu "silicon" is broken | 12:20 |
zx2c4 | hence the need for the branch | 12:20 |
shorne | ok, let me double check this and get back, when would you merge this, the merge window is not open now so I would think you have some time? | 12:21 |
zx2c4 | shorne: no, i dont have time actually. this is already on v6 and i have other things blocking this | 12:21 |
zx2c4 | so i'd like to get the acks squared away this week | 12:21 |
zx2c4 | only 4 weeks left til the window opens | 12:21 |
shorne | understand, I just want to understand what is going wrong or right here, give me a few hours | 12:22 |
zx2c4 | well, regardless of what the root cause winds up being, fact is that qemu as it's deployed is buggy, and hence we need that branch in the kernel side of things | 12:22 |
zx2c4 | i'm wrong! | 12:24 |
zx2c4 | shorne: qemu works as expected. issue is that the counter starts out as 0 | 12:25 |
zx2c4 | at early boot | 12:25 |
zx2c4 | which trips a bunch of warnings | 12:25 |
zx2c4 | since as a cycle counter, that's kinda bad | 12:25 |
zx2c4 | so in that cas,e i have a different patch for openrisc... | 12:25 |
zx2c4 | #define random_get_entropy() ((unsigned long)get_cycles() + 1) | 12:26 |
zx2c4 | how about that? | 12:26 |
shorne | it seems ok, we could also just add +1 inside of get_cycles | 12:28 |
zx2c4 | shorne: do you have a preference? | 12:28 |
zx2c4 | im rewriting the commit message now | 12:29 |
zx2c4 | i can do +1 to get_cycles() or add that extra definition | 12:29 |
zx2c4 | tell me what you'd prefer | 12:29 |
shorne | Not really, please do as per your suggested patch, and just mention in the commit message that starting out at zero causes errors | 12:29 |
zx2c4 | alright, ill do the extra definition | 12:29 |
shorne | qemu starts at 0 an increments as per the qemu tick timer, I guess thats too slow to update during kernel boot | 12:30 |
zx2c4 | right | 12:30 |
shorne | Thanks perhaps, in the future I can add entropy in to the initialization of ttcr in qemu | 12:31 |
shorne | Thanks for taking time to help clarify my questions, I know I am late, I was busy with something too | 12:31 |
shorne | just ping me and Ill understand when its urgent | 12:32 |
zx2c4 | shorne: huh interestingly it looks like the TTCR counter doesn't start until kinda late | 12:34 |
zx2c4 | takes a second to initialize or osmething | 12:34 |
zx2c4 | and then it starts tickig normally | 12:34 |
zx2c4 | not sure why | 12:34 |
zx2c4 | anyway, ill send this for v7 https://git.zx2c4.com/linux-rng/commit/?id=9b04e032c856ab52f56e154aba4964984d65e2a4 | 12:35 |
tpb | Title: linux-rng - Development tree for the kernel CSPRNG (at git.zx2c4.com) | 12:35 |
zx2c4 | or like it requires a trip through the scheduler? | 12:36 |
zx2c4 | not sure | 12:36 |
zx2c4 | anyway, the +1 thing works, so ill roll with that | 12:36 |
shorne | ok, the commit message looks good | 12:37 |
zx2c4 | shorne: if you want to ack it now on IRC, ill just amend it there. otherwise you can do it on the mailing list when i post v7 | 12:37 |
shorne | Wait, do you still need to #define get_cycles get_cyles? | 12:38 |
zx2c4 | no it's not necessarily but i'm defining it uniformly for all archs | 12:39 |
shorne | ok | 12:39 |
zx2c4 | As it stands, right now the logic won't test `#ifdef get_cycles` if random_get_entropy() is defined. But that's a detail. I'd rather have all of them defined if thta later changes | 12:39 |
zx2c4 | So other things... what'd ya think of that FDT-fixing patch? | 12:39 |
shorne | Acked-by: Stafford Horne <[email protected]> | 12:39 |
shorne | I think I already replied to the FDT fix patch, it looks good to me | 12:39 |
zx2c4 | oh, missed it sorry | 12:40 |
zx2c4 | patching my local qemu for the FDT thing, the only issue left is the reboot thing | 12:40 |
zx2c4 | seeing if i can hack sed to notice the "reboot: Machine rebooting..." thing on stdout of qemu and kill the process... | 12:40 |
shorne | use 'expect' | 12:41 |
shorne | ? | 12:41 |
shorne | I have to step away | 12:41 |
zx2c4 | yea might use expect | 12:42 |
zx2c4 | okay ttyl! | 12:42 |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 13:30 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 14:17 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 14:55 | |
zx2c4 | shorne: alright... https://w-g.pw/l/yHIh | 16:17 |
tpb | Title: wireguard-linux - WireGuard for the Linux kernel (at w-g.pw) | 16:17 |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 18:00 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 18:25 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 18:52 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 19:03 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 19:06 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 19:42 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 20:34 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 20:53 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 20:54 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 21:05 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 21:21 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 21:28 | |
shorne | zx2c4: cool | 21:35 |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 21:38 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 22:03 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 22:03 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 22:29 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 22:33 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds) | 23:21 | |
zx2c4 | shorne: i suspect the clock might really be cursed | 23:38 |
zx2c4 | first I noticed that TTCR was returning 0 until something happened and then all of the sudden it started working | 23:39 |
zx2c4 | so okay whatever that sucks but the +1 trick fixes things, done deal we can look at it later | 23:39 |
zx2c4 | But nowwwww im back to trying to get things working in wireguard and | 23:39 |
zx2c4 | it looks like the system's internal clock is really megafast | 23:39 |
zx2c4 | and i wonder if it's related | 23:40 |
zx2c4 | tests are timing out way faster than they should etc | 23:40 |
zx2c4 | maybe this is because im running at CONFIG_HZ_250? ill try CONFIG_HZ_100=y | 23:42 |
zx2c4 | also qemu sometimes does arithmetic wrong | 23:43 |
zx2c4 | [ 1.590000] curve25519 self-test 47: FAIL | 23:43 |
zx2c4 | [ 2.210000] curve25519 self-test 68: FAIL | 23:43 |
zx2c4 | i get this sometimes but not always | 23:43 |
zx2c4 | maybe i should disable this dcache writethrough thing | 23:59 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!