]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFV r298178:
delphij [Mon, 18 Apr 2016 07:36:24 +0000 (07:36 +0000)]
MFV r298178:

Update file to 5.26.

MFC after: 2 weeks
Relnotes: yes

8 years agoUser NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:14:01 +0000 (07:14 +0000)]
User NULL instead of 0 for pointers.

getservent(3) returns NULL on EOF or error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:09:34 +0000 (07:09 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) will return NULL in case it cannot open the STREAM.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:05:18 +0000 (07:05 +0000)]
Use NULL instead of 0 for pointers.

MFC after: 2 weeks.

8 years agoCleanup debug output.
tuexen [Mon, 18 Apr 2016 06:58:07 +0000 (06:58 +0000)]
Cleanup debug output.

8 years agoDon't use anonymous unions.
tuexen [Mon, 18 Apr 2016 06:38:53 +0000 (06:38 +0000)]
Don't use anonymous unions.

8 years agoRemove a left-over debug printf().
tuexen [Mon, 18 Apr 2016 06:32:24 +0000 (06:32 +0000)]
Remove a left-over debug printf().

8 years agoAllow RT3350 CPU clock to be detected as part of RT3050/RT3052 detection
sgalabov [Mon, 18 Apr 2016 06:15:58 +0000 (06:15 +0000)]
Allow RT3350 CPU clock to be detected as part of RT3050/RT3052 detection

OpenWRT's dts files treat RT3050/RT3052/RT3350 within the same SoC dtsi
file, so we need to distinguish between the three dynamically, mainly
because the bit we use to determine the clock speed on RT3050/RT3052
can actually be floating on RT3350 and RT3350 is always at 320MHz.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5983

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 06:12:00 +0000 (06:12 +0000)]
Use NULL instead of 0 for pointers.

realloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agoUse NULL for pointers.
araujo [Mon, 18 Apr 2016 06:02:26 +0000 (06:02 +0000)]
Use NULL for pointers.

strrchr(3) will return NULL if the character does not appears in
the string.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 05:46:18 +0000 (05:46 +0000)]
Use NULL instead of 0 for pointers.

Also malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0.
araujo [Mon, 18 Apr 2016 05:26:32 +0000 (05:26 +0000)]
Use NULL instead of 0.

strtok(3) will return NULL when no more tokens remain.

MFC after: 2 weeks.

8 years agoThe malloc will return NULL if it can't allocate memory.
araujo [Mon, 18 Apr 2016 05:19:45 +0000 (05:19 +0000)]
The malloc will return NULL if it can't allocate memory.

MFC after: 2 weeks.

8 years agoVendor import of file 4.26.
delphij [Mon, 18 Apr 2016 04:43:03 +0000 (04:43 +0000)]
Vendor import of file 4.26.

8 years agoUse nitems instead of 'sizeof(mapnames) / sizeof(mapnames[0]'.
araujo [Mon, 18 Apr 2016 03:44:42 +0000 (03:44 +0000)]
Use nitems instead of 'sizeof(mapnames) / sizeof(mapnames[0]'.

8 years agoAdd the kern.vt.enable_bell sysctl, which was not documented previously.
wblock [Mon, 18 Apr 2016 02:36:49 +0000 (02:36 +0000)]
Add the kern.vt.enable_bell sysctl, which was not documented previously.
Minor additional punctuation and wording changes.

PR: 208785
Submitted by: david.marec@davenulle.org
MFC after: 1 week

8 years ago[urtwn] default to announcing RX 64K aggregates.
adrian [Mon, 18 Apr 2016 00:28:25 +0000 (00:28 +0000)]
[urtwn] default to announcing RX 64K aggregates.

8 years ago[net80211] put in a comment about the not-quite-correctness of A-MPDU parameters.
adrian [Mon, 18 Apr 2016 00:26:11 +0000 (00:26 +0000)]
[net80211] put in a comment about the not-quite-correctness of A-MPDU parameters.

Although we correctly (now!) calculate the right A-MPDU parameters, the
ioctl() has some faulty logic for choosing which to display.  The BSS
params are what were advertised to us, and we would have chosen the
lower of theirs/ours when advertising the HT bits back at them.

So, we /should/ track and fix that so we display the correct A-MPDU
density and size.

However, since I'm a forgetful type, and I don't want to have to re-learn
that this is wrong, drop in a comment so I or someone else fixes it.
Or, when I discover this again in 4 years, I don't have to go digging
too much to remember.

8 years agoUse a loop instead of a goto in sysctl_kern_proc_kstack().
markj [Sun, 17 Apr 2016 23:22:32 +0000 (23:22 +0000)]
Use a loop instead of a goto in sysctl_kern_proc_kstack().

MFC after: 3 days

8 years agoFix the description of the first two arguments to proc:::create.
markj [Sun, 17 Apr 2016 23:10:09 +0000 (23:10 +0000)]
Fix the description of the first two arguments to proc:::create.

Reported by: Matt C <oholiab@grimmwa.re>

8 years agoMake the second argument of dtrace_invop() a trapframe pointer.
markj [Sun, 17 Apr 2016 23:08:47 +0000 (23:08 +0000)]
Make the second argument of dtrace_invop() a trapframe pointer.

Currently this argument is a pointer into the stack which is used by FBT
to fetch the first five probe arguments. On all non-x86 architectures it's
simply the trapframe address, so this change has no functional impact. On
amd64 it's a pointer into the trapframe such that stack[1 .. 5] gives the
first five argument registers, which are deliberately grouped together in
the amd64 trapframe definition.

A trapframe argument simplifies the invop handlers on !x86 and makes the
x86 FBT invop handler easier to understand. Moreover, it allows for invop
handlers that may want to modify the register set of the interrupted thread.

8 years agoNote that mklocale(1) and colldef(1) are no longer used
bapt [Sun, 17 Apr 2016 23:02:49 +0000 (23:02 +0000)]
Note that mklocale(1) and colldef(1) are no longer used

mklocale and colldef has been replaced by localedef, but they have to be kept
until 10.2 is EOL for mklocale (it has been added to 10.3 as a bootstrap tools)
and until 10.3 is EOL for colldef (it has never been added to bootstrap tools)

8 years agoUse the nitems() macro
bapt [Sun, 17 Apr 2016 22:42:48 +0000 (22:42 +0000)]
Use the nitems() macro

8 years agoImport libucl 0.8.0
bapt [Sun, 17 Apr 2016 21:30:40 +0000 (21:30 +0000)]
Import libucl 0.8.0

8 years agoAdd CAM_NETFLIX_IOSCHED to the build.
imp [Sun, 17 Apr 2016 21:29:47 +0000 (21:29 +0000)]
Add CAM_NETFLIX_IOSCHED to the build.

8 years agoDo the intmax_t dance for debug so CAM_NETFLIX_IOSCHED builds on
imp [Sun, 17 Apr 2016 21:29:44 +0000 (21:29 +0000)]
Do the intmax_t dance for debug so CAM_NETFLIX_IOSCHED builds on
i386.

Sponsored by: Netflix, Inc

8 years agoImport libucl 0.8.0
bapt [Sun, 17 Apr 2016 21:25:53 +0000 (21:25 +0000)]
Import libucl 0.8.0

8 years agoImport sqlite3 3.12.1
bapt [Sun, 17 Apr 2016 21:23:14 +0000 (21:23 +0000)]
Import sqlite3 3.12.1

8 years agoImport sqlite3-3.12.1 (3120100)
bapt [Sun, 17 Apr 2016 21:14:22 +0000 (21:14 +0000)]
Import sqlite3-3.12.1 (3120100)

8 years agomail: Don't truncate mtime of mailbox to microseconds.
jilles [Sun, 17 Apr 2016 20:00:24 +0000 (20:00 +0000)]
mail: Don't truncate mtime of mailbox to microseconds.

8 years agoFix markup on "\n" in printf so it renders correctly.
wblock [Sun, 17 Apr 2016 18:25:34 +0000 (18:25 +0000)]
Fix markup on "\n" in printf so it renders correctly.

PR: 208852
Submitted by: coder@tuxfamily.org
MFC after: 1 week

8 years agoundo previous commit - WIP was committed by accident.
adrian [Sun, 17 Apr 2016 15:51:26 +0000 (15:51 +0000)]
undo previous commit - WIP was committed by accident.

Noticed by: bz

8 years agoUntil it has been properly fixed upstream, apply a temporary workaround
dim [Sun, 17 Apr 2016 15:48:19 +0000 (15:48 +0000)]
Until it has been properly fixed upstream, apply a temporary workaround
for LLVM PR 26999 (in some cases, -save-temps can cause an assertion
failure in clang's -cc1as stage).

8 years agoRemove leftover from Big5HKSCS removal
bapt [Sun, 17 Apr 2016 12:12:25 +0000 (12:12 +0000)]
Remove leftover from Big5HKSCS removal

8 years agoThe struct thread td_estcpu member is only used by the 4BSD scheduler.
kib [Sun, 17 Apr 2016 11:04:27 +0000 (11:04 +0000)]
The struct thread td_estcpu member is only used by the 4BSD scheduler.
Move it to the struct td_sched for 4BSD, removing always present
field, otherwise unused for ULE.

New scheduler method sched_estcpu() returns the estimation for
kinfo_proc consumption.  As before, it always returns 0 for ULE.

Remove sched_tick() scheduler method, unused both by 4BSD and ULE.

Update locking comment for the 4BSD struct td_sched, copying it from
the same comment for ULE.

Spell MAXPRI as PRI_MAX_TIMESHARE in the 4BSD comment.

Based on some notes from, and reviewed by: bde
Sponsored by: The FreeBSD Foundation

8 years agoAdd hw.dmar.batch_coalesce tunable/sysctl, which specifies rate at
kib [Sun, 17 Apr 2016 10:56:56 +0000 (10:56 +0000)]
Add hw.dmar.batch_coalesce tunable/sysctl, which specifies rate at
which queued invalidation completion interrupt is requested with
regard to the queued invalidation requests.  In other words, setting
the value of the knob to N requests completion interrupt after N items
are processed.  Existing behaviour is restored by setting
hw.dmar.batch_coalesce=1.

The knob significantly decreases the DMAR qi interrupt rate at the
cost of slightly longer DMAR map entries recycling.

Sponsored by: The FreeBSD Foundation

8 years agoImplement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM
imp [Sun, 17 Apr 2016 05:24:36 +0000 (05:24 +0000)]
Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM
can handle it, and add the code to add it to the FIS that's sent to
the drive. The mvs driver is the only other ATA driver in the system,
and its hardware doesn't appear to support setting the Auxiliary
register.

Differential Revision: https://reviews.freebsd.org/D5598

8 years agotag_action is not used at all in ata. It's set to 1 for ordered
imp [Sun, 17 Apr 2016 05:24:28 +0000 (05:24 +0000)]
tag_action is not used at all in ata. It's set to 1 for ordered
transactions, but that value isn't used. It's bogusly used to report
in devstat, due to a cut and paste error from SCSI. Mark it as unused
in cam_fill_ataio. Reclaim the memory as a new ata_flags. In addition,
tag_id and init_id are completely unused, so reclaim those as 'unused'
now too. These were needlessly copied when ata was split from scsi.

This allows us, in the future, to create structures that can
communicate AUXILIARY regsiter to the SIMs, which cannot be done now.

Differential Revision: https://reviews.freebsd.org/D5598

8 years agoTurn ssh_host_dsa_key back on until PR#208254 is taken care of.
peter [Sun, 17 Apr 2016 03:57:37 +0000 (03:57 +0000)]
Turn ssh_host_dsa_key back on until PR#208254 is taken care of.

8 years agoFix etcupdate(8) with rc.sendmail and devd/*. It turns out
gjb [Sun, 17 Apr 2016 03:45:45 +0000 (03:45 +0000)]
Fix etcupdate(8) with rc.sendmail and devd/*.  It turns out
BIN1 and such in etc/* cannot use FILESGROUPS.

Reported by: peter
Sponsored by: The FreeBSD Foundation

8 years agoRemove lib/libcapsicum and libexec/casper, brought back as
gjb [Sun, 17 Apr 2016 02:51:04 +0000 (02:51 +0000)]
Remove lib/libcapsicum and libexec/casper, brought back as
part of a merge mishap.

Reported by: junovitch
Sponsored by: The FreeBSD Foundation

8 years ago[urtwn] set the A-MPDU density to 16.
adrian [Sun, 17 Apr 2016 02:39:58 +0000 (02:39 +0000)]
[urtwn] set the A-MPDU density to 16.

Obtained from: Linux rtlwifi/rtl8xxxu

8 years agoDell has an OEM drive from Samsung that has issues. NCQ Trim isn't
imp [Sun, 17 Apr 2016 02:06:10 +0000 (02:06 +0000)]
Dell has an OEM drive from Samsung that has issues. NCQ Trim isn't
broken on this drive, but it doesn't support it and the fallback logic
is failing. Quirk it until those issues can be resolved in a more
generic way.

8 years agoOnly compile the FDT bits when we are using FDT.
adrian [Sun, 17 Apr 2016 02:05:45 +0000 (02:05 +0000)]
Only compile the FDT bits when we are using FDT.

8 years agoFix the ICMP6 handling for SCTP.
tuexen [Sat, 16 Apr 2016 21:34:49 +0000 (21:34 +0000)]
Fix the ICMP6 handling for SCTP.
Keep the IPv4 code in sync.

MFC after: 1 week

8 years agoAdd Codel to NOTES.
loos [Sat, 16 Apr 2016 20:54:55 +0000 (20:54 +0000)]
Add Codel to NOTES.

X-MFC with: r287009
Sponsored by: Rubicon Communications (Netgate)

8 years agoRemove Big5HKSCS entries from mtree
bapt [Sat, 16 Apr 2016 20:42:51 +0000 (20:42 +0000)]
Remove Big5HKSCS entries from mtree

Reported by: ache

8 years agoQuote variable for architectures where we have more than
netchild [Sat, 16 Apr 2016 20:41:13 +0000 (20:41 +0000)]
Quote variable for architectures where we have more than
one linuxulator (32/64bit) and as such may have a space
between both linuxulator locations.

Noticed by: Miltiadis Margaronis <mmargaron@gmail.com>
Tested by: Miltiadis Margaronis <mmargaron@gmail.com>

8 years agoImport Mediatek/Ralink dts files from OpenWRT
sgalabov [Sat, 16 Apr 2016 20:01:08 +0000 (20:01 +0000)]
Import Mediatek/Ralink dts files from OpenWRT

Import original OpenWRT dts files after executing the following script
on them:

for f in `ls [mr]t*.dtsi`; do
printf "\n#include <fbsd-$f>\n" >> $f
done

Approved by: adrian (mentor)
Obtained from: OpenWRT
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5971

8 years agoAdd support for boot arguments specification via fdt
sgalabov [Sat, 16 Apr 2016 19:44:41 +0000 (19:44 +0000)]
Add support for boot arguments specification via fdt

Add suppport for passing boot arguments via FDT for mediatek/ralink SoCs.
This was taken from kan's work on CI20.

Since most OpenWRT dts files have bootargs defined, we use bsdbootargs
to specify FreeBSD specific arguments.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5979

8 years agoChange MIPS_INTRNG to INTRNG in MEDIATEK_BASE config
sgalabov [Sat, 16 Apr 2016 19:42:54 +0000 (19:42 +0000)]
Change MIPS_INTRNG to INTRNG in MEDIATEK_BASE config

Revision 298068 changed MIPS_INTRNG and ARM_INTRNG to simply INTRNG.
MEDIATEK_BASE config was missed by this revision, so we change
MIPS_INTRNG to INTRNG here.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5978

8 years agoRegenerate the Makefile so that actually the new generated collation are
bapt [Sat, 16 Apr 2016 19:39:51 +0000 (19:39 +0000)]
Regenerate the Makefile so that actually the new generated collation are
properly installed

8 years agoDo not forget to set the destination directory for the new collation
bapt [Sat, 16 Apr 2016 19:39:02 +0000 (19:39 +0000)]
Do not forget to set the destination directory for the new collation

8 years agoRemove the RCSID line from ntp_control.c, and set the fbsd:nokeywords
gjb [Sat, 16 Apr 2016 18:10:11 +0000 (18:10 +0000)]
Remove the RCSID line from ntp_control.c, and set the fbsd:nokeywords
property.  This should have been done a while back (certainly before
mergeing projects/release-pkg to head), but I fixed the merge conflicts
and forgot to correct the real problem afterward.

Noticed by: peter
Sponsored by: The FreeBSD Foundation

8 years agoComplete the Obsoletefiles entries
bapt [Sat, 16 Apr 2016 18:07:44 +0000 (18:07 +0000)]
Complete the Obsoletefiles entries

8 years agoRegenerates locales Makefiles and locales
bapt [Sat, 16 Apr 2016 17:55:11 +0000 (17:55 +0000)]
Regenerates locales Makefiles and locales

8 years agolibc: make some more use of the nitems() macro.
pfg [Sat, 16 Apr 2016 17:52:00 +0000 (17:52 +0000)]
libc: make some more use of the nitems() macro.

We have an nitems() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
Given that it is available already without adding additional
headers and other parts of libc already use it, extend a bit
more its use.

8 years agoReadd the zh_hant_HK.UTF-8 removed by accident
bapt [Sat, 16 Apr 2016 17:46:50 +0000 (17:46 +0000)]
Readd the zh_hant_HK.UTF-8 removed by accident

Only Big5HKSCS as been removed.

8 years agoReally stop converting map from UTF-8 to GB2312
bapt [Sat, 16 Apr 2016 17:44:36 +0000 (17:44 +0000)]
Really stop converting map from UTF-8 to GB2312

8 years agoReplace generated maps with maps extracted from CLDR for GB3212 and eucCN
bapt [Sat, 16 Apr 2016 17:39:39 +0000 (17:39 +0000)]
Replace generated maps with maps extracted from CLDR for GB3212 and eucCN

8 years agoRework collation generation:
bapt [Sat, 16 Apr 2016 17:36:02 +0000 (17:36 +0000)]
Rework collation generation:

When building collation database for non unicode encodings use the proper
unicode mapping (this fixes collation not working properly for those encodings)

For locales where new characters are added but only for unicode, stop trying to
map the new characters, directly extract from CLDR the collation files for the
said encoding

Stop trying to generate encoding map from unicode version for GB2312 and encCN
It was not reliable. Instead use the map provide by the CLDR project

Reported by: ache

8 years agoUse the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead of
bapt [Sat, 16 Apr 2016 13:10:31 +0000 (13:10 +0000)]
Use the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead of
calling fcntl(2)

MFC after: 1 week

8 years agoFix a mandoc -Tlint warning
bapt [Sat, 16 Apr 2016 12:49:26 +0000 (12:49 +0000)]
Fix a mandoc -Tlint warning

8 years agoDirectly set the O_CLOEXEC flags via the open(2) attributes
bapt [Sat, 16 Apr 2016 12:47:23 +0000 (12:47 +0000)]
Directly set the O_CLOEXEC flags via the open(2) attributes

MFC after: 1 week

8 years agoUse pipe2(2) to directly set the close-on-exec flags directly
bapt [Sat, 16 Apr 2016 12:42:01 +0000 (12:42 +0000)]
Use pipe2(2) to directly set the close-on-exec flags directly

MFC after: 1 week

8 years agoPrint error messages to stderr
bapt [Sat, 16 Apr 2016 12:32:26 +0000 (12:32 +0000)]
Print error messages to stderr

8 years agosh: Write LINENO value to stack string directly.
jilles [Sat, 16 Apr 2016 12:14:44 +0000 (12:14 +0000)]
sh: Write LINENO value to stack string directly.

8 years agoMerge the projects/release-pkg branch to head.
gjb [Sat, 16 Apr 2016 07:45:30 +0000 (07:45 +0000)]
Merge the projects/release-pkg branch to head.

This allows packaging the base system with pkg(8), including
but not limited to providing the ability to provide upstream
binary update possibilities for non-tier-1 architectures.

This merge is a requirement of the 11.0-RELEASE, and as such,
thank you to everyone that has tested the project branch.

Documentation in build(7) etc. is still somewhat sparse, but
updates to those parts will follow.

Sponsored by: The FreeBSD Foundation

8 years agozfs_rezget: z_vnode can not be NULL if zp is valid
avg [Sat, 16 Apr 2016 07:41:56 +0000 (07:41 +0000)]
zfs_rezget: z_vnode can not be NULL if zp is valid

MFC after: 3 weeks

8 years agozfs: enable vn_io_fault support
avg [Sat, 16 Apr 2016 07:35:53 +0000 (07:35 +0000)]
zfs: enable vn_io_fault support

Note that now we have to account for possible partial writes
in dmu_write_uio_dbuf().  It seems that on illumos either all or none
of the data are expected to be written.  But the partial writes are
quite expected when vn_io_fault support is enabled.

Reviewed by: kib
MFC after: 7 weeks
Differential Revision: https://reviews.freebsd.org/D2790

8 years agoMFH
gjb [Sat, 16 Apr 2016 07:33:42 +0000 (07:33 +0000)]
MFH

This is the final merge from ^/head before merging this branch
back to head.  It's time.

Sponsored by: The FreeBSD Foundation

8 years agoSimplify memory allocation for NS requests.
mav [Sat, 16 Apr 2016 06:36:56 +0000 (06:36 +0000)]
Simplify memory allocation for NS requests.

Since we no longer need additional buffers for request and response IOCBs,
we can increase receive space by 192 bytes, that is enough for fetching 48
more ports.  The new limit is 1020 fabric ports per virtual port.

MFC after: 1 month

8 years agoFix rdrand_rng.ko and padlock_rng.ko dependencies, making modules
kib [Sat, 16 Apr 2016 06:10:47 +0000 (06:10 +0000)]
Fix rdrand_rng.ko and padlock_rng.ko dependencies, making modules
loadable when not compiled into the kernel.

Approved by: so (delphij)
Sponsored by: The FreeBSD Foundation

8 years agoAdd x86 CPU features definitions published in the Intel SDM rev. 58.
kib [Sat, 16 Apr 2016 06:07:13 +0000 (06:07 +0000)]
Add x86 CPU features definitions published in the Intel SDM rev. 58.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoMFH (bogus svn:mergeinfo, no functional changes)
gjb [Sat, 16 Apr 2016 03:48:15 +0000 (03:48 +0000)]
MFH (bogus svn:mergeinfo, no functional changes)

Sponsored by: The FreeBSD Foundation

8 years agoRemove svn:mergeinfo on files with which it should never have
gjb [Sat, 16 Apr 2016 03:44:50 +0000 (03:44 +0000)]
Remove svn:mergeinfo on files with which it should never have
existed.

Sponsored by: The FreeBSD Foundation

8 years agoMFH
gjb [Sat, 16 Apr 2016 02:32:12 +0000 (02:32 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoAdd a test for cancelling an active AIO request on a socket.
jhb [Sat, 16 Apr 2016 00:01:16 +0000 (00:01 +0000)]
Add a test for cancelling an active AIO request on a socket.

The older AIO code awakened all pending AIO requests on a socket
when any data arrived.  This could result in AIO daemons blocking on
an empty socket buffer.  These requests could not be cancelled
which led to a deadlock during process exit.  This test reproduces
this case.  The newer AIO code is able to cancel the pending AIO
request correctly.

Reviewed by: ngie (-ish)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4363

8 years agoCleanup unnecessary semicolons from utilities we all love.
pfg [Fri, 15 Apr 2016 22:31:22 +0000 (22:31 +0000)]
Cleanup unnecessary semicolons from utilities we all love.

8 years agoReplace <tab><tab> with <space><tab>.
loos [Fri, 15 Apr 2016 21:31:40 +0000 (21:31 +0000)]
Replace <tab><tab> with <space><tab>.

No functional change.

Sponsored by: Rubicon Communications (Netgate)

8 years agoFix the 'type' for a few variables from tcpcb.
hiren [Fri, 15 Apr 2016 20:27:36 +0000 (20:27 +0000)]
Fix the 'type' for a few variables from tcpcb.

Reviewed by: markj
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D5973

8 years agosavecore(8): Explicitly cast to fix i386 warning
cem [Fri, 15 Apr 2016 20:19:32 +0000 (20:19 +0000)]
savecore(8): Explicitly cast to fix i386 warning

8 years agoelfcopy: fix symbol table handling when sections come after symtab/strtab
emaste [Fri, 15 Apr 2016 19:06:36 +0000 (19:06 +0000)]
elfcopy: fix symbol table handling when sections come after symtab/strtab

  Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab,
  .strtab and .shstrtab sections in the end of the output object.  If
  the input objects have more sections after any of these 3 sections,
  the section table will be reordered, and in that case the section
  symbols should be regenerated for relocations.

  The bug is triggered since newer clang puts .strtab section in the
  beginning of the object produced.

   Ticket: #525

Reported by: royger
Obtained from: ELF Tool Chain r3443

8 years agoDocument SHLIB/SHLIB_CXX/NO_PIC.
bdrewery [Fri, 15 Apr 2016 18:49:26 +0000 (18:49 +0000)]
Document SHLIB/SHLIB_CXX/NO_PIC.

Sponsored by: EMC / Isilon Storage Division

8 years agoImport to 0.6.1
phil [Fri, 15 Apr 2016 18:46:15 +0000 (18:46 +0000)]
Import to 0.6.1
  0.5.0:
    document "trim" modifier
    add xo_emit_field functions
    Add xo_set_file{,_h} functions
    Fix LIBXO_* variables; add -L and -I as needed
    add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
    fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
    flush after transitions; fix flush call in xo_do_emit
    mkdir the version-specific packaging dir
    use "XO_" instead of LIBXO_

  0.6.0:
    Add --with-retain-size to set the size (in bits) of the retain hash buckets
    Add The Argument Modifier ({a:})
    Add retain and no-retain to --libxo
    autoconf: Add test for monitor.h
    Document quote heuristic
    go deep with nroff backslashes
    Use "ULL" for 32 bit check
    add xo_retain_clear and xo_retain_clear_all
    docs: combine two 'handles' section; move command line argument section
    handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
    make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
    new xo_emit_f functions
    nuke some unused UNUSEDs
    test code: path must be static
    update test cases

  0.6.1:
    fix version number (missed a commit during new-release)

Reviewed by: sjg
Approved by: sjg (mentor)

8 years agoAdd SHLIB_CXX to allow building a C++ shared library without a static one.
bdrewery [Fri, 15 Apr 2016 18:43:54 +0000 (18:43 +0000)]
Add SHLIB_CXX to allow building a C++ shared library without a static one.

Submitted by: ngie
Sponsored by: EMC / Isilon Storage Division

8 years agoSet CPP from XCPP for the libcompat build.
bdrewery [Fri, 15 Apr 2016 18:32:05 +0000 (18:32 +0000)]
Set CPP from XCPP for the libcompat build.

Submitted by: Mark Millard <markmi@dsl-only.net>

8 years agoTag libxo 0.6.0
phil [Fri, 15 Apr 2016 18:03:53 +0000 (18:03 +0000)]
Tag libxo 0.6.0

8 years agoImport libxo 0.6.0
phil [Fri, 15 Apr 2016 18:03:30 +0000 (18:03 +0000)]
Import libxo 0.6.0

8 years agoAdd 4Kn kernel dump support
cem [Fri, 15 Apr 2016 17:45:12 +0000 (17:45 +0000)]
Add 4Kn kernel dump support

(And 4Kn minidump support, but only for amd64.)

Make sure all I/O to the dump device is of the native sector size.  To
that end, we keep a native sector sized buffer associated with dump
devices (di->blockbuf) and use it to pad smaller objects as needed (e.g.
kerneldumpheader).

Add dump_write_pad() as a convenience API to dump smaller objects with
zero padding.  (Rather than pull in NPM leftpad, we wrote our own.)

Savecore(1) has been updated to deal with these dumps.  The format for
512-byte sector dumps should remain backwards compatible.

Minidumps for other architectures are left as an exercise for the
reader.

PR: 194279
Submitted by: ambrisko@
Reviewed by: cem (earlier version), rpokala
Tested by: rpokala (4Kn/512 except 512 fulldump), cem (512 fulldump)
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5848

8 years agosys/net* : for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:30:33 +0000 (17:30 +0000)]
sys/net* : for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agofs misc: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:28:24 +0000 (17:28 +0000)]
fs misc: for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoddb: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:27:20 +0000 (17:27 +0000)]
ddb: for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoDon't corrupt ZFS label's physpath attribute when booting while a disk is missing
asomers [Fri, 15 Apr 2016 16:36:17 +0000 (16:36 +0000)]
Don't corrupt ZFS label's physpath attribute when booting while a disk is missing

Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach
prior to verifying the device's GUIDs.  vdev_geom_attach calls
vdev_geom_attrchange to set the physpath in the vdev object.  The result is
that if the disk could not be found, then the labels for other disks in the
same TLD would overwrite the missing disk's physpath with the physpath of
whichever disk currently has the same devname as the missing one used to
have.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agocompat/linux: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:21:13 +0000 (16:21 +0000)]
compat/linux: for pointers replace 0 with NULL.

plvc is a pointer, no functional change.

Found with devel/coccinelle.

8 years agog_gate: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:18:07 +0000 (16:18 +0000)]
g_gate: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agokern: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:10:11 +0000 (16:10 +0000)]
kern: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoRename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
andrew [Fri, 15 Apr 2016 16:05:41 +0000 (16:05 +0000)]
Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
independent code that needs to know about INTRNG such as PCI drivers.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoimport libxo-0.4.7
phil [Fri, 15 Apr 2016 15:50:13 +0000 (15:50 +0000)]
import libxo-0.4.7
    Fix bug w/ {e:} in html, where no default encoding format was built
    docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo)

Reviewed by: sjg
Approved by: sjg (mentor)

8 years agonetinet: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 15:46:41 +0000 (15:46 +0000)]
netinet: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: ae. tuexen