[PATCH] D55368: [Sanitizer] capsicum api subset interception
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 7 13:32:55 PST 2018
vitalybuka requested changes to this revision.
vitalybuka added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/sanitizer_common/CMakeLists.txt:22
sanitizer_persistent_allocator.cc
+ sanitizer_platform_limits_freebsd.cc
sanitizer_platform_limits_linux.cc
----------------
krytarowski wrote:
> I recommend to split freebsd entirely from linux.cc, but as a separate commit.
Unrelated, but also we need to consider extracting platform specific interceptors from sanitizer_common_interceptors.inc
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7734
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, rights, sizeof(*rights));
+ ret = REAL(cap_rights_limit)(fd, rights);
+ return ret;
----------------
please remove unneded ret var and return REAL()
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7743
+ void *ctx;
+ int ret;
+ COMMON_INTERCEPTOR_ENTER(ctx, cap_rights_get, fd, rights);
----------------
int ret = REAL(cap_rights_get)(fd, rights);
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7746
+ if (rights) {
+ ret = REAL(cap_rights_get)(fd, rights);
+ if (ret == 0)
----------------
needs clang-format
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7761
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, cmds, sizeof(*cmds) * ncmds);
+ ret = REAL(cap_ioctls_limit)(fd, cmds, ncmds);
+ return ret;
----------------
return REAL()
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7773
+ if (cmds) {
+ ret = REAL(cap_ioctls_get)(fd, cmds, maxcmds);
+ if (ret == 0)
----------------
int ret =
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55368/new/
https://reviews.llvm.org/D55368
More information about the llvm-commits
mailing list