Commit Graph

256810 Commits

Author SHA1 Message Date
sevan
f32d105ac2 With the introduction of ddb.dumpstack which is enabled by default, we no longer
need to explicitly set DDB_COMMANDONENTER to run a trace.
2018-02-17 01:31:01 +00:00
sevan
fdcb4b3a84 document dumpstack variable.
Sort built-in variables alphabetically.
2018-02-17 01:13:07 +00:00
sevan
3e741a7d60 Note ddb.dumpstack sysctl 2018-02-17 00:53:53 +00:00
sevan
b883485515 regen 2018-02-17 00:46:17 +00:00
sevan
d1f12753b5 grammar 2018-02-17 00:45:14 +00:00
sevan
ef01774665 Opt to print a backtrace on panic by default with the intention of improving bug reports.
Instead of relying on ddb.onpanic=2, introduce a new sysctl called dumpstack to handle this.
via <jmcneill> channeled through <mrg> on tech-kern[1]

[1] https://mail-index.netbsd.org/tech-kern/2018/02/15/msg023103.html
2018-02-17 00:41:09 +00:00
christos
bf0b06cfe9 remove clause 3, 4. 2018-02-17 00:28:47 +00:00
christos
98cc4b91d3 Use the same variable name for the accepted socket as with the AF_LOCAL test.
Call getpeereid on the accepted socket.
2018-02-16 22:20:18 +00:00
christos
c587e5a36a make sure we call getpeername on the accepted socket! 2018-02-16 22:17:17 +00:00
christos
596e712e68 ensure that getpeereid does not succeed on tcp sockets. 2018-02-16 19:24:16 +00:00
christos
5a7f327f24 Enforce that getpeereid only returns success on AF_LOCAL sockets, instead
of returning garbage for other socket types.
2018-02-16 19:21:49 +00:00
macallan
b6d6eba0f8 use _PREFETCHABLE 2018-02-16 18:13:47 +00:00
macallan
e57d26eeb4 remove accidential garbage 2018-02-16 18:12:45 +00:00
macallan
4fc9a5b669 add $NetBSD: 2018-02-16 18:10:32 +00:00
macallan
3c05247278 OF_getprop() retuns -1 on failure, not 0... 2018-02-16 18:07:05 +00:00
macallan
3920c5d535 add a few pp970-specific bits 2018-02-16 18:04:06 +00:00
macallan
404ba8a804 use mtspr64() in bridge mode 2018-02-16 18:02:10 +00:00
christos
e34e5e3adb explain what's going on before we fix it. 2018-02-16 16:30:20 +00:00
christos
474def7698 add getpeereid tests for non-unix sockets, returns garbage... 2018-02-16 16:23:15 +00:00
christos
c88e952be5 add a getpeeeid test. 2018-02-16 16:08:22 +00:00
maxv
22e66c740d Style, remove unused and misleading macros and comments, localify, and
reduce the diff between similar functions. No functional change.
2018-02-16 15:18:41 +00:00
maxv
2603d1d6e8 Fix inverted logic, otherwise the kernel crashes when receiving a 1-byte
AH packet. Triggerable before authentication when IPsec and forwarding
are both enabled.
2018-02-16 11:25:16 +00:00
maxv
9a3c5d51fb Style a bit, no functional change. 2018-02-16 11:07:44 +00:00
knakahara
42c1bbb910 Currently, it is not necessary to install rss_config.h. Pointed out by msaitoh@n.o. 2018-02-16 10:19:03 +00:00
msaitoh
4ddb9c8688 Fix a bug that the first call of ifflags_cb() causes linkdown. The first
call of ix(gbe|v)_ifflags_cb() refered uninitialized adapter->if_flags.
adapter->if_flags should be initialized in the end of xxx_init().

XXX pullup-[678] (ixgbe)
XXX pullup-8 (ixv)
2018-02-16 10:11:21 +00:00
maxv
0911911c9c Remove unused. 2018-02-16 10:07:07 +00:00
leot
ca9fe044f4 regen 2018-02-16 10:05:22 +00:00
leot
33444c8142 Fix a typo.
Pointed out by aalm in #NetBSD@Freenode.
2018-02-16 10:05:01 +00:00
maxv
9ceac8f0d8 Add [ah/esp/ipcomp]_enable sysctls, and remove the FreeBSD #ifdefs.
Discussed with ozaki-r@.
2018-02-16 09:24:55 +00:00
maxv
e7ef501d6b Remove some more FreeBSD sysctl declarations that already have NetBSD
counterparts. Discussed with ozaki-r@.
2018-02-16 09:07:50 +00:00
maxv
85384b6c32 Remove ipsec_replay and ipsec_integrity from this place, they are already
declared as sysctls. Discussed with ozaki-r@.
2018-02-16 08:56:50 +00:00
maxv
2ff2bfdeb3 Remove ip4_esp_randpad and ip6_esp_randpad, unused. Discussed with
ozaki-r@.
2018-02-16 08:51:28 +00:00
ryo
368bc5b1f5 * avoid writing past the end of the mbuf.
* m_getptr was introduced for the IPsec Crypto code. it must not be used here.

pointed out by maxv@. thanks.
2018-02-16 08:42:45 +00:00
mrg
08873910d3 minimal basic support for ia64 and gcc6. i am not sure about the
bp part of the GetPcSpBp() port, cherry please look :-)
2018-02-16 07:59:05 +00:00
ozaki-r
4a7e2a5c72 Add missing barriers to curlwp_bind and curlwp_bindx
The barriers prevent the instruction of setting/clearing the LP_BOUND flag
from reordering over where we want to prevent LWP migrations.

Note that the fix doesn't mean that there was a race condition.  For now the API
is used only for psref and the combination use of them doesn't need the
barriers(*).

(*) https://mail-index.netbsd.org/tech-kern/2018/02/15/msg023101.html

Pointed out by Mateusz Guzik
2018-02-16 07:11:50 +00:00
knakahara
5392e2869c Fix build failure, sorry. 2018-02-16 07:05:21 +00:00
ozaki-r
63a81b4f12 Avoid a race condition between an LWP migration and curlwp_bind
curlwp_bind sets the LP_BOUND flag to l_pflags of the current LWP, which
prevents it from migrating to another CPU until curlwp_bindx is called.
Meanwhile, there are several ways that an LWP is migrated to another CPU and in
any cases the scheduler postpones a migration if a target LWP is running.  One
example of LWP migrations is a load balancing; the scheduler periodically
explores CPU-hogging LWPs and schedule them to migrate (see sched_lwp_stats).
At that point the scheduler checks the LP_BOUND flag and if it's set to a LWP,
the scheduler doesn't schedule the LWP.  A scheduled LWP is tried to be migrated
when it is leaving a running CPU, i.e., mi_switch.  And mi_switch does NOT check
the LP_BOUND flag.  So if an LWP is scheduled first and then it sets the
LP_BOUND flag, the LWP can be migrated regardless of the flag.  To avoid this
race condition, we need to check the flag in mi_switch too.

For more details see https://mail-index.netbsd.org/tech-kern/2018/02/13/msg023079.html
2018-02-16 07:04:51 +00:00
knakahara
83c72d690c Apply RSS utility to ixg(4) and ixv(4).
ok by msaitoh@n.o.
2018-02-16 04:50:19 +00:00
knakahara
a5975ab2c5 Apply RSS utility to wm(4).
ok by msaitoh@n.o.
2018-02-16 04:49:27 +00:00
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