diff --git a/src/syscalls.rs b/src/syscalls.rs index c597d9b2..a8d398db 100644 --- a/src/syscalls.rs +++ b/src/syscalls.rs @@ -79,8 +79,10 @@ declare_builtin_function!( ); declare_builtin_function!( - /// Same as `void *memfrob(void *s, size_t n);` in `string.h` in C. See the GNU manual page (in - /// section 3) for `memfrob`. The memory is directly modified, and the syscall returns 0 in all + /// Same as `void *memfrob(void *s, size_t n);` in `string.h` in C. + /// + /// See the GNU manual page (in section 3) for `memfrob`. + /// The memory is directly modified, and the syscall returns 0 in all /// cases. Arguments 3 to 5 are unused. SyscallMemFrob, fn rust( diff --git a/src/verifier.rs b/src/verifier.rs index 05bef6ff..c4f774ba 100644 --- a/src/verifier.rs +++ b/src/verifier.rs @@ -10,18 +10,7 @@ // the MIT license , at your option. This file may not be // copied, modified, or distributed except according to those terms. -//! This “verifier” performs simple checks when the eBPF program is loaded into the VM (before it is -//! interpreted or JIT-compiled). It has nothing to do with the much more elaborated verifier inside -//! Linux kernel. There is no verification regarding the program flow control (should be a Direct -//! Acyclic Graph) or the consistency for registers usage (the verifier of the kernel assigns types -//! to the registers and is much stricter). -//! -//! On the other hand, rbpf is not expected to run in kernel space. -//! -//! Improving the verifier would be nice, but this is not trivial (and Linux kernel is under GPL -//! license, so we cannot copy it). -//! -//! Contrary to the verifier of the Linux kernel, this one does not modify the bytecode at all. +//! Verifies that the bytecode is valid for the given config. use crate::{ ebpf,