Отдых под парусом

Cheri-linux · GitHub

Capability Hardware Enhanced RISC Directions (CHERI) is an extension to the Instruction Set Architecture aming to offer hardware assisted memory safety to improve memory protection of unsafe languages like C. CHERI has been developed by the researchers from Cambridge Univeristy. Researchers from Cambrdge university have been focusing on FreeBSD like working system.

Broad details about CHERI may be found here:

https://www.cl.cam.ac.uk/analysis/security/ctsrd/cheri

https://github.com/CTSRD-CHERI

This port of Linux to the CHERI (RISC-V) was developed to validate the efficiency and safety properties of CHERI additionally for Linux, which is essentially the most used OS kernel at present, especially in consumer and cloud. The CHERIfication of Linux, primarily concerned two essential endeavors: The first was to help user-house packages and daemons compiled with CHERI. So as to attain this, programs needed to be loaded with the awareness that they were compiled with CHERI assist — requiring crucial modifications in the program loader, performing on modifications in the ELF format. The modifications had been wanted to handle the capability-formatting of setting variables for this system. Additionally, the scheduler and exception handler within the kernel needed to be made CHERI-conscious, i.e. to know whether or not a user-house course of is CHERIfied or not, since register shops and restore need to account for whether functionality registers must be saved and restored throughout scheduling. The second endeavor was to compile the kernel correct with CHERI reminiscence protection, i.e. to let CHERI capabilities guard the memory allocations inside the kernel. The current state of this a part of the CHERIfication covers solely the main kernel, its reminiscence administration code, its bootstrap for RISC-V and selected drivers (filesystem, community) which have been used for validation in QEMU and on FPGAs. This a part of the work mostly included fixes for pointer (capability) provenance, i.e. to switch casts from integers to pointers which in most architectures might be accomplished, however in CHERI, the handle should be accompanied with the range of the reference turning the pointer right into a capability. A number of situations the place kernel code modified in this manner actually turned out to reference memory addresses past the allocation (mostly totally different optimizations) where also corrected.

This open-source repository contains our CHERI-modifications to a quantity of various existing tasks across the Linux kernel and its run-time. The undertaking is full enough to run the Linux kernel with a small run-time on top of the emulated QEMU RISC-V CHERI emulator, and necessary scripting (buildroot) is included to showcase this. We hope the analysis, CHERI and Linux communities can leverage this work for further evolving CHERI towards the absolutely useful, deployed safe computing structure it deserves to become.

This set of projects are devoted to CHERI support Linux. The current focus was on RISCV architecture, however not restricted to.

Constructing and working

CHERI Linux port uses buildroot tool to generate Linux system photographs and CHERI RISCV QEMU emulator to run them.

How to construct and run:

1. Clone CHERI linux buildroot

1. Configure build system

It uses qemu_riscv64cheri_defconfig configuration file.

1. Construct the system

Buildroot construct system will build CHERI LLVM toolchain, QEMU, GDB, Linux kernel, BBL, MUSL libc, busybox, インフラエンジニア 未経験 openssh and openssl.

1. Run QEMU

It uses script construct/run128_riscv.sh to run QEMU. Each picture needed to run QEMU can be seen from the script.

1. Login

After system is booted, normal loging immediate is displayed. Use ‘root’ username with out password.


Нет комментариев

Оставить комментарий

Только зарегистрированные пользователи могут оставлять комментарии Войти