Commit Graph

255027 Commits

Author SHA1 Message Date
rin 41130f53d9 Teach fmtcheck(3) about the ' (thousands separator) flag. Taken from FreeBSD:
https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev143905
2017-12-06 12:30:27 +00:00
rin efd7892a37 Teach fmtcheck(3) about the flags a, A, F, G, t, and z. Taken from FreeBSD:
https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev117014
2017-12-06 12:28:53 +00:00
rin 75399b3dca Correct oversight of wrong format string with fewer number of arguments than
default format string has.
2017-12-06 11:33:34 +00:00
roy e27b43f1a2 Note import of dhcpcd-7.0.0-rc4 2017-12-06 10:37:08 +00:00
roy c378917b11 Sync 2017-12-06 10:35:05 +00:00
roy ffdc9e0056 Import dhcpcd-7.0.0-rc4 with the following changes:
*  Don't flush prefix routes/routers if kernel does not support RA
  *  dhcp: improve errors around UDP checksum failure
  *  dhcp: announce existing addresses before rebooting
  *  bpf: rework loop so that we can close/reopen fd inside and abort
  *  ipv6nd: don't handle NA/RA for non active interfaces
  *  dhcp6: listen on all addresses in non master mode
  *  dhcpcd-run-hooks: set protocol in dhcpcd, don't guess
  *  Ensure that xid is unique across all interfaces
  *  dhcp6: redirect message to interface which uses the xid
  *  bsd: strip scope from LL addresses when detecting their addition
  *  ipv6nd: fix address lifetime overflow on carrier up
  *  dhcp6: fix confirmation of lease on carrier up
2017-12-06 10:33:29 +00:00
ozaki-r 7f08ab8c46 Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.

Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.

Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
2017-12-06 09:54:47 +00:00
ozaki-r aaff78fd03 Make if_timer MP-safe if IFEF_MPSAFE
if_timer, a counter used by if_watchdog (if_slowtimo), can be modified in
if_watchdog and if_start and/or interrupt handlers of some device drivers. All
such accesses were serialized by KERNEL_LOCK. If IFEF_MPSAFE is enabled,
KERNEL_LOCK of if_start (and perhaps interrupt handlers) is omitted and if_timer
becomes racy.

Fix the race condition by protecting if_timer by a spin mutex. if_watchdog_reset
and if_watchdog_stop are introduced to ensure to take the mutex on accessing
if_timer. Interface with IFEF_MPSAFE enabled must use the functions.

In addition, if_watchdog callout is now set CALLOUT_MPSAFE if IFEF_MPSAFE. It
means that if_watchdog implemented by a driver must be MP-safe if the driver is
set IFEF_MPSAFE.

Currenlty interfaces with IFEF_MPSAFE implementing if_watchdog and accessing
if_timer in if_start and interrupt handlers are only wm(4). wm is changed to
use the functions. (Its watchdog handler (wm_watchdog) is already MP-safe.

These contracts will be written somewhere in a further commit.

Note that the spin mutex is now ifp->if_snd.ifq_lock to avoid adding another
spin mutex to each interface. For now reusing it isn't problematic (see the
comment to know why) thought if that does matter in the future, feel free to
replace it with a new spin mutex. It's easy to do.
2017-12-06 09:03:12 +00:00
pgoyette b637bb2dc6 Fix typos, thanks to Tom Ivar Helbekkmo 2017-12-06 08:38:33 +00:00
knakahara d91c669d5e Bump kernel version for if_tunnel_check_nesting() used by gif(4) and l2tp(4) modules.
Welcome to 8.99.9
2017-12-06 08:25:47 +00:00
knakahara d4228bae36 unify processing to check nesting count for some tunnel protocols. 2017-12-06 08:23:17 +00:00
ozaki-r 6b500088e0 Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
2017-12-06 08:12:54 +00:00
ozaki-r 2fe451f206 Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
2017-12-06 07:40:16 +00:00
ozaki-r 238237744c Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
2017-12-06 05:59:59 +00:00
ozaki-r e07f95a1ee Ensure to hold if_ioctl_lock when calling if_flags_set 2017-12-06 05:11:10 +00:00
ozaki-r bcf90b3e86 Simplify; share agr_vlan_add and agr_vlan_del (NFCI) 2017-12-06 04:37:00 +00:00
ozaki-r 7475694f27 Fix typo 2017-12-06 04:29:58 +00:00
christos ce69bf4a1a don't forget to convert the timespec.
XXX: pullup-8
2017-12-06 04:12:25 +00:00
msaitoh 33b57ecc23 Sync with FreeBSD's r326022. All of the following changes have no influence
to netbsd:
- Check ETHERCAP_VLAN_HWTAGGING in ixgbe_setup_vlan_hw_support(). This change
  has no influence to netbsd because it's enabled by default and NetBSD has
  no API to disable it.
- Fix for netmap module.
- Remove never defined UDP_IPV4_EX
- Add SPDX-License-Identifier
2017-12-06 04:08:50 +00:00
ozaki-r 3386db3a55 Use kmem_alloc instead of kmem_intr_alloc in ether_addmulti
ether_addmulti is now not called in softint thanks to wqinput that
pulled input routines of ICMP out of softint.
2017-12-06 04:00:07 +00:00
christos 86a8ba0e86 use -@ like bsd.klinks.mk 2017-12-06 02:08:03 +00:00
christos 3bc5e25fe7 remove multiple copies of the same logic. 2017-12-06 02:06:45 +00:00
kamil 17be8c5c9c Add new fortune entry with a quote from Jozef Pilsudski
This quote is a longer form of "the dogs bark, but the caravan goes on"
and compares Poles and Lithuanians (historical meanings used from the time
of country union of both nations).

Today is the 150th birthday anniversary of Jozef Pilsudski (1867-1935).
2017-12-05 22:51:59 +00:00
dholland a34d145b7a Add missing wsbell, commented out with a note that it's apparently only
a module by default.

This way people making their own configs have half a prayer of
realizing they might need to turn it on, instead of just not getting
beeps any more for no clear reason.

XXX: Wasn't the agreement after the last round of module flamage that
XXX: things shouldn't be module-only in GENERIC?
2017-12-05 21:00:26 +00:00
dholland 93da8c4519 Sort the file system options by which fs they apply to. 2017-12-05 20:32:24 +00:00
jmcneill 2dbf225c9a make a few more drm nodes 2017-12-05 19:17:11 +00:00
jmcneill 11579f7d36 drm_stat: fix device minor calculation, ok riastradh@ 2017-12-05 19:13:52 +00:00
jmcneill 26f4df0434 Add hw.synaptics.movement_enable sysctl. Default value is 1, but if set
to 0 disables movement events from the touchpad.

While here, fixup a few sysctl nodenum comparisons in
pms_sysctl_synaptics_verify to compare against node numbers instead of
values.
2017-12-05 18:04:21 +00:00
ozaki-r 21a3f65ab7 Mention the limitation of enabling both NET_MPSAFE and ALTQ 2017-12-05 03:23:29 +00:00
christos 604ff9ba7a Use similar restrictions to bsd.klinks.mk for .BEGIN rules. 2017-12-05 02:57:37 +00:00
jdolecek a05a46f69b add KASSERT() just before setting sc_deferred, to ensure this does
not trigger problem in PR kern/52769
2017-12-04 22:15:52 +00:00
kre 6b923cca7a Do away with (not well specified, even if it happens to work) absurd
15 arg test ([ ]) expression, and replace it with several well defined
2 arg tests, combined with (also well defined) sh syntax.
2017-12-04 14:50:33 +00:00
kamil 7a515d1c37 Temporarily disable t_ptrace_wait*::resume1 in ATF tests
It hangs forever on releng machines.

Sponsored by <The NetBSD Foundation>
2017-12-04 12:53:46 +00:00
bouyer c7ce92ca3a Put back SUNXI definitions in the COM_REGMAP case; com.c uses them
without #ifdef COM_AWIN.
To be safe, expand the register map to 42 entries.
2017-12-04 09:55:37 +00:00
martin 9f8ff67109 We use .BEGIN for our own cleanup and won't ever need DTS support - so
avoid inclusion of dts.mk by defining _SKIP_DTS
2017-12-04 09:44:33 +00:00
msaitoh b1c7308a07 - Fixes two problem:
1) RX may accesses freed area.
  2) if_init() takes long time on many core machine.
  Call ixgbe_jcl_reinit() not in ixgbe_setup_receive_ring() but in the
  biginning of ixgbe_setup_receive_structures(). It was OK for pre multiqueue,
  but it's not OK now because we support multiqueue.
- Fix comment of ixgbe_free_receive_ring().
2017-12-04 09:29:42 +00:00
bouyer 13874afb76 Make it clear that SUNXI registers are not defined/supported in the
COM_REGMAP case
2017-12-04 09:14:23 +00:00
skrll 66b81fa52a KNF 2017-12-04 08:24:35 +00:00
christos 53a6337cc4 regen hppa 2017-12-04 03:08:34 +00:00
mrg 2c65d957b0 deref the right address to get the pool_allocator. 2017-12-04 03:05:57 +00:00
mrg 2af02d0e1d properly account PR_RECURSIVE pools like vmstat does. 2017-12-04 03:05:24 +00:00
mlelstv 808b264de6 allow PASS opt_proto ALL syntax in map statement. 2017-12-03 23:48:03 +00:00
christos f2a0a1f117 make this compile again and:
- remove extra space
- use alternate form %x printing
- use aprint_debug_dev instead of printf
2017-12-03 23:43:00 +00:00
mrg cd83415f42 remove now wrong comment. minor KNF. 2017-12-03 21:10:01 +00:00
mrg 67dafd4718 fix the kvm version of counting pool pages for vmstat -s. 2017-12-03 21:09:01 +00:00
christos 8ab41cb9c8 - add a prefix to struct members (but not the ioctl ones because they affect
the API)
- use consistent variable names.
2017-12-03 19:07:10 +00:00
bouyer d3fee01bd5 Fix dell WMI mappings:
- query the descriptor to get the interface version, needed to workaround
  a bug in the BIOS/ACPI
- properly decode the event buffer in type/subtype, and handle multiple events
  per handler call
- record some known type/subtype in a table, with associated actions.

Informations mostly from linux. Tested on a Dell 5480 laptop.
2017-12-03 17:40:48 +00:00
bouyer 87dcc5d7d5 - make sure strtoul() is called with a NULL-terminated string.
- acpi_wmi_input(): a valid data block may have flags set to 0.
2017-12-03 17:34:50 +00:00
jmcneill d6587d34c2 add H5 dts files 2017-12-03 17:18:53 +00:00
christos 4dd927b01c handle absolute $S paths; we want to add ../ if they are relative only. 2017-12-03 17:07:18 +00:00