Commit Graph

263501 Commits

Author SHA1 Message Date
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
wiz 4fd8e3c132 Remove superfluous Ns. 2018-11-27 10:35:03 +00:00
kre 9addc4465a Add two new test cases to add more tests for $@ expansions
(and a few more subtests in an existing test case).

The two new test cases currently fail, because of issues with
expanding "${1+$@}" which will (hopefully) be fixed soon.
(This looks to have been broken sometime during 2013 ... then I
made it even worse with some of the parser changes a while ago,
though the end result is that it appears less broken than it
really is.)
2018-11-27 09:59:30 +00:00
kre 7751e46b63 Add a new test case to test <> (open for input & output),
includion a test to make sure that the file doesn't get truncated.

Add new subtests to the "incorrect redirections" test case, to
validate correct behaviour of the shell when redirections fail in
various scenarios, including when the redirect is the whole command.

More along these lines are really needed, but this is better than nothing.

All the added tests pass on the /bin/sh currently in netbsd HEAD.
2018-11-27 09:55:32 +00:00
pgoyette 2754bc1371 Remove the rest of my local change that somehow snuck in to an
earlier commit.
2018-11-27 06:31:15 +00:00
msaitoh 1174b5ff5c Remove obsolete ksem entry to prevent build break. 2018-11-27 05:39:00 +00:00
kamil 80ee9b513a Fix link sha1.3 <- SHA1File.3
This SHA1File used to link to sha2(3).
2018-11-27 03:56:37 +00:00
kamil 99255a5dff Document SHA1FileChunk(3) in sha1(3)
Description taken from OpenBSD.
2018-11-27 03:29:36 +00:00
pgoyette a3cab4923b Include the compat_netbsd32* modules for sparc64
Their absence was noticed by martin@ when the recent libnv-related
build failure on amd64 did not affect sparc64!
2018-11-27 00:32:13 +00:00
knakahara 4ed6c77e42 tprof: Add goldmont plus support. Tested by msaitoh@n.o, thanks. 2018-11-26 23:20:56 +00:00
jdolecek 73e2364e6c add AHCI_PCI_QUIRK_FORCE for apu2 to be recognized; patch by Mike Pumford
on current-users@
2018-11-26 21:56:04 +00:00
kamil e405eb35a7 Fix typo: O_ALTIO -> O_ALT_IO
Noted by @jbeich via GitHub.
2018-11-26 20:03:39 +00:00
ryo 8a4107013c Add ThunderX IDs 2018-11-26 18:08:41 +00:00
joerg 335f313f07 Now that lib/csu no longer uses the object handle, drop the magic and
version field from the internal object. It is kept in the legacy version
of the main object.
2018-11-26 17:40:26 +00:00
joerg 463db15fc5 Do not pass the main object handle from the assembler startup stub to
the common ___start routine. It's only used for a pointless magic
version check. Thanks to martin@ for testing various architectures.
2018-11-26 17:37:44 +00:00
skrll c8304d84f0 Use cpu_index(). NFC. 2018-11-26 17:18:01 +00:00
mlelstv 61499a753e One more - we also need the libnv for compat_linux32 module 2018-11-26 15:02:11 +00:00
kre d7fa5d2fb9 Make it be that an empty command is treated as a regular builtin
for the purposes of any redirects it might have -- ie: as posix
requires, make the redirects appear to have been executed in a subshell
environment, so if one fails, aside from a diagnositc msg, all the
running script sees is a command that failed ($? != 0), rather
that having the shell exit which used to happen (the empty command was
being treated as a special builtin).

Continue to treat the empty command as special for the purposes of
var assigns it might contain (those are not executed in a sub-shell
and persist) - an error there (eg: assigning to a readonly var) will
continue to cause the shell (non-interactive shell) to exit.

This makes the NetBSD shell behave like all other (reasonably modern)
shells - fix method (not the implementation, details differ) taken from
FreeBSD who fixed this back in early 2010.    Problem pointed out
in (non-list) mail by Martijn Dekker.
2018-11-26 13:47:39 +00:00
jmcneill b6daac4f83 Switch to designated initializers 2018-11-26 11:53:58 +00:00
mlelstv 65b25e11fb compat modules now require an extra include path for libnv. 2018-11-26 08:48:43 +00:00
knakahara 4fd01caa16 tprof: Add goldmont support.
I tested on Atom C3558 (Denverton).
2018-11-26 07:45:47 +00:00
msaitoh 942ff4944d Print Intel CPUID Architectural Performance Monitoring leaf Fn0000000a. 2018-11-26 04:45:13 +00:00
msaitoh 4f17d26595 Add Intel CPUID Architectural Performance Monitoring leaf Fn0000000a. 2018-11-26 04:43:37 +00:00
mrg a0c45e363d normalise some messages. 2018-11-25 23:48:14 +00:00
mrg cd79b847e8 add option fixes here. 2018-11-25 23:37:09 +00:00
maya 3172c8f563 port-i386/44562: mention correct kernel name order. 2018-11-25 18:14:55 +00:00
mlelstv c16d8e94b7 Restore netbsd32 compat code for new NPF ABI. 2018-11-25 17:58:29 +00:00
christos e9933f923a From Yuichiro Naito (FreeBSD):
hrs@ says that
(cbp >= MB_LEN_MAX) condition is necessary for checking invalid
byte sequences.  If malicious input was given, libedit would read
byte sequences forever.
2018-11-25 16:21:04 +00:00
christos 2cb4fa4296 From Yuichiro Naito (FreeBSD):
hrs@ says that wctomb(3) has an internal shift state,
if wctomb(3) is called outside of libedit,
the internal state can be changed and causes miscalculate multibyte size.

So in this part, wcrtomb(3) should be used.
wcrtomb(3) requires that shift state is given in the argument.
We always initialize the shift state in ct_enc_width() to keep independent
from outside of libedit.
2018-11-25 16:20:28 +00:00
maxv 61d1593b4d Appease the check: allow NVMM_MAX_RAM bytes of memory, and not just
NVMM_MAX_RAM-1.
2018-11-25 14:11:24 +00:00
maxv 92800a175a Add RFLAGS in the exitstate. 2018-11-25 14:09:57 +00:00
mrg c53bc78857 fix -X option parsing. noted by Rajeev V. Pillai. 2018-11-25 07:37:20 +00:00
skrll cd8228278f Provide a LWP_PC for Taylor 2018-11-24 22:49:35 +00:00
jakllsch 7b92b2d00d attach GICv3 ITS where applicable 2018-11-24 22:18:57 +00:00
rjs 8d7bb3e1d0 Allow building when plcom isn't used. 2018-11-24 22:17:12 +00:00
jakllsch c6109c893d include dev/pci/pcivar.h, we use pci_attach_args directly 2018-11-24 22:08:53 +00:00
wiz bdc180c388 Sort SEE ALSO. Fix date. Whitespace fixes. 2018-11-24 20:31:29 +00:00
christos 367c5726bb - instead of zeroing struct proc on each allocation, provide a pool cache
constructor.
- instead of sprinkling memsets, zalloc the whole buffer.
2018-11-24 19:22:17 +00:00
jmcneill 00080fd654 aarch64: Add support for ARM Server Base System Architecture (SBSA).
The SBSA is a hardware system architecture for servers based on
	64-bit ARM processors. The Server Base Boot Requirements (SBBR)
	specification defines a UEFI + ACPI interface for OS bootstrap,
	which is supported by a combination of a new UEFI bootloader
	(bootaa64.efi) and the addition of ACPI support in the
	GENERIC64 kernel config.
2018-11-24 18:48:08 +00:00