16975e87d8 
								
							
								 
							
						 
						
							
							
								
								xtask: rework code generator for bpf helpers  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								7ae3ddf2fa 
								
							
								 
							
						 
						
							
							
								
								xtask: use aya-gen to generate the getters  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								b66a73f6c7 
								
							
								 
							
						 
						
							
							
								
								Add aya-gen  
							
							... 
							
							
							
							aya-gen can be used to generate bindings for kernel types, eg:
	aya-gen btf-types ethhdr --probe-read-getters
Will generate:
	// ...
	#[repr(C)]
	#[derive(Debug, Copy, Clone)]
	pub struct ethhdr {
	    pub h_dest: [::aya_bpf_cty::c_uchar; 6usize],
	    pub h_source: [::aya_bpf_cty::c_uchar; 6usize],
	    pub h_proto: __be16,
	}
	impl ethhdr {
	    pub fn h_dest(&self) -> Option<[::aya_bpf_cty::c_uchar; 6usize]> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_dest) }.ok()
	    }
	    pub fn h_source(&self) -> Option<[::aya_bpf_cty::c_uchar; 6usize]> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_source) }.ok()
	    }
	    pub fn h_proto(&self) -> Option<__be16> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_proto) }.ok()
	    }
	} 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								7815711196 
								
							
								 
							
						 
						
							
							
								
								bpf: add aya-bpf-bindings  
							
							... 
							
							
							
							Move the generated bindings to aya-bpf-bindings. 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								b5cb1f479f 
								
							
								 
							
						 
						
							
							
								
								xask: add bindings::write  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								ee205627b7 
								
							
								 
							
						 
						
							
							
								
								xtask: rename bindgen module to bindings  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								1bb3846071 
								
							
								 
							
						 
						
							
							
								
								xtask: fix getters source order  
							
							... 
							
							
							
							Generate getters in the same order as the fields they access. Avoids git
noise and makes for better docs. 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								25170a539b 
								
							
								 
							
						 
						
							
							
								
								xtask: start moving bindgen to its own module  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								dc15c978f5 
								
							
								 
							
						 
						
							
							
								
								aya-bpf: generate bpf_probe_read getters for kernel types  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								cdf960aaa1 
								
							
								 
							
						 
						
							
							
								
								bpf: initial bpf bindings  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								8327ffbb8d 
								
							
								 
							
						 
						
							
							
								
								xdp: xdp BPF_LINK_CREATE was added in 5.9  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								1e779c520a 
								
							
								 
							
						 
						
							
							
								
								aya: obj: implement sane defaults for license and kernel version  
							
							... 
							
							
							
							Default to license=GPL and kernel_version=any 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								f11df77f85 
								
							
								 
							
						 
						
							
							
								
								aya: implement missing bit of retprobes  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								b7369d2763 
								
							
								 
							
						 
						
							
							
								
								aya: sys: fix warning  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								82bcef3790 
								
							
								 
							
						 
						
							
							
								
								aya: rename gen-bindings to gen-bindings.sh  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								245cd46bab 
								
							
								 
							
						 
						
							
							
								
								aya: tweak error display  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								3e8a279a59 
								
							
								 
							
						 
						
							
							
								
								Fix build with musl  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								68a633fe51 
								
							
								 
							
						 
						
							
							
								
								perf_map: support max_entries=0  
							
							... 
							
							
							
							When a PerfMap has max_entries=0, set max_entries to the number of
available CPUs. 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								f56c32b46b 
								
							
								 
							
						 
						
							
							
								
								util: add possible_cpus()  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								d6f299065d 
								
							
								 
							
						 
						
							
							
								
								Add rustfmt.toml  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								a3ab2eff57 
								
							
								 
							
						 
						
							
							
								
								Format fixes  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								0cf5d17e38 
								
							
								 
							
						 
						
							
							
								
								deps: enable only the std feature for the futures crate  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								3abe9bb859 
								
							
								 
							
						 
						
							
							
								
								Fix RawFd import paths  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								2cec04c578 
								
							
								 
							
						 
						
							
							
								
								bpf: add explicit BTF argument to the load API  
							
							... 
							
							
							
							Add a `target_btf: Option<Btf>` argument to Bpf::load. None can be
passed to indicate to skip BTF relocation, for example for kernels that
don't support it. Some(btf) can be used to pass BTF parsed with
Btf::from_sys_fs() or Btf::parse/parse_file.
Finally, add a simpler Bpf::load_file(path) that uses from_sys_fs()
internally to simplify the common case. 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								01e9f81043 
								
							
								 
							
						 
						
							
							
								
								Add license files  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								55d8bcf386 
								
							
								 
							
						 
						
							
							
								
								xdp: add support for attaching with custom xdp flags  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								d326038cf4 
								
							
								 
							
						 
						
							
							
								
								programs: rework ProgramError a bit  
							
							... 
							
							
							
							Move type specific errors to XdpError SocketFilterError etc.
Annotate all source errors with #[source] 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								f88ca1f1f1 
								
							
								 
							
						 
						
							
							
								
								programs: add internal API to create links  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								ba992a2414 
								
							
								 
							
						 
						
							
							
								
								maps: fail new() for high level wrappers if the underlying map hasn't been created  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								873691d050 
								
							
								 
							
						 
						
							
							
								
								Trim deps a bit more  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								f1da541234 
								
							
								 
							
						 
						
							
							
								
								The futures crate is only needed when async is enabled  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								14c98455a9 
								
							
								 
							
						 
						
							
							
								
								btf: remove unused methods  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								a5e19fc4ac 
								
							
								 
							
						 
						
							
							
								
								Fix warnings  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								fdc4dad5ff 
								
							
								 
							
						 
						
							
							
								
								maps: add AsyncPerfMap  
							
							... 
							
							
							
							When the async_tokio or async_std features are enabled, AsyncPerfMap
provides an async version of PerfMap which returns a future from
read_events() 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								4be0c45305 
								
							
								 
							
						 
						
							
							
								
								perf_map: split in sub modules  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								95a24c6f8b 
								
							
								 
							
						 
						
							
							
								
								perf_map: implement AsRawFd  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								5d6fe8bdf4 
								
							
								 
							
						 
						
							
							
								
								Add IOError variants to PerfMapError and PerfBufferError  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								b9be2f1a9b 
								
							
								 
							
						 
						
							
							
								
								Make aya::maps::perf_map public  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								160e0be6d6 
								
							
								 
							
						 
						
							
							
								
								Change the suffix of errors from *Failed to *Error  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								d4e282535b 
								
							
								 
							
						 
						
							
							
								
								bpf, perf_map: make maps usable from multiple threads  
							
							... 
							
							
							
							Change PerfMap API so that individual buffers can be read from multiple
threads.
Change the way maps are stored in the `Bpf` struct from RefCell to a
custom RwLock. 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								d7c91efb2d 
								
							
								 
							
						 
						
							
							
								
								Make online_cpus() util public  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								2215e202f4 
								
							
								 
							
						 
						
							
							
								
								Generate arch  specific bindings  
							
							... 
							
							
							
							Currently x86_64 and aarch64 are supported 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								1de392964b 
								
							
								 
							
						 
						
							
							
								
								Add src/generated/netlink_bindings.rs to repo  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								af8f769b50 
								
							
								 
							
						 
						
							
							
								
								Turn the project into a workspace, move code under aya/  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								c110394aaa 
								
							
								 
							
						 
						
							
							
								
								xdp: add netlink based implementation for kernels < 5.7  
							
							... 
							
							
							
							bpf_link_create was introduced in linux 5.7, so use netlink to configure
XDP on older kernels. 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								9614132724 
								
							
								 
							
						 
						
							
							
								
								Implement detaching from socket filters  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								4bd0cde199 
								
							
								 
							
						 
						
							
							
								
								sys: add kernel_version() util to get the running kernel version  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								8f5a17b542 
								
							
								 
							
						 
						
							
							
								
								Rename the syscalls module to sys  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								e83a26b307 
								
							
								 
							
						 
						
							
							
								
								probe: sysfs helpers don't need to be public  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								54637eab04 
								
							
								 
							
						 
						
							
							
								
								Improve relocation errors  
							
							... 
							
							
							
							Use BpfError::RelocationError for both maps and BTF relocations. The
error includes the name of the program that failed, and the source error
stored as Box<dyn Error>.
This hides the implementation details of the source errors - which are
unrecoverable anyway - while still allowing fine grained error messages. 
							
						 
						
							5 years ago