|
From: Nicholas N. <nj...@ca...> - 2003-04-13 09:32:50
|
On Sat, 12 Apr 2003, Julian Seward wrote:
> Well, there's a distinction to be made between _want_ and _need_.
> At the bare minimum, you _must_ say how the state of memory is
> altered after the syscall, otherwise memory checking won't work
> correctly. You need to tell V about changes in memory permissions
> after the call.
>
> Optionally -- and this is done with almost all syscalls -- you can
> add some stuff which checks addressibility & definedness of memory
> passed to the system call. This is nice to have -- it enables
> V to tell people to see when they are passing garbage to syscalls
> -- but it isn't per se essential.
You have probably already worked this out, but... the essential case
corresponds to the 'post_mem_write' event. The non-essential cases
correspond to the 'pre_mem_{read,write}' events. If any of the AFS system
sub-calls 'allocate' or change the permissions of memory, eg. like mmap()
or brk() or mprotect() do, then a new event (corresponding to eg.
new_mem_mmap()) might be needed. Tell me if so, I can help you work out
the details.
Julian's classification of essential vs. non-essential was based around
the Memcheck skin, but since Valgrind can be used for writing other
program supervision tools by writing new skins; the 'non-essential' events
really should be included, as they might be essential for some other skin.
N
|