diff --git a/bpf/aya-bpf/src/lib.rs b/bpf/aya-bpf/src/lib.rs index 517e23fa9..b7f83d8ab 100644 --- a/bpf/aya-bpf/src/lib.rs +++ b/bpf/aya-bpf/src/lib.rs @@ -25,7 +25,7 @@ pub mod programs; pub use aya_bpf_cty as cty; use core::ffi::c_void; -use cty::{c_int, c_long}; +use cty::c_long; use helpers::{bpf_get_current_comm, bpf_get_current_pid_tgid, bpf_get_current_uid_gid}; pub use aya_bpf_macros as macros; @@ -57,22 +57,6 @@ pub trait BpfContext { } } -#[no_mangle] -pub unsafe extern "C" fn memset(s: *mut u8, c: c_int, n: usize) { - #[allow(clippy::cast_sign_loss)] - let b = c as u8; - for i in 0..n { - *s.add(i) = b; - } -} - -#[no_mangle] -pub unsafe extern "C" fn memcpy(dest: *mut u8, src: *mut u8, n: usize) { - for i in 0..n { - *dest.add(i) = *src.add(i); - } -} - /// Check if a value is within a range, using conditional forms compatible with /// the verifier. #[inline(always)] diff --git a/test/integration-ebpf/src/bpf_probe_read.rs b/test/integration-ebpf/src/bpf_probe_read.rs index 027287672..0cfa739e7 100644 --- a/test/integration-ebpf/src/bpf_probe_read.rs +++ b/test/integration-ebpf/src/bpf_probe_read.rs @@ -1,5 +1,6 @@ -#![no_std] +#![no_builtins] #![no_main] +#![no_std] use aya_bpf::{ helpers::{bpf_probe_read_kernel_str_bytes, bpf_probe_read_user_str_bytes}, diff --git a/test/integration-ebpf/src/log.rs b/test/integration-ebpf/src/log.rs index 03cdde765..03a31241e 100644 --- a/test/integration-ebpf/src/log.rs +++ b/test/integration-ebpf/src/log.rs @@ -1,5 +1,6 @@ -#![no_std] +#![no_builtins] #![no_main] +#![no_std] use aya_bpf::{macros::uprobe, programs::ProbeContext}; use aya_log_ebpf::{debug, error, info, trace, warn}; diff --git a/test/integration-ebpf/src/map_test.rs b/test/integration-ebpf/src/map_test.rs index d63d6fc62..725fae853 100644 --- a/test/integration-ebpf/src/map_test.rs +++ b/test/integration-ebpf/src/map_test.rs @@ -1,5 +1,6 @@ -#![no_std] +#![no_builtins] #![no_main] +#![no_std] use aya_bpf::{ bindings::xdp_action, diff --git a/test/integration-ebpf/src/name_test.rs b/test/integration-ebpf/src/name_test.rs index 1a5f870c5..c319778a4 100644 --- a/test/integration-ebpf/src/name_test.rs +++ b/test/integration-ebpf/src/name_test.rs @@ -1,5 +1,6 @@ -#![no_std] +#![no_builtins] #![no_main] +#![no_std] use aya_bpf::{bindings::xdp_action, macros::xdp, programs::XdpContext}; diff --git a/test/integration-ebpf/src/pass.rs b/test/integration-ebpf/src/pass.rs index 120ef7cc6..824e4e062 100644 --- a/test/integration-ebpf/src/pass.rs +++ b/test/integration-ebpf/src/pass.rs @@ -1,5 +1,6 @@ -#![no_std] +#![no_builtins] #![no_main] +#![no_std] use aya_bpf::{bindings::xdp_action, macros::xdp, programs::XdpContext}; diff --git a/test/integration-ebpf/src/relocations.rs b/test/integration-ebpf/src/relocations.rs index bfbcd1cdf..557fda77a 100644 --- a/test/integration-ebpf/src/relocations.rs +++ b/test/integration-ebpf/src/relocations.rs @@ -1,5 +1,6 @@ -#![no_std] +#![no_builtins] #![no_main] +#![no_std] use core::hint; diff --git a/test/integration-ebpf/src/test.rs b/test/integration-ebpf/src/test.rs index 187a39262..747085d26 100644 --- a/test/integration-ebpf/src/test.rs +++ b/test/integration-ebpf/src/test.rs @@ -1,5 +1,6 @@ -#![no_std] +#![no_builtins] #![no_main] +#![no_std] use aya_bpf::{ bindings::xdp_action, diff --git a/xtask/public-api/aya-bpf.txt b/xtask/public-api/aya-bpf.txt index 4d4aa0f72..2adb0fe4d 100644 --- a/xtask/public-api/aya-bpf.txt +++ b/xtask/public-api/aya-bpf.txt @@ -2285,5 +2285,3 @@ pub fn aya_bpf::programs::tracepoint::TracePointContext::as_ptr(&self) -> *mut c impl aya_bpf::BpfContext for aya_bpf::programs::xdp::XdpContext pub fn aya_bpf::programs::xdp::XdpContext::as_ptr(&self) -> *mut core::ffi::c_void pub fn aya_bpf::check_bounds_signed(value: i64, lower: i64, upper: i64) -> bool -#[no_mangle] pub unsafe c fn aya_bpf::memcpy(dest: *mut u8, src: *mut u8, n: usize) -#[no_mangle] pub unsafe c fn aya_bpf::memset(s: *mut u8, c: aya_bpf_cty::ad::c_int, n: usize)