Commit Graph

255062 Commits

Author SHA1 Message Date
christos 8e2dd5803e regen
XXX: pullup-8
2017-12-08 01:20:52 +00:00
christos 85bf85b701 make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8
2017-12-08 01:19:29 +00:00
christos 3760f161e6 Put back the old syscall glue for netbsd32 binaries, and also TRAP_SIGDEBUG
while I am at it.
2017-12-07 23:13:17 +00:00
christos 71e437ef3f Save maxv@ some work and put back the compat_13_sigreturn changes that allow
amd64 to run ancient i386 binaries.
2017-12-07 23:11:50 +00:00
christos bbc67e1790 PR/52791: Robert Sprowson: avoid duplicate tests (use accessor variables) 2017-12-07 22:56:23 +00:00
kre 20fdaa6a50 Update this test to expect the output that is supposed to be produced
by strfmon() rather than the output the old buggy implementation used
to produce.
2017-12-07 22:23:14 +00:00
kre 7fec48294c Fix obvious typo (cut&pasto or whatever) - there's only one value that
specifies the number of digits after the decimal point (oh, sorry, the
"radix character") the other specifies the number before...

While here, add a little more info on the effects of using the #n value.
2017-12-07 22:19:17 +00:00
chs dfb50bb7f4 fix the UVM_PAGE_TRKOWN page-locking assertion at the top of ffs_alloc()
to work right for multi-threaded processes.
2017-12-07 21:53:41 +00:00
christos 4e720b5200 - Reset ignored or masked traps to avoid infinite loops
- If sigpost fails don't add an SDT_PROBE
ok (and author) chuq
2017-12-07 19:49:43 +00:00
christos 09fd0f9244 new test for trapsignal 2017-12-07 19:48:12 +00:00
christos 962d0d23f1 Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.
2017-12-07 19:46:40 +00:00
macallan abd9e70d68 add SCATTER/GATHER instructions 2017-12-07 19:15:56 +00:00
jmcneill f0053e9555 Update example PKG_PATH entry to use the CDN frontend, use uname -p instead
of uname -m for processor subdirectory, and derive the OS release from
uname -r.
2017-12-07 18:26:51 +00:00
christos b1dcbc378f Keep fs/gs the same for the signal context; otherwise calling things
like __lwp_getprivate_fast() from a signal handler (that uses %gs) die.

Merge context building code.
2017-12-07 16:22:22 +00:00
christos 2b14b22e3a Make {s,g}et{db,fp,}regs work again for PK_32 processes
XXX: pullup-8
2017-12-07 15:21:34 +00:00
ozaki-r 0f890ee6ca Remove wrong assertions
rw_lock_held() returns true when any context holds the lock. However, in
if_pppoe.c, the function was used wrongly as it returns true only if the lock is
held in the same context.

From s-yamaguchi@IIJ
2017-12-07 10:22:04 +00:00
ozaki-r 1d72800a1d Get rid of outdated comments 2017-12-07 10:05:42 +00:00
kre 38400c3efe Correct a couple of broken test cases:
"%d"  does not take the same args as "%d %s"
	"%%"  does not take the same args as "%llx"
How did these ever survive any kind of even basic sanity check?
2017-12-07 09:37:33 +00:00
riastradh 6321ad0d3d Attempt to clarify panic messages for null pointer access/execute. 2017-12-07 03:25:51 +00:00
ozaki-r 3c0d913f9e Ensure to call if_addr_init with holding if_ioctl_lock 2017-12-07 03:16:24 +00:00
ozaki-r d6ed53e050 Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
2017-12-07 01:23:53 +00:00
msaitoh c0cec136ed Fix a bug that 8257[56] can't receive packet reported by Bert Kiers in
PR#52717. For 82575 and 82576, the RX descriptors must be initialized after
the setting of RCTL.EN in wm_set_filter(). This bug was added in if_wm.c
rev. 1.515.
2017-12-07 00:38:38 +00:00
rmind f24cbc0ab2 libnpf(3): improve the wording, fix and expand some sections. 2017-12-07 00:22:06 +00:00
uwe 4800414994 Include somewhat misleadingly named do-x11 into BUILDTARGETS even with
NOBINARIES set (subject to MKX11).
2017-12-06 19:34:00 +00:00
uwe 491346357b do-x11 target builds and installs only the tools and libraries, X11
programs are built during the regular recursive build in extsrc.  Edit
its description accordingly and move it before do-build to match their
order in BUILDTARGETS.

While here, drop the "either" clause that has lost its "or" a few
years ago when xfree86 reachover was removed.
2017-12-06 19:27:56 +00:00
christos 8ff9f539e7 disable 32 bit signal ktrace records; 32 bit traced process produce 64 bit
trace records, the only record that we can't parse is that one :-)
XXX: pullup-8
2017-12-06 19:15:27 +00:00
dholland d5efe6ddb1 attributions are supposed to be indented. 2017-12-06 17:54:58 +00:00
kamil 06124d1060 Correct code flow of a quote translation (by Tom Ivar Helbekkmo) 2017-12-06 17:41:15 +00:00
jmcneill 76fae9132e When testing to see if a signal handler was previously installed in
h_winch, test sa_handler against all SIG_* actions defined in sys/signal.h
instead of just 0. Corrects an issue where vi crashes after a window is
resized.
2017-12-06 17:16:14 +00:00
dholland 6dc0f13680 The list of async-signal-safe functions got moved to sigaction(2). 2017-12-06 16:38:22 +00:00
roy 195d1af85f Treat unvalidated addresses as deprecated in rule 3. 2017-12-06 14:17:42 +00:00
rin d2b4f0d1a5 Fix possible use of uninitialized variable in case of WIN32 && !_WIN64. 2017-12-06 14:05:14 +00:00
christos ee4d11d1e1 add interp test. 2017-12-06 13:55:31 +00:00
christos f2c3026d0a add a test to check that the interpreter is preserved when executing scripts. 2017-12-06 13:54:26 +00:00
rin c084bfdff8 Teach fmtcheck(3) about wint_t, intmax_t, char *, intmax_t *, and wide string
arguments. Taken from FreeBSD:
https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev181154
2017-12-06 12:32:02 +00:00
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