dim [Sat, 22 Apr 2017 18:59:50 +0000 (18:59 +0000)]
Merge libc++ trunk r300890, and update build glue.
dim [Sat, 22 Apr 2017 18:43:15 +0000 (18:43 +0000)]
Merge compiler-rt trunk r300890, and update build glue.
dim [Sat, 22 Apr 2017 11:30:07 +0000 (11:30 +0000)]
Merge ^/head r317216 through r317280.
trasz [Sat, 22 Apr 2017 09:38:43 +0000 (09:38 +0000)]
Add basic example to the cu(1) man page. Srsly, folks, you don't
need to install minicom for this...
MFC after: 2 weeks
mav [Sat, 22 Apr 2017 08:38:49 +0000 (08:38 +0000)]
Remove unneeded conditions.
MFC after: 2 weeks
adrian [Sat, 22 Apr 2017 02:12:07 +0000 (02:12 +0000)]
[net80211] add methods to fetch the global and per-VAP WME parameters.
For now there isn't any per-VAP WME state. The eventual aim is to migrate
the driver direct use of WME parameters over to use these methods as
appropriate (global for most devices, per-VAP for firmware NICs that support
it) in preparation for actual per-VAP WME (and other thing) state change
support.
des [Sat, 22 Apr 2017 01:06:23 +0000 (01:06 +0000)]
Fix counter increment in Salsa and ChaCha.
In my eagerness to eliminate a branch which is taken once per 2^38
bytes of keystream, I forgot that the state words are in host order.
Thus, the counter increment code worked fine on little-endian
machines, but not on big-endian ones. Switch to a simpler (branchful)
solution.
rmacklem [Fri, 21 Apr 2017 23:01:32 +0000 (23:01 +0000)]
Don't set ND_NOMOREDATA for a failed Setattr operation (NFSv4).
The NFSv4 Setattr operation always has reply data even when it fails,
so don't set the ND_NOMOREDATA for it. This would only affect unusual
cases where Setattr fails and the RPC code wants to parse the rest of
the compound. Detected during recent development related to the pNFS server.
MFC after: 2 weeks
rmacklem [Fri, 21 Apr 2017 22:38:26 +0000 (22:38 +0000)]
Don't create a backchannel for a DS connection.
An NFSv4.1 client connection to a Data Server (DS) should not have a
backchannel. This patch fixes the NFSv4.1/pNFS client to not do a backchannel
for this case.
Found during recent testing with the pNFS server under development.
MFC after: 2 weeks
sjg [Fri, 21 Apr 2017 22:19:13 +0000 (22:19 +0000)]
Str_Match: fix closure tests for [^] and add unit-test.
cem [Fri, 21 Apr 2017 22:00:22 +0000 (22:00 +0000)]
fuse: Implement FOPEN_KEEP_CACHE flag
Implement FUSE open flag FOPEN_KEEP_CACHE. Without this flag, cached file
contents should be invalidated on open. Apparently, fusefs-encfs relies
upon this behavior.
PR: 218636
Submitted by: Ben RUBSON <ben.rubson at gmail.com>
rmacklem [Fri, 21 Apr 2017 21:43:00 +0000 (21:43 +0000)]
Add checks for failed operations to the NFSv4 client function nfscl_mtofh().
The nfscl_mtofh() function didn't check for failed operations and, as such,
would have returned EBADRPC for these cases, due to parsing failure.
This patch adds checks, so that it returns with ND_NOMOREDATA set.
This is needed for future use in the pNFS server and acts as a safety
belt in the meantime.
MFC after: 2 weeks
dim [Fri, 21 Apr 2017 21:06:11 +0000 (21:06 +0000)]
Strip out a few objects from libclang, liblldb and lldb, which are not
referenced due to the selection of tools that we build, and our compile
time options.
rmacklem [Fri, 21 Apr 2017 20:53:51 +0000 (20:53 +0000)]
Get rid of bogus statement in the nfsuserd.8 man page.
The nfsuserd.8 man page stated that a usertimeout of 0 would disable
the cache timeout. This was simply not true, so this patch deletes
the sentence.
This is a content change.
PR: 217406
MFC after: 2 weeks
rmacklem [Fri, 21 Apr 2017 20:08:10 +0000 (20:08 +0000)]
Set default uid/gid to nobody/nogroup for NFSv4 mapping.
The default uid/gid for NFSv4 are set by the nfsuserd(8) daemon.
However, they were 0 until the nfsuserd(8) was run. Since it is
possible to use NFSv4 without running the nfsuserd(8) daemon, set them
to nobody/nogroup initially.
Without this patch, the values would be set by the nfsuserd(8) daemon
and left changed even if the nfsuserd(8) daemon was killed. The default
values of 0 meant that setting a group to "wheel" would fail even when
done by root.
It also adds a definition of GID_NOGROUP to sys/conf.h.
Discussed on: freebsd-current@
MFC after: 2 weeks
jpaetzel [Fri, 21 Apr 2017 19:53:52 +0000 (19:53 +0000)]
MFV 316891
7386 zfs get does not work properly with bookmarks
illumos/illumos-gate@
edb901aab9c738b5eb15aa55933e82b0f2f9d9a2
https://github.com/illumos/illumos-gate/commit/
edb901aab9c738b5eb15aa55933e82b0f2f9d9a2
https://www.illumos.org/issues/7386
The zfs get command does not work with the bookmark parameter while it works
properly with both filesystem and snapshot:
# zfs get -t all -r creation rpool/test
NAME PROPERTY VALUE SOURCE
rpool/test creation Fri Sep 16 15:00 2016 -
rpool/test@snap creation Fri Sep 16 15:00 2016 -
rpool/test#bkmark creation Fri Sep 16 15:00 2016 -
# zfs get -t all -r creation rpool/test@snap
NAME PROPERTY VALUE SOURCE
rpool/test@snap creation Fri Sep 16 15:00 2016 -
# zfs get -t all -r creation rpool/test#bkmark
cannot open 'rpool/test#bkmark': invalid dataset name
#
The zfs get command should be modified to work properly with bookmarks too.
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Marcel Telka <marcel@telka.sk>
pfg [Fri, 21 Apr 2017 19:27:33 +0000 (19:27 +0000)]
lib: initial use of reallocarray(3).
Make some use of reallocarray, attempting to limit it to cases where the
parameters are unsigned and there is some theoretical chance of overflow.
MFC afer: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9980
bde [Fri, 21 Apr 2017 17:57:23 +0000 (17:57 +0000)]
Optimize setting of the foreground color in the main planar method much
like for the background color.
This is a about 5% faster for output that actually reaches the screen.
dim [Fri, 21 Apr 2017 15:59:58 +0000 (15:59 +0000)]
Update some more build glue. All llvm extras, lld and lldb should link now.
bde [Fri, 21 Apr 2017 15:12:43 +0000 (15:12 +0000)]
Merge the main ega drawing method into the main vga planar method and
remove the former.
All other EGA/VGA methods were already shared, with VGA-only features
mostly not used and no decisions in inner loops to optimize fof VGA,
but this method was split up because it is the only important one and
using VGA methods if possible is about twice as fast. The speed is
mostly not from splitting to reduce branches but from doing half as
many bus accesses, so make this easier to maintain by not splitting.
There is now 1 extra branch in an inner loop where it costs less than
1% of the bus access overhead on Haswell even if the compiler schedules
it poorly.
emaste [Fri, 21 Apr 2017 14:50:29 +0000 (14:50 +0000)]
bsdgrep: disable GNU_GREP_COMPAT by default
The GNU extension bits in the base system are old, no longer faithful
to upstream, and surprising in some regards. Switch to documenting
WITH_GNU_GREP_COMPAT and default GNU_GREP_COMPAT to OFF in the name of
good behavior.
According to http://www.regular-expressions.info, GNU extensions:
- Add missing quantifiers to BREs: \?, \+
- Add branching to BREs: \|
- Add backreferences (\1 through \9) to EREs
- Add \w, \W, \s, and \S corresponding to :alnum:, [^[:alnum:]],
:space:, and [^[:space:]] respectively
- Add word boundaries and anchors:
\b: word boundary
\B: not word boundary
\<: Strt of word
\>: End of word
\`: Start of subject string
\': End of subject string
These extensions are still available in /usr/bin/grep by default today,
as it is still GNU grep. As part of the bsdgrep migration plan these
extensions may be added to bsdgrep's regex support if necessary.
Submitted by: Kyle Evans <kevans91 at ksu.edu>
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D10114
emaste [Fri, 21 Apr 2017 14:36:09 +0000 (14:36 +0000)]
bsdgrep: add BSD_GREP_FASTMATCH knob for built-in fastmatch
Bugs have been found in the fastmatch implementation as used in bsdgrep.
Some have been fixed (r316495) while fixes for others are in review
(D10098).
In comparison with the fastmatch implementation, Kyle Evans found that:
- regex(3)'s performance with literal expressions offers a speed
improvement over fastmatch
- regex(3)'s performance, both with simple BREs and EREs, seems to be
comparable
The regex implementation was imported in r226035, and the commit message
reports:
This is a temporary solution until the whole regex library is
not replaced so that BSD grep development can continue and the
backported code gets some review and testing. This change only
improves scalability slightly, there is no big performance boost
yet but several minor bugs have been found and fixed.
Introduce a WITH_/WITHOUT_BSD_GREP_FASTMATCH knob to support testing
of both approaches.
PR: 175314, 194823
Submitted by: Kyle Evans <kevans91 at ksu.edu>
Reviewed by: bdrewery (in part)
Differential Revision: https://reviews.freebsd.org/D10282
mav [Fri, 21 Apr 2017 13:45:01 +0000 (13:45 +0000)]
Add interface reference counting to if_lagg.
Using plain ifunit() looks like request for troubles.
MFC after: 2 weeks
emaste [Fri, 21 Apr 2017 13:39:14 +0000 (13:39 +0000)]
Simplify gnu/usr.bin Makefile conditions
After r307655 MK_GDB is forced to no if MK_BINUTILS is no, and similarly
MK_GROFF is forced to no if MK_CXX is no, so we can remove nested
conditionals.
Reviewed by: bapt, brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8287
rmacklem [Fri, 21 Apr 2017 11:48:12 +0000 (11:48 +0000)]
Revert r317240. I didn't realize there were defined constants for
uid/gid values in sys/conf.h. I will do another commit using those.
mav [Fri, 21 Apr 2017 07:43:44 +0000 (07:43 +0000)]
Dump md_iterations as signed, which it really is.
PR: 208305
PR: 196834
MFC after: 2 weeks
mav [Fri, 21 Apr 2017 07:16:07 +0000 (07:16 +0000)]
Always allow setting number of iterations for the first time.
Before this change it was impossible to set number of PKCS#5v2 iterations,
required to set passphrase, if it has two keys and never had any passphrase.
Due to present metadata format limitations there are still cases when number
of iterations can not be changed, but now it works in cases when it can.
PR: 218512
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D10338
bde [Fri, 21 Apr 2017 06:55:17 +0000 (06:55 +0000)]
Oops, the previous commit swapped the main ega method with the main
vga planar method (for testing that was supposed to be local that the
former still works). The ega method works on vga but is about twice
as slow. The vga method doesn't work on ega.
Optimize the main vga planar method a little. For changing the
background color (which was otherwise optimized better than most
things), don't switch the write mode from 3 to 0 just to select
the pixel mask of 0xff obscurely by writing 0. Just write 0xff
directly.
tuexen [Fri, 21 Apr 2017 06:05:34 +0000 (06:05 +0000)]
Represent "a syncache overflow hasn't happend yet" by using
-(SYNCOOKIE_LIFETIME + 1) instead of INT64_MIN, since it is
good enough and works when time_t is int32 or int64.
This fixes the issue reported by cy@ on i386.
Reported by: cy
MFC after: 1 week
Sponsored by: Netflix, Inc.
rmacklem [Fri, 21 Apr 2017 01:50:41 +0000 (01:50 +0000)]
Set default uid/gid to nobody/nogroup for NFSv4 mapping.
The default uid/gid for NFSv4 are set by the nfsuserd(8) daemon.
However, they were 0 until the nfsuserd(8) was run. Since it is
possible to use NFSv4 without running the nfsuserd(8) daemon, set them
to nobody/nogroup initially.
Without this patch, the values would be set by the nfsuserd(8) daemon
and left changed even if the nfsuserd(8) daemon was killed. Also, the default
values of 0 meant that setting a group to "wheel" would fail even when
done by root and this patch fixes this issue.
MFC after: 2 weeks
sjg [Fri, 21 Apr 2017 00:45:44 +0000 (00:45 +0000)]
jpaetzel [Fri, 21 Apr 2017 00:24:59 +0000 (00:24 +0000)]
MFV 316871
7490 real checksum errors are silenced when zinject is on
illumos/illumos-gate@
6cedfc397d92d64e442f0aae4445ac507beaf58f
https://github.com/illumos/illumos-gate/commit/
6cedfc397d92d64e442f0aae4445ac507beaf58f
https://www.illumos.org/issues/7490
When zinject is on, error codes from zfs_checksum_error() can be overwritten
due to an incorrect and overly-complex if condition.
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
jpaetzel [Fri, 21 Apr 2017 00:17:54 +0000 (00:17 +0000)]
MFV 316870
7448 ZFS doesn't notice when disk vdevs have no write cache
illumos/illumos-gate@
295438ba3230419314faaa889a2616f561658bd5
https://github.com/illumos/illumos-gate/commit/
295438ba3230419314faaa889a2616f561658bd5
https://www.illumos.org/issues/7448
I built a SmartOS image with all the NVMe commits including 7372
(support NVMe volatile write cache) and repeated my dd testing:
> #!/bin/bash
> for i in `seq 1 1000`; do
> dd if=/dev/zero of=file00 bs=1M count=102400 oflag=sync &
> dd if=/dev/zero of=file01 bs=1M count=102400 oflag=sync &
> wait
> rm file00 file01
> done
>
Previously each dd command took ~145 seconds to finish, now it takes
~400 seconds.
Eventually I figured out it is 7372 that causes unnecessary
nvme_bd_sync() executions which wasted CPU cycles.
If a NVMe device doesn't support a write cache, the nvme_bd_sync function will
return ENOTSUP to indicate this to upper layers.
It seems this returned value is ignored by ZFS, and as such this bug is not
really specific to NVMe. In vdev_disk_io_start() ZFS sends the flush to the
disk driver (blkdev) with a callback to vdev_disk_ioctl_done(). As nvme filled
in the bd_sync_cache function pointer, blkdev will not return ENOTSUP, as the
nvme driver in general does support cache flush. Instead it will issue an
asynchronous flush to nvme and immediately return 0, and hence ZFS will not set
vdev_nowritecache here. The nvme driver will at some point process the cache
flush command, and if there is no write cache on the device it will return
ENOTSUP, which will be delivered to the vdev_disk_ioctl_done() callback. This
function will not check the error code and not set nowritecache.
The right place to check the error code from the cache flush is in
zio_vdev_io_assess(). This would catch both cases, synchronous and asynchronous
cache flushes. This would also be independent of the implementation detail that
some drivers can return ENOTSUP immediately.
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Obtained from: Illumos
rmacklem [Fri, 21 Apr 2017 00:17:47 +0000 (00:17 +0000)]
Fix the setting of atime for Linux client NFSv4 mounts.
The FreeBSD NFSv4 server did not set the attribute bit for TimeAccess in
the reply to an Open with exclusive_create, as required by the RFCs.
(This is required since the FreeBSD NFS server stores the create_verifier
in the va_atime attribute.)
As such, the Linux NFSv4 client did not set the TimeAccess (atime) in
the Setattr done in an RPC after the one with the Open/exclusive_create.
This patch fixes the server to set the TimeAccess bit in the reply.
I believe that storing the create_verifier in an extended attribute for
file systems that support extended attributes might be a good idea,
but I will wait for a discussion of this on the freebsd-fs@ email list
before considering committing a patch to do this.
Reported by: jim@ks.uiuc.edu
Suggested by: dfr
MFC after: 2 weeks
jpaetzel [Fri, 21 Apr 2017 00:12:47 +0000 (00:12 +0000)]
MFV 316868
7430 Backfill metadnode more intelligently
illumos/illumos-gate@
af346df58864e8fe897b1ff1a3a4c12f9294391b
https://github.com/illumos/illumos-gate/commit/
af346df58864e8fe897b1ff1a3a4c12f9294391b
https://www.illumos.org/issues/7430
Description and patch from brought over from the following ZoL commit: https://
github.com/zfsonlinux/zfs/commit/
68cbd56e182ab949f58d004778d463aeb3f595c6
Only attempt to backfill lower metadnode object numbers if at least
4096 objects have been freed since the last rescan, and at most once
per transaction group. This avoids a pathology in dmu_object_alloc()
that caused O(N^2) behavior for create-heavy workloads and
substantially improves object creation rates. As summarized by
@mahrens in #4636:
"Normally, the object allocator simply checks to see if the next
object is available. The slow calls happened when dmu_object_alloc()
checks to see if it can backfill lower object numbers. This happens
every time we move on to a new L1 indirect block (i.e. every 32 *
128 = 4096 objects). When re-checking lower object numbers, we use
the on-disk fill count (blkptr_t:blk_fill) to quickly skip over
indirect blocks that don?t have enough free dnodes (defined as an L2
with at least 393,216 of 524,288 dnodes free). Therefore, we may
find that a block of dnodes has a low (or zero) fill count, and yet
we can?t allocate any of its dnodes, because they've been allocated
in memory but not yet written to disk. In this case we have to hold
each of the dnodes and then notice that it has been allocated in
memory.
The end result is that allocating N objects in the same TXG can
require CPU usage proportional to N^2."
Add a tunable dmu_rescan_dnode_threshold to define the number of
objects that must be freed before a rescan is performed. Don't bother
to export this as a module option because testing doesn't show a
compelling reason to change it. The vast majority of the performance
gain comes from limit the rescan to at most once per TXG.
Reviewed by: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Ned Bass <bass6@llnl.gov>
Obtained from: Illumos
glebius [Fri, 21 Apr 2017 00:00:23 +0000 (00:00 +0000)]
- When reading VM stats, provide proper size argument to sysctl.
- While here, remove unused arguments from mysysctl().
jkim [Thu, 20 Apr 2017 22:30:39 +0000 (22:30 +0000)]
Fix systat(1) regression. It was broken by r317061.
dim [Thu, 20 Apr 2017 21:48:54 +0000 (21:48 +0000)]
Merge llvm, clang, lld and lldb trunk r300890, and update build glue.
dim [Thu, 20 Apr 2017 21:21:10 +0000 (21:21 +0000)]
Vendor import of libc++ trunk r300890:
https://llvm.org/svn/llvm-project/libcxx/trunk@300890
dim [Thu, 20 Apr 2017 21:20:59 +0000 (21:20 +0000)]
Vendor import of compiler-rt trunk r300890:
https://llvm.org/svn/llvm-project/compiler-rt/trunk@300890
dim [Thu, 20 Apr 2017 21:20:51 +0000 (21:20 +0000)]
Vendor import of clang trunk r300890:
https://llvm.org/svn/llvm-project/cfe/trunk@300890
dim [Thu, 20 Apr 2017 21:04:21 +0000 (21:04 +0000)]
Merge ^/head r316992 through r317215.
pfg [Thu, 20 Apr 2017 21:01:59 +0000 (21:01 +0000)]
libthread_db: unbreak build due to sign/unsigned comparison.
Reported by: lwshu
dim [Thu, 20 Apr 2017 21:00:09 +0000 (21:00 +0000)]
Add function and data sections when building llvm, clang, lld and lldb,
and allow the linker to garbage collect them. This shaves off up to a
few MB from the final executables.
MFC after: 3 days
dim [Thu, 20 Apr 2017 21:00:04 +0000 (21:00 +0000)]
Turn off llvm/clang's ENABLE_BACKTRACES setting, since it never worked
properly anyway. (Upstream has reorganized this somewhat in the mean
time, but for proper backtraces we would need llvm-symbolizer in base.)
MFC after: 3 days
scottl [Thu, 20 Apr 2017 20:46:34 +0000 (20:46 +0000)]
Reorder the minimum_cmd_size code to make it a little smaller and
easier to read.
trasz [Thu, 20 Apr 2017 20:06:51 +0000 (20:06 +0000)]
Mention GEOM_MOUNTVER.
MFC after: 2 weeks
bapt [Thu, 20 Apr 2017 19:33:00 +0000 (19:33 +0000)]
GNU diff is done and GNU diff3 is not using libgnuregex, so no need to
condition the build of libgnuregex anymore on WITHOUT_GNU_DIFF
bapt [Thu, 20 Apr 2017 19:29:35 +0000 (19:29 +0000)]
Only build libreadline for gdb, binutils actually does not need it
bapt [Thu, 20 Apr 2017 19:24:51 +0000 (19:24 +0000)]
Replace again GNU diff with BSD diff
After a firts failed attempt, BSD diff is now good enough to replace
GNU diff.
Relnotes: yes
tuexen [Thu, 20 Apr 2017 19:19:33 +0000 (19:19 +0000)]
Syncoockies can be used in combination with the syncache. If the cache
overflows, syncookies are used.
This patch restricts the usage of syncookies in this case: accept
syncookies only if there was an overflow of the syncache recently.
This mitigates a problem reported in PR217637, where is syncookie was
accepted without any recent drops.
Thanks to glebius@ for suggesting an improvement.
PR: 217637
Reviewed by: gnn, glebius
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D10272
bapt [Thu, 20 Apr 2017 19:14:52 +0000 (19:14 +0000)]
Cross reference pr(1) which diff might call with -l option
bapt [Thu, 20 Apr 2017 19:07:52 +0000 (19:07 +0000)]
Update the TODO list to reflect what has been changed
bapt [Thu, 20 Apr 2017 19:05:43 +0000 (19:05 +0000)]
Document all long options
bapt [Thu, 20 Apr 2017 18:21:50 +0000 (18:21 +0000)]
Readd Big5: some large databases setup are still requiring it.
Reported by: "張君天(Chun-Tien Chang)" <tcs@kitty.2y.idv.tw>
pfg [Thu, 20 Apr 2017 17:58:27 +0000 (17:58 +0000)]
libpthread_db: undo the memset size change.
I inadvertedly soubled the size of the memset without noticing the
start address had changed. The size for the memset in pt_map_thread()
shouldn't actually match the reallocarray() so undo that part of r317200.
This is a re-commit of r317201 to clarify the log.
X-MFC with: r317200
pfg [Thu, 20 Apr 2017 17:54:59 +0000 (17:54 +0000)]
Revert r317201 to fix the log.
pfg [Thu, 20 Apr 2017 17:49:37 +0000 (17:49 +0000)]
libpthread_db: leave the memset size from unchanged.
The size for the memset in pt_map_thread() shouldn't actually match the
reallocarray() so undo that part of r317200.
X-MFC with: r317200
pfg [Thu, 20 Apr 2017 17:43:25 +0000 (17:43 +0000)]
libthread_db: unsign map_len and use reallocarray(3).
Lengths are not negative, so map_len should be unsigned. Unsign the
corresponding indexes too and bring a small use of reallocarray(3).
Reorder the memset to be consistent with the realloc: it appears we
were only clearing half the memory in pt_map_thread().
MFC after: 2 weeks
bde [Thu, 20 Apr 2017 17:22:03 +0000 (17:22 +0000)]
Eliminate the ega renderer switch. It did nothing useful except hold
a pointer to the main ega drawing method which is misoptimized be in
a different function than the main vga planar mode drawing method.
Vga initialization handles everything with no extra code except for
selecting the different function.
bde [Thu, 20 Apr 2017 16:34:09 +0000 (16:34 +0000)]
When the character width is 9, remove vertical lines in the mouse cursor
corresponding to the gaps between characters. This fixes distortion
of the cursor due to expanding it across the gaps.
Again for character width 9, when the cursor characters are not in the
graphics range (0xb0-0xdf), the gaps were always there (filled in the
background color for the previous char). They still look strange, but
don't cause distortion. When the cursor characters are in the graphics
range, the gaps are filled by repeating the previous line. This gives
distortion with cilia. Removing vertical lines reduces the distortion
to vertical cilia.
Move the default for the cursor characters out of the graphics range.
With character width 9, this gives gaps instead of distortion and
other problems. With character width 8, it just fixes a smaller set
of other problems. Some distortion and other problems can be recovered
using vidcontrol -M. Presumably the default was to fill the gaps
intentionally, but it is much better to leave gaps. The gaps can even
be considered as a feature for text processing -- they give sub-pointers
to character boundaries. The other problems are: (1) with character
width 9, characters near the cursor are moved into the graphics range
and thus distorted if any of their 8th bits is set; (2) conflicts with
national characters in the graphics range.
The default range for the graphics cursor characters is now 8-11. This
doesn't conflict with anything, since the glyphs for the characters in
this range are unreachable.
Use the 10x16 mouse cursor in text mode too (if the font size is >= 14).
When the character width is 9, removal of 1 or 2 vertical lines makes
10x16 cursor no wider than the 9x13 one usually was. We could even
handle cursors 1 pixel wider in 2 character cells and gaps without
more clipping than given by the gaps (the worst case is 1 pixel in the
left cell, 1 removed in the middle gap, 8 in the right cell and 1
removed in the right gap. The pixel in the right gap is removed so
it doesn't matter if it is in the font).
When the character width is 8, we now clip the 10-wide cursor by 1
pixel in the worst case. This clipping is usually invisible since it
is of the border and and the border usually merges with the background
so is invisible. There should be an option to use reverse video to
highlight the border and its tip instead of the interior (graphics
mode can do better using separate colors). This needs the 9x13 cursor
again.
Ideas from: ache (especially about the bad default character range)
andrew [Thu, 20 Apr 2017 15:53:20 +0000 (15:53 +0000)]
Restrict the arm64 supervisor all instructions to only allow a zero
immediate value for system calls. We may wish to use other values in the
future for other purposes.
MFC after: 1 week
Sponsored by: DARPA, AFRL
kib [Thu, 20 Apr 2017 15:18:15 +0000 (15:18 +0000)]
Write-combine framebuffer writes through user-space mappings, if possible.
Note that KVA mapping of the framebuffer already uses write-combining
mode, so the change, besides improving speed of user mode writes, also
satisfies requirement of the IA32 architecture of using consistent
caching modes for multiple mappings of the same page.
Reported and tested by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
cognet [Thu, 20 Apr 2017 15:06:16 +0000 (15:06 +0000)]
Update comment ot reflect realilty, we know also take care of CPUs that
provide a enable-method.
Suggested by: jhibbits
bapt [Thu, 20 Apr 2017 14:22:33 +0000 (14:22 +0000)]
Implement a basic --changed-group-format
etcupdate(8) requires that option, while GNU diff supports many more variation
of that options, their behaviour beside the simple verion implemented here are
quite inconsistent as such I do not plan to implement those.
The only special keyword supported by this implementation are: %< and %>
%= is not implemented as the documentation of GNU diff says: common lines, but
it actually when tested print the changes from the first file
emaste [Thu, 20 Apr 2017 13:57:53 +0000 (13:57 +0000)]
elfcopy: document --strip-symbols=filename in the man page
Reported by: bz
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
andrew [Thu, 20 Apr 2017 13:56:30 +0000 (13:56 +0000)]
Push loading curthread into assembly in the synchronous exception handlers.
This will help investigating the performance impact of moving parts of the
switch statement in do_el0_sync into assembly.
Sponsored by: DARPA, AFRL
cognet [Thu, 20 Apr 2017 13:56:06 +0000 (13:56 +0000)]
ePAPR states that any non-boot CPU will come in "disabled" state. So we should
not consider a "disabled" cpu as a CPU we have to ignore, and we should use
them if they provide a "enable-method".
While I'm there, support "ok" as well as "okay", while ePAPR only accepts
"okay", linux accepts "ok" too so we can expect it to be used.
Reviewed by: andrew (partially)
bde [Thu, 20 Apr 2017 13:46:55 +0000 (13:46 +0000)]
Attempt to determine the modes in which 8-bit wide characters are actually
9 wide.
I only need this to improve the mouse cursor, but it has always been
needed to select and/or adjust fonts.
This is complicated because there are no standard parameter tables
giving this bit of information directly, and the device register bit
giving the information can't be trusted even if it is read from the
hardware. Use a heuristic to guess if the device register can be
trusted. (The device register is normally read from the BIOS mode
table, but on my system where the device register is wrong, the mode
table doesn't match the hardware and is not used; the device registers
are used in this case.)
bapt [Thu, 20 Apr 2017 11:32:18 +0000 (11:32 +0000)]
Add a regression test for diff -D
kp [Thu, 20 Apr 2017 09:05:53 +0000 (09:05 +0000)]
pf: Fix possible incorrect IPv6 fragmentation
When forwarding pf tracks the size of the largest fragment in a fragmented
packet, and refragments based on this size.
It failed to ensure that this size was a multiple of 8 (as is required for all
but the last fragment), so it could end up generating incorrect fragments.
For example, if we received an 8 byte and 12 byte fragment pf would emit a first
fragment with 12 bytes of payload and the final fragment would claim to be at
offset 8 (not 12).
We now assert that the fragment size is a multiple of 8 in ip6_fragment(), so
other users won't make the same mistake.
Reported by: Antonios Atlasis <aatlasis at secfu net>
MFC after: 3 days
mav [Thu, 20 Apr 2017 09:01:31 +0000 (09:01 +0000)]
Some cosmetic polishing for pre-timeouts.
MFC after: 1 week
ngie [Thu, 20 Apr 2017 03:43:37 +0000 (03:43 +0000)]
Regenerate src.conf(5) after recent additions/clarifications
Sponsored by: Dell EMC Isilon
davidcs [Thu, 20 Apr 2017 03:41:42 +0000 (03:41 +0000)]
Cleanup QLA_LOCK/QLA_UNLOCK macros
remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros
format qla_error_recovery()
MFC after:3 days
ngie [Thu, 20 Apr 2017 03:36:09 +0000 (03:36 +0000)]
Clean up WITH*_PROFILE
- Clarify that profiled libraries are usable with gprof(8).
- Add WITH_PROFILE to complement WITHOUT_PROFILE and placate makeman.
MFC after: 7 weeks
Sponsored by: Dell EMC Isilon
ngie [Thu, 20 Apr 2017 03:32:30 +0000 (03:32 +0000)]
Add WITH_GROFF to complement WITHOUT_GROFF and placate complaints from makeman
MFC after: 7 weeks
Sponsored by: Dell EMC Isilon
np [Wed, 19 Apr 2017 23:06:07 +0000 (23:06 +0000)]
Free lro_hash unconditionally, just like lro_mbuf_data a few lines
later. Fix whitespace nit while here.
glebius [Wed, 19 Apr 2017 22:50:19 +0000 (22:50 +0000)]
Bump __FreeBSD_version due to r317061, struct vmmeter changes.
glebius [Wed, 19 Apr 2017 22:48:27 +0000 (22:48 +0000)]
Fix build without SC_PIXEL_MODE defined.
jkim [Wed, 19 Apr 2017 22:43:11 +0000 (22:43 +0000)]
Revert r316796. It is not necessary since r317173.
jkim [Wed, 19 Apr 2017 22:41:24 +0000 (22:41 +0000)]
Always clear borders when the terminal is flushed.
PR: 202288
np [Wed, 19 Apr 2017 22:27:26 +0000 (22:27 +0000)]
Do not leak lro_hash on failure to allocate lro_mbuf_data.
MFC after: 1 week
jkim [Wed, 19 Apr 2017 22:21:15 +0000 (22:21 +0000)]
Micro-optimize vt_set_border().
np [Wed, 19 Apr 2017 22:20:41 +0000 (22:20 +0000)]
Remove redundant assignment.
gjb [Wed, 19 Apr 2017 21:18:06 +0000 (21:18 +0000)]
Trim trailing '/release/..' when setting _OBJDIR so arm64/aarch64
boot1.efifat is properly located when creating virtual machine images.
Sponsored by: The FreeBSD Foundation
ngie [Wed, 19 Apr 2017 20:45:46 +0000 (20:45 +0000)]
Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build
rpcbind(8) with/without warmstart support.
The knob defaults to off to preserve POLA for the feature.
See rpcbind(8) for more details about the warmstart feature.
MFC after: 7 weeks
Relnotes: yes
Sponsored by: Dell EMC Isilon
ngie [Wed, 19 Apr 2017 20:35:47 +0000 (20:35 +0000)]
Add WITH_CXX to complement WITHOUT_CXX and placate makeman's complaints
MFC after: 7 weeks
Sponsored by: Dell EMC Isilon
manu [Wed, 19 Apr 2017 20:35:04 +0000 (20:35 +0000)]
pom: Remove useless cap_rights_init
Pointy-Hat: manu
Reported by: bapt
manu [Wed, 19 Apr 2017 20:27:48 +0000 (20:27 +0000)]
Capsicumize pom
Since pom is the only binary that can save lives, capsicumize it to be
sure that it's safe to run it.
Reviewed by: bapt
ngie [Wed, 19 Apr 2017 20:27:13 +0000 (20:27 +0000)]
Fix indentation per style.Makefile(5)
MFC after: 7 weeks
Sponsored by: Dell EMC Isilon
ngie [Wed, 19 Apr 2017 20:23:27 +0000 (20:23 +0000)]
rpcbind(8): post-humously document -w (warmstart) support added in r74462
warmstart support saves portmap/rpcbind(8) registration state on exit and
restores the saved registration state on restart.
MFC after: 7 weeks
Sponsored by: Dell EMC Isilon
ngie [Wed, 19 Apr 2017 20:04:45 +0000 (20:04 +0000)]
rpcbind(8): add a description for /var/run/rpcbind.sock under the FILES section
MFC after: 7 weeks
Sponsored by: Dell EMC Isilon
ngie [Wed, 19 Apr 2017 19:55:38 +0000 (19:55 +0000)]
which(1): sort #includes
No functional change [intended].
MFC after: 7 weeks
Sponsored by: Dell EMC Isilon
ngie [Wed, 19 Apr 2017 19:52:40 +0000 (19:52 +0000)]
Clean up trailing whitespace
No functional changes
MFC after: 1 week
Sponsored by: Dell EMC Isilon
emaste [Wed, 19 Apr 2017 19:06:47 +0000 (19:06 +0000)]
libstdc++: fix symbol version script for LLD
LLD is less tolerant of inconsistencies in the symbol version script.
- Add a ; on the last entry in a version block
- Remove duplicated symbols, retaining those in the earliest block
Reviewed by: bdrewery
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10428
emaste [Wed, 19 Apr 2017 18:59:38 +0000 (18:59 +0000)]
Remove WITHOUT_GNU and WITHOUT_GNU_SUPPORT src.conf.knobs
These have no effect (and WITHOUT_GNU is documented as having no
effect). I intend to later introduce a WITHOUT_GPL knob to serve a
similar purpose as WITHOUT_GNU's previously documented intent, but with
a more accurate name. To avoid confusion over the transition though just
remove the existing, nonfunctional ones.
bde [Wed, 19 Apr 2017 18:35:34 +0000 (18:35 +0000)]
Fix missing support for drawing the mouse cursor in depth 24 of direct
mode.
Use the general DRAWPIXEL() macro with its bigger case statement
(twice) instead of our big case statement (once). DRAWPIXEL() is more
complicated since it is not missing support for depth 24 or
complications for colors in depth 16 (we currently hard-code black and
white so the complications for colors are not needed). DRAWPIXEL()
also does the bpp calculation in the inner loop. Compilers optimize
DRAWPIXEL() well enough, and the main text drawing method always
depended on this. In direct mode, mouse cursor drawing is now similar
to normal text drawing except it draws in 2 hard-coded colors instead
of 1 variable color.
This also fixes a nested hard-coding of colors. DRAWPIXEL() uses the
palette in all cases, but the direct code didn't use the palette for
its hard-coded black. This only had an effect in depth 8, since
changing the palette is not supported in other depths.
emaste [Wed, 19 Apr 2017 18:11:08 +0000 (18:11 +0000)]
makeman: add a comment describing purpose and invocation
Reviewed by: jhb, ngie
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10389
ngie [Wed, 19 Apr 2017 18:01:53 +0000 (18:01 +0000)]
rpcbind(8): wordsmith -h description and mention -W in the SYNOPSIS section
-W was already documented in the OPTIONS section.
MFC after: 7 weeks
Reported by: igor (-h wordsmith'ing)
Sponsored by: Dell EMC Isilon
ngie [Wed, 19 Apr 2017 17:51:32 +0000 (17:51 +0000)]
Print out the signal number on exit in terminate(..) if WARMSTART is compiled
into rpcbind.
The signal number can provide helpful diagnostic info.
MFC after: 1 week
Obtained from: Isilon OneFS
Sponsored by: Dell EMC Isilon