(header_ptr: *mut __user_cap_header_struct)
| 11 | const CAPABILITY_VERSION_3: u32 = 0x20080522; |
| 12 | |
| 13 | fn validate_cap_header(header_ptr: *mut __user_cap_header_struct) -> AxResult<()> { |
| 14 | // FIXME: AnyBitPattern |
| 15 | let mut header = unsafe { header_ptr.vm_read_uninit()?.assume_init() }; |
| 16 | if header.version != CAPABILITY_VERSION_3 { |
| 17 | header.version = CAPABILITY_VERSION_3; |
| 18 | header_ptr.vm_write(header)?; |
| 19 | return Err(AxError::InvalidInput); |
| 20 | } |
| 21 | let _ = get_process_data(header.pid as u32)?; |
| 22 | Ok(()) |
| 23 | } |
| 24 | |
| 25 | pub fn sys_capget( |
| 26 | header: *mut __user_cap_header_struct, |
no test coverage detected