]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMerge ^/head r294169 through r294598.
dim [Fri, 22 Jan 2016 20:41:56 +0000 (20:41 +0000)]
Merge ^/head r294169 through r294598.

8 years agoIn tty_dealloc(), clear the queues. See the comment for a scenario
kib [Fri, 22 Jan 2016 20:38:46 +0000 (20:38 +0000)]
In tty_dealloc(), clear the queues.  See the comment for a scenario
which explains why ttydev_leave() cleanup might not happen.

Submitted by: bde
MFC after: 3 weeks

8 years agoAdd a standards compliance note for strtok_r as suggested by cpercival.
wblock [Fri, 22 Jan 2016 20:36:03 +0000 (20:36 +0000)]
Add a standards compliance note for strtok_r as suggested by cpercival.

Reviewed by: cpercival
MFC after: 1 week

8 years agoThe struct file f_advice member is overlaid with the devfs f_cdevpriv
kib [Fri, 22 Jan 2016 20:35:20 +0000 (20:35 +0000)]
The struct file f_advice member is overlaid with the devfs f_cdevpriv
data.  If vnode bypass for devfs file failed, vn_read/vn_write are
called and might try to dereference f_advice.  Limit the accesses to
f_advice to VREG vnodes only, which is the type ensured by
posix_fadvise().

The f_advice for regular files is protected by mtxpool lock.  Recheck
that f_advice is not NULL after lock is taken.

Reported and tested by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agoWhen devfs dirent is freed, a vnode might still keep a pointer to it,
kib [Fri, 22 Jan 2016 20:30:51 +0000 (20:30 +0000)]
When devfs dirent is freed, a vnode might still keep a pointer to it,
apparently.  Interlock and clear the pointer to avoid free memory
dereference.

Submitted by: bde (previous version)
MFC after: 3 weeks

8 years agoRemove printf only useful for debugging.
kib [Fri, 22 Jan 2016 20:28:24 +0000 (20:28 +0000)]
Remove printf only useful for debugging.

Requested by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agosh: Clean a readonly local, even if the variable does not exist outside.
jilles [Fri, 22 Jan 2016 20:10:08 +0000 (20:10 +0000)]
sh: Clean a readonly local, even if the variable does not exist outside.

If a local variable has been made read-only, this should not prevent its
removal when the function returns.

8 years agoUpdate whois synopsis and usage with new options
fanf [Fri, 22 Jan 2016 19:06:43 +0000 (19:06 +0000)]
Update whois synopsis and usage with new options

8 years agoRestore libunwind.cpp to LLVM libunwind build (reverts r294576)
emaste [Fri, 22 Jan 2016 19:03:39 +0000 (19:03 +0000)]
Restore libunwind.cpp to LLVM libunwind build (reverts r294576)

The unw_* functions are not exported, but are used internally.

8 years agosh: Add already working test for local-readonly interaction.
jilles [Fri, 22 Jan 2016 18:10:36 +0000 (18:10 +0000)]
sh: Add already working test for local-readonly interaction.

8 years agoBump .Dd after r294575
bjk [Fri, 22 Jan 2016 17:17:27 +0000 (17:17 +0000)]
Bump .Dd after r294575

8 years agoFix ix advertise value after media change
smh [Fri, 22 Jan 2016 17:03:32 +0000 (17:03 +0000)]
Fix ix advertise value after media change

When ifconfig sets media then the values displayed by the advertise_speed
value are invalidated.

Fix this by setting the bits correctly including setting advertise to 0 for
media = auto.

Reviewed by: sbruno
MFC after: 1 week
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5034

8 years agoAdd support for RISC-V ISA.
br [Fri, 22 Jan 2016 16:59:06 +0000 (16:59 +0000)]
Add support for RISC-V ISA.

Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5021

8 years agoDrop HP libunwind (unw_*) functions from LLVM libunwind
emaste [Fri, 22 Jan 2016 16:47:36 +0000 (16:47 +0000)]
Drop HP libunwind (unw_*) functions from LLVM libunwind

They are not needed for exception handling.

8 years agoA few `whois` usability improvements
fanf [Fri, 22 Jan 2016 16:43:49 +0000 (16:43 +0000)]
A few `whois` usability improvements

Look up AS numbers at ARIN.

Handle more referral formats.

Suppress spammy nameserver objects when querying the .com and .net
whois servers by explicitly querying for domain names by default.

8 years agoAdd stubs for RISC-V ISA so libunwind can be compiled.
br [Fri, 22 Jan 2016 16:42:06 +0000 (16:42 +0000)]
Add stubs for RISC-V ISA so libunwind can be compiled.

Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5035

8 years agoAdd configuration for RISC-V ISA.
br [Fri, 22 Jan 2016 16:37:26 +0000 (16:37 +0000)]
Add configuration for RISC-V ISA.

Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5020

8 years agoStop including fdt_common.h in the arm64 code. We don't use anything from
andrew [Fri, 22 Jan 2016 16:35:01 +0000 (16:35 +0000)]
Stop including fdt_common.h in the arm64 code. We don't use anything from
it, however may have relied on header pollution to pull in the needed
headers through it

Sponsored by: ABT Systems Ltd

8 years agoAdd support for RISC-V ISA.
br [Fri, 22 Jan 2016 16:32:22 +0000 (16:32 +0000)]
Add support for RISC-V ISA.

Reviewed by: andrew
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5014

8 years agoChange the variable to a #define in order to make gcc happy which
bz [Fri, 22 Jan 2016 15:03:22 +0000 (15:03 +0000)]
Change the variable to a #define in order to make gcc happy which
otherwise will complain about "variably modified 'alias' at file scope".
Unbreaks the build on gcc platforms.

8 years agosem: Don't free nameinfo that is still in list when open() fails.
jilles [Fri, 22 Jan 2016 14:52:31 +0000 (14:52 +0000)]
sem: Don't free nameinfo that is still in list when open() fails.

This bug could be reproduced easily by calling sem_open() with O_CREAT |
O_EXCL on a semaphore that is already open in the process. The struct
sem_nameinfo would be freed while still in sem_list and later calls to
sem_open() or sem_close() could access freed memory.

PR: 206396
MFC after: 5 days

8 years agor294563 was incomplete; re-add the client-side options as well.
des [Fri, 22 Jan 2016 14:22:11 +0000 (14:22 +0000)]
r294563 was incomplete; re-add the client-side options as well.

8 years agoInstead of removing the NoneEnabled option, mark it as unsupported.
des [Fri, 22 Jan 2016 13:13:46 +0000 (13:13 +0000)]
Instead of removing the NoneEnabled option, mark it as unsupported.
(should have done this in r291198, but didn't think of it until now)

8 years agoOnly define fdt_pic_table on arm, and when not using intrng as this is
andrew [Fri, 22 Jan 2016 13:09:43 +0000 (13:09 +0000)]
Only define fdt_pic_table on arm, and when not using intrng as this is
the only place that uses it.

8 years agoStop defining fdt_pic_table with ARM_INTRNG, it's unused.
andrew [Fri, 22 Jan 2016 12:51:12 +0000 (12:51 +0000)]
Stop defining fdt_pic_table with ARM_INTRNG, it's unused.

8 years agoDo not generate RSA1 or DSA keys by default.
des [Fri, 22 Jan 2016 12:14:08 +0000 (12:14 +0000)]
Do not generate RSA1 or DSA keys by default.

8 years agoStop calling fdt_immr_addr from the xlp startup code. It's used to set
andrew [Fri, 22 Jan 2016 12:00:56 +0000 (12:00 +0000)]
Stop calling fdt_immr_addr from the xlp startup code. It's used to set
fdt_immr_{va,pa,size}, but these are not used outside a single ARM SoC.

8 years agoHide "soconnect() error" messages under bootverbose.
mav [Fri, 22 Jan 2016 09:32:19 +0000 (09:32 +0000)]
Hide "soconnect() error" messages under bootverbose.

They can be too noisy.

8 years agohyperv/stor: Verify returned inquiry data before further dispatching
sephe [Fri, 22 Jan 2016 09:06:40 +0000 (09:06 +0000)]
hyperv/stor: Verify returned inquiry data before further dispatching

Windows 10 and Window 2016 will return all zero inquiry data for
non-existing slots.  If we dispatched them, then a lot of useless
(0 sized) disks would be created.  So we verify the returned inquiry
data (valid type, non-empty vendor/product/revision etc.), before
further dispatching.

Minor white space cleanup and wording fix.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: adrian, sephe, Jun Su <junsu microsoft com>
Approved by: adrian (mentor)
Modified by: sephe
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4928

8 years agoSwitch to syscall; HEAD lacks fbt for kill(2)
dteske [Fri, 22 Jan 2016 08:29:23 +0000 (08:29 +0000)]
Switch to syscall; HEAD lacks fbt for kill(2)

MFC after: 3 days
X-MFC-to: stable/10
X-MFC-with: 294548

8 years agoMFV r294491: ntp 4.2.8p6.
delphij [Fri, 22 Jan 2016 07:32:39 +0000 (07:32 +0000)]
MFV r294491: ntp 4.2.8p6.

Security: CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security: CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security: CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security: CVE-2015-8140, CVE-2015-8158
With hat: so

8 years agohyperv/vmbus: Lookup channel through id table
sephe [Fri, 22 Jan 2016 07:29:31 +0000 (07:29 +0000)]
hyperv/vmbus: Lookup channel through id table

Vmbus event handler will need to find the channel by its relative
id, when software interrupt for event happens.  The original lookup
searches the channel list, which is not very efficient.  We now
create a table indexed by the channel relative id to speed up
the channel lookup.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: delphij, adrain, sephe, Dexuan Cui <decui microsoft com>
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4802

8 years agoFix bad title on script (caused by copy/paste)
dteske [Fri, 22 Jan 2016 07:22:30 +0000 (07:22 +0000)]
Fix bad title on script (caused by copy/paste)

MFC after: 3 days
X-MFC-to: stable/10
X-MFC-with: r294548

8 years agoAdd scripts for watching common entry points.
dteske [Fri, 22 Jan 2016 07:19:30 +0000 (07:19 +0000)]
Add scripts for watching common entry points.

MFC after: 3 days
X-MFC-to: stable/10

8 years agoProvide busdma stubs for loader/kshim
wma [Fri, 22 Jan 2016 06:26:11 +0000 (06:26 +0000)]
Provide busdma stubs for loader/kshim

    Simple bus space stubs require the VA-PA mapping
    to be identical.

Approved by:           hselasky, cognet (mentor)
Differential revision: https://reviews.freebsd.org/D4314

8 years agoFix compilation errors in usb/kshim
wma [Fri, 22 Jan 2016 06:05:31 +0000 (06:05 +0000)]
Fix compilation errors in usb/kshim

    Remove old header from the include list and declare extern symbol
    for delay() function.

Approved by:           hselasky, cognet (mentor)
Differential revision: https://reviews.freebsd.org/D5012

8 years ago[flash] Teach mx25l SPI flash driver to interact with fdt_slicer and geom_flashmap
adrian [Fri, 22 Jan 2016 03:15:53 +0000 (03:15 +0000)]
[flash] Teach mx25l SPI flash driver to interact with fdt_slicer and geom_flashmap

This teaches the mx25l driver (sys/dev/flash/mx25l.c) to interact with
sys/dev/fdt/fdt_slicer.c and sys/geom/geom_flashmap.c.

This allows systems with SPI flash to benefit from the possibility to define
flash 'slices' via FDT, just the same way that it's currently possible for
CFI and NAND flashes.

Tested:

* Carambola 2, AR9331 + SPI NOR flash

PR: kern/206227
Submitted by: Stanislav Galabov <sgalabov@gmail.com>

8 years agoSwitch from FD_SETSIZE to getdtablesize(2) as it can make the FD to be
araujo [Fri, 22 Jan 2016 03:02:38 +0000 (03:02 +0000)]
Switch from FD_SETSIZE to getdtablesize(2) as it can make the FD to be
tunable. Also it gets more close with the original implementation from
OpenBSD.

Requested by: rodrigc
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4970

8 years agoRemove old generated unwind.h when using LLVM libunwind
emaste [Fri, 22 Jan 2016 02:28:17 +0000 (02:28 +0000)]
Remove old generated unwind.h when using LLVM libunwind

When not using LLVM libunwind, unwind.h is a generated header and a stale
copy may remain in the OBJDIR after enabling LLVM libunwind. Explicitly
remove it.

Reported by: bz
Reviewed by: bdrewery
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5019

8 years ago- Separate sendfile(2) implementation from uipc_syscalls.c into
glebius [Fri, 22 Jan 2016 02:23:18 +0000 (02:23 +0000)]
- Separate sendfile(2) implementation from uipc_syscalls.c into
  separate file.  Claim my copyright.
- Provide more comments, better function and structure names.
- Sort out unneeded includes from resulting two files.

No functional changes.

8 years agoProvide new socket option TCP_CCALGOOPT, which stands for TCP congestion
glebius [Fri, 22 Jan 2016 02:07:48 +0000 (02:07 +0000)]
Provide new socket option TCP_CCALGOOPT, which stands for TCP congestion
control algorithm options.  The argument is variable length and is opaque
to TCP, forwarded directly to the algorithm's ctl_output method.

Provide new includes directory netinet/cc, where algorithm specific
headers can be installed.

The new API doesn't yet have any in tree consumers.

The original code written by lstewart.
Reviewed by: rrs, emax
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D711

8 years agoAdd an atomic_fetchadd_64() wrapper on sparc64.
jhb [Fri, 22 Jan 2016 00:29:11 +0000 (00:29 +0000)]
Add an atomic_fetchadd_64() wrapper on sparc64.

Reviewed by: marius

8 years agoRefactor TCP_CONGESTION setsockopt handling:
glebius [Thu, 21 Jan 2016 22:53:12 +0000 (22:53 +0000)]
Refactor TCP_CONGESTION setsockopt handling:
- Use M_TEMP instead of stack variable.
- Unroll error handling, removing several levels of indentation.

8 years ago- Rename cc.h to more meaningful tcp_cc.h.
glebius [Thu, 21 Jan 2016 22:34:51 +0000 (22:34 +0000)]
- Rename cc.h to more meaningful tcp_cc.h.
- Declare it a kernel only include, which it already is.
- Don't include tcp.h implicitly from tcp_cc.h

8 years agoCleanup TCP files from unnecessary interface related includes.
glebius [Thu, 21 Jan 2016 22:24:20 +0000 (22:24 +0000)]
Cleanup TCP files from unnecessary interface related includes.

8 years agoUpdate comment to note the function, prison_priv_check(), that needs to
mckusick [Thu, 21 Jan 2016 20:52:20 +0000 (20:52 +0000)]
Update comment to note the function, prison_priv_check(), that needs to
be updated in kern_jail.c when a new priviledge is added.

8 years agoAdd STB_GNU_UNIQUE symbol binding definition
emaste [Thu, 21 Jan 2016 20:44:21 +0000 (20:44 +0000)]
Add STB_GNU_UNIQUE symbol binding definition

Red Hat created STB_GNU_UNIQUE to handle certain special cases relating
to dynamically loading C++ DSOs[1].

We don't (currently) have support for STB_GNU_UNIQUE, but ought to
reserve the value in ELFNN_ST_BIND. This will also be used by an
upcoming ELF Tool Chain import.

[1] https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoAdd missing atomic wrapper macro.
hselasky [Thu, 21 Jan 2016 18:22:50 +0000 (18:22 +0000)]
Add missing atomic wrapper macro.

Reviewed by: alfred @
Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoFix panic on table/table entry delete. The panic could have happened
melifaro [Thu, 21 Jan 2016 18:20:40 +0000 (18:20 +0000)]
Fix panic on table/table entry delete. The panic could have happened
  if more than 64 distinct values had been used.

Table value code uses internal objhash API which requires unique key
  for each object. For value code, pointer to the actual value data
  is used. The actual problem arises from the fact that 'actual' e.g.
  runtime data is stored in array and that array is auto-growing. There is
  special hook (update_tvalue() function) which is used to update the pointers
  after the change. For some reason, object 'key' was not updated.
  Fix this by adding update code to the update_tvalue().

Sponsored by: Yandex LLC

8 years agoReplace the last non-optional use of sbrk() in the tree with mmap().
brooks [Thu, 21 Jan 2016 18:17:19 +0000 (18:17 +0000)]
Replace the last non-optional use of sbrk() in the tree with mmap().

All gmon want's is a region of memory without the overhead of malloc().
Just mapping some pages with mmap is an easy way to accomplish this.

Approved by: jhb, cem, emaste
Obtained from: CheriBSD (bf33e1e70b368ababde74aa3ac70d108c8a52c69)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D5005

8 years agoImplement 64-bit atomic operations for the LinuxKPI.
hselasky [Thu, 21 Jan 2016 17:56:23 +0000 (17:56 +0000)]
Implement 64-bit atomic operations for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoLinuxKPI atomic fixes:
hselasky [Thu, 21 Jan 2016 17:52:55 +0000 (17:52 +0000)]
LinuxKPI atomic fixes:
- Fix implementation of atomic_add_unless(). The atomic_cmpset_int()
  function returns a boolean and not the previous value of the atomic
  variable.
- The atomic counters should be signed according to Linux.
- Some minor cosmetics and styling while at it.

Reviewed by: alfred @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoUse function macro instead of non-function macro to reduce chance of
hselasky [Thu, 21 Jan 2016 17:36:06 +0000 (17:36 +0000)]
Use function macro instead of non-function macro to reduce chance of
incorrect expansion.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoFix the implementations of PSEUDO_NOERROR and PSEUDO.
brooks [Thu, 21 Jan 2016 17:29:01 +0000 (17:29 +0000)]
Fix the implementations of PSEUDO_NOERROR and PSEUDO.

The PSEUDO* macros should not declare <syscall>, only _<syscall> and
__sys_<syscall>.  This was causing the interposing C wrappers to be
ignored due to link order.

Reviewed by: kib
Obtained from: CheriBSD (4e8e13c90fc6a80e1520de44a6864cfd78b3b56d)
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D4097

8 years agoThe variable is write once only and not used.
bz [Thu, 21 Jan 2016 17:25:41 +0000 (17:25 +0000)]
The variable is write once only and not used.
Recover the vertical space.

Sponsored by: The FreeBSD Foundation
MFC After: 3 days
Obtained from: p4 CH=180830
Reviewed by: gnn, hiren
Differential Revision: https://reviews.freebsd.org/D4898

8 years agoRemove fdt_fixup_table from architectures where it's unneeded. We only make
andrew [Thu, 21 Jan 2016 16:48:01 +0000 (16:48 +0000)]
Remove fdt_fixup_table from architectures where it's unneeded. We only make
use of fdt_fixup_table on PowerPC and ARM. As such we can remove it from
other architectures as it's unneeded.

Reviewed by: nwhitehorn
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5013

8 years agoRemove an extra '!' found by clang 3.8.
andrew [Thu, 21 Jan 2016 16:42:52 +0000 (16:42 +0000)]
Remove an extra '!' found by clang 3.8.

8 years agoFill the ifAlias leaf of the ifXTable with the interface description
harti [Thu, 21 Jan 2016 16:11:20 +0000 (16:11 +0000)]
Fill the ifAlias leaf of the ifXTable with the interface description
if there is one available and it fits into the maximum size (64 characters).

8 years agoPrevent loader.conf load failure due to unknown console entries
smh [Thu, 21 Jan 2016 15:27:44 +0000 (15:27 +0000)]
Prevent loader.conf load failure due to unknown console entries

When processing loader.conf if console contained an entry for an unsupported
console then cons_set would return an error refusing to set any console.

This has two side effects:

1. Forth would throw a syntax error and stop processing loader.conf at that
  point.
2. The value of console is ignored.

#1 Means other important loader.conf entries may not be processed, which is
   clearly undesirable.
#2 Means the users preference for console aren't applied even if they did
   contain valid options. Now we have support for multi boot paths from a
   single image e.g. bios and efi mode the console preference needs to deal
   with the need to set preference for more than one source.

Fix this by:
* Returning CMD_OK where possible from cons_set.
* Allowing set with at least one valid console to proceed.

Reviewed by: allanjude
MFC after: 1 week
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5018

8 years agoImplement idr_preload(), idr_preload_end(), idr_alloc() and
hselasky [Thu, 21 Jan 2016 14:57:45 +0000 (14:57 +0000)]
Implement idr_preload(), idr_preload_end(), idr_alloc() and
idr_alloc_cyclic() in the LinuxKPI. Bump the FreeBSD version to
force recompilation of all KLDs due to IDR structure size change.

MFC after: 2 weeks
Sponsored by: Mellanox Technologies

8 years agoext2fs: Bring back the htree dir_index implementation.
pfg [Thu, 21 Jan 2016 14:50:28 +0000 (14:50 +0000)]
ext2fs: Bring back the htree dir_index implementation.

The htree dir_index is perhaps one of the most characteristic
features of the linux ext3 implementation. It was removed
in r281670, due to repeated bug reports.

Damjan Jovanic detected and fixed three bugs and did some
stress testing by building Apache OpenOffice on top of it
so it is now in good shape to bring back.

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

Submitted by: Damjan Jovanovic
Reviewed by: pfg
Tested by: pho
Relnotes: Yes
MFC after: 2 months (only 10.x)

8 years agoDisable -mlong-calls for the clang libraries for now, it increases the
andrew [Thu, 21 Jan 2016 12:59:54 +0000 (12:59 +0000)]
Disable -mlong-calls for the clang libraries for now, it increases the
size of the clang binary for people with a crt1.o from before r293832.

8 years agoUpdate the instructions and the list of major local modifications.
des [Thu, 21 Jan 2016 12:42:31 +0000 (12:42 +0000)]
Update the instructions and the list of major local modifications.

8 years agoExplain why we don't include VersionAddendum in the debug mode banner.
des [Thu, 21 Jan 2016 12:41:02 +0000 (12:41 +0000)]
Explain why we don't include VersionAddendum in the debug mode banner.

8 years agoUpgrade to OpenSSH 7.1p2.
des [Thu, 21 Jan 2016 11:54:34 +0000 (11:54 +0000)]
Upgrade to OpenSSH 7.1p2.

8 years agoEnable DSA keys by default. They were disabled in OpenSSH 6.9p1.
des [Thu, 21 Jan 2016 11:10:14 +0000 (11:10 +0000)]
Enable DSA keys by default.  They were disabled in OpenSSH 6.9p1.

Noticed by: glebius

8 years agoTake care not to pick up the wrong version of OpenSSL when running in an
des [Thu, 21 Jan 2016 10:57:45 +0000 (10:57 +0000)]
Take care not to pick up the wrong version of OpenSSL when running in an
environment that has OpenSSL from ports in addition to the base version.

8 years agoFix EFI UFS caching
smh [Thu, 21 Jan 2016 08:58:39 +0000 (08:58 +0000)]
Fix EFI UFS caching

EFI was mixing caching in two separate places causing issues when multiple
partitions where tested.

Eliminate this by removing fsstat and re-factoring fsread into fsread_size,
adding basic parameter validation.

Also:
* Enhance some error print outs.
* Fix compilation under UFS1_ONLY and UFS2_ONLY
* Use sizeof on vars instead of structs.
* Add basic parameter validation to fsread_size.

MFC after: 1 week
X-MFC-With: r293268
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4989

8 years agoVendor import of ntp-4.2.8p6.
delphij [Thu, 21 Jan 2016 08:50:56 +0000 (08:50 +0000)]
Vendor import of ntp-4.2.8p6.

8 years agoNote that new ssh(1) doesn't allow to use DSA keys by default.
glebius [Thu, 21 Jan 2016 07:54:05 +0000 (07:54 +0000)]
Note that new ssh(1) doesn't allow to use DSA keys by default.

8 years agoAIO daemons have always been kernel processes to facilitate switching to
jhb [Thu, 21 Jan 2016 02:20:38 +0000 (02:20 +0000)]
AIO daemons have always been kernel processes to facilitate switching to
user VM spaces while servicing jobs.  Update various comments and data
structures that refer to AIO daemons as threads to refer to processes
instead.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4999

8 years agoRemove unused variables for socket AIO.
jhb [Thu, 21 Jan 2016 01:28:31 +0000 (01:28 +0000)]
Remove unused variables for socket AIO.

In r55943, a per-process queue of pending socket AIO requests (requests
waiting for the socket to become ready) was added so that they could be
cancelled during process rundown.  In r154765, the rundown code was
changed to handle jobs in this state (JOBST_JOBQSOCK) directly removing
the need for the extra queue.  However, the per-process queue head and
global lock were never removed.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4997

8 years agocache: minor changes
mjg [Thu, 21 Jan 2016 01:09:39 +0000 (01:09 +0000)]
cache: minor changes

1. vhold and zap immediately instead of postponing few lines later
2. increment numneg after new entry is added

No functional changes.

No objections: kib

8 years agocache: perform . lockup without the namecache lock
mjg [Thu, 21 Jan 2016 01:07:05 +0000 (01:07 +0000)]
cache: perform . lockup without the namecache lock

Reviewed by: kib

8 years agocache: provide a helper for computing the hash
mjg [Thu, 21 Jan 2016 01:05:41 +0000 (01:05 +0000)]
cache: provide a helper for computing the hash

Reviewed by: kib

8 years agocache: use counter(9) API to maintain statistics
mjg [Thu, 21 Jan 2016 01:04:03 +0000 (01:04 +0000)]
cache: use counter(9) API to maintain statistics

Previously the code would just increment statistics while only holding a
shared lock, in effect losing updates.

Separate tracking for nchstats is removed as values can be obtained from
existing counters. Note that some fields are updated by external
consumers and are left unfixed. This should not be a serious issue as
this structure looks quite obsolete.

No strong objections: kib

8 years agoiw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler.
np [Thu, 21 Jan 2016 00:42:48 +0000 (00:42 +0000)]
iw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler.

a) Look for the CPL in the payload buffer instead of the descriptor.
b) Retrieve the socket associated with the tid with the inpcb lock held.

Submitted by: Krishnamraju Eraparaju @ Chelsio

8 years agourtwn: add temperature calibration
avos [Wed, 20 Jan 2016 23:55:39 +0000 (23:55 +0000)]
urtwn: add temperature calibration

Redo LC calibration if temperature changed significantly since last
calibration.

Tested with RTL8188EU/RTL8188CUS in STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Obtained from: NetBSD (mostly)
Differential Revision: https://reviews.freebsd.org/D4966

8 years agosession: avoid proctree lock on proc exit when possible
mjg [Wed, 20 Jan 2016 23:33:58 +0000 (23:33 +0000)]
session: avoid proctree lock on proc exit when possible

We can get away with the common case with only proc lock held.

Reviewed by: kib

8 years agourtwn: rework debug handling
avos [Wed, 20 Jan 2016 23:27:02 +0000 (23:27 +0000)]
urtwn: rework debug handling

- Use bitmap for debug output selection.
- Add few new messages (one for URTWN_DEBUG_BEACON
and another one for URTWN_DEBUG_INTR).
- Replace an undocumented URTWN_DEBUG definition with USB_DEBUG.

Tested with RTL8188EU / RTL8188CUS in IBSS / HOSTAP modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4959

8 years agoFix initlist_add_object invocation parameters.
kan [Wed, 20 Jan 2016 23:26:35 +0000 (23:26 +0000)]
Fix initlist_add_object invocation parameters.

The tail parameter should point to the last object for
which dependencies should be processed. In most cases,
this is the object itself.

8 years agoRemove RCS tags from files in which we no longer have any local
des [Wed, 20 Jan 2016 23:23:08 +0000 (23:23 +0000)]
Remove RCS tags from files in which we no longer have any local
modifications, and add them to two files in which we do.

8 years agosession: tidy up fixjobc
mjg [Wed, 20 Jan 2016 23:22:36 +0000 (23:22 +0000)]
session: tidy up fixjobc

This stops abusing the 'p' pointer for iteration over children processes
and gets rid of useless locking around PRS_ZOMBIE check.

Suggested by: kib

8 years agoRemove a number of generated files which are either out-of-date (because
des [Wed, 20 Jan 2016 23:08:57 +0000 (23:08 +0000)]
Remove a number of generated files which are either out-of-date (because
they are never regenerated to reflect our changes) or in the way of
freebsd-configure.sh.

8 years agourtwn: use ic_updateslot method to handle slot time change
avos [Wed, 20 Jan 2016 23:01:33 +0000 (23:01 +0000)]
urtwn: use ic_updateslot method to handle slot time change
(by default it was set to 9us).

Tested with RTL8188EU / RTL8188CUS in STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4535

8 years agoUpgrade to OpenSSH 7.0p1.
des [Wed, 20 Jan 2016 22:57:10 +0000 (22:57 +0000)]
Upgrade to OpenSSH 7.0p1.

8 years agoShift saved floating point registers up in jmp_buf.
brooks [Wed, 20 Jan 2016 22:23:08 +0000 (22:23 +0000)]
Shift saved floating point registers up in jmp_buf.

sigmask_t is 128-bits so requires two slots.

Approved by: CheriBSD (93699cb9b6e73980ac369e379cea9772c9494ccc)
MFC after: 1 week
Sponsored by: DARPA, AFRL

8 years agoMIPS also needs ofw_bus_if.h in some cases.
brooks [Wed, 20 Jan 2016 21:54:43 +0000 (21:54 +0000)]
MIPS also needs ofw_bus_if.h in some cases.

8 years agoAdd .NOMETA missed in r291320.
bdrewery [Wed, 20 Jan 2016 20:58:42 +0000 (20:58 +0000)]
Add .NOMETA missed in r291320.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a simple manpage for the cfi(4) and associated cfid(4) drivers.
brooks [Wed, 20 Jan 2016 18:47:33 +0000 (18:47 +0000)]
Add a simple manpage for the cfi(4) and associated cfid(4) drivers.

MFC after: 1 week
Sponsored by: DARPA, AFRL

8 years agoIncrease BERI boot components section alignment to 16
emaste [Wed, 20 Jan 2016 18:35:43 +0000 (18:35 +0000)]
Increase BERI boot components section alignment to 16

The .text, .bss, and .data sections claimed 16-byte alignment, but were
only aligned to 8 by the linker script.

Discovered with elfcopy(1) from elftoolchain, which performs validation
absent from the binutils strip(1). ELF tool chain ticket #512.

Reported by: brooks
Reviewed by: brooks
Sponsored by: DARPA, AFRL

8 years agoAdd some missing dependencies on pci_iov_if.h.
bdrewery [Wed, 20 Jan 2016 16:45:39 +0000 (16:45 +0000)]
Add some missing dependencies on pci_iov_if.h.

Sponsored by: EMC / Isilon Storage Division

8 years agoxen-netfront: add multiqueue support
royger [Wed, 20 Jan 2016 15:02:43 +0000 (15:02 +0000)]
xen-netfront: add multiqueue support

Add support for multiple TX and RX queue pairs. The default number of queues
is set to 4, but can be easily changed from the sysctl node hw.xn.num_queues.

Also heavily refactor netfront driver: break out a bunch of helper
functions and different structures. Use threads to handle TX and RX.
Remove some dead code and fix quite a few bugs as I go along.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Sponsored by: Citrix Systems R&D
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D4193

8 years agoIntroduce initial driver for PMSU on Armada38x
zbb [Wed, 20 Jan 2016 14:49:16 +0000 (14:49 +0000)]
Introduce initial driver for PMSU on Armada38x

This is a stub for PMSU driver. Note that it cannot be used to set the
secondary core boot address during attach because drivers are attached
later than SI_SUB_CPU sysinit where cores are started.
Setting the boot address should be done manually in platform_mp_start_ap().

SMP is working fine with this commit and was enabled in Armada38x kernel
configuration file.

Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4427

8 years agoOFW: Fix ofw_bus_string_list_to_array() function.
mmel [Wed, 20 Jan 2016 14:49:01 +0000 (14:49 +0000)]
OFW: Fix ofw_bus_string_list_to_array() function.
Originally committed version was unfinished and didn't work at all,
because I took it from the wrong WIP branch by mistake.

Approved by: kib (mentor)

8 years agoAdd initial support for SMP on Armada38x
zbb [Wed, 20 Jan 2016 14:45:54 +0000 (14:45 +0000)]
Add initial support for SMP on Armada38x

- Add file sys/arm/mv/armada38x/armada38x_mp.c
- Set mp_maxid and mp_ncpus based on FDT unless SCU register indicates
  only one core
- Boot CPU1 in platform_mp_start_ap()
- IPI range defined

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4426

8 years agoOpen window to bootROM memory on Armada38x to allow CPU1 to boot
zbb [Wed, 20 Jan 2016 14:30:17 +0000 (14:30 +0000)]
Open window to bootROM memory on Armada38x to allow CPU1 to boot

CPU1 is halted in bootROM code while it is waiting to be released.
Memory window to bootROM must be opened before booting the core.

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4425

8 years agoSupport watchdog depending on "mrvl,has-wdt" property
zbb [Wed, 20 Jan 2016 14:28:05 +0000 (14:28 +0000)]
Support watchdog depending on "mrvl,has-wdt" property

With this commit, watchdog is supported only in case of having
"mrvl,has-wdt" property or dedicated for watchdog compatibility field
("marvell,armada-380-wdt"). There is no need to modify dts files,
as "has-wdt" property already exists.

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4424

8 years agoAdd support for watchdog on Armada38x
zbb [Wed, 20 Jan 2016 14:23:57 +0000 (14:23 +0000)]
Add support for watchdog on Armada38x

A38X watchdog support was implemented in sys/arm/mv/timer.c driver.
It required following modifications:
- add "marvell,armada-380-wdt" compatibility, which supports only watchdog
- correct and enhance definitions related to timer control register
- unmask reset capability in RSTOUTn_MASK register
- use dedicated watchdog timer on A38X instead of second timer

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4423

8 years agoAdd support for I2C on Armada38x
zbb [Wed, 20 Jan 2016 14:21:06 +0000 (14:21 +0000)]
Add support for I2C on Armada38x

Extend driver's compatible strings' table
and enable I2C compilation in kernconf.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Jan Dabros <jsd@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4422