Commit Graph

270205 Commits

Author SHA1 Message Date
nat 40dc704098 Fix off by one in sbc encoder. Test mode transmission and reception
works again.

XXX pullup -8 and -9.
2019-09-21 00:01:33 +00:00
sevan 69d856e495 Use Pa macro for path
new sentence, new line
2019-09-20 22:47:36 +00:00
brad 5aa9b9d41e Add a copyright to the man page and a bit of history. 2019-09-20 22:38:28 +00:00
macallan 113f933e5a don't enable NAP mode on 7450 CPUs - my Quicksilver has two of those and we
hang hard shortly after boot with NAP enabled, even on UP kernels
2019-09-20 21:27:29 +00:00
macallan 9927696972 various minor fixes and updates:
- add (very) basic ONYX support. Treat as 16bit codec with software volume
  control. Makes basic audio work on PCIe G5
- correctly detect TAS3001 without 'compatible' property, now this works on
  Quicksilver
- mute line input on TAS3001 - it's unconnected on Quicksilver and causes noise
- make more of an effort to match codecs to i2sbus instances, needed on G5 and
  some other models with software 'modems'
2019-09-20 21:24:34 +00:00
macallan 1200baa95c identify TAS3001 from i2c address if there is no 'compatible' property 2019-09-20 17:25:11 +00:00
kamil db47bebf8c Avoid signed integer overflow when convering linux timeval to timespec
Linux accepts garbage as timeout and attempts to set it to something
meaningful. Instead of checking for valid ranges of usec, just convert
the type safely, regardless of what is inside it.
2019-09-20 15:25:19 +00:00
kamil a13c9853a0 Validate usec ranges in netbsd32___select50()
Later in the code selcommon() checks for proper timespec, check only
correct usec of timeval before type conversions.
2019-09-20 15:16:41 +00:00
kamil 5404b7cfbe Validate usec ranges in compat_50_netbsd32_select()
Later in the code selcommon() checks for proper timespec, check only
correct usec of timeval before type conversions.
2019-09-20 15:09:07 +00:00
kamil 68ab6f5a50 Validate usec ranges in compat_50_sys_select()
Later in the code selcommon() checks for proper timespec, check only
correct usec of timeval before type conversions.
2019-09-20 15:05:22 +00:00
kamil 0af3675487 Validate usec ranges in sys___select50()
Later in the code selcommon() checks for proper timespec, check only
correct usec of timeval before type conversions.
2019-09-20 15:00:47 +00:00
kamil a5df2084c7 Decorate in6_clearscope() with __noubsan
sys/netinet6/scope6.c:480:6,
member access within misaligned address 0xffff9457bc441286 for type
'struct in6_addr' which requires 4 byte alignment

This issue is caused by accessing non-__packed struct in __packed.
This is a[always?] false-positive reported by the sanitizer and there is no
clear non-invasive approach to handle this, without changing ABI of long
term existing code.

Reported-by: syzbot+b53a9bcf030288081e65@syzkaller.appspotmail.com
2019-09-20 14:53:24 +00:00
christos 0cbecf0304 declare printflike functions and fix another printf format.
also change 0x%x -> %#x.
2019-09-20 14:20:45 +00:00
kamil 8978d4e527 Validate usec ranges in settimeofday1() 2019-09-20 14:12:57 +00:00
wiz d83135eb3e file system police. Fix typo. Fix macro use. 2019-09-20 13:43:47 +00:00
wiz d465c255f1 Fix date, add comma in enumeration. 2019-09-20 13:42:24 +00:00
maxv b0bea7daa3 Add ifdefs to eliminate false positives on lgtm, same as coverity. 2019-09-20 13:38:00 +00:00
kamil 43bc9355ea Validate usec ranges in do_sys_utimes()
sys/kern/vfs_syscalls.c:3939:4, signed integer overflow: 503923632 * 1000 cannot be represented in type 'int'

Reported-by: syzbot+4cfc86ffd30e8678f68d@syzkaller.appspotmail.com
2019-09-20 13:29:31 +00:00
kamil c6a1b98ca3 Switch CTASSERT() to DRMCTASSERT() in two i915 functions
Fixes build with disabled optimization.
2019-09-20 12:41:33 +00:00
kamil 056181f36e Define DRMCTASSERT() for Compile-Time DRMKMS asserts
Switch CTASSERT() to DRMCTASSERT() in BUILD_BUG_ON().

This fixes build issues with disabled compieler optimization.
2019-09-20 12:40:23 +00:00
maxv 9baf3ad469 Don't use the same iterator in a nested loop. (How could this work?)
Found by the lgtm bot.
2019-09-20 11:29:47 +00:00
maxv 0fd1f118ce Fix programming mistake: 'paddrp' is a pointer given as argument, setting
it to NULL in the called function does not set it to NULL in the caller.

Actually, the callers of these functions do not do anything with the
special error handling, so drop the unused checks and the NULL assignments
altogether.

Found by the lgtm bot.
2019-09-20 11:09:43 +00:00
kamil 3c422b7321 Adapt DRMKMS BUILD_BUG_ON_MSG() to static_assert semantics
static_assert is violated with runtime-only compiler semantics in a few
places. Instead of breaking the build, stop asserting these corner cases.
2019-09-20 10:54:07 +00:00
mrg fe950ae3d5 add mos(4) driver for Moschip MCS7730/MCS7830/MCS7832 usb ethernet.
ported from openbsd.  usbnet version loses about 40% of code.
2019-09-20 10:34:54 +00:00
msaitoh 1fb2ebe00b Print some DPC register values not with %04x but with %08x because those
are 32bit.
2019-09-20 10:04:45 +00:00
msaitoh ea1c6b6ac3 - Make ixv_set_multi() work correctly (especially for PROMISC) when the
function is called from if_init().
- If a multicast entry has range, use ALLMULTI like others.
- Remove ixv_set_promisc() and use ixv_set_multi(). And then, rename
  *_set_multi() to *_set_rxfilter(). Same as ixgbe.c.
- The promisc mode can't be enabled if the PF is not in promisc mode.
  Identify that state and report it as "the PF may not in promisc mode"
  (though it might not be perfect).
2019-09-20 09:28:37 +00:00
maxv 57c391ee59 Fix argument.
Found by the lgtm bot.
2019-09-20 09:07:35 +00:00
maxv f550fb4d04 Fix direction of the loop.
Found by the lgtm bot.
2019-09-20 08:58:25 +00:00
maxv 95f465b563 Use M_BUFADDR. 2019-09-20 08:48:55 +00:00
maxv 7d15e3a325 dedup 2019-09-20 08:45:29 +00:00
ryo eead4d4df0 ref/mod bit should be set according to 'flags' argument, not 'prot'. r1.44 was incomplete. 2019-09-20 05:35:27 +00:00
nonaka 0c2fac9c70 Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().
A new completion queue entry check incorrectly determined that there was
a Completion Queue entry for a command that was not submitted.

Fix PR kern/54275, PR kern/54503, PR kern/54532.
2019-09-20 05:32:42 +00:00
riastradh 67c16d2af5 Use an explicit run-time assertion where compile-time doesn't work. 2019-09-19 18:29:55 +00:00
msaitoh b3ef55ebd2 - ICPLUS -> xxICPLUS
- Print model name if it's ICPLUS IP101 to avoid "Realtek internal PHY".
2019-09-19 14:41:28 +00:00
msaitoh 2a7db5f08c Regen. 2019-09-19 14:39:08 +00:00
msaitoh 869418700f Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3) 2019-09-19 14:38:45 +00:00
riastradh 1557be4823 Use CTASSERT where possible, run-time assertion where not.
Should fix negative-length variable-length array found by kamil.
2019-09-19 14:34:59 +00:00
blymn e275f7f7db Rototill to add complex character support:
- Add cchar command to director test language to allow a complex character
  to be defined and passed to the slave.
- Removed the distinction between args and returns internally to prevent
  confusing the two which leads to errors and/or crashes.
- Converted mutt_test to use the new cchar definition and fixed the
  check files for the test.
2019-09-19 11:31:57 +00:00
knakahara 1702069957 l2tp(4): avoid having struct ifqueue directly in a percpu storage.
percpu(9) has a certain memory storage for each CPU and provides it by the piece
to users.  If the storages went short, percpu(9) enlarges them by allocating new
larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be
destroyed by the mechanism after a running thread sleeps even if percpu_putref
has not been called.

Tx processing of l2tp(4) uses normally involves sleepable operations so we
must avoid dereferencing a percpu data (struct ifqueue) after executing Tx
processing.  Address this situation by having just a pointer to the data in
a percpu storage instead.

Reviewed by ozaki-r@ and yamaguchi@
2019-09-19 06:09:52 +00:00
knakahara 2da350beca Avoid having a rtcache directly in a percpu storage for tunnel protocols.
percpu(9) has a certain memory storage for each CPU and provides it by the piece
to users.  If the storages went short, percpu(9) enlarges them by allocating new
larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be
destroyed by the mechanism after a running thread sleeps even if percpu_putref
has not been called.

Using rtcache, i.e., packet processing, typically involves sleepable operations
such as rwlock so we must avoid dereferencing a rtcache that is directly stored
in a percpu storage during packet processing.  Address this situation by having
just a pointer to a rtcache in a percpu storage instead.

Reviewed by ozaki-r@ and yamaguchi@
2019-09-19 06:07:24 +00:00
ozaki-r 2bcf5b2995 Apply some missing changes lost on the previous commit 2019-09-19 05:31:50 +00:00
knakahara b18d08a8c6 Divide Tx context of l2tp(4) to improve performance.
It seems l2tp(4) call path is too long for instruction cache. So, dividing
l2tp(4) Tx context improves CPU use efficiency.

After this commit, l2tp(4) throughput gains 10% on my machine(Atom C3000).
2019-09-19 04:59:42 +00:00
ozaki-r cdacfa3ee1 Add missing #include <sys/kmem.h> 2019-09-19 04:46:29 +00:00
ozaki-r 69653399dc wqinput: avoid having struct wqinput_worklist directly in a percpu storage
percpu(9) has a certain memory storage for each CPU and provides it by the piece
to users.  If the storages went short, percpu(9) enlarges them by allocating new
larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be
destroyed by the mechanism after a running thread sleeps even if percpu_putref
has not been called.

Input handlers of wqinput normally involves sleepable operations so we must
avoid dereferencing a percpu data (struct wqinput_worklist) after executing
an input handler.  Address this situation by having just a pointer to the data
in a percpu storage instead.

Reviewed by knakahara@ and yamaguchi@
2019-09-19 04:09:34 +00:00
ozaki-r e524fb36a1 Avoid having a rtcache directly in a percpu storage
percpu(9) has a certain memory storage for each CPU and provides it by the piece
to users.  If the storages went short, percpu(9) enlarges them by allocating new
larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be
destroyed by the mechanism after a running thread sleeps even if percpu_putref
has not been called.

Using rtcache, i.e., packet processing, typically involves sleepable operations
such as rwlock so we must avoid dereferencing a rtcache that is directly stored
in a percpu storage during packet processing.  Address this situation by having
just a pointer to a rtcache in a percpu storage instead.

Reviewed by knakahara@ and yamaguchi@
2019-09-19 04:08:29 +00:00
msaitoh 2d958b1323 Use unsigned to avoid undefined behavior in scsipi_{get,put}_tag().
Found by kUBSan.
2019-09-19 03:37:31 +00:00
thorpej f4659c41ae Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9
2019-09-19 01:44:48 +00:00
thorpej 6e45676f26 Add support for additional install step directives to enable using
installboot(8) to write u-boot images to SPI NOR and other types of
raw flash devices: input-block-size, input-pad-size, output-size, and
output-block-size.

Add the ability to create aliases for install objects, useful for when
e.g. sdmmc and emmc share the same steps.

Tested on an A20-OLinuXino-LIME2-e16Gs16M by bouyer@.

XXX pullup netbsd-9
2019-09-19 01:25:29 +00:00
christos dc03ac3f22 It is not just root, it is device read access (kre) 2019-09-18 23:43:23 +00:00
uwe c3e808d597 Use $file instead of $(echo $file). I don't think the extra round of
word expansions was really intended here.
2019-09-18 22:27:55 +00:00