summaryrefslogtreecommitdiffstats
path: root/sys/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix warnings when building zlib with ZLIB_CONST definedjca2019-06-013-8/+8
| | | | | Probably not very useful (given the lack of feedback) but feels more correct. Kernel part tested with option ZLIB_CONST.
* Add ZLIB_CONSTjca2019-05-122-6/+13
| | | | Introduced in zlib-1.2.5.2, used by a few ports. ok deraadt@
* we have never built without %b supportderaadt2019-05-112-7/+2
|
* Add movstrSI12_i4 for linking -Os/-Oz kernels. Sadly however itderaadt2019-04-251-0/+19
| | | | fails and locks early in boot.
* libsa's memcpy() is actually memmove(). make a proper memmove(), and givederaadt2019-04-204-13/+63
| | | | memcpy() correct behaviour. This also brings the bcopy() macro into line.
* change marks[] array to uint64_t, so the code can track full 64-bitderaadt2019-04-103-9/+9
| | | | | details from the ELF header instead of faking it. Proposal from mlarkin, tested on most architectures already
* I am retiring my old email address; replace it with my OpenBSD one.millert2019-01-253-6/+6
|
* Make the freelist best fit code a tiny bit smarter to not use a block ifotto2018-12-161-2/+2
| | | | | half or more would be wasted. Causes more effective re-use of blocks. ok jsing@
* Retry on incorrect passphrase for softraid crypto boot.jsing2018-08-102-72/+122
| | | | | | | | | | | | | | | | | | | Historically, the softraid crypto support in the boot loaders has only given one attempt to provide the correct passphrase. There were a few reasons for this, including the fact that pkcs5_pbkdf2() allows an empty passphrase and that returning EPERM allowed for another attempt. With the event of KARL and the need for bsd.booted with hibernate resumption, this becomes much more of an issue - if you get the passphrase wrong you fail to resume. There are also other situations like using /etc/boot.conf to switch serial console, but an incorrect passphrase results in the config not being read. Also, bcrypt_pbkdf() does not permit empty passphrases. This reworks the softraid crypto support in the boot loaders so that it loops requesting a valid passphrase until one is provided, or an empty passphrase is entered (at which point it will abort). ok mortimer@ tb@
* Use _ALIGN_TRAPS instead of _ALIGN_TEXT where nops aren't needed.guenther2018-07-133-6/+6
| | | | ok deraadt@
* In asm.h ensure NENTRY uses the old-school nop-sled align, but change standardderaadt2018-07-103-5/+5
| | | | | | | ENTRY is a trapsled. Fix a few functions which fall-through into an ENTRY macro. amd64 binaries now are free of double+-nop sequences (except for one assember nit in aes-586.pl). Previous changes by guenther got us here. ok mortimer kettenis
* Add retguard macros for libkernmortimer2018-07-0315-12/+43
| | | | ok deraadt
* Align libsa ctime output with libc ctime output.cheloha2018-05-231-3/+2
| | | | | | | Use zero-padding to get double-digit HH:MM:SS and space-padding for the DOM. ok visa@
* use size_t for the size of buffers and strings, not int.dlg2018-04-252-6/+8
| | | | | | sprinkle some bounded attributes while here. ok deraadt@
* Stop converting UDP and IP header values from network endianness to hostpatrick2018-03-311-10/+7
| | | | | | | | | | endianness for convenience reasons. Especially in code pathes like TFTP where the source port is read from the received UDP packet and used as destination port in a new UDP packet this can be very harmful. Luckily this issue has had no effect on our architectures since they never use any of the code paths that could be harmful. ok visa@
* Implement basic padding support in libsa so we can do zero-paddingpatrick2018-01-171-18/+55
| | | | | | in bootloader printfs. Feedback from and ok gerhard@
* "unknown KDF type 2" -> "keydisk not found".sunil2017-11-101-1/+4
| | | | Inputs and ok jsing@.
* Add aliases for __aeabi_idivmod and __aeabi_uidivmod calls clang emits.jsg2017-10-261-1/+3
| | | | | Remainder of the division is already stored in r1 in __divsi3/__udivsi3. ok kettenis@
* Revert: libsa lacks memmove currently; a more thorough rename/change isguenther2017-10-081-2/+2
| | | | | | needed problem noted by naddy@
* bcopy() is expected to be overlap safe, so it implement it with memmove()guenther2017-10-071-2/+2
| | | | | | not memcpy(). 'oh oh' deraadt@
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-082-4/+2
|
* Fix the __sync_* functions to make them work properlyvisa2017-08-201-1/+21
| | | | as full memory barriers.
* make the AES-XTS mode a little more constant-time, though the AESdjm2017-05-311-5/+4
| | | | | | implementation that it depends on currently isn't. ok mikeb tom
* move sha224_initial_hash_value[] under !SHA2_SMALL; ok deraadt@ millert@naddy2017-05-271-13/+13
|
* Enable radeondrm(4) on loongson to get accelerated graphicsvisa2017-05-211-0/+317
| | | | | | with the RS780E chipset. OK kettenis@, jsg@
* Guard debug printf with NFS_DEBUG ifdef like the other debug prints.patrick2017-05-081-1/+3
| | | | ok tom@
* In preparation of compiling our kernels with -ffreestanding, explicitly mapkettenis2017-01-247-7/+22
| | | | | | | | | a few performance-critical functions to compiler builtins. Since the builtins supported by gcc3, gcc4 and clang are not the same, there are (unfortunately) some compiler checks to make sure we only do the mapping for builtins that are actually supported by the compiler. ok jca@, tom@, guenther@
* Add missing OpenBSD CVS tagsreyk2016-11-272-0/+4
|
* Fix signedness warnings with careful casts and replace a re-defined variable.reyk2016-11-252-17/+17
| | | | OK krw@
* Copy data by using 64-bit loads and stores rather than 32-bitvisa2016-11-141-1/+53
| | | | | | | operations. This about doubles the routine's throughput. No binary change on the 32-bit bootblocks Discussed with miod@ long ago
* Add an implementation of __aeabi_ldivmode() and __aeabi_uldivmod(); clangkettenis2016-09-242-0/+183
| | | | | | | | | generates calls to these functions when compiling an armv7 kernel. Code from NetBSD's unified userland+kernel implementation, with lots of irrelevant (for us) #ifdefs removed. ok patrick@, guenther@
* Add aeabi aliases.kettenis2016-09-221-1/+4
| | | | ok guenther@, patrick@
* Add bcrypt pbkdf support to the softraid crypto boot loader code.jsing2016-09-181-5/+28
| | | | Based on a diff from djm@
* Correctly handle short read()s in the libsa gzip handling lseek(). Alsojsing2016-09-181-5/+8
| | | | | | avoid masking the errno from a failed read(). ok guenther@ tom@
* move the .SUNW_ctf section name definition to exec_elf.h and document it in elf(5)jasper2016-09-171-2/+2
| | | | | feedback from guenther@ ok guenther@ kettenis@
* unifdef SAVE_MEMORY which is no longer set nor usedjasper2016-09-161-9/+1
| | | | ok deraadt@ millert@
* when loading the kernel binary, also load the .SUNW_ctf section when present,jasper2016-09-131-2/+3
| | | | | | which holds the CTF data. ok mpi@
* Provide initial libsa softraid - this is currently just the data structuresjsing2016-09-112-0/+260
| | | | and softraid crypto key handling code.
* Add bcrypt_pbkdf to libsa, from libutil. This will soon allow the bootjsing2016-09-102-0/+189
| | | | loader to support softraid crypto volumes using bcrypt pbkdf.
* Add blowfish to libsa, taken from libc - needed for bcrypt_pbkdf.jsing2016-09-102-0/+767
|
* Add sha2 to libsa, taken from libc - needed for bcrypt_pbkdf.jsing2016-09-102-0/+1107
|
* Rename libsa pbkdf2.c to pkcs5_pbkdf2.c so that we match libutil.jsing2016-09-102-15/+13
|
* Sync libsa pkcs5_pbkdf2() with libutil.jsing2016-09-102-12/+14
|
* retire sparctedu2016-09-0121-3422/+0
|
* Declare lseek() instead of assuming it'll be provided elsewhereguenther2016-08-271-1/+2
| | | | ok deraadt@
* remove hppa64 port, which we never got going beyond broken single users.deraadt2016-05-117-2035/+0
| | | | | | hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis
* remove vax handlingnatano2016-03-231-5/+2
| | | | ok millert
* " the the " -> " the ", or in a couple of cases replace the superfluouskrw2016-03-201-2/+2
| | | | | | "the" with the obviously intended word. Started with a "the the" spotted by Mihal Mazurek.
* Change a bunch of (<blah> *)0 to NULL.krw2016-03-146-21/+21
| | | | ok beck@ deraadt@
* more pieces of vaxderaadt2016-03-107-319/+0
|