From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 69BA15A0626; Tue, 18 Feb 2025 09:52:45 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] Makefile: Use mmap2() as alternative for mmap() in valgrind extra syscalls Date: Tue, 18 Feb 2025 09:52:45 +0100 Message-ID: <20250218085245.407849-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 5KZVHTSFRQ5SCX6JWWCLCJIZKODDQ3OQ X-Message-ID-Hash: 5KZVHTSFRQ5SCX6JWWCLCJIZKODDQ3OQ X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ...instead of unconditionally trying to enable both: mmap2() is the 32-bit ARM variant for mmap() (and perhaps for other architectures), bot if mmap() is available, valgrind will use that one. This avoids seccomp.sh warning us about missing mmap2() if mmap() is present, and is consistent with what we do in vhost-user code. Signed-off-by: Stefano Brivio --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d4e1096..f2ac8e5 100644 --- a/Makefile +++ b/Makefile @@ -109,9 +109,9 @@ passt-repair: $(PASST_REPAIR_SRCS) seccomp_repair.h $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) $(PASST_REPAIR_SRCS) -o passt-repair $(LDFLAGS) valgrind: EXTRA_SYSCALLS += rt_sigprocmask rt_sigtimedwait rt_sigaction \ - rt_sigreturn getpid gettid kill clock_gettime mmap \ - mmap2 munmap open unlink gettimeofday futex statx \ - readlink + rt_sigreturn getpid gettid kill clock_gettime \ + mmap|mmap2 munmap open unlink gettimeofday futex \ + statx readlink valgrind: FLAGS += -g -DVALGRIND valgrind: all -- 2.43.0