]> xenbits.xensource.com Git - people/julieng/freebsd.git/log
people/julieng/freebsd.git
9 years agoUse nitems(x) instead of sizeof(x)/sizeof(x[0])
ngie [Mon, 2 Nov 2015 00:42:31 +0000 (00:42 +0000)]
Use nitems(x) instead of sizeof(x)/sizeof(x[0])

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

9 years agoConditionally install (if_)?(otus|rsu).4, otusfw.4, rsufw.4, and urtwn.4 if
ngie [Mon, 2 Nov 2015 00:39:28 +0000 (00:39 +0000)]
Conditionally install (if_)?(otus|rsu).4, otusfw.4, rsufw.4, and urtwn.4 if
MK_USB != no

Add the manpages to OptionalObsoleteFiles.inc

As a side-effect, this also fixes installworld with MK_USB == no

X-MFC with: r290128
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd mailbox tag/structure for touchscreen buffer address property
gonzo [Sun, 1 Nov 2015 23:50:07 +0000 (23:50 +0000)]
Add mailbox tag/structure for touchscreen buffer address property

9 years agoSynchronize with latest upstream VCHI code:
gonzo [Sun, 1 Nov 2015 22:17:39 +0000 (22:17 +0000)]
Synchronize with latest upstream VCHI code:

- Add LIB_VERSION ioctl
- Add CLOSE_DELIVERED ioctl
- Bump code version

Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5

9 years agosh: Avoid copying argv for simple commands.
jilles [Sun, 1 Nov 2015 22:07:40 +0000 (22:07 +0000)]
sh: Avoid copying argv for simple commands.

Add dummy entries before and after so arglist's array is directly usable as
argv.

9 years agoTreat synchronous VFP exception just like aynchronous: as an FP exception,
gonzo [Sun, 1 Nov 2015 21:59:56 +0000 (21:59 +0000)]
Treat synchronous VFP exception just like aynchronous: as an FP exception,
not as illegal instruction

9 years agoFix lladdr change propagation for on vlans on top of it.
melifaro [Sun, 1 Nov 2015 19:59:04 +0000 (19:59 +0000)]
Fix lladdr change propagation for on vlans on top of it.
Fix lladdr update when setting mac address manually.
Fix lladdr_event for slave ports addition.

MFC after: 4 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D4004

9 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sun, 1 Nov 2015 19:55:32 +0000 (19:55 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

9 years agopfctl: Fix uninitialised veriable
kp [Sun, 1 Nov 2015 17:20:17 +0000 (17:20 +0000)]
pfctl: Fix uninitialised veriable

In pfctl_set_debug() we used 'level' without ever initialising it.
We correctly parsed the option, but them failed to actually assign the parsed
value to 'level' before performing to ioctl() to configure the debug level.

PR: 202996
Submitted by: Andrej Kolontai

9 years agoInstall myself as src committer.
mmel [Sun, 1 Nov 2015 16:54:55 +0000 (16:54 +0000)]
Install myself as src committer.

Approved by: kib (mentor)
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Empty fields above will be automatically removed.

M    share/misc/committers-src.dot

9 years agoMicrooptimize.
ache [Sun, 1 Nov 2015 08:40:15 +0000 (08:40 +0000)]
Microoptimize.

9 years agoAddition to prev. commit.
ache [Sun, 1 Nov 2015 06:47:05 +0000 (06:47 +0000)]
Addition to prev. commit.
In some edge cases fp->_p can be changed in _sseek(), recalculate.

PR:     204156
MFC after:      1 week

9 years agoDon't seek to the end if write buffer is empty (in append modes).
ache [Sun, 1 Nov 2015 06:15:14 +0000 (06:15 +0000)]
Don't seek to the end if write buffer is empty (in append modes).

PR:             204156
MFC after:      1 week

9 years agoioat: Handle channel-fatal HW errors safely
cem [Sat, 31 Oct 2015 20:38:06 +0000 (20:38 +0000)]
ioat: Handle channel-fatal HW errors safely

Certain invalid operations trigger hardware error conditions.  Error
conditions that only halt one channel can be detected and recovered by
resetting the channel.  Error conditions that halt the whole device are
generally not recoverable.

Add a sysctl to inject channel-fatal HW errors,
'dev.ioat.<N>.force_hw_error=1'.

When a halt due to a channel error is detected, ioat(4) blocks new
operations from being queued on the channel, completes any outstanding
operations with an error status, and resets the channel before allowing
new operations to be queued again.

Update ioat.4 to document error recovery;  document blockfill introduced
in r290021 while we are here;  document ioat_put_dmaengine() added in
r289907;  document DMA_NO_WAIT added in r289982.

Sponsored by: EMC / Isilon Storage Division

9 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sat, 31 Oct 2015 15:09:31 +0000 (15:09 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

9 years agoWe have long double on arm64, and the tests pass so enable them.
andrew [Sat, 31 Oct 2015 10:16:44 +0000 (10:16 +0000)]
We have long double on arm64, and the tests pass so enable them.

Sponsored by: ABT Systems Ltd

9 years agonewsyslog: treat 'c' flag in the config as 'C'
bapt [Sat, 31 Oct 2015 09:45:11 +0000 (09:45 +0000)]
newsyslog: treat 'c' flag in the config as 'C'

When -C was introduced in r114137 the plan was to have -C and -c being used for
"create" due to a typo in FreeBSD <= 4.8 a temporary compatibility hack has been
added to make -c being like -G aka GLOB and a warning was issued for the user to
be aware of the futur change for -c.

12 years later it is more than time to remove that hack and finish the what was
intent in r114137

Submitted by: Alexandre Perrin <alex@kaworu.ch>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D4000

9 years agoThe error classification from lower layers is a poor indicator of
imp [Sat, 31 Oct 2015 04:53:07 +0000 (04:53 +0000)]
The error classification from lower layers is a poor indicator of
whether an error is recoverable. Always re-dirty the buffer on errors
from write requests. The invalidation we used to do for errors not EIO
doesn't need to be done for a device that's really gone, since that's
done in a different path.

Reviewed by: mckusick@, kib@

9 years agoRather than using the #define for path names, indirect through a char *
imp [Sat, 31 Oct 2015 04:39:55 +0000 (04:39 +0000)]
Rather than using the #define for path names, indirect through a char *
variable that could change for different executable types detected.

9 years agoMove all the paths into a new path.h to centralize them.
imp [Sat, 31 Oct 2015 04:39:28 +0000 (04:39 +0000)]
Move all the paths into a new path.h to centralize them.

9 years agoPrint unsigned memory sizes, to handle >2GB RAM on 32-bit powerpc.
jhibbits [Sat, 31 Oct 2015 02:08:39 +0000 (02:08 +0000)]
Print unsigned memory sizes, to handle >2GB RAM on 32-bit powerpc.

Sponsored by: Alex Perez/Intertial Computing

9 years agoDon't hide stderr when checking ${CC} --version.
bdrewery [Sat, 31 Oct 2015 02:07:30 +0000 (02:07 +0000)]
Don't hide stderr when checking ${CC} --version.

This can have important debugging information such as 'cc: not found' or
'ccache: error: Could not find compiler "cc" in PATH'.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agomips: do mips_sync() on sync operations to uncachable memory.
adrian [Sat, 31 Oct 2015 00:29:26 +0000 (00:29 +0000)]
mips: do mips_sync() on sync operations to uncachable memory.

mips24k/mips74k document that we need an explicit SYNC so to order
things correctly, even with access to uncachable memory.
We were doing calls to SYNC in the cache ops (inv, wbinv) but we
weren't doing it for uncachable memory.

9 years agomips74k: use cache-writeback for memory, not writethrough.
adrian [Sat, 31 Oct 2015 00:04:44 +0000 (00:04 +0000)]
mips74k: use cache-writeback for memory, not writethrough.

When I ported this code from netbsd I was .. slightly mips74k greener.
I used writethrough because (a) it's what netbsd did, and (b) if I used
writethrough then things "didn't work."

Fast-forward a couple years, more MIPS hacking and a whole lot more
understanding of the bus APIs (the last few commits notwithstanding;
it's been a long week, ok?) and I have this working for arge,
argemdio, spi and ath.  Hans has it working for USB.  The ath barrier
code will come in a later commit.

This gets the routing throughput up from 220mbit -> 337mbit.
I'm sure the bridging throughput will be similarly improved.

Tested:

* QCA955x SoC, routing workload.

9 years agoarge_mdio: fix barriers; correctly check MII indicator register.
adrian [Fri, 30 Oct 2015 23:59:52 +0000 (23:59 +0000)]
arge_mdio: fix barriers; correctly check MII indicator register.

* use barriers in a slightly better fashion.  You can blame this
  glass of whiskey on putting barriers in the wrong spot.  Grr adrian.

* steal/rewrite the mdio busy check from ag7100 from openwrt and
  refactor the existing code out.  This is .. more correct.

This seems to fix the boot-to-boot variation that I've been seeing
and it quietens the switch port status flapping.

Tested:

* QCA9558 SoC (AP135.)

Obtained from: Linux OpenWRT

9 years agoarge: fix barrier macro.
adrian [Fri, 30 Oct 2015 23:57:20 +0000 (23:57 +0000)]
arge: fix barrier macro.

9 years agoarge: attempt to close a transmit race by only enabling the descriptor at the end...
adrian [Fri, 30 Oct 2015 23:18:02 +0000 (23:18 +0000)]
arge: attempt to close a transmit race by only enabling the descriptor at the end of setup.

This driver and the linux ag71xx driver both treat the transmit ring
as a circular linked list of descriptors.  There's no "end" pointer
that is ever NULL - instead, it expects the MAC to hit a finished
descriptor (ARGE_DESC_EMPTY) and stop.

Now, since it's a circular buffer, we may end up with the hardware
hitting the beginning of our multi-descriptor frame before we've finished
setting it up. It then DMA's it in, starts sending it, and we finish
writing out the new descriptor.  The hardware may then write its
completion for the next descriptor out; then we do, and when we next
read it it'll show up as "not done" and transmit completion stops.

This unfortunately manifests itself as the transmit queue always
being active and a massive TX interrupt storm.  We need to actively
ACK packets back from the transmit engine and if we don't (eg because
we think the transmit isn't finished but it is) then the unit will
just keep generating interrupts.

I hit this finally with the below testing setup.  This fixed it for me.

Strictly speaking I should put in a sync in between writing out all of
the descriptors and writing out that final descriptor.

Tested:

* QCA9558 SoC (AP135 reference board) w/ arge1 + vlans acting as a
  router, and iperf -d (tcp, bidirectional traffic.)

Obtained from: Linux OpenWRT (ag71xx_main.c.)

9 years agoarge: just use 1U since it's a 32 bit unsigned destination value.
adrian [Fri, 30 Oct 2015 23:09:08 +0000 (23:09 +0000)]
arge: just use 1U since it's a 32 bit unsigned destination value.

9 years agoarge: do an explicit flush between updating the TX ring and starting transmit.
adrian [Fri, 30 Oct 2015 23:07:32 +0000 (23:07 +0000)]
arge: do an explicit flush between updating the TX ring and starting transmit.

The MIPS busdma sync operations currently are a big no-op on coherent memory.
This isn't strictly correct behaviour as we need a SYNC in here to ensure that
the writes have finished and are visible in main memory before the MMIO accesses
occur.  This will have to be addressed in a later commit.

But, before that happens, let's at least do a flush here to make things
more "correct".

This is required for even remotely sensible behaviour on mips74k with
write-through memory enabled.

9 years agoarge_mdio: add explicit read barriers for MDIO_READs.
adrian [Fri, 30 Oct 2015 23:00:47 +0000 (23:00 +0000)]
arge_mdio: add explicit read barriers for MDIO_READs.

The mips74k programmers guide notes that reads can be re-ordered, even
uncached ones, so we need an explicit SYNC between them.

Yes, this is a case of a driver author actively doing a bus barrier
operation.

This ends up being necessary when the mips74k core is run in write-back
mode rather than write-through mode.  That's coming in an upcoming
commit.

Tested:

* mips74k, QCA9558 SoC (AP135 reference board), arge<->arge interface
  routing traffic tests.

9 years agoarge: ensure there's enough space in the TX ring before attempting to
adrian [Fri, 30 Oct 2015 22:55:41 +0000 (22:55 +0000)]
arge: ensure there's enough space in the TX ring before attempting to
send frames.

This matches the other check for space.

"enough" is a misnomer, for "reasons".  The biggest reason is that
the TX ring is actually a circular linked list, with no head/tail pointers.
This is just a bit more headroom between head/tail so we have time to
schedule frames before we hit where the hardware is at.

Ideally this would be tunable and a little larger.

9 years agoarge: do a read-after-write on all arge register writes, not just MDIO writes.
adrian [Fri, 30 Oct 2015 22:53:30 +0000 (22:53 +0000)]
arge: do a read-after-write on all arge register writes, not just MDIO writes.

This flushes out the write to the system before anything continues.

The mips74k guide, chapter 3.3.3 (write gathering) notes that writes
can be buffered in FIFOs - even uncached ones - so we can't guarantee
the device has felt its effects.  Now, since we're all lazy driver
authors and don't pepper read/write barriers everywhere, fake it here.

tested:

* mips74k - QCA9558 SoC (AP135 reference board)

9 years agoRemove unneeded _RECURSING_PROGS check.
bdrewery [Fri, 30 Oct 2015 21:23:14 +0000 (21:23 +0000)]
Remove unneeded _RECURSING_PROGS check.

It is definitely not needed after r288158, and is a private variable as well
that should not be checked here.

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

9 years agoMerge OpenSSL 1.0.2d.
jkim [Fri, 30 Oct 2015 20:51:33 +0000 (20:51 +0000)]
Merge OpenSSL 1.0.2d.

9 years agoMinor (and incomplete) style cleanup.
kib [Fri, 30 Oct 2015 20:47:42 +0000 (20:47 +0000)]
Minor (and incomplete) style cleanup.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUpdate ls -l tests to use mtime, not birthtime
emaste [Fri, 30 Oct 2015 20:14:32 +0000 (20:14 +0000)]
Update ls -l tests to use mtime, not birthtime

PR: 204155
Reviewed by: ngie, rodrigc
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4040

9 years agoAlso mark compat32 umtx op table as constant.
kib [Fri, 30 Oct 2015 19:32:30 +0000 (19:32 +0000)]
Also mark compat32 umtx op table as constant.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUse C99 array initialization, which also makes the code
kib [Fri, 30 Oct 2015 19:20:40 +0000 (19:20 +0000)]
Use C99 array initialization, which also makes the code
self-documented, and eases addition of new ops.

For the similar reasons, eliminate UMTX_OP_MAX.  nitems() handles the
only use of the symbol.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoDo not FALLTHROUGH for SIOC{ADD,DEL}MULTI
sjg [Fri, 30 Oct 2015 17:12:15 +0000 (17:12 +0000)]
Do not FALLTHROUGH for SIOC{ADD,DEL}MULTI

ifmedia_ioctl() returns EINVAL

Differential Revision: 3897
Submitted by: aronen@juniper.net
Reviewed by: marcel

9 years agoNot all targets support by clang have a tested or enabled ubsan yet.
sbruno [Fri, 30 Oct 2015 17:05:52 +0000 (17:05 +0000)]
Not all targets support by clang have a tested or enabled ubsan yet.

Only enable h_raw on x86 targets for today so that a buildworld runs to
completion for clang enabled targets that are not x86.  This should be
removed when validation of the sanitizer has occured for all targets
supported by FreeBSD and clang.

9 years agonvd, nvme: report stripesize through GEOM disk layer
jimharris [Fri, 30 Oct 2015 16:35:18 +0000 (16:35 +0000)]
nvd, nvme: report stripesize through GEOM disk layer

MFC after: 3 days
Sponsored by: Intel

9 years agonvme: fix race condition in split bio completion path
jimharris [Fri, 30 Oct 2015 16:06:34 +0000 (16:06 +0000)]
nvme: fix race condition in split bio completion path

Fixes race condition observed under following circumstances:

1) I/O split on 128KB boundary with Intel NVMe controller.
   Current Intel controllers produce better latency when
   I/Os do not span a 128KB boundary - even if the I/O size
   itself is less than 128KB.
2) Per-CPU I/O queues are enabled.
3) Child I/Os are submitted on different submission queues.
4) Interrupts for child I/O completions occur almost
   simultaneously.
5) ithread for child I/O A increments bio_inbed, then
   immediately is preempted (rendezvous IPI, higher priority
   interrupt).
6) ithread for child I/O B increments bio_inbed, then completes
   parent bio since all children are now completed.
7) parent bio is freed, and immediately reallocated for a VFS
   or gpart bio (including setting bio_children to 1 and
   clearing bio_driver1).
8) ithread for child I/O A resumes processing.  bio_children
   for what it thinks is the parent bio is set to 1, so it
   thinks it needs to complete the parent bio.

Result is either calling a NULL callback function, or double freeing
the bio to its uma zone.

PR: 203746
Reported by: Drew Gallatin <gallatin@netflix.com>,
Marc Goroff <mgoroff@quorum.net>
Tested by: Drew Gallatin <gallatin@netflix.com>
MFC after: 3 days
Sponsored by: Intel

9 years agoAfter r290196, the kernel won't wait for stuff like gmirror nodes
trasz [Fri, 30 Oct 2015 15:52:10 +0000 (15:52 +0000)]
After r290196, the kernel won't wait for stuff like gmirror nodes
if they are not required for mounting rootfs.  However, it's possible
that some setups try to mount them in mountcritlocal (ie from fstab).

Export the list of current root mount holds using a new sysctl,
vfs.root_mount_hold, and make mountcritlocal retry if "mount -a" fails
and the list is not empty.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3709

9 years agoMake root mount wait mechanism smarter, by making it wait only if the root
trasz [Fri, 30 Oct 2015 15:35:04 +0000 (15:35 +0000)]
Make root mount wait mechanism smarter, by making it wait only if the root
device doesn't yet exist.

Reviewed by: kib@, marcel@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3709

9 years agoReduce the DWC OTG interrupt load by not reading all the host channel
hselasky [Fri, 30 Oct 2015 14:50:29 +0000 (14:50 +0000)]
Reduce the DWC OTG interrupt load by not reading all the host channel
status registers for every interrupt. Check a common host channel
status interrupt register first, then conditionally read the
individual host channel status registers.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 1 week

9 years agoUse PCB/LR from PCB rather from stack on armv7-gdb
zbb [Fri, 30 Oct 2015 12:37:40 +0000 (12:37 +0000)]
Use PCB/LR from PCB rather from stack on armv7-gdb

The kernel dump does not store these values on the stack.
Use PCB structure to resolve PC and LR properly.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   jhb, kib
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4013

9 years agoWorkaround KGDB issues on ARM by ignoring ARM EABI version higher than 5
zbb [Fri, 30 Oct 2015 12:21:37 +0000 (12:21 +0000)]
Workaround KGDB issues on ARM by ignoring ARM EABI version higher than 5

To make KGDB working, it needs to understand kernel ELF image.
By default it is compiled using EABI_5, which is not supported
on the gdb-6. As a workaround, treat these images as EABI_2 because
they share a lot of things in common.

This workaround does not guarantee ALL funtionalities
to work.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   jhb
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4012

9 years agol2arc: do not call trim_map_free() for blocks with zero b_asize
avg [Fri, 30 Oct 2015 12:00:34 +0000 (12:00 +0000)]
l2arc: do not call trim_map_free() for blocks with zero b_asize

b_asize can be zero if the block is compressed into an empty block
(ZIO_COMPRESS_EMPTY) and the trim code asserts that meaningless
zero-sized trimming is not attempted.
The logic for calling trim_map_free() is extracted into a new function
l2arc_trim() to minimize code duplication.

PR: 203473
Reported by: Willem Jan Withagen <wjw@digiware.nl>
Tested by: Willem Jan Withagen <wjw@digiware.nl>
MFC after: 11 days

9 years agoFix compiler warnings with open_to_operation.c
ngie [Fri, 30 Oct 2015 10:09:04 +0000 (10:09 +0000)]
Fix compiler warnings with open_to_operation.c

Other sidenotes:
- Remove unused variables with main(..)
- Convert errx/exit with -1 to errx/exit with 1
- Fix a bogus test in try_directory_open
  (expected_errno == expected_errno -> errno == expected_errno) [*]
- Fix some warnings related to discarded qualifiers
- Remove a bogus else-statement at the end of check_mmap_exec(..) in the
  successful case. mmap(2), POSIX, Linux, etc all don't state what the
  behavior is when mixing O_WRONLY + PROT_EXEC, so assume success for now to
  get the test program to pass again.

PR: 201286 [*]
MFC after: 1 week
Submitted by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

9 years agoThe prefix for CLFLUSHOPT is 0x66. It was right on amd64.
kib [Fri, 30 Oct 2015 09:53:33 +0000 (09:53 +0000)]
The prefix for CLFLUSHOPT is 0x66.  It was right on amd64.

Sponsored by: The FreeBSD Foundation

9 years agoMake truss work for CloudABI processes on aarch64.
ed [Fri, 30 Oct 2015 08:11:37 +0000 (08:11 +0000)]
Make truss work for CloudABI processes on aarch64.

This change copies over amd64-cloudabi64.c to aarch64-cloudabi.c and
adjusts it to fetch the proper registers on aarch64. To reduce the
amount of shared code, the errno conversion function is moved into a
separate source file.

Reviewed by: jhb, andrew
Differential Revision: https://reviews.freebsd.org/D4023

9 years agoDisable h_raw/h_read with gcc
ngie [Fri, 30 Oct 2015 08:06:24 +0000 (08:06 +0000)]
Disable h_raw/h_read with gcc

I forgot that these testcases fail with gcc 4.2.1; add a note to that effect

MFC after: never
Sponsored by: EMC / Isilon Storage Division

9 years agoFix a set but not used variable warning flagged by gcc 4.9 with
ngie [Fri, 30 Oct 2015 08:01:53 +0000 (08:01 +0000)]
Fix a set but not used variable warning flagged by gcc 4.9 with
lib/libc/ssp/h_readlink

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years ago- Re-enable h_raw with clang 3.7.0+
ngie [Fri, 30 Oct 2015 07:48:03 +0000 (07:48 +0000)]
- Re-enable h_raw with clang 3.7.0+
- Fix the compiler check to allow the test to be compiled for gcc

PR: 196430
MFC after: never
Sponsored by: EMC / Isilon Storage Division

9 years agoFix rtsold's usage message
ngie [Fri, 30 Oct 2015 07:36:43 +0000 (07:36 +0000)]
Fix rtsold's usage message

- Remove -a from the usage message example dealing with specific
  interfaces. -a only makes sense when not specifying an interface,
  such that it's to be run on all interfaces
- Fix the pidfile option (it's -p, not -P)
- Change `interfaces` to `interface` to match the manpage

MFC after: 3 days
PR: 173744
Sponsored by: EMC / Isilon Storage Division

9 years agoUnbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the
ngie [Fri, 30 Oct 2015 06:07:41 +0000 (06:07 +0000)]
Unbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the
"one of many" targets, e.g. `make hello_world`, where hello_world is a C
program

Tested with: PROGS and PROGS_CXX
MFC after: 1 week
X-MFC with: r289289
Sponsored by: EMC / Isilon Storage Division

9 years agoFollow up to roundup feature addition in r289203
ngie [Fri, 30 Oct 2015 05:55:56 +0000 (05:55 +0000)]
Follow up to roundup feature addition in r289203

- Rename -r to -R to avoid the clash with makefs -r in NetBSD
- Note that -R is an FFS-specific option because it's not implemented
  in cd9660 today
- Rename the roundup variable to "roundup-size" in the manpage and help
  text for consistency with other variables.
- Bump .Dd (missed in r289203)

PR: 203707
MFC after: 1 week
X-MFC with: r289203
Differential Revision: https://reviews.freebsd.org/D3959
Reviewed by: adrian (earlier patch), emaste
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning
ngie [Fri, 30 Oct 2015 05:50:05 +0000 (05:50 +0000)]
Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning

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

9 years agoFix GOST engine cipher linkage by adding e_gost_err.c to SRCS so it
ngie [Fri, 30 Oct 2015 05:33:38 +0000 (05:33 +0000)]
Fix GOST engine cipher linkage by adding e_gost_err.c to SRCS so it
picks up undefined symbols, like "ERR_load_GOST_strings"

MFC after: 3 days
PR: 184805
Submitted by: Ivan IvanZhdanov <ivan.zhdanov@gmail.com>
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
ngie [Fri, 30 Oct 2015 03:28:00 +0000 (03:28 +0000)]
Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
as lib/libc/rpc

This testcase requires rpcbind be up in running; otherwise the testcases
will time out and be skipped

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

9 years agoFix BULK read transfer if destination buffer is not cache line-aligned.
gonzo [Fri, 30 Oct 2015 01:19:04 +0000 (01:19 +0000)]
Fix BULK read transfer if destination buffer is not cache line-aligned.

We can't use copyout because destination memory is userland address
in another process but we have reference to respective page so map
the page into kernel address space and copy fragments there

9 years agocxgbe/tom: decide whether to shove segments or not only if there is
np [Fri, 30 Oct 2015 01:18:07 +0000 (01:18 +0000)]
cxgbe/tom: decide whether to shove segments or not only if there is
payload to transmit.

MFC after: 1 week

9 years agoIn pw_userlock, set 'name' to NULL when we encounter an all number string
delphij [Fri, 30 Oct 2015 00:46:52 +0000 (00:46 +0000)]
In pw_userlock, set 'name' to NULL when we encounter an all number string
because it is also used as an indicator of whether a name or an UID is
being used and we may have undefined results as 'name' may contain
uninitialized stack contents.

MFC after: 2 weeks

9 years agoUse strlcpy().
delphij [Fri, 30 Oct 2015 00:33:03 +0000 (00:33 +0000)]
Use strlcpy().

MFC after: 2 weeks

9 years agoFix framebuffer compatibility with new RPi firmware. Framebuffer driver
gonzo [Fri, 30 Oct 2015 00:24:37 +0000 (00:24 +0000)]
Fix framebuffer compatibility with new RPi firmware. Framebuffer driver
receives video memory address from VideoCore through property mailbox
channel. Older versions of firmware (and the one that is currently part
of sysutils/u-boot-rpi and sysutils/u-boot-rpi2) returned real physical
address, newer one returns VideoCore bus address, so we need to convert
it to actual physical address. this version works with both older and
newer interface.

9 years agoRemove unneeded NULL as this is initialized with M_ZERO.
bdrewery [Thu, 29 Oct 2015 23:56:34 +0000 (23:56 +0000)]
Remove unneeded NULL as this is initialized with M_ZERO.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoUse memmove(3) to avoid overlapping copy.
bdrewery [Thu, 29 Oct 2015 23:06:33 +0000 (23:06 +0000)]
Use memmove(3) to avoid overlapping copy.

Reported by: valgrind
MFC after: 2 weeks
X-MFC-With: r290168

9 years agoFix several memory leaks, and crashes, in iconvlist(3).
bdrewery [Thu, 29 Oct 2015 23:02:34 +0000 (23:02 +0000)]
Fix several memory leaks, and crashes, in iconvlist(3).

- Both curitem and curitem (via the names list) was always leaked.
- malloc(3) failures lead to some leaks.
- __bsd___iconv_get_list() failure lead to a crash since its error was not
  handles and __bsd___iconv_free_list() is not NULL-safe.

I have slightly refactored this to avoid extra malloc and free logic in cases
of malloc(3) failing.

There are still bad assumptions here that I did not deal with.  One of which is
that the data will always have a '/' so the strchr(3) will not return NULL.

Coverity CID: 1130055 1130054 1130053

9 years agoFix LEAVE_HYP macro: spsr is not guaranteed to contain valid value at this
gonzo [Thu, 29 Oct 2015 22:12:03 +0000 (22:12 +0000)]
Fix LEAVE_HYP macro: spsr is not guaranteed to contain valid value at this
point, e.g. on RaspberryPi 2 when control is passed from loader to kernel
it contains garbage. So we use cpsr as a base for new cpsr value: if we
have reached this point it means current value is OK

Reviewed by: andrew

9 years agoInstall myself as src committer.
skra [Thu, 29 Oct 2015 21:40:32 +0000 (21:40 +0000)]
Install myself as src committer.

Approved by: kib (mentor)

9 years agoSet the proper direction to check for policies in this one case.
gnn [Thu, 29 Oct 2015 21:26:32 +0000 (21:26 +0000)]
Set the proper direction to check for policies in this one case.

Pointed out by: eri
Sponsored by: Rubicon Communications (Netgate)

9 years agoUse movw instead of movl (or plain mov) when moving segment registers
jhb [Thu, 29 Oct 2015 21:25:46 +0000 (21:25 +0000)]
Use movw instead of movl (or plain mov) when moving segment registers
into memory.  This is a nop on clang's assembler, but some assemblers
complain if the size suffix is incorrect.

Submitted by: bde

9 years agoIgnore per-mdN settings in mdconfig[2] startup
dteske [Thu, 29 Oct 2015 21:12:57 +0000 (21:12 +0000)]
Ignore per-mdN settings in mdconfig[2] startup

PR: base/189696
Submitted by: ganael.laplanche@martymac.org
MFC after: 3 days
X-MFC-to: stable/10 stable/9

9 years agoAdd myself (jtl) and my mentor to the committers-src.dot file.
jtl [Thu, 29 Oct 2015 21:00:11 +0000 (21:00 +0000)]
Add myself (jtl) and my mentor to the committers-src.dot file.

Approved by: gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D4029

9 years agopf: Fix IPv6 checksums with route-to.
kp [Thu, 29 Oct 2015 20:45:53 +0000 (20:45 +0000)]
pf: Fix IPv6 checksums with route-to.

When using route-to (or reply-to) pf sends the packet directly to the output
interface. If that interface doesn't support checksum offloading the checksum
has to be calculated in software.
That was already done in the IPv4 case, but not for the IPv6 case. As a result
we'd emit packets with pseudo-header checksums (i.e. incorrect checksums).

This issue was exposed by the changes in r289316 when pf stopped performing full
checksum calculations for all packets.

Submitted by: Luoqi Chen
MFC after: 1 week

9 years agoRemove some unneeded code.
mav [Thu, 29 Oct 2015 20:43:13 +0000 (20:43 +0000)]
Remove some unneeded code.

9 years agoRemove reset delays for which I see neither explanation nor need.
mav [Thu, 29 Oct 2015 20:34:01 +0000 (20:34 +0000)]
Remove reset delays for which I see neither explanation nor need.

9 years agontb: Revert r290130 now that r290156 has landed
cem [Thu, 29 Oct 2015 19:35:01 +0000 (19:35 +0000)]
ntb: Revert r290130 now that r290156 has landed

Nagged by: vangyzen
Sponsored by: EMC / Isilon Storage Division

9 years agoCheck archive_entry_new() result.
bdrewery [Thu, 29 Oct 2015 19:28:21 +0000 (19:28 +0000)]
Check archive_entry_new() result.

Coverity CID: 1331341

9 years agopmap_change_attr: Only fixup DMAP for DMAPed ranges
cem [Thu, 29 Oct 2015 19:07:00 +0000 (19:07 +0000)]
pmap_change_attr: Only fixup DMAP for DMAPed ranges

pmap_change_attr must change the memory type of both the requested KVA
and the corresponding DMAP mappings (if such mappings exist), to satisfy
an Intel requirement that two or more mappings to the same physical
pages must have the same memory type.

However, not all kernel mapped pages have corresponding DMAP mappings --
for example, 64-bit BARs.  Skip fixing up the DMAP for out-of-bounds
addresses.

Submitted by: Steve Wahl <steve_wahl@dell.com>
Reviewed by: alc, jhb
Sponsored by: Dell Compellent
Differential Revision: https://reviews.freebsd.org/D4030

9 years agogetnewbuf: Initialize bp to avoid uninitialized pointer dereference and brelse().
bdrewery [Thu, 29 Oct 2015 19:02:24 +0000 (19:02 +0000)]
getnewbuf: Initialize bp to avoid uninitialized pointer dereference and brelse().

This came in recently in r289279.

Coverity CID: 1331561

9 years agoAvoid passing an uninitialized 'i'. Currently nothing was depending on it
bdrewery [Thu, 29 Oct 2015 18:58:18 +0000 (18:58 +0000)]
Avoid passing an uninitialized 'i'.  Currently nothing was depending on it
anyhow.

Coverity CID: 1331562

9 years agoFix unlikely memory leak.
bdrewery [Thu, 29 Oct 2015 18:29:28 +0000 (18:29 +0000)]
Fix unlikely memory leak.

It is unlikely since the first check in the function is that dir[0] is '/',
but later code changes may make it real.

Coverity CID: 1332104

9 years agoPC Card and Cardbus are now in extended maintenance mode. No need to
imp [Thu, 29 Oct 2015 16:50:28 +0000 (16:50 +0000)]
PC Card and Cardbus are now in extended maintenance mode. No need to
have them cluttering up MAINTAINERS.

9 years agoFix and improve error masking and reporting.
mav [Thu, 29 Oct 2015 16:48:12 +0000 (16:48 +0000)]
Fix and improve error masking and reporting.

9 years agoUpdate for LINUX32 rename. The assembler didn't complain about undefined
jhb [Thu, 29 Oct 2015 15:20:47 +0000 (15:20 +0000)]
Update for LINUX32 rename.  The assembler didn't complain about undefined
symbols but just used 0 after the rename.

9 years agoFix build with DEBUG defined.
jhb [Thu, 29 Oct 2015 15:16:47 +0000 (15:16 +0000)]
Fix build with DEBUG defined.

Reported by: hselasky

9 years agoAdd missing NULL check in physio().
hselasky [Thu, 29 Oct 2015 13:53:37 +0000 (13:53 +0000)]
Add missing NULL check in physio().

When destroying a character device the si_devsw field is set to NULL
before all references are gone, to indicate the character device is
going away. This can cause a NULL-dereference fault inside physio().

The callers of physio() should own a thread reference on the cdev and
if si_devsw is seen as non-NULL, it is usable during the execution of
the function. Else an ENXIO error code is returned.

Reviewed by: kib
MFC after: 2 weeks

9 years agoSome minor additions to r290138,
mav [Thu, 29 Oct 2015 10:31:44 +0000 (10:31 +0000)]
Some minor additions to r290138,

9 years agoSome updates to isp(4) manual page.
mav [Thu, 29 Oct 2015 09:50:48 +0000 (09:50 +0000)]
Some updates to isp(4) manual page.

9 years agoAdd myself to MAINTAINERS.
hselasky [Thu, 29 Oct 2015 08:45:56 +0000 (08:45 +0000)]
Add myself to MAINTAINERS.

9 years agoFinish process of moving the LinuxKPI module into the default kernel build.
hselasky [Thu, 29 Oct 2015 08:28:39 +0000 (08:28 +0000)]
Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
  its subfolders.
- Update sys/conf/files and some Makefiles to use new file locations.
- Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn
  adds the LinuxKPI to all LINT builds.
- The LinuxKPI can be added to the kernel by setting the
  COMPAT_LINUXKPI option. The OFED kernel option no longer builds the
  LinuxKPI into the kernel. This was done to keep the build rules for
  the LinuxKPI in sys/conf/files simple.
- Extend the LinuxKPI module to include support for USB by moving the
  Linux USB compat from usb.ko to linuxkpi.ko.
- Bump the FreeBSD_version.
- A universe kernel build has been done.

Reviewed by: np @ (cxgb and cxgbe related changes only)
Sponsored by: Mellanox Technologies

9 years agoRemove the static function declaration.
kevlo [Thu, 29 Oct 2015 04:51:27 +0000 (04:51 +0000)]
Remove the static function declaration.

9 years ago- Add a missing prototype
kevlo [Thu, 29 Oct 2015 04:21:34 +0000 (04:21 +0000)]
- Add a missing prototype
- Fix typos

9 years agoioat_test: Handled forced hardware resets gracefully
cem [Thu, 29 Oct 2015 04:16:52 +0000 (04:16 +0000)]
ioat_test: Handled forced hardware resets gracefully

Sponsored by: EMC / Isilon Storage Division

9 years agoioat: Drain/quiesce the device less racily
cem [Thu, 29 Oct 2015 04:16:39 +0000 (04:16 +0000)]
ioat: Drain/quiesce the device less racily

On detach and during a forced HW reset.

Sponsored by: EMC / Isilon Storage Division

9 years agontb: Do not attempt to set write-combining on MWs
cem [Thu, 29 Oct 2015 04:16:28 +0000 (04:16 +0000)]
ntb: Do not attempt to set write-combining on MWs

AMD64 pmap assumes ranges will be in the DMAP, which isn't necessarily
true for NTB memory windows (especially 64-bit BARs).

Suggested by: pmap_change_attr_locked -> kassert_panic
Sponsored by: EMC / Isilon Storage Division

9 years agoioatcontrol(8): Add and document "raw" testing mode
cem [Thu, 29 Oct 2015 04:16:16 +0000 (04:16 +0000)]
ioatcontrol(8): Add and document "raw" testing mode

Allows DMA from/to arbitrary KVA or physical address.  /dev/ioat_test
must be enabled by root and is only R/W root, so this is approximately
as dangerous as /dev/mem and /dev/kmem.

Sponsored by: EMC / Isilon Storage Division

9 years agoAdd MLINKS for if_otus(4), if_rsu(4) and if_urtwn(4).
kevlo [Thu, 29 Oct 2015 03:28:28 +0000 (03:28 +0000)]
Add MLINKS for if_otus(4), if_rsu(4) and if_urtwn(4).

9 years agoXref otus(4).
kevlo [Thu, 29 Oct 2015 03:22:27 +0000 (03:22 +0000)]
Xref otus(4).