r358174 kib Feb. 20, 2020, 5:08 p.m.
r358173 mjg Feb. 20, 2020, 4:58 p.m.
r358172 mjg Feb. 20, 2020, 4:58 p.m.
realpath(3) is used a lot e.g., by clang and is a major source of getcwd
and fstatat calls. This can be done more efficiently in the kernel.

This works by performing a regular lookup while saving the name and found
parent directory. If the terminal vnode is a directory we can resolve it using
usual means. Otherwise we can use the name saved by lookup and resolve the

See the review for sample syscall counts.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D23574
r358171 bapt Feb. 20, 2020, 4:38 p.m.
Reported by:	tijl
r358170 pfg Feb. 20, 2020, 3:52 p.m.
r358169 tuexen Feb. 20, 2020, 3:37 p.m.
MFC after:		1 week
r358168 kib Feb. 20, 2020, 3:34 p.m.
On machines with SMAP, fueword executes two serializing instructions
which can be seen in microbenchmarks.

As a measure to restore microbenchmark numbers, only read the word on
the attempt to deliver signal in ast().  If the word is set, signal is
not delivered and word is kept, preventing interruption of
interruptible sleeps by signals until userspace calls
sigfastblock(UNBLOCK) which clears the word.

This way, the spurious EINTR that userspace can see while in critical
section is on first interruptible sleep, if a signal is pending, and
on signal posting.  It is believed that it is not important for rtld
and lbithr critical sections.  It might be visible for the application
code e.g. for the callback of dl_iterate_phdr(3), but again the belief
is that the non-compliance is acceptable.  Most important is that the
retry of the sleeping syscall does not interrupt unless additional
signal is posted.

For now I added the knob kern.sigfastblock_fetch_always to enable the
word read on syscall entry to be able to diagnose possible issues due
to spurious EINTR.

While there, do some code restructuting to have all sigfastblock()
handling located in kern_sig.c.

Reviewed by:	jeff
Discussed with:	mjg
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D23622
r358167 bz Feb. 20, 2020, 10:56 a.m.
Move IPv6 source address checks from after extension header heandling
to the top of the function. If we do not pass these checks there is
no reason to do a lot of work upfront.

Fold extension header preparations and length calculations together into
a single branch and macro rather than doing them sequentially.
Likewise move extension header concatination into a single branch block
only doing it if we recorded any extension header length length.

Reviewed by:	melifaro (earlier version), markj, gallatin
Sponsored by:	Netflix (partially, originally)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23740
r358166 bapt Feb. 20, 2020, 9:33 a.m.
r358165 bapt Feb. 20, 2020, 9:17 a.m.
r358164 bapt Feb. 20, 2020, 9:12 a.m.
ABI has change in between ncurses 5 or 6. While theorically ncurses 6 is buildable with
backward compatibility, I fail at building in a way where the application linked against
the previous version of ncurses are rendering properly.
Let's go on the new ABI which provides all the latest features.

A compat12x package is cooking for backward compatibility
r358163 tsoome Feb. 20, 2020, 9:02 a.m.
Add missing check of malloc() result.
r358162 tsoome Feb. 20, 2020, 9 a.m.
Add missing check of malloc() result.
r358160 tsoome Feb. 20, 2020, 8:56 a.m.
Add missing check of malloc() result.
r358159 tsoome Feb. 20, 2020, 8:55 a.m.
Add missing check of malloc() result.