summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/strncpy.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-07-19Move the adapter related items (luns, adapter, adapter_target,krw47-281/+308
adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
2020-07-19Should use ufs_args here after all.visa1-4/+4
While here, make messages more correct.
2020-07-19MOUNT_ARGS_msdos replaced by installboot(8)deraadt1-2/+1
2020-07-19Add GENERIC.MP kernel config for loongson.visa2-0/+11
Not enabled for now. OK deraadt@
2020-07-19Delete support for LC_MESSAGES which we shall never implement.schwarze2-32/+19
This nicely simplifies the code, deleting three header inclusions and calls to various complicated library functions. Dead code reported by Jan Stary <hans at stare dot cz>. Garbage collect pointless (void) casts and a .Tn macro while here. Tweaks and OK martijn@, OK millert@ and kn@ on an earlier version.
2020-07-19Try to deal with no reply from PF_KEY on pfkey_sa_add.tobhe1-12/+41
ok markus@
2020-07-19Enable xhci(4) in the BOOT kernel. While there is some USB-relatedkettenis1-2/+2
flakiness, this doesn't actually seem to be related to booting an OpenBSD kernel straight from the bootloader kernel.
2020-07-19Don't add server.device knob if there's only one audio deviceratchov1-7/+10
2020-07-19Fix initial alternate device numberratchov1-2/+2
The initial alternate device number was set to 1 (instead of -1), causing device number 1 to be skipped the first time sndiod is used.
2020-07-19regendaniel2-2/+22
2020-07-19Add a few more Atheros ids; ok deraadtdaniel1-1/+5
2020-07-18oops - the description of -i had a similarly incorrect text as -I concerningjmc1-9/+1
use of -f; remove that too; pointed out by guenther
2020-07-18Make /dev/ksyms work.kettenis2-6/+8
2020-07-18Load kernel as an initrd such that we have symbols in ddb.kettenis1-4/+29
2020-07-18the text describing the effect of -f on -I is apparently wrong - no such codejmc1-10/+2
was ever added; the text was added 21 years ago when ip6 support was added; marfabastewart noticed it, and guenther tracked down the commit responsible; this commit removes that text;
2020-07-18Add size to free(9) callskn2-31/+35
pfkeyv2_send() allocates multiple buffers using the same variable `i' to calculate their sizes, use dedicated size variables for each buffer to reuse them with free(9). For this, make pfkeyv2_policy() pass back the size of its freshly allocated buffer. Tested, feedback and OK tobhe
2020-07-18The kernel and bootblocks never reference this file...deraadt1-41/+0
2020-07-18__main() is not need anymorederaadt1-8/+1
2020-07-18syncderaadt1-0/+1
2020-07-18use correct structure for mounting, duhderaadt3-6/+6
ok visa kettenis
2020-07-18Use the same names as the 64-bit PowerPC ELF ABI for the relocations.kettenis3-130/+156
2020-07-18int64_t and intmax_t are always (signed) long long on OpenBSD.kettenis1-0/+2
ok deraadt@
2020-07-18We can now use installboot directly, rather than using mounting the msdosderaadt1-14/+6
filesystem manually. ok kettenis
2020-07-18Create grub.cfg file as requiredderaadt1-15/+50
ok kettenis
2020-07-18Add size to free(9) callskn1-11/+16
import_identities() calls import_identity() which allocates a buffer and potentially frees it itself; if not, import_identities() uses it and frees it afterwards. Instead of crunching down the buffer size twice, make import_identity() calculate and pass it back, similar to how pfkeyv2.c:pfkeyv2_get() does it. Tested and OK tobhe
2020-07-18Add size to free(9) callskn1-5/+6
pfkeyv2_get() and pfkeyv2_dump_policy() allocate buffers and can pass back their sizes, those sizes are already used during copyout() and such. Make one pfkeyv2_dump_policy() call pass back the size and reuse all sizes in the respective free(9) calls. Tested and OK tobhe
2020-07-18installboot should be on the mediaderaadt1-1/+2
2020-07-18force NCPU=1 for now. (identifying multiple cpus but not having a bsd.mpderaadt1-2/+2
is troubling for the installer)
2020-07-18copy out bootblocksderaadt1-2/+3
2020-07-18enter standderaadt1-2/+2
2020-07-18set -/+o pipefail around the magic loop in ls_missing() so that we can properlyajacoutot1-8/+12
error out if ftp(1) or tar(1) fails; this happened to swarte@ a few months (something to do with /home on NFS without -maproot IIRC). Check that the signature file is at least 3 lines long (meaning that it contains at least 1 syspatch) before entering the magic loop otherwise `grep -q' will abort the script due to pipefail. While here, revove a useless use of sort(1).
2020-07-18Improve kernel linker script. Split binary in a .text, .rodata and .datakettenis2-6/+34
segment, but continue to cover these with a single PT_LOAD segment such that we can continue to load kernels from the firmware Linux kernel. This is important since our bootloader is a stripped down OpenBSD kernel as well. Proper page protections are installed by pmap_bootstrap(). This allows us to add "relro" sections to the .rodata segment.
2020-07-18Pass boothowto and bootduid parameters to the booted kernel via thekettenis4-36/+38
device tree. Make sure the RB_GOODRANDOM flag only gets set if we read a non-stale /etc/random.seed and we actually filled an .openbsd.randomdata segment.
2020-07-18Add functions to set/add properties on an FDT node.kettenis2-6/+122
ok visa@
2020-07-18Remove an unused function.visa1-12/+1
2020-07-18Userland timecounter implementation for octeonvisa10-11/+69
OK naddy@; no objections from kettenis@
2020-07-18replace stat collection with the kstat api.dlg3-213/+374
before this the stats were always collected, but you could only see stats with gdb against the running kernel, or by enabling IX_DEBUG in the build. neither of these are supported by default.
2020-07-18Raw device access is not anymore a fall-back for when sndiod isn't runningratchov1-8/+2
Found by Jan Stary <hans at stare.cz>, discussed with jmc@
2020-07-18Properly escape a backslash.daniel1-3/+3
Found by CompCert which notes that \E is not a valid escape sequence. ok nicm@
2020-07-17'seonds' -> 'seconds'.krw1-3/+3
From Larry Hynes via tech@.
2020-07-17Pay attention to "openbsd,boothowto" and "openbsd,bootduid" propertieskettenis1-1/+9
like we do on arm64 and armv7.
2020-07-17Userland timecounter for macppcgkoehler3-6/+26
Tested by cwen@ and myself. Thanks to pirofti@ for creating the userland timecounter feature. ok kettenis@ pirofti@ deraadt@ cheloha@
2020-07-17"wroute" allows changes to the routing table; ok deraadtjmc1-2/+2
2020-07-17Allow setsockopt SO_RTABLE when pleding "wroute" soon to be neededflorian1-1/+11
by slaacd(8). "wroute" allows changes to the routing table so this is a good fit. Nothing else in base is effected by this. dhclient might use the wroute pledge in the future and might also want SO_RTABLE in a more distant future. OK deraadt
2020-07-17route and wroute were undocumented; ok florianderaadt1-2/+7
2020-07-17Copy the right value to fix getsockopt(2) for SO_RTABLE and IPV6_PIPEXkn1-3/+3
r1.146 "Enable IPv6 routing domain support" adapted the mtod() line from the IPV6_PIPEX case which was bogus since introduction in r1.118. Issue found by florian, who came up with the same partial diff for SO_RTABLE while working on rdomain aware slaacd(8). Taken from sys/netinet/ip_output.c which does it correctly. OK florian millert
2020-07-17Randomize the system stoeplitz keytb1-1/+30
One can prove that the Toeplitz matrix generated from a 16-bit seed is invertible if and only if the seed has odd Boolean parity. Invertibility is necessary and sufficient for the stoeplitz hash to take all 65536 possible values. Generate a system stoeplitz seed of odd parity uniformly at random. This is done by generating a random 16-bit number and then flipping its last bit if it's of even parity. This works since flipping the last bit swaps the numbers of even and odd parity, so we obtain a 2:1 mapping from all 16-bit numbers onto those with odd parity. Implementation of parity via popcount provided by naddy; input from miod, David Higgs, Matthew Martin, Martin Vahlensieck and others. ok dlg
2020-07-17Fix definition of KIOC_GETBOOTDUID ioctl.kettenis1-2/+2
2020-07-17Use interface index instead of pointer to corresponding interfacemvs4-32/+68
within pipex(4) layer. ok mpi@
2020-07-17Check destruction ability before search instance of clone interface.mvs1-4/+4
ok mpi@