summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-07-06Add support for timeconting in userland.Paul Irofti
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@
2020-07-03zap trailing whitespace on one lineTheo Buehler
2020-07-03Make the message type available to the extension functionsTheo Buehler
Some TLS extensions need to be treated differently depending on the handshake message they appear in. Over time, various workarounds and hacks were used to deal with the unavailability of the message type in these functions, but this is getting fragile and unwieldy. Having the message type available will enable us to clean this code up and will allow simple fixes for a number of bugs in our handling of the status_request extension reported by Michael Forney. This approach was suggested a while ago by jsing. ok beck jsing
2020-07-03Improve argument order for the internal tlsext APITheo Buehler
Move is_server and msg_type right after the SSL object so that CBS and CBB and alert come last. This brings these functions more in line with other internal functions and separates state from data. requested by jsing
2020-07-02Use a relative branch to jump from setjmp(3) into _setjmp(4).Mark Kettenis
Use correct register to reference the location where we store CR.
2020-06-30Add missing comparison instruction. Load %r12 with the indirect branchMark Kettenis
address to load the correct TOC address.
2020-06-29Disable assembly code for powerpc64; more work is needed to make it work.Mark Kettenis
2020-06-29Use C versions of bcopy(3) and memmove(3) for now as the assembly versionMark Kettenis
of bcopy(9) doesn't work in its current state. ok deraadt@
2020-06-28Use std instead of stw to store CR since we use std in sigsetjmp(3) andMark Kettenis
we use ld to load it again in longjmp(3).
2020-06-28Add stub implementation; derived from kvm_sh.c which has our preferredMark Kettenis
copyright license.
2020-06-28Fix grammar in comment.Mark Kettenis
2020-06-28Add powerpc64 support.Mark Kettenis
2020-06-28Add powerpc64 fenv bits; copied from powerpc. From drahn@Mark Kettenis
2020-06-28Switch back to bn_mul_mont_int since the bn_mul_mont_fpu64 code isn'tMark Kettenis
hooked up and the lack of a bn_mul_mont_int implementation results in undefined references.
2020-06-28Add dummy getWCookie() implementation for powerpc64.Mark Kettenis
From drahn@
2020-06-28The 2nd and 3rd argument are pointers, so use the appropriate doublewordMark Kettenis
instructions. ok drahn@
2020-06-28Use .Dv for SIOCTL_SEL, as we do for all other macrosAlexandre Ratchov
2020-06-28Allow switching between alternate devices (-F option) with sndioctl(1)Alexandre Ratchov
2020-06-28Add a new SIOCTL_SEL control type to select one of a predefined set ofAlexandre Ratchov
mutually exclusive values. It's the same as SIOCTL_LIST except that exactly one list element may be selected.
2020-06-27Prevent the use of jump tables on powerpc64 as well.Mark Kettenis
ok patrick@, drahn@
2020-06-27Add missing label.Mark Kettenis
2020-06-26Provide an optimized implementation of ffs(3) in libc onChristian Weisgerber
aarch64/powerpc/powerpc64, making use of the count leading zeros instruction. Also add a brief regression test. ok deraadt@ kettenis@
2020-06-26Fix powerpc64 pie binraries, in register renumbering one line was missed.Dale Rahn
2020-06-26Fix TCB_OFFSET_ERRNO. Adjust comments to reflect that powerpc64 uses %r13Mark Kettenis
as the per-thread register. ok patrick@, drahn@
2020-06-26Avoid "bare" register numbers.Mark Kettenis
2020-06-26Accidentally doubled these files on first commit. Correcting.Dale Rahn
2020-06-25Add missing kvm_dump(3) and kvm_getfiles(3) under SEE ALSO for completenesskn
2020-06-25Switch the order of the two tests in tls13_client_hello_required_extensionsTheo Buehler
to match the order they are listed in the RFC. No functional change.
2020-06-25Intial attempt at powerpc64 libcrypto pieces.Dale Rahn
just commit this kettenis@
2020-06-25disable altivec and vsx as it causes issues in qemu testing.Dale Rahn
This probably should be backed out after fully debugged, vector instructions caused problems with debug configuration.
2020-06-25PowerPC64 startup code.Dale Rahn
Determine location of toc based on PC relative location and load into %r2
2020-06-25PowerPC64 libc powerpc sys filesDale Rahn
Initial attempt to port powerpc code to powerpc64 Expects TOC loading in ENTRY(), ok kettenis@ (some cleanup required)
2020-06-25PowerPC64 libc string/net filesDale Rahn
Initial attempt to port powerpc code to powerpc64 Expects TOC loading in ENTRY(), memmove.S is the powerpc 32 bit, optimization is possible for 64 bit and handle len of > 32 bits.
2020-06-25*** empty log message ***Dale Rahn
2020-06-25PowerPC64 libc/arch/powerpc/gdtoa filesDale Rahn
This is a almost a direct copy from powerpc with 64 bit mods, with two additions present in 64 arch. NOTE: long double 128 is not supported currently.
2020-06-25Committed wrong version of file, atomic_lock is 32 bit.Dale Rahn
2020-06-25PowerPC64 libc gen filesDale Rahn
Initial attempt to port powerpc code to powerpc64 Expects TOC loading in ENTRY(), ok kettenis@
2020-06-25PowerPC64 libc (libc powerpc top)Dale Rahn
Expects ELFv2 TOC loading in ENTRY(), build with -gdwarf-4 Split SYS.h into SYS.h and DEFS.h fix tabs after #define
2020-06-24Properly document the return values of EVP_PKEY_base_id(3)Ingo Schwarze
and EVP_PKEY_id(3), then describe the "type" parameters of various functions more precisely referencing that information. In particular, document X509_get_signature_type(3) which was so far missing. OK tb@
2020-06-24use n-bit <noun> consistently; ok schwarze for the principal of the idea,Jason McIntyre
and for flagging which pages to check;
2020-06-24Make tls13_legacy_shutdown() match ssl3_shutdown() semantics.Joel Sing
When first called, queue and send a close notify, before returning 0 or 1 to indicate if a close notify has already been received from the peer. If called again only attempt to read a close notify if there is no pending application data and only read one record from the wire. In particular, this avoids continuing to read application data where the peer continues to send application data. Issue noted by naddy@ with ftp(1). ok jca@ tb@
2020-06-24new manual page ChaCha(3);Ingo Schwarze
OK tb@
2020-06-24new manual page CMAC_Init(3);Ingo Schwarze
OK tb@
2020-06-24Document eight additional pre-OpenSSL-1.1 accessor functions that areIngo Schwarze
still widely used according to code searches on the web, so people reading existing code will occasionally want to look them up. While here, correct the return type of X509_CRL_get0_lastUpdate(3) and X509_CRL_get0_nextUpdate(3), which return const pointers. Also, add some precision regarding RETURN VALUES.
2020-06-24Enforce restrictions for ClientHello extensionsTheo Buehler
RFC 8446 section 9.2 imposes some requirements on the extensions sent in the ClientHello: key_share and supported_groups must either both be present or both be absent. If no pre_shared_key was sent, the CH must contain both signature_algorithms and supported_groups. If either of these conditions is violated, servers must abort the handshake with a missing_extensions alert. Add a function that enforces this. If we are going to enforce that clients send an SNI, we can also do this in this function. Fixes failing test case in tlsfuzzer's test-tls13-keyshare-omitted.py ok beck inoguchi jsing
2020-06-22spelling fix;Jason McIntyre
2020-06-22Extend kqueue interface with EVFILT_EXCEPT filter.Martin Pieuchot
This filter, already implemented in macOS and Dragonfly BSD, returns exceptional conditions like the reception of out-of-band data. The functionnality is similar to poll(2)'s POLLPRI & POLLRDBAND and it can be used by the kqfilter-based poll & select implementation. ok millert@ on a previous version, ok visa@
2020-06-20basic macro cleanup: .Fo for long .Fn lines, .Fa for struct fields,Ingo Schwarze
avoid \*(Gt and \*(Lt, .Dv NULL, .Cm for pledge promises
2020-06-20add missing ENVIRONMENT. HISTORY, and AUTHORS sections,Ingo Schwarze
and a few other wording and markup improvements while here; OK jmc@ ratchov@
2020-06-19We inherited the constant time CBC padding removal from BoringSSL, butTheo Buehler
missed a subsequent fix for an off-by-one in that code. If the first byte of a CBC padding of length 255 is mangled, we don't detect that. Adam Langley's BoringSSL commit 80842bdb44855dd7f1dde64a3fa9f4e782310fc7 Fixes the failing tlsfuzzer lucky 13 test case. ok beck inoguchi