summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/mouse.c
AgeCommit message (Collapse)Author
2014-09-28pc/pc64: fix ps2mouse memory corruption racecinap_lenrek
there was a memory corruption bug caused by us enabling the ps2mouseputc() handler *before* initializing packetsize. once we enabled the handler, mouse interrupts could come in and advance the packet buffer index (nb) beyond the buffer boundaries. as ps2mouseputc() only checked for ++nb == packetsize, once nb was advanced beyond the packetsize, it would continue writing beyond the buffer and corrupt memory with each mouse packet byte. solution is to initialize packetsize *before* enabling the handler, and also do a >= check in ps2mouseputc() in case the packetsize gets changed to a smaller value at runtime.
2014-01-02ps2mouse: retry disable packet streaming command 0xf5cinap_lenrek
disabling mouse packet streaming command 0xf5 can fail when a packet is currently transmitted. this can be seen when one moves the mouse while running: while(){echo accelerated >/dev/mousectl; sleep 0.5}
2014-01-02ps2mouse: disable packet streaming during reprogrammingcinap_lenrek
sometimes, ps2 mouse setup failed on thinkpads during boot. disabling packet streaming while we program the mouse seems to fix the issue.
2013-01-13remove non standard COM3 (eia2) serial port from i8250 uart.cinap_lenrek
access to non standard serial port COM3 at i/o port 0x200 causes kernel panic on some machines (Toshiba Sattelite 1415-S115). also, some machines have gameport at 0x200. i readded uartisa to the pcf and pccpuf kernel configurations so one can use plan9.ini to add non standard uarts like: uart2=type=isa port=0x200 irq=5
2012-10-01devproc buffer overflow, strncpycinap_lenrek
in devproc status read handler the p->status, p->text and p->user could overflow the local statbuf buffer as they where copied into it with code like: memmove(statbuf+someoff, p->text, strlen(p->text)). now using readstr() which will truncate if the string is too long. make strncpy() usage consistent, make sure results are always null terminated.
2011-10-07mouse: disable ps2 hwaccel by default, drop inconsitent packet start bytecinap_lenrek
2011-05-09kbdfscinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen