<oriansj>stikonas: good news, no new crashes in 22 hours of fuzzing <Hagfish>also, i've just found out about PackagingCon <Hagfish>some really interesting talks, by the looks of things <Hagfish>"Trustix, our reference implementation of a new concept we like to call "build transparency", solves this in an entirely different, decentralized manner." <Hagfish>21:45 2min Stage0 bootstrapping trust <oriansj>my first public talk about my stage0 work <oriansj>even if they only consider it a minor filler talk that they don't promise any time to it <oriansj>but I'll try to get the core details out <oriansj>they have asked me to login by 21:15 UTC and wait for an open slot <Hagfish>presumably people can follow up with you after the talk to learn more? <oriansj>not that it is that hard to get in touch with me for a conversation <oriansj>as I am on matrix, signal, email and IRC <oriansj>and I take personal phone calls from people I like <stikonas>hmm, I think pointer dereference is now working in M2-Planet. But I should write some tests first... <stikonas>ok, actually case of "*b = *a;" is still not working. This one needs to copy all struct data... <stikonas>although M2-Planet also can't just copy one struct into another with simple assignment... In fact we only use pointers to structs ***Ugochimobi61 is now known as Ugochimobi[m]
***Ugochimobi77 is now known as Joseph
<gbrlwck>stikonas: where did you find the encodings (as used in riscv64_defs.M1)? i figure i'd have to add floating point operators to make mescc work with floats <stikonas>so for earch opcode convert that binary into hex <stikonas>keep in mind that bit 0 is on the right there <stikonas>best to recheck one of my opcodes before you do new ones <stikonas>which you can do even without a calculator ***Ugochimobi95 is now known as Ugochimobi[m]
<gbrlwck>ekaitz: what (guix) environment do i need to run pysc-v? <ekaitz>it's plain python with no extra libs afaik <ekaitz>but it's VERY uncomplete software, you might only use it for a couple of things like assembling instructions or so <stikonas>well, for hex* stuff on risc-v I ended up manually assembling <stikonas>first wrote GAS prototype, converted it to M1, then replaced macros with hex numbers and where necessary calculated jump offsets <gbrlwck>ekaitz: when i try to run it i get "NameError: name 'fetch_instruction' is not defined"; when i `ack` for that string i only get one hit (the call raising this error) <ekaitz>oh shit, it's probably everything broken <gbrlwck>i thought i might be able to double check my calculations, but i'm already doing it by hand <ekaitz>alright no, the thing is pysc-v basically doesn't really work <gbrlwck>d4426ef seems to work, though (at least there's no error) <ekaitz>there is a file called baseassembler <ekaitz>you can generate instructions like addi("a0", "a1", 12) <ekaitz>the best way to do it is to run a python shell and load the file using an import and do the whole thing interactively <ekaitz>I wanted to spend more time on the project and I almost wrote a parser and stuff but never finished so this is what I got at the moment <ekaitz>btw gbrlwck commits are welcome hehe <ekaitz>basically the project is nothing but the instruction set description in python classes <ekaitz>it's probably going to stay like that for a while :) but it's useful to hand assemble instructions <ekaitz>fiddling with bits by hand is boring and error-prone <stikonas>well, error-prone depends on how you do it <stikonas>directly trying to assemble it is error-prone <stikonas>but doing it in systematically in stages helps a lot <stikonas>e.g. M1->hex2 is mostly just copy/paste replacing macros with hex values from the table <stikonas>then you can add those in hex2->hex1 step <stikonas>and it would be less error prone than directly trying to encode everything <gbrlwck>i think this was more about converting RISC-V specs to Bytes (with byte-order and their 7, 5 and 3 bit wide fields) :) <gbrlwck>ekaitz: i tried you addi() command, get a result, but when i "Out[1].compile()" i get a TypeError: unsupported operand type(s) for <<: 'str' and 'int' <stikonas>yeah, had to do that too when converting .M1->.hex2 <stikonas>but not that many instructions actually have a unique immediate that is not used anywhere else <stikonas>e.g. immediates in function header/footer are always 8 16 32, etc... <gbrlwck>i like it, too :) but only /dev/random knows if/when i'd find if i did it wrong <stikonas>how are we supposed to go to dereferenced type. Or is it not supported? <stikonas>but looks like it's not because b->type = b; <stikonas>(basically I want the other direction than ->indirect) <muurkha>gbrlwck: you may not be familiar with the saying "What would Jesus do?", often abbreviated to "WWJD" <gbrlwck>i am but realized it only after typing <muurkha>(allusions to Terry Davis believing God spoke to him through his random number generator) <ekaitz>gbrlwck: try >>> b.compileBigEndian(b.addi(b.x("a0"), b.x("zero"), 10)) # first import baseassembler as b ***Ugochimobi21 is now known as Ugochimobi[m]
<stikonas>ok, I think I mostly figured out dereferencing in M2-Planet <stikonas>seems to work except for *a = *b for structs... <stikonas>but since a = b doesn't work for structs either, that's expected ***Ugochimobi49 is now known as Ugochimobi[m]