Commit Graph

270598 Commits

Author SHA1 Message Date
uwe
5da7fd86cc Get rid of bogus ASC_CALLBACK typedef. Use the real callback type
(which is almost ASC_ISR_CALLBACK).  Since we no longer need the
casting dance we can get rid of the temporary variables, and since we
don't need the temporary variables we don't need the ASC_ISR_CALLBACK
typedef either.  Found by gcc8 -Wcast-function-type.
2019-10-06 00:48:19 +00:00
mrg
4df8bc966e sprintf() -> snprintf(), and adjust a buffer size to avoid any
potential for overflow.
2019-10-06 00:27:50 +00:00
mrg
31fd77d90f remove ubsan_handlers_cxx.cc from sources. shouldn't be used with gcc. 2019-10-06 00:15:22 +00:00
mrg
056b9b215b remove, not comment, the partman.c option 2019-10-06 00:07:11 +00:00
mrg
b6c33b696c avoid calling snprintf/strlcat with an input parameter the same
as the output.  from martin@.  fixes gcc 8 restrict warnings.
2019-10-06 00:05:10 +00:00
mrg
cfe79b5b48 use memcpy() for strings that are not C strings.
destinations are already sufficiently sized and nul terminated.
2019-10-05 23:35:57 +00:00
mrg
c8bf876ced expand the internal consistency checks in truedirec() to avoid
fallthrough cases.  now if direction turns up wrong (it should
not, but this code can't tell that, and convert it to an enum
that would also fix this, is more effort than this is worth.
2019-10-05 23:34:14 +00:00
mrg
91d03f50e2 use target size in a couple of strncpy() calls:
- load_hash() has already zeroed the structure so final nul is there.
- print_ipflog() copied final byte that was then nul'd.
2019-10-05 23:32:20 +00:00
mrg
630723670f memcpy->strncpy, and avoid copying beyond the static string length
into potentially unmapped regions.
2019-10-05 23:30:22 +00:00
mrg
49e1839354 remove __packed attribute from struct ieee80211_radiotap_header
and all the structures that include it.

this should not change anything while avoiding packed vs alignment
warnings from GCC 8, and potentially pessimised code generation
due to the packed marker (there are no misaligned members, just
that the per-device parts may end unaligned.)

all consumers of these members are done from the properly aligned
packet members directly, or, as a union with a 64 byte member,
also properly aligned.  codegen didn't appear to change, except
for the definition of sizeof(struct driver_[rt]x_radiotap_header)
in debug info, which is not directly used anywhere.
2019-10-05 23:27:20 +00:00
mrg
21f80204df list the PCI ID range for new nvidia TU117 and TU116.
adjust the check to simply be >= 0x1580, which is the
first pciid not support.

should fix PR#54600.
2019-10-05 22:37:49 +00:00
sevan
0e74c10957 No need to empose the script to be runnable during boot time, it prevents the
script from wroking if the system is booted into single user mode & then
moved onto multi-user mode.

Reported by <pgoyette> for NPF but the issue is there in PF too.
2019-10-05 22:21:29 +00:00
mrg
662908cac2 sprintf->snprintf 2019-10-05 22:06:29 +00:00
christos
6b7001662d Add tests for escape sequences. 2019-10-05 20:24:16 +00:00
christos
bdf26a6120 Recognize \oOOO \dDD \xXX plus the other regular 'C' backslash escapes like
gnu sed does, except when inside regex []. (Gnu sed translates those too,
unless --posix is specified).
2019-10-05 20:23:55 +00:00
christos
3379dd2438 add an abort for a case that can't happen 2019-10-05 20:22:36 +00:00
uwe
86bd1b8280 getlogin_r: use strcpy(). We check namelen before copying the result.
gcc 8 -Wstringop-overflow is uhappy when the specified bounds depend
on the length of the source and is not smart enough to see the check
we do.  Besides we don't want the padding effect of strncpy() here.
2019-10-05 19:19:51 +00:00
uwe
0892295b90 Don't add -Wabi to CXXFLAGS for gcc 8. It warns about differences
from the most up-to-date ABI, which in gcc 8 is used by default.
XXX: This needs a better condition.
2019-10-05 18:37:39 +00:00
uwe
fdee483c8f __dberr: tweak signature to make gcc8 -Wbad-function-cast happy about
casts in __dbpanic.  Admittedly this is a bit too "cute".
2019-10-05 18:07:58 +00:00
jhigh
c7ab523edc adding full scheme comparison to libcrypt:crypt and pwhash tests 2019-10-05 18:06:16 +00:00
uwe
da97884ede __dbpanic: use the official DB typedef name in the casts. They were
copied from the declaration point where it's not yet available.
2019-10-05 18:01:52 +00:00
pgoyette
18236dbe90 Add a commented-out entry for COMPAT_90 for completeness
NFCI
2019-10-05 17:36:47 +00:00
kamil
467fb18417 Validate input before converting timeval::tv_usec in compat/netbsd32 2019-10-05 14:19:53 +00:00
kamil
8e3fd5b698 Check for valid timespec in clock_settime1()
An alternative approach would be to check the valie in settime1(), but
it would result in multiple checks for valid tv_nsec, as there are
settime1() users that need to check the ranges earlier.

Reported-by: syzbot+96e5ce2c2c704d96c2f0@syzkaller.appspotmail.com
2019-10-05 12:57:40 +00:00
jmcneill
26e0c5cb61 Add support for SDIO interrupts. 2019-10-05 12:27:14 +00:00
jmcneill
fa61126dab Remove SMC_CAPS_POLLING cap 2019-10-05 12:09:01 +00:00
mlelstv
f84eb3e271 Fix typo 2019-10-05 09:25:11 +00:00
maxv
c30ddd9d27 Switch to the new PTE naming. No binary diff (tested with MKREPRO). 2019-10-05 07:30:03 +00:00
maxv
f6959bf733 Switch to the new PTE naming:
PG_PVLIST -> PTE_PVLIST
	PG_W      -> PTE_WIRED
	PG_FRAME  -> PTE_FRAME

No functional change.
2019-10-05 07:19:49 +00:00
ryoon
dfe601d86e Fix a pasto, uhdiev, bump date 2019-10-05 06:28:50 +00:00
mlelstv
9291400c34 Bail when dkdriver hasn't been initialized. This can happen when
attachment failed or when it hasn't finished yet.
2019-10-05 05:28:44 +00:00
mrg
2d65b962bb add missing break.
(this code is fun.  it has switch inside switch, and both switches
have two cases, one with an identifier and one with a magic number.)
2019-10-05 01:35:26 +00:00
mrg
5ac81857a1 add missing break. 2019-10-05 01:30:28 +00:00
kamil
fa6363e636 Avoid -LONG_MIN msgtyp in msgrcv(2) and treat it as LONG_MAX
This logic (found in Linux) avoids undefined behavior.

Reported-by: syzbot+8af00519a8688d9903ca@syzkaller.appspotmail.com
2019-10-04 23:20:22 +00:00
brad
2ab41a9a50 For ZFS on NetBSD there are a number of functions called
zfs_netbsd_{create,mknod,link,etc..} that call functions called
zfs_{create,mknod,link,etc..}.  These later functions may return a
error code along with a *vpp that is NULL.  This situation was not
handled by the zfs_netbsd_* functions and would result in a panic in a
number of cases.  The simplest to trigger it was filling up a dataset
or pool resulting in a over quota condition.  An attempt to create
another file, or directory at that point would panic.
2019-10-04 23:06:19 +00:00
kamil
6c69d9fad1 Avoid left shift changing the signedness flag
Reviewed by <mrg>

Reported-by: syzbot+25ac03024cedf27f3368@syzkaller.appspotmail.com
2019-10-04 22:48:45 +00:00
gutteridge
4b075bd22c panic.9: add xrefs to printf(3) and printf(9)
printf(3) fmt strings are referenced in the body, and there might as
well be a cross-reference to other kernel message output functions.
2019-10-04 21:55:00 +00:00
mrg
ea2cbdfdaf add a size_t len to get_iso9660_volname() so it can properly do
bounds checking.

ok martin@
2019-10-04 21:36:02 +00:00
mrg
a164d00c0b convert most sprintf() to snprintf(). 2019-10-04 21:33:57 +00:00
mrg
03c86659de fix a bug gcc 8 picked up: use ~LOCK_NB to look for LOCK_UN,
like the rest of the code does.

from uwe@.
2019-10-04 16:27:00 +00:00
uwe
5e58365557 Undo the confusion. Use separate synopsis lines for -c command with
single argument (sh -c) and command [args ...] forms.
2019-10-04 16:14:05 +00:00
uwe
371c573fa8 The command is not optional. 2019-10-04 15:30:16 +00:00
maxv
6c0e984be8 Misc reordering, to clarify and reduce the diff against amd64. 2019-10-04 15:28:00 +00:00
maya
9e7633eff2 Provide PTRACE_ILLEGAL_ASM, using an illegal slot instruction 2019-10-04 15:25:30 +00:00
kamil
ffd5d3e30b Avoid signed integer overflow in ts2timo() for ts->tv_nsec
The condition would be rechecked later again after subtracting start time
and most invalid inputs rejected. In corner cases the current code can
accept certain invalid inputs that will pass checks later and behave like
valid ones (due to signed integer overflow).

Reported-by: syzbot+3a4a07b62558bbbd3baa@syzkaller.appspotmail.com
2019-10-04 14:17:07 +00:00
maya
6b43361992 We might've switched modes, re-init the move cost table again if necessary.
Fixes unlikely segfault on VAX.
2019-10-04 12:46:43 +00:00
mrg
24da319951 remove an always false check and its' "This can never happen?" comment. 2019-10-04 12:34:40 +00:00
mrg
b1be2775ea add missing break. upstream already has it in 5.1.2. 2019-10-04 12:29:05 +00:00
mrg
acf5f8d2ce use memmove() not memcpy() for overlapping regions. 2019-10-04 12:24:32 +00:00
mrg
35c06cd861 replace memcpy() with src bounds overflow with single char write. 2019-10-04 12:24:12 +00:00