Commit Graph

263489 Commits

Author SHA1 Message Date
maxv
1eb384e338 Improve my kern_time.c::rev1.192, systematically clear the buffers we get
from 'ptimer_pool' to prevent more leaks.
2018-11-29 17:40:12 +00:00
wiz
8be75e9e02 new openssl versions out 2018-11-29 16:04:21 +00:00
maxv
2ce19e3fc7 Fix info leak. There is one branch where 'status' is not initialized at
all.

	+ Possible info leak: [len=4, leaked=4]
	| #0 0xffffffff80baf397 in kleak_copyout
	| #1 0xffffffff80b56d0c in sys_wait6
	| #2 0xffffffff80259c42 in syscall
2018-11-29 12:37:22 +00:00
maxv
2e300bd3f8 Fix stack info leak.
+ Possible info leak: [len=136, leaked=92]
	| #0 0xffffffff80baf397 in kleak_copyout
	| #1 0xffffffff80bd4155 in ptrace_copyout_siginfo
	| #2 0xffffffff80bd5348 in do_ptrace
	| #3 0xffffffff80bd40fe in sys_ptrace
	| #4 0xffffffff80259c42 in syscall
2018-11-29 11:45:52 +00:00
jmcneill
05b033f63e Add nvme at pci 2018-11-29 11:23:49 +00:00
maxv
590d64ce40 Fix kernel info leak, 4 bytes of padding at the end of struct sigaction.
+ Possible info leak: [len=32, leaked=4]
	| #0 0xffffffff80baf327 in kleak_copyout
	| #1 0xffffffff80bd9ca8 in sys___sigaction_sigtramp
	| #2 0xffffffff80259c42 in syscall
2018-11-29 10:27:36 +00:00
ozaki-r
74109b2db3 Don't validate the source address of forwarding IPv6 packets (same as IPv4) 2018-11-29 10:02:52 +00:00
ozaki-r
2050bad43a Don't run DAD on link-up if it's explicitly disabled 2018-11-29 09:54:22 +00:00
ozaki-r
42cd9a0569 Introduce and use ip_dad_enabled() and ip6_dad_enabled() functions 2018-11-29 09:51:20 +00:00
christos
f04c2e3e34 Fix off by one <tsahara at iij> 2018-11-29 03:10:20 +00:00
jmcneill
79bb851b07 Allow non-power of 2 counts, and support alloc/release/alloc patterns for a device as long as the ITT size is sufficient 2018-11-28 22:54:11 +00:00
jmcneill
fd3e895773 Force a matching com@puc by seg/bus/dev/func to be the console device if specified in SPCR 2018-11-28 22:29:36 +00:00
jmcneill
8d8682e28a Add support for a "force_console" property, where when set, reuses the console dev configuration 2018-11-28 22:28:46 +00:00
jmcneill
6cab6729b0 Add calls to if_attach and if_deferred_start_init 2018-11-28 21:31:32 +00:00
mlelstv
555789a933 Move counting involuntary switches into mi_switch. preempt() passes that
information by setting a new LWP flag.

While here, don't even try to switch when the scheduler has no other LWP
to run. This check is currently spread over all callers of preempt()
and will be removed there.

ok mrg@.
2018-11-28 19:46:22 +00:00
mlelstv
d7158461a0 Revert previous for a better fix. 2018-11-28 19:36:43 +00:00
jmcneill
d1b4960443 Avoid kpause while cold 2018-11-28 19:15:32 +00:00
ryo
66fe064a07 Comment out implementation specific registers to avoid illegal instruction trap on ThunderX 2018-11-28 19:13:15 +00:00
jmcneill
9a00c52551 Our softc is the private data of self, not parent. Spotted by mlelstv@ 2018-11-28 19:07:49 +00:00
jmcneill
02aad920e9 Use correct PCI BAR offsets 2018-11-28 19:06:54 +00:00
jdolecek
31ebcc75c2 whitespace fix, NFC 2018-11-28 16:51:41 +00:00
maxv
2f18cc3a90 Fix kernel info leak.
+ Possible info leak: [len=32, leaked=16]
	| #0 0xffffffff80baf3a7 in kleak_copyout
	| #1 0xffffffff80b940f8 in sys___timer_settime50
	| #2 0xffffffff80259c42 in syscall
2018-11-28 15:10:40 +00:00
bad
67035901a5 Adapt ena_rx_checksum() to NetBSD.
It wasn't ported to the NetBSD conventions of indicating hardware checkum
status.

Compile tested only.
2018-11-28 11:50:48 +00:00
hannken
6ac427e315 Redo the access check for setting va_flags in zfs_netbsd_setattr().
Use user flag UF_NODUMP instead of UF_IMMUTABLE for the test as it
is the only user flag supported by all tested file systems.

PR kern/47656 test zfs_flags.
2018-11-28 10:01:28 +00:00
hannken
e4ec60fc8e Add missing access check for REMOVE into zfs_netbsd_lookup().
PR kern/47656 test zfs_dirperms.
2018-11-28 09:58:58 +00:00
hannken
5cbc5ce853 Add missing access check for setting va_Xtime into zfs_netbsd_setattr().
PR kern/47656 test zfs_times.
2018-11-28 09:57:59 +00:00
hannken
1d96c4a33f We expect VOP_ACCESS() to return EACCESS as general error.
Change zfs_netbsd_access() to translate the common EPERM to EACCES.
2018-11-28 09:57:16 +00:00
hannken
bc6110ce9c Don't try to release a NULL vnode in zfs_netbsd_rename(). 2018-11-28 09:56:40 +00:00
hannken
29da203472 Remove an early test for "source and target are equal" from zfs_rename()
that broke BSD semantics.
2018-11-28 09:56:09 +00:00
hannken
6d68550383 Add missing sa_buf_rele() into zfs_zget_cleaner(). 2018-11-28 09:55:36 +00:00
hannken
1f58a7d1b1 Always unbusy pages in zfs_putapage() after the data has been written
into the DMU.  Running fsx no longer hangs the kernel.
2018-11-28 09:55:06 +00:00
mlelstv
7b268d74f8 Fix statistics in case mi_switch didn't actually switch LWPs. 2018-11-28 09:44:49 +00:00
ryo
18fe7aba1f support boot option "-1" to disable multiprocessor boot, and "-z" to set AB_SILENT flag. 2018-11-28 09:16:19 +00:00
blymn
ee3d5db25b * Increase minimum finger width to prevent entering scroll mode erroneously
* Attempt to clarify what the sysctl variables for finger scroll do
* Add hysteresis to validity check so changing it does not get rejected

Thanks to Martin Husemann and Michael van Elst for reporting the issues.
2018-11-28 09:14:03 +00:00
msaitoh
fe21bc8f27 The register offset of the mask and pending register is depend on the 64bit
address capable bit, so fix the definition of PCI MSI vector mask and pending
register. This problem was not a real bug because PCI_MSI{MASK,PENDING} were
not used from anywhere.
2018-11-28 08:26:07 +00:00
msaitoh
24fd30a235 Fix comment. No functional change. 2018-11-28 08:19:19 +00:00
ryo
6fe68c25d4 don't pass illegal cpu index to cpu_lookup(). it may cause KASSERT. 2018-11-28 08:16:46 +00:00
ryo
ac6a092d65 don't exec 32bit binary on the cpu that has no aarch32. 2018-11-28 08:12:15 +00:00
kamil
ac324355db Define MD4_DIGEST_STRING_LENGTH in <md4.h>
This is a kind of a symbol existing in other implementations and included
in headers for other hash APIs (like MD5).
2018-11-28 05:19:13 +00:00
jmcneill
4fcf9709f6 Replace SPCR_INTERFACE_TYPE_* defines with ACPI_DBG2_* from acpica. Suggested by msaitoh@ 2018-11-28 03:17:13 +00:00
kre
fbb3329fd3 Divide GIG by 512 (DEV_BLKSIZE) so we don't overflow 32 bit u_long
when multiplying by 128 (in 32 bits, 128 * GIG == 0)

Should fix i386 build )and other 32 bit ports).

An alternative would be to use ULL rather than UL for the numbers,
but that would mean needlessly doing 64 bit arith for data that is
resticted to 32 bit results anyway.
2018-11-28 00:44:08 +00:00
jdolecek
0cf68dd3c1 actually allow pci_intr_alloc() with NULL count with MSI-X 2018-11-27 21:03:50 +00:00
jdolecek
5b5d45eaa4 document pci_intr_alloc() with NULL now also trying MSI-X
note aarch64 support
2018-11-27 20:13:43 +00:00
jdolecek
af30f6a609 make pci_intr_alloc() try also MSI-X by default (with NULL count);
there are boards/emulators which only have MSI-X and no MSI, and
so far there is no evidence there are devices which support both
and don't work in MSI-X mode

this change is supposed to reduce amount of needed cut&paste code in drivers

discussed briefly with jmcneill@
2018-11-27 20:08:05 +00:00
bouyer
c23f1b4da1 More TSO4 fixes, from the freebsd driver:
- the chip doens't want the lenght of options, but the complete lenght of
  ip headers (ip + tcp + options). Fix this for the BGE_IS_5717_PLUS()
  and BGE_IS_5705_PLUS() cases; FreeBSD doens't cover the last case so
  leave it as is for now. This fixes checksum failures for heavy transfers.
- It looks like the transmit engine hangs if the TCP segment crosses a 4GB
  boundary. FreeBSD fixes it by mapping everything below 4GB; instead
  try detect when this happens and do the bounce only when needed.

With these fixes I could transfers 3GB images over ftp at gigabit speed
(112MB/s with wget) without problems. Tested on a
bge0 at pci4 dev 0 function 0: Broadcom BCM5720 Gigabit Ethernet
bge0: APE firmware NCSI 1.4.22.0
bge0: interrupting at msi1 vec 0
bge0: HW config 002b1194, 00006014, 0002aa38, 00000000 0000000c
bge0: ASIC BCM5720 A0 (0x5720000), Ethernet address d0:94:66:8b:9c:18
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5720C 1000BASE-T media interface, rev. 0
2018-11-27 19:17:02 +00:00
jmcneill
49ebf0dba3 Add support for SPCR 16550 and 16450 interface types 2018-11-27 18:29:17 +00:00
martin
72cf5c53dc Cosmetics: consistently use MEG and GIG defines for size calculations 2018-11-27 17:13:41 +00:00
msaitoh
5ed77d2b40 Add tprof 2018-11-27 14:55:56 +00:00
maxv
d8ce26fe5b Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
2018-11-27 14:09:53 +00:00
wiz
f3f43bfe46 More macros, less whitespace. 2018-11-27 10:38:14 +00:00