| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
okay deraadt@
|
| |
|
|
|
|
|
|
|
|
| |
our i386 compiler does not generate SSE instructions by default,
it is not strictly necessary to save MXCSR content between setjmp(3)
and longjmp(3). We do not want to end supporting such old processors
now. Remove the stmxcsr and ldmxcsr instructions from libc.
reported by Johan Huldtgren; OK jsg@ kettenis@
|
|
|
|
|
|
|
| |
i386 libc. The assembler code is more readable than with magic
numbers. This brings i386 in line with amd64. No change in object
file.
OK kettenis@
|
|
|
|
| |
ok kettenis
|
|
|
|
|
|
|
|
|
| |
address space permanently, and the line-in-the-sand manipulation
T_PROTFLT|T_USER fixup handling can be skipped. This change was written
to side-step the segment-descriptor mismanagement issues, commited recently
for the "go on i386"
tested by sthen
ok kettenis guenther
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
possible to switch CPUs when handling a trap since we need to lock the vm_map
of the process. In that case the CS limit would be wrong an we incorrectly
decide that there has been an execute privilige violation.
Also make sure we only modify the variables that keep track of the CS
limit and segment descriptor while holding the kernel lock.
Fixes builds of go ports on i386.
tested by sthen@
ok deraadt@
|
|
|
|
|
| |
increase.
ok kettenis
|
|
|
|
| |
ok kettenis@ deraadt@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.
If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.
The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.
Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.
This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).
Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!
OK from at least kettenis@, cheloha@, naddy@, sthen@
|
|
|
|
|
|
|
|
| |
functionality is provided by <sys/stdarg.h> using compiler builtins.
Tested in a ports bulk build on amd64 by naddy@
OK naddy@ mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rnd.c uses nanotime to get access to some bits that change quickly
between events that it can mix into the entropy pool. it doesn't
use nanotime to get a monotonically increasing set or ordered and
accurate timestamps, it just wants something with bits that change.
there's been discussions for years about letting rnd use a clock
that's super fast to read, but not necessarily accurate, but it
wasn't until recently that i figured out it wasn't interested in
time at all, so things like keeping a fast clock coherent between
cpu cores or correct according to ntp is unecessary. this means we
can just let rnd read the cycle counters on cpus and things will
be fine. cpus with cycle counters that vary in their speed and
arent kept consistent between cores may even be desirable in this
context.
so this is the first step in converting rnd.c to reading cycle
counter. it copies the nanotime backend to each arch, and they can
replace it with something MD as a second step later on.
djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits.
thanks to visa for his eyes.
ok deraadt@ visa@
deraadt@ says he will help handle any MD fallout that occurs.
|
|
|
|
|
|
| |
Nothing uses the header anymore.
OK deraadt@ mpi@
|
|
|
|
| |
ok kettenis@, visa@
|
|
|
|
|
|
|
| |
While here use the kqfilter equivalent to `seltrue' to ensure both
interfaces are coherent.
ok visa@
|
|
|
|
|
|
|
|
| |
amd64/arm64/armv7/sparc64 and move it to the end of machdep.c. Rework the
actual implementation for the MC14818 compatible RTC into something that can
be used as a todr_handle just like on amd64.
ok sthen@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even with the latest microcode this is not set on all CPUs with TSX, but
is set on CPUs which don't need MDS mitigations.
MDS mitigations also mitigate TSX Asynchronous Abort (TAA) but aren't
done if the CPU claims to not be affected by MDS (MDS_NO).
According to "Deep Dive: Intel Transactional Synchronization Extensions
(Intel TSX) Asynchronous Abort" CPUs requiring additional mitigations
for this are:
06-8e-0c Whiskey Lake (ULT refresh)
06-55-0{6,7} 2nd Gen Xeon Scalable Processors based on Cascade Lake
06-9e-0d Coffee Lake R
Currently TSX is disabled unconditionally when possible even if TAA_NO
is set.
We don't currently do MDS mitigations on i386. Attempt to disable TSX
regardless to match amd64.
|
|
|
|
|
|
| |
the kernel.
ok mlarkin@, visa@
|
|
|
|
|
|
|
| |
Its last consumer is now gone and it has certainly not been used since the
introduction of PAE back in 2015.
ok kettenis@, jsg@
|
| |
|
|
|
|
|
|
| |
(stirng -> string)
ok kettenis@ who pointed out I should fix the new arm64 smbiosvar.h too
|
|
|
|
|
|
|
| |
differences between the i386 and amd64 versions of the code and
switch to using the standard C integer exact width integer types.
ok deraadt@
|
|
|
|
| |
"yes please" guenther@
|
|
|
|
|
|
| |
like Intel does in their patches on githup. Also add a compiler
level memory barrier to the wbinvd instruction like Linux does.
OK mlarkin@ guenther@ kettenis@
|
|
|
|
| |
ok deraadt@, mlarkin@
|
|
|
|
|
| |
details from the ELF header instead of faking it.
Proposal from mlarkin, tested on most architectures already
|
|
|
|
|
|
|
|
|
|
| |
that could leave `ddb_mp_mutex' locked if one CPU incremented
`db_active' while another CPU was in the critical section. When the race
hit, the debugger was unable to resume execution or switch between CPUs.
Race analyzed by patrick@
OK mpi@ patrick@
|
| |
|
|
|
|
| |
no words or punctation were modified.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We will still be able to run i386 guests on amd64 vmm.
Reasons to delete i386 vmm:
- Been broken for a while, almost no one complained.
- Had been falling out of sync from amd64 while it worked.
- If your machine has vmx, you most probably can run amd64, so why not run that?
ok deraadt@ mlarkin@
|
|
|
|
|
|
|
| |
including cpu.h machine/intr.h etc without first including param.h when
MULTIPROCESSOR is defined.
ok visa@
|
|
|
|
|
|
|
| |
Use inline functions instead of GNU C statement expressions, and
make them available to userland. With clues from guenther@.
ok guenther@ kettenis@
|
|
|
|
| |
though amd only provides public redistributable updates for >= family 10h.
|
|
|
|
|
|
| |
being committed now so we can work on the rest in-tree.
ok mlarkin@
|
|
|
|
| |
ok deraadt@, krw@, jca@
|
|
|
|
| |
ok deraadt@ mlarkin@
|
|
|
|
| |
move printing of ecxfeatures bits to match amd64
|
| |
|
|
|
|
| |
OK deraadt@ mpi@
|
|
|
|
|
| |
'Deep Dive: CPUID Enumeration and Architectural MSRs'
ok deraadt@
|
|
|
|
|
| |
Documented in 'Speculative Execution Side Channel Mitigations'
revision 2.0.
|
|
|
|
|
|
| |
remove the MD API.
ok deraadt@
|
|
|
|
|
|
|
|
|
|
| |
Add "Mitigation G-2" per AMD's Whitepaper "Software Techniques for
Managing Speculation on AMD Processors"
By setting MSR C001_1029[1]=1, LFENCE becomes a dispatch serializing
instruction.
ok deraadt@
|
|
|
|
| |
earlier for amd64
|
|
|
|
|
|
|
| |
a custom kernel for over 20 years.
testing mlarkin@
ok deraadt@ phessler@ jca@ matthieu@
|
|
|
|
|
|
| |
this in the acpi(4) suspend/resume code paths.
ok deraadt@
|
|
|
|
|
|
|
| |
- handle protection fault on iret properly
- handle NMI
- actually enable U-K in pmap_switch()
from hshoexer@; input guenther@; OK mlarkin@ deraadt@
|
|
|
|
|
|
|
| |
original retguard data to the piglet and bcopys it back in place
immediately before resuming via the ACPI Sx trampoline.
ok deraadt, guenther, tested by many.
|