Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching not required #2

Open
mpg opened this issue Apr 24, 2024 · 0 comments
Open

Patching not required #2

mpg opened this issue Apr 24, 2024 · 0 comments

Comments

@mpg
Copy link

mpg commented Apr 24, 2024

First of all, I love the idea behind ctgrind, and having a way to actually test whether some piece of code has branches or memory accesses that depend on secret data is a tremendous addition to a developer's toolbox, so a big thank you for that!

I'm afraid some people who may benefit from this might be put off by having to patch valgrind, so to avoid that, I wanted to document that at least with recent versions of valgrind, this doesn't seem to be necessary, as valgrind already provides a macro doing what we want:

#include <valgrind/memcheck.h>
#define ct_poison VALGRIND_MAKE_MEM_UNDEFINED

I hope this helps more people test their code for secret-dependent branches and memory accesses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant