public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] treewide: Compilers' name for armv6l and armv7l is "arm"
@ 2024-04-11 22:18 Stefano Brivio
  0 siblings, 0 replies; only message in thread
From: Stefano Brivio @ 2024-04-11 22:18 UTC (permalink / raw)
  To: passt-dev

When I switched from 'uname -m' to 'gcc -dumpmachine' to fetch the
architecture name for, among others, seccomp.sh, I didn't realise
that "armv6l" and "armv7l" are just Linux kernel names -- compilers
just call that "arm".

Fix the "syscalls" annotation we use to define seccomp profiles
accordingly, otherwise pasta will be terminated on sigreturn() on
armv6l and armv7l.

Fixes: 213c397492bd ("passt, pasta: Run-time selection of AVX2 build")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 fwd.c        | 2 +-
 log.c        | 4 ++--
 passt.c      | 5 ++---
 pasta.c      | 4 ++--
 tcp_splice.c | 2 +-
 5 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/fwd.c b/fwd.c
index a235d13..b3d5a37 100644
--- a/fwd.c
+++ b/fwd.c
@@ -38,7 +38,7 @@
  * @exclude:	Bitmap of ports to exclude from setting (and clear)
  *
  * #syscalls:pasta lseek
- * #syscalls:pasta ppc64le:_llseek ppc64:_llseek armv6l:_llseek armv7l:_llseek
+ * #syscalls:pasta ppc64le:_llseek ppc64:_llseek arm:_llseek
  */
 static void procfs_scan_listen(int fd, unsigned int lstate,
 			       uint8_t *map, const uint8_t *exclude)
diff --git a/log.c b/log.c
index bdd31b4..e3630c3 100644
--- a/log.c
+++ b/log.c
@@ -220,7 +220,7 @@ void logfile_init(const char *name, const char *path, size_t size)
  * @fd:		Log file descriptor
  * @now:	Current timestamp
  *
- * #syscalls lseek ppc64le:_llseek ppc64:_llseek armv6l:_llseek armv7l:_llseek
+ * #syscalls lseek ppc64le:_llseek ppc64:_llseek arm:_llseek
  */
 static void logfile_rotate_fallocate(int fd, const struct timespec *now)
 {
@@ -257,7 +257,7 @@ static void logfile_rotate_fallocate(int fd, const struct timespec *now)
  * @fd:		Log file descriptor
  * @now:	Current timestamp
  *
- * #syscalls lseek ppc64le:_llseek ppc64:_llseek armv6l:_llseek armv7l:_llseek
+ * #syscalls lseek ppc64le:_llseek ppc64:_llseek arm:_llseek
  * #syscalls ftruncate
  */
 static void logfile_rotate_move(int fd, const struct timespec *now)
diff --git a/passt.c b/passt.c
index 59ab501..e93b6be 100644
--- a/passt.c
+++ b/passt.c
@@ -192,10 +192,9 @@ void exit_handler(int signal)
  * #syscalls read write writev
  * #syscalls socket bind connect getsockopt setsockopt s390x:socketcall close
  * #syscalls recvfrom sendto shutdown
- * #syscalls armv6l:recv armv7l:recv ppc64le:recv
- * #syscalls armv6l:send armv7l:send ppc64le:send
+ * #syscalls arm:recv ppc64le:recv arm:send ppc64le:send
  * #syscalls accept4|accept listen epoll_ctl epoll_wait|epoll_pwait epoll_pwait
- * #syscalls clock_gettime armv6l:clock_gettime64 armv7l:clock_gettime64
+ * #syscalls clock_gettime arm:clock_gettime64
  */
 int main(int argc, char **argv)
 {
diff --git a/pasta.c b/pasta.c
index 61feaa9..e73b5af 100644
--- a/pasta.c
+++ b/pasta.c
@@ -12,8 +12,8 @@
  * Author: Stefano Brivio <sbrivio@redhat.com>
  *
  * #syscalls:pasta clone waitid exit exit_group rt_sigprocmask
- * #syscalls:pasta rt_sigreturn|sigreturn armv6l:sigreturn armv7l:sigreturn
- * #syscalls:pasta ppc64:sigreturn s390x:sigreturn
+ * #syscalls:pasta rt_sigreturn|sigreturn
+ * #syscalls:pasta arm:sigreturn ppc64:sigreturn s390x:sigreturn
  */
 
 #include <sched.h>
diff --git a/tcp_splice.c b/tcp_splice.c
index d066112..42b7be0 100644
--- a/tcp_splice.c
+++ b/tcp_splice.c
@@ -28,7 +28,7 @@
  * - FIN_SENT_0:		FIN (write shutdown) sent to accepted socket
  * - FIN_SENT_1:		FIN (write shutdown) sent to target socket
  *
- * #syscalls:pasta pipe2|pipe fcntl armv6l:fcntl64 armv7l:fcntl64 ppc64:fcntl64
+ * #syscalls:pasta pipe2|pipe fcntl arm:fcntl64 ppc64:fcntl64
  */
 
 #include <sched.h>
-- 
@@ -28,7 +28,7 @@
  * - FIN_SENT_0:		FIN (write shutdown) sent to accepted socket
  * - FIN_SENT_1:		FIN (write shutdown) sent to target socket
  *
- * #syscalls:pasta pipe2|pipe fcntl armv6l:fcntl64 armv7l:fcntl64 ppc64:fcntl64
+ * #syscalls:pasta pipe2|pipe fcntl arm:fcntl64 ppc64:fcntl64
  */
 
 #include <sched.h>
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-11 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-11 22:18 [PATCH] treewide: Compilers' name for armv6l and armv7l is "arm" Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).