| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.
There are still a few outstanding problems; they will be fixed shortly.
Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric: D523
Relnotes: yes
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
| |
Re-instate UMA cached backend for 4K - 64K allocations. New consumers
like geli(4) uses malloc(9) to allocate temporary buffers that gets
free'ed shortly, causing frequent TLB shootdown as observed in hwpmc
supported flame graph.
Add a new loader tunable, vm.kmem_zmax which allows a system administrator
to limit the maximum allocation size that malloc(9) would consider using
the UMA cache allocator as backend.
|
|
|
|
|
| |
In do_lock_pi(), do not override error from umtxq_sleep_pi() when
doing suspend check.
|
|
|
|
|
|
|
|
|
| |
Ensure that sigaction flags for signal, which disposition is reset to
ignored or default, are not leaking.
MFC r270504:
Revert the handling of all siginfo sa_flags except SA_SIGINFO to the
pre-r270321 state.
|
|
|
|
|
| |
Check the validity of struct sigaction sa_flags value, reject unknown
flags.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Implement and use proc_realparent(9).
MFC r270024 (by markj):
Correct the order of arguments passed to LIST_INSERT_AFTER().
For merge, the p_treeflag member of struct proc was moved to the end
of the structure, to keep KBI intact.
|
|
|
|
|
|
|
| |
Fix an overflow in getsockopt(). optval isn't big enough to hold
sbintime_t.
Re-introduce r255030 behaviour capping socket timeouts to INT_32
if they're too large.
|
|
|
|
| |
Fix leaks of unqueued unwired pages.
|
|
|
|
|
| |
Bump WITNESS_PENDLIST by MAXCPU to account for the
pmap pvlist locks which are scaled by MAXCPU.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for multi-threading of soft updates.
Replace a single soft updates thread with a thread per FFS-filesystem
mount point. The threads are associated with the bufdaemon process.
Reviewed by: kib
Tested by: Peter Holm and Scott Long
MFC after: 2 weeks
Sponsored by: Netflix
MFC of 269853 (by kib):
Revision r269457 removed the Giant around mount and unmount code, but
r269533, which was tested before r269457 was committed, implicitely
relied on the Giant to protect the manipulations of the softdepmounts
list. Use softdep global lock consistently to guarantee the list
structure now.
Insert the new struct mount_softdeps into the softdepmounts only after
it is sufficiently initialized, to prevent softdep_speedup() from
accessing bare memory. Similarly, remove struct mount_softdeps for
the unmounted filesystem from the tailq before destroying structure
rwlock.
Reported and tested by: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
Remove Giant acquisition from the mount and unmount pathes.
|
|
|
|
|
|
|
|
| |
Cosmetic changes to unp_internalize
Don't throw away the result of fget_unlocked.
Move fdp increment to for loop to make it consistent with similar code
elsewhere.
|
|
|
|
| |
Plug p_pptr null test in do_execve. It is always true.
|
|
|
|
| |
Manage struct sigacts refcnt with atomics instead of a mutex.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r264114 by davidxu:
Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.
r264310 by davidxu:
Add kqueue support for devctl.
r268570:
Clear nonblock and async on devctl close instaed of open.
This is a purely cosmetic change.
|
|
|
|
|
|
| |
Eliminate plim and vtmp local vars in exit1.
No functional changes.
|
|
|
|
|
|
|
| |
proc exit: don't take PROC_LOCK while freeing rlimits
Code wishing to check rlimits of some process should check whether it
is exiting first, which current consumers do.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid relocking filedesc lock when closing fds during fdp destruction.
Don't call bzero nor fdunused from fdfree for such cases. It would do
unnecessary work and complain that the lock is not taken.
=======
Don't zero fd_nfiles during fdp destruction.
Code trying to take a look has to check fd_refcnt and it is 0 by that time.
This is a follow up to r268505, without this the code would leak memory for
tables bigger than the default.
|
|
|
|
|
|
|
|
| |
Don't call crdup nor uifind under vnode lock.
A locked vnode can get into the way of satisyfing malloc with M_WATOK.
This is a fixup to r268087.
|
|
|
|
| |
Plug gcc warning after r268074 about unitialized newsigacts
|
|
|
|
| |
Don't call crcopysafe or uifind unnecessarily in execve.
|
|
|
|
|
|
|
|
|
|
| |
Perform a lockless check in sigacts_shared.
It is used only during execve (i.e. singlethreaded), so there is no fear
of returning 'not shared' which soon becomes 'shared'.
While here reorganize the code a little to avoid proc lock/unlock in
shared case.
|
|
|
|
|
|
|
| |
Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant
and export the kern_ version needed by an upcoming linuxolator change.
Sponsored by: DARPA,AFRL
|
|
|
|
|
| |
Move some duplicated hook definitions from machine-dependent files to
kern_dtrace.c.
|
|
|
|
| |
shm_open()/shm_unlink() ktrace support.
|
|
|
|
| |
Remove one-time use macros which check for the vnode lifecycle.
|
|
|
|
|
| |
For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in
dirty page, which is written by the process.
|
|
|
|
|
| |
Don't ignore sndbuf/rcvbuf limits for SOCK_DGRAM sockets. This appears
to be an edit error or patch fuzz mismatch.
|
|
|
|
|
| |
Backport some macro definitions to make backporting code from FreeBSD
current easier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nuke the never-used RF_TIMESHARE feature, reducing the complexity of the
code. The consensus on arch@ is that this feature might have been useful
in the distant past, but is now just unnecessary bloat.
The int_rman_activate_resource() and int_rman_deactivate_resource()
functions become trivial, so manually inline them.
The special deferred handling of RF_ACTIVE is no longer needed in
reserve_resource_bound(), so eliminate the associated code at the
end of the function.
These changes reduce the object file size by more than 500 bytes on i386.
Update the rman.9 man page to reflect the removal of the RF_TIMESHARE
feature.
|
|
|
|
| |
Simplify the expression.
|
|
|
|
|
| |
Check for the cross-device cross-link attempt in the VFS, instead of
VOP_LINK() implemenations.
|
|
|
|
|
|
|
| |
Add helper helper vfs_write_suspend_umnt().
Fix the bug in the FFS unmount, when suspension failed, the ufs
extattrs were not reinitialized.
|
|
|
|
| |
In kern_linkat(), avoid passing doomed vnode to the VOP.
|
|
|
|
|
|
| |
Generalize vn_get_ino() to allow filesystems to use custom vnode
producer. Convert inline copies of vn_get_ino() in msdosfs and cd9660
into the uses of vn_get_ino_gen().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calculate the amount of resident pages by looking in the objects chain
backing the region. Add a knob to disable the residency calculation at
all.
MFC r268490:
Unconditionally initialize addr to handle the case of changed map
timestamp while the map is unlocked.
MFC r268711:
Change the calculation of the kinfo_vmentry field kve_private_resident
to reflect its name.
MFC r268712:
Followup to r268466.
- Move the code to calculate resident count into separate function.
It reduces the indent level and makes the operation of
vmmap_skip_res_cnt tunable more clear.
- Optimize the calculation of the resident page count for map entry.
Skip directly to the next lowest available index and page among the
whole shadow chain.
- Restore the use of pmap_incore(9), only to verify that current
mapping is indeed superpage.
- Note the issue with the invalid pages.
|
|
|
|
|
| |
When the lock was stolen from us, retry the whole lock sequence in kernel,
instead of returning EINTR.
|
|
|
|
| |
Deprecate m_act. Use m_nextpkt always.
|
|
|
|
|
|
|
|
|
|
| |
Make bind(2) and connect(2) return EAFNOSUPPORT for AF_UNIX on wrong
address family.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 for the
original discussion.
Reviewed by: terry
|
|
|
|
| |
Declaration whitespace changes for style(9).
|
|
|
|
| |
Micro-manage clang to get the expected inlining for cpu_search().
|
|
|
|
|
| |
Security: FreeBSD-SA-14:17.kmem
Security: CVE-2014-3952, CVE-2014-3953
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename vt(4) vga module to dismiss interference with syscons(4) vga module.
267623 Log:
Remove stale link to deleted vt(4) xboxfb driver.
267624 Log:
syscons(4) and vt(4) can be built together now.
267625 Log:
Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
267626 Log:
Suspend vt(4) initialization if "kern.vt.disable" kenv is set.
267965 by emaste@ Log:
Use a common tunable to choose between vt(4)/sc(4)
With this change and previous work from ray@ it will be possible to put
both in GENERIC, and have one enabled by default, but allow the other to
be selected via the loader.
(The previous implementation had separate kern.vt.disable and
hw.syscons.disable tunables, and would panic if both drivers were
compiled in and neither was explicitly disabled.)
268175 by emaste@ Log:
Fix vt(4) detection in kbdcontrol and vidcontrol
As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.
Reported by: Trond Endrestøl
268045 by emaste@ Log:
Add vt(4) to GENERIC and retire the separate VT config
vt(4) and sc(4) can now coexist in the same kernel. To choose the vt
driver, set the loader tunable kern.vty=vt .
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
Call fdcloseexec right after fdunshare.
No functional changes.
|
|
|
|
|
|
|
| |
Make fdunshare accept only td parameter.
Proc had to match the thread anyway and 2 parameters were inconsistent
with the rest.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure to always clear p_fd for process getting rid of its filetable.
Filetable can be shared with other processes. Previous code failed to
clear the pointer for all but the last process getting rid of the table.
This is mostly cosmetics.
Get rid of 'This should happen earlier' comment. Clearing the pointer in
this place is fine as consumers can reliably check for files availability
by inspecting fd_refcnt and vnodes availabity by NULL-checking them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check lower bound of cmsg_len.
If passed cm->cmsg_len was below cmsghdr size the experssion:
datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data;
would give negative result. However, in practice it would not
result in a crash because the kernel would try to obtain garbage fds
for given process and would error out with EBADF.
PR: 124908
Submitted by: campbell mumble.net (modified a little)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tidy up fd-related functions called by do_execve
o assert in each one that fdp is not shared
o remove unnecessary NULL checks - all userspace processes have fdtables
and kernel processes cannot execve
o remove comments about the danger of fd_ofiles getting reallocated - fdtable
is not shared and fd_ofiles could be only reallocated if new fd was about to be
added, but if that was possible the code would already be buggy as setugidsafety
work could be undone
|
|
|
|
|
|
|
|
|
|
| |
Don't take filedesc lock in fdunshare().
We can read refcnt safely and only care if it is equal to 1.
If it could suddenly change from 1 to something bigger the code would be
buggy even in the previous form and transitions from > 1 to 1 are equally racy
and harmless (we copy even though there is no need).
|