OpenBSD CVS

CVS log for src/sys/kern/tty_pty.c


[BACK] Up to [local] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.114 / (download) - annotate - [select for diffs], Fri Sep 2 07:37:57 2022 UTC (21 months, 1 week ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.113: +4 -6 lines
Diff to previous 1.113 (colored)

openpty() family of functions use /dev/ptm PTMGET to open a master+slave fd
pair, and also provides their names.  Internally, 3 NDINIT+namei operations
access /dev/[tp]ty[p-zP-T][0-9a-zA-Z], of these 2 followed unveil restrictions.
I argue if you unveil /dev/ptm, (and not the 372 other nodes), you still want
openpty() to provide you with working fd's, and the names, which the caller
will probably never open manually, because the fd's are given.
So change all NDINIT to use KERNELPATH, bypassing unveil.
ok semarie

Revision 1.113 / (download) - annotate - [select for diffs], Sat Jul 2 08:50:42 2022 UTC (23 months, 1 week ago) by visa
Branch: MAIN
Changes since 1.112: +1 -51 lines
Diff to previous 1.112 (colored)

Remove unused device poll functions.

Also remove unneeded includes of <sys/poll.h> and <sys/select.h>.

Some addenda from jsg@.

OK miod@ mpi@

Revision 1.112 / (download) - annotate - [select for diffs], Wed Dec 15 15:30:47 2021 UTC (2 years, 5 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.111: +22 -4 lines
Diff to previous 1.111 (colored)

Adjust pty and tty event filters

* Implement EVFILT_EXCEPT for ttys for HUP condition detection.
  This filter is used when pollfd.events has no read/write events.

* Add HUP condition detection to filt_ptcwrite() and filt_ttywrite()
  to reflect ptcpoll() and ttpoll(). Only poll(2) and select(2) can
  utilize the code; kevent(2) should behave as before with EVFILT_WRITE.

* Clear EV_EOF and __EV_HUP if the EOF/HUP condition ends.

OK mpi@

Revision 1.111 / (download) - annotate - [select for diffs], Mon Dec 13 14:56:55 2021 UTC (2 years, 5 months ago) by visa
Branch: MAIN
Changes since 1.110: +9 -8 lines
Diff to previous 1.110 (colored)

Revise EVFILT_EXCEPT filters

Restrict the circumstances where EVFILT_EXCEPT filters trigger:
* when out-of-band data is present and NOTE_OOB is requested.
* when the channel is fully closed and consumer is poll(2).

This should clarify the logic and suppress events that kqueue-based
poll(2) does not except.

OK mpi@

Revision 1.110 / (download) - annotate - [select for diffs], Sun Oct 24 00:02:25 2021 UTC (2 years, 7 months ago) by jsg
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

use NULL not 0 for pointer values in kern
ok semarie@

Revision 1.109 / (download) - annotate - [select for diffs], Fri Oct 22 15:11:32 2021 UTC (2 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.108: +31 -12 lines
Diff to previous 1.108 (colored)

Make EVFILT_EXCEPT handling separate from the read filter.

This is a change of behavior and events wont be generated if there
is something to read on the fd.  Only EV_EOF or NOTE_OOB will now
be reported.

While here a new filter for FIFOs supporting EV_EOF and __EV_HUP.

ok visa@

Revision 1.108 / (download) - annotate - [select for diffs], Mon Feb 8 09:18:30 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.107: +9 -6 lines
Diff to previous 1.107 (colored)

Do not hold onto the fdplock longer then needed. Release the lock after
the initial falloc() calls and then regrab it for the fdinsert() or
fdremove() calls respectiviely. Also move closef() outside of the lock.
This replaces the previously reverted lock order change that was reverted.
OK mvs@ visa@

Revision 1.107 / (download) - annotate - [select for diffs], Thu Feb 4 13:32:33 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.106: +27 -32 lines
Diff to previous 1.106 (colored)

Revert previous commit. The vnode returned by ptm_vn_open() is open and
can not simply be vrele()-ed on error. The code currently depends on
closef() to do the cleanup.

Reported-by: syzbot+b0e18235e96adf81883d@syzkaller.appspotmail.com

Revision 1.106 / (download) - annotate - [select for diffs], Thu Feb 4 07:54:51 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.105: +33 -28 lines
Diff to previous 1.105 (colored)

Prevent a lock order issue by shuffling code around. Instead of allocating
the file descriptors early do it late. This way the fdplock is not held
during the VFS operations.
OK mvs@

Revision 1.105 / (download) - annotate - [select for diffs], Fri Dec 25 12:59:52 2020 UTC (3 years, 5 months ago) by visa
Branch: MAIN
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

Refactor klist insertion and removal

Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.

Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.

OK mpi@

Revision 1.104 / (download) - annotate - [select for diffs], Wed Sep 9 16:29:14 2020 UTC (3 years, 9 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.103: +2 -3 lines
Diff to previous 1.103 (colored)

Introduce a helper to check if a signal is ignored or masked by a thread.

ok claudio@, pirofti@

Revision 1.94.2.2 / (download) - annotate - [select for diffs], Wed Jul 22 01:33:13 2020 UTC (3 years, 10 months ago) by deraadt
Branch: OPENBSD_6_6
Changes since 1.94.2.1: +3 -2 lines
Diff to previous 1.94.2.1 (colored) to branchpoint 1.94 (colored) next main 1.95 (colored)

Sigh. Only the ptyc case should tsleep in ttyretype, since others can
arrive in the wrong context.  Found by jcs.
this is reliability errata 6.6/035_tty.patch

Revision 1.98.4.2 / (download) - annotate - [select for diffs], Wed Jul 22 01:32:57 2020 UTC (3 years, 10 months ago) by deraadt
Branch: OPENBSD_6_7
Changes since 1.98.4.1: +3 -2 lines
Diff to previous 1.98.4.1 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored)

Sigh. Only the ptyc case should tsleep in ttyretype, since others can
arrive in the wrong context.  Found by jcs.
this is reliability errata 6.7/013_tty.patch

Revision 1.103 / (download) - annotate - [select for diffs], Mon Jul 20 14:34:16 2020 UTC (3 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.102: +3 -2 lines
Diff to previous 1.102 (colored)

Sigh. Only the ptyc case should tsleep in ttyretype, since others can
arrive in the wrong context.  Found by jcs.

Revision 1.98.4.1 / (download) - annotate - [select for diffs], Wed Jul 15 21:55:53 2020 UTC (3 years, 10 months ago) by deraadt
Branch: OPENBSD_6_7
Changes since 1.98: +4 -2 lines
Diff to previous 1.98 (colored)

A pty write containing VDISCARD, VREPRINT, or various retyping cases of
VERASE would perform (sometimes irrelevant) compute in the kernel which
can be heavy (especially with our insufficient tty subsystem locking).  Use
tsleep_nsec for 1 tick in such circumstances to yield cpu, and also bring
interruptability to ptcwrite()
https://syzkaller.appspot.com/bug?extid=462539bc18fef8fc26cc
ok kettenis millert, discussions with greg and anton
This is 6.7/012_tty.patch

Revision 1.94.2.1 / (download) - annotate - [select for diffs], Wed Jul 15 21:55:31 2020 UTC (3 years, 10 months ago) by deraadt
Branch: OPENBSD_6_6
Changes since 1.94: +4 -2 lines
Diff to previous 1.94 (colored)

A pty write containing VDISCARD, VREPRINT, or various retyping cases of
VERASE would perform (sometimes irrelevant) compute in the kernel which
can be heavy (especially with our insufficient tty subsystem locking).  Use
tsleep_nsec for 1 tick in such circumstances to yield cpu, and also bring
interruptability to ptcwrite()
https://syzkaller.appspot.com/bug?extid=462539bc18fef8fc26cc
ok kettenis millert, discussions with greg and anton
This is 6.6/034_tty.patch

Revision 1.102 / (download) - annotate - [select for diffs], Tue Jul 14 14:33:03 2020 UTC (3 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.101: +4 -2 lines
Diff to previous 1.101 (colored)

A pty write containing VDISCARD, VREPRINT, or various retyping cases of
VERASE would perform (sometimes irrelevant) compute in the kernel which
can be heavy (especially with our insufficient tty subsystem locking).  Use
tsleep_nsec for 1 tick in such circumstances to yield cpu, and also bring
interruptability to ptcwrite()
https://syzkaller.appspot.com/bug?extid=462539bc18fef8fc26cc
ok kettenis millert, discussions with greg and anton

Revision 1.101 / (download) - annotate - [select for diffs], Mon Jun 22 13:14:32 2020 UTC (3 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.100: +22 -1 lines
Diff to previous 1.100 (colored)

Extend kqueue interface with EVFILT_EXCEPT filter.

This filter, already implemented in macOS and Dragonfly BSD, returns
exceptional conditions like the reception of out-of-band data.

The functionnality is similar to poll(2)'s POLLPRI & POLLRDBAND and
it can be used by the kqfilter-based poll & select implementation.

ok millert@ on a previous version, ok visa@

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jun 15 15:29:40 2020 UTC (3 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.99: +3 -1 lines
Diff to previous 1.99 (colored)

Set __EV_HUP when the conditions matching poll(2)'s POLLUP are found.

This is only done in poll-compatibility mode, when __EV_POLL is set.

ok visa@, millert@

Revision 1.99 / (download) - annotate - [select for diffs], Thu May 21 09:34:06 2020 UTC (4 years ago) by mpi
Branch: MAIN
Changes since 1.98: +3 -2 lines
Diff to previous 1.98 (colored)

Add missing ICANON check in filt_ptcwrite().

ok millert@, visa@

Revision 1.98 / (download) - annotate - [select for diffs], Tue Apr 7 13:27:51 2020 UTC (4 years, 2 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE
Branch point for: OPENBSD_6_7
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored)

Abstract the head of knote lists. This allows extending the lists,
for example, with locking assertions.

OK mpi@, anton@

Revision 1.97 / (download) - annotate - [select for diffs], Thu Feb 20 16:56:52 2020 UTC (4 years, 3 months ago) by visa
Branch: MAIN
Changes since 1.96: +3 -3 lines
Diff to previous 1.96 (colored)

Replace field f_isfd with field f_flags in struct filterops to allow
adding more filter properties without cluttering the struct.

OK mpi@, anton@

Revision 1.96 / (download) - annotate - [select for diffs], Sat Jan 11 14:30:24 2020 UTC (4 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.95: +4 -5 lines
Diff to previous 1.95 (colored)

Convert infinite sleeps to tsleep_nsec(9).

ok bluhm@

Revision 1.95 / (download) - annotate - [select for diffs], Tue Dec 31 13:48:32 2019 UTC (4 years, 5 months ago) by visa
Branch: MAIN
Changes since 1.94: +14 -5 lines
Diff to previous 1.94 (colored)

Use C99 designated initializers with struct filterops. In addition,
make the structs const so that the data are put in .rodata.

OK mpi@, deraadt@, anton@, bluhm@

Revision 1.94 / (download) - annotate - [select for diffs], Fri Jul 19 00:17:16 2019 UTC (4 years, 10 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE
Branch point for: OPENBSD_6_6
Changes since 1.93: +4 -6 lines
Diff to previous 1.93 (colored)

ttysleep(): drop unused timeout parameter

All callers sleep indefinitely.

With help from visa@.

ok visa@, ratchov@, kn@

Revision 1.93 / (download) - annotate - [select for diffs], Mon Mar 11 17:13:31 2019 UTC (5 years, 3 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.92: +7 -1 lines
Diff to previous 1.92 (colored)

Bring back revision 1.91 now that vmd has been fixed, repeating the
previous commit message:

When closing the slave end of a pty, generate an EOF event to any kqueue
consumer of the master end. This behavior is equivalent to how pipes
already behave with kqueue. Also, FreeBSD and NetBSD behaves the same
way.

ok deraadt@ millert@ visa@

Revision 1.92 / (download) - annotate - [select for diffs], Wed Mar 6 09:36:27 2019 UTC (5 years, 3 months ago) by tb
Branch: MAIN
Changes since 1.91: +0 -6 lines
Diff to previous 1.91 (colored)

Revert revision 1.91. It results in significant log spam when
running vmd, as observed by mlarkin and myself.

discussed with anton and mlarkin

Revision 1.91 / (download) - annotate - [select for diffs], Mon Mar 4 19:23:02 2019 UTC (5 years, 3 months ago) by anton
Branch: MAIN
Changes since 1.90: +7 -1 lines
Diff to previous 1.90 (colored)

When closing the slave end of a pty, generate an EOF event to any kqueue
consumer of the master end. This behavior is equivalent to how pipes
already behave with kqueue. Also, FreeBSD and NetBSD behaves the same
way.

ok deraadt@ millert@

Revision 1.90 / (download) - annotate - [select for diffs], Thu Aug 30 06:16:30 2018 UTC (5 years, 9 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.89: +3 -11 lines
Diff to previous 1.89 (colored)

Remove dead code related to tty allocation for ptys. Back in revision 1.17 of
kern/tty_pty.c, allocation of ptys was made dynamic with the introduction of
check_pty(). Every time a new struct pty is allocated its corresponding struct
tty is also allocated. It's therefore no longer necessary to ensure that a pty
has a tty allocated after calling check_pty().

ok deraadt@ millert@ mpi@ visa@

Revision 1.89 / (download) - annotate - [select for diffs], Wed Aug 29 06:04:46 2018 UTC (5 years, 9 months ago) by anton
Branch: MAIN
Changes since 1.88: +9 -5 lines
Diff to previous 1.88 (colored)

Initialize device numbers for newly allocated ptys. Prevents a panic caused by
the following: a new pty is allocated in which the kernel console output is
redirected to, poll(2):ing from /dev/console at this point would be delegated to
the device with the major number taken from the pty due to the earlier
redirection. Since the pty does not have its correct device major assigned, the
wrong device ends up being used.

ok deraadt@ millert@

Revision 1.88 / (download) - annotate - [select for diffs], Sun Aug 5 14:23:57 2018 UTC (5 years, 10 months ago) by beck
Branch: MAIN
Changes since 1.87: +3 -1 lines
Diff to previous 1.87 (colored)

Decouple unveil from the pledge flags, by adding dedicated unveil flags
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@

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jun 18 09:15:05 2018 UTC (5 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.86: +8 -7 lines
Diff to previous 1.86 (colored)

Put file descriptors on shared data structures when they are completely
setup, take 3.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]' or the global linked list.  This allows
us to simplifies a lot code grabbing new references to fds.

All of this is now possible because dup2(2) refuses to clone LARVAL fds.

Note that the `fdplock' could now be release in all open(2)-like syscalls,
just like it is done in accept(2).

With inputs from Mathieu Masson, visa@, guenther@ and art@

Previous version ok bluhm@, ok visa@, sthen@

Revision 1.86 / (download) - annotate - [select for diffs], Tue Jun 5 09:29:05 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.85: +7 -8 lines
Diff to previous 1.85 (colored)

Revert introduction of fdinsert(), a sanitify check triggers when
closing a LARVAL file.

Found the hardway by sthen@.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Jun 2 10:27:43 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.84: +8 -7 lines
Diff to previous 1.84 (colored)

Put file descriptors on shared data structures when they are completely
setup.

LARVAL fd still exist, but they are no longer marked with a flag and no
longer reachable via `fd_ofiles[]'.  This allows us to simplifies a lot
code grabbing new references to fds.

All of this is now possible because dup2(2) refuses to clone LARVAL fds.

Note that the `fdplock' could now be release in all open(2)-like syscalls,
just like it is done in accept(2).

With inputs from Mathieu -, visa@, guenther@ and art@

ok visa@, bluhm@

Revision 1.84 / (download) - annotate - [select for diffs], Sat Apr 28 03:13:04 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.83: +4 -4 lines
Diff to previous 1.83 (colored)

Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.

OK mpi@, deraadt@

Revision 1.83 / (download) - annotate - [select for diffs], Mon Feb 19 08:59:52 2018 UTC (6 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

Remove almost unused `flags' argument of suser().

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@

Revision 1.82 / (download) - annotate - [select for diffs], Mon Jan 8 11:52:14 2018 UTC (6 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.81: +15 -1 lines
Diff to previous 1.81 (colored)

Translate the TIOCSBRK & TIOCCBRK ioctl(2)s issued on a pty(4) slave to
corresponding user mode ioctls.

If the master part of the pseudo terminal previously enabled TIOCUCNTL,
it will now receive the TIOCUCNTL_{S,C}BRK commands.  This allows to
send BREAKS commands over a pty(4) independently of the serial terminal
emulator used.

Guidance and ok nicm@, ok ccardenas@, looks ok to deraadt@

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jan 2 06:38:45 2018 UTC (6 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.80: +2 -1 lines
Diff to previous 1.80 (colored)

Stop assuming <sys/file.h> will pull in fcntl.h when _KERNEL is defined.

ok millert@ sthen@

Revision 1.80 / (download) - annotate - [select for diffs], Tue Jul 4 17:29:51 2017 UTC (6 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.79: +15 -15 lines
Diff to previous 1.79 (colored)

some of this code was written in an era when spaces cost extra.
add a little breathing room.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Feb 11 19:51:06 2017 UTC (7 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

Add a flags argument to falloc() that lets it optionally set the
close-on-exec flag on the newly allocated fd.  Make falloc()'s
return arguments non-optional: assert that they're not NULL.

ok mpi@ millert@

Revision 1.78 / (download) - annotate - [select for diffs], Tue May 24 16:09:07 2016 UTC (8 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.77: +1 -25 lines
Diff to previous 1.77 (colored)

Remove two sysctls which were introduced only for development of the
ptm/pty subsystem, and got left behind.
ok beck

Revision 1.77 / (download) - annotate - [select for diffs], Sat Mar 19 12:04:15 2016 UTC (8 years, 2 months ago) by natano
Branch: MAIN
Changes since 1.76: +4 -4 lines
Diff to previous 1.76 (colored)

Remove the unused flags argument from VOP_UNLOCK().

torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jan 28 18:02:36 2016 UTC (8 years, 4 months ago) by stefan
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.75: +5 -5 lines
Diff to previous 1.75 (colored)

Convert to uiomove. Diff from Martin Natano.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Jan 14 09:44:08 2016 UTC (8 years, 4 months ago) by sf
Branch: MAIN
Changes since 1.74: +5 -5 lines
Diff to previous 1.74 (colored)

Increase buffer sizes and watermarks for tty and ppp

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@

Revision 1.74 / (download) - annotate - [select for diffs], Sat Dec 5 10:11:53 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.73: +1 -5 lines
Diff to previous 1.73 (colored)

remove stale lint annotations

Revision 1.73 / (download) - annotate - [select for diffs], Mon Nov 2 16:31:55 2015 UTC (8 years, 7 months ago) by semarie
Branch: MAIN
Changes since 1.72: +4 -4 lines
Diff to previous 1.72 (colored)

move the pledgenote annotation from `struct proc' to `struct nameidata'

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@

Revision 1.72 / (download) - annotate - [select for diffs], Wed Oct 28 11:22:08 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.71: +5 -1 lines
Diff to previous 1.71 (colored)

There are three situations where pty ioctl's result in a NDINIT.
NDINIT should be preceded by setting pledgenote to indicate what
the operation is for.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Sep 28 19:16:04 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

easy size for free(); ok beck

Revision 1.70 / (download) - annotate - [select for diffs], Tue Feb 10 21:56:10 2015 UTC (9 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (colored)

First step towards making uiomove() take a size_t size argument:
- 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@

Revision 1.69 / (download) - annotate - [select for diffs], Tue Nov 18 23:55:01 2014 UTC (9 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.68: +1 -2 lines
Diff to previous 1.68 (colored)

Nuke yet more obvious #include duplications.

ok miod@

Revision 1.68 / (download) - annotate - [select for diffs], Sun Jul 13 15:29:04 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

use mallocarray where arguments are multipled. ok deraadt

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jul 12 18:43:32 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Jul 9 15:46:22 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

use explicit_bzero for stack and freed variables

Revision 1.65 / (download) - annotate - [select for diffs], Sun Mar 30 21:54:48 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.

ok matthew@

Revision 1.64 / (download) - annotate - [select for diffs], Sat Mar 22 06:05:45 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

Move p_sigacts from struct proc to struct process.

testing help mpi@

Revision 1.63 / (download) - annotate - [select for diffs], Fri Dec 13 19:55:12 2013 UTC (10 years, 6 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.62: +1 -14 lines
Diff to previous 1.62 (colored)

Remove the 4.3BSD tty(4) compatibility shims.  RIP.  ok millert@

Revision 1.62 / (download) - annotate - [select for diffs], Fri Oct 11 12:44:13 2013 UTC (10 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.61: +6 -6 lines
Diff to previous 1.61 (colored)

poll(2) on a closed tty should return POLLIN|POLLHUP in revents
when events is set to POLLIN and POLLHUP when events is set to
POLLOUT.  In the pty case we need to be careful to only treat the
pty as closed if carrier is on.  This fixes a hang on close problem
seen with ssh and xterm.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Oct 6 01:10:53 2013 UTC (10 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.60: +4 -4 lines
Diff to previous 1.60 (colored)

Back out POLLHUP change until a problem with xterm hanging on close
is fixed.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Oct 4 17:52:55 2013 UTC (10 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.59: +5 -5 lines
Diff to previous 1.59 (colored)

poll(2) on a closed tty should return POLLIN|POLLHUP in revents
when events is set to POLLIN and POLLHUP when events is set to
POLLOUT.  OK deraadt@

Revision 1.59 / (download) - annotate - [select for diffs], Wed Jan 2 16:14:56 2013 UTC (11 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

Fix a bug in ptcwrite() that could result in up to 100 lost bytes
when we block due to hitting the TTYHOG limit.  OK miod@

Revision 1.58 / (download) - annotate - [select for diffs], Sun Apr 22 05:43:14 2012 UTC (12 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

Add struct proc * argument to FRELE() and FILE_SET_MATURE() in
anticipation of further changes to closef().  No binary change.

ok krw@ miod@ deraadt@

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jul 5 04:48:02 2011 UTC (12 years, 11 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Recommit the reverted sigacts change now that the NFS use-after-free
problem has been tracked down.  This fixes the sharing of the signal
handling state: shared bits go in sigacts, per-rthread bits goes in
struct proc.

ok deraadt@

Revision 1.56 / (download) - annotate - [select for diffs], Sat Jul 2 22:20:08 2011 UTC (12 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

kqueue attach functions should return an errno or 0, not a plain 1. Fix
the obvious cases to return EINVAL and ENXIO.

ok tedu deraadt

Revision 1.55 / (download) - annotate - [select for diffs], Mon Apr 18 21:44:56 2011 UTC (13 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.54: +1 -1 lines
Diff to previous 1.54 (colored)

Revert the sigacts diff: NFS can apparently retain pointers to processes
until they're zombies and then send them signals (for intr mounts).  Until
that is untangled, the sigacts change is unsafe.  sthen@ was the victim
for this one

Revision 1.54 / (download) - annotate - [select for diffs], Fri Apr 15 04:52:40 2011 UTC (13 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Correct the sharing of the signal handling state: stuff that should
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves
to struct sigacts, wihle stuff that should be per rthread (ps_oldmask,
SAS_OLDMASK, ps_sigstk) moves to struct proc.  Treat the coredumping
state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread
until our locking around coredumping is better.

Oh, and remove the old SunOS-compat ps_usertramp member.

"I like the sound of this" tedu@

Revision 1.53 / (download) - annotate - [select for diffs], Sun Apr 3 14:56:28 2011 UTC (13 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Move PPWAIT flag from struct proc to process, so that rthreads in
a vforked child behave correctly.  Have the parent in a vfork()
wait on a (different) flag in *its* process instead of the child
to prevent a possible use-after-free.  When ktracing the child
return from a fork, call it rfork if an rthread was created.

ok blambert@

Revision 1.52 / (download) - annotate - [select for diffs], Fri Sep 24 02:59:39 2010 UTC (13 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.51: +1 -2 lines
Diff to previous 1.51 (colored)

dead store; found by clang

Revision 1.51 / (download) - annotate - [select for diffs], Fri Aug 6 00:00:41 2010 UTC (13 years, 10 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.50: +4 -2 lines
Diff to previous 1.50 (colored)

Every time you ignore uiomove() return value, $DEITY kills a little
$ADORABLE_FELINE.

ok deraadt@ matthew@

Revision 1.50 / (download) - annotate - [select for diffs], Mon Jul 26 01:56:27 2010 UTC (13 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.49: +5 -4 lines
Diff to previous 1.49 (colored)

Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not
struct proc.  This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.

Tested by many: deraadt, sthen, krw, ray, and in snapshots

Revision 1.49 / (download) - annotate - [select for diffs], Wed Jul 21 18:48:01 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.48: +1 -23 lines
Diff to previous 1.48 (colored)

ptm needs no read/write, just use enodev.

ok deraadt

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jul 2 19:57:15 2010 UTC (13 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.47: +1 -16 lines
Diff to previous 1.47 (colored)

remove support for compat_sunos (and m68k4k).  ok deraadt guenther

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jul 2 17:27:01 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.46: +2 -8 lines
Diff to previous 1.46 (colored)

Move common code for waking up writers on a tty into a function.

ok deraadt matthew millert

Revision 1.46 / (download) - annotate - [select for diffs], Mon Jun 28 14:13:36 2010 UTC (13 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.45: +9 -9 lines
Diff to previous 1.45 (colored)

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint.  Adjust TTYHOG (the nearly full logic) to this new
situation.  The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 12 12:57:52 2010 UTC (14 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Some of the line disciplines want to check for suser.  Better to pass them
a process instead of using curproc.  ok deraadt

Revision 1.44 / (download) - annotate - [select for diffs], Fri Apr 2 20:20:23 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.43: +10 -2 lines
Diff to previous 1.43 (colored)

Add a case so that FIONREAD on the master side of a pty returns the size
of the output queue (that is, the data coming from the program on the
slave side) rather than falling through to ttioctl which returns the
size of the input queue (the amount written to the master).

ok deraadt

Revision 1.43 / (download) - annotate - [select for diffs], Mon Nov 9 17:53:39 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.42: +1 -4 lines
Diff to previous 1.42 (colored)

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt

Revision 1.42 / (download) - annotate - [select for diffs], Sat Oct 31 12:00:08 2009 UTC (14 years, 7 months ago) by fgsch
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Oct 30 16:41:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored)

Add missing KNOTE() calls after selwakeup() in ptcread() (to wake up writers
after the master side of the pty has finished reading) and in ttyflush().

ok tedu millert

Revision 1.40 / (download) - annotate - [select for diffs], Wed Oct 14 07:19:05 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.39: +1 -5 lines
Diff to previous 1.39 (colored)

Remove a redundant if (maxpty == npty) in check_pty - this is also tested by
the two ifs at the start of the function and both variables are only altered
under pt_softc_lock so cannot change between the checks.

ok guenther@

Revision 1.39 / (download) - annotate - [select for diffs], Tue Sep 29 17:26:09 2009 UTC (14 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.38: +3 -2 lines
Diff to previous 1.38 (colored)

Having pty_isfree_locked() be inlined may make pty allocation a tiny
bit faster, but come on, inlining is supposed to be reserved only
for things which *critically* need it.
ok millert

Revision 1.38 / (download) - annotate - [select for diffs], Sat Aug 2 11:39:38 2008 UTC (15 years, 10 months ago) by stefan
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.37: +6 -6 lines
Diff to previous 1.37 (colored)

Fix integer truncation in pcread() and ptcwrite(). ok miod, otto, deraadt.

Revision 1.37 / (download) - annotate - [select for diffs], Wed May 7 09:35:52 2008 UTC (16 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

check TIOCSIG for 0 and do not send that to psignal() and pgsignal()
ok fgsch

Revision 1.36 / (download) - annotate - [select for diffs], Thu Apr 10 19:55:41 2008 UTC (16 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.35: +44 -25 lines
Diff to previous 1.35 (colored)

scrub local stack-based buffers in the tty subsystem.  tested by a lot of
developers.  if you notice tty weirdnesses in the next few months, talk to
me

Revision 1.35 / (download) - annotate - [select for diffs], Fri Sep 7 15:00:20 2007 UTC (16 years, 9 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.34: +5 -6 lines
Diff to previous 1.34 (colored)

Use M_ZERO in a few more places to shave bytes from the kernel.

eyeballed and ok dlg@

Revision 1.34 / (download) - annotate - [select for diffs], Tue May 29 00:17:32 2007 UTC (17 years ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored)

Add a name argument to the RWLOCK_INITIALIZER macro.
Pick reasonble names for the locks involved..

ok tedu@, art@

Revision 1.33 / (download) - annotate - [select for diffs], Sat Mar 4 19:33:21 2006 UTC (18 years, 3 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Typos grab bag of the month, eyeballed by jmc@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jan 18 23:42:12 2006 UTC (18 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.31: +8 -6 lines
Diff to previous 1.31 (colored)

Fix logic botch when checking for COMPAT_SUNOS binary specifics; repairs
some TIOCGPGRP result fallout.
ok deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Dec 21 12:43:49 2005 UTC (18 years, 5 months ago) by jsg
Branch: MAIN
Changes since 1.30: +36 -71 lines
Diff to previous 1.30 (colored)

ansi/deregister. No binary change.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 21 01:16:02 2005 UTC (18 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.29: +5 -3 lines
Diff to previous 1.29 (colored)

Fix a crash in ptmioctl() in the error path when the master has
been opened but the slave cannot be.  We can't do the FILE_SET_MATURE
until we are past all possible error paths since it calls FRELE(),
resulting in a reference count of 0, which closef() panics on #ifdef
DIAGNOSTIC.  OK deraadt@

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 26 00:33:45 2005 UTC (19 years ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

RIP stackable filesystems, ok marius@ tedu@, discussed with deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jan 28 15:43:24 2005 UTC (19 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.27: +15 -17 lines
Diff to previous 1.27 (colored)

When setting kern.tty.maxptys, store the old value in oldp, not
random stack garbage.  Rename DEFAULT_NPTYS and DEFAULT_MAXPTYS to
NPTY_MIN and NPTY_MAX to better match their function and don't allow
setting kern.tty.maxptys > NPTY_MAX.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Dec 19 01:44:07 2004 UTC (19 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.26: +11 -2 lines
Diff to previous 1.26 (colored)

Set atime and mtime when giving out a new pty.  With help from tholo@
and OK tedu@

Revision 1.26 / (download) - annotate - [select for diffs], Tue Dec 7 03:42:45 2004 UTC (19 years, 6 months ago) by pat
Branch: MAIN
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored)

* add a missing vput() if VOP_SETATTR() fails.

ok tedu pedro millert

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jul 22 06:13:08 2004 UTC (19 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

remove p arg from fdplock

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jul 21 12:10:20 2004 UTC (19 years, 10 months ago) by art
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

I was wrong. The assymetry created by the proc argument to rw_enter_write
is horrible and doesn't add anything.

Remove it.
XXX - the fdplock macro will need a separate cleanup.

niklas@ markus@ ok

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jul 9 08:55:41 2004 UTC (19 years, 11 months ago) by niklas
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

go away statics

Revision 1.7.10.6 / (download) - annotate - [select for diffs], Sat Jun 5 23:13:02 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.7.10.5: +474 -45 lines
Diff to previous 1.7.10.5 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Merge with the trunk

Revision 1.22 / (download) - annotate - [select for diffs], Sun Apr 11 18:04:36 2004 UTC (20 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored)

Crank max ptys to 992.  We now have 62 pty/tty pairs for each letter
instead of 16.  E.g. it is now /dev/{p,t}typ[0-9a-zA-z] instead of just
/dev/{p,t}typ[0-9a-f].  This requires that you update MAKEDEV and run:
# cd /dev && ./MAKEDEV pty0 && rm -f [pt]ty[rq]*

Revision 1.21 / (download) - annotate - [select for diffs], Sun Apr 11 16:41:30 2004 UTC (20 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

Fix calculation of the index into TTY_LETTERS.  This only worked
because sizeof(TTY_LETTERS) == sizeof(TTY_SUFFIX).

Revision 1.20 / (download) - annotate - [select for diffs], Mon Feb 23 21:17:54 2004 UTC (20 years, 3 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.19: +3 -2 lines
Diff to previous 1.19 (colored)

Make sure we allow for the time when check_pty has not yet been called
before we get invoked, by making sure getfree thinks an unused and
unallocated pt_softc entry is actually free rather than following NULL.
ok cedric@

Revision 1.7.10.5 / (download) - annotate - [select for diffs], Thu Feb 19 10:56:38 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.7.10.4: +154 -62 lines
Diff to previous 1.7.10.4 (colored) to branchpoint 1.7 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.19 / (download) - annotate - [select for diffs], Tue Feb 10 21:06:50 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Fix off-by-one wrt TTY_LETTERS and minor being out of bounds.  Missed
when I fixed the other TTY_LETTERS/TTY_SUFFIX off-by-ones.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Feb 10 01:31:21 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.17: +329 -19 lines
Diff to previous 1.17 (colored)

Add the ptm device to pty(4).  By opening /dev/ptm and using the PTMGET
ioctl(2), an unprivileged process may allocate a pty and have its owner
and mode set appropriately.  This means that programs such as xterm and
screen no longer need to be setuid.  Programs using the openpty()
function require zero changes and will "just work".

Designed by beck@ and deraadt@; changes by beck@ with cleanup (and
a rewrite of the vnode bits) by art@ and tweaks/bugfixes by me.
Tested by many.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Feb 10 01:19:47 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.16: +147 -29 lines
Diff to previous 1.16 (colored)

Dynamically allocate space for ptys; adapted from NetBSD by beck@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Oct 3 16:44:51 2003 UTC (20 years, 8 months ago) by miod
Branch: MAIN
Changes since 1.15: +3 -7 lines
Diff to previous 1.15 (colored)

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...

Revision 1.15 / (download) - annotate - [select for diffs], Tue Sep 23 16:51:12 2003 UTC (20 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.14: +41 -46 lines
Diff to previous 1.14 (colored)

Replace select backends with poll backends.  selscan() and pollscan()
now call the poll backend.  With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jul 22 01:03:12 2003 UTC (20 years, 10 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

make it compile again damnit; from slash@peereboom.us

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jul 21 22:44:50 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.12: +15 -16 lines
Diff to previous 1.12 (colored)

remove caddr_t casts.  it's just silly to cast something when the function
takes a void *.  convert uiomove to take a void * as well.  ok deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jun 14 23:14:30 2003 UTC (21 years ago) by mickey
Branch: MAIN
Changes since 1.11: +103 -1 lines
Diff to previous 1.11 (colored)

doing kqueue on the master side of the pty returns events
for the slave size as described in the pr3209.
the regress has been created to verify for the conditions.
from wayne@epipe.com.au

Revision 1.7.10.4 / (download) - annotate - [select for diffs], Sat Jun 7 11:03:40 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.7.10.3: +2 -6 lines
Diff to previous 1.7.10.3 (colored) to branchpoint 1.7 (colored)

Sync SMP branch to -current

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:06 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.10: +2 -6 lines
Diff to previous 1.10 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.8.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:29:40 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.8: +8 -8 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

Sync UBC branch to -current

Revision 1.7.10.3 / (download) - annotate - [select for diffs], Thu Mar 28 11:43:04 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.7.10.2: +5 -5 lines
Diff to previous 1.7.10.2 (colored) to branchpoint 1.7 (colored)

Merge in -current from about a week ago

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:05 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.9: +6 -6 lines
Diff to previous 1.9 (colored)

First round of __P removal in sys

Revision 1.7.10.2 / (download) - annotate - [select for diffs], Wed Mar 6 02:13:23 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.7.10.1: +3 -3 lines
Diff to previous 1.7.10.1 (colored) to branchpoint 1.7 (colored)

Merge in trunk

Revision 1.9 / (download) - annotate - [select for diffs], Sun Feb 17 07:07:49 2002 UTC (22 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

ICANON is a t_lflag, not t_iflag; neelnatu@yahoo.com

Revision 1.7.10.1 / (download) - annotate - [select for diffs], Wed Oct 31 03:26:29 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.7: +5 -13 lines
Diff to previous 1.7 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 19 18:52:05 2001 UTC (22 years, 10 months ago) by mickey
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.7: +5 -13 lines
Diff to previous 1.7 (colored)

make number of ptys configurable; deraadt@ ok

Revision 1.7 / (download) - annotate - [select for diffs], Sun Nov 30 21:41:03 1997 UTC (26 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Branch point for: SMP
Changes since 1.6: +14 -1 lines
Diff to previous 1.6 (colored)

fix TIOCGPGRP in sunos emulation

Revision 1.6 / (download) - annotate - [select for diffs], Thu Nov 13 03:11:17 1997 UTC (26 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

EXTPROC fix from lite2.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 24 14:20:00 1997 UTC (27 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.4: +1 -0 lines
Diff to previous 1.4 (colored)

OpenBSD tags

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 10 07:26:23 1996 UTC (28 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +7 -3 lines
Diff to previous 1.3 (colored)

tty_init/attach/detach()

Revision 1.3 / (download) - annotate - [select for diffs], Sun Apr 21 22:27:31 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored)

partial sync with netbsd 960418, more to come

Revision 1.2 / (download) - annotate - [select for diffs], Thu Feb 29 13:38:54 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.1: +128 -101 lines
Diff to previous 1.1 (colored)

From NetBSD: Merge with NetBSD 960217

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:52:46 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:52:46 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.