Skip to content

Patching not required #2

@mpg

Description

@mpg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions