Commit graph

3343 commits

Author SHA1 Message Date
cinap_lenrek
d1be5e163c ps2mouse: retry disable packet streaming command 0xf5
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-02 11:07:06 +01:00
cinap_lenrek
e56affb840 ps2mouse: disable packet streaming during reprogramming
sometimes, ps2 mouse setup failed on thinkpads during boot. disabling
packet streaming while we program the mouse seems to fix the issue.
2014-01-02 07:44:17 +01:00
cinap_lenrek
0e242236ba merge 2014-01-01 07:41:06 +01:00
cinap_lenrek
1a02a45883 kernel: nil check, exited procs handling in postnote()
make sure not to dereference Proc* nil pointer. this can potentially
happen from devip which has code like:

	if(er->read4p)
		postnote(er->read4p, 1, "unbind", 0);

the process it is about to kill can zero er->read4p at any time,
so there is the possibility of the condition to be true and then
er->read4p becoming nil.

check if the process has already exited (p->pid == 0) in postnote()
under p->debug qlock.
2014-01-01 07:39:17 +01:00
cinap_lenrek
18a50d04ac proc(3): the args file is writable, not read only (thanks qrstuv) 2014-01-01 06:44:48 +01:00
cinap_lenrek
9a98f28f1e kernel: remove error label in pgrpnote() arround postnote
postnote does not raise error, so the error label is not
neccesary.
2014-01-01 05:16:41 +01:00
cinap_lenrek
f481ac716d kernel: fix alarm postnote race
when alarmkproc is commited to send the alarm note to the process,
the process might have exited already, or worse, being reused for
another process. pexit() zeros p->alarm at the beginning, but the
kalarmproc() might read p->alarm before pexit() zeroed it, decide
to send the note, then get preempted and pexit() releases the proc.
once kalarmproc() is resumed, the proc might be already something
different and we send the note to the wrong thing.

we now check p->alarm under the debug qlock. that way, pexit()
cannot make progress while we test the condition.

remove the error label arround postnote(). postnote does not raise
error.
2014-01-01 05:14:38 +01:00
cinap_lenrek
0feb6e06af devproc: fix noteid permission checks for none
make sure noteid is valid (>0).

prohibit changing note group of kernel processes. this is also
checked for in pgrpnote().

prevent "none" user from changing its note group to another "none"
sessions. this would allow him to send notes other none processes
other than its own.
2013-12-31 12:23:55 +01:00
cinap_lenrek
00ff4beaa7 kernel: check for error label stack underflow in nexterror() 2013-12-31 07:29:55 +01:00
stanley lieber
02d22e158d mothra: mouse scrollwheel behave the same as in sam 2013-12-31 00:52:52 -05:00
cinap_lenrek
50bda3d522 kernel: halt idle processors on mp system by default (from sources)
one can add:

int idle_spin = 1;

in the kernel configuration to enable the old behaviour. see the
comment at idlehands().
2013-12-31 04:41:51 +01:00
cinap_lenrek
4c8cfe7284 kernel: remove unused debug cprint() function from port/cache.c
the cache can be inspected more easily with acid kernel library.
2013-12-29 07:50:58 +01:00
cinap_lenrek
42074003ca kernel: dont call pprint() while holding up->debug qlock
pprint() might block or even (maliciously) call into
devproc write which will corrupt the qlock chain on attempt
to qlock up->debug again.
2013-12-29 07:48:19 +01:00
cinap_lenrek
afc2d547e1 kernel: make sure user text, data and bss wont overlap the stack segment in sysexec() 2013-12-29 06:11:18 +01:00
cinap_lenrek
8cef1794d6 mothra: add regular expression text search (thanks mischief, sl)
this works differently from mischiefs original patch. instead of
overloading the address bar, we popup our own enter box. the
function can be invoked from the menu or by hitting ^F.
2013-12-28 21:48:53 +01:00
cinap_lenrek
59d8c24f58 page: fix page bookmarks for epub files 2013-12-28 06:49:51 +01:00
cinap_lenrek
7143b286b7 ape: move strdup() from libbsd to libap (from sources)
including <string.h> should be enougth to make strdup()
available.
2013-12-28 05:14:10 +01:00
stanley lieber
4aa68d2f3a cifs(4): replace with correct version 2013-12-27 16:42:36 -05:00
stanley lieber
066ef28390 cifs(4), cifsd(8): add HISTORY 2013-12-27 16:32:37 -05:00
stanley lieber
459f018d0d add HISTORY to various man pages 2013-12-27 16:22:05 -05:00
cinap_lenrek
7d9ae4883d audio/mixfs: implement Tstat to obtain buffer size, better underrun handling 2013-12-27 20:39:56 +01:00
stanley lieber
9c4ca0a51c audio(1): add pcmconv to HISTORY 2013-12-26 16:22:23 -05:00
stanley lieber
5ff9c61b90 fortunes: That's a video card, Blake. 2013-12-26 16:11:05 -05:00
stanley lieber
88f45cef4f audio(3): fix spelling 2013-12-26 16:07:01 -05:00
stanley lieber
c45123d623 audio(1): add HISTORY, fix spelling 2013-12-26 16:06:37 -05:00
cinap_lenrek
b9bec46b98 add audio/mixfs to allow simultanious playback streams over a single /dev/audio 2013-12-26 21:04:25 +01:00
cinap_lenrek
cad92eedd9 json(2): fix out of order SOURCE heading 2013-12-25 20:09:00 +01:00
cinap_lenrek
bb4aba830b devmouse: exclude sroll-wheel buttons from differential button handling
preventing wheel buttons 4 and 5 fron getting stuck
with multiple input devices.
2013-12-25 16:52:55 +01:00
cinap_lenrek
3e8764aef1 acid leak: remove arena pointer a < 0xff000000 check
in the kernel, area can lie above 0xff000000
2013-12-25 15:00:39 +01:00
cinap_lenrek
3f9867c4ce devdraw: fix drawdelname() string memory leak 2013-12-25 14:55:16 +01:00
cinap_lenrek
221129dc30 window: fix various problems, cleanup
with window -m, properly remove the old wsys from /dev before
binding new window to it, so the original window wont leak
into the new namespace.

do not pass -pid when $wsys does not refer to a local running rio.

cleanup environment before running sub-process.

set window label consistentently no matter if -m is used or not.
2013-12-25 01:30:43 +01:00
cinap_lenrek
1059da0066 page: scrollwheel, better backwards scrolling, fix blit bug when page was translated offscreen 2013-12-23 15:38:52 +01:00
stanley lieber
9e021d9230 /sys/lib/plumb/basic: add commas to some rules for file names that will frequently contain commas 2013-12-22 14:56:04 -05:00
cinap_lenrek
66f86d03a5 fshalt: rfork n to avoid limbo namespace when the command fails 2013-12-22 17:26:31 +01:00
cinap_lenrek
5fbc2ea9ce merge 2013-12-21 18:06:24 +01:00
cinap_lenrek
5dae7fcc68 add plumbing rules for page bookmarks and audio playback 2013-12-21 18:04:50 +01:00
cinap_lenrek
48d2f14f80 page: implement bookmarks (thanks trav_ for starting it)
add new functions pageaddr() that returns a string describing
the page to be loaded. it is in the form of:

/path/to/file!pagename!subpage!....

one can jump to such a page by calling trywalk(name, addr)
where name and addr get concatinated with ! to form a page
address and then the currently loaded pages are walked up
to the nearest page which is then returned. (or nil when
not found). the remaining address will be set in the global
pagewalk variable.

once pages get loaded (asynchronously), pagewalk1() gets
called again on addpage() and continues the walking up to the
last page.

new program flag -j <addr> was added to jump to a page on
startup.

page address (without filename) can also be supplied in
plumb message with the "addr" attribute.
2013-12-21 18:04:14 +01:00
stanley lieber
190653f049 fortunes: What an amazing year for the Web. 2013-12-19 15:08:28 -05:00
stanley lieber
9b03130bb9 json(2): fix spelling error 2013-12-19 14:59:50 -05:00
cinap_lenrek
803bc88a5f add medium to low quality json(2) manual page 2013-12-19 19:56:04 +01:00
cinap_lenrek
56300f72e8 rio: dont consider shell characters as part of the filename for auto completion
rio looks backwards in the line for the beginning of a filename
that needs to be completed with ^F. this change makes the
characters: =, ^, ( and { stoppers, so filename completion
will work in all these cases:

foobar=/foo/ba^F; for(i in (fo^F ba^F)){/bin/baz^F

this means completion will not work for prefixes having these
special characters in them.

thanks to burnzez for bringing it up.
2013-12-19 18:12:16 +01:00
cinap_lenrek
0866d65f8e acid leak: handle ALIGN_MAGIC padding of skip area for mallocalign()
the alloc and realloc tag words do not start at the beginning of
a block created by mallocalign(). instead, the block is padded
with ALIGN_MAGIC.
2013-12-17 15:40:12 +01:00
cinap_lenrek
65f426c0bd pool: update debug log format string for poolallocalign() 2013-12-17 15:32:48 +01:00
cinap_lenrek
6e2bea734b devether: fix spelling mistype 2013-12-17 12:48:17 +01:00
cinap_lenrek
f3f89e03ed ether82598, ether82563: remove packblock() avoidance hack 2013-12-16 21:47:06 +01:00
cinap_lenrek
ce5f9d8210 etheryuk: fix problems with yukon2 ep+ rev0, deoptimize 2013-12-16 21:39:22 +01:00
cinap_lenrek
ea6fea596b devether: remove qfull prints and fix loopback packet handling of etheroq()
dont spam the console with qfull warnings. this makes things worse.

handle loopback packets as stated in the comment. we call etheriq()
with fromwire=1 for loopback packets so etheriq() can pass the packet
on (without copying) or free it. dont inhibit interrupts while calling
etheriq(). etheriq() can safely be called from process and interrupt
context. it is unclear what this was supposed to fix and testing didnt
seem to have any odd effects.
2013-12-16 19:19:15 +01:00
cinap_lenrek
6946118644 devssl: use parsecmd() to process control message to get rid of 128 byte stack buffer limit
(11:02:29 PM) me: why is buf in /sys/src/9/port/devssl.c:/^sslwrite only 128 bytes?
 (11:02:58 PM) me: it makes it so you can't use a 128 bytes secret as negotiated by infauth in a secretin or secretout ctl message
 (11:03:30 PM) me: which in turn means you can't use such a secret with pushssl(2)
 (11:06:15 PM) me: inferno's sslwrite is limited to 32 bytes, but its ssl library writes to the secret files instead of to the ctl file
 (11:08:50 PM) mischief: what should it be instead of 128 bytes
 (11:08:58 PM) me: larger
 (11:09:16 PM) mischief: how about 129 bytes?
 (11:09:59 PM) me: also broken in 9front, by the way
 (11:15:14 PM) me: i guess it should be replaced with parsecmd
2013-12-16 10:06:34 +01:00
cinap_lenrek
35484945e2 exportfs: get rid of limits, cleanup
get rid of the service buffer limit. keep service buffers
on a global freelist protected by lock.

dont fatal when we hit the process limit. instead, just
abort the rpc with an error.

handle rendezvous() interrupts.
2013-12-15 07:49:53 +01:00
Matthew Veety
7d001bd2b2 god damn it forgot fucking fns.h from my last commit 2013-12-13 02:24:15 -05:00