]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix an incorrect assertion in witness.
Mark Johnston [Tue, 7 Jul 2015 19:29:18 +0000 (19:29 +0000)]
Fix an incorrect assertion in witness.

The number of available lock list entries for a thread is LOCK_CHILDCOUNT,
and each entry can record up to LOCK_NCHILDREN locks. When iterating over
the locks held by a thread, a bound on the loop index is therefore given
by LOCK_CHILDCOUNT * LOCK_NCHILDREN; WITNESS_COUNT is an unrelated
constant.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D2974

9 years agoFix markup.
Edward Tomasz Napierala [Tue, 7 Jul 2015 19:23:59 +0000 (19:23 +0000)]
Fix markup.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoAdd the Banana Pi DTS.
Luiz Otavio O Souza [Tue, 7 Jul 2015 19:01:54 +0000 (19:01 +0000)]
Add the Banana Pi DTS.

The Banana Pi support is in progress and this is intended to help the early
adopters.

9 years agolldb: use .PATH to find man page instead of symlinking it
Ed Maste [Tue, 7 Jul 2015 18:46:41 +0000 (18:46 +0000)]
lldb: use .PATH to find man page instead of symlinking it

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agowe may get here w/ non-sleepable locks held, so switch to _NOWAIT when
John-Mark Gurney [Tue, 7 Jul 2015 18:45:32 +0000 (18:45 +0000)]
we may get here w/ non-sleepable locks held, so switch to _NOWAIT when
doing this memory allocation...

Reviewed by: ae

9 years agoAvoid creating invalid UEFI device path
Ed Maste [Tue, 7 Jul 2015 18:44:27 +0000 (18:44 +0000)]
Avoid creating invalid UEFI device path

The UEFI loader on the 10.1 release install disk (disc1) modifies an
existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to
truncate the device path.  In doing so it creates an invalid device
path.

Perform the equivalent action without modification of structures
allocated by firmware.

PR: 197641
MFC After: 1 week
Submitted by: Chris Ruffin <chris.ruffin@intel.com>

9 years agoAdd the GMAC entries to sun7i (A20) DTS.
Luiz Otavio O Souza [Tue, 7 Jul 2015 18:32:23 +0000 (18:32 +0000)]
Add the GMAC entries to sun7i (A20) DTS.

While here make EMAC disabled unless explicitly enabled.

9 years agoFix rfcomm_sppd regression I could reproduced.
Takanori Watanabe [Tue, 7 Jul 2015 15:56:51 +0000 (15:56 +0000)]
Fix rfcomm_sppd regression I could reproduced.
To reproduce it, Two machine running FreeBSD and
run
rfcomm_sppd -c 3 -S
rfcomm_sppd -a ${PEER} -c 3
on each side.

9 years agoRelocate sched_random() within the SMP section.
Pedro F. Giffuni [Tue, 7 Jul 2015 15:22:29 +0000 (15:22 +0000)]
Relocate sched_random() within the SMP section.

Place sched_random nearer to where it's first used: moving the
code nearer to where it  is used makes the code easier to read
and we can reduce the initial "#ifdef SMP" island.

Reword a little the comment and clean some whitespaces
while here.

9 years agoRemove reboot.S (part of libc). It's not needed and was actually
Edward Tomasz Napierala [Tue, 7 Jul 2015 09:25:51 +0000 (09:25 +0000)]
Remove reboot.S (part of libc).  It's not needed and was actually
broken - returning 0 from reboot(2) resulted in SIGBUS.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoExport the ssthresh value per SCTP path via the sysctl interface.
Michael Tuexen [Tue, 7 Jul 2015 06:34:28 +0000 (06:34 +0000)]
Export the ssthresh value per SCTP path via the sysctl interface.

MFC after: 1 month

9 years agoSort by svn revision.
Glen Barber [Tue, 7 Jul 2015 04:09:35 +0000 (04:09 +0000)]
Sort by svn revision.
Fix a few FDP style nits.

Sponsored by: The FreeBSD Foundation

9 years agoAttempt to make 5GHz HT/40 work on the 6xxx series NICs.
Adrian Chadd [Tue, 7 Jul 2015 03:51:29 +0000 (03:51 +0000)]
Attempt to make 5GHz HT/40 work on the 6xxx series NICs.

The 6205 (Taylor Peak) in the Lenovo X230 works fine in 5GHz 11a and 11n HT20,
but not 11n HT40.  The NIC goes RX deaf the moment HT40 is configured.
It's so RX deaf that it doesn't even hear beacons and the firmware sends
"BEACON MISS" events.  That's pretty deaf.

I tried configuring up the HT40 flags in monitor mode and it worked - so
I assumed that doing the transition from 20 -> 40MHz channel configuration
when going auth->assoc (ie, after the NIC has been partially configured)
is a problem.

So for now, let's just always set them if they're available.

Tested:

* Intel 5300, STA mode, 5GHz HT/40 AP; 2GHz HT/20 AP
* Intel 6205, STA mode, 5GHz HT/40, HT20, 11a AP; 2GHz HT/20 AP

This was pointed out to me by coworkers trying to use FreeBSD-HEAD
in the office on their Thinkpad T420p laptops.

TODO:

* I don't like how the HT40 flags are configured - the whole interop/
  protection config should be re-checked.  Notably, I think curhtprotmode
  is 0 in a lot of cases, which means "no interoperability" and i think
  that's busted.

Sponsored by: Norse Corp, Inc.

9 years agoNote merge to head for sendmail 8.15.2 along with a special note for those
Gregory Neil Shapiro [Tue, 7 Jul 2015 03:06:56 +0000 (03:06 +0000)]
Note merge to head for sendmail 8.15.2 along with a special note for those
upgrading to FreeBSD 11.

MFC after: 3 days

9 years agoAdd warning about change of behavior for sendmail 8.15.2 under FreeBSD 11
Gregory Neil Shapiro [Tue, 7 Jul 2015 03:03:17 +0000 (03:03 +0000)]
Add warning about change of behavior for sendmail 8.15.2 under FreeBSD 11
with regards to IPv6 address representation in configuration/maps/rulesets.

9 years agoUpdate for sendmail 8.15.2 import
Gregory Neil Shapiro [Tue, 7 Jul 2015 03:02:07 +0000 (03:02 +0000)]
Update for sendmail 8.15.2 import

MFC after: 3 days

9 years agoMinor changes to force commit these files so new freebsd*.cf files are
Gregory Neil Shapiro [Tue, 7 Jul 2015 03:00:57 +0000 (03:00 +0000)]
Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.15.2/cf tree.

MFC after: 3 days

9 years agoMerge sendmail 8.15.2 to HEAD
Gregory Neil Shapiro [Tue, 7 Jul 2015 02:59:02 +0000 (02:59 +0000)]
Merge sendmail 8.15.2 to HEAD

MFC after: 3 days

9 years agoEnable the wireless on attach.
Justin Hibbits [Tue, 7 Jul 2015 02:42:48 +0000 (02:42 +0000)]
Enable the wireless on attach.

This comes from the archives of "forgotten in the original commit, and probably
pointless now because nobody uses it, and the driver's broken anyway."

9 years agostyle(9) cleanups.
Justin Hibbits [Tue, 7 Jul 2015 02:37:29 +0000 (02:37 +0000)]
style(9) cleanups.

Don't use PRIxPTR, these registers are 32-bits, cast to u_long instead.

Pointed out by: bde

9 years agolibsm/path.c is about to disappear in the merge of sendmail 8.15.2. It is an
Gregory Neil Shapiro [Tue, 7 Jul 2015 02:35:06 +0000 (02:35 +0000)]
libsm/path.c is about to disappear in the merge of sendmail 8.15.2.  It is an
empty file now so it is safe to remove before the merge.

MFC after: 3 days

9 years agoTemporarily disable WARNS while addressing a non-issue with the upstream code
Gregory Neil Shapiro [Tue, 7 Jul 2015 02:30:35 +0000 (02:30 +0000)]
Temporarily disable WARNS while addressing a non-issue with the upstream code

9 years agocxgbe(4): Add a new knob that controls the congestion response of netmap
Navdeep Parhar [Mon, 6 Jul 2015 20:56:59 +0000 (20:56 +0000)]
cxgbe(4): Add a new knob that controls the congestion response of netmap
rx queues.  The default is to drop rather than backpressure.

This decouples the congestion settings of NIC and netmap rx queues.

MFC after: 3 days

9 years agocxgbe(4): Do not override the the global defaults for congestion drops.
Navdeep Parhar [Mon, 6 Jul 2015 20:28:42 +0000 (20:28 +0000)]
cxgbe(4): Do not override the the global defaults for congestion drops.
The hw.cxgbe.cong_drop knob is not affected by this change because the
driver sets up congestion drop on a per-queue basis.

MFC after: 3 days

9 years agoThe results of the vote are in. This reflects that vote. Single
Warner Losh [Mon, 6 Jul 2015 20:10:47 +0000 (20:10 +0000)]
The results of the vote are in. This reflects that vote. Single
line statements inside of braces is recognized as an acceptable
style.
http://reviews.freebsd.org/V3
As always, this isn't license for wholesale change, etc.

9 years agoMove the 'devmem' device nodes from /dev/vmm to /dev/vmm.io
Neel Natu [Mon, 6 Jul 2015 19:41:43 +0000 (19:41 +0000)]
Move the 'devmem' device nodes from /dev/vmm to /dev/vmm.io

Some external tools just do a 'ls /dev/vmm' to figure out the bhyve virtual
machines on the host. These tools break if the devmem device nodes also
appear in /dev/vmm.

Requested by: grehan

9 years agoAlways assert DCD and DSR in bhyve's uart emulation.
Neel Natu [Mon, 6 Jul 2015 19:33:29 +0000 (19:33 +0000)]
Always assert DCD and DSR in bhyve's uart emulation.

The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows:
ttyu0   "/usr/libexec/getty 3wire"      vt100   onifconsole secure

The initial terminal type passed to getty(8) is "3wire" which sets the
CLOCAL flag. However reset(1) clears this flag and any programs that try
to open the terminal will hang waiting for DCD to be asserted.

Fix this by always asserting DCD and DSR in the emulated uart.

The following discussion on virtualization@ has more details:
https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-June/003666.html

Reported by: jmg
Discussed with: grehan

9 years agoFix for non-random IV's when CRD_F_IV_PRESENT and CRD_F_IV_EXPLICIT
John-Mark Gurney [Mon, 6 Jul 2015 19:30:29 +0000 (19:30 +0000)]
Fix for non-random IV's when CRD_F_IV_PRESENT and CRD_F_IV_EXPLICIT
flags are not specified... This bug was introduced in r275732...

This only affects IPsec ESP only policies w/ the aesni module loaded,
other subsystems specify one or both of the flags...

Reviewed by: gnn, delphij, eri

9 years agoremove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx...
John-Mark Gurney [Mon, 6 Jul 2015 19:17:56 +0000 (19:17 +0000)]
remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx...

Reviewed by: kib (a while ago)

9 years agotty: replace several curthread->td_proc with stored curproc
Mateusz Guzik [Mon, 6 Jul 2015 18:53:56 +0000 (18:53 +0000)]
tty: replace several curthread->td_proc with stored curproc

No functional changes.

9 years agoIntroduce ITS support for ARM64
Zbigniew Bodek [Mon, 6 Jul 2015 18:27:41 +0000 (18:27 +0000)]
Introduce ITS support for ARM64

Add ARM ITS (Interrupt Translation Services) support required
to bring-up message signalled interrupts on some ARM64 platforms.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation

9 years agoAdd more tlb invalidations. We currently invalidate when we may not need
Andrew Turner [Mon, 6 Jul 2015 18:27:18 +0000 (18:27 +0000)]
Add more tlb invalidations. We currently invalidate when we may not need
to, but with this I can boot on a simulator that models the tlb.

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

9 years agoWhen initializing the (unused) TX descriptors it is not necessary set the
Luiz Otavio O Souza [Mon, 6 Jul 2015 17:13:17 +0000 (17:13 +0000)]
When initializing the (unused) TX descriptors it is not necessary set the
chain bit.

Obtained from: NetBSD

9 years agoUse uint32_t consistently to store registers values.
Luiz Otavio O Souza [Mon, 6 Jul 2015 16:45:48 +0000 (16:45 +0000)]
Use uint32_t consistently to store registers values.

Always use unsigned numbers to avoid undefined behavior on (1 << 31).

Remove unused variables and some stray semicolons.

No functional changes.

9 years agoDon't acquire sysctlmemlock in userland_sysctl() when the old value
Patrick Kelsey [Mon, 6 Jul 2015 16:07:21 +0000 (16:07 +0000)]
Don't acquire sysctlmemlock in userland_sysctl() when the old value
pointer is NULL, as in that case there are no userland pages that
could potentially be wired.  It is common for old to be NULL and
oldlenp to be non-NULL in calls to userland_sysctl(), as this is used
to probe for the length of a variable-length sysctl entry before
retrieving a value.  Note that it is typical for such calls to be made
with an uninitialized value in *oldlenp, so sysctlmemlock was
essentially being acquired at random (depending on the uninitialized
value in *oldlenp being > PAGE_SIZE or not) for these calls prior to
this patch.

Differential Revision: https://reviews.freebsd.org/D2987
Reviewed by: mjg, kib
Approved by: jmallett (mentor)
MFC after: 1 month

9 years agoMutex memory is not zeroed, add MTX_NEW.
Konstantin Belousov [Mon, 6 Jul 2015 14:09:00 +0000 (14:09 +0000)]
Mutex memory is not zeroed, add MTX_NEW.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFill the port and protocol information in the SADB_ACQUIRE message
Andrey V. Elsukov [Mon, 6 Jul 2015 12:40:31 +0000 (12:40 +0000)]
Fill the port and protocol information in the SADB_ACQUIRE message
in case when security policy has it as required by RFC 2367.

PR: 192774
Differential Revision: https://reviews.freebsd.org/D2972
MFC after: 1 week

9 years agoAdd hton and ntoh to the arm64 Symbols.map file, they exist but were not
Andrew Turner [Mon, 6 Jul 2015 09:57:40 +0000 (09:57 +0000)]
Add hton and ntoh to the arm64 Symbols.map file, they exist but were not
exported.

9 years agoCorrect bit offsets for ahci quirks
Steven Hartland [Mon, 6 Jul 2015 09:44:07 +0000 (09:44 +0000)]
Correct bit offsets for ahci quirks

Fix bit offsets causing incorrect quirks being reported on boot for ahci
introduced by r280184.

MFC after: 3 days
Sponsored by: Multiplay

9 years agoMerge booke and aim interrupt.c files.
Justin Hibbits [Mon, 6 Jul 2015 05:08:57 +0000 (05:08 +0000)]
Merge booke and aim interrupt.c files.

Summary:
Both booke and AIM interrupt.c files contain nearly identical code.  This merges
the two files, to reduce duplication.

Reviewers: #powerpc, marcel

Reviewed By: marcel

Subscribers: imp

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

9 years agoImport sendmail 8.15.2
Gregory Neil Shapiro [Mon, 6 Jul 2015 04:29:34 +0000 (04:29 +0000)]
Import sendmail 8.15.2

9 years agoFix the sent packets statistics for if_dwc.
Luiz Otavio O Souza [Mon, 6 Jul 2015 03:06:13 +0000 (03:06 +0000)]
Fix the sent packets statistics for if_dwc.

9 years agoFix if_loop so bpfwrite() can use it regardless of the state of
Patrick Kelsey [Mon, 6 Jul 2015 02:12:49 +0000 (02:12 +0000)]
Fix if_loop so bpfwrite() can use it regardless of the state of
bd_hdrcmplt.  As if_loop does not use link-level headers, its behavior
when used by bpfwrite() should be the same regardless of the state of
bd_hdrcmplt.  Without this change, libpcap (and other BPF users that
work like it) fail when writing to loopback interfaces.

Differential Revision: https://reviews.freebsd.org/D2989
Reviewed by: gnn, melifaro
Approved by: jmallett (mentor)
MFC after: 3 days

9 years agoFix range upper bound for uint32_t and uint64_t, and reformat range
Patrick Kelsey [Mon, 6 Jul 2015 01:48:23 +0000 (01:48 +0000)]
Fix range upper bound for uint32_t and uint64_t, and reformat range
description for uint8_t, uint16_t, uint32_t, and uint64_t.

Differential Revision: https://reviews.freebsd.org/D2988
Reviewed by: rstone, wblock
Approved by: jmallett (mentor)
Sponsored by: Norse Corp, Inc.

9 years agoFix sysctl(3) so it returns the intended values for all mib names in
Patrick Kelsey [Mon, 6 Jul 2015 01:42:12 +0000 (01:42 +0000)]
Fix sysctl(3) so it returns the intended values for all mib names in
the 'user' sysctl tree, which have all been coming back 0 or empty
since r240176.

Differential Revision: https://reviews.freebsd.org/D2945
Reviewed by: sbruno
Approved by: jmallett (mentor)
MFC after: 3 days

9 years agoRemove a BUGS entry that was addressed by r282300.
Mark Johnston [Sun, 5 Jul 2015 23:24:52 +0000 (23:24 +0000)]
Remove a BUGS entry that was addressed by r282300.

9 years agoRename the dtrace-* man pages to dtrace_* for consistency with other
Mark Johnston [Sun, 5 Jul 2015 23:23:12 +0000 (23:23 +0000)]
Rename the dtrace-* man pages to dtrace_* for consistency with other
subsection man pages (e.g. geom_*, mac_*, snd_*).

9 years agoMove the comment describing namei(9) back to namei()'s definition.
Mark Johnston [Sun, 5 Jul 2015 22:56:41 +0000 (22:56 +0000)]
Move the comment describing namei(9) back to namei()'s definition.

MFC after: 3 days

9 years agoThe bug caught by flock's test 16 was fixed by r268384.
Mark Johnston [Sun, 5 Jul 2015 22:49:26 +0000 (22:49 +0000)]
The bug caught by flock's test 16 was fixed by r268384.

MFC after: 3 days

9 years agoRemove a stale descriptive comment for gbincore().
Mark Johnston [Sun, 5 Jul 2015 22:44:41 +0000 (22:44 +0000)]
Remove a stale descriptive comment for gbincore().

The splay trees referenced in the comment were converted to
path-compressed tries in r250551.

MFC after: 3 days

9 years agoCheck suspendability on the mountpoint returned by VOP_GETWRITEMOUNT.
Mark Johnston [Sun, 5 Jul 2015 22:37:33 +0000 (22:37 +0000)]
Check suspendability on the mountpoint returned by VOP_GETWRITEMOUNT.
This obviates the need for a MNTK_SUSPENDABLE flag, since passthrough
filesystems like nullfs and unionfs no longer need to inherit this
information from their lower layer(s). This change also restores the
pre-r273336 behaviour of using the presence of a susp_clean VFS method to
request suspension support.

Reviewed by: kib, mjg
Differential Revision: https://reviews.freebsd.org/D2937

9 years agoAdd a local variable initialization needed in the OBJT_DEFAULT case.
Mark Johnston [Sun, 5 Jul 2015 22:26:19 +0000 (22:26 +0000)]
Add a local variable initialization needed in the OBJT_DEFAULT case.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D2992

9 years agoDocument the locking context for the directly dispatched callouts.
Konstantin Belousov [Sun, 5 Jul 2015 19:29:24 +0000 (19:29 +0000)]
Document the locking context for the directly dispatched callouts.
Cross-reference timeout(9).

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agofd: make 'rights' a manadatory argument to fget* functions
Mateusz Guzik [Sun, 5 Jul 2015 19:05:16 +0000 (19:05 +0000)]
fd: make 'rights' a manadatory argument to fget* functions

9 years agoAdd the kernel functions needed to enable threading.
Andrew Turner [Sun, 5 Jul 2015 18:16:06 +0000 (18:16 +0000)]
Add the kernel functions needed to enable threading.

Sponsored by: ABT Systems Ltd

9 years agoUpdate ntp version number. (This is a manual update that was missed.)
Cy Schubert [Sun, 5 Jul 2015 16:48:40 +0000 (16:48 +0000)]
Update ntp version number. (This is a manual update that was missed.)

9 years agoMFV ntp-4.2.8p3 (r284990).
Cy Schubert [Sun, 5 Jul 2015 15:42:16 +0000 (15:42 +0000)]
MFV ntp-4.2.8p3 (r284990).

Approved by: roberto, delphij
Security: VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0
Security: http://bugs.ntp.org/show_bug.cgi?id=2853
Security: https://www.kb.cert.org/vuls/id/668167
Security: http://support.ntp.org/bin/view/Main/SecurityNotice#June_2015_NTP_Security_Vulnerabi

9 years agoFix GENERIC64 and LINT64 powerpc builds after r285144.
Bjoern A. Zeeb [Sun, 5 Jul 2015 15:30:16 +0000 (15:30 +0000)]
Fix GENERIC64 and LINT64 powerpc builds after r285144.

9 years agoEnable ipsec by default on all armv6 platforms.
Ian Lepore [Sun, 5 Jul 2015 14:16:31 +0000 (14:16 +0000)]
Enable ipsec by default on all armv6 platforms.

9 years agoEnsure all the required files get built when you include the IPSEC option.
Ian Lepore [Sun, 5 Jul 2015 14:15:58 +0000 (14:15 +0000)]
Ensure all the required files get built when you include the IPSEC option.

9 years agoAdd on the addend when in the R_AARCH64_ABS64 and R_AARCH64_GLOB_DAT cases.
Andrew Turner [Sun, 5 Jul 2015 11:42:01 +0000 (11:42 +0000)]
Add on the addend when in the R_AARCH64_ABS64 and R_AARCH64_GLOB_DAT cases.
This fixes at least sshd, and some of the boehm-gc tests.

Sponsored by: ABT Systems Ltd

9 years agoRemove dead code
Baptiste Daroussin [Sun, 5 Jul 2015 10:14:34 +0000 (10:14 +0000)]
Remove dead code

9 years agoAlso validate hours via strptime_l(3)
Baptiste Daroussin [Sun, 5 Jul 2015 10:11:35 +0000 (10:11 +0000)]
Also validate hours via strptime_l(3)

Simplify the code, by only using one parser, ensure the dates (hours and dates)
are valid

9 years agoValidate expiration dates
Baptiste Daroussin [Sun, 5 Jul 2015 09:48:03 +0000 (09:48 +0000)]
Validate expiration dates

Use strptime_l(3) to validate the dates provided in input

9 years agoMake first step toward supporting target and initiator roles same time.
Alexander Motin [Sun, 5 Jul 2015 03:38:58 +0000 (03:38 +0000)]
Make first step toward supporting target and initiator roles same time.

To avoid conflicts between target and initiator devices in CAM, make
CTL use target ID reported by HBA as its initiator_id in XPT_PATH_INQ.
That target ID is known to never be used for initiator role, so it won't
conflict.  For Fibre Channel and FireWire HBAs this specific ID choice
is irrelevant since all target IDs there are virtual. Same time for SPI
HBAs it seems could be even requirement to use same target ID for both
initiator and target roles.

While there are some more things to polish in isp(4) driver, first tests
of using both roles same time on the same port appeared successfull:

# camcontrol devlist -v
scbus0 on isp0 bus 0:
<FREEBSD CTLDISK 0001>             at scbus0 target 1 lun 0 (da20,pass21)
<>                                 at scbus0 target 256 lun 0 (ctl0)
<>                                 at scbus0 target -1 lun ffffffff (ctl1)

9 years agoRemove extra level of target ID indirection (isp_dev_map).
Alexander Motin [Sun, 5 Jul 2015 02:09:46 +0000 (02:09 +0000)]
Remove extra level of target ID indirection (isp_dev_map).

FreeBSD never had limitation on number of target IDs, and there is no
any other requirement to allocate them densely.  Since slots of port
database already populated just sequentially, there is no much need
for another indirection to allocate sequentially too.

9 years agoSummary: Add missing files necessary to build with IPSEC and crypto
George V. Neville-Neil [Sat, 4 Jul 2015 21:32:44 +0000 (21:32 +0000)]
Summary: Add missing files necessary to build with IPSEC and crypto

9 years agoFix up tabs vs. spaces
George V. Neville-Neil [Sat, 4 Jul 2015 20:31:06 +0000 (20:31 +0000)]
Fix up tabs vs. spaces

9 years agoAdd llvm patch corresponding to r285149.
Dimitry Andric [Sat, 4 Jul 2015 20:09:24 +0000 (20:09 +0000)]
Add llvm patch corresponding to r285149.

9 years agoPull in r241142 from upstream llvm trunk (by David Majnemer):
Dimitry Andric [Sat, 4 Jul 2015 20:07:37 +0000 (20:07 +0000)]
Pull in r241142 from upstream llvm trunk (by David Majnemer):

  [SCCP] Turn loads of null into undef instead of zero initialized values

  Surprisingly, this is a correctness issue: the mmx type exists for
  calling convention purposes, LLVM doesn't have a zero representation for
  them.

  This partially fixes PR23999.

Pull in r241143 from upstream llvm trunk (by David Majnemer):

  [LoopUnroll] Use undef for phis with no value live

  We would create a phi node with a zero initialized operand instead of
  undef in the case where no value was originally available.  This was
  problematic for x86_mmx which has no null value.

These fix a "Cannot create a null constant of that type!" error when
compiling the graphics/sdl2_gfx port with MMX enabled.

Reported by: amdmi3

9 years agoUse the correct type for physical addresses.
Justin Hibbits [Sat, 4 Jul 2015 19:00:38 +0000 (19:00 +0000)]
Use the correct type for physical addresses.

On Book-E, physical addresses are actually 36-bits, not 32-bits.  This is
currently worked around by ignoring the top bits.  However, in some cases, the
boot loader configures CCSR to something above the 32-bit mark.  This is stage 1
in updating the pmap to handle 36-bit physaddr.

9 years agoChange comment added in r284540.
Alexander Motin [Sat, 4 Jul 2015 18:51:54 +0000 (18:51 +0000)]
Change comment added in r284540.

This appeared to be not card's issue, but driver's, though solution is
the same so far.

9 years agoDrop discovered targets when initiator role is disabled.
Alexander Motin [Sat, 4 Jul 2015 18:38:46 +0000 (18:38 +0000)]
Drop discovered targets when initiator role is disabled.

9 years agoRemove duplicate header string.h.
Marcelo Araujo [Sat, 4 Jul 2015 18:36:02 +0000 (18:36 +0000)]
Remove duplicate header string.h.

9 years agoAdd machine check register printing
Justin Hibbits [Sat, 4 Jul 2015 18:16:41 +0000 (18:16 +0000)]
Add machine check register printing

This will print out the Memory Subsystem Status Register on MPC745x (G4+ class),
and the Machine Check Status Register on Book-E class CPUs, to aid in debugging
machine checks.  Other relevant registers, for other CPUs, can be added in the
future.

9 years agoRemove unused variable flags reported by clang. The function zygote_clone()
Marcelo Araujo [Sat, 4 Jul 2015 17:38:56 +0000 (17:38 +0000)]
Remove unused variable flags reported by clang. The function zygote_clone()
always receive the flags with value 0 and this flags is never checked on
zygote_main().

Differential Revision: D2689
Reviewed by: rodrigc, oshogbo

9 years agoEnable IPSEC in all GENERIC kernels.
George V. Neville-Neil [Sat, 4 Jul 2015 17:37:00 +0000 (17:37 +0000)]
Enable IPSEC in all GENERIC kernels.

Universe and kernel build tests passed 4 July 2015

PR: 128030
Sponsored by: Rubicon Communications (Netgate)

9 years agoRemove unused variable to silence clang warning.
Marcelo Araujo [Sat, 4 Jul 2015 17:22:07 +0000 (17:22 +0000)]
Remove unused variable to silence clang warning.

Differential Revision: D2683
Reviewed by: rodrigc, bapt

9 years agoAdd fdclose(3) function.
Mariusz Zaborski [Sat, 4 Jul 2015 16:42:14 +0000 (16:42 +0000)]
Add fdclose(3) function.

This function is equivalent to fclose(3) function except that it
does not close the underlying file descriptor.
fdclose(3) is step forward to make FILE structure private.

Reviewed by: wblock, jilles, jhb, pjd
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D2697

9 years agoMove the nvlist source and private includes from sys/kern to seperate
Mariusz Zaborski [Sat, 4 Jul 2015 16:33:37 +0000 (16:33 +0000)]
Move the nvlist source and private includes from sys/kern to seperate
directory sys/contrib/libnv.

The goal of this operation is to NOT install header files which shouldn't
be used outside the nvlist library.

Approved by: pjd (mentor)

9 years agoInstall loader.rc with ARM u-boot loader (ubldr).
Luiz Otavio O Souza [Sat, 4 Jul 2015 16:19:38 +0000 (16:19 +0000)]
Install loader.rc with ARM u-boot loader (ubldr).

loader.rc is the responsible to read and process loader.conf variables.

This fix the issue of loader.conf being silently ignored.

MFC after: 3 days

9 years agoFix validation of crypted password
Baptiste Daroussin [Sat, 4 Jul 2015 15:56:59 +0000 (15:56 +0000)]
Fix validation of crypted password
Small cleanups

9 years agoAlso validate inputs of pw groupmod -h and groupmod -H
Baptiste Daroussin [Sat, 4 Jul 2015 15:54:11 +0000 (15:54 +0000)]
Also validate inputs of pw groupmod -h and groupmod -H

9 years agovfs: use shared vnode locking when looking up ".." in vop_stdvptocnp
Mateusz Guzik [Sat, 4 Jul 2015 15:46:39 +0000 (15:46 +0000)]
vfs: use shared vnode locking when looking up ".." in vop_stdvptocnp

Briefly discussed with: kib

9 years agofd: de-k&r-ify functions + some whitespace fixes
Mateusz Guzik [Sat, 4 Jul 2015 15:42:03 +0000 (15:42 +0000)]
fd: de-k&r-ify functions + some whitespace fixes

No functional changes.

9 years agoValidate input of pw usermod -h and pwusermod -H
Baptiste Daroussin [Sat, 4 Jul 2015 15:27:04 +0000 (15:27 +0000)]
Validate input of pw usermod -h and pwusermod -H

Push the code that set the password into a separate function to improve
readability

Add regression tests about pw usermod -h and pw usermod -H

9 years agosysctl: get rid of sysctl_lock/unlock
Mateusz Guzik [Sat, 4 Jul 2015 14:44:39 +0000 (14:44 +0000)]
sysctl: get rid of sysctl_lock/unlock

Inline their contents into the only consumer.

9 years agoRemove non-existent dnvlist functions.
Mariusz Zaborski [Sat, 4 Jul 2015 10:33:33 +0000 (10:33 +0000)]
Remove non-existent dnvlist functions.

Approved by: pjd (mentor)

9 years agoMove nvlist documentation to the FreeBSD Kernel Developer's sections.
Mariusz Zaborski [Sat, 4 Jul 2015 10:27:30 +0000 (10:27 +0000)]
Move nvlist documentation to the FreeBSD Kernel Developer's sections.

Approved by: pjd (mentor)

9 years agoStaticize some stuff in mountd(8); no functional changes.
Edward Tomasz Napierala [Sat, 4 Jul 2015 08:40:48 +0000 (08:40 +0000)]
Staticize some stuff in mountd(8); no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoimprove dependencies for this module a bit... not great, but at
John-Mark Gurney [Sat, 4 Jul 2015 08:16:32 +0000 (08:16 +0000)]
improve dependencies for this module a bit...  not great, but at
least gives some basics...  I would add them to DPSRC, but due to the
intrinsics headers, they can't be added...

9 years agosysctl: remove a debugging printf which crept in with r285125
Mateusz Guzik [Sat, 4 Jul 2015 07:01:43 +0000 (07:01 +0000)]
sysctl: remove a debugging printf which crept in with r285125

9 years agosysctl: switch sysctllock to a sleepable rmlock
Mateusz Guzik [Sat, 4 Jul 2015 06:54:15 +0000 (06:54 +0000)]
sysctl: switch sysctllock to a sleepable rmlock

The lock is almost never taken for writing.

9 years agoCache _MPATH and pass it down into the modules build. Some NFS setups
Warner Losh [Sat, 4 Jul 2015 05:43:45 +0000 (05:43 +0000)]
Cache _MPATH and pass it down into the modules build. Some NFS setups
make the find it does extremely expensive, so compute it only
once. Also make sure the 'traditional' module building method works at
the expense of a bit of duplicated code.

9 years agoQuieten the scorpion SoC/WMAC reset path. Stuff the non-error stuff
Adrian Chadd [Sat, 4 Jul 2015 03:15:42 +0000 (03:15 +0000)]
Quieten the scorpion SoC/WMAC reset path.  Stuff the non-error stuff
under HALDEBUG().

9 years agoCall the WMAC DDR flush before handling an interrupt for the
Adrian Chadd [Sat, 4 Jul 2015 03:07:28 +0000 (03:07 +0000)]
Call the WMAC DDR flush before handling an interrupt for the
Atheros AHB (internally) connected MAC.

TODO:

* verify the interrupt was for us before doing the DDR flush.

9 years agoReshuffle all of the DDR flush operations into a single switch/mux,
Adrian Chadd [Sat, 4 Jul 2015 03:05:57 +0000 (03:05 +0000)]
Reshuffle all of the DDR flush operations into a single switch/mux,
and start teaching subsystems about it.

The Atheros MIPS platforms don't guarantee any kind of FIFO consistency
with interrupts in hardware.  So software needs to do a flush when it
receives an interrupt and before it calls the interrupt handler.

There are new ones for the QCA934x and QCA955x, so do a few things:

* Get rid of the individual ones (for ethernet and IP2);
* Create a mux and enum listing all the variations on DDR flushes;
* replace the uses of IP2 with the relevant one (which will typically
  be "PCI" here);
* call the USB DDR flush before calling the real USB interrupt handlers;
* call the ethernet one upon receiving an interrupt that's for us,
  rather than never calling it during operation.

Tested:

* QCA9558 (TP-Link archer c7 v2)
* AR9331 (Carambola 2)

TODO:

* PCI, USB, ethernet, etc need to do a double-check to see if the
  interrupt was truely for them before doing the DDR.  For now I
  prefer "correct" over "fast".

9 years agoWake up the hardware before doing anything in sysctl.
Adrian Chadd [Sat, 4 Jul 2015 02:59:30 +0000 (02:59 +0000)]
Wake up the hardware before doing anything in sysctl.

This stops the panics that occur on MIPS platforms when doing say,
'sysctl dev.ath.0' whilst the MAC is asleep.  The MIPS platform is
rather unforgiving in getting power-save register access wrong and you
will get all kinds of odd failures if you don't have things woken
up at the right times.

Tested:

* QCA9558 (TP-Link Archer C7 v2)
* AR9331 (Carambola 2)

.. with no VAPs configured and ath0 down (thus the MAC is definitely
   asleep.)

PR: kern/201117

9 years agoAdd support for TEST_METADATA
Julio Merino [Sat, 4 Jul 2015 02:37:36 +0000 (02:37 +0000)]
Add support for TEST_METADATA

Allow Makefiles to define generic metadata settings that apply to all test
programs defined by a Makefile.  The generic TEST_METADATA variable extends
the per-test program settings already supported via TEST_METADATA.<program>.

This feature will be useful to easily apply some settings to all programs
in a directory.  In particular, Kyua 0.12 will support parallel execution
of test programs and a bunch of them will need to be tagged as is_exclusive
to indicate that they cannot be run in parallel with anything else due to
their side-effects.  It will be reasonable to set this setting on whole
directories.

MFC after: 1 week

9 years agoAdd missing shebang
Julio Merino [Sat, 4 Jul 2015 02:24:47 +0000 (02:24 +0000)]
Add missing shebang

Plain test programs are not preprocessed by the build system (as opposed to
ATF test cases, which automatically gain a shebang pointing at atf-sh), so
we must take care of providing the shebang ourselves.

I'm not sure why this was not causing problems with Kyua 0.11, but the
upcoming 0.12 release chokes on this particular issue.

MFC after: 1 week