--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -377,6 +377,15 @@ static abi_long do_freebsd_sysctl(abi_ul
        *q++ = tswap32(*p);
     oidfmt(snamep, namelen, NULL, &kind);
     /* XXX swap hnewp */
+#if HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 32
+    /* XXX there may be more sysctls that differ */
+    if (namelen == 2 &&
+        snamep[0] == CTL_KERN && snamep[1] == KERN_USRSTACK &&
+        holdlen && holdlen == 4 && hnewp == NULL) {
+       (*(uint32_t *)holdp) = 0xfffff000U;
+       ret = 0;
+    } else
+#endif
     ret = get_errno(sysctl(snamep, namelen, holdp, &holdlen, hnewp, newlen));
     if (!ret)
         sysctl_oldcvt(holdp, holdlen, kind);
