]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
bsd-user: Delete sbrk and sstk system calls.
authorWarner Losh <imp@bsdimp.com>
Mon, 13 Apr 2026 14:36:31 +0000 (08:36 -0600)
committerWarner Losh <imp@bsdimp.com>
Thu, 7 May 2026 02:10:43 +0000 (20:10 -0600)
sbrk and sstk were an experimental system call introduced in 4.2BSD, but
with an blank implementation. They remained in subsequent 4BSD releases
doing nothing (with 4.3-Reno and later returning not supported). FreeBSD
1.x imported this. They were removed in 2023. Remove them from here
because no real, non-contrived program on FreeBSD ever had them.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>
bsd-user/bsd-mem.h
bsd-user/freebsd/os-syscall.c
bsd-user/freebsd/strace.list

index 8c0b0b69195da00578dffa0f7e70f2ac0f9f2c5a..9d7b60d3c35b09a18bbfc080aa695d3cde0d37a5 100644 (file)
@@ -428,17 +428,4 @@ static inline abi_long do_bsd_vadvise(void)
     /* See sys_ovadvise() in vm_unix.c */
     return -TARGET_EINVAL;
 }
-
-static inline abi_long do_bsd_sbrk(void)
-{
-    /* see sys_sbrk() in vm_mmap.c */
-    return -TARGET_EOPNOTSUPP;
-}
-
-static inline abi_long do_bsd_sstk(void)
-{
-    /* see sys_sstk() in vm_mmap.c */
-    return -TARGET_EOPNOTSUPP;
-}
-
 #endif /* BSD_USER_BSD_MEM_H */
index 85e5db19a36683581850da87e36e55cc90f8ce1a..ca819fc5308d4e919d7b02d635a1e5f26a09ced9 100644 (file)
@@ -918,14 +918,6 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1,
         ret = do_bsd_vadvise();
         break;
 
-    case TARGET_FREEBSD_NR_sbrk:
-        ret = do_bsd_sbrk();
-        break;
-
-    case TARGET_FREEBSD_NR_sstk:
-        ret = do_bsd_sstk();
-        break;
-
         /*
          * Misc
          */
index 275d2dbe2747c69683ae404513db131932d84e39..d7f61f480ecdcbce45a15bad6d98780db4aa0683 100644 (file)
 { TARGET_FREEBSD_NR_rfork, "rfork", NULL, NULL, NULL },
 { TARGET_FREEBSD_NR_rmdir, "rmdir", NULL, NULL, NULL },
 { TARGET_FREEBSD_NR_rtprio_thread, "rtprio_thread", "%s(%d, %d, %p)", NULL, NULL },
+#ifdef TARGET_FREEBSD_NR_sbrk
 { TARGET_FREEBSD_NR_sbrk, "sbrk", NULL, NULL, NULL },
+#endif
 { TARGET_FREEBSD_NR_sched_get_priority_max, "sched_get_priority_max", NULL, NULL, NULL },
 { TARGET_FREEBSD_NR_sched_get_priority_min, "sched_get_priority_min", NULL, NULL, NULL },
 { TARGET_FREEBSD_NR_sched_yield, "sched_yield", NULL, NULL, NULL },
 { TARGET_FREEBSD_NR_sigsuspend, "sigsuspend", NULL, NULL, NULL },
 { TARGET_FREEBSD_NR_socket, "socket", "%s(%d,%d,%d)", NULL, NULL },
 { TARGET_FREEBSD_NR_socketpair, "socketpair", NULL, NULL, NULL },
+#ifdef TARGET_FREEBSD_NR_sstk
 { TARGET_FREEBSD_NR_sstk, "sstk", NULL, NULL, NULL },
+#endif
 { TARGET_FREEBSD_NR_freebsd11_stat, "freebsd11_stat", "%s(\"%s\",%p)", NULL, NULL },
 { TARGET_FREEBSD_NR_freebsd11_statfs, "freebsd11_statfs", "%s(\"%s\",%p)", NULL, NULL },
 { TARGET_FREEBSD_NR_symlink, "symlink", "%s(\"%s\",\"%s\")", NULL, NULL },