IRC channel logs

2020-04-17.log

back to list of logs

***Server sets mode: +nt
***SND is now known as DNS
<youpi>gnu_srs: better :)
<gnu_srs>:D
<damo22>youpi: what is "mask", "anywhere" and "inheritance" in a vm_map call ?
<damo22>i assume anywhere is something like, can it be remapped anywhere
<damo22>VM_INHERIT_SHARE is what i think i need
<damo22>for inheritance
<damo22>i dont know what mask is for
<damo22>i see in gnumach it uses & ~mask
<damo22>so i assume mask should be 0
<damo22>(for no effect)
<damo22>youpi: can you spot anything obviously wrong with this? https://paste.debian.net/plain/1140917/
<youpi>damo22: get inspired from the mmap() implementation in glibc
<youpi>and see the gnumach info pages for the details of the system calls and gnumach RPCs
<youpi>when calling get_privileged_ports, pass NULL instead of &master_host, since you don't need it
<youpi>also check for errors
<youpi>never leave errors unseen
<youpi>otherwise you're paving ways for getting bogus behavior with no clue where it started failing :)
<youpi>don't specify mem_offset both to device_map and vm_map
<youpi>that would add up!
<damo22>ah
<youpi>you want to pass dest to vm_map, not *dest
<youpi>since vm_map has to return the address
<youpi>s/return the address/write the address there/
<damo22>oops
<youpi>set anywhere to 1, you don't care where to map it
<youpi>mmap() passes VM_PROT_ALL as max_protection, I'd say just do the same
<youpi>so we really behave like the mmap() call used otherwise
<damo22>thanks
<youpi>apart from that the principle looks good
<youpi>I guess upstream would rather put the ifdef inside the function
<youpi>and hvae the rest of the code just call it instead of opening devmem etc.
<damo22>i did that didnt i?
<damo22>but i pulled out the gnu method to a separate function as well
<damo22>you think theyd rather if i duplicate the code for 3 times?
<youpi>I mean to factorize the #ifdefs
<youpi>not only factorize the gnu implementation
<youpi>but factorize the /Dev/mem opening etc. too
<youpi>so ifdef shows up only in the helper function
<damo22>ah i see
<damo22>so i call the same function for both methods
<damo22>then there is only one set of ifdefs
<damo22> https://i.paste.pics/8oiov.png
<damo22>interesting, it probed pci devices but failed to find AHCI controller
<damo22>sorry, attached disk
<damo22>mmm, i think it missed the controller though usually i see ahcisata0:
<damo22>i saw a similar problem when it failed to unmap the pci regions
<damo22>ive traced the boot sequence of ahci before, it maps the BAR to probe the controller, then unmaps the bar, and remaps again
<damo22>if unmap is not implemented, it will fail i think
<damo22>is mask=0 correct?
<damo22>or should it be ~0
<youpi>see mmap.c's implementation inside glibc
<youpi>really, we want to implement something instead of mmap, so simply look at the mmap implementation to do the same
<damo22>ok
***rekado_ is now known as rekado
***Shentino_ is now known as Shentino