add freecertchain function, read certificates as cert chain in smtpd and pop3#23
Open
hahahahacker2009 wants to merge 14 commits into0intro:mainfrom
Open
add freecertchain function, read certificates as cert chain in smtpd and pop3#23hahahahacker2009 wants to merge 14 commits into0intro:mainfrom
hahahahacker2009 wants to merge 14 commits into0intro:mainfrom
Conversation
1. Once a second rebalance() is called on cpu0 to adjust priorities, so cpu-bound processes won't lock others out. However it was only adjusting processes which were running on cpu0. This was observed to lead to livelock, eg when a higher-priority process spin-waits for a lock held by a lower priority one. Reference: /n/sources/patch/proc-smp-fixes Date: Tue Apr 19 13:42:06 CES 2016 Signed-off-by: miller@hamnavoe.com
If a process is started with RFNOWAIT, up->parent points to the parent's
Proc but up->parentpid is set to 0 (not the parent's actual pid). If the
parent exits before the child, its pid becomes 0, and when the child exits
later, this code
p = up->parent;
....
/*
* Check that parent is still alive.
*/
if(p->pid == up->parentpid && p->state != Broken) {
incorrectly treats the parent as still alive (because up->parent->pid and
up->parentpid are both zero). So the exiting child's wait record is
passed to the dead parent ... or worse, if another fork occurs soon which
reuses the parent's Proc, we have a race which can pass the child's
wait record to some random new process (and decrement its p->nchild field).
This results in a "no living children" error if the new process tries
to wait for its real children.
The correction is to avoid the above check when up->parentpid == 0.
Reference: /n/sources/patch/exit-wrong-parent
Date: Thu Apr 5 21:37:43 GMT 2018
Signed-off-by: miller@hamnavoe.com
Plan 9 sysexec clears pending notes (unlike posix which leaves pending
signals active across exec). So if fork+exec is followed immediately
by postnote("kill"), there is a window in sysexec between the last sleep
and the clearing of up->nnote where the note from the parent can be lost.
This also triggers another bug: exec clears up->nnote but does not clear
up->notepending, and therefore the first system call in the child
process which calls sleep() will be wrongly terminated with Eintr.
The parent process can detect when the child's exec has succeeded,
by opening a close-on-exec file before the fork, and waiting for
it to be closed before sending a note. (The Go language runtime,
for example, does this.) To eliminate the exec-postnote race in
this case, this patch moves the close-on-exec code to a later point
in the sysexec function, after pending notes have been cleared.
The race could be eliminated more simply by not clearing up->nnote
on exec, but that would change the semantics of exec and possibly
disturb some existing programs.
Reference: /n/sources/patch/exec-postnote-race
Date: Thu Apr 5 13:36:20 GMT 2018
Signed-off-by: miller@hamnavoe.com
…ap Lenrek, from 9)
From: cinap_lenrek <cinap_lenrek@felloff.net> Date: Sat, 25 Sep 2021 20:35:04 +0000 Subject: [PATCH] devtls: fix bwrite memory leak when channel stops being open tlsbwrite() would call checkstate() before calling tlsrecwrite() to make sure the channel is open. however, because checkstate() only raises the error, the Block* passed wont be freed and would result in a memory leak. move the checkstate() call inside tlsrecwrite() to reuse the error handling that frees the block on error.
commit a4c1f3cc18df6fddd548f4df9f209695c4eb7263
Author: cinap_lenrek <cinap_lenrek@felloff.net>
Date: Tue Nov 9 01:46:13 2021 +0000
devtls: reject zero length records (thanks sigrid)
zero length record causes ensure() todo nothing,
while qgrab() assumes there is at least one buffer
in the queue and would dereference the nil buffer.
Author
Closed
e456fe6 to
b7952ae
Compare
All programs (except cpu which is only used on Plan 9) should send a certificate chain so clients will not warns about self-signed certificates.
b7952ae to
bfc0955
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.