summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-03amd64: lapic: refactor timer programmingcheloha
We reprogram the lapic timer by hand in three separate places. This is error-prone and difficult to read. To clean things up, introduce routines for reprogramming the lapic timer in a given mode. lapic_timer_oneshot() starts a oneshot countdown. lapic_timer_periodic() starts a repeating countdown. Both of these routines call lapic_timer_start(), wherein we actually write the lapic registers. With input from dlg@. Earlier version eyeballed by mlarkin@. Suspend/resume tested by gnezdo@.
2020-09-03oops, i tripped over $Mdocdate$ again; so sync the date after the commitIngo Schwarze
2020-09-03Fix two issues with .po (page offset) formatting:Ingo Schwarze
1. Truncate excessive offsets to a width reasonable in the context of manual pages instead of printing excessively long lines and sometimes causing assertion failures; found in an afl run performed by Jan Schreiber <jes at posteo dot de>. 2. Remember both the requested and the applied page offset; otherwise, subtracting an excessive width, then adding it again, would end up with an incorrectly large offset. While here, simplify the code by reverting the previous offset up front, and also add some comments to make the general ideas easier to understand.
2020-09-03Sprinkle some more eieio(); seems to avoid triggering the KASSERT(new > old).Mark Kettenis
2020-09-03Missed one case of errno not being set in previous.Martijn van Duren
double check and OK tb@
2020-09-03If .ti had an excessive argument, using it was attempted, in someIngo Schwarze
cases resulting in an assertion failure. Instead, truncate the temporary indent to a width reasonable in a manual page. I found the issue in an afl run that was performed by Jan Schreiber <jes at posteo dot de>.
2020-09-03Clean up asn1/x_info.cTheo Buehler
Instead of using malloc(3) and manually setting part of the structure to zero, part to something else and leaving the rest uninitialized, we can benefit from the fact that there's this thing called calloc(3). Moreover, all variants of free(3) in libcrypto are NULL safe. ok beck inoguchi
2020-09-03Remove unnecessary zeroing after recallocarray(3)Theo Buehler
Zap a memset that was redundant since OpenSSL 0.97b was merged by markus in 2003. Nowadays it's otto's recallocarray(3) that does the zeroing. ok beck inoguchi otto PS: ASN1_BIT_STRING_set_bit(3) was committed on Dec 21 1998 by Ralf S. Engelschnall and used this bizarre allocation idiom: if (a->data == NULL) c=(unsigned char *)Malloc(w+1); else c=(unsigned char *)Realloc(a->data,w+1); People complained about Malloc, Realloc and Free being used elsewhere, so on Jun 1 2000, Richarde Levitte swept the OpenSSL tree and it became this. if (a->data == NULL) c=(unsigned char *)OPENSSL_malloc(w+1); else c=(unsigned char *)OPENSSL_realloc(a->data,w+1); Then it was found that existing data should be cleaned, and on Nov 13 2002 Ben Laurie changed the last line to c=(unsigned char *)OPENSSL_realloc_clean(a->data, a->length, w+1);
2020-09-03Make sure ober_read_elements sets errno on every case where NULL isMartijn van Duren
returned. OK deraadt@ tb@
2020-09-03The "USL" VT switch and keyboard ioctls are a hack and don't follow theMark Kettenis
proper BSD way where the third argument is always a pointer and data is transferred between userland and kernel using copyin(9) and copyout(9). Intead an int is encoded in the thirs argument. This works on 32-bit architectures and little-endian 64-bit architectures. But not on big-endian 64-bit architectures. Deal with this by handling the argument as long (which matches the size of a pointer). Hopefully we can eliminate these ioctls in the near future. ok deraadt@
2020-09-03Log OCSP url on connection failure.tobhe
2020-09-03No need for a private #define for the INQUIRY response_format value '2'. JustKenneth R Westerback
use the new SID_SCSI2_RESPONSE.
2020-09-03Do not free old session working directory until after expanding the newNicholas Marriott
one because it may be needed.
2020-09-03Replace '.response_format = 2' with '.response_format = SID_SCSI2_RESPONSE'.Kenneth R Westerback
2020-09-03Switch use of '\0' to NULLTheo Buehler
Fix a clang 10 warning about comparing a pointer to a null character. The condition "if ((s = symnam[i]) == '\0')" used to be "if (s = symnam[i])" and the incorrect spelling of NULL was chosen in a -Wall cleanup 19 years ago (-r 1.6). Upstream uses a naked 0 instead of NULL, so does NetBSD. ok martijn millert
2020-09-02Add #define SID_SCSI2_RESPONSE 0x2 to allow elimination of another bunch ofKenneth R Westerback
magic numbers. As the nearby comment says '< 2 is obsolete. >2 is reserved'. So 0x2 is just right.
2020-09-02When building emulated INQUIRY results use the SCSI_REV_* #define's toKenneth R Westerback
initialize the 'version' field. Not numbers.
2020-09-02When building emulated INQUIRY results use the SCSI_REV_* #define's toKenneth R Westerback
initialize the 'version' field. Not numbers.
2020-09-02Fix clang warning in vmctl(8)Theo Buehler
If the path to a tty doesn't contain a '/' or ends in a '/' use the full path. (The intent is to chop off the leading "/dev/") ok deraadt (who had the same diff) martijn millert
2020-09-02Check started flag before looking for capability.Nicholas Marriott
2020-09-02Add 30s timeout for OCSP requests.tobhe
ok patrick@
2020-09-02Do not indent by SIZE_MAX/2 when .ce occurs inside explicit no-fill mode.Ingo Schwarze
While here, drop two unused arguments from the function term_field(); the related work was already done by term_fill() before this commit. I found the bug in an afl run that was performed by Jan Schreiber <jes at posteo dot de>.
2020-09-02vfs_shutdown() is neccessary to ensure buffer cache drain before reexec()Theo de Raadt
ok kettenis visa
2020-09-02Add a -w flag to set- and load-buffer to send to clipboard using OSC 52.Nicholas Marriott
GitHub issue 2363.
2020-09-02Don't rely on wTotalLength for usbd_get_cdesc() malloc/free but on theMarcus Glocker
actual length which has been allocated. We saw cases where the wTotalLength value is changing on a second read, e.g. when a USB device was waked up from sleep mode. ok mpi@
2020-09-02KNF and comment tweaksTheo Buehler
2020-09-02remove some ifconfig internals; ok knJason McIntyre
2020-09-01Fix signotify() for powerpc64 bsd.mpgkoehler
Copy signotify() from amd64, so that if proc *p is on another cpu, then signotify(p) notifies the correct cpu. ok kettenis@
2020-09-01zap nasty whitespaceTheo Buehler
2020-09-01Zero out data to avoid leaving stack garbage in the tail ofTheo Buehler
the session id in case the copied session id is shorter than SSL_MAX_SESSION_ID_LENGTH. long standing bug pointed out by jsing
2020-09-01Implement address translation for bus_space_mmap(9).Mark Kettenis
2020-09-01Store the device tree node in the pcitag_t.Mark Kettenis
2020-09-01Fix a leak due to a missing free on m_defrag(m, M_NOWAIT) failure.Theo Buehler
Reported by Maxime Villard, fix from Matt Dunwoodie after feeedback from claudio who is fine with either of the two suggested fixes going in.
2020-09-01Add PMAP_NOCACHE flag to the address returned by the genericMark Kettenis
bus_space_mmap(9) implementation to make sure we enter mappings with the right memory attributes.
2020-09-01Ignore unreasonably large spacing modifiers in tbl layouts.Ingo Schwarze
Jan Schreiber <jes at posteo dot de> ran afl on mandoc and it turned out mandoc tried to use spacing modifiers so large that they would trigger assertion failures in term_ascii.c, function locale_advance().
2020-09-01Fix write un-protecting of kernel memory. p was used uninitializedPatrick Wildt
at the beginning of the loop. We need to use cr3 at the start of each iteration for the top level page directory. From and ok sf@
2020-09-01The bumping of sess_cb_hit stats can wait until handling ofTheo Buehler
get_session_cb is completed.
2020-09-01In the explanatory comment of ssl_get_prev_session fix the spelling ofTheo Buehler
the function name, document alert and make it fit into 80 columns.
2020-09-01Split session retrieval out of ssl_get_prev_session()Theo Buehler
In case the session ticket was empty or missing, an attempt is made to retrieve the session from the internal cache or via a callback. This code can easily be flattened a bit and factored into two functions. I decided to wrap those into a third function to make the call from the switch easier on the eye. I could have kept the try_session_cache flag, but it now seems rather pointless and awkwardly named anyway, so I took its negation and named it ticket_decrypted. To top things off, a little bit of polish in the exit path. ok beck inoguchi jsing (with the usual healthy dose of nits)
2020-09-01Missed WRITE_BIG -> WRITE_10Kenneth R Westerback
2020-09-01Log SPIs to make it easier to map OCSP messages to SAs.tobhe
2020-09-01copy session id directly in ssl_get_prev_sessionTheo Buehler
ssl_get_prev_session() hands the session id down to tls_decrypt_ticket() which then copies it into the session pointer that it is about to return. It's a lot simpler to retrieve the session pointer and copy the session id inside ssl_get_prev_session(). Also, 'goto err' directly in TLS1_TICKET_NOT_DECRYPTED instead of skipping a couple of long if clauses before doing so. ok inoguchi jsing
2020-09-01Fix build with -fno-common (default in clang 11)Jeremie Courreges-Anglas
Input and ok mortimer@
2020-09-01Rename [READ|WRITE]_BIG to [READ|WRITE]_10. Rename struct scsi_rw_big toKenneth R Westerback
struct scsi_rw_10. ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
2020-09-01update currency exchange rates;Jason McIntyre
2020-09-01Add -F to set-environment and source-file; GitHub issue 2359.Nicholas Marriott
2020-09-01Only print below number when there is enough space.Nicholas Marriott
2020-09-01Allow a-z keys for display-panes to jump to higher numbered panes.Nicholas Marriott
2020-09-01Make OCSP response status logging less verbose.tobhe
2020-09-01indent the only other label in this fileTheo Buehler