Commit Graph

256771 Commits

Author SHA1 Message Date
knakahara 4a6a088a32 Introduce very simple Receive Side Scaling (RSS) utility.
ok by msaitoh@n.o.
2018-02-16 04:48:32 +00:00
sevan 18fbadf9f8 regen 2018-02-16 01:54:18 +00:00
sevan f89e640958 Add Nvidia GeForce 9400M as found in the late 2009 13" MacBook (MacBook6,1) 2018-02-16 01:38:24 +00:00
uwe 6ef25358e3 Explicitly enable PCI_COMMAND_MASTER_ENABLE and PCI_COMMAND_IO_ENABLE.
Recent versions of VirtualBox do not enable bus-mastering by default -
this will be fixed, but it doesn't hurt to do it ourselves too.
2018-02-15 19:05:10 +00:00
christos a3a22b2ed2 we now has _UC_MACHINE_FP. 2018-02-15 19:02:06 +00:00
kamil 847996952c Introduce _UC_MACHINE_FP() as a macro
_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer.

Don't rely on this interface as a compiler might strip frame pointer or
optimize it making this interface unreliable.


For hppa assume a small frame context, for larger frames FP might be located
in a different register (4 instead of 3).

For ia64 there is no strict frame pointer, and registers might rotate.
Reuse 79 following:

  ./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM  LOC_REG (79)

Once ia64 will mature, this should be revisited.

A macro can encapsulate a real function for extracting Frame Pointer on
more complex CPUs / ABIs.


For the remaining CPUs, reuse standard register as defined in appropriate ABI.

The direct users of this macro are LLVM and GCC with Sanitizers.

Proposed on tech-userlevel@.

Sponsored by <The NetBSD Foundation>
2018-02-15 15:53:56 +00:00
maxv 30a9923153 Style and simplify. 2018-02-15 13:51:32 +00:00
maxv 2ebc96e2af Style a bit, and if we don't know the pad-filling policy use
SADB_X_EXT_PZERO by default.

There doesn't seem to be a sanity check in the keysock API to make sure
this place is never reached, and it's better to fill in with zeros than
not filling in at all (and leaking uninitialized mbuf data).
2018-02-15 12:40:12 +00:00
maxv a0cc537671 Remove broken MROUTING code, rename ipo->ip4, and simplify. 2018-02-15 10:41:51 +00:00
maxv 7c3a8f9a1f Fix the IPIP_STAT_IBYTES stats; we did m_adj(m, iphlen) which substracted
iphlen, so no need to re-substract it again.
2018-02-15 10:28:49 +00:00
maxv 79a778597c dedup again 2018-02-15 10:21:39 +00:00
maxv f281f715a5 dedup 2018-02-15 10:09:53 +00:00
maxv d8dc4e58f1 Style and remove dead code. 2018-02-15 10:04:43 +00:00
ozaki-r 80650a2eb3 Fix buffer overflow on sending an IPv6 packet with large options
If an IPv6 packet has large options, a necessary space for evacuation can
exceed the expected size (ah_pool_item_size). Give up using the pool_cache
if it happens.

Pointed out by maxv@
2018-02-15 09:23:47 +00:00
ozaki-r c096df4c1e Commonalize error paths (NFC) 2018-02-15 09:17:37 +00:00
maxv 16ab6c18b5 style 2018-02-15 08:38:00 +00:00
maxv 1b56fb55d0 Make sure the Authentication Header fits the mbuf chain, otherwise panic. 2018-02-15 07:38:46 +00:00
maxv 63cc563f51 Fix use-after-free, 'ah' may not be valid after m_makewritable and
ah_massage_headers.
2018-02-15 07:16:05 +00:00
ozaki-r a7134ed919 Fix kernel panic (assertion failure) on receiving an IPv6 packet with large options
If an IPv6 packet has large options, a necessary space for evacuation can
exceed the expected size (ah_pool_item_size). Give up using the pool_cache
if it happens.

Pointed out by maxv@
2018-02-15 04:27:24 +00:00
ozaki-r e7e35b3318 Don't relook up an SP/SA in opencrpyto callbacks
We don't need to do so because we have a reference to it. And also
relooking-up one there may return an sp/sav that has different
parameters from an original one.
2018-02-15 04:24:32 +00:00
jakllsch 7a57d75cd6 Adjust Allwinner emac(4) drivers to be compatible with root on NFS. 2018-02-14 20:10:17 +00:00
jakllsch 3bb366c249 Adjust comment; sun4i_emac is also used on sun5i. 2018-02-14 19:09:09 +00:00
maya 1b2f7af0ae Remove dead code.
From David Binderman in PR kern/53029
2018-02-14 18:28:43 +00:00
jakllsch fbdc91920d Revert functional changes in previous, at expense of strict KNF conformance. 2018-02-14 17:43:09 +00:00
christos edb81c568b join lines where they fit. 2018-02-14 16:45:24 +00:00
maya 4004dcca06 Don't invoke UB.
Heads up by John D. Baker.
2018-02-14 16:07:55 +00:00
maxv 76b4502019 Style, and remove unused prototypes and functions. 2018-02-14 14:28:40 +00:00
maxv b73ef2611f Remove m_checkalignment(), unused. This eliminates a reference to
m_getptr().
2018-02-14 14:19:53 +00:00
maxv 0c95a1b211 Remove IFF_STATICARP, we don't support this, and the code is useless in its
current form.

ok ozaki-r@
2018-02-14 14:15:53 +00:00
uwe d934b67dca Cosmetic - consistently use #define<SPACE> 2018-02-14 14:04:48 +00:00
knakahara 03709a814c Fix a bug that RX and TX may stall on heavy load on wm(4) like ixgbe.c:r1.121.
wm_rxeof() and wm_txeof() have loop limit and the function returns true
if a packet still exists.

XXX need pullup-8
2018-02-14 12:56:00 +00:00
ryoon 2c4c2d277a Fix broken dig and host commands
OpenSSL 1.1 does not have GOST support, so restrict GOST support to 1.0.
2018-02-14 12:47:43 +00:00
msaitoh d382d1364d Fix a bug that RX may stall on heavy load on ixg(4). ixgbe_rxeof() has loop
limit and the function returns true if a packet are still in the RX ring.
ixgbe_handle_que() didn't check the return value. Check the return vaule
and issue a softint.

 This bug is derived from FreeBSD and ixv(4) has no this bug.

XXX pullup-8
2018-02-14 10:38:28 +00:00
wiz ec5498f5ad Sort some lists. Use EXIT STATUS instead of RETURN VALUES. 2018-02-14 10:13:25 +00:00
ozaki-r 2c1d530904 Dedup common codes in error paths (NFCI) 2018-02-14 09:13:03 +00:00
ozaki-r b4596d0446 Fix mbuf leaks on error paths
Pointed out by maxv@
2018-02-14 08:59:23 +00:00
maxv d33dbf4b86 Use .Cm instead of .Li, same as arp.8. 2018-02-14 06:52:41 +00:00
maxv f574a1384a Re-make ip6_nexthdr global, it will be used in soon-to-be-added code... 2018-02-14 05:29:39 +00:00
maxv 239cec4999 Revert my two last changes in this file. They are apparently causing
problems with racoon, I'll investigate this later.
2018-02-14 05:24:44 +00:00
ozaki-r 4e4255942a Use cpu_softintr_p 2018-02-14 03:56:26 +00:00
christos 298caec6c7 need -lrt for shm_{open,close} 2018-02-14 03:37:39 +00:00
christos 4c0f6a5b74 depend on librt for shm_{open,close} 2018-02-14 02:12:35 +00:00
christos 74bd282433 Asan needs bits and pieces of ubsan now; go figure. 2018-02-14 02:12:07 +00:00
christos d637e5b6a0 our __csa_atexit does not like NULL dso; use atexit(3) instead. 2018-02-14 02:11:22 +00:00
christos be74da7a3a enable addr2line 2018-02-14 02:10:32 +00:00
christos 8ac5b43509 - enable netbsd
- add cast to (uptr) for _Unwind_GetIP
2018-02-14 02:10:06 +00:00
christos 82081465bf Provide SHAR384 flavors: The OpenSSL SHA512_Final implementation is re-used
to implement SHA384_Final, but does the right thing by checking the internally
kept digest size. The NetBSD libc implementation provides two entry points
that write a different size digest, so if we use the SHA512_Final from here
we end up overwriting memory.
2018-02-13 22:35:47 +00:00
christos 0f39d79ef1 Provide the means to use the libc sha2 internally instead of the openssl
implementation; this does not really matter since their structs are larger
than ours, but it helps when we want to verify that we are not using any
of the openssl code.
2018-02-13 22:32:10 +00:00
christos ba6745c33a Add a (void *) cast to make things compile with our own sha2 header 2018-02-13 22:29:14 +00:00
sjg 5984bab77d Avoid unused variable warning 2018-02-13 19:37:30 +00:00