From bce3c4fb1d0cd6e8f9f64420c59e02a42c96b2c8 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 26 Aug 2024 09:49:24 -0400 Subject: [PATCH] Appease nightly clippy ``` error: first doc comment paragraph is too long --> aya/src/programs/raw_trace_point.rs:12:1 | 12 | / /// A program that can be attached at a pre-defined kernel trace point, but also 13 | | /// has an access to kernel internal arguments of trace points, which 14 | | /// differentiates them from traditional tracepoint eBPF programs. 15 | | /// 16 | | /// The kernel provides a set of pre-defined trace points that eBPF programs can | |_ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph error: first doc comment paragraph is too long --> ebpf/aya-ebpf/src/helpers.rs:1:1 | 1 | / //! This module contains kernel helper functions that may be exposed to specific BPF 2 | | //! program types. These helpers can be used to perform common tasks, query and operate on 3 | | //! data exposed by the kernel, and perform some operations that would normally be denied 4 | | //! by the BPF verifier. 5 | | //! 6 | | //! Here, we provide some higher-level wrappers around the underlying kernel helpers, but | |_ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph ``` --- aya/src/programs/raw_trace_point.rs | 7 ++++--- ebpf/aya-ebpf/src/helpers.rs | 16 +++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/aya/src/programs/raw_trace_point.rs b/aya/src/programs/raw_trace_point.rs index 214bee71..4b4d1118 100644 --- a/aya/src/programs/raw_trace_point.rs +++ b/aya/src/programs/raw_trace_point.rs @@ -9,9 +9,10 @@ use crate::{ }, }; -/// A program that can be attached at a pre-defined kernel trace point, but also -/// has an access to kernel internal arguments of trace points, which -/// differentiates them from traditional tracepoint eBPF programs. +/// A program that can be attached at a pre-defined kernel trace point. +/// +/// Unlike [`TracePoint`](super::TracePoint), the kernel does not pre-process +/// the arguments before calling the program. /// /// The kernel provides a set of pre-defined trace points that eBPF programs can /// be attached to. See`/sys/kernel/debug/tracing/events` for a list of which diff --git a/ebpf/aya-ebpf/src/helpers.rs b/ebpf/aya-ebpf/src/helpers.rs index ad7e0ce5..6720bc72 100644 --- a/ebpf/aya-ebpf/src/helpers.rs +++ b/ebpf/aya-ebpf/src/helpers.rs @@ -1,11 +1,13 @@ -//! This module contains kernel helper functions that may be exposed to specific BPF -//! program types. These helpers can be used to perform common tasks, query and operate on -//! data exposed by the kernel, and perform some operations that would normally be denied -//! by the BPF verifier. +//! This module contains kernel helper functions that may be exposed to specific +//! BPF program types. //! -//! Here, we provide some higher-level wrappers around the underlying kernel helpers, but -//! also expose bindings to the underlying helpers as a fall-back in case of a missing -//! implementation. +//! These helpers can be used to perform common tasks, query and operate on data +//! exposed by the kernel, and perform some operations that would normally be +//! denied by the BPF verifier. +//! +//! Here, we provide some higher-level wrappers around the underlying kernel +//! helpers, but also expose bindings to the underlying helpers as a fall-back +//! in case of a missing implementation. use core::mem::{self, MaybeUninit};