| Age | Commit message (Collapse) | Author |
|
No functional change intended.
Reviewed by: olce, kib, emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D53062
|
|
It is likely we will need these on arm64. Add them in preparation for
flags in these to be added at some point in the future.
Reviewed by: brooks, imp, kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D51005
|
|
This is a value for TLS base that would be explicitly set by user.
It is forced into the fsbase register on entry to signal handler, making
TLS in the handler usable even if userspace uses segmentation.
Reported and tested: Alex S <iwtcex@gmail.com>
Tested by: pho
Reviewed by: olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50482
|
|
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
Differential Revision: https://reviews.freebsd.org/D41901
MFC after: 1 week
|
|
Reviewed by: dchagin, markj
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D41976
|
|
No functional changes.
MFC after: 1 week
|
|
|
|
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
On x86 Linux via AT_HWCAP2 the user controlled (by tunables) processor
capabilities are exposed.
Reviewed by:
Differential Revision: https://reviews.freebsd.org/D41165
MFC after: 2 weeks
|
|
PR: 270247
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40444
MFC after: 2 weeks
|
|
Due to fxsave area is os independent reimplement fxsave handmade code
using copying of a whole area.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40443
MFC after: 2 weeks
|
|
Replace caddr_t by more appropriate char *.
MFC after: 2 weeks
|
|
PR: 72920
Differential Revision: https://reviews.freebsd.org/D40090
MFC after: 2 month
|
|
Perhaps, this does not makes much sense as destroyng %rcx declared by
the x86_64 Linux syscall ABI. However,:
a) if we get a signal while we are in the kernel, we should restore
tf_rcx when preparing machine context for signal handlers.
b) the Linux world is strange, someone can depend on %rcx value
after syscall, something like go.
Differential Revision: https://reviews.freebsd.org/D40155
MFC after: 1 month
|
|
Restore %r10 at system call entry to avoid doing this multiply times.
Differential Revision: https://reviews.freebsd.org/D40154
MFC after: 1 month
|
|
Differential Revision: https://reviews.freebsd.org/D40153
MFC after: 1 month
|
|
I agree, it would be great to avoid PCB_FULL_IRET, however we should
follow Linux system call ABI.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D40152
MFC after: 1 month
|
|
Export default MINSIGSTKSZ value for the x86 until we do not preserve AVX
registers in the signal context.
Differential Revision: https://reviews.freebsd.org/D39644
MFC after: 1 month
|
|
Cleanup unneeded includes, sort the rest according to style(9).
No functional changes.
MFC after: 2 weeks
|
|
MFC after: 1 week
|
|
Drop proc lock earlier, before copying user stuff.
Pointed out by: kib
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D38326
MFC after: 1 week
|
|
PR: 240768
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D38302
MFC after: 1 week
|
|
MFC after: 1 week
|
|
It is still present in the 32-bit Linuxulator on amd64.
MFC after: 1 week
|
|
Use native routines to fixup initial process stack. On Arm64 linux_elf_fixup() is
noop, as it do the stack fixup (room for argc) in the linux_copyout_strings().
MFC after: 1 week
|
|
In order to reduce code duplication move coredump support definitions
into the appropriate header and hide private definitions.
MFC after: 1 week
|
|
This allows the syscallname() function to give a usable result for Linux
ABIs.
Reported by: jrtc27
Reviewed by: jrtc27, markj, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37199
|
|
Store the shared page address in struct vmspace.
Also instead of storing absolute addresses of various shared page
segments save their offsets with respect to the shared page address.
This will be more useful when the shared page address is randomized.
Approved by: mw(mentor)
Sponsored by: Stormshield
Obtained from: Semihalf
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D35393
|
|
Provide arguments 2 and 3 if signal handler installed with SA_SIGINFO.
MFC after: 2 weeks
|
|
On amd64 Linux saves the thread signal mask in both contexts, in the machine
dependent and in the machine independent. Both contexts are user accessible.
Convert the mask once, then copy it.
MFC after: 2 weeks
|
|
Use kern_sigprocmask() instead of direct manipulation of td_sigmask
to reschedule newly blocked signals.
MFC after: 2 weeks
|
|
As bsd_to_linux_trapcode() is common for x86 Linuxulators,
move it under x86/linux.
MFC after: 2 weeks
|
|
As translate_traps() is common for x86 Linuxulators,
move it under x86/linux.
MFC after: 2 weeks
|
|
Call translate_traps directly from sendsig().
MFC after: 2 weeks
|
|
To reduce sendsig code difference and to avoid confusing me,
rename sf_sc to sf_uc to match the content.
MFC after: 2 weeks
|
|
The signal trampoine-related definitions are used only in the MD part
of code, wherefore moved from everywhere used linux.h to separate MD
headers.
MFC after: 2 weeks
|
|
This is the first stage of a signal trampolines refactoring.
From trampolines retired emulation of the 'call' instruction, which is
replaced by direct call of a signal handler. The signal handler address
is in the register.
The previous trampoline implemenatation used semi-Linux-way to call
a signal handler via the 'jmp' instruction. Wherefore the trampoline
emulated a 'call' instruction to into the stack the return address for
signal handler's 'ret' instruction. Wherefore handmade DWARD annotations
was used.
While here rephrased and removed excessive comments.
MFC after: 2 weeks
|
|
This is modeled after f2395455 (by kib@).
MFC after: 2 weeks
|
|
Rather than fetching the ps_strings address directly from a process'
sysentvec, use this macro. With stack address randomization the
ps_strings address is no longer fixed.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33704
|
|
The size of the ps_strings structure varies between ABIs, so this is
useful for computing the address of the ps_strings structure relative to
the top of the stack when stack address randomization is enabled.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33704
|
|
No functional changes (except for the uprintf).
Discussed With: kib
Sponsored By: EPSRC
|
|
Simplify control flow around handling of the execpath length and signal
trampoline. Cache the sysentvec pointer in a local variable.
No functional change intended.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33703
|
|
Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31954
|
|
Requested by markj
Reviewed by: jhb, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31954
|
|
MFC after: 2 weeks
|
|
In preparation for clone3 system call add struct clone_args and use it in
clone implementation.
Move all of clone related bits to the newly created linux_fork.h header.
Differential revision: https://reviews.freebsd.org/D31474
MFC after: 2 weeks
|
|
At least Linux x86 ABI's does not use carry bit and expects that the dx register
is preserved. For this add a new sv_set_fork_retval hook and call it from cpu_fork().
Add a short comment about touching dx in x86_set_fork_retval(), for more details
see phab comments from kib@ and imp@.
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D31472
MFC after: 2 weeks
|
|
To determine whether to use alternate signal stack or not,
we need to use the native signal number, not the one translated
with bsd_to_linux_signal().
In practical terms, this fixes golang.
Reviewed By: dchagin
Fixes: 135dd0cab51
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D31298
|
|
Initial patch from submitter was adapted by me to prevent unconditional
FUTEX_REQUEUE use.
PR: 255947
Submitted by: Philippe Michaud-Boudreault
Differential Revision: https://reviews.freebsd.org/D30332
|