ddb(4), crash(8): Make `show all locks' work without LOCKDEBUG.
Any lwp currently waiting for a _contended_ lock will now record a
pointer to that lock in struct lwp::l_ld_wanted, even without
LOCKDEBUG. We can't tell who holds shared locks or spin locks, but we
can at least tell what lock a thread is waiting for when it's spinning
for a spin lock, and generally present the graph of current lock
dependencies reasonably well this way.
PR kern/60030: ddb/crash: show all locks without LOCKDEBUG
kernel: Track what lock each lwp is waiting for without LOCKDEBUG.
This is reasonably cheap -- one extra pointer on the stack, couple
extra stores when _waiting_ (spinning or sleeping) for a _contended_
lock -- and doesn't change the kernel ABI. Will enable us to get
diagnostics from crash dumps when, e.g., there's a softint deadlock
tripping a heartbeat panic.
PR kern/60030: ddb/crash: show all locks without LOCKDEBUG
"if PWD references the current directory, then PWD is assumed to be the
name of the current directory" is tautologically confusing.
Just state that for '-L' $PWD is _printed_ (under the right circumstances).
vchiq: Back port of the change
commit 49bec49fd7f273ec114e2e533c1bb8f21a654aaf
Author: Michael Zoran <mzoran at crowfest.net>
Date: Sun Oct 30 05:55:07 2016 -0700
staging: vc04_services: remove vchiq_copy_from_user
The vchiq_copy_from_user function is not portable
and is consider "bad practice." Replace this function
with a callback based mechanism that is passed downward
on the stack. When it is actually time to copy the data,
the callback is called to copy the data into the message.
This callback is provided internally for userland calls
through ioctls on the device.
NOTE: Internal clients will need to be modified to work
with the new internal API.
[26 lines not shown]
vchiq: Apply change from upstream
commit 6e474d8e3981a63b6e1cf11b838014ed52499804
Author: Stefan Wahren <wahrenst at gmx.net>
Date: Wed Oct 26 18:34:19 2016 +0000
staging: vchiq_shim: avoid code duplication
Rearrange the polling loops in order to avoid code duplication. Btw we fix
the style of the comments.
Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
PR/60597: RVP: Instead of assuming that writing to a UDP port is an immediate
success, wait for a bit for the ICMP port unreachable message to reach us.
evbarm/ti_edma: fix comparison sign
The comparison sign was the wrong way around. This got masked
during testing because the driver reverted to PIO mode
when it couldn't acquire a DMA channel.
Fully describe the new dotglob option
Move it to the correct place in the list of options (these things
are sorted!) and flesh out the description of what it (now) does a bit.
While here, fix some minor markup issues in an earlier revision relating
to the new -c option to the read built-in.
sh: fully implement dotglob
Since dotglob has been created, and is now a sh option, implement
it fully, not only for filename completion (but not at all in SMALL
shells).
When dotglob is enabled '*' (etc) matches filenames beginning with
a dot (period, '.') as well as everything else. When it is disabled
the historic practice of only matching files with names starting with
a '.' when the pattern starts (that component) with a '.' continues.
The default (as with most options) is disabled (traditional behaviour).
Note that the names "." and ".." are unaffected by dotglob, they
are only ever matched by a pattern starting with '.'.
Note all of this applies only to filename expansion (aka, glob) and
libedit's filename completion, and not to any other uses of pattern
matching in sh. In all other contexts a '.' is just a character,
wherever it appears, and is matched just the same as anything else.
/bin/sh option list, don't include dotglob in SMALL shells
dotglob is only (currently) used for file completion via libedit.
None of that is included in SMALL shells, so the new dotglob option
is pointless there (just occupies space), just exclude it.
Only match "." and ".." if the filename is non-empty & starts with '.',
regardless of the state of MATCH_HIDDEN_FILES. That's the way bash
actually works, and makes sense.
Also, while here, don't allow calling the completion function to
alter the "match_hidden_files" setting set by EL_MATCH_HIDDEN_FILES
(or not permanently, only for the current match process).
Also, have fn_complete() call fn_complete2() using MATCH_HIDDEN_FILES
if EL_MATCH_HIDDEN_FILES has been set. This gives some purpose to
the global setting, which was otherwise doing nothing at all.
And make the default be to match hidden files (the way libedit used to
work) which seems likely to have been the intent.
kvm_mkdb(8): Replace nonstandard SIZE_T_MAX by standard SIZE_MAX.
Should we delete this? It was unhooked from the build in 2003 and it
no longer builds now:
/home/riastradh/netbsd/current/src/usr.sbin/kvm_mkdb/kvm_mkdb.c: In function 'main':
/home/riastradh/netbsd/current/src/usr.sbin/kvm_mkdb/kvm_mkdb.c:133:24: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
133 | dbname = _PATH_KVMDB;
| ^
/home/riastradh/netbsd/current/src/usr.sbin/kvm_mkdb/kvm_mkdb.c:155:35: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
155 | nlistpath = _PATH_KSYMS;
| ^
/home/riastradh/netbsd/current/src/usr.sbin/kvm_mkdb/kvm_mkdb.c:157:35: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
157 | nlistpath = _PATH_UNIX;
| ^