Commit Graph

237989 Commits

Author SHA1 Message Date
kp
bf7a58e32f arswitch: Ensure the lock is always held when calling arswitch_modifyreg()
arswitch_setled() and a number of _global_setup functions did not acquire the
lock before calling arswitch_modifyreg(). With WITNESS enabled this would
instantly panic.

Discovered on a TPLink-3600:
("panic: mutex arswitch not owned at sys/dev/etherswitch/arswitch/arswitch_reg.c:236")

Reviewed by:	adrian, kan
Differential Revision:	https://reviews.freebsd.org/D9187
2017-01-15 10:21:25 +00:00
ngie
aa30e382a0 Revert r312119 and reword the intent to fix -Wshadow issues
between exp(3) and `exp` var.

The approach taken previously was not ideal for multiple
functional and stylistic reasons.

Add to existing sed call in Makefile to replace `exp` with
`exponent` instead.

MFC after:	13 days
Requested by:	bde
2017-01-15 09:25:33 +00:00
ngie
7add092f75 Mark testcases which use cap_enter as expected failures until the
PR is resolved so those of us that run the tests don't have the
bogus failures counted against our overall results

PR:	215690
2017-01-15 09:13:41 +00:00
cperciva
1c836fb168 Enable IPv6 networking on Amazon EC2.
MFC after:	1 week
2017-01-15 09:06:45 +00:00
ngie
198e6cd6e3 Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check
of the clang version

This works around breakage on ^/stable/10 when running installworld from
a ^/stable/10 host where the test wouldn't be compiled on the first
go-around and would be missing when make installworld is run.

MFC after:	1 week
PR:		208703
Reported by:	emaste
Sponsored by:	Dell EMC Isilon
2017-01-15 09:05:26 +00:00
cem
def45713a6 Fix a minor typo (Seiral)
PR:		216095
Reported by:	<bltsrc at mail.ru>
2017-01-15 08:05:00 +00:00
adrian
bee50de478 [ar71xx] add EARLY_PRINTF support for the rest of the non-AR933x SoCs.
Tested:

* AR934x SoC
2017-01-15 06:35:00 +00:00
markj
a2e0d3fa71 Suppress a warning about m_assertbuf being unused.
MFC after:	1 week
2017-01-15 03:53:20 +00:00
markj
6543297f0e Avoid unnecessary page lookups in vm_object_madvise().
vm_object_madvise() is frequently used to apply advice to a contiguous
set of pages in an object with no backing object. Optimize this case by
skipping non-resident subranges in constant time, and by iterating over
resident pages using the object memq, thus avoiding radix tree lookups on
each page index in the specified range.

While here, move MADV_WILLNEED handling to vm_page_advise(), and rename the
"advise" parameter to vm_object_madvise() to "advice."

Reviewed by:	alc, kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D9098
2017-01-15 03:50:08 +00:00
sbruno
c23696ed2d Fix hangs in a uniprocessor configuration (qemu, virtualbox, real hw).
sys/net/iflib.c:
  Add ctx to filter_info and don't skpi interrupt early on unless we're on an
  SMP system

sys/kern/subr_gtaskqueue.c:
  Skip smp check if we're running UP

Submitted by:	Matt Macy <mmacy@nextbsd.org>
Reported by:	emaste bde
2017-01-15 00:50:10 +00:00
mizhka
e8a7210247 [etherswitch] Support Micrel KSZ8995MA switch chip
This is Micrel KSZ8995MA driver code. KSZ8995MA uses SPI bus to control.
This code is written & tested on @SRCHACK's ksz8995ma board and FON2100
with gpiospi.
etherswitchcfg support commands: addtag, ingress, striptag, dropuntagged.

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka, adrian
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D8790
2017-01-14 23:24:50 +00:00
mizhka
d8e8b1e8a7 [mips/onionomega] WiFi & gpio kernel configuration bits
This patch adds missing hints for ath0 (eepromaddr) and GPIO (mask & leds).
ath0 doesn't work without eeprom hints, so this commit should make wifi
works on Onion Omega.

GPIO mask is required if you want to use gpiobus and GPIO pins on your
board. Onion Omega has several leds connected to gpio pins (one on board,
one color on dock).
This commit adds mask for gpiobus and allow you to turn off/on leds via
/dev/leds/{board,blue,green,red} (on by default).

Tested on Onion Omega 1.

Reviewed by:	adrian
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D9107
2017-01-14 22:56:20 +00:00
markj
4028dfd4f0 Stop the scheduler upon panic even in non-SMP kernels.
This is needed for kernel dumps to work, as the panicking thread will call
into code that makes use of kernel locks.

Reported and tested by:	Eugene Grosbein
MFC after:	1 week
2017-01-14 22:16:03 +00:00
markj
1a14c726b0 Revert r311952.
It broke DDB type-ahead since it caused db_check_interrupt() to drop
unrecognized characters.

Reported by:	bde
2017-01-14 22:06:25 +00:00
mav
6f588dab14 Alike to r312190 decouple iSCSI connection limits from defaults.
Connection parameters should remain at defaults until negotiated.

While there, remove sythetic limits, applied if kernel provided none.
iscsid has no own limitations, no configuration and no any idea what
values are good.  Assume kernel knows what it requests.
2017-01-14 20:41:44 +00:00
ngie
2c81a6027f Add include Makefiles for tests/sys/{fs,kern,kqueue,mac}/...
The primary goal for doing this is to leverage the work done in r312114
for enabling WARNS to address trivial code quality issues with new tests

MFC after:	6 days
Tested with:	make tinderbox
Sponsored by:	Dell EMC Isilon
2017-01-14 20:29:26 +00:00
ngie
cbdccfd094 Add include Makefiles for tests/sys/{fs,kern,kqueue,mac}/...
The primary goal for doing this is to leverage the work done in r312114
for enabling WARNS to address trivial code quality issues with new tests

MFC after:	6 days
Tested with:	make tinderbox
Sponsored by:	Dell EMC Isilon
2017-01-14 20:21:21 +00:00
mav
f97a527144 Fix wrong way assignment in r312190. 2017-01-14 19:58:51 +00:00
jah
07791773f9 Add comment explaining relative order of sched_unpin() and mtx_unlock().
Suggested by:	alc
MFC after:	1 week
2017-01-14 19:35:36 +00:00
mav
b7e0906be3 Decouple iSCSI connection limits from defaults.
If initiator does not negotiate some parameter, it expects one to get
default value, not some unknown remote hardware limit.  On the side side,
if some parameter is negotiated, its default value from RFC should not
be used for anything.
2017-01-14 18:04:12 +00:00
ngie
baf6d891be Remove CFLAGS for sha2_test
The previous code used to grab definitions from these openssl/openssh,
but this is no longer needed and is no longer correct. libnetbsd
provides all of the needed definitions

libnetbsd is added to CFLAGS automatically via netbsd-tests.test.mk --
hence all of CFLAGS can be cleared
2017-01-14 12:55:32 +00:00
ngie
d9039f7a56 Fix -Wformat issue
Use %zu for printing out results from nitems, as it's size_t based

MFC after:	1 week
X-MFC with:	r312120
Reported by:	gcc (mips:mipsel tinderbox)
Sponsored by:	Dell EMC Isilon
2017-01-14 10:38:39 +00:00
ngie
a0cc940090 Fix up r312105
- Only #include tcpd.h when LIBWRAP is true to avoid header include errors
- Only define whichaf when LIBWRAP is true to avoid -Wunused warning and
  to avoid issues with structs being defined that should only be defined
  when tcpd.h is included.

MFC after:	2 weeks
X-MFC with:	r312105
Pointyhat to:	ngie
Reported by:	gcc tinderbox
Sponsored by:	Dell EMC Isilon
2017-01-14 10:20:38 +00:00
ngie
7de155e511 Revert t_pow@r312154
This hunk hasn't been accepted yet
2017-01-14 10:10:49 +00:00
ngie
d5be20c8dc Fix the build using hunks pending upstream contributions 2017-01-14 10:08:22 +00:00
ngie
812b3562ac Diff reduce with upstream post-accepted contributions 2017-01-14 10:05:26 +00:00
jah
63a408be16 For i386 temporary mappings, unpin the thread before releasing
the cmap lock.  Releasing the lock first may result in the thread
being immediately rescheduled and bound to the same CPU, only to
unpin itself upon resuming execution.

Noted by:	skra (in review for armv6 equivalent)
MFC after:	1 week
2017-01-14 09:56:01 +00:00
ngie
921c5ebfc6 One more sys/types.h kevent clarification missed in r312151 2017-01-14 09:47:06 +00:00
ngie
a16443ef0f Clarify why sys/types.h #include is needed on FreeBSD 2017-01-14 09:45:46 +00:00
ngie
2462f56255 Use cleanup routines to remove POSIX semaphores instead of just blindly
unlinking them at the beginning of the testcase

This is a lot more intelligent in cleaning up the semaphores if the testcase
fails before sem_unlink is called.

Contributed back as bin/51872 upstream.
2017-01-14 09:42:06 +00:00
ngie
c680b35890 Diff reduce with upstream by taking diff hunks that were contributed back 2017-01-14 09:38:40 +00:00
ngie
ae7ce3ee77 Readd the CMSG_DATA for assigning the kqueue... this testcase isn't officially
correct yet, but it's getting closer.
2017-01-14 09:25:09 +00:00
ngie
8a39cdd5ef Remove extra EVSET I added in r312146 by accident 2017-01-14 09:21:36 +00:00
ngie
490cf9a071 Diff reduce with upstream
Use CMSG_FIRSTHDR macro to properly link the kqueue to the socket to
get it to now return -1/EBADF with sendmsg per the testcase expectations
2017-01-14 09:20:54 +00:00
ngie
5aa3a5ea8a Try to consolidate the #ifdef soup into FreeBSD vs non-FreeBSD blocks better 2017-01-14 08:47:00 +00:00
ngie
18d5bffd4c Diff reduce with upstream 2017-01-14 08:39:53 +00:00
ngie
4c450d78ab Remove comment no longer true since the test no longer bombs out earlier on 2017-01-14 08:38:21 +00:00
ngie
e01a2989a1 Diff reduce with upstream 2017-01-14 08:36:43 +00:00
ngie
72922ab011 :strtold_nan: remove unnecessary strcmp check
It gets checked again later on in the testcase
2017-01-14 08:35:29 +00:00
ngie
3494b06792 Diff reduce with upstream 2017-01-14 08:12:57 +00:00
ngie
19adf3450d Use copy of sha2.h from libnetbsd 2017-01-14 08:11:17 +00:00
ngie
d51654161f libnetbsd: improve sha2.h compat with FreeBSD
Add sha384 #include to libnetbsd's copy of sha2.h to expose all of the
SHA384 support via the header.
2017-01-14 08:10:37 +00:00
ngie
69d0b79818 Restore deleted line 2017-01-14 07:59:33 +00:00
ngie
130c73622b Diff reduce with upstream using lib/libnetbsd's updated copy of sha1.h 2017-01-14 07:58:40 +00:00
ngie
a68e3fc052 libnetbsd: improve sha1.h compat with FreeBSD
Map SHA1_CTX to SHA_CTX and SHA1Final to SHA1_Final
2017-01-14 07:57:34 +00:00
ngie
616cceddc8 r312133 should have used the non-FreeBSD block 2017-01-14 07:50:29 +00:00
ngie
ce00fd0c0c Diff reduce with upstream by using util.h from libnetbsd instead of libutil.h 2017-01-14 07:48:22 +00:00
ngie
f3845723f5 Add stdio.h #include for fparseln
fparseln on FreeBSD requires stdio.h, then libutil.h, whereas NetBSD only
requires util.h
2017-01-14 07:46:03 +00:00
ngie
fb15e0f3f2 Diff reduce with upstream 2017-01-14 07:39:07 +00:00
ngie
ff56c22837 Copy ^/vendor/NetBSD/tests/dist/lib/libc/hash/t_hmac.c to
contrib/netbsd-tests/lib/libc/hash/t_hmac.c

This was missed in r303980
2017-01-14 07:16:15 +00:00