263704 Commits

Author SHA1 Message Date
glebius
27d717ee7e Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:11:02 +00:00
glebius
5b96bcf7a2 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:10:58 +00:00
glebius
e0e4e8207e Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:10:52 +00:00
glebius
bf1634bd38 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:10:46 +00:00
glebius
226158378d Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:08:25 +00:00
glebius
7c12abe654 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:08:20 +00:00
glebius
b5b11156aa Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:08:16 +00:00
glebius
ba78c18044 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:08:12 +00:00
glebius
cbc7bb6bb0 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:08:03 +00:00
glebius
46300469b6 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:56 +00:00
glebius
be119b1749 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:53 +00:00
glebius
d06a2c38ba Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:49 +00:00
glebius
1eb153cb26 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:44 +00:00
glebius
cca28bd831 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:40 +00:00
glebius
0192bea570 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:35 +00:00
glebius
5e9ef24921 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:32 +00:00
glebius
cb9389f457 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:28 +00:00
glebius
649327d64a Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:24 +00:00
glebius
43af96f030 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:19 +00:00
glebius
82c6c16e69 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:15 +00:00
glebius
2097d5a248 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:11 +00:00
glebius
4962a54bea Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:07 +00:00
glebius
d6d16b16c9 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:07:02 +00:00
glebius
a282ba9e7b Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:57 +00:00
glebius
4d005b1367 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:53 +00:00
glebius
7a35f9d5c4 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:31 +00:00
glebius
e2629a827f Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:26 +00:00
glebius
faba9462d8 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:23 +00:00
glebius
2c0cc8d7b9 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:19 +00:00
glebius
b74a0d237e Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:15 +00:00
glebius
135942a09a Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:09 +00:00
glebius
4982be8fba Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:06:06 +00:00
glebius
a0e94fa30a Convert to if_foreach_llmaddr() KPI.
This driver seems to have a bug.  The bug was carefully saved during
conversion.  In the al_eth_mac_table_unicast_add() the argument 'addr',
which is the actual address is unused.  So, the function is called as
many times as we have addresses, but with the exactly same argument
list.  This doesn't make any sense, but was preserved.
2019-10-21 18:05:43 +00:00
glebius
0ae83a96f8 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:00:17 +00:00
glebius
bc8d002395 Convert to if_foreach_llmaddr() KPI. 2019-10-21 17:59:53 +00:00
glebius
6a821f4424 Convert to if_foreach_llmaddr() KPI. 2019-10-21 17:59:16 +00:00
glebius
eb077d0a6c Convert to if_foreach_llmaddr() KPI. 2019-10-21 17:59:02 +00:00
kevans
26d6f82958 tuntap(4): restrict scope of net.link.tap.user_open slightly
net.link.tap.user_open has historically allowed non-root users to do devfs
cloning and open /dev/tap* nodes based on permissions. Loosen this up to
make it only allow users to do devfs cloning -- we no longer check it in
tunopen.

This allows tap devices to be created that can actually be opened by a user,
rather than swiftly restricting them to root because the magic sysctl has
not been set.

The sysctl has not yet been completely deprecated, because more thought is
needed for how to handle the devfs cloning case. There is not an easy
suitable replacement for the sysctl there, and more care needs to be placed
in determining whether that's OK or not.

PR:		200185
2019-10-21 14:38:11 +00:00
avg
bd88b63725 debug,kassert.warnings is a statistic, not a tunable
MFC after:	1 week
2019-10-21 12:21:56 +00:00
luporl
023b61aa0a [PPC64] Add minidump support to PowerNV
Implementation of PowerNV specific minidump code.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D21643
2019-10-21 11:56:57 +00:00
bz
7aa807c3cb frag6: import a set of test cases
In order to ensure that changing the frag6 code does not change behaviour
or break code a set of test cases were implemented.

Like some other test cases these use Scapy to generate packets and possibly
wait for expected answers.  In most cases we do check the global and
per interface (netstat) statistics output using the libxo output and grep
to validate fields and numbers.  This is a bit hackish but we currently have
no better way to match a selected number of stats only (we have to ignore
some of the ND6 variables; otherwise we could use the entire list).

Test cases include atomic fragments, single fragments, multi-fragments,
and try to cover most error cases in the code currently.
In addition vnet teardown is tested to not panic.

A separate set (not in-tree currently) of probes were used in order to
make sure that the test cases actually test what they should.

The "sniffer" code was copied and adjusted from the netpfil version
as we sometimes will not get packets or have longer timeouts to deal with.

Sponsored by:	Netflix
2019-10-21 09:33:45 +00:00
bz
691baa0294 frag6: fix vnet teardown leak
When shutting down a VNET we did not cleanup the fragmentation hashes.
This has multiple problems: (1) leak memory but also (2) leak on the
global counters, which might eventually lead to a problem on a system
starting and stopping a lot of vnets and dealing with a lot of IPv6
fragments that the counters/limits would be exhausted and processing
would no longer take place.

Unfortunately we do not have a useable variable to indicate when
per-VNET initialization of frag6 has happened (or when destroy happened)
so introduce a boolean to flag this. This is needed here as well as
it was in r353635 for ip_reass.c in order to avoid tripping over the
already destroyed locks if interfaces go away after the frag6 destroy.

While splitting things up convert the TRY_LOCK to a LOCK operation in
now frag6_drain_one().  The try-lock was derived from a manual hand-rolled
implementation and carried forward all the time.  We no longer can afford
not to get the lock as that would mean we would continue to leak memory.

Assert that all the buckets are empty before destroying to lock to
ensure long-term stability of a clean shutdown.

Reported by:	hselasky
Reviewed by:	hselasky
MFC after:	3 weeks
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D22054
2019-10-21 08:48:47 +00:00
bz
8fb71bf4c9 frag6: add read-only sysctl for nfrags.
Add a read-only sysctl exporting the global number of fragments
(base system and all vnets).  This is helpful to (a) know how many
fragments are currently being processed, (b) if there are possible
leaks, (c) if vnet teardown is not working correctly, and lastly
(d) it can be used as part of test-suits to ensure (a) to (c).

MFC after:	3 weeks
Sponsored by:	Netflix
2019-10-21 08:36:15 +00:00
yuripv
54ea3b59a2 tools/tools/locale: allow POSIX target to be built in parallel
While it's rarely used target, more so a one not used during the
buildworld, it helps when it's not taking hours (literally).
2019-10-21 03:01:05 +00:00
kevans
23c505d84c picobsd: add deprecation notices
Notices appear both in picobsd(8) (near the top for easy notice) and are
also printed to stderr on every invocation of picobsd for visibility.

The tentative date for removal is October 31st, as no volunteers have
stepped forward at all from postings to -arch@ at least.

No objection from:	-arch@
MFC after:	3 days
2019-10-21 00:52:21 +00:00
kevans
70c45ec99a tuntap(4): use cdevpriv w/ dtor for last close instead of d_close
cdevpriv dtors will be called when the reference count on the associated
struct file drops to 0, while d_close can be unreliable for cleaning up
state at "last close" for a number of reasons. As far as tunclose/tundtor is
concerned the difference is minimal, so make the switch.
2019-10-20 22:55:47 +00:00
kevans
58e3081500 tuntap(4): Use make_dev_s to avoid si_drv1 race
This allows us to avoid some dance in tunopen for dealing with the
possibility of dev->si_drv1 being NULL as it's set prior to the devfs node
being created in all cases.

There's still the possibility that the tun device hasn't been fully
initialized, since that's done after the devfs node was created. Alleviate
this by returning ENXIO if we're not to that point of tuncreate yet.

This work is what sparked r353128, full initialization of cloned devices
w/ specified make_dev_args.
2019-10-20 22:39:40 +00:00
kevans
472be58c41 tuntap(4): break out after setting TUN_DSTADDR
This is now the only flag we set in this loop, terminate early.
2019-10-20 21:06:25 +00:00
kevans
1942df0600 tuntap(4): Drop TUN_IASET
This flag appears to have been effectively unused since introduction to
if_tun(4) -- drop it now.
2019-10-20 21:03:48 +00:00
brueffer
c5a2ca8e31 Add a manpage for ng_pipe(4).
Submitted by:	Lutz Donnerhacke <lutz_donnerhacke.de>
Reviewed by:	bcr (previous version)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22067
2019-10-20 20:57:57 +00:00