]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFH
gjb [Mon, 25 Jan 2016 14:13:28 +0000 (14:13 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoDo not use blk_write_cont() and remove it. There si no need to call
skra [Mon, 25 Jan 2016 12:55:24 +0000 (12:55 +0000)]
Do not use blk_write_cont() and remove it. There si no need to call
blk_flush() between two writes by physical address when these are
PAGE_SIZE aligned.

Fix some style nits.

8 years agoMake minidump more like its i386 original back as with new pmap dump
skra [Mon, 25 Jan 2016 12:49:08 +0000 (12:49 +0000)]
Make minidump more like its i386 original back as with new pmap dump
interface all used physical addresses are PAGE_SIZE aligned.
Add missing copyright.

This is a follow up to r294722.

8 years agoCreate new pmap dump interface for minidump and use it for existing
skra [Mon, 25 Jan 2016 12:43:07 +0000 (12:43 +0000)]
Create new pmap dump interface for minidump and use it for existing
pmap implementations on ARM. This way minidump code can be used without
any platform specific modification.

Also, this is the last piece missing for ARM_NEW_PMAP.

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

8 years agoStyle.
br [Mon, 25 Jan 2016 10:44:10 +0000 (10:44 +0000)]
Style.

8 years agoDo build libproc and librtld_db for RISC-V as well.
br [Mon, 25 Jan 2016 10:23:36 +0000 (10:23 +0000)]
Do build libproc and librtld_db for RISC-V as well.

8 years agoWe don't support libdtrace for RISC-V yet.
br [Mon, 25 Jan 2016 10:18:41 +0000 (10:18 +0000)]
We don't support libdtrace for RISC-V yet.

8 years agoConvert TCP mtu checks to the new routing KPI.
melifaro [Mon, 25 Jan 2016 10:06:49 +0000 (10:06 +0000)]
Convert TCP mtu checks to the new routing KPI.

8 years agoFix flowtable part missed in r294706.
melifaro [Mon, 25 Jan 2016 09:31:32 +0000 (09:31 +0000)]
Fix flowtable part missed in r294706.

8 years agoAdd allwinner_machdep.h, it was missed in r294698.
andrew [Mon, 25 Jan 2016 08:19:16 +0000 (08:19 +0000)]
Add allwinner_machdep.h, it was missed in r294698.

8 years agoMFP r287070,r287073: split radix implementation and route table structure.
melifaro [Mon, 25 Jan 2016 06:33:15 +0000 (06:33 +0000)]
MFP r287070,r287073: split radix implementation and route table structure.

There are number of radix consumers in kernel land (pf,ipfw,nfs,route)
  with different requirements. In fact, first 3 don't have _any_ requirements
  and first 2 does not use radix locking. On the other hand, routing
  structure do have these requirements (rnh_gen, multipath, custom
  to-be-added control plane functions, different locking).
Additionally, radix should not known anything about its consumers internals.

So, radix code now uses tiny 'struct radix_head' structure along with
  internal 'struct radix_mask_head' instead of 'struct radix_node_head'.
  Existing consumers still uses the same 'struct radix_node_head' with
  slight modifications: they need to pass pointer to (embedded)
  'struct radix_head' to all radix callbacks.

Routing code now uses new 'struct rib_head' with different locking macro:
  RADIX_NODE_HEAD prefix was renamed to RIB_ (which stands for routing
  information base).

New net/route_var.h header was added to hold routing subsystem internal
  data. 'struct rib_head' was placed there. 'struct rtentry' will also
  be moved there soon.

8 years agohyperv/vmbus: Avoid extra copy of page information.
sephe [Mon, 25 Jan 2016 05:33:18 +0000 (05:33 +0000)]
hyperv/vmbus: Avoid extra copy of page information.

The page information array could contain up to 32 elements (i.e. 512B).
And on network side w/ TSO, 11+ (176B+) elements, i.e. ~44K TSO packet,
in the page information array is quite common.

This saves us some cpu cycles.

Reviewed by: adrian, delphij
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4992

8 years agoRemove unused radix_mpath definitions.
melifaro [Mon, 25 Jan 2016 05:28:19 +0000 (05:28 +0000)]
Remove unused radix_mpath definitions.

8 years agohyperv/hn: Trust host TCP segment checksum verification by default.
sephe [Mon, 25 Jan 2016 05:25:39 +0000 (05:25 +0000)]
hyperv/hn: Trust host TCP segment checksum verification by default.

According to all available information, VMSWITCH always does the
TCP segment checksum verification before sending the segment to
guest.

Reviewed by: adrian, delphij, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4991

8 years agohyperv/hn: Remove unnecessary zeroing out the netvsc_packet
sephe [Mon, 25 Jan 2016 05:18:57 +0000 (05:18 +0000)]
hyperv/hn: Remove unnecessary zeroing out the netvsc_packet

All used fields are setup one by one, so there is no need to zero
out this large struct.

While I'm here, move the stack variable near its usage.

Reviewed by: adrian, delphij, Jun Su <junsu microsoft com>
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4978

8 years agohyperv/hn: Use m_copydata for chimney sending.
sephe [Mon, 25 Jan 2016 05:12:00 +0000 (05:12 +0000)]
hyperv/hn: Use m_copydata for chimney sending.

While I'm here, move stack variables near their usage.

Reviewed by: adrian, delphij, Jun Su <junsu microsoft com>
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4977

8 years agohyperv/hn: Partly rework transmission path
sephe [Mon, 25 Jan 2016 05:01:32 +0000 (05:01 +0000)]
hyperv/hn: Partly rework transmission path

- Avoid unnecessary malloc/free on transmission path.
- busdma(9)-fy transmission path.
- Properly handle IFF_DRV_OACTIVE.  This should fix the network
  stalls reported by many.
- Properly setup TSO parameters.
- Properly handle bpf(4) tapping.  This 5 times the performance
  during TCP sending test, when there is one bpf(4) attached.
- Allow size of chimney sending be tuned on a running system.
  Default value still needs more test to determine.

Reviewed by: adrian, delphij
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4972

8 years agoelfdump: handle STT_SPARC_REGISTER
emaste [Mon, 25 Jan 2016 04:22:01 +0000 (04:22 +0000)]
elfdump: handle STT_SPARC_REGISTER

STT_SPARC_REGISTER is a SPARC-specific symbol type specified by the
Sparcv9 ABI to provide some information on register use by the object.

Also rework st_info type lookup to avoid out-of-bounds array access.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoUpdate the Allwinner kernels:
andrew [Mon, 25 Jan 2016 00:24:57 +0000 (00:24 +0000)]
Update the Allwinner kernels:
 * Use the ARM PLATFORM framework
 * Use ARM_INTRNG on teh A20 as it has a GICv2
 * Add a method to find which Allwinner SoC we are running on

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

8 years agonet80211: reduce stack usage for ieee80211_ioctl*() methods.
avos [Sun, 24 Jan 2016 23:35:20 +0000 (23:35 +0000)]
net80211: reduce stack usage for ieee80211_ioctl*() methods.

Use malloc(9) for
 - struct ieee80211req_wpaie2 (518 bytes, used in
ieee80211_ioctl_getwpaie())
 - struct ieee80211_scan_req (128 bytes, used in setmlme_assoc_adhoc()
and ieee80211_ioctl_scanreq())

Also, drop __noinline workarounds; stack overflow is not reproducible
with recent compilers.

Tested with Clang 3.7.1, GCC 4.2.1 (from 9.3-RELEASE) and 4.9.4
(with -fstack-usage flag)

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5041

8 years agonet80211: reduce code duplication
avos [Sun, 24 Jan 2016 23:28:14 +0000 (23:28 +0000)]
net80211: reduce code duplication

Do not duplicate code between IEEE80211_IOC_WPAIE and IEEE80211_IOC_WPAIE2
switch cases.

Approved by: adrian (mentor)
Differential Revision: D5041 (part)

8 years agoext2fs: passthrough any extra timestamps to the dinode struct.
pfg [Sun, 24 Jan 2016 23:24:47 +0000 (23:24 +0000)]
ext2fs: passthrough any extra timestamps to the dinode struct.

In general we don't trust any of the extended timestamps unless the
EXT2F_ROCOMPAT_EXTRA_ISIZE feature is set. However, in the case where
we freshly allocated a new inode the information is valid and it is
better to pass it along instead of leaving the value undefined.

This should have no practical effect but should reduce the amount of
garbage if EXT2F_ROCOMPAT_EXTRA_ISIZE is set, like in cases where the
filesystem is converted from ext3 to ext4.

MFC after: 4 days

8 years agosctp_sendx() needs to provide the assoc_id back.
tuexen [Sun, 24 Jan 2016 22:31:34 +0000 (22:31 +0000)]
sctp_sendx() needs to provide the assoc_id back.

MFC after: 3 days

8 years agosh: Constify internal representation in expand.c.
jilles [Sun, 24 Jan 2016 22:26:25 +0000 (22:26 +0000)]
sh: Constify internal representation in expand.c.

Forbid (temporary or permanent) modifications of the strings in NARG nodes
during expansion.

Tilde expansion now needs to copy the username for the terminating '\0'.

8 years agoFix bug in the readpassphrase(3) function, which can be exposed
sobomax [Sun, 24 Jan 2016 22:20:13 +0000 (22:20 +0000)]
Fix bug in the readpassphrase(3) function, which can be exposed
by application closing its stdin (i.e. STDIN_FILENO) prior to
calling readpassphrase WITHOUT setting RPP_STDIN. What happens
then is that the readpassphrase would open /dev/tty, and since
file descriptors are reused, the call would return first unused
fd, which is 0 which is also STDIN_FILENO. Then due to the usage
of "input != STDIN_FILENO" in the code to do its logic, that
would result in noecho flags not set on that file descriptor,
which was original issue I've been trying to fix.

In addition to that, the readpassphrase() would leak file
descriptor on its way out, so fix that one as well.

This problem can be tested with:

 $ ssh-add - < /tmp/myprivate.key

The password will not be hidden as it should and ktrace will
show:

 53326 ssh-add  CALL  open(0x80142443c,0x100002<O_RDWR|O_CLOEXEC>,<unused>0x165f030)
 53326 ssh-add  NAMI  "/dev/tty"
 53326 ssh-add  RET   open 0
 53326 ssh-add  CALL  sigprocmask(SIG_SETMASK,0x802eb1324,0x7fffffffd5e0)
 53326 ssh-add  RET   sigprocmask 0
 53326 ssh-add  CALL  sigaction(SIGALRM,0x7fffffffd630,0x7fffffffd610)

Instead of:

 57690 ssh-add  CALL  open(0x80142443c,0x100002<O_RDWR|O_CLOEXEC>,<unused>0x165f030)
 57690 ssh-add  NAMI  "/dev/tty"
 57690 ssh-add  RET   open 4
 57690 ssh-add  CALL  ioctl(0x4,TIOCGETA,0x7fffffffd860)
 57690 ssh-add  RET   ioctl 0
 57690 ssh-add  CALL  ioctl(0x4,TIOCSETAF,0x7fffffffd680)
 57690 ssh-add  RET   ioctl 0
 57690 ssh-add  CALL  sigprocmask(SIG_SETMASK,0x802eb1324,0x7fffffffd620)
 57690 ssh-add  RET   sigprocmask 0
 57690 ssh-add  CALL  sigaction(SIGALRM,0x7fffffffd670,0x7fffffffd650)

For the case when the key is read from the file.

Technically this can also be workaround'ed at the application side
by not closing the STDIN_FILENO in the first place, but readpassphrase(3)
doesn't need to make any assumptions about that. Plus the file descriptor
leak confirms that this is an oversight, rather than a deliberate behaviour.

MFC after: 1 week

8 years agosctp_sendv() needs to fill in the association id on return.
tuexen [Sun, 24 Jan 2016 22:08:15 +0000 (22:08 +0000)]
sctp_sendv() needs to fill in the association id on return.

MFC after: 3 days

8 years agoBump copyright for change from fbt to syscall
dteske [Sun, 24 Jan 2016 21:18:54 +0000 (21:18 +0000)]
Bump copyright for change from fbt to syscall

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

8 years agoRemove an extra newline that crept in.
andrew [Sun, 24 Jan 2016 19:12:16 +0000 (19:12 +0000)]
Remove an extra newline that crept in.

8 years agoAdd support for controlling the clocks for the audio codec and DMA engines.
andrew [Sun, 24 Jan 2016 19:10:30 +0000 (19:10 +0000)]
Add support for controlling the clocks for the audio codec and DMA engines.

Submitted by: Jared McNeill <jmcneill@invisible.ca>
Differential Revision: https://reviews.freebsd.org/D5052

8 years agoThe <libutil.h> is an ordinary header file; should sort just like any other.
trasz [Sun, 24 Jan 2016 18:11:36 +0000 (18:11 +0000)]
The <libutil.h> is an ordinary header file; should sort just like any other.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix a typo in a comment
dteske [Sun, 24 Jan 2016 17:15:42 +0000 (17:15 +0000)]
Fix a typo in a comment

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

8 years agoFix the style of the reading of a nodes xref to make it readable.
andrew [Sun, 24 Jan 2016 17:09:11 +0000 (17:09 +0000)]
Fix the style of the reading of a nodes xref to make it readable.

8 years agosh: Remove a global variable from cd.c.
jilles [Sun, 24 Jan 2016 17:01:34 +0000 (17:01 +0000)]
sh: Remove a global variable from cd.c.

8 years agoWe don't support a.out executables on RISC-V.
br [Sun, 24 Jan 2016 15:15:57 +0000 (15:15 +0000)]
We don't support a.out executables on RISC-V.

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

8 years agoAdd config for RISC-V ISA.
br [Sun, 24 Jan 2016 15:12:49 +0000 (15:12 +0000)]
Add config for RISC-V ISA.

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

8 years agoTypo in comment.
kib [Sun, 24 Jan 2016 13:38:41 +0000 (13:38 +0000)]
Typo in comment.

8 years agoAdd support for RISC-V ISA.
br [Sun, 24 Jan 2016 12:10:29 +0000 (12:10 +0000)]
Add support for RISC-V ISA.

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

8 years agoAdd reset framework, a second part of new 'extended resources' family of
mmel [Sun, 24 Jan 2016 11:03:35 +0000 (11:03 +0000)]
Add reset framework, a second part of new 'extended resources' family of
support frameworks (i.e. regulators/phy/tsensors/fuses...).

It provides simple unified consumers interface for manipulations with
on-chip resets.

Reviewed by: ian, imp (paritaly)

8 years agoAdd clock framework, a first part of new 'extended resources' family of
mmel [Sun, 24 Jan 2016 11:00:38 +0000 (11:00 +0000)]
Add clock framework, a first part of new 'extended resources' family of
support frameworks(i.e. reset/regulators/phy/tsensors/fuses...).

The clock framework significantly simplifies handling of complex clock
structures found in modern SoCs. It provides the unified consumers
interface, holds and manages actual clock topology, frequency and gating.

It's tested on three different ARM boards (Nvidia Tegra TK1, Inforce 6410 and
Odroid XU2) and on one MIPS board (Creator Ci20) by kan@.

The framework is still far from perfect and probably doesn't have stable
interface yet, but we want to start testing it on more real boards and
different architectures.

Reviewed by: ian, kan (earlier version)

8 years agoext2: rename some directory index constants.
pfg [Sun, 24 Jan 2016 04:30:30 +0000 (04:30 +0000)]
ext2: rename some directory index constants.

Missed from r294653.

Pointyhat: me

8 years agoFix comment.
pfg [Sun, 24 Jan 2016 02:44:00 +0000 (02:44 +0000)]
Fix comment.

8 years agoRename some directory index constants.
pfg [Sun, 24 Jan 2016 02:41:49 +0000 (02:41 +0000)]
Rename some directory index constants.

Directory index was introduced in ext3. We don't always use the
prefix to denote the ext2 variant they belong to but when we
do we should try to be accurate.

8 years agoext2: Initialize i_flag after allocation.
pfg [Sun, 24 Jan 2016 02:25:41 +0000 (02:25 +0000)]
ext2: Initialize i_flag after allocation.

We use i_flag to carry some flags like IN_E4INDEX which newer
ext2fs variants uses internally.

fsck.ext3 rightfully complains after our implementation tags
non-directory inodes with INDEX_FL.

Initializing i_flag during allocation removes the noise factor
and quiets down fsck.

Patch from: Damjan Jovanovic
PR: 206530

8 years agosh: Use OLDPWD shell variable for 'cd -'.
jilles [Sat, 23 Jan 2016 23:00:38 +0000 (23:00 +0000)]
sh: Use OLDPWD shell variable for 'cd -'.

Per POSIX, 'cd -' should use the OLDPWD shell variable, not internal state.
This variable is normally exported.

Also, if OLDPWD is not set, fail 'cd -' instead of changing to the current
directory.

8 years agoUse different ports in the TCP/UDP testcases with the first set and
ngie [Sat, 23 Jan 2016 22:51:22 +0000 (22:51 +0000)]
Use different ports in the TCP/UDP testcases with the first set and
the second set (increment the original ports by 10)

This avoids issues where the first listening socket might not be torn
down by the time it makes it to the second set of testcases.

The sockets should likely only be setup once, but this keeps in the
spirit of the original testcases, so this will be easier to backport
to ^/stable/9

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoDon't run the t_cmsg_len testcase on 64-bit architectures
ngie [Sat, 23 Jan 2016 22:49:13 +0000 (22:49 +0000)]
Don't run the t_cmsg_len testcase on 64-bit architectures

It always fails when trying to send through the sendit(9) private KPI in the
kernel due to a size mismatch between the msghdr and data being sent [*], which
suspiciously seems like it's related to sizeof pointers instead of scalars, or
something of that ilk

MFC after: 1 week
PR: 206543, 206544 [*]
Sponsored by: EMC / Isilon Storage Division

8 years ago- Don't return immediately in check_xucred, check_scm_creds_cmsgcred, and
ngie [Sat, 23 Jan 2016 22:44:00 +0000 (22:44 +0000)]
- Don't return immediately in check_xucred, check_scm_creds_cmsgcred, and
  check_scm_creds_sockcred after initial != NULL checks have been done for
  debugging purposes
- Use more terse names for bintime (bt), cmesgcred (cmcred),
  sockcred (sc), and timeval (tv) [*]
- Add some debug messages to better understand some of the flow of the test
  program

MFC after: 1 week
Requested by: bde [*]
Use of the word "terse" (^.^) corrected by: jhb, rpokala [*]
Sponsored by: EMC / Isilon Storage Division

8 years agoDocument that hashinit(9) can wait for memory to be available
bjk [Sat, 23 Jan 2016 20:01:46 +0000 (20:01 +0000)]
Document that hashinit(9) can wait for memory to be available

Also tweak nearby grammar while here.

Submitted by: Daniel O'Connor (original version)

8 years agoAdd a minimal gcc config for RISC-V.
br [Sat, 23 Jan 2016 15:33:11 +0000 (15:33 +0000)]
Add a minimal gcc config for RISC-V.
This is required to build csu.

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

8 years agoo Add gain-level control registers.
br [Sat, 23 Jan 2016 13:34:55 +0000 (13:34 +0000)]
o Add gain-level control registers.
o Fix style.

Sponsored by: Machdep, Inc.

8 years agoAdvertise support for ext3 and ext4.
trasz [Sat, 23 Jan 2016 12:25:24 +0000 (12:25 +0000)]
Advertise support for ext3 and ext4.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoDon't mention the "canonical six" in setfacl(1); it describes semantics
trasz [Sat, 23 Jan 2016 12:19:37 +0000 (12:19 +0000)]
Don't mention the "canonical six" in setfacl(1); it describes semantics
that's long gone.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix ru_oublocks accounting for ZFS. There are two code paths that can be
trasz [Sat, 23 Jan 2016 12:13:09 +0000 (12:13 +0000)]
Fix ru_oublocks accounting for ZFS. There are two code paths that can be
called from zfs_write() - one of them, through dmu_write(), was handled
correctly; the other wasn't.

Reviewed by: avg@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4923

8 years agoAdd "kldstat -h"; showing module sizes in hex is rather weird.
trasz [Sat, 23 Jan 2016 12:10:16 +0000 (12:10 +0000)]
Add "kldstat -h"; showing module sizes in hex is rather weird.

Reviewed by: emaste@ (earlier version)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4969

8 years agoFollow r293066 adding a generalized exec hook for RISC-V as well.
br [Sat, 23 Jan 2016 11:46:52 +0000 (11:46 +0000)]
Follow r293066 adding a generalized exec hook for RISC-V as well.

8 years agoRemove obsolete comment.
dchagin [Sat, 23 Jan 2016 08:08:06 +0000 (08:08 +0000)]
Remove obsolete comment.

MFC after: 3 days

8 years agoFix a typo.
dchagin [Sat, 23 Jan 2016 08:04:29 +0000 (08:04 +0000)]
Fix a typo.

MFC after: 3 days

8 years agoNow that the flashmap code knows about SPI flash, add it in builds.
adrian [Sat, 23 Jan 2016 05:27:55 +0000 (05:27 +0000)]
Now that the flashmap code knows about SPI flash, add it in builds.

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

8 years agoTeach the flashmap code about the SPI flash.
adrian [Sat, 23 Jan 2016 05:26:29 +0000 (05:26 +0000)]
Teach the flashmap code about the SPI flash.

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

8 years agoAdd an IOCTL rr_limit to let users fine tuning the number of packets to be
araujo [Sat, 23 Jan 2016 04:18:44 +0000 (04:18 +0000)]
Add an IOCTL rr_limit to let users fine tuning the number of packets to be
sent using roundrobin protocol and set a better granularity and distribution
among the interfaces. Tuning the number of packages sent by interface can
increase throughput and reduce unordered packets as well as reduce SACK.

Example of usage:
# ifconfig bge0 up
# ifconfig bge1 up
# ifconfig lagg0 create
# ifconfig lagg0 laggproto roundrobin laggport bge0 laggport bge1 \
192.168.1.1 netmask 255.255.255.0
# ifconfig lagg0 rr_limit 500

Reviewed by: thompsa, glebius, adrian (old patch)
Approved by: bapt (mentor)
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D540

8 years agoFix a regression in the .de and .dk whois special cases
fanf [Sat, 23 Jan 2016 01:20:58 +0000 (01:20 +0000)]
Fix a regression in the .de and .dk whois special cases

Ensure the special cases trigger whether we come via a referral
or via the -c option. Match host names case-insensitively.

Use the default character set supported by .de (UTF-8) since that
is more compatible with the modern world than ISO 8859-1. Persuade
them to give us a useful answer whether an internationalized
domain name is given in UTF-8 or in punycode.

8 years agoA lot of the cleverness in whois is no longer needed!
fanf [Sat, 23 Jan 2016 00:28:18 +0000 (00:28 +0000)]
A lot of the cleverness in whois is no longer needed!

The IANA whois server has the right referral information for domain
names, IP addresses, and AS numbers, so whois does not need to be
able to choose servers itself (except for a few cases where referrals
do not work). We can delete a chunk of code, which is always fun.

This change improves the referral handling to be less sensitive to
all the various formats, and to allow multi-hop referral chains,
such as IANA -> registry -> registrar.

ARIN queries have the "+" flag added if no flags are present, so we
get full details if the query matches multiple objects. The Verisign
anti-spam logic is also now suppressed if the user provided a non-
trivial query string.

Uninformative rubric is now trimmed by default. The -S option
turns off trimming, and disables query fettling.

The -i option is back to its traditional pre-1999 hostname, since
whois.internic.net is more useful than whois.networksolutions.com.
Note that the old fallback/default server whois.crsnic.net is an
alias for whois.internic.net.

The manual is more informative about query syntax.

8 years agoFix for iWARP servers that listen on INADDR_ANY.
np [Fri, 22 Jan 2016 23:33:34 +0000 (23:33 +0000)]
Fix for iWARP servers that listen on INADDR_ANY.

The iWARP Connection Manager (CM) on FreeBSD creates a TCP socket to
represent an iWARP endpoint when the connection is over TCP. For
servers the current approach is to invoke create_listen callback for
each iWARP RNIC registered with the CM. This doesn't work too well for
INADDR_ANY because a listen on any TCP socket already notifies all
hardware TOEs/RNICs of the new listener. This patch fixes the server
side of things for FreeBSD. We've tried to keep all these modifications
in the iWARP/TCP specific parts of the OFED infrastructure as much as
possible.

Submitted by: Krishnamraju Eraparaju @ Chelsio (with design inputs from Steve Wise)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4801

8 years agoUse MAN= to specify that no man page is provided
emaste [Fri, 22 Jan 2016 21:33:27 +0000 (21:33 +0000)]
Use MAN= to specify that no man page is provided

NO_MAN is deprecated.

Reviewed by: imp

8 years agotools/tools/ath/ath_ee_v4k_print: reflect changes from r220589
avos [Fri, 22 Jan 2016 20:53:50 +0000 (20:53 +0000)]
tools/tools/ath/ath_ee_v4k_print: reflect changes from r220589

Fix printf() arguments + sort includes

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4045

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 agoCreate a _pkgbootstrap target, and remove the env(1) prefix
gjb [Fri, 22 Jan 2016 18:06:09 +0000 (18:06 +0000)]
Create a _pkgbootstrap target, and remove the env(1) prefix
to pkg(8) commands.

Move the resulting packages outside STAGEDIR to minimize
pollution.

When invoking 'pkg create', include the ABI in the REPODIR
path so the correct hierarchy is created for cross-builds.

Move the STAGEDIR and REPODIR declarations above the targets
that use them to keep things cleaner, and move the packages
target.

Include '-o ABIFILE=DESTDIR/bin/sh' in pkg(8) invocations in
the create-kernel-packages target.

Sponsored by: The FreeBSD Foundation

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