Re: [PATCH 40/82] arm64: stacktrace: Refactor intentional wrap-around test

2024-01-23 Thread Mark Rutland
On Mon, Jan 22, 2024 at 04:27:15PM -0800, 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 > > N

[PATCH 40/82] arm64: stacktrace: Refactor intentional wrap-around test

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