Re: [PATCH v2 00/13] stackleak: fixes and rework

From: Kees Cook
Date: Wed May 04 2022 - 15:18:05 EST


On Wed, 27 Apr 2022 18:31:15 +0100, Mark Rutland wrote:
> This is the vs I promised. Since Alexander wanted to look at this in
> more detail (and since this is subtle and needs review), I'm assuming
> that Kees will pick this up some time next week after that's happened,
> if all goes well. :)
>
> This series reworks the stackleak code and the associated LKDTM test.
> The first patch fixes some latent issues on arm64, and the subsequent
> patches improve the code to improve clarity and permit better code
> generation. Patches 8-10 address some latent issues in the LKDTM test
> and add more diagnostic output.
>
> [...]

I fixed some small commit log typos, but otherwise this looks great. If
anything new comes up we can adjust it.

Applied to for-next/hardening, thanks!

[01/13] arm64: stackleak: fix current_top_of_stack()
https://git.kernel.org/kees/c/4c849d27b729
[02/13] stackleak: move skip_erasing() check earlier
https://git.kernel.org/kees/c/e98a7c56d73c
[03/13] stackleak: remove redundant check
https://git.kernel.org/kees/c/e45d9f71deea
[04/13] stackleak: rework stack low bound handling
https://git.kernel.org/kees/c/cbe7edb47d3c
[05/13] stackleak: clarify variable names
https://git.kernel.org/kees/c/e9da2241ed85
[06/13] stackleak: rework stack high bound handling
https://git.kernel.org/kees/c/cfef4372a4b7
[07/13] stackleak: rework poison scanning
https://git.kernel.org/kees/c/ff5f6d37e5bc
[08/13] lkdtm/stackleak: avoid spurious failure
https://git.kernel.org/kees/c/23fd893fa0d7
[09/13] lkdtm/stackleak: rework boundary management
https://git.kernel.org/kees/c/f4cfacd92972
[10/13] lkdtm/stackleak: prevent unexpected stack usage
https://git.kernel.org/kees/c/c393c0b98d75
[11/13] lkdtm/stackleak: check stack boundaries
https://git.kernel.org/kees/c/b6bf5a354eca
[12/13] stackleak: add on/off stack variants
https://git.kernel.org/kees/c/96c59349a56c
[13/13] arm64: entry: use stackleak_erase_on_task_stack()
https://git.kernel.org/kees/c/d46ac904fd35

--
Kees Cook