diff --git a/libafl_intelpt/src/linux.rs b/libafl_intelpt/src/linux.rs index 760ce98e49..2f73f4ef1d 100644 --- a/libafl_intelpt/src/linux.rs +++ b/libafl_intelpt/src/linux.rs @@ -724,8 +724,7 @@ impl IntelPTBuilder { /// Set the size of the perf aux buffer (actual PT traces buffer) pub fn perf_aux_buffer_size(mut self, perf_aux_buffer_size: usize) -> Result { - // todo:replace with is_multiple_of once stable - if perf_aux_buffer_size % PAGE_SIZE != 0 { + if !perf_aux_buffer_size.is_multiple_of(PAGE_SIZE) { return Err(Error::illegal_argument( "IntelPT perf_aux_buffer must be page aligned", ));