Skip to content

Commit b408241

Browse files
authored
[compiler-rt] adding fchmodat2 syscall introduced in Linux 6.6. (#82275)
1 parent 26fa440 commit b408241

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,6 +2808,15 @@ PRE_SYSCALL(fchownat)
28082808
POST_SYSCALL(fchownat)
28092809
(long res, long dfd, const void *filename, long user, long group, long flag) {}
28102810

2811+
PRE_SYSCALL(fchmodat2)(long dfd, const void *filename, long mode, long flag) {
2812+
if (filename)
2813+
PRE_READ(filename,
2814+
__sanitizer::internal_strlen((const char *)filename) + 1);
2815+
}
2816+
2817+
POST_SYSCALL(fchmodat2)
2818+
(long res, long dfd, const void *filename, long mode, long flag) {}
2819+
28112820
PRE_SYSCALL(openat)(long dfd, const void *filename, long flags, long mode) {
28122821
if (filename)
28132822
PRE_READ(filename,

0 commit comments

Comments
 (0)