]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoFix conditional obsolete files entry for WITHOUT_EXAMPLES
gonzo [Thu, 17 Jan 2019 06:34:39 +0000 (06:34 +0000)]
Fix conditional obsolete files entry for WITHOUT_EXAMPLES

Add all the files under /usr/share/examples to the MK_EXAMPLES
section. OLD_DIRS entries are not removed if they're not empty so
prior to this change WITHOUT_EXAMPLES didn't have significant effect
on the updated system.

PR: 228484
Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> (original patch)
MFC after: 1 week

5 years agoAdd optional obsolete files for the installworld without sendmail
gonzo [Thu, 17 Jan 2019 06:22:14 +0000 (06:22 +0000)]
Add optional obsolete files for the installworld without sendmail

Add two more entries for WITHOUT_SENDMAIL install. The /var/spool/clientmqueue
entry would be deleted only if there are no files/dirs in it, so the
content generated during previous lifecycle of the system is safe

PR: 228484
Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru>
MFC after: 1 week

5 years agoTrim whitespace at EoL, use tabs instead of spaces for indent.
kib [Thu, 17 Jan 2019 05:15:25 +0000 (05:15 +0000)]
Trim whitespace at EoL, use tabs instead of spaces for indent.

PR:  235004
Submitted by: Jose Luis Duran <jlduran@gmail.com>
MFC after: 3 days

5 years agoRe-wrap long line after r341827.
kib [Thu, 17 Jan 2019 04:51:05 +0000 (04:51 +0000)]
Re-wrap long line after r341827.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

5 years ago[usb] Add quirk for SmartG2 USB memory key
gonzo [Wed, 16 Jan 2019 22:29:34 +0000 (22:29 +0000)]
[usb] Add quirk for SmartG2 USB memory key

PR: 167001
Submitted by: Daan Vreeken [PA4DAN] <Daan@vitsch.nl>
MFC after: 1 week

5 years agolibedit: Avoid out of bounds read in 'bind' command
jilles [Wed, 16 Jan 2019 21:59:18 +0000 (21:59 +0000)]
libedit: Avoid out of bounds read in 'bind' command

This is CVS revision 1.31 from NetBSD lib/libedit/chartype.c:
Make sure that argv is NULL terminated since functions like tty_stty rely
on it to be so (Gerry Swinslow)

This broke when the wide-character support was enabled in libedit. The
conversion from multibyte to wide-character did not supply the apparently
expected terminating NULL in the new argv array.

PR: 233343
Submitted by: Yuichiro NAITO
Obtained from: NetBSD
MFC after: 1 week

5 years ago[mv] Fix invalid condition in fdt_fixup_ranges
gonzo [Wed, 16 Jan 2019 21:13:50 +0000 (21:13 +0000)]
[mv] Fix invalid condition in fdt_fixup_ranges

Add parentheses to perform assignment before comparison. The prior
condition worked because fdt_parent_addr_cells returns 1 for the DTB
on which fdt_fixup_ranges is called and accidentally par_addr_cells
ends up to be set to the same value.

PR: 210705
Submitted by: David Binderman <dcb314@hotmail.com>
MFC after: 1 week

5 years agoRemove redundant ipfilter version of pcap-bpf.h. As of r214535 it was
cy [Wed, 16 Jan 2019 20:46:39 +0000 (20:46 +0000)]
Remove redundant ipfilter version of pcap-bpf.h. As of r214535 it was
no longer needed.

MFC after: 1 week

5 years agoFix mistake in r343030: move nswbuf calculation back to
glebius [Wed, 16 Jan 2019 20:20:38 +0000 (20:20 +0000)]
Fix mistake in r343030: move nswbuf calculation back to
kern_vfs_bio_buffer_alloc(), because in init_param2() nbuf
isn't really initialized yet.

Pointed out by: bde

5 years agoDo not reserve KVA for paging bufs in vm_ksubmap_init(), since now
glebius [Wed, 16 Jan 2019 20:14:16 +0000 (20:14 +0000)]
Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now
they allocate it in pbuf_init(). This should have been done together
with r343030.

5 years agoawg: Move MAC soft reset to awg_init_locked to avoid soft reset timeout
kevans [Wed, 16 Jan 2019 14:42:33 +0000 (14:42 +0000)]
awg: Move MAC soft reset to awg_init_locked to avoid soft reset timeout

From NetBSD: Since the MAC can get stuck in reset state with no link, ignore
reset timeouts and continue with initializing the device.

Fixes "soft reset timeout" issue at boot with no network cable plugged in.

awg_init may be called multiple times throughout normal interface usage, so
the tx/rx descriptor base address registers must be written after each MAC
reset and are moved as such.

This problem has been observed on FreeBSD, H3/H2+ devices with an internal
PHY (includes OrangePi R1, OrangePi One at least).

Reviewed by: manu, ganbold
Obtained from: NetBSD
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18844

5 years agoiwn(4): (partially) rewrite A-MPDU Tx path
avos [Wed, 16 Jan 2019 12:33:06 +0000 (12:33 +0000)]
iwn(4): (partially) rewrite A-MPDU Tx path

Generic Tx stats fixes:
- do not try to parse "aggregation status" for single frames; send them
to iwn_tx_done() instead;
- try to attach mbuf / node reference pair to reported BA events;
allows to fix reported status for ieee80211_tx_complete() and ifnet counters
(previously all A-MPDU frames were counted as failed - see PR 210211);
requires few more firmware bug workarounds;
- preserve short / long retry counters for wlan_amrr(4)
(disabled for now - causes significant performance degradation).
- Add new IWN_DEBUG_AMPDU debug category.
- Add one more check into iwn_tx_data() to prevent aggregation ring
overflow.
- Workaround 'seqno % 256' != 'current Tx slot' case (until D9195 is not
in the tree).
- Improve watchdog timer updates (previously watchdog check was omitted
when at least one frame was transmitted).
- Stop Tx when memory leak in currently used ring was detected (unlikely
to happen).
- Few other minor fixes.

Was previously tested with:
 - Intel 6205, STA mode (Tx aggregation behaves much better now).
 - Intel 4965AGN, STA mode (still unstable).

PR: 192641, 210211
Reviewed by: adrian, dhw
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D10728

5 years agoImplement dlopenat(3).
des [Wed, 16 Jan 2019 12:12:40 +0000 (12:12 +0000)]
Implement dlopenat(3).

MFC after: 3 weeks

5 years agortwn(4): clear 'basic' rate bit before calculating RTS/CTS rate.
avos [Wed, 16 Jan 2019 12:11:29 +0000 (12:11 +0000)]
rtwn(4): clear 'basic' rate bit before calculating RTS/CTS rate.

Rate tables have this bit set to indicate minimal set of basic rates;
however, it overlappes with MCS bit, so rate2ridx() will treat them as
an 11n rate.

Due to the current rates setup the issue can be reproduced only
in 5GHz band with 11n / protection enabled.

Tested with RTL8821AU, HOSTAP mode.

MFC after: 5 days

5 years agoLimit the user-controllable amount of memory the kernel allocates
tuexen [Wed, 16 Jan 2019 11:33:47 +0000 (11:33 +0000)]
Limit the user-controllable amount of memory the kernel allocates
via IPPROTO_SCTP level socket options.

This issue was found by running syzkaller.

MFC after: 1 week

5 years agortwn_usb(4): add new USB id for RTL8821AU
avos [Wed, 16 Jan 2019 10:33:51 +0000 (10:33 +0000)]
rtwn_usb(4): add new USB id for RTL8821AU

Reported by: Mike Tancsa <mike@sentex.net>
Tested by: Mike Tancsa <mike@sentex.net>
MFC after: 3 days

5 years agoStyle(9) fixes for x86/busdma_bounce.c.
kib [Wed, 16 Jan 2019 06:10:55 +0000 (06:10 +0000)]
Style(9) fixes for x86/busdma_bounce.c.

Remove extra parentheses.  Adjust indents and lines fill.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

5 years agoRemove unused prototype.
kib [Wed, 16 Jan 2019 05:51:03 +0000 (05:51 +0000)]
Remove unused prototype.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

5 years agoImprove iflib busdma(9) KPI use.
kib [Wed, 16 Jan 2019 05:44:14 +0000 (05:44 +0000)]
Improve iflib busdma(9) KPI use.

- Specify BUS_DMA_NOWAIT for bus_dmamap_load() on rx refill, since
  callbacks are not supposed to be used.
- Match tso/non-tso tags to corresponding tx map operations.  Create
  separate tso maps for tx descriptors.  In particular, do not use
  non-tso tag to load, unload, or destroy a map created with tso tag.
- Add missed bus_dmamap_sync() calls.
  Submitted by: marius.

Reported and tested by: pho
Reviewed by: marius
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

5 years agoImplement shmat(2) flag SHM_REMAP.
kib [Wed, 16 Jan 2019 05:15:57 +0000 (05:15 +0000)]
Implement shmat(2) flag SHM_REMAP.

Based on the description in Linux man page.

Reviewed by: markj, ngie (previous version)
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D18837

5 years agoTrim spaces at the end of lines.
kib [Wed, 16 Jan 2019 05:09:29 +0000 (05:09 +0000)]
Trim spaces at the end of lines.

Reviewed by: markj, ngie
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D18837

5 years agoWhitespace.
glebius [Wed, 16 Jan 2019 04:02:08 +0000 (04:02 +0000)]
Whitespace.

5 years agopowerpc: Fix FPU fsqrt emulation special case results
jhibbits [Wed, 16 Jan 2019 03:52:43 +0000 (03:52 +0000)]
powerpc: Fix FPU fsqrt emulation special case results

If fsqrts is emulated with +INF as its argument, the 0 return value causes a
NULL pointer dereference, panicking the system.  Follow the PowerISA and
return +INF with no FP exception.

MFC after: 1 week

5 years agoFix broken uart on Win2016 guest.
araujo [Wed, 16 Jan 2019 03:46:27 +0000 (03:46 +0000)]
Fix broken uart on Win2016 guest.

Obtained from: Joyent (commit/2bf1a940afbd1382faff159e7c93c72779ca10f4)
MFC after: 3 weeks.

5 years agovmm(4): Take steps towards multicore bhyve AMD support
cem [Wed, 16 Jan 2019 02:19:04 +0000 (02:19 +0000)]
vmm(4): Take steps towards multicore bhyve AMD support

vmm's CPUID emulation presented Intel topology information to the guest, but
disabled AMD topology information and in some cases passed through garbage.
I.e., CPUID leaves 0x8000_001[de] were passed through to the guest, but
guest CPUs can migrate between host threads, so the information presented
was not consistent.  This could easily be observed with 'cpucontrol -i 0xfoo
/dev/cpuctl0'.

Slightly improve this situation by enabling the AMD topology feature flag
and presenting at least the CPUID fields used by FreeBSD itself to probe
topology on more modern AMD64 hardware (Family 15h+).  Older stuff is
probably less interesting.  I have not been able to empirically confirm it
is sufficient, but it should not regress anything either.

Reviewed by: araujo (previous version)
Relnotes: sure

5 years agoSuppress excessive error prints in ENA TX hotpath
mw [Wed, 16 Jan 2019 02:13:21 +0000 (02:13 +0000)]
Suppress excessive error prints in ENA TX hotpath

In FreeBSD, this is normal situation that the Tx ring is being full. In
hat case, the packet is put back into drbr and the next attempt to send
it is taken after the cleanup.

Too much logs like this can cause system instability and even cause the
device reset (because keep alive or cleanup could be missed).

To fix that, the log level of this message is changed to debug.

Upon this change upgrade the driver version to v0.8.2.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

5 years agoRemove an IRIX-only source file.
cy [Wed, 16 Jan 2019 02:05:42 +0000 (02:05 +0000)]
Remove an IRIX-only source file.

MFC after: 1 week

5 years ago[rpi] Reorganize spigen(4) overlays for Raspberry Pi
gonzo [Wed, 16 Jan 2019 01:08:34 +0000 (01:08 +0000)]
[rpi] Reorganize spigen(4) overlays for Raspberry Pi

- Remove CS=2 entry from spigen-rpi2 since it didn't work
- Add spigen-rpi3 overlay for Raspberry Pi 3
- Enable rpi overlay modules for GENERIC kernel on aarch64

PR: 233489
Submitted by: bobf@mrp3.com
Reviewed by: db
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D16088

5 years agoUse capsicum_helpers(3) that allow us to simplify the code and its functions
araujo [Wed, 16 Jan 2019 00:39:23 +0000 (00:39 +0000)]
Use capsicum_helpers(3) that allow us to simplify the code and its functions
will return success when the kernel is built without support of
the capability mode.

It is important to note, that I'm taking a more conservative approach
with these changes and it will be done in small steps.

Reviewed by: jhb
MFC after: 6 weeks
Differential Revision: https://reviews.freebsd.org/D18744

5 years agoFix STAGE_DIR.* to handle indirect *DIR variables.
sjg [Tue, 15 Jan 2019 23:37:49 +0000 (23:37 +0000)]
Fix STAGE_DIR.* to handle indirect *DIR variables.

bsd.{files,conf}.mk recently changed to allow *DIR to name a variable
rather than a path.
STAGE_DIR.* need to adapt.

Reviewed by: bdrewery
Differential Revision: D18847

5 years agoUse .undef per variable
sjg [Tue, 15 Jan 2019 23:35:53 +0000 (23:35 +0000)]
Use .undef per variable

Attempting to expand a variable to a list of vars to .undef
does not actually work.

Reviewed by: bdrewery
Differential Revision: D17251

5 years agoWith the sync from Dragonfly BSD in r318216 a bug slipped in (also still present
bz [Tue, 15 Jan 2019 22:31:54 +0000 (22:31 +0000)]
With the sync from Dragonfly BSD in r318216 a bug slipped in (also still present
upstream it seems).

The tlv variable was changed to a pointer but the advancement of the data pointer
was left as sizeof(tlv).  While the sizeof the (now) pointer equals the
sizeof 2 x uint32_t (size of the struct) on 64bit platforms, on 32bit platforms
the size of the advancement of the data pointer was wrong leading to
firmware load issues.

Correctly advance the data pointer by the size of the structure and not by
the size of a pointer.

PR: 219683
Submitted by: waddlesplash gamil.com (Haiku) on irc
MFC after: 1 week

5 years ago[drm] Fix off-by-one error when accessing driver-specific ioctl handlers array
gonzo [Tue, 15 Jan 2019 21:06:58 +0000 (21:06 +0000)]
[drm] Fix off-by-one error when accessing driver-specific ioctl handlers array

PR: 231513
Submitted by: Young_X <YangX92@hotmail.com>
Approved by: imp
MFC after: 1 week

5 years agoFix compilation failures on different arches that have vm_machdep.c not
glebius [Tue, 15 Jan 2019 19:33:47 +0000 (19:33 +0000)]
Fix compilation failures on different arches that have vm_machdep.c not
aware of counter_u64_t by including counter.h into uma_int.h. I'm not
happy about this inclusion, but it fixes compilation ASAP.

5 years agoReject new sessions if the necessary queues aren't initialized.
jhb [Tue, 15 Jan 2019 18:53:45 +0000 (18:53 +0000)]
Reject new sessions if the necessary queues aren't initialized.

ccr reuses the control queue and first rx queue from the first port on
each adapter.  The driver cannot send requests until those queues are
initialized.  Refuse to create sessions for now if the queues aren't
ready.  This is a workaround until cxgbe allocates one or more
dedicated queues for ccr.

PR: 233851
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D18478

5 years agostyle(9): break long line.
glebius [Tue, 15 Jan 2019 18:50:11 +0000 (18:50 +0000)]
style(9): break long line.

5 years agoRemove harmless leftover from code that cycles over zone's kegs. Just use +
glebius [Tue, 15 Jan 2019 18:49:31 +0000 (18:49 +0000)]
Remove harmless leftover from code that cycles over zone's kegs. Just use +
instead of +=. There is no functional change.

5 years agoThis was missed in r343051: make uz_allocs, uz_frees and uz_fails counter(9).
glebius [Tue, 15 Jan 2019 18:47:19 +0000 (18:47 +0000)]
This was missed in r343051: make uz_allocs, uz_frees and uz_fails counter(9).

5 years agoOnly do uz_items accounting for zones that have a limit set in uz_max_items.
glebius [Tue, 15 Jan 2019 18:32:26 +0000 (18:32 +0000)]
Only do uz_items accounting for zones that have a limit set in uz_max_items.
This reduces amount of locking required for these zones.

Also, for cache only zones (UMA_ZFLAG_CACHE) accounting uz_items wasn't
correct at all, since they may allocate items directly from their backing
store and then free them via UMA underflowing uz_items.

Tested by: pho

5 years agoMake uz_allocs, uz_frees and uz_fails counter(9). This removes some
glebius [Tue, 15 Jan 2019 18:24:34 +0000 (18:24 +0000)]
Make uz_allocs, uz_frees and uz_fails counter(9). This removes some
atomic updates and reduces amount of data protected by zone lock.

During startup point these fields to EARLY_COUNTER. After startup
allocate them for all early zones.

Tested by: pho

5 years agoUpdate the note about the need for COMPAT_FREEBSD<n> kernel options.
jhb [Tue, 15 Jan 2019 18:20:20 +0000 (18:20 +0000)]
Update the note about the need for COMPAT_FREEBSD<n> kernel options.

Rather than mentioning the requirement for 4.x binaries but not
explaining why (it was assuming an upgrade from 4.x to 5.0-current),
explain when compat options are needed (for running existing host
binaries) in a more general way while using a more modern example
(COMPAT_FREEBSD11 for 11.x binaries).  While here, explicitly mention
that a GENERIC kernel should always work.

Reported by: Robert Huff <roberthuff@rcn.com>
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D18740

5 years agoFix window update issue when scaling disabled
shurd [Tue, 15 Jan 2019 17:40:19 +0000 (17:40 +0000)]
Fix window update issue when scaling disabled

When the TCP window scale option is not used, and the window
opens up enough in one soreceive, a window update will not be sent.

For example, if recwin == 65535, so->so_rcv.sb_hiwat >= 262144, and
so->so_rcv.sb_hiwat <= 524272, the window update will never be sent.
This is because recwin and adv are clamped to TCP_MAXWIN << tp->rcv_scale,
and so will never be >= so->so_rcv.sb_hiwat / 4
or <= so->so_rcv.sb_hiwat / 8.

This patch ensures a window update is sent if the window opens by
TCP_MAXWIN << tp->rcv_scale, which should only happen when the window
size goes from zero to the max expressible.

This issue looks like it was introduced in r306769 when recwin was clamped
to TCP_MAXWIN << tp->rcv_scale.

MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D18821

5 years agoscp: disallow empty or current directory
emaste [Tue, 15 Jan 2019 15:35:14 +0000 (15:35 +0000)]
scp: disallow empty or current directory

Obtained from: OpenBSD scp.c 1.198
Security: CVE-2018-20685
Sponsored by: The FreeBSD Foundation

5 years agoEnsure the I-Cache is correctly handled in arm64_icache_sync_range
andrew [Tue, 15 Jan 2019 09:48:18 +0000 (09:48 +0000)]
Ensure the I-Cache is correctly handled in arm64_icache_sync_range

The cache_handle_range macro to handle the arm64 instruction and data
cache operations would return when it was complete. This causes problems
for arm64_icache_sync_range and arm64_icache_sync_range_checked as they
assume they can execute the i-cache handling instruction after it has been
called.

Fix this by making this assumption correct.

While here add missing instruction barriers and adjust the style to
match the rest of the assembly.

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18838

5 years agopf: silence a runtime warning
kp [Tue, 15 Jan 2019 08:59:51 +0000 (08:59 +0000)]
pf: silence a runtime warning

Sometimes, for negated tables, pf can log 'pfr_update_stats: assertion failed'.
This warning does not clarify anything for users, so silence it, just as
OpenBSD has.

PR: 234874
MFC after: 1 week

5 years agoUse TD_IS_IDLETHREAD instead of unrolled version.
delphij [Tue, 15 Jan 2019 06:44:37 +0000 (06:44 +0000)]
Use TD_IS_IDLETHREAD instead of unrolled version.

MFC after: 2 weeks

5 years agoFix compilation on 32-bit.
glebius [Tue, 15 Jan 2019 03:43:46 +0000 (03:43 +0000)]
Fix compilation on 32-bit.

5 years agoRemove pbuf(9) manual page that is now nearly 100% outdated.
glebius [Tue, 15 Jan 2019 01:19:29 +0000 (01:19 +0000)]
Remove pbuf(9) manual page that is now nearly 100% outdated.

5 years agoAllocate pager bufs from UMA instead of 80-ish mutex protected linked list.
glebius [Tue, 15 Jan 2019 01:02:16 +0000 (01:02 +0000)]
Allocate pager bufs from UMA instead of 80-ish mutex protected linked list.

o In vm_pager_bufferinit() create pbuf_zone and start accounting on how many
  pbufs are we going to have set.
  In various subsystems that are going to utilize pbufs create private zones
  via call to pbuf_zsecond_create(). The latter calls uma_zsecond_create(),
  and sets a limit on created zone. After startup preallocate pbufs according
  to requirements of all pbuf zones.

  Subsystems that used to have a private limit with old allocator now have
  private pbuf zones: md(4), fusefs, NFS client, smbfs, VFS cluster, FFS,
  swap, vnode pager.

  The following subsystems use shared pbuf zone: cam(4), nvme(4), physio(9),
  aio(4). They should have their private limits, but changing that is out of
  scope of this commit.

o Fetch tunable value of kern.nswbuf from init_param2() and while here move
  NSWBUF_MIN to opt_param.h and eliminate opt_swap.h, that was holding only
  this option.
  Default values aren't touched by this commit, but they probably should be
  reviewed wrt to modern hardware.

This change removes a tight bottleneck from sendfile(2) operation, that
uses pbufs in vnode pager. Other pagers also would benefit from faster
allocation.

Together with: gallatin
Tested by: pho

5 years ago[led] propagate error from set_led() to the caller
gonzo [Tue, 15 Jan 2019 00:52:41 +0000 (00:52 +0000)]
[led] propagate error from set_led() to the caller

Do not lose error condition by always returning 0 from set_led.
None of the calls to set_led checks for return value at the moment so
none of API consumers in base is affected.

PR: 231567
Submitted by: Bertrand Petit <bsdpr@phoe.frmug.org>
MFC after: 1 week

5 years ago[mv_pci] Increase default PCI space size for mv_pci
gonzo [Tue, 15 Jan 2019 00:37:37 +0000 (00:37 +0000)]
[mv_pci] Increase default PCI space size for mv_pci

mv_pci driver reads PCI memory window layout from DTB data and if the
data is incomplete falls back to default value. The value is too small
to fit two PCI spaces for mwlwifi devices on WRT3200ACM so the resource
allocation for them fails. Increase the default to 4Mb from 1Mb so
the devices can be properly attached.

MFC after: 1 week

5 years agoAdd flag LK_NEW for lockinit() that is converted to LO_NEW and passed
glebius [Tue, 15 Jan 2019 00:35:19 +0000 (00:35 +0000)]
Add flag LK_NEW for lockinit() that is converted to LO_NEW and passed
down to lock_init().  This allows for lockinit() on a not prezeroed
memory.

5 years agoo Move zone limit from keg level up to zone level. This means that now
glebius [Tue, 15 Jan 2019 00:02:06 +0000 (00:02 +0000)]
o Move zone limit from keg level up to zone level. This means that now
  two zones sharing a keg may have different limits. Now this is going
  to work:

  zone = uma_zcreate();
  uma_zone_set_max(zone, limit);
  zone2 = uma_zsecond_create(zone);
  uma_zone_set_max(zone2, limit2);

  Kegs no longer have uk_maxpages field, but zones have uz_items. When
  set, it may be rounded up to minimum possible CPU bucket cache size.
  For small limits bucket cache can also be reconfigured to be smaller.
  Counter uz_items is updated whenever items transition from keg to a
  bucket cache or directly to a consumer. If zone has uz_maxitems set and
  it is reached, then we are going to sleep.

o Since new limits don't play well with multi-keg zones, remove them. The
  idea of multi-keg zones was introduced exactly 10 years ago, and never
  have had a practical usage. In discussion with Jeff we came to a wild
  agreement that if we ever want to reintroduce the idea of a smart allocator
  that would be able to choose between two (or more) totally different
  backing stores, that choice should be made one level higher than UMA,
  e.g. in malloc(9) or in mget(), or whatever and choice should be controlled
  by the caller.

o Sleeping code is improved to account number of sleepers and wake them one
  by one, to avoid thundering herd problem.

o Flag UMA_ZONE_NOBUCKETCACHE removed, instead uma_zone_set_maxcache()
  KPI added. Having no bucket cache basically means setting maxcache to 0.

o Now with many fields added and many removed (no multi-keg zones!) make
  sure that struct uma_zone is perfectly aligned.

Reviewed by: markj, jeff
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D17773

5 years agomsun: reduce diff between src/e_j0.c and src/e_j0f.c
pfg [Mon, 14 Jan 2019 15:48:35 +0000 (15:48 +0000)]
msun: reduce diff between src/e_j0.c and src/e_j0f.c

PR: 229501
MFC after: 1 week

5 years agoThis new version of bluetooth-config.sh tries to follow the style of other
lme [Mon, 14 Jan 2019 08:23:47 +0000 (08:23 +0000)]
This new version of bluetooth-config.sh tries to follow the style of other
shell scripts in base, removes the bogus "copyleft", adds the BeerWare license
header and uses rc.subr(8) new 'enable' keyword for adding entries in
rc.conf(5).

Submitted by: erdgeist <erdgeist@erdgeist.org>
Approved by: bapt
MFC after: 2 weeks

5 years agoHandle overflow in calculating max kmem size.
kib [Mon, 14 Jan 2019 07:31:19 +0000 (07:31 +0000)]
Handle overflow in calculating max kmem size.

vm_kmem_size is u_long, and it might be not capable of holding page
count times PAGE_SIZE, even when scaled down by VM_KMEM_SIZE_SCALE.  As
bde reported, 12G PAE config ends up with zero for kmem size.

Explicitly check for overflow and clamp kmem size at vm_kmem_size_max.
If we end up at zero size because VM_KMEM_SIZE_MAX is not defined,
panic with clear explanation rather then failing in a way which is
hard to relate.

Reported by: bde, pho
Tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D18767

5 years agoUse ${SRCTOP}/contrib/com_err/com_err.h instead of the installed com_err.h.
nyan [Mon, 14 Jan 2019 06:34:54 +0000 (06:34 +0000)]
Use ${SRCTOP}/contrib/com_err/com_err.h instead of the installed com_err.h.
This fixes build when com_err.h is not installed.

PR: 234691
MFC after: 1 week

5 years agoAdd four kerberos CLI utilities to OptionalObsoleteFiles.inc
gonzo [Mon, 14 Jan 2019 03:13:31 +0000 (03:13 +0000)]
Add four kerberos CLI utilities to OptionalObsoleteFiles.inc

Add asn1_compile, make-roken, kcc, and slc to the OptionalObsoleteFiles.inc
so they would be removed during delete-old stage if the new world is built
without Kerberos support.

PR: 230725
Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru>
MFC after: 1 week

5 years agoAdd Dell Chromebook to the list of devices with E820 extmem quirk enabled
gonzo [Mon, 14 Jan 2019 01:30:48 +0000 (01:30 +0000)]
Add Dell Chromebook to the list of devices with E820 extmem quirk enabled

Just like for Acer C270 chromebook the E820 extmem workaround is required for
FreeBSD to boot on Dell chromebook.

PR: 204916
Submitted by: Keith White <kwhite@site.uottawa.ca>
MFC after: 1 week

5 years agoDon't forget to add the needed #includes.
cognet [Sun, 13 Jan 2019 23:41:56 +0000 (23:41 +0000)]
Don't forget to add the needed #includes.

Pointy hat to: cognet

5 years agoIntroduce cpu_icache_sync_range_checked(), that does the same thing as
cognet [Sun, 13 Jan 2019 23:29:46 +0000 (23:29 +0000)]
Introduce cpu_icache_sync_range_checked(), that does the same thing as
cpu_icache_sync_range(), except that it sets pcb_onfault to catch any page
fault, as doing cache maintenance operations for non-mapped generates a
data abort, and use it in freebsd32_sysarch(), so that a userland program
attempting to sync the icache with unmapped addresses doesn't crash the
kernel.

Spotted out by: andrew

5 years agoHandle SIGIO for listening sockets
jah [Sun, 13 Jan 2019 20:33:54 +0000 (20:33 +0000)]
Handle SIGIO for listening sockets

r319722 separated struct socket and parts of the socket I/O path into
listening-socket-specific and dataflow-socket-specific pieces.  Listening
socket connection notifications are now handled by solisten_wakeup() instead
of sowakeup(), but solisten_wakeup() does not currently post SIGIO to the
owning process.

PR: 234258
Reported by: Kenneth Adelman
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D18664

5 years agoImpleent COMPAT_FREEBSD32 for arm64.
cognet [Sun, 13 Jan 2019 19:49:46 +0000 (19:49 +0000)]
Impleent COMPAT_FREEBSD32 for arm64.
This is based on early work by andrew@.

5 years agonet80211: provide rate validation for injected frames.
avos [Sun, 13 Jan 2019 06:01:36 +0000 (06:01 +0000)]
net80211: provide rate validation for injected frames.

There may be various side effects (device timeout, firmware and / or
kernel panic) when an invalid (or inapplicable - e.g., an MCS rate
for 11g-only device) is set; check rates before sending the frame to
the driver.

How-to-reproduce:
Set an MCS (real or bogus - with 0x80 bit set) rate in ibp_rate0 field
for any device that uses ieee80211_isratevalid() for rate checks -
rum(4), run(4), ural(4), bwi(4) or ral(4); if kernel is compiled
with INVARIANTS the check will result in "rate %d is basic/mcs?" panic.

Tested with WUSB54GC (rum(4)), AP mode.

MFC after: 1 week

5 years agopf tests: Test PR 229241
kp [Sun, 13 Jan 2019 05:31:53 +0000 (05:31 +0000)]
pf tests: Test PR 229241

pfctl has an issue with 'set skip on <group>', which causes inconsistent
behaviour: the set skip directive works initially, but does not take
effect when the same rules are re-applied.

PR: 229241
MFC after: 1 week

5 years agopfctl: Fix 'set skip' handling for groups
kp [Sun, 13 Jan 2019 05:30:26 +0000 (05:30 +0000)]
pfctl: Fix 'set skip' handling for groups

When we skip on a group the kernel will automatically skip on the member
interfaces. We still need to update our own cache though, or we risk
overruling the kernel afterwards.

This manifested as 'set skip' working initially, then not working when
the rules were reloaded.

PR: 229241
MFC after: 1 week

5 years agopowerpcspe: Correct SPE high-component loading
jhibbits [Sun, 13 Jan 2019 04:51:24 +0000 (04:51 +0000)]
powerpcspe: Correct SPE high-component loading

Don't clobber the low part of the register restoring the high component of.
This could lead to very bad behavior if it's an ABI-affected register.

While here, also mark the asm volatile in the SPE high save case, to match
the load case.

Reported by: Branden Bergren (git_bdragon.rtk0.net)
MFC after: 1 week

5 years agoFix rtld-elf compilation warning for powerpc64 ELFv2 ABI
jhibbits [Sun, 13 Jan 2019 02:33:20 +0000 (02:33 +0000)]
Fix rtld-elf compilation warning for powerpc64 ELFv2 ABI

Summary: reloc_jmpslot function parameter 'defobj' is not used when using ELFv2
ABI

Submitted by: alfredo.junior_eldorado.org.br
Reviewed By: kib, git_bdragon.rtk0.net, emaste, jhibbits
Differential Revision: https://reviews.freebsd.org/D18808

5 years agoAdd AT_HWCAP / AT_HWCAP2 to elf64_sysvec_v2.
jhibbits [Sun, 13 Jan 2019 02:28:37 +0000 (02:28 +0000)]
Add AT_HWCAP / AT_HWCAP2 to elf64_sysvec_v2.

Summary:
I was working on implementing ifuncs on powerpc64 elfv2 today, and I suddenly
realized that the reason I was having so much trouble with AT_HWCAP and
AT_HWCAP2 is they are missing from the sysentvec.

After adding them, the auxv is being filled like it should.

Submitted by: Brandon Bergren (git_bdragon.rtk0.net)
Differential Revision: https://reviews.freebsd.org/D18575

5 years agoRegenerate sysent files after having modified syscalls.master.
cognet [Sun, 13 Jan 2019 00:38:55 +0000 (00:38 +0000)]
Regenerate sysent files after having modified syscalls.master.

5 years agoamd64 is the only arch that doesn't require padding for 32bits syscalls, so
cognet [Sun, 13 Jan 2019 00:37:31 +0000 (00:37 +0000)]
amd64 is the only arch that doesn't require padding for 32bits syscalls, so
instead of listing every arch thar requires it, just exclude amd64.

5 years agoInstead of using an incomplete list of platforms that uses 64bits time_t
cognet [Sun, 13 Jan 2019 00:19:15 +0000 (00:19 +0000)]
Instead of using an incomplete list of platforms that uses 64bits time_t
in 32bits mode, special case amd64, as i386 is the only arch that still
uses 32bits time_t.

5 years agoamdtemp(4): Add support for Family 15h, Model >=60h
cem [Sat, 12 Jan 2019 22:36:33 +0000 (22:36 +0000)]
amdtemp(4): Add support for Family 15h, Model >=60h

Family 15h is a bit of an oddball.  Early models used the same temperature
register and spec (mostly[1]) as earlier CPU families.

Model 60h-6Fh and 70-7Fh use something more like Family 17h's Service
Management Network, communicating with it in a similar fashion.  To support
them, add support for their version of SMU indirection to amdsmn(4) and use
it in amdtemp(4) on these models.

While here, clarify some of the deviceid macros in amdtemp(4) that were
added with arbitrary, incorrect family numbers, and remove ones that were
not used.  Additionally, clarify intent and condition of heterogenous
multi-socket system detection.

[1]: 15h adds the "adjust range by -49°C if a certain condition is met,"
which previous families did not have.

Reported by: D. C. <tjoard AT gmail.com>
PR: 234657
Tested by: D. C. <tjoard AT gmail.com>

5 years agopowerpc/pseries: Cache the IPI vector to avoid the common static lookup
jhibbits [Sat, 12 Jan 2019 22:10:31 +0000 (22:10 +0000)]
powerpc/pseries: Cache the IPI vector to avoid the common static lookup

The IPI vector is static, and happens to be the most common interrupt by far
on some systems.  Rather than searching for the interrupt every time, cache
the index.

This appears to yield a small performance boost, of about 8% reduction in
buildworld times, on my POWER9 system, when paired with r342975.

5 years agopowerpc: Add opaque 'private data' to interrupt vectors
jhibbits [Sat, 12 Jan 2019 22:05:42 +0000 (22:05 +0000)]
powerpc: Add opaque 'private data' to interrupt vectors

The XICS and XIVE need extra data beyond irq and vector.  Rather than
performing a separate search, it's better for the general interrupt facility
to hold a private pointer, since the search already must be done anyway at
that level.

5 years agoCreate crtsavres.o for powerpc builds
jhibbits [Sat, 12 Jan 2019 21:29:54 +0000 (21:29 +0000)]
Create crtsavres.o for powerpc builds

Summary:
GCC expects to link in a crtsavres.o on powerpc platforms.  On
powerpc64 this is an empty file, but on powerpc and powerpcspe this does contain
some save/restore functions, which may not actually be necessary for newer
modern GCC and clang.  This appeases the in-tree gcc, though, and is needed in
order to switch to the BSD CRTRBEGIN.

PR: 233751
Reviewed By: andrew
Differential Revision: https://reviews.freebsd.org/D18826

5 years agoFix the check for the offset of td_frame and td_emuldata in struct thread.
andrew [Sat, 12 Jan 2019 20:41:57 +0000 (20:41 +0000)]
Fix the check for the offset of td_frame and td_emuldata in struct thread.

Pointy hat: andrew
Sponsored by: DARPA, AFRL

5 years agoDisable FTS3, FTS4, and RTREE in bundled and private sqlite3.
cy [Sat, 12 Jan 2019 17:56:23 +0000 (17:56 +0000)]
Disable FTS3, FTS4, and RTREE in bundled and private sqlite3.

Suggested by: delphij@
Reviewed by: delphij@ (for secteam@)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18786

5 years agoAdd missing documentation for dev.acpi_ibm.0.mic_led added in r335304
allanjude [Sat, 12 Jan 2019 17:52:52 +0000 (17:52 +0000)]
Add missing documentation for dev.acpi_ibm.0.mic_led added in r335304

PR: 229074
X-MFC-With: 335304
Submitted by: Ali Abdallah <aliovx@gmail.com>

5 years agonet80211: fix possible panic for some drivers after r342211
avos [Sat, 12 Jan 2019 14:57:12 +0000 (14:57 +0000)]
net80211: fix possible panic for some drivers after r342211

Check if rate control structures were allocated before trying to
access them in various places; this was possible before on
allocation failure (unlikely), but was revealed after r342211
where allocation was deferred.

In case if driver uses wlan_amrr(4) and it is loaded it
is possible to reproduce the panic via

sysctl net.wlan.<number>.rate_stats

(for wlan0 the number will be 0).

Tested with: RTL8188EE, AP mode + RTL8188CUS, STA mode.

MFC after: 3 days

5 years agoFix indentation in ruptime command output for hosts in the "down" state.
nyan [Sat, 12 Jan 2019 12:57:32 +0000 (12:57 +0000)]
Fix indentation in ruptime command output for hosts in the "down" state.

PR: 234239
MFC after: 1 week

5 years agoSync with OpenBSD.
nyan [Sat, 12 Jan 2019 12:35:02 +0000 (12:35 +0000)]
Sync with OpenBSD.

bc.y: Rev 1.50
- write parse errors to stderr, prompted by Martijn Dekker
- we're only interactive if stdout en stderr are a tty as well as stdin

PR: 234430
Obtained from: OpenBSD
MFC after: 1 week

5 years agoTemporarily disable the kcov tests. Not all architectures have
andrew [Sat, 12 Jan 2019 11:50:39 +0000 (11:50 +0000)]
Temporarily disable the kcov tests. Not all architectures have
atomic_store_64 and atomic_store_64.

Sponsored by: DARPA, AFRL

5 years agoAdd support for the Clang Coverage Sanitizer in the kernel (KCOV).
andrew [Sat, 12 Jan 2019 11:21:28 +0000 (11:21 +0000)]
Add support for the Clang Coverage Sanitizer in the kernel (KCOV).

When building with KCOV enabled the compiler will insert function calls
to probes allowing us to trace the execution of the kernel from userspace.
These probes are on function entry (trace-pc) and on comparison operations
(trace-cmp).

Userspace can enable the use of these probes on a single kernel thread with
an ioctl interface. It can allocate space for the probe with KIOSETBUFSIZE,
then mmap the allocated buffer and enable tracing with KIOENABLE, with the
trace mode being passed in as the int argument. When complete KIODISABLE
is used to disable tracing.

The first item in the buffer is the number of trace event that have
happened. Userspace can write 0 to this to reset the tracing, and is
expected to do so on first use.

The format of the buffer depends on the trace mode. When in PC tracing just
the return address of the probe is stored. Under comparison tracing the
comparison type, the two arguments, and the return address are traced. The
former method uses on entry per trace event, while the later uses 4. As
such they are incompatible so only a single mode may be enabled.

KCOV is expected to help fuzzing the kernel, and while in development has
already found a number of issues. It is required for the syzkaller system
call fuzzer [1]. Other kernel fuzzers could also make use of it, either
with the current interface, or by extending it with new modes.

A man page is currently being worked on and is expected to be committed
soon, however having the code in the kernel now is useful for other
developers to use.

[1] https://github.com/google/syzkaller

Submitted by: Mitchell Horne <mhorne063@gmail.com> (Earlier version)
Reviewed by: kib
Testing by: tuexen
Sponsored by: DARPA, AFRL
Sponsored by: The FreeBSD Foundation (Mitchell Horne)
Differential Revision: https://reviews.freebsd.org/D14599

5 years agosnd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode.
hselasky [Sat, 12 Jan 2019 11:14:59 +0000 (11:14 +0000)]
snd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode.

Extend the vendor class USB audio quirk to cover devices without
the USB audio control descriptor.

PR: 234794
MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agocxgbe(4): Move some INTx specific code to a more appropriate place.
np [Sat, 12 Jan 2019 04:44:25 +0000 (04:44 +0000)]
cxgbe(4): Move some INTx specific code to a more appropriate place.

5 years agoAdd Linux compatibility support for `SC_NPROCESSORS_{CONF,ONLN}` as `_SC_NPROCESSORS_...
ngie [Fri, 11 Jan 2019 22:28:18 +0000 (22:28 +0000)]
Add Linux compatibility support for `SC_NPROCESSORS_{CONF,ONLN}` as `_SC_NPROCESSORS_{CONF,ONLN}`

The goal of this change is to make it easier to use getconf to query
the number of available processors.

Sadly it's unclear per POSIX, which form (with a preceding _ or
lacking it) is correct. I will bring this up on the Austin Group list so
this point is clarified for implementors that might rely on this getconf
variable in future POSIX spec versions.

This is something I noticed when trying to import GoogleTest to FreeBSD
as one of the CI scripts uses this variable on Linux.

MFC after: 2 weeks
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D18640

5 years agoAdd man page for device_delete_children.
imp [Fri, 11 Jan 2019 19:05:40 +0000 (19:05 +0000)]
Add man page for device_delete_children.

Submitted by: Jeroen Ruigrok van der Werven
Differential Revision: https://reviews.freebsd.org/D18452

5 years agoFix duplication.
bapt [Fri, 11 Jan 2019 16:18:23 +0000 (16:18 +0000)]
Fix duplication.

The patch adding the manpage was probably applied twice, so it resulted
in duplication of the manpage

5 years agoRemove accessing remote node and domain objects while processing cam actions.
ram [Fri, 11 Jan 2019 15:59:24 +0000 (15:59 +0000)]
Remove accessing remote node and domain objects while processing cam actions.
Issue:
  ocs_fc(4) driver panics. It's induced by setting the port_state
sysctl to offline, then online, then offline, then online, and so
forth and so on in rapid succession.

Reason:
  While we set the port_state to online fc discovery will start and OS
is enumerating the target discs by calling ocs_action(),  then set the
port state to "offline" which deletes domain/sport/nodes.

  In ocs_action()->XPT_GET_TRAN_SETTINGS we are accessing the remote
node which can be invalid to get the wwpn, wwnn and port.

Fix:
  Removed accessing of remote node and domain in some ocs_action() cases.
  Populated the required values from ocs_fcport.
  This removes the dependency of node and domain structures while
processing XPT_PATH_INQ and XPT_GET_TRAN_SETTINGS.
   We will invalidate the target entries after the device lost
timeout(30 seconds).

Approved by: ken, mav
MFC after: 3 weeks

5 years agoAdd `bluetooth-config` script to simplify setting up bluetooth connections to
lme [Fri, 11 Jan 2019 15:52:09 +0000 (15:52 +0000)]
Add `bluetooth-config` script to simplify setting up bluetooth connections to
devices like mice, keyboards, bt-audio, ...

This script currently allows scanning for nearby devices, adds one to
/etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an
entry to bthidd's configs, as well.

Submitted by: erdgeist <erdgeist@erdgeist.org>
Approved by: bapt
MFC after: 2 weeks
Differential Revision: D3778
Reviewers: bapt, emax

5 years agoFix spelling of identifier
rgrimes [Fri, 11 Jan 2019 14:21:59 +0000 (14:21 +0000)]
Fix spelling of identifier

Approved by: phk (mentor)
MFC after: 3 days

5 years agoFix the location of td->td_frame at the top of the kernel stack.
andrew [Fri, 11 Jan 2019 11:32:46 +0000 (11:32 +0000)]
Fix the location of td->td_frame at the top of the kernel stack.

In cpu_thread_alloc we would allocate space for the trap frame at the top of
the kernel stack. This is just below the pcb, however due to a missing cast
the pointer arithmetic would use the pcb size, not the trapframe size. As
the pcb is larger than the trapframe this is safe, however later in cpu_fork
we include the case leading to the two disagreeing on the location.

Fix by using the same arithmetic in both locations.

Found by: An early KASAN patch
Sponsored by: DARPA, AFRL

5 years agoImport DTS from Linux 4.20
manu [Fri, 11 Jan 2019 09:40:34 +0000 (09:40 +0000)]
Import DTS from Linux 4.20

MFC after: 2 months

5 years agoImport DTS includes from 4.19
manu [Fri, 11 Jan 2019 09:20:18 +0000 (09:20 +0000)]
Import DTS includes from 4.19
This was missed in r340337

MFC after: 3 days

5 years agocpucontrol: check for the supposed firmware file type and skip
kib [Fri, 11 Jan 2019 08:35:49 +0000 (08:35 +0000)]
cpucontrol: check for the supposed firmware file type and skip
non-regular entry.

do_update() skips entries with DT_DIR type.  This does not eliminate
other entries that might exist in the directory.  More, since NFS
might fill d_type with DT_UNKNOWN, dot and dotdot entries are not
skipped, then mmap(2) call failed for them when update microcode files
are located on NFS.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

5 years agoFix errno values returned from DUMMY_XATTR linuxulator calls
fsu [Fri, 11 Jan 2019 07:58:25 +0000 (07:58 +0000)]
Fix errno values returned from DUMMY_XATTR linuxulator calls

Reported by: weiss@uni-mainz.de
Reviewed by: markj
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D18812

5 years agoImport DTS files from Linux 4.20
manu [Fri, 11 Jan 2019 05:27:30 +0000 (05:27 +0000)]
Import DTS files from Linux 4.20

5 years agoChange ZFS quotas to return EINVAL when not present (matches man page).
sef [Fri, 11 Jan 2019 02:53:46 +0000 (02:53 +0000)]
Change ZFS quotas to return EINVAL when not present (matches man page).

UFS will return EINVAL when quotas are not enabled on a filesystem; ZFS'
equivalent involves not having quotas (there is not way to enable or disable
quotas as such).  My initial implementation had it return ENOENT, but
quotactl(2) indicates EINVAL is more appropriate.

MFC after: 2 weeks
Approved by: mav
Reviewed by: markj
Reported by: Emrion <kmachine@free.fr>
Sponsored by: iXsystems Inc
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234413

5 years agoRelax requirement to packet size of CARP protocol and remove version check.
ae [Fri, 11 Jan 2019 01:54:15 +0000 (01:54 +0000)]
Relax requirement to packet size of CARP protocol and remove version check.

CARP shares protocol number 112 with VRRP (RFC 5798). And the size of
VRRP packet may be smaller than CARP. ipfw_chk() does m_pullup() to at
least sizeof(struct carp_header) and can fail when packet is VRRP. This
leads to packet drop and message about failed pullup attempt.
Also, RFC 5798 defines version 3 of VRRP protocol, this version number
also unsupported by CARP and such check leads to packet drop.

carp_input() does its own checks for protocol version and packet size,
so we can remove these checks to be able pass VRRP packets.

PR: 234207
MFC after: 1 week