| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok kn@
|
|
|
|
|
|
|
|
|
|
|
|
| |
NULL. This one is a race caused by clearing the me_evp member before
calling routines that could end up sleeping.
While here, make wsmux_mux_close() look more like the other mux close
routines for increased symmetry.
ok mpi@
Reported-by: syzbot+fb9ad34ba42994683850@syzkaller.appspotmail.com
|
|
|
|
|
|
| |
CID 1453143
ok kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into wsdisplay(4). This code is now exposed through
wsdisplay_brightness_{step,zero,cycle} functions that can be called by
any driver that handles brightnes "hotkeys". These functions take
a wsdisplay(4) device pointer as their first argument, which should be
provided if a clear association between events and a particular display
exist. This is used in wskbd(4). Otherwise NULL can be passed and
the code will direct the request at the first wsdisplay(4) that
implements brightness adjustment.
Tested by many. Fixes brightness keys on x395 and other thinkpads with
AMD graphics.
ok patrick@
|
|
|
|
|
| |
wsmouseopen(); bringing them closer to wsmuxopen(). No functional
change.
|
|
|
|
|
|
|
|
|
|
|
| |
devices. This condition is checked early on during open but since the
same routine could end up sleeping before assigning me_evp, a race
against adding the same wscons device to a wsmux could be lost. This in
turn can cause a NULL deference during close.
ok mpi@
Reported-by: syzbot+34c3041bfd96c888c8bd@syzkaller.appspotmail.com
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
| |
function name in order to reduce grep noise. Also, some of them where referring
to the wrong function.
|
|
|
|
|
|
|
|
|
|
|
| |
after checking for exclusive access, malloc() can sleep in
wsevent_init() opening up for a potential race where more than one
thread may be able open the device. Prevent this by checking if the race
was won after calling malloc().
While here, switch to mallocarray as proposed by both cheloha@ and mpi@
ok mpi@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the device was opened in write-only mode. Relying on me_evar being NULL
does not work if the wskbd device was opened first followed by opening a
wsmux device. Closing the wskbd device first at this stage would cause
the wscons_event queue inherited from the wsmux device to be freed. This
in turn could cause a panic if an ioctl(WSMUXIO_INJECTEVENT) command is
issued to the wsmux device.
ok deraadt@ visa@
Reported-by: syzbot+ed88256423ae8d882b8b@syzkaller.appspotmail.com
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
| |
translates such requests into TIOCSPGRP.
ok visa@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the process who opens the device the default recipient of sigio is removed as
a side-effect of this change. Issuing ioctl(FIOSETOWN) is therefore mandatory in
order to receive sigio, which is more consistent with other subsystems
supporting sigio.
This change is all made possible by the new sigio(9) API and prevents wscons
from keeping a pointer to the recipient process. Usage of such pointer could
cause a panic since wscons is not inform on process deallocation, leaving a
dangling pointer behind.
ok mpi@ visa@
|
|
|
|
|
|
|
|
|
|
|
| |
keyboard late.
This makes keyboard re-attaching due to the machdep.forceukbd sysctl(2)
respect /etc/kbdtype.
Issue reported by Artturi Alm, jmc@ and landry@.
ok kettenis@
|
|
|
|
|
|
|
| |
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 visa@
|
|
|
|
| |
OK deraadt@, visa@, mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use it.
Instead of defering every input of a USB console keyboard to a timeout
via a queue of one element, only differ entering ddb(4) once a matching
control sequenece has been typed.
This prevent loosing inputs when a USB console keyboard is "too fast".
Fix a problem reported by matthieu@, Adam McDougall and Hrvoje Popovski.
ok stsp@, dlg@
|
|
|
|
|
|
|
| |
Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.
ok deraadt@, kettenis@, visa@
|
|
|
|
|
|
|
| |
By setting "machdep.forceukbd=1" you can now use your USB keyboard in
ddb(4) even if your BIOS emulates a pckbd(4).
ok tom@, kettenis@, deraadt@
|
|
|
|
|
|
| |
encodings.
ok deraadt@, jca@
|
|
|
|
|
|
| |
tested by Bryan Vyhmeister, krw, tb, and myself
ok jcs krw tb
|
|
|
|
|
|
| |
Needed for libinput port.
ok guenther@, miod@
|
|
|
|
| |
ok tedu@ deraadt@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
Remember initprocess instead of initproc.
ok matthew@ blambert@
|
|
|
|
| |
since it is only freed when your keyboard is detached.
|
|
|
|
| |
ok miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernels:
- keyboard drivers will now tell wskbd if the keyboard layout they ask
for is a default value, or a value they are 100% sure of (either
because your kernel has a XXXKBD_LAYOUT option, or because the
driver can tell the keyboard layout, e.g. by the country code on USB
keyboards which provide it, such as Sun's)
- when attaching a keyboard with a non-default layout, the layout will
become the default layout of the mux for new keyboard attachments if
the mux doesn't have a layout set already.
- when changing the keyboard layout of a particular keyboard with an
ioctl (i.e. using kbd(8) or wsconsctl(8)), the layout will become the
default layout of the mux for new keyboard attachments.
ok mpi@
|
|
|
|
|
|
| |
being called in a workq.
ok kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
will now recognize xterm-compatible escape sequences ESC % G and ESC % @ to
enter and leave UTF-8 mode, respectively.
Not enabled on SMALL_KERNEL.
Most of this written during c2k7, completed during b2k13.
Note that the value of several international keysyms change, to switch from
ISO Latin-[257] values to the real Unicode values. Be sure to update your
includes and rebuild and install wsconsctl.
|
|
|
|
|
|
|
| |
of wscons (which usually get disabled for installation kernels, to save
space), instead of duplicating parts of it to too many places.
No functional change.
|
|
|
|
|
|
|
| |
otherwise volume may be adjusted twice: once by X apps and once in
the kernel.
feedback from many, ok shadchin@
|
|
|
|
| |
ok miod@
|
|
|
|
|
|
| |
but if close wskbdX, wskbdX not returned to mux. Fix it.
ok miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
i386. Stop abusing it on other archs for controling a shutdown by
pressing the soft power button:
* Add a MI sysctl hw.allowpowerdown; if set to 1 (the default) it
allows a power button shutdown.
* Make acpi(4)/acpibtn(4) honor hw.allowpowerdown.
* Switch the various power button intercepts on landisk, sgi, sparc64
and zaurus over to hw.allowpowerdown.
* Garbage collect the machdep.kbdreset sysctl on all archs other than
amd64 and i386.
ok miod@
|
| |
|
|
|
|
|
|
|
| |
The audio side is a bit lacking; it does not yet mute all types of
devices.
from Alexander Polakov
ok jakemsr
|
|
|
|
|
|
| |
Updating state LED only when necessary.
ok krw@
|
|
|
|
| |
ok miod@
|
|
|
|
|
|
|
|
|
| |
a single keysym_t at a time - this means tty sanity checks will only happen
once.
Introduce wsdisplay_rawkbdinput() for raw mode input, since raw input is
a byte array. As a bonus this allows us to skip the `is this a KS_GROUP_Ascii
value' test in that case.
|
|
|
|
| |
short #define for the former, and seeing both forms in this file is confusing.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
|
|
|
|
|
| |
No functional changes.
ok krw@ miod@
|
|
|
|
|
|
| |
and machdep.kbdreset=2.
"i like it" deraadt@
|
|
|
|
| |
prompted and "much better" by marco@, ok pyr@
|