Commit Graph

205353 Commits

Author SHA1 Message Date
Andrey V. Elsukov
5dc5a0e0aa Implement ipfw internal olist command to list named objects.
Reviewed by:	melifaro
Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2015-11-03 10:21:53 +00:00
Andrey A. Chernov
8f94ce2876 Use meaningful errno for ssize_t overflow in read().
Catch size_t overflow in malloc().

PR:     204230
MFC after:      1 week
2015-11-03 09:50:10 +00:00
Hans Petter Selasky
94bceb529a Revert r290327. The compiler warnings seems to be specific to clang v3.5 only. 2015-11-03 09:38:39 +00:00
Hans Petter Selasky
b4f0cda47b Fix some clang compile warnings.
MFC after:	1 week
2015-11-03 08:52:06 +00:00
Hans Petter Selasky
a2aa9bebf1 Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising
allocation of DMA bounce buffers.

Discussed with:	ian @
MFC after:	3 weeks
2015-11-03 08:42:43 +00:00
Oleksandr Tymoshenko
ff4cdb1595 Fix cache issues with bulk transfers
- Use pmap_quick_enter_page/pmap_quick_remove_page to bounce non-cacheline
    aligned head and tail fragments
- Switch from static fragment size to configurable one, newer firmware
    passes cache line size as cache_line_size DTB parameter.

With these changes both RPi and RPi2 pass functinal part of vchiq_test
2015-11-03 05:25:06 +00:00
Oleksandr Tymoshenko
686ec1cbb0 Raspberry Pi firmware passes cache line size as a DTB parameter
- Add cache-line-size paramter to vchiq node
- Add cache_line_size DTB parameter referencing to
    .../vchiq/cache-line-size property
2015-11-03 04:50:58 +00:00
Mark Johnston
e8e0fac552 Have elf_lookup() return an error if the specified non-weak symbol could
not be found. Otherwise, relocations against such symbols will be silently
ignored instead of causing an error to be raised.

Reviewed by:	kib
MFC after:	1 week
2015-11-03 03:29:35 +00:00
Justin Hibbits
5f4d46e2ac Use 64-bit addresses for configuring inbound and outbound address windows.
This allows using the full host and PCI ranges in the controller configuration.
2015-11-03 00:54:14 +00:00
Hiroki Sato
c56e91b345 sdl->sdl_len in sockaddr_dl can be longer than
sizeof(struct sockaddr_dl).
2015-11-03 00:46:06 +00:00
Justin Hibbits
a096257482 Use the correct space (PCI addresses) for the I/O and memory ranges.
PCIR_IOBASE/IOLIMIT/... all use PCI-space addresses, not host addresses.
2015-11-03 00:21:23 +00:00
Ian Lepore
53f93ed3ff Fix an alignment check that is wrong in half the busdma implementations.
This will enable the elimination of a workaround in the USB driver that
artifically allocates buffers twice as big as they need to be (which
actually saves memory for very small buffers on the buggy platforms).

When deciding how to allocate a dma buffer, armv4, armv6, mips, and
x86/iommu all correctly check for the tag alignment <= maxsize as enabling
simple uma/malloc based allocation.  Powerpc, sparc64, x86/bounce, and
arm64/bounce were all checking for alignment < maxsize; on those platforms
when alignment was equal to the max size it would fall back to page-based
allocators even for very small buffers.

This change makes all platforms use the <= check.  It should be noted that
on all platforms other than arm[v6] and mips, this check is relying on
undocumented behavior in malloc(9) that if you allocate a block of a given
size it will be aligned to the next larger power-of-2 boundary.  There is
nothing in the malloc(9) man page that makes that explicit promise (but the
busdma code has been relying on this behavior all along so I guess it works).

Arm and mips code uses the allocator in kern/subr_busdma_buffalloc.c, which
does explicitly implement this promise about size and alignment.  Other
platforms probably should switch to the aligned allocator.
2015-11-02 23:37:19 +00:00
Ian Lepore
0c1daec859 Eliminate the last dregs of the old global arm_root_dma_tag.
In the old days, device drivers passed NULL for the parent tag when creating
a new tag, and on arm platforms that resulted in a global tag representing
overall platform constraints being substituted in the busdma code.  Now all
drivers use bus_get_dma_tag() and if there is a need to represent overall
platform constraints they will be inherited from a tag supplied by nexus or
some bus driver in the hierarchy.

The only arm platforms still relying on the old global-tag scheme were some
xscale boards with special PCI-bus constraints.  This change provides those
constraints through a tag supplied by the xscale PCI bus driver, and
eliminates the few remaining references to the old global var.

Reviewed by:	cognet
2015-11-02 22:49:39 +00:00
Brooks Davis
942505ca1c The ops EL_SIGNAL, EL_EDITMODE, EL_UNBUFFERED, and EL_PREP_TERM all take
an int, not an int*.

Sponsored by:	DARPA, AFRL
Discovered with:	CHERI
Differential Revision:	https://reviews.freebsd.org/D4071
2015-11-02 22:21:02 +00:00
Randall Stewart
d1a6f62c45 Fix three flowtable bugs, a) one lookup issue, b) a two cleaner issue.
MFC after:	3 days
Sponsored by: Netflix Inc.
Differential Revision:	https://reviews.freebsd.org/D4014
2015-11-02 21:21:00 +00:00
Devin Teske
9d9cc24662 Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi) 2015-11-02 20:03:59 +00:00
Zbigniew Bodek
232e189a56 Add support for branch instruction on armv7 with ptrace single step
Previous code supported only "continuous" code without any kind of
branch instructions. To change that, new function was implemented
which parses current instruction and returns an addres where
the jump might happen (alternative addr).
mdthread structure was extended to support two breakpoints
(one directly below current instruction and the second placed
at the alternative location).
One of them must trigger regardless the instruction has or has not been
executed due to condition field.
Upon cleanup, both software breakpoints are removed.

This implementation parses only the most common instructions
that are present in the code (like 99.99% of all), but there
is a chance there are some left, not covered by the parsing routine.
Parsing is done only for 32-bit instruction, no Thumb nor Thumb-2
support is provided.

Reviewed by:   kib
Submitted by:  Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4021
2015-11-02 16:56:34 +00:00
Andrew Turner
deeaa1c566 Make the arm64_cpu driver quiet as it adds no new information.
Only report the register used to start each cpu in bootverbose.

Sponsored by:	ABT Systems Ltd
2015-11-02 16:43:26 +00:00
Enji Cooper
126b73dd8b Add testcases for -t ffs -o version=[12]
Verify the filesystem type using dumpfs. Add preliminary support
for NetBSD (needs to be validated)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-02 11:06:51 +00:00
Enji Cooper
fc062a4bd7 Sync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap with
src/sys/ufs/ffs/ffs_bswap.c@1.39

Obtained from: NetBSD
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-02 10:09:09 +00:00
Enji Cooper
c213f0dbec Clean up mtree keyword support a slight bit and add a few more default keywords
- Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS
- Test with the extra mtree keywords, `mode,gid,uid`.
- Add a note about mtrees with time support not working with makefs right now

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-02 10:08:00 +00:00
Andriy Gapon
c34d46ff59 zfs: allow the lookup of extended attributes of an unlinked file
That's required for extattr_get_fd(2) and the like to work properly.

PR:		203201
MFC after:	17 days
2015-11-02 10:07:21 +00:00
Enji Cooper
10bd272504 Add testcases for -t cd9660 -o isolevel=[1-3]
-- -o isolevel=1 currently fails because of path comparison issues,
   so mark it as an expected failure.
-- -o isolevel=3 is not implemented, so expect it to fail as an out
   of bounds value [*].

PR: 203645
MFC after: 1 week
X-MFC with: r290264
Sponsored by: EMC / Isilon Storage Division
2015-11-02 09:16:51 +00:00
Enji Cooper
bc06965ace Limit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 by
dereferencing a NULL function pointer

Add some asserts to ensure that isolevel is always either 1 or 2.

PR: 203645
Reported by: Thomas Schmitt <scdbackup@gmx.net>
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-02 08:43:15 +00:00
Enji Cooper
eac300b82d Fix spelling of isolevel cd9660 option
MFC after: 1 week
X-MFC with: r290260
Sponsored by: EMC / Isilon Storage Division
2015-11-02 07:46:47 +00:00
Enji Cooper
3d765991ed Bump .Dd for r290259 and r290260 2015-11-02 07:42:42 +00:00
Enji Cooper
6dbfd3d67c Document undocumented long options for -t cd9660
Note which options have been implemented and which options haven't
been implemented

Submitted as the following NetBSD PRs: bin/50390 and bin/50392

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-02 07:40:18 +00:00
Enji Cooper
93c2e8006a Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53
Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and
options have been omitted.

MFC after: 1 week
Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division
2015-11-02 07:36:42 +00:00
Adrian Chadd
d24766cc51 mips: rate limit the trap handler output; add pid/tid/program name.
I discovered that we're logging each trap, which gets pretty spendy;
and there wasn't any further information on the pid/tid/progname involved.

I originally noticed this because I don't attach anything to /dev/log and so
the log() output stays going to the kernel.  That's an oops on my part, but
I'm glad I did it.

This commit adds the following:

* a rate limiter, which could do with some eyeballs/ideas on how to
  make it more predictable on SMP;
* log pid, tid, progname (comm) as part of the output.

I now get output like this:

Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a10055
Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a10051
Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a1004d
Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401159
Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401155
Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401151

.. which makes it much easier to start figuring out what/where to fix.

The pc looks suss (it looks like it's in kernel space); I'll dig into that one next.

Tested:

* AR9331 SoC (Carambola2)
2015-11-02 03:36:15 +00:00
Enji Cooper
aaca704590 Define fhard in pps_event(..) only when PPS_SYNC is defined to mute
an -Wunused-but-set-variable warning

Reported by: FreeBSD_HEAD_amd64_gcc4.9 jenkins job
Sponsored by: EMC / Isilon Storage Division
2015-11-02 03:14:37 +00:00
Enji Cooper
9a12e28212 Define compress in __elfN(coredump) when #ifdef GZIO is true to mute
an -Wunused-but-set-variable warning

Reported by: FreeBSD_HEAD_amd64_gcc4.9 jenkins job
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:47:26 +00:00
Enji Cooper
c5a5e42ca1 Add _test suffix to multiple tests in lib/libc to conform to the design noted
in the FreeBSD Test Suite wiki

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:29:01 +00:00
Enji Cooper
7f9f802421 Remove unused variable (SRCDIR)
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:23:04 +00:00
Enji Cooper
c7f7fdd28b Remove unnecessary if (x) tests before calling free(x); free(3)
already employs this check

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:22:06 +00:00
Enji Cooper
2a923f8f3c Rename etc/periodic/daily/430.status-rwho to periodic/daily/430.status-uptime
The command was checking local/remote system uptime, so rename the script to
match its function and to avoid confusion

The controlling variable in /etc/periodic.conf has been renamed from
daily_status_rwho_enable to daily_status_uptime_enable.

MFC after: 3 days
Reported by: Peter Jeremy <peter@rulingia.com>
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
2015-11-02 01:05:34 +00:00
Enji Cooper
0c646040e8 Use nitems(x) instead of sizeof(x)/sizeof(x[0])
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-02 00:42:31 +00:00
Enji Cooper
55972acf7f 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
2015-11-02 00:39:28 +00:00
Oleksandr Tymoshenko
85645c5669 Add mailbox tag/structure for touchscreen buffer address property 2015-11-01 23:50:07 +00:00
Oleksandr Tymoshenko
a0b8746173 Synchronize with latest upstream VCHI code:
- Add LIB_VERSION ioctl
- Add CLOSE_DELIVERED ioctl
- Bump code version

Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5
2015-11-01 22:17:39 +00:00
Jilles Tjoelker
046bfe5240 sh: Avoid copying argv for simple commands.
Add dummy entries before and after so arglist's array is directly usable as
argv.
2015-11-01 22:07:40 +00:00
Oleksandr Tymoshenko
0265aa0a15 Treat synchronous VFP exception just like aynchronous: as an FP exception,
not as illegal instruction
2015-11-01 21:59:56 +00:00
Alexander V. Chernikov
bb3d23fd35 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
2015-11-01 19:59:04 +00:00
Jean-Sébastien Pédron
1db7984861 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
2015-11-01 19:55:32 +00:00
Kristof Provost
3e768368d0 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
2015-11-01 17:20:17 +00:00
Michal Meloun
11113be653 Install myself as src committer.
Approved by:	kib (mentor)
2015-11-01 16:54:55 +00:00
Andrey A. Chernov
190d73a757 Microoptimize. 2015-11-01 08:40:15 +00:00
Andrey A. Chernov
4fe4a788af Addition to prev. commit.
In some edge cases fp->_p can be changed in _sseek(), recalculate.

PR:     204156
MFC after:      1 week
2015-11-01 06:47:05 +00:00
Andrey A. Chernov
ec6cd152cb Don't seek to the end if write buffer is empty (in append modes).
PR:             204156
MFC after:      1 week
2015-11-01 06:15:14 +00:00
Conrad Meyer
faefad9c12 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
2015-10-31 20:38:06 +00:00
Jean-Sébastien Pédron
25a984748c 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
2015-10-31 15:09:31 +00:00