| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This is only done in poll-compatibility mode, when __EV_POLL is set.
ok visa@, millert@
|
| |
|
|
|
|
| |
conversion steps). it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, which are already included
by all enqueue_randomness() users.
|
| |
|
|
|
|
|
|
|
|
|
| |
This prevent exiting processes from hanging when a slave pseudo terminal
is close(2)d before its master.
From NetBSD via anton@.
Reported-by: syzbot+2ed25b5c40d11e4c3beb@syzkaller.appspotmail.com
ok anton@, kettenis@
|
| |
|
|
|
|
| |
for example, with locking assertions.
OK mpi@, anton@
|
| |
|
|
|
|
| |
adding more filter properties without cluttering the struct.
OK mpi@, anton@
|
| |
|
|
|
|
|
|
| |
invalidation in one place.
Store struct tty pointer in kn_hook directly to simplify the code.
OK mpi@
|
| |
|
|
| |
ok bluhm@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
FIOGETOWN/SIOCGPGRP/TIOCGPGRP. Do this by determining the meaning of
the ID parameter inside the sigio code. Also add cases for FIOSETOWN
and FIOGETOWN where there have been TIOCSPGRP and TIOCGPGRP before.
These changes allow removing the ID translation from sys_fcntl() and
sys_ioctl().
Idea from NetBSD
OK mpi@, claudio@
|
| |
|
|
|
|
| |
make the structs const so that the data are put in .rodata.
OK mpi@, deraadt@, anton@, bluhm@
|
| |
|
|
|
|
|
|
| |
All callers sleep indefinitely.
With help from visa@.
ok visa@, ratchov@, kn@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As per termios(4), "VTIME is a timer of 0.1 second granularity", so
convert it to milliseconds by reducing by hz and multiplying with 1000.
Furthermore, the specification (and our implementation) define members
of the c_cc arry to be of type unsigned char, so both the previous as
well as the now used arithmetic operations are guaranteed to not
overflow.
Since the timeout_add(9) API takes an int argument, the previous long
type would always be demoted anyway, so change it to int directly.
With this and hz gone, remove the obselete comment.
While here, use more mnemonic variable names.
Feedback and OK mpi
|
| |
|
|
|
|
|
|
|
| |
It currently creates a lock ordering problem because SCHED_LOCK() is taken
by hardclock(). That means the "priorities" of a thread should be moved
out of the SCHED_LOCK() first in order to make progress.
Reported-by: syzbot+8e4863b3dde88eb706dc@syzkaller.appspotmail.com
via anton@ as well as by kettenis@
|
| |
|
|
|
|
|
| |
Note that hardclock(9) still increments p_{u,s,i}ticks without holding a
lock.
ok visa@, cheloha@
|
| |
|
|
|
|
|
|
|
|
| |
does not block the signal. If all threads block the signal, we
delivered it to the main thread. This does not conform to POSIX.
If any thread unblocks the signal, it should be delivered immediately
to this thread.
Mark such signals pending at the process instead of a single thread.
Then any thread can handle it later.
OK kettenis@ guenther@
|
| | |
|
| |
|
|
|
|
|
|
| |
to the namei args. This fixes a bug where chmod would be allowed when
with only READ. This also allows some further cleanup of some awkward
things like PLEDGE_STAT that will follow
Lots of assistence from semarie@ - thanks!
ok semarie@
|
| |
|
|
|
|
| |
The code was already changed to return EIO, it will now return ENOTTY since
the code is deleted.
ok sthen
|
| |
|
|
|
|
| |
unnecessary because curproc always does the locking.
OK mpi@
|
| |
|
|
|
|
|
|
|
| |
this gets rid of the source annotation which doesn't really add
anything other than adding complexitiy. randomess is generally
good enough that the few extra bits that the source type would
add are not worth it.
ok mikeb@ deraadt@
|
| |
|
|
|
|
|
| |
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
| |
|
|
|
|
|
| |
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
| | |
|
| |
|
|
| |
ok deraadt@ krw@
|
| |
|
|
|
|
|
|
| |
returns EIO. The base system has been cleaned of TIOCSTI uses (collaboration
between anton and I), and the ports tree appears mostly clean. A few
stragglers may be discovered and cleaned up later...
In a month or so, we should see if the #define can be removed entirely.
ok anton tedu, support from millert
|
| |
|
|
|
|
| |
struct proc to struct process.
ok deraadt@ kettenis@
|
| |
|
|
|
| |
background it shall receive SIGTTOU. Handle TIOCSPGRP like we do
the other tty ioctls that change the terminal. OK deraadt@ guenther@
|
| |
|
|
|
|
|
| |
been opened during init(8). Only log with cnwrite() if cn_devvp
exists, otherwise use cnputc() as fallback. While there move extern
declarations to dev/cons.h.
input and OK deraadt@
|
| |
|
|
|
|
| |
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use 115200 the default speed for buffer sizing in ttymalloc(). A lot
of devices call ttymalloc(0) so this affects quite a few of them.
Increases the buffer size for 9600 < baud <= 115200 from 1k to 4k.
Make ppp use the lo/hi watermarks from the tty layer which are
adjusted according to speed + buffer size. The previous fixed values
of 100 and 400 were way too small
Make pty call ttymalloc() with baud == 1000000, which is the common
value used in the tree for "fast".
ok deraadt@
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
pledgenote is used for annotate the policy for a namei context. So make it
tracking the nameidata.
It is expected for the caller to explicitly define the policy. It is a kernel
bug to not do so.
ok deraadt@
|
| |
|
|
| |
p_pledgenote before NDINIT()
|
| |
|
|
| |
can pass the size to free()
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Introduce new defines TTHIWATMINSPACE, TTMINHIWAT for some magic values
that are used in tty.c.
- Remove hiwat adjustments in ttwrite(). This fixes this codepath not
being interrupt safe.
- Change ttysetwater() to keep at least TTHIWATMINSPACE space above the high
water mark. This makes it consistent with ttycheckoutq(). Without this
change, the hiwat adjustment change above causes deadlocks in pty.
ok kspillner@
commit it now deraadt@
|
| |
|
|
|
|
|
| |
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@
|
| |
|
|
|
| |
Help and feedback by Theo and Miod.
OK deraadt@, manpage-ok jmc@
|
| |
|
|
|
| |
era. fix uvm including c files to include lock.h or atomic.h as necessary.
ok deraadt
|
| |
|
|
|
|
| |
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
dynamic clamping mechanism. In the (new? has it already been 20 years?)
world of tty ring buffers, c_cn is the maximum...
There could be some ugly limit elsewhere, which may cause a deadlock
(dug as deep as my patience allows), so please report any sort
of new console or xterm issues that show up, such as tty lockups or high
cpu utilization..
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
related to disk stastics for almost 17 years, and the remaining
userland-visible defines duplicate those found in <sys/sched.h>.
Move the remaining _KERNEL defines to <sys/tty.h> where they belong, and
update all users to cope with this.
ok kettenis@
|
| | |
|
| |
|
|
|
|
| |
not have any threads left. Treat that the same as an empty pgrp.
encountered by and ok deraadt@
|
| |
|
|
| |
after discussions with beck deraadt kettenis.
|
| |
|
|
|
| |
don't need to be married.
ok guenther miod beck jsing kettenis
|
| |
|
|
|
|
|
|
|
|
|
| |
PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's
thread data. This eliminates the need for the thread-level SDEAD state.
Change kvm_getprocs() (both the sysctl() and kvm backends) to report the
"most active" scheduler state for the process's threads.
tweaks kettenis@
feedback and ok matthew@
|
| |
|
|
| |
ok millert
|