rpaulo [Tue, 21 Apr 2015 01:45:11 +0000 (01:45 +0000)]
Merge wpa_supplicant/hostapd 2.4.
Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of
bug fixes.
Relnotes: yes
bdrewery [Tue, 21 Apr 2015 01:37:14 +0000 (01:37 +0000)]
Support demangling C++ symbols with -D flag.
Sponsored by: EMC / Isilon Storage Division
gjb [Tue, 21 Apr 2015 00:48:35 +0000 (00:48 +0000)]
Merge the following from ^/projects/release-arm64 to allow
building FreeBSD/arm64 VM images and memstick.img installation
medium:
r281786, r281788, r281792:
r281786:
Add support for building arm64/aarch64 virtual machine images.
r281788:
Copy amd64/make-memstick.sh to arm64/make-memstick.sh for
aarch64 memory stick images.
Although arm64 does not yet have USB support, the memstick
image should be bootable with certain virtualization tools,
such as qemu.
r281792:
Add a buildenv_setup() prototype, intended to be overridden as
needed.
For example, the arm64/aarch64 build needs devel/aarch64-binutils,
so buildenv_setup() in the release.conf for this architecture
handles the installation of the port before buildworld/buildkernel.
Sponsored by: The FreeBSD Foundation
pfg [Mon, 20 Apr 2015 22:15:18 +0000 (22:15 +0000)]
patch(1): small include changes.
Mostly to match OpenBSD, no functional change.
Obtained from: OpenBSD
loos [Mon, 20 Apr 2015 22:12:19 +0000 (22:12 +0000)]
Build and install the DTB for all the supported AllWinner SoCs.
We will need them when we start booting using ubldr.
pfg [Mon, 20 Apr 2015 22:09:50 +0000 (22:09 +0000)]
Fix improbable memory leak in _citrus_prop_read_str().
Found by: Clang Static Analyzer
markj [Mon, 20 Apr 2015 22:08:11 +0000 (22:08 +0000)]
Move the definition of struct bpf_if to bpf.c.
A couple of fields are still exposed via struct bpf_if_ext so that
bpf_peers_present() can be inlined into its callers. However, this change
eliminates some type duplication in the resulting CTF container, since
otherwise ctfmerge(1) propagates the duplication through all types that
contain a struct bpf_if.
Differential Revision: https://reviews.freebsd.org/D2319
Reviewed by: melifaro, rpaulo
pfg [Mon, 20 Apr 2015 21:44:55 +0000 (21:44 +0000)]
scsi_parse_transportid_rdma(): fix mismatch in memoty access size.
Independently found by Coverity and gcc49.
CID: 1230006
Reviewed by: ken
MFC after: 5 days
joel [Mon, 20 Apr 2015 21:19:26 +0000 (21:19 +0000)]
Minor mdoc fixes.
bdrewery [Mon, 20 Apr 2015 20:51:19 +0000 (20:51 +0000)]
- Speedup significantly by not using subshells for data already fetched.
Ran against /usr/local/sbin/pkg:
Before: 25.12 real 12.41 user 33.14 sys
After: 0.53 real 0.49 user 0.13 sys
- Exit with 1 if any missing or unresolved symbol is detected.
- Add option '-U' to skip looking up unresolved symbols.
- Don't consider provided weak objects as unresolved (nm V).
Sponsored by: EMC / Isilon Storage Division
bdrewery [Mon, 20 Apr 2015 20:45:10 +0000 (20:45 +0000)]
Fix indentation to use tabs
eadler [Mon, 20 Apr 2015 20:33:22 +0000 (20:33 +0000)]
phabricator related changes:
- don't lint either contrib or crypto: these are both externally written
directories
- add additional linters for spelling (check common typos like teh ->
the)
- chmod linter checks for executible bit on bad files
- merge-conflict checks for merge conflict tokens then may have been
resolved incorrectly
- filename checks for back characters in filenames
- json for json syntax correctness
- remove history.immutable: it is meaningless on subversion, and causes
workflow problems when trying to use git. It it set to 'true' by
default with hg
gjb [Mon, 20 Apr 2015 20:13:02 +0000 (20:13 +0000)]
Copy amd64/make-memstick.sh to arm64/make-memstick.sh for
aarch64 memory stick images.
Although arm64 does not yet have USB support, the memstick
image should be bootable with certain virtualization tools,
such as qemu.
Sponsored by: The FreeBSD Foundation
vangyzen [Mon, 20 Apr 2015 20:07:39 +0000 (20:07 +0000)]
dmesg: accommodate message buffer growth between the sysctl calls
Allocate 12.5% extra space to avoid ENOMEM when the message buffer
is growing steadily.
Reported by: Steve Wahl <steve_wahl@dell.com> (and tested)
Approved by: kib (mentor)
Obtained from: Dell Inc.
MFC after: 1 week
gjb [Mon, 20 Apr 2015 20:06:25 +0000 (20:06 +0000)]
Add support for building arm64/aarch64 virtual machine images.
Sponsored by: The FreeBSD Foundation
vangyzen [Mon, 20 Apr 2015 20:03:26 +0000 (20:03 +0000)]
Always send log(9) messages to the message buffer.
It is truer to the semantics of logging for messages to *always*
go to the message buffer, where they can eventually be collected
and, in fact, be put into a log file.
This restores the behavior prior to r70239, which seems to have
changed it inadvertently.
Submitted by: Eric Badger <eric@badgerio.us>
Reviewed by: jhb
Approved by: kib (mentor)
Obtained from: Dell Inc.
MFC after: 1 week
gjb [Mon, 20 Apr 2015 20:03:07 +0000 (20:03 +0000)]
MFH: r281668 through r281783
Sponsored by: The FreeBSD Foundation
gjb [Mon, 20 Apr 2015 19:54:54 +0000 (19:54 +0000)]
When building VM disk images, vm_copy_base() uses tar(1) to
copy the userland from one md(4)-mounted filesystem to a clean
filesystem to prevent remnants of files that were added and
removed from resulting in an unclean filesystem. When newfs(8)
creates the first filesystem with journaled soft-updates enabled,
the /.sujournal file in the new filesystem cannot be overwritten
by the /.sujournal in the original filesystem.
To avoid this particular error case, do not enable journaled
soft-updates when creating the md(4)-backed filesystems, and
instead use tunefs(8) to enable journaled soft-updates after
the new filesystem is populated in vm_copy_base().
While here, fix a long standing bug where the build environment
/boot files were used by mkimg(1) when creating the VM disk
images by using the files in .OBJDIR.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
mav [Mon, 20 Apr 2015 19:11:27 +0000 (19:11 +0000)]
Don't set bits that should be zero for SATA devices.
Old value made Linux think that it is PATA device with SATA bridge.
MFC after: 2 weeks
emaste [Mon, 20 Apr 2015 18:30:06 +0000 (18:30 +0000)]
crunchide: Remove local EM_* ELF definitions provided by system ELF headers
Suggested by: imp (in review D2314)
dteske [Mon, 20 Apr 2015 17:46:09 +0000 (17:46 +0000)]
Update usage statement to align with post-r279624 functionality.
MFC after: 3 days
X-MFC-to: stable/10 stable/9
emaste [Mon, 20 Apr 2015 17:43:55 +0000 (17:43 +0000)]
vidcontrol: skip invalid video modes returned by vt(4)
vt(4) has a stub CONS_MODEINFO ioctl that does not provide any data
but returns success. This needs to be fixed in the kernel, but address
it in vidcontrol(1) as well in case it's run on an older kernel.
Reviewed by: bde
Sponsored by: The FreeBSD Foundation
dim [Mon, 20 Apr 2015 17:37:37 +0000 (17:37 +0000)]
Add llvm patch corresponding to r281775.
dim [Mon, 20 Apr 2015 17:36:35 +0000 (17:36 +0000)]
Pull in r229911 from upstream llvm trunk (by Benjamin Kramer):
MC: Allow multiple comma-separated expressions on the .uleb128 directive.
For compatiblity with GNU as. Binutils documents this as
'.uleb128 expressions'. Subtle, isn't it?
Reported by: sbruno
PR: 199554
MFC after: 3 days
araujo [Mon, 20 Apr 2015 17:30:13 +0000 (17:30 +0000)]
Remove unused variable.
Differential Revision: D2333
Reviewed by: royger
araujo [Mon, 20 Apr 2015 17:24:39 +0000 (17:24 +0000)]
Add back ixgbe_rxeof, just remove the assignment to more.
araujo [Mon, 20 Apr 2015 17:21:15 +0000 (17:21 +0000)]
Remove unused variable.
Differential Revision: D2331
Reviewed by: erj
alc [Mon, 20 Apr 2015 16:48:21 +0000 (16:48 +0000)]
Eliminate an unused variable.
MFC after: 1 week
pfg [Mon, 20 Apr 2015 16:40:13 +0000 (16:40 +0000)]
Prevent a double free.
This is similar to r281756 so set the ptr NULL after free as a safety belt
against future changes.
Obtained from: HardenedBSD (
b2e77ced9ae213d358b44d98f552d9ae4636ecac)
Submitted by: Oliver Pinter
Revewed by: rmacklem
pfg [Mon, 20 Apr 2015 16:31:27 +0000 (16:31 +0000)]
g_uncompress_taste: prevent a double free.
Found by: Clang Static Analyzer
MFC after: 1 week
brooks [Mon, 20 Apr 2015 16:23:59 +0000 (16:23 +0000)]
Bump doc date missed in r281605.
MFC after: 1 day
mav [Mon, 20 Apr 2015 14:55:01 +0000 (14:55 +0000)]
Report link as up if tap device is not specified (black hole).
MFC after: 2 weeks
mav [Mon, 20 Apr 2015 14:23:18 +0000 (14:23 +0000)]
Report link as up only if we managed to open tap device.
It would be cool to report tap device status, but it has no such API.
MFC after: 2 weeks
mav [Mon, 20 Apr 2015 10:44:46 +0000 (10:44 +0000)]
Activate write-only optimization if bpf device opened with O_WRONLY.
dhclient opens bpf as write-only to send packets. It never reads received
packets from that descriptor, but processing them in kernel takes time.
Especially much time takes packet timestamping on systems with expensive
timecounter, such as bhyve guest, where network speed dropped in half.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
mav [Mon, 20 Apr 2015 10:29:42 +0000 (10:29 +0000)]
Disable RX/TX queues notifications when not needed.
This reduces CPU load and doubles iperf throughput, reaching 2-3Gbit/s.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
kib [Mon, 20 Apr 2015 09:07:12 +0000 (09:07 +0000)]
Remove code to support the top of the stack layout for FreeBSD 1.x/2.x
kernel, but keep explanation of the old ps_strings structure to make
it clear what sanity check tries to accomplish.
Noted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
kib [Mon, 20 Apr 2015 08:25:55 +0000 (08:25 +0000)]
Remove duplicate definitions of MWAIT_CX hints. Identical defines in
specialreg.h are enough.
Discussed with: mav
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
eadler [Mon, 20 Apr 2015 02:23:00 +0000 (02:23 +0000)]
find.1: Add missing whitespace:
Obtained from: Dragonfly (
dee38d02d51cc8316f82b0263158d2546f2398bc)
eadler [Mon, 20 Apr 2015 02:07:57 +0000 (02:07 +0000)]
ed(1): Fix [-Werror=logical-not-parentheses]
/usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to
theleft hand side of comparison [-Werror=logical-not-parentheses]
Obtained from: Dragonfly (
1fff89cbaeaa43af720a1f23d9c466b756dd8a58)
MFC After: 1 month
pfg [Sun, 19 Apr 2015 23:55:59 +0000 (23:55 +0000)]
nfsrpc_createv4: fix double free.
Reported by: Oliver Pinter, clang static checker
Obtained from: HardenedBSD (commit
63cac77c42c0c3fc67da62f97d5ab651d52ae707)
Reviewed by: rmacklem
MFC after: 5 days
marius [Sun, 19 Apr 2015 20:20:52 +0000 (20:20 +0000)]
Make a comment reflect reality.
marius [Sun, 19 Apr 2015 20:15:57 +0000 (20:15 +0000)]
Refine the workaround for Intel HSD131 [1] added in r269052:
- Use the full mask described by the erratum as with a sufficiently high
number of these false-positives, the overflow bit (bit 62) additionally
gets set [7].
- HSD131 has been brought into several other Haswell-derived CPUs including
to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of
these benign errors by default on CPU models affected by HSM142, HSW131 and
BDM48 [2 - 5], describing the HSD131 silicon bug for additional models.
Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered
by this fault [6], with the specification update concerned with HSM142 [2]
only referring to 0x3c and 0x46.
Submitted by: David Froehlich [7]
MFC after: 3 days
http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3]
http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5]
https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6]
adrian [Sun, 19 Apr 2015 17:15:55 +0000 (17:15 +0000)]
Refactor out the _PXM -> VM domain lookup done in ACPI, in preparation for
its use in upcoming code.
This is inspired by something in jhb's NUMA IRQ allocation patchset.
However, the tricky bit here is that the PXM lookup for a node may
fail, requiring a lookup on the parent node. So if it doesn't
exist, don't fail - just go up to the parent. Only error out of the
lookup is the ACPI lookup returns an error.
Sponsored by: Norse Corp, Inc.
adrian [Sun, 19 Apr 2015 17:07:51 +0000 (17:07 +0000)]
Update pkt-gen to optionally use randomised source/destination
IPv4 addresses/ports.
When doing traffic testing of actual code that /does/ things to the
packet (rather than say, 'bridge.c'), it's typically a good idea to
use a variety of cache-busting and flow-tracking-busting packet
spreads. The pkt-gen method of testing an IP range was to walk
it linearly - which is fine, but not useful enough.
This can be used to completely randomize the source/destination
addresses (eg to test out flow-tracking-busting) and to keep the
destination fixed whilst randomising the source (eg to test out
what a DDoS may look like.)
Tested:
* Intel ixgbe 10G (82599) netmap
Differential Revision: https://reviews.freebsd.org/D2309
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.
kevlo [Sun, 19 Apr 2015 15:53:58 +0000 (15:53 +0000)]
Add new USB ID.
PR: 199522
melifaro [Sun, 19 Apr 2015 12:49:30 +0000 (12:49 +0000)]
Fix use-after-free.
Reported by: Coverity Scan, pfg
CID: 1245747
mav [Sun, 19 Apr 2015 11:34:41 +0000 (11:34 +0000)]
Change wcommitsize default from one empirical value to another.
The new value is more predictable with growing RAM size:
hibufspace maxvnodes old new
i386:
256MB
32980992 15800 2198732 2097152
2GB
94027776 107677 878764 4194304
amd64:
256MB
32980992 15800 2198732 2097152
1GB
114114560 68062 1678155 4194304
4GB
217055232 111807 1955452 4194304
16GB
1717846016 337308 5097465
16777216
64GB
1734918144 1164427 1490479
16777216
256GB
1734918144 4426453 391983
16777216
Reviewed by: rmacklem
MFC after: 2 weeks
eadler [Sun, 19 Apr 2015 09:35:46 +0000 (09:35 +0000)]
identd: restore memcpy
I should not be committing at 2:30am....
Reported by: pluknet
eadler [Sun, 19 Apr 2015 09:27:47 +0000 (09:27 +0000)]
identd: also zero se_rpc_highvers
Reported by: pluknet
eadler [Sun, 19 Apr 2015 09:07:57 +0000 (09:07 +0000)]
identd: remove redundant zeroing
se_rpc_lowvers was set to 0 twice, so remove one of them
I can not find any other variable which they may have been a typo of.
Reported by: gcc5.1
eadler [Sun, 19 Apr 2015 08:45:37 +0000 (08:45 +0000)]
tzsetup: remove set but unused variable
- leave a comment explaining which variable it used to be
Reported by: gcc5.1
eadler [Sun, 19 Apr 2015 08:30:13 +0000 (08:30 +0000)]
config: remove set but unchecked variable
reported by: gcc5.1
trasz [Sun, 19 Apr 2015 07:35:18 +0000 (07:35 +0000)]
Add back fdrop() missed in r281726.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
eadler [Sun, 19 Apr 2015 07:16:44 +0000 (07:16 +0000)]
README: changes and fixups
Two orthogonal goals:
- try to make README look a little nicer on phabricator by using
Remarkup syntax for commands (using `` instead of using a closing ')
- try to make README look a little nicer on github.
- Don't encourage `make world` when the handbook specifies otherwise
- Change language around documentation to be a bit clearer
MFC After: 2 weeks
trasz [Sun, 19 Apr 2015 07:12:16 +0000 (07:12 +0000)]
Optimize the O_NOCTTY handling hack in linux_common_open().
Differential Revision: https://reviews.freebsd.org/D2323
Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
trasz [Sun, 19 Apr 2015 06:18:41 +0000 (06:18 +0000)]
Replace "new NFS" with just "NFS" in some sysctl description strings.
Sponsored by: The FreeBSD Foundation
eadler [Sun, 19 Apr 2015 04:53:28 +0000 (04:53 +0000)]
rpcgen: fix use use of strcmp
strcmp only guarantee that it will return at least 1 if the string B
is greater than that of string A.
eadler [Sun, 19 Apr 2015 04:27:50 +0000 (04:27 +0000)]
calendar: remove useless check
lineline checked for 0 in the while loop condition. There is no need to
check for it additionally in the body.
CID: 1288959
MFC After: 1 week
jhibbits [Sun, 19 Apr 2015 00:33:21 +0000 (00:33 +0000)]
Fix the build. Commit the last part of e500 PMC.
Pointy hat to: jhibbits
alc [Sun, 19 Apr 2015 00:29:02 +0000 (00:29 +0000)]
Eliminate an unused variable.
MFC after: 1 week
eadler [Sat, 18 Apr 2015 23:56:04 +0000 (23:56 +0000)]
bin/ed: use correct type in multiplication
The result is line_t** so the multiplication should be size *
sizeof(line_t*)
MFC After: 1 month
bdrewery [Sat, 18 Apr 2015 23:49:57 +0000 (23:49 +0000)]
sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap n n...'.
The parser considered 'trap exit INT' to reset the default for both EXIT and
INT. This beahvior is not POSIX compliant. This was avoided if a value was
specified for 'exit', but then disallows exiting with the signal received. A
possible workaround is using ' exit'.
However POSIX does allow this type of behavior if the parameters are all
integers. Fix the handling for this and clarify its support in the manpage
since it is specifically allowed by POSIX.
Differential Revision: https://reviews.freebsd.org/D2325
Reviewed by: jilles
MFC after: 2 weeks
kib [Sat, 18 Apr 2015 21:54:00 +0000 (21:54 +0000)]
Regen.
kib [Sat, 18 Apr 2015 21:50:53 +0000 (21:50 +0000)]
Regen.
kib [Sat, 18 Apr 2015 21:50:13 +0000 (21:50 +0000)]
The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), and
pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x
kernels which required padding before the off_t parameter. The
fcntl(2) contains compatibility code to handle kernels before the
struct flock was changed during the 8.x CURRENT development. The
shims were reasonable to allow easier revert to the older kernel at
that time.
Now, two or three major releases later, shims do not serve any
purpose. Such old kernels cannot handle current libc, so revert the
compatibility code.
Make padded syscalls support conditional under the COMPAT6 config
option. For COMPAT32, the syscalls were under COMPAT6 already.
Remove WITHOUT_SYSCALL_COMPAT build option, which only purpose was to
(partially) disable the removed shims.
Reviewed by: jhb, imp (previous versions)
Discussed with: peter
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
jhibbits [Sat, 18 Apr 2015 21:39:17 +0000 (21:39 +0000)]
Implement hwpmc(4) for Freescale e500 core.
This supports e500v1, e500v2, and e500mc. Tested only on e500v2, but the
performance counters are identical across all, with e500mc having some
additional events.
Relnotes: Yes
kib [Sat, 18 Apr 2015 21:35:41 +0000 (21:35 +0000)]
Make wait6(2), waitid(3) and ppoll(2) cancellation points. The
waitid() function is required to be cancellable by the standard. The
wait6() and ppoll() follow the other syscalls in their groups.
Reviewed by: jhb, jilles (previous versions)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
kib [Sat, 18 Apr 2015 21:27:28 +0000 (21:27 +0000)]
Revert unrelated chunk from the r281707.
MFC after: 2 weeks
kib [Sat, 18 Apr 2015 21:23:16 +0000 (21:23 +0000)]
Remove lazy pmap switch code from i386. Naive benchmark with md(4)
shows no difference with the code removed.
On both amd64 and i386, assert that a released pmap is not active.
Proposed and reviewed by: alc
Discussed with: Svatopluk Kraus <onwahe@gmail.com>, peter
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
markj [Sat, 18 Apr 2015 21:00:36 +0000 (21:00 +0000)]
Add manual pages for the io, ip, proc, sched, tcp and udp DTrace providers.
The format of these pages is somewhat experimental, so they may be subject
to further tweaking.
Differential Revision: https://reviews.freebsd.org/D2170
Reviewed by: bcr, rpaulo
MFC after: 2 weeks
rpaulo [Sat, 18 Apr 2015 20:55:55 +0000 (20:55 +0000)]
Synaptics: don't report the middle button when clickPad is used.
On trackpads that had support for both, we were sending two button
events when the trackpad was pressed.
Tested by: Jakob Alvermark <jakob at alvermark.net>
MFC after: 1 week
kib [Sat, 18 Apr 2015 20:55:33 +0000 (20:55 +0000)]
Complete r281670, unlist removed files.
Sponsored by: The FreeBSD Foundation
markj [Sat, 18 Apr 2015 20:36:58 +0000 (20:36 +0000)]
Remove unimplemented sched provider probes.
They were added for compatibility with the sched provider in Solaris and
illumos, but our sched provider is already incompatible since it uses native
types, so there isn't much point in keeping them around.
Differential Revision: https://reviews.freebsd.org/D2167
Reviewed by: rpaulo
markj [Sat, 18 Apr 2015 20:31:59 +0000 (20:31 +0000)]
SDT(9): add a section on SDT providers, mentioning the "sdt" provider.
Add examples demonstrating how one can list available providers and the
DTrace probes provided by a provider.
Differential Revision: https://reviews.freebsd.org/D2166
Reviewed by: rpaulo
MFC after: 2 weeks
mav [Sat, 18 Apr 2015 20:10:19 +0000 (20:10 +0000)]
Workaround bhyve virtual disks operation on top of GEOM providers.
GEOM does not support scatter/gather lists in its I/Os. Such requests
are cut in pieces by physio(), that may be problematic, if those pieces
are not multiple of provider's sector size. If such case is detected,
move the data through temporary sequential buffer.
MFC after: 2 weeks
sjg [Sat, 18 Apr 2015 19:52:39 +0000 (19:52 +0000)]
No need to delete export from filesystems which are not exported.
mav [Sat, 18 Apr 2015 19:37:37 +0000 (19:37 +0000)]
Do not report stripe size if it is equal to sector size.
MFC after: 1 week
takawata [Sat, 18 Apr 2015 17:41:09 +0000 (17:41 +0000)]
To ensure j formatting string valid, cast uint64_t values to uintmax_t.
kib [Sat, 18 Apr 2015 17:21:12 +0000 (17:21 +0000)]
Initialize td_sel in the thread_init(). Struct thread is not zeroed
on the initial allocation, but seltdinit() assumes that td_sel is NULL
or a valid pointer. Note that thread_fini()/seltdfini() also relies
on this, but correctly resets td_sel to NULL.
Submitted by: luke.tw@gmail.com
PR: 199518
MFC after: 1 week
ae [Sat, 18 Apr 2015 16:58:33 +0000 (16:58 +0000)]
Change ipsec_address() and ipsec_logsastr() functions to take two
additional arguments - buffer and size of this buffer.
ipsec_address() is used to convert sockaddr structure to presentation
format. The IPv6 part of this function returns pointer to the on-stack
buffer and at the moment when it will be used by caller, it becames
invalid. IPv4 version uses 4 static buffers and returns pointer to
new buffer each time when it called. But anyway it is still possible
to get corrupted data when several threads will use this function.
ipsec_logsastr() is used to format string about SA entry. It also
uses static buffer and has the same problem with concurrent threads.
To fix these problems add the buffer pointer and size of this
buffer to arguments. Now each caller will pass buffer and its size
to these functions. Also convert all places where these functions
are used (except disabled code).
And now ipsec_address() uses inet_ntop() function from libkern.
PR: 185996
Differential Revision: https://reviews.freebsd.org/D2321
Reviewed by: gnn
Sponsored by: Yandex LLC
ae [Sat, 18 Apr 2015 16:51:24 +0000 (16:51 +0000)]
Requeue mbuf via netisr when we use IPSec tunnel mode and IPv6.
ipsec6_common_input_cb() uses partial copy of ip6_input() to parse
headers. But this isn't correct, when we use tunnel mode IPSec.
When we stripped outer IPv6 header from the decrypted packet, it
can become IPv4 packet and should be handled by ip_input. Also when
we use tunnel mode IPSec with IPv6 traffic, we should pass decrypted
packet with inner IPv6 header to ip6_input, it will correctly handle
it and also can decide to forward it.
The "skip" variable points to offset where payload starts. In tunnel
mode we reset it to zero after stripping the outer header. So, when
it is zero, we should requeue mbuf via netisr.
Differential Revision: https://reviews.freebsd.org/D2306
Reviewed by: adrian, gnn
Sponsored by: Yandex LLC
ae [Sat, 18 Apr 2015 16:46:31 +0000 (16:46 +0000)]
Fix handling of scoped IPv6 addresses in IPSec code.
* in ipsec_encap() embed scope zone ids into link-local addresses
in the new IPv6 header, this helps ip6_output() disambiguate the
scope;
* teach key_ismyaddr6() use in6_localip(). in6_localip() is less
strict than key_sockaddrcmp(). It doesn't compare all fileds of
struct sockaddr_in6, but it is faster and it should be safe,
because all SA's data was checked for correctness. Also, since
IPv6 link-local addresses in the &V_in6_ifaddrhead are stored in
kernel-internal form, we need to embed scope zone id from SA into
the address before calling in6_localip.
* in ipsec_common_input() take scope zone id embedded in the address
and use it to initialize sin6_scope_id, then use this sockaddr
structure to lookup SA, because we keep addresses in the SADB without
embedded scope zone id.
Differential Revision: https://reviews.freebsd.org/D2304
Reviewed by: gnn
Sponsored by: Yandex LLC
ae [Sat, 18 Apr 2015 16:38:45 +0000 (16:38 +0000)]
Remove xform_ipip.c and code related to XF_IP4.
The only thing is used from this code is ipip_output() function, that does
IPIP encapsulation. Other parts of XF_IP4 code were removed in r275133.
Also it isn't possible to configure the use of XF_IP4, nor from userland
via setkey(8), nor from the kernel.
Simplify the ipip_output() function and rename it to ipsec_encap().
* move IP_DF handling from ipsec4_process_packet() into ipsec_encap();
* since ipsec_encap() called from ipsec[64]_process_packet(), it
is safe to assume that mbuf is contiguous at least to IP header
for used IP version. Remove all unneeded m_pullup(), m_copydata
and related checks.
* use V_ip_defttl and V_ip6_defhlim for outer headers;
* use V_ip4_ipsec_ecn and V_ip6_ipsec_ecn for outer headers;
* move all diagnostic messages to the ipsec_encap() callers;
* simplify handling of ipsec_encap() results: if it returns non zero
value, print diagnostic message and free mbuf.
* some style(9) fixes.
Differential Revision: https://reviews.freebsd.org/D2303
Reviewed by: glebius
Sponsored by: Yandex LLC
trasz [Sat, 18 Apr 2015 16:08:06 +0000 (16:08 +0000)]
Remove some oldnfs remnants.
Differential Revision: https://reviews.freebsd.org/D2287
Reviewed by: rmacklem@
Sponsored by: The FreeBSD Foundation
takawata [Sat, 18 Apr 2015 16:04:32 +0000 (16:04 +0000)]
Change printf formatting to unbroke i386 arch.
Submitted by:david@catwhisker.org
trasz [Sat, 18 Apr 2015 09:49:09 +0000 (09:49 +0000)]
Remove unused code from linux_mount(), and make it possible to mount
any kind of filesystem instead of harcoded three.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
takawata [Sat, 18 Apr 2015 09:08:47 +0000 (09:08 +0000)]
Fix Typo.
rpaulo [Sat, 18 Apr 2015 07:34:39 +0000 (07:34 +0000)]
Fix French typos in etherswitch.
araujo [Sat, 18 Apr 2015 06:53:13 +0000 (06:53 +0000)]
Fix misspelling.
araujo [Sat, 18 Apr 2015 06:48:03 +0000 (06:48 +0000)]
Improve code style(9), no functional changes.
Differential Revision: D2320
Reviewed by: takawata
takawata [Sat, 18 Apr 2015 06:16:33 +0000 (06:16 +0000)]
Forgot to add default event mask definition.
rpaulo [Sat, 18 Apr 2015 05:04:12 +0000 (05:04 +0000)]
Vendor import of wpa_supplicant/hostapd 2.4.
Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of
bug fixes.
takawata [Sat, 18 Apr 2015 04:53:17 +0000 (04:53 +0000)]
Add LE related HCI control command to hccontrol(1).
loos [Sat, 18 Apr 2015 03:07:01 +0000 (03:07 +0000)]
Move the items common to all SoCs to a single file.
loos [Sat, 18 Apr 2015 01:01:39 +0000 (01:01 +0000)]
Fix the style(9) and adds two missing parentheses on the licence.
Reduce the differences to bring in the MMC/SD driver.
Approved by: ganbold (licence change)
mckusick [Sat, 18 Apr 2015 00:59:03 +0000 (00:59 +0000)]
More accurately collect name-cache statistics in sysctl functions
sysctl_debug_hashstat_nchash() and sysctl_debug_hashstat_rawnchash().
These changes are in preparation for allowing changes in the size
of the vnode hash tables driven by increases and decreases in the
maximum number of vnodes in the system.
Reviewed by: kib@
Phabric: D2265
loos [Sat, 18 Apr 2015 00:35:00 +0000 (00:35 +0000)]
Simplify the receiver code a bit.
Drain the RX FIFO and continue on failure.
emaste [Sat, 18 Apr 2015 00:30:36 +0000 (00:30 +0000)]
crunchide: always include both 32- and 64-bit ELF support
This avoids the need to build a target-specific crunchide for cross-
uilds.
Differential Revision: https://reviews.freebsd.org/D2314
Sponsored by: The FreeBSD Foundation
loos [Fri, 17 Apr 2015 23:49:43 +0000 (23:49 +0000)]
Add the necessary support to use both TX queues available on if_emac.
Each TX queue can hold one packet (yes, if_emac can send only two(!)
packets at a time).
Even with this change the very limited FIFO buffer (3 KiB for TX and 13 KiB
for RX) fill up too quick to sustain higher throughput.
For the TCP case it turns out that TX isn't the limiting factor, but the RX
side is (the FIFO fill up and starts to discard packets, so the sender has
to slow down).
pfg [Fri, 17 Apr 2015 22:26:01 +0000 (22:26 +0000)]
Drop experimental dir_index support.
The htree directory index is a highly desirable feature for research
purposes and was meant to improve performance in our ext2/3 driver.
Unfortunately our implementation has two problems:
- It never really delivered any performance improvement.
- It appears to corrupt the filesystem in undetermined circumstances.
Strictly speaking dir_index is not required for read/write support in
ext2/3 and our limited ext4 support still works fine without it.
Regain stability in the ext2 driver by removing it. We may need it back
(fixed) if we want to support encrypted ext4 support but thanks to the
wonders of version control we can always revert this change and bring it
back.
PR: 191895
PR: 198731
PR: 199309
MFC after: 5 days