Commit Graph

245310 Commits

Author SHA1 Message Date
ozaki-r 48cafa77c5 Add tests for sysctl net.inet.ip.mtudisc
From suzu-ken@IIJ
2016-10-04 04:15:25 +00:00
ozaki-r 85424d4772 Add tests for sysctl net.inet6.ip6.auto_linklocal
From suzu-ken@IIJ
2016-10-04 03:43:15 +00:00
ozaki-r b6cf257731 Add tests for sysctl net.inet6.ip6.dad_count
From suzu-ken@IIJ
2016-10-04 03:41:33 +00:00
rkujawa 47a53d3226 Note mntva(4). 2016-10-03 21:36:32 +00:00
kamil 5770e440f3 libc: Add the C11 static_assert macro in <assert.h>. 2016-10-03 20:31:44 +00:00
rkujawa a82859c06b Add mntva(4) man page to dist list. 2016-10-03 18:59:41 +00:00
rkujawa b1cdec8a9d Add man page for mntva(4). 2016-10-03 18:57:54 +00:00
kre fb4c39416a 80 column violation fixes, hopefully minor readability improvements.
No intended functional change.
2016-10-03 17:59:27 +00:00
maya 74618eb97f correct misleading indentation in if 0'd code. 2016-10-03 17:35:38 +00:00
christos beaa4a9608 bump warns 2016-10-03 17:06:58 +00:00
abhinav e108642273 We don't need to parse the sections we don't index, so stop early. Saves few
instructions.
2016-10-03 16:11:11 +00:00
rkujawa a1ee30a19f Add a driver for MNTMN VA2000.
Supports accelerated wsdisplay console and running X via wsfb driver.
2016-10-03 14:26:02 +00:00
abhinav 150a47b73e With the latest release of mandoc, makemandb(8) started to parse some
sections multiple times. This started to happen because, pmdoc_Sh(), the handler function
responsible for parsing the Sh macros, used to recursively go through all the child
nodes and then the next nodes starting from top level Sh block node.
Now, once it has processed all the child nodes of the top level block node,
it moves to the next node, which is the top level block node of the next section and
in this way one call to pmdoc_Sh() was causing a complete pass through the
man page. Since, mandoc(3) calls pmdoc_Sh() for each .Sh macro in the man
page, it would result in parsing some of the sections multiple times.
This never happened with the previous versions of mandoc, so we never noticed.

I've fixed this by starting the parse sequence of the Sh macro from its body, which gurantees
that we will stop once that section ends.

ok christos@
2016-10-03 13:53:39 +00:00
abhinav 1c4ff59f37 Mark the section and md5_hash columns as unindexed in the FTS table, as they are not used for search 2016-10-03 13:36:35 +00:00
skrll cb7dd11fb0 Do not hold the softc lock (IPL_SOFTUSB) unnecessarily and specifically
across ucomparam (and the ucom_param method).  The method can sleep wait-
ing for transfers... any input/output will try to acquire the lock and get
stuck
2016-10-03 13:36:33 +00:00
kamil ba27f5b7d6 Add static_assert macro definition in <assert.h>
This declaration conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.2 Diagnostics <assert.h>

_Static_assert performs compile-time assertion checking.

According to ISO/IEC 9899:201x (draft) 7.2 Diagnostics <assert.h> defines
the static_assert macro which expands to _Static_assert. It's not
conditionalized by NDEBUG like the assert macro.

According to ISO/IEC N3242=11-0012 (C++1x) the <cassert> header shall
define only the assert macro, but not static_assert as it's already part
of the C++11 language.

Allow to define static_assert in C++ prior the C++11 standard. It might be
broken but a nonstandard C++ compiler might support C11-like _Static_assert
feature. Note that it's fatal for g++ 5.4, but it works for clang++ 3.8.1.

Approved by <joerg>.
2016-10-03 12:08:39 +00:00
ozaki-r 8f4376cb6f Fix race condition on ifqueue used by traditional netisr
If a underlying network device driver supports MSI/MSI-X, RX interrupts
can be delivered to arbitrary CPUs. This means that Layer 2 subroutines
such as ether_input (softint) and subsequent Layer 3 subroutines (softint)
which are called via traditional netisr can be dispatched on an arbitrary
CPU. Layer 2 subroutines now run without any locks (expected) and so a
Layer 2 subroutine and a Layer 3 subroutine can run in parallel.

There is a shared data between a Layer 2 routine and a Layer 3 routine,
that is ifqueue and IF_ENQUEUE (from L2) and IF_DEQUEUE (from L3) on it
are racy now.

To fix the race condition, use ifqueue#ifq_lock to protect ifqueue
instead of splnet that is meaningless now.

The same race condition exists in route_intr. Fix it as well.

Reviewed by knakahara@
2016-10-03 11:06:06 +00:00
wiz 89ab2da6d9 Minor improvements, add more markup. 2016-10-03 08:20:12 +00:00
ozaki-r 14c6c81f32 Add missing return 2016-10-03 07:13:29 +00:00
ozaki-r 02711c8802 Fix typo 2016-10-03 01:23:55 +00:00
kamil f39f51a53f c11: Import cc(1) wrapper for C11 2016-10-03 01:04:36 +00:00
kamil b3c98abce0 Import c11(1) - a cc -std=c11 wrapper
This script is similar to c89(1) and c99(1).

It's a NetBSD extension. The c89(1) and c99(1) scripts are part of POSIX.
2016-10-03 01:00:27 +00:00
dholland 226cad50eb Improve diagnostic print seen in PR 51524. 2016-10-03 00:32:37 +00:00
jdolecek 56fb1bd45a add ahci(4) to list 2016-10-02 23:14:19 +00:00
jdolecek a70b44767c make symlink ahci.4 -> ahcisata.4 2016-10-02 22:44:30 +00:00
abhinav 961fb352ab Move information about exit values from DESCRIPTION to EXIT STATUS section.
ok wiz@
2016-10-02 21:06:18 +00:00
abhinav 40e3a09c63 kill(1) is a utility, not a function. 2016-10-02 21:00:54 +00:00
jdolecek c7b1f4eb42 change scsipi_execute_xs() to default to simple tags for !XS_CTL_URGENT
if not specified by caller; this is mostly for documentation purposes
only, as sd(4) and cd(4) explicitly use simple tags already
2016-10-02 19:40:35 +00:00
christos da90486716 more MFREE -> m_free 2016-10-02 19:26:46 +00:00
christos 44548039a1 use __func__ and print the filesystem we are printing the message for. 2016-10-02 19:02:57 +00:00
kamil 40eb0908ed libc: Add <stdalign.h> and <stdnoreturn.h>.
These headers conform C1x (ISO/IEC 9899:201x).
2016-10-02 17:28:57 +00:00
kamil 7db6ba3b08 Import <stdalign.h>
This header conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.15 Alignment <stdalign.h>

According to ISO/IEC 9899:201x (draft) 7.15 Alignment <stdalign.h> defines
four macros:
 - alignas which expands to _Alignas
 - alignof which expands to _Alignof
 - __alignas_is_defined and __alignof_is_defined which both expand to 1

The _Alignas declaration appears as one of the type specifiers to modify
the alignment requirement of the object being declared.

The _Alignof operator is used to query the alignment requirement of its
operand type.

ISO/IEC N3242=11-0012 (C++1x) and ISO/IEC N3797 (C++1y) both note a header
<cstdalign> which defines only __alignas_is_defined and shall not define
the alignas macro. It misses the alignof case as it's probably based on an
older C1x draft, which defined only alignas. Assume that this is a bug in
the standard and treat alignof the same way as alignas in C++11.

Allow to define alignas and alignof in C++ prior the C++11 standard. It
might be broken but a nonstandard C++ compiler might support C11-like
_Alignas and _Alignof. Note that it's fatal for g++(1) v.5.4.
2016-10-02 17:19:00 +00:00
jdolecek 9e58801f20 drop wl_mtx mutex during call to pool_get() with PR_WAITOK
pointed out by riastradh
2016-10-02 16:52:27 +00:00
jdolecek 407be399a4 fix off-by-one in wapbl_write_revocations() - when exiting the write loop,
wd gets set to next unwritten record, not last written one as code assumed;
'lost head!' KASSERT is not triggered any more
2016-10-02 16:44:02 +00:00
kre 5c162fef83 This test works fine on real hardware, but due to PR kern/43997 (qemu
timing problems) fails when run under qemu.   Attempt to compensate
for that (by skipping the problematic test case) when running in qemu.

This should be reverted when the PR gets fixed (either in qemu or in
the NetBSD kernel).
2016-10-02 15:27:32 +00:00
jdolecek c69152bd80 wapbl_write_revocations(): fix use-after-free when writing more then one
block worth of revocations, introduced in previous commit; discovered by
Brad Harder on current-users
2016-10-02 14:38:46 +00:00
christos 9c7db92f68 MFREE -> m_free 2016-10-02 14:16:02 +00:00
kamil 7798b8a775 Import <stdnoreturn.h>
This header conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.23 _Noreturn <stdnoreturn.h>

According to ISO/IEC 9899:201x (draft) <stdnoreturn.> defines the
noreturn macro which expands to _Noreturn.

The _Noreturn keyword appears in a function declaration and specifies
that the function does not return by reaching the end of the function
body.

Design choices:
 - don't implicitly break C++ code including this header with #error
   C++11 offers [[noreturn]] which conflicts with C11 _Noreturn

 - don't check for __STDC_VERSION__, everybody is free to reuse it with
   a nonstandard compiler not conforming to C11 but supporting _Noreturn

   gcc(1) and clang(1) support _Noreturn in -std=c99 and older standards

   this follows <stdbool.h> choice for not checking for C99

 - follow <stdbool.h> and declare the __noreturn_is_defined guard

 - use a standard header guard (_STDNORETURN_H_), similar to <stdbool.h>

Reviewed by <pgoyette> and <joerg>
2016-10-02 13:09:24 +00:00
maya 4b2f24ad42 Simplify. LOONGSON2 and MIPSNNR2 not possible. 2016-10-02 09:06:35 +00:00
kre 0e8fe63eab More adaptation to changed ifconfig output format. 2016-10-02 04:46:07 +00:00
kre 076ee4f8af More adaptation to new ifconfig output format - prefix length is now
appended to the address, rather than a second parameter, so needs to be
deleted if just the bare address is what we want (which it is here).
2016-10-02 04:29:25 +00:00
kre 1b0c0c88db Don't expect ping to complain about sending to a local address
assigned to an interface that's down - instead it just attempts
to send, and the interface never responds (as it would if it were
a remote address).
2016-10-01 22:15:04 +00:00
mrg dfe5471eae use 4-byte style accesses, should hopefully fix PR#37787. 2016-10-01 21:51:52 +00:00
kre 902f3d8946 Return to printing explicit "netmask 0x...." in the case that the
mask set is non-contiguous.   We don't prohibit setting such things
(even if they are basically useless) so they can be set by accident.
	ifconfig ifN 10.0.0.1 netmask 225.0.0.0
produced
	ifN .. inet 10.0.0.1/8
with the previous form (since 225 is 0xE1), now it produces
	ifN ... inet 10.0.0.1 netmask 0xe1000000

If the "netmask" form ever appears in ifconfig output, it (now)
means that the netmask is non-contig, which should make that case
obvious (whther intended, or set by accident)
2016-10-01 20:59:49 +00:00
kre dc63df36ca Compensate for the new world order of ifconfig output format,
and the new default netmask for point to point links.
2016-10-01 20:18:06 +00:00
roy de8590571b Default netmask to /32 for INET on POINTOPOINT links if not specified. 2016-10-01 17:17:20 +00:00
roy d1f35c1abb Adjust tests to new output. Wait for DaD to finish before pinging. 2016-10-01 15:35:22 +00:00
flxd 18cc5a59d9 Add tcu (MI). OK skrll@ 2016-10-01 15:24:35 +00:00
roy 5174f725c2 Modernise the output for the address to address/prefix instead
of differring outputs for INET and INET6.
The hex string of the INET netmask was particulary hard to read.
2016-10-01 15:10:58 +00:00
christos 6ca166beb3 deal with PIE and SSP 2016-10-01 13:57:44 +00:00