[compiler-rt] [compiler-rt] adding fchmodat2 syscall introduced in Linux 6.6. (PR #82275)
David CARLIER via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 12:44:43 PST 2024
https://github.com/devnexen updated https://github.com/llvm/llvm-project/pull/82275
>From 4ba32a79fd9e64f17fb055377d0aa696c610e561 Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen at gmail.com>
Date: Mon, 19 Feb 2024 19:50:54 +0000
Subject: [PATCH] [compiler-rt] adding fchmodat2 syscall introduced in Linux
6.6.
---
.../lib/sanitizer_common/sanitizer_common_syscalls.inc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc
index c10943b3e48793..b3161690f3ce8a 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,
More information about the llvm-commits
mailing list