summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2012-04-15If the dma-usable area changes after autoconf, recompute the buffer count andMiod Vallat
invoke bufadjust() accordingly. Similar to what sysctl kern.bufcachepercent does.
2012-04-15Tell Indy and Challenge S apart.Miod Vallat
2012-04-15Add option EISAVERBOSE to IP22 kernelsMiod Vallat
2012-04-14User area hasn't been double-mapped in a long timePhilip Guenthe
2012-04-14If single threading is active, drirect the SIGKILL signal we send to orphanedMark Kettenis
traced processes to the active thread, otherwise we will deadlock resulting in an unkillable stopped process. ok guenther@
2012-04-14Do not just return in case the provided control buffer is too short sinceClaudio Jeker
that leaks all the file pointers. Instead make sure that the exit path via restart: -> out: does not free the uninitialized pointer. OK deraadt@ guenther@
2012-04-14Use DLT_LOOP for all tunneling interfaces.YASUOKA Masahiko
Byte order adjustment for bpf was hidden behind bpf_mtap_af() and sizeof(u_int32_t) is used for length of the bpf header. tested by sebastia and mxb at alumni.chalmers.se. ok claudio
2012-04-14Free tmp buffer in case the cluster allocation failed. Found by David Hill.Claudio Jeker
2012-04-14regenMatthieu Herrb
2012-04-14add Radeon Mobility HD 5430Matthieu Herrb
2012-04-14Revert rev 1.58, as it frees an uninitialized pointerPhilip Guenthe
ok deraadt@
2012-04-13gc unused functionTheo de Raadt
2012-04-13For now, direct the kill signal sent by PT_KILL to the thread that made usMark Kettenis
stop, just like we do for PT_CONTINUE/PT_STEP. The current code isn't ready for directing signals to other threads yet.
2012-04-13Don't convert a mbuf to a cluster and think the data in the mbuf is stillClaudio Jeker
valid after that. Copy the data into a temp buffer and then copy it back into the shiny new cluster. Problem found by deraadt@. Ok deraadt@
2012-04-13Backout a tiny part of the previous commit. Decrementing ps_singlecount inMark Kettenis
exit1() is wrong, since single_thread_check() already decrements it and may call exit1() after that. I can't reproduce the hang that this was supposed to fix anyway.
2012-04-13oops, wrong version of diff in previousTheo de Raadt
2012-04-13Do not clamp the file descriptors to the buffer size; that leads toTheo de Raadt
losing them. ok claudio
2012-04-13Avoid horrible namespace pollution of <machine/signal.h> pulling inMiod Vallat
<machine/reg.h> for the needs of struct sigcontext; said struct ought to only use simple integer types. Fixes build of groff on landisk. ok pirofti@ (who had a similar diff)
2012-04-13First stab at making ptrace(2) usable for debugging multi-threaded programs.Mark Kettenis
It implements a full-stop model where all threads are stopped before handing over control to the debugger. Events are reported as before through wait(2); you will have to call ptrace(PT_GET_PROCESS_STATE, ...) to find out which thread hit the event. Since this changes the size of struct ptrace_state, you will have to recompile gdb. ok guenther@
2012-04-13Fix waiting problem at boot on AMD Hudson's AHCI.sasano
Ok by mikeb@ and deraadt@
2012-04-13unneccessary casts to unsigned; ok claudioTheo de Raadt
2012-04-12In this case where dup2() extends the table using fdalloc, the newlyTheo de Raadt
selected fd is automatically fd_used(). We need to fd_unused() it, because it will be fd_used() again in finishdup(). spotted by guenther ok miod
2012-04-12rfork cleanupPhilip Guenthe
2012-04-12Remove dead UBC codeAriane van der Steldt
2012-04-12Add per thread accounting, mainly for usage & friends.Paul Irofti
This expands the already bloated FILL_KPROC macro to take an extra parameter that indicates if the callee is a thread or a process. The userland bits are adjusted accordingly and ps(1) and top(1) now display per thread usage times when -H is used. Also pkill(1) had to be adjusted so that duplicates don't pop up. libkvm does basically the same thing as the kernel bits. Okay guenther@.
2012-04-12hibernate: fix lock/unlock mismatchAriane van der Steldt
Unlock missed an 'f', which caused it to unlock the in-use pageqs, rather than the free pageqs as it was supposed to.
2012-04-12If the "main" thread exits it stays around but unlinks itself from theMark Kettenis
threads list. Calling TAILQ_NEXT on them is a bad idea and will panic the kernel. So check the P_WEXIT flag and pretend the thread doesn't exist if it is set. Also make PT_GET_THREAD_FIRST return the first thread on the threads list instead of the "main" thread, such that you can actually keep enumerating the threads in this case. ok guenther@, miod@
2012-04-12more rfork mop-upTheo de Raadt
2012-04-12syncTheo de Raadt
2012-04-12remove rfork(); ok guenther miodTheo de Raadt
2012-04-12PT_GETXMMREGS and PT_SETXMMREGS can take a TID.Mark Kettenis
2012-04-12uvm: keep track of maxrssAriane van der Steldt
The fault path is used to update the maxrss of the faulting proc. Doesn't affect anything, as it was 0 before. Requested by espie, "just commit it" deraadt
2012-04-12syncTheo de Raadt
2012-04-12kill lfs system call lines and libc stubsTheo de Raadt
2012-04-12syncTheo de Raadt
2012-04-12New system call: getdtablecount(2) returns the number of fileTheo de Raadt
descriptors the process currently has open. ok guenther miod gilles ...
2012-04-12dup() was calling fd_used() twice for the new file descriptor. SeperateTheo de Raadt
the dup and dup2 cases. with guenther ok miod
2012-04-12move accounting flags to struct process; idea and ok guentherMike Belopuhov
2012-04-11fix all the suser calls which pass an incorrect p_acflag argument;Mike Belopuhov
figured out by and ok guenther
2012-04-11tedu struct omsghdrTheo de Raadt
2012-04-11Move the P_WAITED flag from struct proc to struct process.Mark Kettenis
ok guenther@
2012-04-11The first ktrace record for a newly spawned thread is a returnMike Belopuhov
from a fork syscall done by the parent. Use __tfork, not rfork here to match the ktrace records for the parent (CALL __tfork, RET __tfork). ok guenther
2012-04-11In sendmsg() permit at most 10% of maxfiles to be in-flightTheo de Raadt
during CMSG_DATA SCM_RIGHTS fd transfers. If this is exceeded, return EMFILE. ok claudio guenther gilles
2012-04-11SLIST_REMOVE_NEXT -> SLIST_REMOVE_AFTER for better consistency andChristian Weisgerber
compatibility with FreeBSD/NetBSD. Also rename SIMPLEQ_REMOVE_NEXT to SIMPLEQ_REMOVE_AFTER. ok mikeb@ guenther@
2012-04-11vmmap: speed up allocationsAriane van der Steldt
Reduces O(n log n) allocations to O(log n). ok deraadt, tedu
2012-04-10Add a start record to the ktrace and use a special magic string "KTR"Mike Belopuhov
to identify ktrace files. kdump(1) will now refuse to operate on trace data without the start record and as a bonus will print only PID, unless an -H flag is specified to print PID/TID pairs. Initial diff, input from and ok deraadt, guenther.
2012-04-10Count traps and fpu context switches.Miod Vallat
2012-04-10Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimitPhilip Guenthe
count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel variables are replaced by nprocess, maxprocess, nthreads, and maxthread. ok tedu@ mikeb@
2012-04-10When converting the timeout to ticks, both round up and add one to accountPhilip Guenthe
for the tick that we're already in the middle of. noted and tested by aja; ok kurt@
2012-04-10Return EINVAL on 0-byte mmap invocation.Ariane van der Steldt
- Posix rules that a 0-byte mmap must return EINVAL - our allocators are unable to distinguish between free memory and 0 bytes of allocated memory