Age | Commit message (Collapse) | Author |
|
syscall) confirm the stack register points at MAP_STACK memory, otherwise
SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified
to create a MAP_STACK sub-region which satisfies alignment requirements.
Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the
contents of the region -- there is no mprotect() equivalent operation, so
there is no MAP_STACK-adding gadget.
This opportunistic software-emulation of a stack protection bit makes
stack-pivot operations during ROPchain fragile (kind of like removing a
tool from the toolbox).
original discussion with tedu, uvm work by stefan, testing by mortimer
ok kettenis
|
|
a hardware-accelerated implementation of several encryption
and authentication algorithms for ipsec(4):
AES-CBC
AES-CTR
AES-GCM
AES-GMAC
HMAC-MD5
HMAC-SHA1
HMAC-SHA2-256
HMAC-SHA2-384
HMAC-SHA2-512
Please note that the driver is currently disabled.
OK deraadt@
|
|
Extend the logic already present for panic() to any DDB-related
operation such that if ddb(4) is entered because of a fault or
other trap it is still possible to call 'boot reboot'.
While here stop printing splassert() messages as well, to not fill
the buffer.
ok visa@, deraadt@
|
|
needs (looking at you sgi, but others required this before). This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes. The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan
|
|
or reordering accesses to the variable. Assume that the assembler
preserves the correct sequence of instructions, which allows the
removal of the explicit noreorder/reorder toggles from the C code.
With ci_ipl being volatile, drop mips_sync() calls that follow
the accesses of the variable. The sync is redundant as a compiler
barrier. In addition, the MIPS64 CPU designs should not need the
sync for pipeline or write buffer control. According to miod@,
the use of the instruction is a carryover from code targeting
early MIPS designs that lack tight integration with the cache
and write buffer.
Discussed with and testing help from miod@.
Tested on CN5020, CN6120, CN7130, CN7360, Loongson 2F and 3A1000,
R4400, R8000, R10000 and R16000.
|
|
barrier is overkill when forcing parameter visibility before IPIs.
|
|
|
|
|
|
Archs not yet converted can to the jump by defining __USE_MI_MUTEX.
ok visa@
|
|
`mtx_owner' becomes the first field of 'struct mutex' on i386/amd64/arm64.
ok visa@
|
|
so that <machine/signal.h> is not needed in setjmp.S.
Suggested by kettenis@ long ago, OK deraadt@
|
|
|
|
Remove `mtx_lock' from i386, add volatile before `mtx_owner' where it
was missing.
Inputs from kettenis@, ok visa@
|
|
ok millert@ krw@
|
|
ok kettenis@
|
|
the memory devices (/dev/null, /dev/zero, etc) need to permit them.
problem noted, tweak, and testing by jeremy@
ok deraadt@
|
|
The architectures have been using the MI mplock for a while.
OK deraadt@, kettenis@
|
|
OK mpi@
|
|
and III. The logic does not look nice, but the parameters do not follow
the standard config register layout anyway.
Remove unnecessary default values, and assume that the Config1
and Config2 registers are available on every CPU.
Tested on CN5020, CN6120, CN7130 and CN7360.
|
|
have not been affected.
From miod@
|
|
No functionnal change.
ok visa@
|
|
pthread_exit from libpthread to libc, along with low-level bits to
support them. Major bump to both libc and libpthread.
Requested by libressl team. Ports testing by naddy@
ok kettenis@
|
|
FPUEMUL option is enabled. This benefits OCTEON III systems which can
run floating-point operations natively.
Feedback from and OK miod@; he also helped with testing.
Tested on octeon without FPU (CN5020, CN6120) and with FPU (CN7130),
as well as on sgi/IP27 (MP R16000), sgi/IP32 (R5000), and
loongson (3A1000).
|
|
|
|
|
|
from user space. This improves performance slightly.
Discussed with miod@
|
|
|
|
instruction for branch emulation. This ensures the userspace memory
access is properly guarded and that TLB faults are handled.
In order not to complicate the interface of MipsEmulateBranch(), each
caller now has to provide the branch instruction for the function.
Feedback from miod@
|
|
|
|
but no mapping for the input user virtual address.
|
|
OK guenther@
|
|
OK guenther@
|
|
|
|
It does not seem necessary to provide initial value for `sicode'.
When `signal' gets set, `sicode' is set as well.
OK deraadt@, kettenis@
|
|
architectures.
OK kettenis@, deraadt@
|
|
"fire away!" tedu
|
|
This reduces emulation time about 5%.
|
|
|
|
not to perform redundant work. There is no direct way to flush the
cache; rather, the kernel evicts unwanted bits from the cache by
executing a block of instructions, which is expensive.
With this diff, make build time decreases about 0.4%.
Diff from miod@
|
|
the number of IPIs required when removing mappings.
|
|
virtual addresses really should not have TLB hits. This reduces IPIs.
|
|
|
|
|
|
the whole TLB space even before this. However, TLB initialization on
boot and TLB flush on ASID wraparound have been incomplete. These have
caused crashes of processes.
|
|
|
|
ok deraadt@, kettenis@, jasper@
|
|
ok visa@, kettenis@
|
|
without a lock in smp_rendezvous_cpus().
|
|
might execute stale instructions. The cache is virtually tagged and does
not seem to pick up TLB alterations automatically.
|
|
pointer at the end to catch errors faster.
|