]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFhead@r312217
ngie [Sun, 15 Jan 2017 09:33:29 +0000 (09:33 +0000)]
MFhead@r312217

7 years agoRevert r312119 and reword the intent to fix -Wshadow issues
ngie [Sun, 15 Jan 2017 09:25:33 +0000 (09:25 +0000)]
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

7 years agoMark testcases which use cap_enter as expected failures until the
ngie [Sun, 15 Jan 2017 09:13:41 +0000 (09:13 +0000)]
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

7 years agoEnable IPv6 networking on Amazon EC2.
cperciva [Sun, 15 Jan 2017 09:06:45 +0000 (09:06 +0000)]
Enable IPv6 networking on Amazon EC2.

MFC after: 1 week

7 years agoTurn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check
ngie [Sun, 15 Jan 2017 09:05:26 +0000 (09:05 +0000)]
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

7 years agoFix a minor typo (Seiral)
cem [Sun, 15 Jan 2017 08:05:00 +0000 (08:05 +0000)]
Fix a minor typo (Seiral)

PR: 216095
Reported by: <bltsrc at mail.ru>

7 years ago[ar71xx] add EARLY_PRINTF support for the rest of the non-AR933x SoCs.
adrian [Sun, 15 Jan 2017 06:35:00 +0000 (06:35 +0000)]
[ar71xx] add EARLY_PRINTF support for the rest of the non-AR933x SoCs.

Tested:

* AR934x SoC

7 years agoSuppress a warning about m_assertbuf being unused.
markj [Sun, 15 Jan 2017 03:53:20 +0000 (03:53 +0000)]
Suppress a warning about m_assertbuf being unused.

MFC after: 1 week

7 years agoAvoid unnecessary page lookups in vm_object_madvise().
markj [Sun, 15 Jan 2017 03:50:08 +0000 (03:50 +0000)]
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

7 years agoFix hangs in a uniprocessor configuration (qemu, virtualbox, real hw).
sbruno [Sun, 15 Jan 2017 00:50:10 +0000 (00:50 +0000)]
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

7 years ago[etherswitch] Support Micrel KSZ8995MA switch chip
mizhka [Sat, 14 Jan 2017 23:24:50 +0000 (23:24 +0000)]
[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

7 years ago[mips/onionomega] WiFi & gpio kernel configuration bits
mizhka [Sat, 14 Jan 2017 22:56:20 +0000 (22:56 +0000)]
[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

7 years agoStop the scheduler upon panic even in non-SMP kernels.
markj [Sat, 14 Jan 2017 22:16:03 +0000 (22:16 +0000)]
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

7 years agoRevert r311952.
markj [Sat, 14 Jan 2017 22:06:25 +0000 (22:06 +0000)]
Revert r311952.

It broke DDB type-ahead since it caused db_check_interrupt() to drop
unrecognized characters.

Reported by: bde

7 years agoAlike to r312190 decouple iSCSI connection limits from defaults.
mav [Sat, 14 Jan 2017 20:41:44 +0000 (20:41 +0000)]
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.

7 years agoAdd include Makefiles for tests/sys/{fs,kern,kqueue,mac}/...
ngie [Sat, 14 Jan 2017 20:29:26 +0000 (20:29 +0000)]
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

7 years agoAdd include Makefiles for tests/sys/{fs,kern,kqueue,mac}/...
ngie [Sat, 14 Jan 2017 20:21:21 +0000 (20:21 +0000)]
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

7 years agoFix wrong way assignment in r312190.
mav [Sat, 14 Jan 2017 19:58:51 +0000 (19:58 +0000)]
Fix wrong way assignment in r312190.

7 years agoAdd comment explaining relative order of sched_unpin() and mtx_unlock().
jah [Sat, 14 Jan 2017 19:35:36 +0000 (19:35 +0000)]
Add comment explaining relative order of sched_unpin() and mtx_unlock().

Suggested by: alc
MFC after: 1 week

7 years agoDecouple iSCSI connection limits from defaults.
mav [Sat, 14 Jan 2017 18:04:12 +0000 (18:04 +0000)]
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.

7 years agoRemove CFLAGS for sha2_test
ngie [Sat, 14 Jan 2017 12:55:32 +0000 (12:55 +0000)]
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

7 years agoFix -Wformat issue
ngie [Sat, 14 Jan 2017 10:38:39 +0000 (10:38 +0000)]
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

7 years agoFix up r312105
ngie [Sat, 14 Jan 2017 10:20:38 +0000 (10:20 +0000)]
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

7 years agoRevert t_pow@r312154
ngie [Sat, 14 Jan 2017 10:10:49 +0000 (10:10 +0000)]
Revert t_pow@r312154

This hunk hasn't been accepted yet

7 years agoFix the build using hunks pending upstream contributions
ngie [Sat, 14 Jan 2017 10:08:22 +0000 (10:08 +0000)]
Fix the build using hunks pending upstream contributions

7 years agoDiff reduce with upstream post-accepted contributions
ngie [Sat, 14 Jan 2017 10:05:26 +0000 (10:05 +0000)]
Diff reduce with upstream post-accepted contributions

7 years agoFor i386 temporary mappings, unpin the thread before releasing
jah [Sat, 14 Jan 2017 09:56:01 +0000 (09:56 +0000)]
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

7 years agoOne more sys/types.h kevent clarification missed in r312151
ngie [Sat, 14 Jan 2017 09:47:06 +0000 (09:47 +0000)]
One more sys/types.h kevent clarification missed in r312151

7 years agoClarify why sys/types.h #include is needed on FreeBSD
ngie [Sat, 14 Jan 2017 09:45:46 +0000 (09:45 +0000)]
Clarify why sys/types.h #include is needed on FreeBSD

7 years agoUse cleanup routines to remove POSIX semaphores instead of just blindly
ngie [Sat, 14 Jan 2017 09:42:06 +0000 (09:42 +0000)]
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.

7 years agoDiff reduce with upstream by taking diff hunks that were contributed back
ngie [Sat, 14 Jan 2017 09:38:40 +0000 (09:38 +0000)]
Diff reduce with upstream by taking diff hunks that were contributed back

7 years agoReadd the CMSG_DATA for assigning the kqueue... this testcase isn't officially
ngie [Sat, 14 Jan 2017 09:25:09 +0000 (09:25 +0000)]
Readd the CMSG_DATA for assigning the kqueue... this testcase isn't officially
correct yet, but it's getting closer.

7 years agoRemove extra EVSET I added in r312146 by accident
ngie [Sat, 14 Jan 2017 09:21:36 +0000 (09:21 +0000)]
Remove extra EVSET I added in r312146 by accident

7 years agoDiff reduce with upstream
ngie [Sat, 14 Jan 2017 09:20:54 +0000 (09:20 +0000)]
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

7 years agoTry to consolidate the #ifdef soup into FreeBSD vs non-FreeBSD blocks better
ngie [Sat, 14 Jan 2017 08:47:00 +0000 (08:47 +0000)]
Try to consolidate the #ifdef soup into FreeBSD vs non-FreeBSD blocks better

7 years agoDiff reduce with upstream
ngie [Sat, 14 Jan 2017 08:39:53 +0000 (08:39 +0000)]
Diff reduce with upstream

7 years agoRemove comment no longer true since the test no longer bombs out earlier on
ngie [Sat, 14 Jan 2017 08:38:21 +0000 (08:38 +0000)]
Remove comment no longer true since the test no longer bombs out earlier on

7 years agoDiff reduce with upstream
ngie [Sat, 14 Jan 2017 08:36:43 +0000 (08:36 +0000)]
Diff reduce with upstream

7 years ago:strtold_nan: remove unnecessary strcmp check
ngie [Sat, 14 Jan 2017 08:35:29 +0000 (08:35 +0000)]
:strtold_nan: remove unnecessary strcmp check

It gets checked again later on in the testcase

7 years agoDiff reduce with upstream
ngie [Sat, 14 Jan 2017 08:12:57 +0000 (08:12 +0000)]
Diff reduce with upstream

7 years agoUse copy of sha2.h from libnetbsd
ngie [Sat, 14 Jan 2017 08:11:17 +0000 (08:11 +0000)]
Use copy of sha2.h from libnetbsd

7 years agolibnetbsd: improve sha2.h compat with FreeBSD
ngie [Sat, 14 Jan 2017 08:10:37 +0000 (08:10 +0000)]
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.

7 years agoRestore deleted line
ngie [Sat, 14 Jan 2017 07:59:33 +0000 (07:59 +0000)]
Restore deleted line

7 years agoDiff reduce with upstream using lib/libnetbsd's updated copy of sha1.h
ngie [Sat, 14 Jan 2017 07:58:40 +0000 (07:58 +0000)]
Diff reduce with upstream using lib/libnetbsd's updated copy of sha1.h

7 years agolibnetbsd: improve sha1.h compat with FreeBSD
ngie [Sat, 14 Jan 2017 07:57:34 +0000 (07:57 +0000)]
libnetbsd: improve sha1.h compat with FreeBSD

Map SHA1_CTX to SHA_CTX and SHA1Final to SHA1_Final

7 years agor312133 should have used the non-FreeBSD block
ngie [Sat, 14 Jan 2017 07:50:29 +0000 (07:50 +0000)]
r312133 should have used the non-FreeBSD block

7 years agoDiff reduce with upstream by using util.h from libnetbsd instead of libutil.h
ngie [Sat, 14 Jan 2017 07:48:22 +0000 (07:48 +0000)]
Diff reduce with upstream by using util.h from libnetbsd instead of libutil.h

7 years agoAdd stdio.h #include for fparseln
ngie [Sat, 14 Jan 2017 07:46:03 +0000 (07:46 +0000)]
Add stdio.h #include for fparseln

fparseln on FreeBSD requires stdio.h, then libutil.h, whereas NetBSD only
requires util.h

7 years agoDiff reduce with upstream
ngie [Sat, 14 Jan 2017 07:39:07 +0000 (07:39 +0000)]
Diff reduce with upstream

7 years agoCopy ^/vendor/NetBSD/tests/dist/lib/libc/hash/t_hmac.c to
ngie [Sat, 14 Jan 2017 07:16:15 +0000 (07:16 +0000)]
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

7 years agoTry again with a better commit message
ngie [Sat, 14 Jan 2017 07:15:14 +0000 (07:15 +0000)]
Try again with a better commit message

7 years agoCopy ^/vendor/NetBSD/tests/dist to contrib/netbsd-tests
ngie [Sat, 14 Jan 2017 07:14:25 +0000 (07:14 +0000)]
Copy ^/vendor/NetBSD/tests/dist to contrib/netbsd-tests

This was missed in r303980

7 years agoIntegrate .../contrib/netbsd-tests/usr.bin/uniq into the FreeBSD test
ngie [Sat, 14 Jan 2017 06:51:31 +0000 (06:51 +0000)]
Integrate .../contrib/netbsd-tests/usr.bin/uniq into the FreeBSD test
suite as .../usr.bin/uniq/tests

Sponsored by: Dell EMC Isilon

7 years agoMerge content currently under test from ^/vendor/NetBSD/tests/dist/@r312123
ngie [Sat, 14 Jan 2017 06:49:17 +0000 (06:49 +0000)]
Merge content currently under test from ^/vendor/NetBSD/tests/dist/@r312123

Sponsored by: Dell EMC Isilon

7 years agotmpfs: manage tm_pages_used with atomics
mjg [Sat, 14 Jan 2017 06:20:36 +0000 (06:20 +0000)]
tmpfs: manage tm_pages_used with atomics

Reviewed by: kib (previous version)

7 years agoAdd additional tests missed in previous merges
ngie [Sat, 14 Jan 2017 06:18:54 +0000 (06:18 +0000)]
Add additional tests missed in previous merges

Reminder: use cvs up -APd to pull new directories

7 years agoRemove contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind
ngie [Sat, 14 Jan 2017 06:16:57 +0000 (06:16 +0000)]
Remove contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind

This should have been pruned in r305358

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoFollow up to r312118
ngie [Sat, 14 Jan 2017 05:24:35 +0000 (05:24 +0000)]
Follow up to r312118

State that execve failed instead of just printing out the program name
and strerror(errno) via err(3).

MFC after: 3 days
X-MFC with: r312118
Sponsored by: Dell EMC Isilon

7 years agoFix warnings
ngie [Sat, 14 Jan 2017 05:18:18 +0000 (05:18 +0000)]
Fix warnings

- Staticize test_num
- Promote i to size_t to deal with -Wsign-compare issues

Tested with: clang, gcc, gcc49
MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoencode_long, encode_timeval: mechanically replace `exp` with `exponent`
ngie [Sat, 14 Jan 2017 05:06:14 +0000 (05:06 +0000)]
encode_long, encode_timeval: mechanically replace `exp` with `exponent`

This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test,
which include math.h, which in turn defines exp(3)

MFC after: 2 weeks
Tested with: clang, gcc 4.2.1, gcc 4.9
Sponsored by: Dell EMC Isilon

7 years agoFix -Wformat issue with zero-length format string passed to err(3)
ngie [Sat, 14 Jan 2017 05:02:53 +0000 (05:02 +0000)]
Fix -Wformat issue with zero-length format string passed to err(3)

MFC after: 3 days
Tested with: clang, gcc 4.2.1, gcc 4.9
Sponsored by: Dell EMC Isilon

7 years agoRemove WARNS set globally by ../Makefile.inc now
ngie [Sat, 14 Jan 2017 04:20:42 +0000 (04:20 +0000)]
Remove WARNS set globally by ../Makefile.inc now

Sponsored by: Dell EMC Isilon

7 years agoEnable WARNS?= 6 across all of tests/sys
ngie [Sat, 14 Jan 2017 04:20:06 +0000 (04:20 +0000)]
Enable WARNS?= 6 across all of tests/sys

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoClean up trailing whitespace
ngie [Sat, 14 Jan 2017 04:16:13 +0000 (04:16 +0000)]
Clean up trailing whitespace

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoFix -Wunused on gcc 4.9 (x was set but not used)
ngie [Sat, 14 Jan 2017 04:13:28 +0000 (04:13 +0000)]
Fix -Wunused on gcc 4.9 (x was set but not used)

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoRemove unused vars to fix -Wunused issues
ngie [Sat, 14 Jan 2017 04:10:04 +0000 (04:10 +0000)]
Remove unused vars to fix -Wunused issues

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoFix -Wsign-compare warnings
ngie [Sat, 14 Jan 2017 04:09:01 +0000 (04:09 +0000)]
Fix -Wsign-compare warnings

The loop index (i) doesn't need to be size_t as its comparison is signed

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoBump WARNS up to 6 again
ngie [Sat, 14 Jan 2017 04:00:26 +0000 (04:00 +0000)]
Bump WARNS up to 6 again

Has not been tested (can't be after r312103 without cem's hacks
to atf/kyua)!

7 years agoDelete trailing whitespace and use __arraycount instead of nitems in contrib code
ngie [Sat, 14 Jan 2017 03:54:23 +0000 (03:54 +0000)]
Delete trailing whitespace and use __arraycount instead of nitems in contrib code

MFC after: 1 week

7 years agoFollow-up to r312103:
cem [Sat, 14 Jan 2017 02:29:25 +0000 (02:29 +0000)]
Follow-up to r312103:

Revert r310995 as well.

7 years agoCommit more accepted upstream changes from <NetBSD>/tests/...
ngie [Sat, 14 Jan 2017 02:26:46 +0000 (02:26 +0000)]
Commit more accepted upstream changes from <NetBSD>/tests/...

This includes a number of accepted patches for:
- lib/libc/sys
- lib/libm

christos was also nice enough to do the heavy lifting with the h_macros.h
#includes so testcases which use h_macros.h now can work more easily with
the FreeBSD tree's layout for contrib/netbsd-tests vs the testcases.

7 years agoConditionalize libwrap support into inetd based on MK_TCP_WRAPPERS
ngie [Sat, 14 Jan 2017 01:37:03 +0000 (01:37 +0000)]
Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS

This will allow inetd to stand by itself without libwrap.

MFC after: 2 weeks
Relnotes: yes
Reviewed by: hrs (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9056

7 years agoFix broken fstyp exfat testcase
cem [Sat, 14 Jan 2017 01:08:04 +0000 (01:08 +0000)]
Fix broken fstyp exfat testcase

Introduced in r312010.

It helps to read the documentation before trying to test something.

7 years agoRevert r310994
cem [Sat, 14 Jan 2017 01:03:20 +0000 (01:03 +0000)]
Revert r310994

Don't implement some terrible hack on a test by test basis.  The
framework fix is straightforward and can be chased up in the original
bug.

Reviewed by: ngie ("be my guest")

7 years agoNote that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD
ngie [Sat, 14 Jan 2017 01:01:02 +0000 (01:01 +0000)]
Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD

MFC after: 12 days
X-MFC with: r305358
Sponsored by: Dell EMC Isilon

7 years agoRemove deprecated fgetsock() and fputsock().
glebius [Fri, 13 Jan 2017 22:16:41 +0000 (22:16 +0000)]
Remove deprecated fgetsock() and fputsock().

7 years agoTrim a few comments on platforms that did not implement mmap of /dev/kmem.
jhb [Fri, 13 Jan 2017 21:52:53 +0000 (21:52 +0000)]
Trim a few comments on platforms that did not implement mmap of /dev/kmem.

After r307332, no platforms implement mmap for /dev/kmem, so the lack of
it for these platforms is no longer unique.

7 years agoUpdate the shm_open.2 man page to reflect objective reality.
wblock [Fri, 13 Jan 2017 19:41:02 +0000 (19:41 +0000)]
Update the shm_open.2 man page to reflect objective reality.

PR: 215612
Submitted by: rwatson
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9066

7 years agoUse getsock_cap() instead of deprecated fgetsock().
glebius [Fri, 13 Jan 2017 18:36:46 +0000 (18:36 +0000)]
Use getsock_cap() instead of deprecated fgetsock().

Reviewed by: Daniel Braniss <danny cs.huji.ac.il>

7 years agoCorrect the comments about how much buffer is allocated.
ian [Fri, 13 Jan 2017 17:03:23 +0000 (17:03 +0000)]
Correct the comments about how much buffer is allocated.

7 years agoUse getsock_cap() instead of deprecated fgetsock().
glebius [Fri, 13 Jan 2017 16:54:44 +0000 (16:54 +0000)]
Use getsock_cap() instead of deprecated fgetsock().

Reviewed by: tuexen

7 years agofstyp.8: Move initial exFAT blurb to the -u section
cem [Fri, 13 Jan 2017 16:46:01 +0000 (16:46 +0000)]
fstyp.8: Move initial exFAT blurb to the -u section

Didn't notice the second list in r312003.

Reported by: trasz@

7 years agoCheck tty_gone() after allocating IO buffers. The tty lock has to be
ian [Fri, 13 Jan 2017 16:37:38 +0000 (16:37 +0000)]
Check tty_gone() after allocating IO buffers.  The tty lock has to be
dropped then reacquired due to using M_WAITOK, which opens a window in
which the tty device can disappear.  Check for this and return ENXIO
back up the call chain so that callers can cope.

This closes a race where TF_GONE would get set while buffers were being
allocated as part of ttydev_open(), causing a subsequent call to
ttydevsw_modem() later in ttydev_open() to assert.

Reported by: pho
Reviewed by: kib

7 years agolibgcc_s: add libc DT_NEEDED to fix underlinking
emaste [Fri, 13 Jan 2017 15:17:25 +0000 (15:17 +0000)]
libgcc_s: add libc DT_NEEDED to fix underlinking

PR: 216012
Reported by: jbeich
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agoEnsure that the buffer length and the length provided in the IPv4
tuexen [Fri, 13 Jan 2017 10:55:26 +0000 (10:55 +0000)]
Ensure that the buffer length and the length provided in the IPv4
header match when using a raw socket to send IPv4 packets and
providing the header. If they don't match, let send return -1
and set errno to EINVAL.

Before this patch is was only enforced that the length in the header
is not larger then the buffer length.

PR: 212283
Reviewed by: ae, gnn
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9161

7 years agoImprove CAM_CDB_POINTER support.
mav [Fri, 13 Jan 2017 08:31:55 +0000 (08:31 +0000)]
Improve CAM_CDB_POINTER support.

MFC after: 2 weeks

7 years agoPurge varargs.h in favor of stdarg.h.
hrs [Fri, 13 Jan 2017 08:01:27 +0000 (08:01 +0000)]
Purge varargs.h in favor of stdarg.h.

7 years ago[net80211] add a macro to check this configuration option.
adrian [Fri, 13 Jan 2017 07:24:58 +0000 (07:24 +0000)]
[net80211] add a macro to check this configuration option.

7 years ago[net80211] begin laying the groundwork for drivers to do their own sequence number...
adrian [Fri, 13 Jan 2017 07:08:14 +0000 (07:08 +0000)]
[net80211] begin laying the groundwork for drivers to do their own sequence number management.

I added IEEE80211_TX_LOCK() a few years ago because there were races between
seqno allocation, driver queuing and crypto IV allocation.  This meant that
they'd appear out of sequence and the receiver would drop them, leading to
terrible performance or flat out traffic hangs.

This flag should be set by drivers that do their own sequence number
allocation for all frames it needs to happen for, including beacon frames.

Eventually this should lead to the driver taking care of locking for
allocating seqno and other traffic-triggered events (eg addba setup.)

7 years ago[net80211] Initial VHT node upgrade/downgrade support and initial IE parsing.
adrian [Fri, 13 Jan 2017 07:02:04 +0000 (07:02 +0000)]
[net80211] Initial VHT node upgrade/downgrade support and initial IE parsing.

This is the bulk of the magic to start enabling VHT channel negotiation.
It is absolutely, positively not yet even a complete VHT wave-1 implementation.

* parse IEs in scan, assoc req/resp, probe req/resp;
* break apart the channel upgrade from the HT IE parsing - do it after the
  VHT IEs are parsed;
* (dirty! sigh) add channel width decision making in ieee80211_ht.c htinfo_update_chw().
  This is the main bit where negotiated channel promotion through IEs occur.
* Shoehorn in VHT node init ,teardown, rate control, etc calls like the HT
  versions;
* Do VHT channel adjustment where appropriate

Tested:

* monitor mode, ath10k port
* STA mode, ath10k port - VHT20, VHT40, VHT80 modes

TODO:

* IBSS;
* hostap;
* (ignore mesh, wds for now);
* finish 11n state engine - channel width change, opmode notifications, SMPS, etc;
* VHT basic rate negotiation and acceptance criteria when scanning, associating, etc;
* VHT control/management frame handling (group managment and operating mode being
  the two big ones);
* Verify TX/RX VHT rate negotiation is actually working correctly.

Whilst here, add some comments about seqno allocation and locking.  To achieve
the full VHT rates I need to push seqno allocation into the drivers and
finally remove the IEEE80211_TX_LOCK() I added years ago to fix issues. :/

7 years ago[net80211] initial, somewhat incomplete VHT channel setup code and attach path.
adrian [Fri, 13 Jan 2017 06:53:56 +0000 (06:53 +0000)]
[net80211] initial, somewhat incomplete VHT channel setup code and attach path.

This sets up:

* vht capabilities in vaps;
* calls vht_announce to announce VHT capabilities if any;
* sets up vht20, vht40 and vht80 channels, assuming the regulatory code
  does the right thing with 80MHz available ranges;
* adds support to the ieee80211_add_channel_list_5ghz() code to populate
  VHT channels, as this is the API my ath10k driver is using;
* add support for the freq1/freq2 field population and lookup that
  VHT channels require.

The VHT80 code assumes that the regulatory domain already has limited VHT80
bands to, well, 80MHz wide chunks.

7 years ago- Add static for functions and variables with internal linkage.
hrs [Fri, 13 Jan 2017 06:22:49 +0000 (06:22 +0000)]
- Add static for functions and variables with internal linkage.
- Quiet down -Wcast-align warnings.
- Remove dead code.

There is no functionality change.

7 years agofmaxmin_test still fails with clang 3.9.x.. bypass the test
ngie [Fri, 13 Jan 2017 04:21:09 +0000 (04:21 +0000)]
fmaxmin_test still fails with clang 3.9.x.. bypass the test

MFC after: 3 days
PR: 208703
Sponsored by: Dell EMC Isilon

7 years agoUse dfr-01-xfat.img.bz2, not dfr-01-xfat.dd.bz2 (the latter
ngie [Fri, 13 Jan 2017 04:04:48 +0000 (04:04 +0000)]
Use dfr-01-xfat.img.bz2, not dfr-01-xfat.dd.bz2 (the latter
case was the full disk image from the website, which was never
checked in to svn)

Regardless, the testcase still fails

PR: 214908
Sponsored by: Dell EMC Isilon

7 years agoAdd testcase for exFAT that currently fails
ngie [Fri, 13 Jan 2017 04:02:09 +0000 (04:02 +0000)]
Add testcase for exFAT that currently fails

Disk image obtained from:
http://www.cfreds.nist.gov/dfr-images/dfr-01-xfat.dd.bz2 -- was ripped off the
first GPT partition and verified to be a FAT-like partition with file(1)/hexdump.

This testcase currently fails

PR: 214908
Sponsored by: Dell EMC Isilon

7 years agoAdd license preamble for r286964; credit to asomers
ngie [Fri, 13 Jan 2017 03:42:51 +0000 (03:42 +0000)]
Add license preamble for r286964; credit to asomers

While here, clean up trailing whitespace

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoUpgrade NetBSD tests to 01.11.2017_23.20 snapshot
ngie [Fri, 13 Jan 2017 03:33:57 +0000 (03:33 +0000)]
Upgrade NetBSD tests to 01.11.2017_23.20 snapshot

This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on: amd64, i386
MFC after: 1 month

7 years agoCopy ^/vendor/NetBSD/tests/dist to .../01.11.2017_23.20 for incoming
ngie [Fri, 13 Jan 2017 03:30:29 +0000 (03:30 +0000)]
Copy ^/vendor/NetBSD/tests/dist to .../01.11.2017_23.20 for incoming
snapshot update

7 years agofstyp(8): Detect exFAT filesystems
cem [Fri, 13 Jan 2017 02:12:58 +0000 (02:12 +0000)]
fstyp(8): Detect exFAT filesystems

Simply detect the exFAT filesystem name in the Volume Boot Record
(superblock).

PR: 214908
Reported by: <vermaden at interia.pl>

7 years agoIncrease retry count to 100 in r88e_fw_cmd() and r92c_fw_cmd().
kevlo [Fri, 13 Jan 2017 02:11:16 +0000 (02:11 +0000)]
Increase retry count to 100 in r88e_fw_cmd() and r92c_fw_cmd().