jiixyj / epoll-shim

small epoll implementation using kqueue; includes all features needed for libinput/libevdev
MIT License
91 stars 24 forks source link

Add support for CheriBSD #36

Closed arichardson closed 2 months ago

arichardson commented 2 years ago

I tried running the tests on my Morello board and noticed that most of them were failing. This patch series makes epoll-shim work correctly when running on CheriBSD (a fork of FreeBSD that adds support for CHERI-enabled architectures such as CHERI-RISC-V and Arm Morello).

With this patch series all but two tests pass for me and the last remaining failures will go away once https://github.com/CTSRD-CHERI/cheribsd/issues/1424 has been fixed.

jiixyj commented 2 years ago

Thank you for this! Those changes look reasonable to me at a first glance.

CheriBSD looks like a cool project! Is there a way for me to test it without a dev board? Is https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/cheri-qemu.html the way to go?

arichardson commented 2 years ago

Thank you for this! Those changes look reasonable to me at a first glance.

CheriBSD looks like a cool project! Is there a way for me to test it without a dev board? Is https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/cheri-qemu.html the way to go?

Yes, QEMU is the best way to get started. If you clone cheribuild, running cheribuild.py run-morello-purecap -d will build all the dependencies and spawn a cheribsd instance in qemu (might take a while since you have to build LLVM and FreeBSD).

arichardson commented 2 years ago

And there is of course a target to build epoll-shim as well, cheribuild.py epoll-shim-morello-purecap -d. However, due to microatf not being particularly friendly to cross-compiling, the easiest way to build the tests right now is if you have real hardware. Qemu probably works, but running clang inside qemu is pretty slow...

arichardson commented 2 years ago

Friendly ping :)

arichardson commented 2 years ago

ping?

arichardson commented 2 years ago

Sorry to ping again, but would it be possible to merge this?

arichardson commented 2 years ago

ping?

arichardson commented 2 years ago

rebased on latest master, @jiixyj any chance this could be merged?

arichardson commented 2 years ago

ping?

arichardson commented 1 year ago

ping? It would be nice if we could drop the local patch from CheriBSD ports

arichardson commented 1 year ago

@jiixyj Any chance this could be merged?

jiixyj commented 1 year ago

Thanks for your patience -- I haven't forgotten about this! Some thoughts:

arichardson commented 1 year ago

Sorry for the delay - I've rebased the changes. Unfortunately there is currently no way to interpose fcntl more easily...

arichardson commented 2 months ago

No longer the most recent version, see https://github.com/jiixyj/epoll-shim/pull/55 as well as #54 #53 #52 #51