- Make rnd_printing static in kern_rndq.c.
- Merge some #ifdef _KERNEL blocks.
- Fix comments about RND_DEV_(U)RANDOM.
- Move rnd_ready to rnd_private.h.
- Mark them RND_FLAG_NO_COLLECT.
- Skip samples from sources marked RND_FLAG_NO_COLLECT.
- Don't ever call rnd_detach_source in softint context.
- Remove bogus use of cpu_softintr_p.
The call to rnd_detach_source in softint can't possibly have ever
worked: if the owner of the source ever tried to detach it by calling
rnd_detach_source again, it would LIST_REMOVE a removed element,
which is broken.
* update protocol bind implementations to use/expect sockaddr *
instead of mbuf *
* introduce sockaddr_big struct for storage of addr data passed via
sys_bind; sockaddr_big is of sufficient size and alignment to
accommodate all addr data sizes received.
* modify sys_bind to allocate sockaddr_big instead of using an mbuf.
* bump kernel version to 7.99.9 for change to pr_bind() parameter type.
Patch posted to tech-net@
http://mail-index.netbsd.org/tech-net/2015/03/15/msg005004.html
The choice to use a new structure sockaddr_big has been retained since
changing sockaddr_storage size would lead to unnecessary ABI change. The
use of the new structure does not preclude future work that increases
the size of sockaddr_storage and at that time sockaddr_big may be
trivially replaced.
Tested by mrg@ and myself, discussed with rmind@, posted to tech-net@
It appears to be causing anita install to fail. Evidently
VM_SPACE_IS_KERNEL_P(vm) is not mutually exclusive with `vm ==
curproc->p_vmspace' -- in particular, proc0's VM space is kernel.
Making this work in rump for tests will require another approach.
vnode/fsnode pair:
int
vcache_new(struct mount *mp, struct vnode *dvp, struct vattr *vap,
kauth_cred_t cred, struct vnode **vpp)
where dvp is the (referenced) directory where we want to create the
new node, vap passes va_type, va_mode and possibly va_rdev and cred
gives the credentials to setup uid/guid.
The node returned from vcache_new() is referenced, fully initialised
and has link count zero.
Welcome to NetBSD 7.99.7
vfs_mount.c, use subr_device.c instead.
Fixes rump kernels built with DEBUG by again not making the base depend
on the vfs faction, as reported by Patrick Welche.
- create new file systrace_args.c that use used to convert the syscall
arguments to an array, and functions that print the types of the
entry and return arguments.
- call the systrace probe from the trace_enter and trace_exit functions
can start up. this solves the problem where a console device needs
mountroot to complete attaching, and must create wsdisplay0 before
init tries to open /dev/console. fixes PR#49709.
XXX: pullup-7
As I said in the first revision of kern_veriexec.c: rename
kern_verifiedexec.c to kern_veriexec.c. The old history is now in Attic/,
and no change between kern_verifiedexec.c and kern_veriexec.c.
okayed by christos@ and blymn@ some months ago.
the subsystem, not "Verifiedexec".
The revisions of kern_verifiedexec.c are now in Attic/.
No change between kern_verifiedexec.c and kern_veriexec.c.
Also, update the man page accordingly.
Okayed by christos@ and blymn@ some months ago.
connect2().
1. move the code that sets the peerid structure into connect1(). This
handles so2. The datagram code calls connect2 twice with flipped
so arguments so both sockets get set.
2. in connect2 copy the peerid structure from so2 to so, so that that
both stream sockets get set.
to a cache entry in cache_lookup_entry(). The entries are being
added to the list it is looking at without mutually-exclusive locking,
so this is necessary to keep some Alphas from seeing stale data
when the pointer is newly-updated.
XXX this is doing lockless adds to a list maintained with LIST_* macros.
to the disk subsystem.
Make disk_set_info also set blocksize shift values.
Remove every call to disk_blocksize.
Keep disk_blocksize for ABI compatibility, make it also set dg_secsize.
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations. Update comment describing
the locking protocol to include this.
These files were fumble-fingered out of the last commit.
mappings of file objects. move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap(). add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).
to that of revision 1.94. Add a comment documenting my best guess
about the locking requirements in this subsystem. Don't take locks
solely for the sake of stats counter increments; the locking around
the increment of ->ncs_pass2 and/or ->ncs_2passes caused a deadlock.
Defer fixing stats-keeping to allow this change to be easily backed
out of.
The commit broke dlopen()'d rumpnet on platforms where ld.so does not
override weak aliases (e.g. musl, Solaris, potentially OS X, ...).
Requested by pooka@.
of revision 1.97. Add a comment documenting my best guess about
the locking requirements in this subsystem. Leave the locks
taken solely for stats counter increments in place for now; they
should ultimately go but that is a bigger change.
There are situations where the underlying filesystem is unreachable
(e.g: NFS) causing symlink resolution to hang. Such a situation
should be avoided by using umount -f -R (force and raw), but while -R
causes the symlink resolution to be skipped in umount(8), the kernel was
still doing it in sys_unmount(). This changes fixes that.
When the -R flag is not given, umount(8) does symlinks resolution through
realpath(3) before calling unmount(2), hence not doing it in the kernel
would not change behavior.
parsed by MI code. The format is the same as provided by an embedded
'root on <rootspec>' string in the config file. An embedded string
(other than a wildcard) still takes precedence.
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete.
Reviewed by riastradh@.
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.
The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart
As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.
Add explicit enable/disable hooks for callout-driven sources (be more
power friendly).
Make "skew" source polled so it runs only when there is entropy
demand.
Adjust entropy collection from polled sources so it's processed
sooner.
sizeof(login) test implicitly interprets 'namelen' as unsigned, which
means that negative values get kicked anyway. Still this is fragile, so:
int -> size_t
NetBSD 6.1_STABLE and other operating system (OS X 10.9.5).
* sa_len of sockaddr_un strucrure is always set to sizeof(sun_path).
* pathname stored in sun_path is alwasys '\0' terminated (except length
of sun_path is sizeof(sun_path)?).
Should be fix PR kern/49247, runtime problem of lmtp service of dovecot2 on
NetBSD current and NetBSD 7.0_BETA.
Rip out all the needless MAC address and date/time leakage. No more
uuid_init necessary, nor contention over a global uuid state.
While here, simplify uuid_snprintf and fix a strict aliasing
violation.
it is fully initialised. It may be on the specnode list before it is
fully initialised and revoking it then would panic.
Should prevent the panic from PR kern/49171 (panic when closing a pty).
locks but use the same logic.
MUTEX_SPINBIT_LOCK_INIT
MUTEX_SPINBIT_LOCK_TRY
MUTEX_SPINBIT_LOCKED_P
MUTEX_SPINBIT_LOCK_UNLOCK
MUTEX_INITIALIZE_SPIN_IPL
For those platforms without sub-word CAS, you can use these to place the
mutex lock and ipl inside a full machine word and use CAS to update them.