[PATCH] D55167: Add a new interceptors for cdbr(3) and cdbw(3) API from NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 10 14:41:16 PST 2018


krytarowski marked 4 inline comments as done.
krytarowski added a comment.

In D55167#1326120 <https://reviews.llvm.org/D55167#1326120>, @vitalybuka wrote:

> In D55167#1324855 <https://reviews.llvm.org/D55167#1324855>, @joerg wrote:
>
> > I don't see why this interceptor needs to know about the internals of `struct cdbr` or `struct cdbw` at all. They are fully opaque. All memory accessed by users is explicitly sized as argument to the functions or returned with the size.
>
>
> Then we give up on TSAN check of fieds, or msan check if caller will try to read particular fields


These structs contain a pointer to a buffer and length.

Please have a look as the actual implementation.

https://nxr.netbsd.org/xref/src/common/lib/libc/cdb/cdbr.c#89

https://nxr.netbsd.org/xref/src/lib/libc/cdb/cdbw.c#71

There is another difficulty, that hash is a SLIST container (key_hash_head, hash) and I was unsure whether to sanitize it or skip.

Please help to make this clearer.

We certainly don't want to make this interceptor suboptimal.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55167/new/

https://reviews.llvm.org/D55167





More information about the llvm-commits mailing list