diff options
author | David CARLIER <devnexen@gmail.com> | 2024-03-08 00:00:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 00:00:26 +0000 |
commit | b408241d0ad9ce009b49018fe1e9838887abf3c1 (patch) | |
tree | 6a9d54f2f0ee55d06accd5aa436bbdf7949f725f /compiler-rt | |
parent | 26fa4409572ad81c5522165ba2a831845f4d0635 (diff) | |
download | llvm-b408241d0ad9ce009b49018fe1e9838887abf3c1.zip llvm-b408241d0ad9ce009b49018fe1e9838887abf3c1.tar.gz llvm-b408241d0ad9ce009b49018fe1e9838887abf3c1.tar.bz2 |
[compiler-rt] adding fchmodat2 syscall introduced in Linux 6.6. (#82275)
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc index c10943b..b316169 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc @@ -2808,6 +2808,15 @@ PRE_SYSCALL(fchownat) POST_SYSCALL(fchownat) (long res, long dfd, const void *filename, long user, long group, long flag) {} +PRE_SYSCALL(fchmodat2)(long dfd, const void *filename, long mode, long flag) { + if (filename) + PRE_READ(filename, + __sanitizer::internal_strlen((const char *)filename) + 1); +} + +POST_SYSCALL(fchmodat2) +(long res, long dfd, const void *filename, long mode, long flag) {} + PRE_SYSCALL(openat)(long dfd, const void *filename, long flags, long mode) { if (filename) PRE_READ(filename, |