Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (47m)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 09:08:32 UTC Now

2018-02-27 05:56:12 UTC MAIN commitmail json YAML

Fix total timeout amount - since we decrement by 10 every 10 usec, we
need 35000 usec to equal 35ms.

(pgoyette)

2018-02-27 05:55:08 UTC MAIN commitmail json YAML

Fix another case of 7-bit right-justified addressing, without write-bit

(pgoyette)

2018-02-27 05:52:10 UTC MAIN commitmail json YAML

Use I2C_READ_OP_P() rather than negating I2C_WRITE_OP_P()

(pgoyette)

2018-02-27 05:50:52 UTC MAIN commitmail json YAML

Change a couple of aprint messages to aprint_debug-only

(pgoyette)

2018-02-27 05:49:08 UTC MAIN commitmail json YAML

KNF - remove space between cast and variable

(pgoyette)

2018-02-27 05:47:11 UTC MAIN commitmail json YAML

For byte-writes we only load an 8-bit quantity

(pgoyette)

2018-02-27 05:45:14 UTC MAIN commitmail json YAML

Our i2c addresses are right-justified 7-bit;  we don't shift left
for the "write" bit

(pgoyette)

2018-02-27 05:43:20 UTC MAIN commitmail json YAML

The controller only supports 1-byte "commands"

(pgoyette)

2018-02-27 04:58:27 UTC MAIN commitmail json YAML

Add hw.ixvM.q[01].{interrupt_rate,[tr]xd_head,[tr]xd_tail} sysctls as ixg(4).

(msaitoh)

2018-02-27 00:18:03 UTC MAIN commitmail json YAML

Add dependency on iic module to get access to iicbus_print()

(pgoyette)

2018-02-27 00:15:34 UTC MAIN commitmail json YAML

The iic module needs to include 2c_subr so that i2cbus modules can
reference iicbus_print()

(pgoyette)

2018-02-26 23:12:59 UTC MAIN commitmail json YAML

macofcons(4)

(sevan)

2018-02-26 23:09:32 UTC MAIN commitmail json YAML

Remove support for macofcons(4), it's not actually possible to build a kernel
with it enabled - See PR port-macppc/53004 and it may have further problems even
so.
From <macallan>:
"There is some early console code that uses OF output but it causes problems
when we get close to MMU setup - I think it can go, it hasn't been enabled in
any config in at least a decade as far as I know."

(sevan)

2018-02-26 22:37:27 UTC MAIN commitmail json YAML

Note awacs(4) getting enabled.

(sevan)

2018-02-26 18:42:50 UTC netbsd-8 commitmail json YAML

Pull up rev 1.78 of sys/netipsec/xform_ah.c for real, requested by
ozaki-r in ticket #587 (and already claimed to be part of previous
commit)

(martin)

2018-02-26 17:36:15 UTC MAIN commitmail json YAML

PR/53058: Nikhil Benesch: use correctly typed variables (wchar_t vs wint_t)
as parameters.

(christos)

2018-02-26 15:11:12 UTC MAIN commitmail json YAML

Add dumb memory probe routines for Milan to use all available memory.

Tested on Milan with 32Mx1, 32Mx4, 128MBx1, and 128MBx3.
(bootloader ROM fails to load TOS with 128MBx4)

No particular comment on port-atari@:
http://mail-index.netbsd.org/port-atari/2018/02/09/msg000580.html

(tsutsui)

2018-02-26 14:04:43 UTC MAIN commitmail json YAML

Document ragasub(3) & regnsub(3) implementation detail

Added note:
  Only 10 elements of the rm array can be used.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-02-26 13:57:25 UTC netbsd-8 commitmail json YAML

2018-02-26 13:55:54 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #592):
sys/dev/pci/ixgbe/ixv.c: revision 1.79
sys/dev/pci/ixgbe/ixgbe.h: revision 1.30
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.31
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.32
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.31
sys/dev/pci/ixgbe/ixgbe.c: revision 1.120
sys/dev/pci/ixgbe/ixgbe.c: revision 1.121
sys/dev/pci/ixgbe/ixgbe.c: revision 1.123
sys/dev/pci/ixgbe/ixgbe.c: revision 1.124
sys/dev/pci/ixgbe/ixgbe.c: revision 1.125
sys/dev/pci/ixgbe/ixgbe.c: revision 1.126
sys/dev/pci/ixgbe/ixv.c: revision 1.80
sys/dev/pci/ixgbe/ixv.c: revision 1.81
CID-1427719: Integer handling issues  (BAD_SHIFT). Print bus/slot info
correctly on 82599_SFP_SF_QP(DID 0x154a) and 82599_QSFP_SF_QP(DID 0x1558).
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
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)
- Fix a bug that RX may stall on heavy load on ixg(4) derived from FreeBSD's
AIM (Auto Interrupt Moderation) bug.
When I use a machine as a NFS client, sometimes one of queue pairs doesn't
get any interrupt other than every second tick via ixgbe_local_timer1().
When the problem occured, the queue pair's hw.ixgM.qN.interrupt_rate is
always 500000. When this problem occuring, set hw.ixgM.qN.interrupt_rate lower
than 166667 recover from stall. i.e.:
  sysctl -w hw.ixgM.qN.interrupt_rate=166667 (don't revocer)
  sysctl -w hw.ixgM.qN.interrupt_rate=166666 (recover)
  Relatios between the interrupt_rate and EICR's ITR_INTERVAL field is as
follows:
int_rate | EICR[11:0]  | interval in us | recover |
          |(ITR_INTERVAL)| (10G and 1G)  |        |
---------+--------------+----------------+---------+
  500000 | 0x008(0)    |              2 |    not |
  166667 | 0x010(1)    |              4 |    not |
  166666 | 0x018(2)    |              6 | recover |
  The reason why int_rate becomes 500000 is that xgbe_tx_eof() doesn't
increment rxr->packets(*1). Even if we fix rxr->packets' bug, interrupt_rate
might become greater than 166666 and it might cause stall.
  While reading datasheets, knakahara noticed a section titled with "ITR
Affect on RSC Functionality". It says "When RSC is enabled on specific RX
queues, the associated ITR interval with these queus must be enabled and must
be larger (in time uints) than RSC delay". Currently, RSC_DELAY field in the
GPIE register is 0 and it means 4us for 10G and 1G. The greater ITR_INTERVAL
value of 4us is 6us == 166666. Yes, BINGO!
  This description is noted in 82599 and newer datasheets and not in 82598
datasheet. I don't know if 82598 has this limitation but, I apply this
limitation all of chips.
(*1) Note that this bug is going to be fixed in the next commit to distinct
between two different bugs.
- The bitfield of EITR register is different between 82598 and others.
Only ixgbe_msix_que() taken care of it. Make new function ixgbe_eitr_write()
and use it in all of functions which modify ITR_INTERVAL.
XXX pullup-8
Increment rxr->packets correctly in ixgbe_rxeof() to calculate ITR value
of AIM (Auto Interrupt Moderation) correctly. See also ixgbe.c rev. 1.124.
XXX pullup-8
Improve a comment about reading EICS register defined write-only by spec.
It seems that is workaround for silicon errata.
ok by msaitoh@n.o.
- Apply ixgbe.c rev. 1.124 to ixv.c. Fix a bug that RX may stall on heavy load
on ixv(4) derived from FreeBSD's AIM (Auto Interrupt Moderation) bug.
ITR_INTERVAL value must be larger than 4us.
- The bitfield of EITR register is different between 82598 and others.
ixv.c had a bug that it accessed 82598's way even though only 82599 and
newer support virtual function. Fix it using with new ixv_eitr_write()
function.
Fix a potential bug that TX/RX might stall when TX rate limit reached.
This change is almost the same as the RX rate limit bug fix in ixgbe.c
rev. 1.121. I've never got any stall, but this must be a bug.

(martin)

2018-02-26 13:52:00 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #591):
build.sh: revision 1.317-1.320

Add sanity check: passed -x but no xsrc directory

Accept also ../xsrc in our sanity check, we use this as a default too,
if it exists.

Simplify.

If we're going xsrc hunting, lets's do it properly.  In particular
it is not "good" just because ../xsrc or /usr/xsrc exists, if the user said
-X /no/xsrc/here ...  Further, when we find it, remember it.

While here, also look in my favourite place: .../src/xsrc - src/x would be
better (or src/x11) but that's too hard given the cvs module name and src
tarball format.

(martin)

2018-02-26 13:45:11 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #590):
sys/dev/sbus/be.c: revision 1.86
spl leak, found by Mootja a long time ago

(martin)

2018-02-26 13:36:01 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #589):
sys/netinet/if_arp.c: revision 1.267
sys/netinet6/nd6_nbr.c: revision 1.146-1.148

Use KASSERT for checking a programming error

Simplify; pass dp to nd6_dad_duplicated instead of looking it up again in it

Avoid a race condition of DAD timer destructions

When we see dp->dad_ifa == NULL, it means that the ifa is being deleted and also
the callout is scheduled again by someone.  We shouldn't rely on a result of
callout_pending to know if the callout is scheduled because it returns false if
the subsequent callout handler is already on the fly.
We have to always delegate the destruction of dp to the subsequent handler
unconditionally if dp->dad_ifa == NULL. Otherwise, the first handler destroys
the dp and the second handler tries to handle destroyed dp.

(martin)

2018-02-26 13:32:01 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #588):
sys/netinet6/in6.c: revision 1.260
sys/netinet/in.c: revision 1.219
sys/netinet/wqinput.c: revision 1.4
sys/rump/net/lib/libnetinet/netinet_component.c: revision 1.11
sys/netinet/ip_input.c: revision 1.376
sys/netinet6/ip6_input.c: revision 1.193
Avoid a deadlock between softnet_lock and IFNET_LOCK

A deadlock occurs because there is a violation of the rule of lock ordering;
softnet_lock is held with hodling IFNET_LOCK, which violates the rule.
To avoid the deadlock, replace softnet_lock in in_control and in6_control
with KERNEL_LOCK.

We also need to add some KERNEL_LOCKs to protect the network stack surely.
This is required, for example, for PR kern/51356.

Fix PR kern/53043

(martin)

2018-02-26 13:10:52 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #587):
sys/netipsec/xform_ipcomp.c: revision 1.54-1.56
sys/netipsec/xform_ah.c: revision 1.78,1.79(patch),1.82-1.84
sys/netipsec/xform_esp.c: revision 1.74-1.76

Fix mbuf leaks on error paths

Dedup common codes in error paths (NFCI)

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.

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.

Style.

Commonalize error paths (NFC)

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@

(martin)

2018-02-26 12:26:25 UTC MAIN commitmail json YAML

Switch sparc over to openssl 1.1 again - thanks to christos for fixing it!

(martin)

2018-02-26 10:36:24 UTC MAIN commitmail json YAML

Dedup: call ipsec_in_reject directly. IPSEC_STAT_IN_POLVIO also gets
increased now.

(maxv)

2018-02-26 10:19:13 UTC MAIN commitmail json YAML

Reduce the diff between ipsec6_input and ipsec4_input.

(maxv)

2018-02-26 09:13:00 UTC MAIN commitmail json YAML

2018-02-26 09:04:29 UTC MAIN commitmail json YAML

2018-02-26 08:50:25 UTC MAIN commitmail json YAML

2018-02-26 08:42:16 UTC MAIN commitmail json YAML

Dedup: merge ipsec4_checkpolicy and ipsec6_checkpolicy into
ipsec_checkpolicy.

ok ozaki-r@

(maxv)

2018-02-26 08:34:47 UTC MAIN commitmail json YAML

Better device identification during configuration/attach

(pgoyette)

2018-02-26 08:23:44 UTC MAIN commitmail json YAML

2018-02-26 08:14:01 UTC MAIN commitmail json YAML

Apply ixgbe.c:r1.127 to ixv.c. Pointed out by msaitoh@n.o.

(knakahara)

2018-02-26 07:30:17 UTC MAIN commitmail json YAML

2018-02-26 07:29:25 UTC MAIN commitmail json YAML

Descend into subdirectory to create the module for ichsmb(4) driver.

(pgoyette)

2018-02-26 07:28:02 UTC MAIN commitmail json YAML

Modularize the ichsmb(4) driver.  No functional changes.

(pgoyette)

2018-02-26 06:58:56 UTC MAIN commitmail json YAML

If 'skip' is lower than sizeof(struct ip), we are in trouble. So remove a
nonsensical branch, and add a panic at the beginning of the function.

(maxv)

2018-02-26 06:53:22 UTC MAIN commitmail json YAML

m is never allowed to be NULL, so turn the KASSERT (and the null check)
to a panic.

(maxv)

2018-02-26 06:48:01 UTC MAIN commitmail json YAML

Fix nonsensical checks, neither in6p nor request is allowed to be NULL,
and the former is already dereferenced in a kassert. This code should be
the same as ipsec4_set_policy.

(maxv)

2018-02-26 06:41:27 UTC MAIN commitmail json YAML

Add XXX, it seems to me we need to free the mbuf here.

(maxv)

2018-02-26 06:40:08 UTC MAIN commitmail json YAML

Reinforce this area, make sure the length field fits the option. Normally
it always does because the options were already sanitized earlier.

(maxv)

2018-02-26 06:34:39 UTC MAIN commitmail json YAML

Fix mbuf mistake: we are using ip6 before it is pulled up properly.

(maxv)

2018-02-26 06:17:02 UTC MAIN commitmail json YAML

2018-02-26 05:52:50 UTC MAIN commitmail json YAML

Enable SVS by default.

(maxv)

2018-02-26 05:47:03 UTC MAIN commitmail json YAML

For non-modular driver, don't set return status for the default case.

(pgoyette)

2018-02-26 05:04:51 UTC MAIN commitmail json YAML

Identify the device that wsa just attached.  Avoids getting strange
message sequence similar to

imcsmb0 at imc0iic at imcsmb0 not configured

Also, while here, revert to the original FreeBSD wait-for-device-to-
settle code by waiting for 4 intervals of 10ms each, rather than 40
intervals of 1ms.

(pgoyette)

2018-02-26 05:01:21 UTC MAIN commitmail json YAML

Change the "Child not added" message from normal to debug

(pgoyette)

2018-02-26 04:32:31 UTC netbsd-8 commitmail json YAML

2018-02-26 04:31:32 UTC MAIN commitmail json YAML

Remove unneeded imc_print() routine

(pgoyette)

2018-02-26 04:25:32 UTC MAIN commitmail json YAML

Search for child devices using the i2cbus attribute

(pgoyette)

2018-02-26 04:19:00 UTC MAIN commitmail json YAML

Fix poll mode assumption breaking.

ixgbe_{enable,disable}_intr() forcibly enable/disable all interrupts
regardless of current state. That can break poll mode assumption,
that is, queue interrupts must not occur while polling Tx/Rx rings.

E.g. "ifconfig ixg0 delete && ifconfig ixg0 192.168.0.1" on heavy
load traffic can causes this issue.

This fix may have 1% or 2% performance impact at short packets.

XXX
ixgbe_rearm_queues() which is called only via watchdog can also break
this poll mode assumption because writing EICS casues interrupts
immediately when interrupt auto mask enabled.
We will fix it with other issues about watchdog later.

ok by msaitoh@n.o.

(knakahara)

2018-02-26 01:33:06 UTC MAIN commitmail json YAML

make this link again:
- we don't want to define the reference impl flag because there is no
  complete c reference impl for nistz256
- we want to define an empty OPENSSL_cpuid_setup() because we don't want
  to use the v9 one... this function is called from 2 places:
  1. in the sparccpuid.S assembly, which we need for the CRYPTO_mem*
    functions -- but we could get rid of the v9 stuff with
    #ifdef __sparc_v9__ for size and we don't bother
  2. crypto/init.c

(christos)

2018-02-26 01:31:19 UTC netbsd-8 commitmail json YAML

2018-02-26 01:24:54 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #585):
tests/lib/libpthread/t_mutex.c: 1.19
Since there has been no objection (or even comment) in response
to my message on tech-userlevel ...
    Subject: tests/lib/libpthread/t_mutex:mutex6
    Date: Thu, 23 Nov 2017 17:34:54 +0700
    Message-ID: <28385.1511433294%andromeda.noi.kre.to@localhost>
which can be found at:
        http://mail-index.netbsd.org/tech-userlevel/2017/11/23/msg011010.html
which analysed the mutex6 test case of this test, and concluded
that it was useless, nonsense, and broken (the whole test is just a
race - not even really using or testing mutexes), let it be henceforth
forever gone.

(snj)

2018-02-26 01:23:42 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #584):
sys/arch/alpha/alpha/fp_complete.c: 1.22
sys/lib/libkern/softfloat.c: 1.6
sys/lib/libkern/softfloat.h: 1.5
PR port-alpha/52520: provide float64 -> uint64 conversion and use
that when converting positive numbers.

(snj)

2018-02-26 01:22:04 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #583):
lib/libm/arch/alpha/fenv.c: 1.3
Fix usage of sysarch(ALPHA_FPGETMASK)

(snj)

2018-02-26 01:20:21 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #582):
tests/lib/libc/arch/alpha/return_one.S: 1.2
Implement helper function for alpha

(snj)

2018-02-26 01:18:28 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maya in ticket #581):
sys/rump/librump/rumpvfs/rumpfs.c: 1.151-1.152
PR/52738: Martin Husemann: rumpfs does not support mtime
--
When truncating a file make sure to update mtime.
This fixes PR kern/51762 for rumpfs.

(snj)

2018-02-26 01:09:41 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #580):
sys/kern/subr_tftproot.c: 1.20
Fix md(4) double attachment in TFTPROOT option
The mdattach() call in tftproot_dhcpboot() has probably always been
useless, but it seems it became harmful, as it causes 7.1.1 to deadlock
during boot.

(snj)

2018-02-26 01:08:26 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #579):
sys/arch/macppc/conf/GENERIC: 1.342
sys/arch/macppc/conf/GENERIC_601: 1.18
sys/arch/macppc/conf/MAMBO: 1.29
sys/arch/macppc/conf/POWERMAC_G5: 1.31
Enable BUFQ_PRIOCSCAN by default for NetBSD/macppc.
Drop references to NEW_BUFQ_STRATEGY and replace with currently available
options BUFQ_READPRIO and BUFQ_PRIOCSCAN.
ok <macallan>

(snj)

2018-02-26 01:04:44 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #578):
sys/arch/macppc/conf/GENERIC: 1.341
sys/arch/macppc/conf/MAMBO: 1.28
sys/arch/macppc/conf/POWERMAC: 1.69
sys/arch/macppc/conf/POWERMAC_G5: 1.30
sys/arch/powerpc/oea/ofw_rascons.c: 1.10
Remove OFB_ENABLE_CACHE
from <macallan>
"it is outdated, genfb and friends don't need or use it, and it makes no
sense on accelerated drivers either. It tries to BAT-map the framebuffer
cacheable, which works on most macs but makes a few models lock up.
Genfb doesn't have that problem and is faster too."

(snj)

2018-02-26 01:01:41 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #577):
sys/arch/x86/pci/if_vmx.c: 1.21
m_free -> m_freem, otherwise leak

(snj)

2018-02-26 00:56:29 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #576):
sys/dev/pci/pci_subr.c: 1.197-1.200
sys/dev/pci/pcireg.h: 1.136-1.137
sys/dev/pci/ppbreg.h: 1.8
Add VGA 16bit decode bit into the PCI bridge control register. This bit is
defined in PCI-to-PCI Bridge Architecture Specification Revision 1.2. This
bit has meaning if the VGA enable bit or the VGA Palette Snoop Enable bit is
set.
NOTE: sys/arch/x86/pci/pci_ranges.c::mmio_range_extend_by_vga_enable() and/or
some other functions should be modified.
"s/above 300W/greater than 300W/" in pci_conf_print_pcie_power(). From
PCIe Base Spec 3.1a Errata 2017-12-13.
Cleanup:
- Don't pass a capability pointer as a argument of pci_conf_find_cap() and
  determine the first pointer in the pci_conf_find_cap() function.
- Don't pass a capability pointer as a argument of pci_conf_find_extcap()
  because it's not used.
- Remove unsed code.
- Add PCie Link Activation ECN.
- Use macro.
- KNF.

(snj)

2018-02-26 00:49:48 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #575):
sys/arch/amd64/amd64/copy.S: 1.28 via patch
sys/arch/amd64/amd64/cpufunc.S: 1.31
Don't fall through functions, explicitly jump instead.

(snj)

2018-02-26 00:43:23 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #573):
sys/kern/kern_synch.c: 1.314
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

(snj)

2018-02-26 00:41:14 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #572):
sys/net/if_bridge.c: 1.138, 1.148
tests/net/if_bridge/t_bridge.sh: 1.18
tests/net/if_gif/t_gif.sh: 1.12
tests/net/if_ipsec/t_ipsec.sh: 1.3
tests/net/if_l2tp/t_l2tp.sh: 1.4
tests/net/if_loop/t_basic.sh: 1.2
tests/net/if_pppoe/t_pppoe.sh: 1.18
tests/net/if_tap/t_tap.sh: 1.7
tests/net/if_tun/Makefile: 1.2
tests/net/if_tun/t_tun.sh: 1.5
tests/net/if_vlan/t_vlan.sh: 1.8
tests/net/net_common.sh: 1.26
Remove unnecessary splsoftnet
--
If the bridge is not running, don't call bridge_stop. Otherwise the
following commands will crash the kernel:
        ifconfig bridge0 create
        ifconfig bridge0 destroy
--
Commonalize and add tests of creating/destroying interfaces

(snj)

2018-02-26 00:35:56 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ozaki-r in ticket #571):
tests/net/net/t_ping_opts.sh: 1.2-1.3
Now that we don't allow source-routed packets by default, set allowsrcrt=1
and forwsrcrt=1. Should fix the ATF failure.
--
Fix ping_opts_gateway and ping_opts_recordroute
We need to enable the options of source routing on all rump kernels.

(snj)

2018-02-26 00:33:08 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by alnsn in ticket #570):
sys/dist/pf/net/pf.c: 1.79-1.80
PR/53036: Alexander Nasonov: 'block user' in pf's ruleset panics 8.0_BETA
Check for NULL.
--
It is normal for socket credentials to be missing for incoming sockets,
so don't warn.

(snj)

2018-02-26 00:29:27 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #569):
sys/netinet6/route6.c: 1.24-1.25
Fix the ICMP error code. rh was obtained via IP6_EXTHDR_GET, and it is not
guaranteed to be in the same mbuf as ip6, so computing the difference
between the pointers may result in a wrong offset.
ip6 is now unused, so remove it.
--
Remove this code, RH0 must be dropped, according to RFC5095. FreeBSD and
OpenBSD already do the same. Also, style, and remove useless includes.

(snj)

2018-02-26 00:26:46 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #568):
sys/netinet6/ip6_input.c: 1.188
Kick nested fragments.

(snj)

2018-02-26 00:25:16 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by knakahara in ticket #567):
distrib/sets/lists/comp/mi: 1.2182-1.2183
sys/dev/pci/if_wm.c: 1.564
sys/dev/pci/ixgbe/ixgbe.c: 1.122
sys/dev/pci/ixgbe/ixgbe_rss.h: 1.3
sys/dev/pci/ixgbe/ixv.c: 1.78
sys/net/Makefile: 1.35-1.36
sys/net/files.net: 1.15
sys/net/rss_config.c: 1.1
sys/net/rss_config.h: 1.1
Introduce very simple Receive Side Scaling (RSS) utility.
ok by msaitoh@n.o.
--
Apply RSS utility to wm(4).
ok by msaitoh@n.o.
--
Apply RSS utility to ixg(4) and ixv(4).
ok by msaitoh@n.o.
--
Fix build failure, sorry.
--
Currently, it is not necessary to install rss_config.h. Pointed out by msaitoh@n.o.

(snj)

2018-02-26 00:19:44 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #566):
sys/arch/arm/include/cpu.h: 1.94
sys/arch/mips/include/cpu.h: 1.122
sys/arch/powerpc/include/cpu.h: 1.103
sys/sys/cpu.h: 1.42
CPU_INFO_FOREACH() must always iterate at least the boot cpu.
document this in sys/cpu.h and fix the arm and mips versions
to check ncpu is non zero before using it as an iterator max.
this should fix the new assert in init_main.c.
--
apply the same change for powerpc as mrg did for arm and mips:
CPU_INFO_FOREACH() must always iterate at least the boot cpu.
document this in sys/cpu.h and fix the arm and mips versions
to check ncpu is non zero before using it as an iterator max.
this should fix the new assert in init_main.c.

(snj)

2018-02-26 00:17:40 UTC MAIN commitmail json YAML

Finally, remove extraneous entries for macppc's "iic at cuda".  We
don't need three entries that differ only in wildcarding.

(pgoyette)

2018-02-26 00:14:57 UTC MAIN commitmail json YAML

Ooopppsss!  Put the .Sh DESCRIPTION where it belongs, _after_ the
list of config attachments.

(pgoyette)

2018-02-26 00:10:44 UTC MAIN commitmail json YAML

Hmmm, for some reason the first entry in the generated list is not
in collating-sequence order.  Move it to the proper place in the
list.

(pgoyette)

2018-02-26 00:05:05 UTC MAIN commitmail json YAML

Fix typo in comment.

(htodd)

2018-02-26 00:05:04 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #565):
sys/dev/pci/ichsmb.c: 1.51
sys/dev/pci/ismt.c: 1.6
Add C3000 devices.

(snj)

2018-02-26 00:04:23 UTC netbsd-8 commitmail json YAML

Undo last commit - wrong tree.

(htodd)

2018-02-26 00:00:53 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by knakahara in ticket #564):
sys/dev/pci/if_wm.c: 1.563
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.

(snj)

2018-02-25 23:57:51 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kamil in ticket #563):
sys/sys/fcntl.h: 1.50
Enable O_NOFOLLOW in the POSIX namespace
This open(2) flag first appeared in FreeBSD and was standarized by POSIX
in the 2008 standard.

(snj)

2018-02-25 23:55:55 UTC MAIN commitmail json YAML

Bump date for previous two changes.

(pgoyette)

2018-02-25 23:55:50 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kamil in ticket #562):
lib/libpthread/pthread.h: 1.41
Remove namespace restriction from pthread_condattr_{g,s}etclock(3)
These functions were marked as _NETBSD_SOURCE when introduced to the
sources. In fact they are regular POSIX threading functions available
since the 2001 standard. There is an older mention about alignment with
"IEEE Std 1003.1j-2000".
This corrects usage of these functions when a source code is compiled
with a POSIX namespace option.

(snj)

2018-02-25 23:55:21 UTC MAIN commitmail json YAML

Fix the commands-to-generate-the-attachment list to use tab's instead
of multiple spaces in the regex bracket expressions, and alert the
reader to this.  Otherwise, a cut-and-paste might simply expand the
tab characters to some number of spaces, and the result won't find
what you're looking for!

XXX Despite the indication that these commands should be run in csh
(or derivative), they seem to run just fine under /bin/sh as well.

(pgoyette)

2018-02-25 23:53:59 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kamil in ticket #561):
include/string.h: 1.52
Mark in string.h: memccpy(3) and strdup(3) as _POSIX_C_SOURCE >= 2001

(snj)

2018-02-25 23:53:57 UTC MAIN commitmail json YAML

2018-02-25 23:51:25 UTC MAIN commitmail json YAML

Regen attachment list, since we just added "iic* at imcsmb?"

This regen also caught a few other missing entries.

(pgoyette)

2018-02-25 23:51:22 UTC netbsd-8 commitmail json YAML

Fix typo in comment.

(htodd)

2018-02-25 23:50:24 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kamil in ticket #552):
sys/arch/aarch64/include/mcontext.h: 1.2
sys/arch/alpha/include/mcontext.h: 1.9
sys/arch/amd64/include/mcontext.h: 1.19
sys/arch/arm/include/mcontext.h: 1.19
sys/arch/hppa/include/mcontext.h: 1.9
sys/arch/i386/include/mcontext.h: 1.14
sys/arch/ia64/include/mcontext.h: 1.6
sys/arch/m68k/include/mcontext.h: 1.10
sys/arch/mips/include/mcontext.h: 1.22
sys/arch/or1k/include/mcontext.h: 1.2
sys/arch/powerpc/include/mcontext.h: 1.18
sys/arch/riscv/include/mcontext.h: 1.5
sys/arch/sh3/include/mcontext.h: 1.11
sys/arch/sparc/include/mcontext.h: 1.14-1.17
sys/arch/sparc64/include/mcontext.h: 1.10
sys/arch/vax/include/mcontext.h: 1.9
tests/lib/libc/sys/Makefile: 1.50
tests/lib/libc/sys/t_ucontext.c: 1.2
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>
--
Improve _UC_MACHINE_FP() for SPARC/SPARC64
Introduce a static inline function _uc_machine_fp() that contains improved
caluclation of a frame pointer.
Algorithm:
  uptr *stk_ptr;
#  if defined (__arch64__)
  stk_ptr = (uptr *) (*sp + 2047);
#  else
  stk_ptr = (uptr *) *sp;
#  endif
  *bp = stk_ptr[15];
Noted by <mrg>
--
Make _UC_MACHINE_FP() compile again and fix it so that it does not add
the offset twice.
--
fix _UC_MACHINE32_FP() -- use 32 bit pointer value so that [15] is
the right offset.  do this by using __greg32_t, which is only in
the sparc64 version, and these are only useful there, so move them.
--
Add new tests in lib/libc/sys/t_ucontext
New tests:
- ucontext_sp
- ucontext_fp
- ucontext_pc
- ucontext_intrv
They test respectively:
- _UC_MACHINE_SP
- _UC_MACHINE_FP
- _UC_MACHINE_PC
- _UC_MACHINE_INTRV
These tests attempt to access and print the values from ucontext, without
interpreting the values.
This is a follow up of the _UC_MACHINE_FP() introduction.
These tests use PRIxREGISTER, and require to be built with -D_KERNTYPES.
Sponsored by <The NetBSD Foundation>

(snj)

2018-02-25 23:48:16 UTC MAIN commitmail json YAML

Fix typo in error message.

(htodd)

2018-02-25 23:35:54 UTC netbsd-7-1 commitmail json YAML

2018-02-25 23:35:25 UTC netbsd-7-0 commitmail json YAML

2018-02-25 23:35:15 UTC netbsd-7 commitmail json YAML

2018-02-25 23:28:47 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by mlelstv in ticket #1574):
sys/fs/msdosfs/msdosfs_vfsops.c: 1.129
relax sanity check. It's ok to have more FAT sectors than needed.

(snj)

2018-02-25 23:27:17 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #1573):
sys/kern/subr_tftproot.c: 1.20
Fix md(4) double attachment in TFTPROOT option
The mdattach() call in tftproot_dhcpboot() has probably always been
useless, but it seems it became harmful, as it causes 7.1.1 to deadlock
during boot.

(snj)

2018-02-25 23:17:47 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1572):
sys/netinet6/ip6_input.c: 1.188 via patch
Kick nested fragments.

(snj)

2018-02-25 23:17:37 UTC netbsd-7-1 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1572):
sys/netinet6/ip6_input.c: 1.188 via patch
Kick nested fragments.

(snj)

2018-02-25 23:17:22 UTC netbsd-7-0 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1572):
sys/netinet6/ip6_input.c: 1.188 via patch
Kick nested fragments.

(snj)

2018-02-25 22:59:28 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #1545):
sys/modules/lua/lua.c: up to 1.24
whitespace, knf, comments, but no functional change
--
lua(4): fixed require
--
plug leak on error. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4
--
fix double require bug
--
Use aprint*() instead of printf() in xxx_attach().
--
Check pmf_device_register return value. NFC
Appeases static analyzers.
Can't destroy pb until we're done using it.
--
Fix cargo cult ioctl implementation for LUAINFO: the name and desc fields
are arrays, not pointers, so don't use copyoutstr on them, but instead
copyin/copyout the whole array of structures.
Fixes PR 52864 for me (on sparc64).

(snj)

2018-02-25 22:00:22 UTC MAIN commitmail json YAML

As requested by chuq@, add the new imc devices to the i386 and amd64
ALL kernels.

(pgoyette)

2018-02-25 21:43:03 UTC MAIN commitmail json YAML

fix the DIAGNOSTIC function pmap_tlb_asid_count() to not expect
that TLBINFO_ASID_INUSE_P() returns just 0 or 1; the underlying
__BITMAP_ISSET() actually returns the matching bit nowadays, which
caused miscounting

fixes PR kern/53054 by Sevan Janiyan

(jdolecek)

2018-02-25 21:16:33 UTC netbsd-7-0 commitmail json YAML

2018-02-25 21:16:25 UTC netbsd-7-1 commitmail json YAML

2018-02-25 21:16:07 UTC netbsd-7 commitmail json YAML

2018-02-25 21:15:52 UTC netbsd-7 commitmail json YAML

Apply patch (requested by maxv in ticket #1499):
- disable compat_svr4 and compat_svr4_32 everywhere
- disable compat_ibcs2 everywhere but on Vax
- remove svr4/svr4_32/ibcs2/freebsd from the module autoload list

(snj)

2018-02-25 21:15:39 UTC netbsd-7-1 commitmail json YAML

2018-02-25 21:15:20 UTC netbsd-7-0 commitmail json YAML

2018-02-25 21:06:40 UTC MAIN commitmail json YAML

update upstream code changes in signal handling.

(christos)

2018-02-25 21:01:13 UTC netbsd-8 commitmail json YAML

2018-02-25 20:59:46 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #586):
tests/lib/libc/sys/t_ptrace_amd64_wait.h: 1.2
tests/lib/libc/sys/t_ptrace_i386_wait.h: 1.2
tests/lib/libc/sys/t_ptrace_wait.c: 1.10-1.20
tests/lib/libc/sys/t_ptrace_x86_wait.h: 1.2-1.3
PR kern/52167 strikes on sparc64 too.
--
Temporarily disable t_ptrace_wait*::resume1 in ATF tests
It hangs forever on releng machines.
Sponsored by <The NetBSD Foundation>
--
Remove expected failure (fixed in kern_sig.c 1.339)
--
sync a bit more with reality; some things still fail, some new failures.
reduce spewage, be more explanatory about syscall errors.
--
Add expected failures.
--
make it fail instead of hang under qemu; XXX: need to investigate.
--
t_ptrace_wait*: Disable suspend* tests
These tests can hang the system. These interfaces will be improved and
temporarily disable them.
--
ptrace atf: Clanup reports of failures
Mark resume* suspend* tests as expected failure and link with PR 51995.
Sponsored by <The NetBSD Foundation>
--
report which errno failed
--
atf: t_ptrace_wait: Mark attach2 as racy
--
atf: ptrace: Temporarily disable signal3 as it breaks now on some ports
This test is marked as failing with: PR kern/51918.

(snj)

2018-02-25 20:04:56 UTC MAIN commitmail json YAML

2018-02-25 19:22:42 UTC MAIN commitmail json YAML

2018-02-25 18:55:23 UTC MAIN commitmail json YAML

add definitions of FIOSEEKDATA and FIOSEEKHOLE for ZFS.
from FreeBSD.

(chs)

2018-02-25 18:54:29 UTC MAIN commitmail json YAML

add defines to control whether or not mutex operations are skipped
after we have panic'd.  no functional change.

(chs)

2018-02-25 18:53:23 UTC MAIN commitmail json YAML

add DTRACE_OPTS and HOST_DTRACE_OPTS to allow disabling various optimizations
that interfere with using dtrace.  use them when MKDTRACE=yes.

(chs)

2018-02-25 18:51:18 UTC MAIN commitmail json YAML

remove hard-coded -fomit-frame-pointer for pthread stuff,
let these use the same setting as the rest of the tree.
the performance difference is marginal and this allows
dtrace ustack() to work better.

(chs)

2018-02-25 18:48:39 UTC MAIN commitmail json YAML

add some flag definitions from a newer version of FreeBSD's libproc
that are needed by the new dtrace.  these don't do anything yet,
but dtrace doesn't mind.  I'll do a full resync to the latest FreeBSD
libproc / librtld_db later.

(chs)

2018-02-25 17:45:40 UTC MAIN commitmail json YAML

Use tagged list.

(uwe)

2018-02-25 17:37:05 UTC MAIN commitmail json YAML

Flags are .Fl not .Ar

(uwe)

2018-02-25 16:53:51 UTC MAIN commitmail json YAML

Document _UC_MACHINE_*() in ucontext(2)

Document:
- _UC_MACHINE_SP()
- _UC_MACHINE_FP()
- _UC_MACHINE_PC()
- _UC_MACHINE_INTRV()
- _UC_MACHINE_SET_PC()

Document fragileness of the frame-pointer accessor.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-02-25 16:44:31 UTC MAIN commitmail json YAML

adjust KASSERT() triggered in PR port-cobalt/53054 to provide more info

(jdolecek)

2018-02-25 15:31:07 UTC MAIN commitmail json YAML

2018-02-25 14:27:07 UTC MAIN commitmail json YAML

Add new tests in lib/libc/sys/t_ucontext

New tests:
- ucontext_sp
- ucontext_fp
- ucontext_pc
- ucontext_intrv

They test respectively:
- _UC_MACHINE_SP
- _UC_MACHINE_FP
- _UC_MACHINE_PC
- _UC_MACHINE_INTRV

These tests attempt to access and print the values from ucontext, without
interpreting the values.

This is a follow up of the _UC_MACHINE_FP() introduction.

These tests use PRIxREGISTER, and require to be built with -D_KERNTYPES.

Sponsored by <The NetBSD Foundation>

(kamil)

2018-02-25 13:15:35 UTC MAIN commitmail json YAML

Remove the first entry from the todo list, it's handled properly now.

(maxv)

2018-02-25 13:14:27 UTC MAIN commitmail json YAML

Remove INTRENTRY_L, it's not used anymore.

(maxv)

2018-02-25 13:09:34 UTC MAIN commitmail json YAML

Mmh. We shouldn't read %cr2 here. %cr2 is initialized by the CPU only
during page faults (T_PAGEFLT), so here we're reading a value that comes
from a previous page fault.

That's a real problem; if you launch an unprivileged process, set up a
signal handler, make it sleep 10 seconds, and trigger a T_ALIGNFLT fault,
you get in si_addr the address of another LWP's page - and perhaps this
can be used to defeat userland ASLR.

This bug has been there since 2003.

(maxv)

2018-02-25 12:57:39 UTC MAIN commitmail json YAML

Use .Dl instead of .Bd -literal, fix vertical spacing.

(uwe)

2018-02-25 12:53:22 UTC MAIN commitmail json YAML

Register the x86/imcsmb man/cat/html page

(kamil)

2018-02-25 12:51:33 UTC MAIN commitmail json YAML

.Po/.Pc are not appropriate for enclosing sentences.

(uwe)

2018-02-25 12:46:49 UTC MAIN commitmail json YAML

Add FreeBSD 11.0 and 12.0

(uwe)

2018-02-25 12:39:44 UTC MAIN commitmail json YAML

2018-02-25 12:37:16 UTC MAIN commitmail json YAML

Fix handling of segment register faults when running with SVS. The behavior
is changed also in the non-SVS case.

I've put a documentation in amd64_trap.S. Basically, the problem with SVS
is that if iret faults, we already have a full trapframe pushed on the
stack and the CPU will push another frame on this stack (nested), but it
hits the redzone below the stack since it is still running with the user
page table loaded.

To fix that, we pop a good part of the trapframe earlier in intrfastexit.
If iret faults, the current %rsp has enough room for an iret frame, and
the CPU can push that without problem. We then switch back to the outer
iret frame (the frame the CPU was trying to pop by executing iret, but that
it didn't pop for real because iret faulted), call INTRENTRY, and handle
the trap as if it had been received from userland directly.

(maxv)

2018-02-25 12:28:18 UTC MAIN commitmail json YAML

Correct OpenSSL 1.1 entries in plist

Fix references to:
./usr/share/man/cat3/BIO_get_data.0
./usr/share/man/cat3/SSL_CONF_cmd.0

This is obserbable with the MKCATPAGES=yes build option.

(kamil)

2018-02-25 11:57:44 UTC MAIN commitmail json YAML

Ah. Don't use NENTRY() to declare check_swapgs, use LABEL() instead. NENTRY
puts the code in the .text section, so the effect of TEXT_USER_BEGIN was
overwritten, and check_swapgs was not put in the .text.user section.

As a result kernels running SVS would crash when jumping here - because we
execute this place with the user page table loaded, and in this page table
only .text.user is mapped.

While here, rename check_swapgs -> kernuser_reenter, because we do more
things than just SWAPGS.

(maxv)

2018-02-25 10:17:12 UTC MAIN commitmail json YAML

Remove ksem module reference

This does not exist in HEAD.

It looks like accidentally committed in:

Add new modules (for i386 and amd64 only) for the imcsmb SMBus driver.
src/sys/modules/Makefile r1.200

(kamil)

2018-02-25 10:04:04 UTC MAIN commitmail json YAML

Fix xrefs, remove empty lines, fix RCS Id.

(wiz)

2018-02-25 08:28:55 UTC MAIN commitmail json YAML

Replace %rax -> %rdi, so that check_swapgs clobbers only one register.

(maxv)

2018-02-25 08:27:15 UTC MAIN commitmail json YAML

Ooops - forgot to add NetBSD License

(pgoyette)

2018-02-25 08:24:36 UTC MAIN commitmail json YAML

2018-02-25 08:23:09 UTC MAIN commitmail json YAML

2018-02-25 08:22:53 UTC MAIN commitmail json YAML

2018-02-25 08:21:57 UTC MAIN commitmail json YAML

2018-02-25 08:20:29 UTC MAIN commitmail json YAML

2018-02-25 08:19:35 UTC MAIN commitmail json YAML

Import imcsmb driver from FreeBSD.  This driver allows access to the
SMBus controllers which are part of the integrated memory controllers
on certain modern Intel CPUs.  These SMBus are attached only to the
memory DIMMs, so we provide only a minimum amount of functionality.

Deliberately not included in GENERIC, as on some motherboards there
can be conflicting access between the driver and the motherboard.  The
motherboards generally will provide a mechanism to synchronize access,
but the methods are likely proprietary;  the driver provides a place
for inserting user-provided synchronization.

(pgoyette)

2018-02-25 08:09:07 UTC MAIN commitmail json YAML

There are two places where we reload %gs:

* In setusergs. Here we can't fault. So we don't need to handle this
  case.

* In intrfastexit for 32bit processes. This case needs to be handled,
  and we already have a label.

So use the label instead of disassembling %rip.

(maxv)

2018-02-25 01:05:09 UTC MAIN commitmail json YAML

2018-02-25 00:27:16 UTC MAIN commitmail json YAML

2018-02-25 00:16:49 UTC MAIN commitmail json YAML

2018-02-24 21:51:22 UTC MAIN commitmail json YAML

2018-02-24 21:47:34 UTC MAIN commitmail json YAML

2018-02-24 21:45:57 UTC MAIN commitmail json YAML

2018-02-24 20:23:58 UTC MAIN commitmail json YAML

2018-02-24 19:52:46 UTC MAIN commitmail json YAML

Fix one thing in the documentation, I meant to say only SVS_UTLS.

(maxv)

2018-02-24 18:58:00 UTC MAIN commitmail json YAML

Remove legacy comment regarding the instability of awacs(4)
Enable awacs(4), skipping MAMBO config as it is for an emulator.

From <macallan>
"that warning about the awacs driver making some
machines lock up can probably go. It's ancient and I've never seen it
actually happen, I have several oldish macs with different awacs
variants and it's enabled in all my configs. In fact it predates my
macppc interrupt cleanup ( I think I did that in 2005 or so ) and I
strongly suspect that fixed the problem.
( the ancient code didn't properly distinguish between edge and level
triggered interrupts on grand central / heathrow type hardware, IIRC it
always just checked the level register(s) which resulted in edge
triggered interrupts being missed or misdetected. Most of the mac-io
goop from that time uses edge triggered interrupts, which includes
awacs )

If this actually happens to anyone I'd like to know about it"

(sevan)

2018-02-24 18:30:57 UTC netbsd-7 commitmail json YAML

2018-02-24 18:30:46 UTC netbsd-7-1 commitmail json YAML

2018-02-24 18:30:39 UTC netbsd-7-0 commitmail json YAML

2018-02-24 18:29:41 UTC netbsd-7 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1571):
sys/net/if_mpls.c: 1.31-1.33 via patch
sys/netmpls/mpls_ttl.c: 1.9
Style, and fix several bugs:
- ip4_check(), mpls_unlabel_inet() and mpls_unlabel_inet6() perform
  pullups, so we need to pass the updated pointers back
- in mpls_lse() the route is not always freed
Looks a little better now.
--
Kick MPLS packets earlier.
--
Several changes:
* Declare TRIM_LABEL as a function.
* In mpls_unlabel_inet, copy the label locally. It's not incorrect to
  keep a pointer on the mbuf, but it's bug-friendly.
* In mpls_label_inetX, fix the length check. Meanwhile add an XXX: we
  just want to make sure that m_copydata won't fail, but if we were
  guaranteed that m has M_PKTHDR set, we could simply check the length
  against m->m_pkthdr.len.

(snj)

2018-02-24 18:29:39 UTC netbsd-7-1 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1571):
sys/net/if_mpls.c: 1.31-1.33 via patch
sys/netmpls/mpls_ttl.c: 1.9
Style, and fix several bugs:
- ip4_check(), mpls_unlabel_inet() and mpls_unlabel_inet6() perform
  pullups, so we need to pass the updated pointers back
- in mpls_lse() the route is not always freed
Looks a little better now.
--
Kick MPLS packets earlier.
--
Several changes:
* Declare TRIM_LABEL as a function.
* In mpls_unlabel_inet, copy the label locally. It's not incorrect to
  keep a pointer on the mbuf, but it's bug-friendly.
* In mpls_label_inetX, fix the length check. Meanwhile add an XXX: we
  just want to make sure that m_copydata won't fail, but if we were
  guaranteed that m has M_PKTHDR set, we could simply check the length
  against m->m_pkthdr.len.

(snj)

2018-02-24 18:29:37 UTC netbsd-7-0 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1571):
sys/net/if_mpls.c: 1.31-1.33 via patch
sys/netmpls/mpls_ttl.c: 1.9
Style, and fix several bugs:
- ip4_check(), mpls_unlabel_inet() and mpls_unlabel_inet6() perform
  pullups, so we need to pass the updated pointers back
- in mpls_lse() the route is not always freed
Looks a little better now.
--
Kick MPLS packets earlier.
--
Several changes:
* Declare TRIM_LABEL as a function.
* In mpls_unlabel_inet, copy the label locally. It's not incorrect to
  keep a pointer on the mbuf, but it's bug-friendly.
* In mpls_label_inetX, fix the length check. Meanwhile add an XXX: we
  just want to make sure that m_copydata won't fail, but if we were
  guaranteed that m has M_PKTHDR set, we could simply check the length
  against m->m_pkthdr.len.

(snj)

2018-02-24 17:12:10 UTC MAIN commitmail json YAML

Use %rax instead of %r15 in the non-SVS case, to reduce the diff against
SVS. In SVS we use %rax instead of %r15 because the following instructions
cannot be encoded:

movq %r15,SVS_UTLS+UTLS_SCRATCH
movq SVS_UTLS+UTLS_RSP0,%r15

(maxv)

2018-02-24 14:06:28 UTC MAIN commitmail json YAML

2018-02-24 14:05:46 UTC MAIN commitmail json YAML

Add AMD KERNCZ chipset for Zen processors.

(mlelstv)

2018-02-24 10:31:30 UTC MAIN commitmail json YAML

Document SVS. Also, remove an entry from the todo list.

(maxv)

2018-02-24 07:53:15 UTC MAIN commitmail json YAML

Avoid a race condition of DAD timer destructions

When we see dp->dad_ifa == NULL, it means that the ifa is being deleted and also
the callout is scheduled again by someone.  We shouldn't rely on a result of
callout_pending to know if the callout is scheduled because it returns false if
the subsequent callout handler is already on the fly.

We have to always delegate the destruction of dp to the subsequent handler
unconditionally if dp->dad_ifa == NULL. Otherwise, the first handler destroys
the dp and the second handler tries to handle destroyed dp.

(ozaki-r)

2018-02-24 07:40:40 UTC MAIN commitmail json YAML

Simplify; pass dp to nd6_dad_duplicated instead of looking it up again in it

(ozaki-r)

2018-02-24 07:38:05 UTC MAIN commitmail json YAML

Use KASSERT for checking a programming error

(ozaki-r)

2018-02-24 07:37:09 UTC MAIN commitmail json YAML

Avoid a deadlock between softnet_lock and IFNET_LOCK

A deadlock occurs because there is a violation of the rule of lock ordering;
softnet_lock is held with hodling IFNET_LOCK, which violates the rule.
To avoid the deadlock, replace softnet_lock in in_control and in6_control
with KERNEL_LOCK.

We also need to add some KERNEL_LOCKs to protect the network stack surely.
This is required, for example, for PR kern/51356.

Fix PR kern/53043

(ozaki-r)

2018-02-23 21:16:01 UTC MAIN commitmail json YAML

Switch hppa to gcc 6.4

(skrll)

2018-02-23 19:43:08 UTC MAIN commitmail json YAML

Fix off-by-one, we don't want the entry point to equal the maximum
address.

(maxv)

2018-02-23 19:39:27 UTC MAIN commitmail json YAML

Add a new entry in the TODO list.

(maxv)

2018-02-23 16:32:44 UTC MAIN commitmail json YAML

Remove unnecessary macros.

(wiz)

2018-02-23 14:16:52 UTC MAIN commitmail json YAML

Revert previous, we'll need something better (and compatible with Clang).

(maxv)

2018-02-23 09:57:20 UTC MAIN commitmail json YAML

Change the SVS node, from machdep.svs_enabled to machdep.svs.enabled.

(maxv)

2018-02-23 09:00:56 UTC MAIN commitmail json YAML

Add -fno-shrink-wrap, to force GCC to push the frames at the very beginning
of the functions. Otherwise DDB is unable to display a correct stack trace
if a fault occurred in a function before the frame was pushed.

Discussed on tech-kern@, flag suggested by Krister Walfridsson. Should fix
PR/52560.

(maxv)

2018-02-23 03:33:36 UTC MAIN commitmail json YAML

BUFQ_PRIOCSCAN enabled on macppc port.

(sevan)

2018-02-23 03:04:01 UTC MAIN commitmail json YAML

Enable BUFQ_PRIOCSCAN by default for NetBSD/macppc.
Drop references to NEW_BUFQ_STRATEGY and replace with currently available
options BUFQ_READPRIO and BUFQ_PRIOCSCAN.

ok <macallan>

(sevan)

2018-02-23 02:54:56 UTC MAIN commitmail json YAML

Remove OFB_ENABLE_CACHE
from <macallan>
"it is outdated, genfb and friends don't need or use it, and it makes no sense
on accelerated drivers either. It tries to BAT-map the framebuffer cacheable,
which works on most macs but makes a few models lock up. Genfb doesn't have that
problem and is faster too."

(sevan)

2018-02-23 01:01:22 UTC MAIN commitmail json YAML

remove this obsolete file that has a lot of dated info from
about the time we started switching some ports to GCC 5.3.

(mrg)

2018-02-22 22:25:16 UTC MAIN commitmail json YAML

2018-02-22 22:20:44 UTC MAIN commitmail json YAML

fix powerpc64 bi-arch support:  provide a LINK_SECURE_PLT_SPEC.
with this, and mknative-gcc for it, powerpc64 builds with GCC 6.

(mrg)

2018-02-22 14:57:11 UTC MAIN commitmail json YAML

Adapt previous; put #ifdef SVS around the declaration directly.

(maxv)

2018-02-22 14:49:29 UTC MAIN commitmail json YAML

Improve description of ddb.commandonenter.

(sevan)

2018-02-22 14:37:53 UTC MAIN commitmail json YAML

Document ddb.dumpstack sysctl
Remove the mention of ddb.onpanic=2 as that functionality was removed with the
introduction of ddb.dumpstack.

Heads up by <pgoyette>

(sevan)

2018-02-22 14:32:50 UTC MAIN commitmail json YAML

Sort ddb section in alphabetical order.
Bump date.

(sevan)

2018-02-22 14:24:03 UTC MAIN commitmail json YAML

2018-02-22 14:08:48 UTC MAIN commitmail json YAML

Protect the SVS part of SYSCALL_ENTRY by #ifdef SVS to make non-SVS
kernels compile again.

(martin)

2018-02-22 13:27:18 UTC MAIN commitmail json YAML

Remove svs_pgg_update(). Instead of manually changing PG_G on each page,
we can disable the global-paging mechanism in %cr4 with CR4_PGE. Do that.

In addition, install CR4_PGE when SVS is disabled manually (via the
sysctl).

Now, doing "sysctl -w machdep.svs_enabled=0" restores the performance
completely, exactly as if SVS hadn't been enabled in the first place.

(maxv)

2018-02-22 11:57:39 UTC MAIN commitmail json YAML

Ensure the CPUs are all online. We take cpu_lock, so nobody can go offline
in the meantime.

(maxv)

2018-02-22 10:42:11 UTC MAIN commitmail json YAML

Make the machdep.svs_enabled sysctl writable, and add the kernel code
needed to disable SVS at runtime.

We set 'svs_enabled' to false, and hotpatch the kernel entry/exit points
to eliminate the context switch code.

We need to make sure there is no remote CPU that is executing the code we
are hotpatching. So we use two barriers:

* After the first one each CPU is guaranteed to be executing in
  svs_disable_cpu with interrupts disabled (this way it can't leave this
  place).

* After the second one it is guaranteed that SVS is disabled, so we flush
  the cache, enable interrupts and continue execution normally.

Between the two barriers, cpu0 will disable SVS (svs_enabled=false and
hotpatch), and each CPU will restore the generic syscall entry point.

Three notes:

* We should call svs_pgg_update(true) afterwards, to put back PG_G on
  the kernel pages (for better performance). This will be done in another
  commit.

* The fact that we disable interrupts does not prevent us from receiving
  an NMI, and it would be problematic. So we need to add some code to
  verify that PMCs are disabled before hotpatching. This will be done
  in another commit.

* In svs_disable() we expect each CPU to be online. We need to add a
  check to make sure they indeed are.

The sysctl allows only a 1->0 transition. There is no point in doing 0->1
transitions anyway, and it would be complicated to implement because we
need to re-synchronize the CPU user page tables with the current ones (we
lost track of them in the last 1->0 transition).

(maxv)

2018-02-22 10:26:32 UTC MAIN commitmail json YAML

Mmh, add #ifdef SVS around svs_init().

(maxv)

2018-02-22 10:12:54 UTC MAIN commitmail json YAML

Add Microchip EMC1501.

(msaitoh)

2018-02-22 10:09:12 UTC MAIN commitmail json YAML

- Add Maxim MAX6604.
- Microchip EMC1501.
- ADT7408's device ID is not 0x80 but 0x08.

(msaitoh)

2018-02-22 10:02:08 UTC MAIN commitmail json YAML

Fix a potential bug that TX/RX might stall when TX rate limit reached.
This change is almost the same as the RX rate limit bug fix in ixgbe.c
rev. 1.121. I've never got any stall, but this must be a bug.

(msaitoh)

2018-02-22 09:41:06 UTC MAIN commitmail json YAML

Improve the SVS initialization.

Declare x86_patch_window_open() and x86_patch_window_close(), and globalify
x86_hotpatch().

Introduce svs_enable() in x86/svs.c, that does the SVS hotpatching.

Change svs_init() to take a bool. This function gets called twice; early
when the system just booted (and nothing is initialized), lately when at
least pmap_kernel has been initialized.

(maxv)

2018-02-22 08:56:52 UTC MAIN commitmail json YAML

Add a dynamic detection for SVS.

The SVS_* macros are now compiled as skip-noopt. When the system boots, if
the cpu is from Intel, they are hotpatched to their real content.
Typically:

jmp 1f
int3
int3
int3
... int3 ...
1:

gets hotpatched to:

movq SVS_UTLS+UTLS_KPDIRPA,%rax
movq %rax,%cr3
movq CPUVAR(KRSP0),%rsp

These two chunks of code being of the exact same size. We put int3 (0xCC)
to make sure we never execute there.

In the non-SVS (ie non-Intel) case, all it costs is one jump. Given that
the SVS_* macros are small, this jump will likely leave us in the same
icache line, so it's pretty fast.

The syscall entry point is special, because there we use a scratch uint64_t
not in curcpu but in the UTLS page, and it's difficult to hotpatch this
properly. So instead of hotpatching we declare the entry point as an ASM
macro, and define two functions: syscall and syscall_svs, the latter being
the one used in the SVS case.

While here 'syscall' is optimized not to contain an SVS_ENTER - this way
we don't even need to do a jump on the non-SVS case.

When adding pages in the user page tables, make sure we don't have PG_G,
now that it's dynamic.

A read-only sysctl is added, machdep.svs_enabled, that tells whether the
kernel uses SVS or not.

More changes to come, svs_init() is not very clean.

(maxv)

2018-02-22 08:49:42 UTC MAIN commitmail json YAML

- Apply ixgbe.c rev. 1.124 to ixv.c. Fix a bug that RX may stall on heavy load
on ixv(4) derived from FreeBSD's AIM (Auto Interrupt Moderation) bug.
ITR_INTERVAL value must be larger than 4us.

- The bitfield of EITR register is different between 82598 and others.
ixv.c had a bug that it accessed 82598's way even though only 82599 and
newer support virtual function. Fix it using with new ixv_eitr_write()
function.

(msaitoh)

2018-02-22 08:36:31 UTC MAIN commitmail json YAML

Revert all my latest changes, and restore this file back to how it was
in rev1.24. I wanted to replace the functions dynamically for SVS, but
that was a dumb idea, we'll just hotpatch instead.

(maxv)

2018-02-22 08:33:43 UTC MAIN commitmail json YAML

Remove extra "an"

Thanks to J. Lewis Muir

(pgoyette)