On Mon, 9 Sep 2024, Jan Beulich wrote: > On 07.09.2024 15:03, Nicola Vetrini wrote: > > --- a/docs/misra/deviations.rst > > +++ b/docs/misra/deviations.rst > > @@ -501,6 +501,16 @@ Deviations related to MISRA C:2012 Rules: > > - __builtin_memset() > > - cpumask_check() > > > > + * - R18.2 > > + - Subtractions between pointers where at least one of the operand is a > > + pointer to a symbol defined by the linker are safe. > > Imo there should be "deemed" in there, as such subtractions aren't > necessarily safe. We've merely settled on considering the risk as > acceptable, iirc.
I can add it on commit > > + - Tagged as `safe` for ECLAIR. > > + > > + * - R18.2 > > + - Subtraction between pointers encapsulated by macro page_to_mfn > > + are safe. > > + - Tagged as `safe` for ECLAIR. > > This one is a result of using frame_table[], aiui. Alternative approaches > were discussed before. Did that not lead anywhere, requiring a purely > textual / configurational deviation? During the last MISRA discussion we agree that this was an acceptable approach. What else did you have in mind? In any case, keep in mind that exploring options is a task in itself and we could use our efforts on reducing the numbers of violations instead which I think is more useful.
