Commit Graph

270326 Commits

Author SHA1 Message Date
sevan 91b0bc2c1f default policy is to blockall 2019-09-21 20:35:52 +00:00
sevan 7fbde1b12f Drop the final keyword to use the default policy of last matching rule wins 2019-09-21 20:31:31 +00:00
sevan 8a69f51671 grammar 2019-09-21 19:48:15 +00:00
gson a9987ef8b8 Look for up to 16 USB controllers, to match the number of device nodes
now created by MAKEDEV.
2019-09-21 16:22:25 +00:00
maya fa96dd2114 Actually define BYTEORDER since it is used. 2019-09-21 15:56:09 +00:00
kre f77bb6aeed Initialise the sometvs array of struct timeval that is to be used to
validate that utimes() cannot update the times of a file on a read only
filesystem.   The values are never actually used, but since
	src/sys/kern/vfs_syscalls.c 1.535
they are validated for sanity, and the syscall returns EINVAL if the
values passed are invalid (tv_usec <0 or >= 1000000).  If that happens
we don't get as far as the test which produces the EROFS that is expected
from this test (these tests - one for each filesystem type).

So, init the timeval structs (just to 0, the values will still not be
used) so that the EINVAL doesn't bite us before we're eaten by the EROFS
which is the way we're supposed to die.

If the syscall API args were labelled as "const" the compiler probably
would have caught the use of uninit'd vars and complained much sooner.
2019-09-21 14:25:42 +00:00
msaitoh 8862b5fa63 Regen. 2019-09-21 14:25:33 +00:00
msaitoh 5748d206d2 Add Killer E2400 and E2500. 2019-09-21 14:25:09 +00:00
jmcneill ee39b92057 mcx(4): Added driver for Mellanox 5th generation ethernet. 2019-09-21 14:05:38 +00:00
jmcneill a594e6948a Add support for Mellanox 5th generation ethernet devices. This driver
supports the ConnectX-4 Lx EN, ConnectX-4 EN, ConnectX-5 EN, and
ConnectX-6 EN adapters.

Driver ported from OpenBSD.
2019-09-21 14:04:12 +00:00
kre 68769e549a bus_addt_t is different widths on different archs, so there is no
one simple %?x format that will always work to print it.  Cast to
intmax_t and use %jx which should work everywhere.
2019-09-21 12:57:25 +00:00
sevan b058b370e0 With bin/54124 fixed, the rule needs to be explicitly set to stateful. 2019-09-21 11:46:25 +00:00
msaitoh a65bb42f06 Regen. 2019-09-21 11:24:35 +00:00
msaitoh 185988fe15 Modify Attansic Ethernet devices' description to clarify. 2019-09-21 11:23:56 +00:00
jmcneill d2908378b5 Honour block device's IO alignment requirements.
Patch from Simon South <simon@simonsouth.net> in PR# 54554
2019-09-21 10:19:37 +00:00
sevan 0ed1b2a1a6 We use spaces, not tabs here 2019-09-21 09:23:11 +00:00
sevan 88d1988908 sort 2019-09-21 09:15:24 +00:00
sevan eaa5be79ae Add 8.1 release 2019-09-21 09:13:10 +00:00
maxv f97d527f9c Remove unused function prototype. Reported by the lgtm bot. 2019-09-21 07:31:56 +00:00
maxv 764de15a1e Add __printflike, and fix two incorrect fmts. Reported by the lgtm bot. 2019-09-21 07:08:27 +00:00
maxv 7a3aebe29c Fix netbsd32___mount50():
- zero out fs_args32 to prevent info leaks
 - remove unused and non-functional copyin in NFS (lgtm bot)
 - declare udata, and don't pass kernel pointers to copyout (lgtm bot)
 - make sure data_len is just big enough, to mimic the native behavior
 - don't forget to update *retval with the 32bit value
 - add an XXX for NFS
2019-09-21 06:56:51 +00:00
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