Re: [PATCH 27/82] m68k: Refactor intentional wrap-around calculation

2024-01-23 Thread Geert Uytterhoeven
Hi Eero, On Tue, Jan 23, 2024 at 2:30 PM Eero Tamminen wrote: > On 23.1.2024 10.13, Geert Uytterhoeven wrote: > > On Tue, Jan 23, 2024 at 1:35 AM Kees Cook wrote: > >> In an effort to separate intentional arithmetic wrap-around from > >> unexpected wrap-around, we need to refactor places that de

Re: [PATCH 27/82] m68k: Refactor intentional wrap-around calculation

2024-01-23 Thread Eero Tamminen
Hi, On 23.1.2024 10.13, Geert Uytterhoeven wrote: On Tue, Jan 23, 2024 at 1:35 AM Kees Cook wrote: In an effort to separate intentional arithmetic wrap-around from unexpected wrap-around, we need to refactor places that depend on this kind of math. One of the most common code patterns of this

Re: [PATCH 27/82] m68k: Refactor intentional wrap-around calculation

2024-01-23 Thread Geert Uytterhoeven
Hi Kees, On Tue, Jan 23, 2024 at 1:35 AM Kees Cook wrote: > In an effort to separate intentional arithmetic wrap-around from > unexpected wrap-around, we need to refactor places that depend on this > kind of math. One of the most common code patterns of this is: > > VAR + value < VAR > >

Re: [PATCH 27/82] m68k: Refactor intentional wrap-around calculation

2024-01-22 Thread Liam R. Howlett
* Kees Cook [240122 19:36]: > In an effort to separate intentional arithmetic wrap-around from > unexpected wrap-around, we need to refactor places that depend on this > kind of math. One of the most common code patterns of this is: > > VAR + value < VAR > > Notably, this is considered "un

[PATCH 27/82] m68k: Refactor intentional wrap-around calculation

2024-01-22 Thread Kees Cook
In an effort to separate intentional arithmetic wrap-around from unexpected wrap-around, we need to refactor places that depend on this kind of math. One of the most common code patterns of this is: VAR + value < VAR Notably, this is considered "undefined behavior" for signed and pointer