aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2021-06-16 09:34:06 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2021-06-16 10:32:39 +0000
commita397b5508320e757274bc652b43ccb2e1a702933 (patch)
tree35c76d2f3652534390646a29d4e897d13b751857 /sys
parente505c3066bbdb96dd28ff4634a315346490b9b33 (diff)
downloadsrc-a397b5508320e757274bc652b43ccb2e1a702933.tar.gz
src-a397b5508320e757274bc652b43ccb2e1a702933.zip
linux: implement set_cloned_tls() on arm64
This fixes random segfaults on "git commit --amend". Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30508
Diffstat (limited to 'sys')
-rw-r--r--sys/arm64/linux/linux_machdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c
index 80597a2922a7..8e10fc9d26a1 100644
--- a/sys/arm64/linux/linux_machdep.c
+++ b/sys/arm64/linux/linux_machdep.c
@@ -55,7 +55,6 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
LIN_SDT_PROBE_DEFINE0(machdep, linux_mmap2, todo);
LIN_SDT_PROBE_DEFINE0(machdep, linux_rt_sigsuspend, todo);
LIN_SDT_PROBE_DEFINE0(machdep, linux_sigaltstack, todo);
-LIN_SDT_PROBE_DEFINE0(machdep, linux_set_cloned_tls, todo);
/*
* LINUXTODO: deduplicate; linux_execve is common across archs, except that on
@@ -141,11 +140,12 @@ linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap)
return (EDOOFUS);
}
-/* LINUXTODO: implement arm64 linux_set_cloned_tls */
int
linux_set_cloned_tls(struct thread *td, void *desc)
{
- LIN_SDT_PROBE0(machdep, linux_set_cloned_tls, todo);
- return (EDOOFUS);
+ if ((uint64_t)desc >= VM_MAXUSER_ADDRESS)
+ return (EPERM);
+
+ return (cpu_set_user_tls(td, desc));
}