diff options
| author | Kees Cook <[email protected]> | 2020-06-25 13:37:01 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2020-06-29 18:41:39 +0200 |
| commit | 464e86b4abadfc490f426954b431e2ec6a9d7bd2 (patch) | |
| tree | 0f383cba11e1e20a74cea7c8652cfa1309d8128d /tools/perf/scripts/python/flamegraph.py | |
| parent | 4afc339ef0d259d415993d3d96f707a92489d91e (diff) | |
lkdtm: Avoid more compiler optimizations for bad writes
It seems at least Clang is able to throw away writes it knows are
destined for read-only memory, which makes things like the WRITE_RO test
fail, as the write gets elided. Instead, force the variable to be
volatile, and make similar changes through-out other tests in an effort
to avoid needing to repeat fixing these kinds of problems. Also includes
pr_err() calls in failure paths so that kernel logs are more clear in
the failure case.
Reported-by: Prasad Sodagudi <[email protected]>
Suggested-by: Sami Tolvanen <[email protected]>
Fixes: 9ae113ce5faf ("lkdtm: add tests for additional page permissions")
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions