Commit graph

3234 commits

Author SHA1 Message Date
stanley lieber
bbe6fe51b3 /lib/face: add some new faces 2014-01-22 01:20:40 -05:00
stanley lieber
0efcfcc60c fortunes: undelete 2014-01-22 01:19:50 -05:00
cinap_lenrek
ca7c413ff1 sdiahci: fix hardcoded 512 byte sector size 2014-01-22 20:12:19 +01:00
cinap_lenrek
520957e254 kernel: fix ulong abuse in xalloc 2014-01-21 22:12:25 +01:00
cinap_lenrek
ebfb4fdf29 kernel: convert putmmu() to uintptr for va and pa 2014-01-20 03:17:55 +01:00
cinap_lenrek
ad1eefb355 kernel: various cleanups 2014-01-20 02:16:42 +01:00
cinap_lenrek
cb0393181a malloc(2): update alloctag types 2014-01-20 00:54:36 +01:00
cinap_lenrek
6c2e983d32 kernel: apply uintptr for ulong when a pointer is stored
this change is in preparation for amd64. the systab calling
convention was also changed to return uintptr (as segattach
returns a pointer) and the arguments are now passed as
va_list which handles amd64 arguments properly (all arguments
are passed in 64bit quantities on the stack, tho the upper
part will not be initialized when the element is smaller
than 8 bytes).

this is partial. xalloc needs to be converted in the future.
2014-01-20 00:47:55 +01:00
cinap_lenrek
b99ecee6cd malloc: change malloc and realloc tag types to uintptr 2014-01-20 00:09:53 +01:00
cinap_lenrek
43ae553195 ape: remove local copy of memccpy() 2014-01-20 00:05:19 +01:00
cinap_lenrek
8a72dc1c6b kernel: fix declaration of getcallerpc() 2014-01-19 03:32:50 +01:00
cinap_lenrek
ba787cc587 kernel: replace BY2WD in scanline width calculation to sizeof(ulong) like libmemdraw 2014-01-19 03:29:52 +01:00
cinap_lenrek
02a2eb6676 libmach: fix wrong operand order of MOVLQSX instruction disassembly 2014-01-17 21:09:17 +01:00
aap
7e1b43a53a Corrected some man pages. 2014-01-17 19:15:24 +01:00
cinap_lenrek
79e8f53e89 devdraw: fix memory corruption reading draw ctl file
when user does read of exactly 12*12 bytes on draw
ctl file, the snprint() adds one more \0 byte writing
beyond the user buffer and corrupting memory.

fix this by not snprint()ing the final space and add
it manually.
2014-01-14 00:22:13 +01:00
mischief
265b392e01 merge 2014-01-13 18:06:58 -08:00
mischief
0598844894 hpost: fix Content-Type parameter separator for multipart/form-data POSTs 2014-01-13 17:57:45 -08:00
stanley lieber
0c6a90484c add /lib/uriel; delete fortunes 2014-01-12 13:00:02 -05:00
Matthew Veety
aeb49aca9e added a segment for segattach(2) that gives access to the raspberry pi's gpio header. 2014-01-12 11:00:38 -05:00
cinap_lenrek
a5525457bd etheryuk: fix lockups (thanks burnzez for testing)
according to a comment in linux driver, reading Isrc2
register caused interrupts to be disabled. we used
to read Isrc2 in ifstat() and it was confirmed that
reading ifstat locks up ethernet. removing the Isrc2
read in ifstats, and also reenable interrupts after
reading Isrc2 when the interrupt was not for us.
(this is from the linux driver)

in replenish(), set ring software write pointer (Sring.wp)
*before* the hardware write index register. otherwise
rx() could get status notification for completed
receive but wont find the rx descriptor in the ring.

handle uint wrap arround when calculating ring fill
count and remaining count.
2014-01-12 12:08:10 +01:00
cinap_lenrek
5d9f0ed326 netif: fix wrong qid in 3rd level stats/ifstats files (thanks burnzez)
the stats and ifstats files in the 3rd level of a netif
are not per connection, but for the interface.

this made fstat fail for /net/ether0/N/*stats where N > 0
as the NETID() bits in the qid didnt compare.
2014-01-11 16:07:35 +01:00
cinap_lenrek
6a83facfb3 rio: properly handle initial wrap arround in wlook() 2014-01-11 10:46:07 +01:00
cinap_lenrek
7c503e6f49 rio: implement "look" (thanks lf94) 2014-01-11 10:14:35 +01:00
cinap_lenrek
784e6ff8cd kernel: fix fairshare formula in comment (thanks erik) 2014-01-10 15:12:28 +01:00
cinap_lenrek
fc88896fc1 mixfs: make mixbuffer addition atomic
serialize mixing with spinlock to make the addition
on the mixbuffer samples atomic.
2014-01-10 14:51:29 +01:00
cinap_lenrek
f4550c4d6a merge 2014-01-10 01:20:24 +01:00
cinap_lenrek
aa8f8d866b libdraw: cleanup string() and stringwidth()
getting rid of the goto at the end of the while
loop by moving the if(subfontnae) case before
the cachechars() call.
2014-01-10 01:19:14 +01:00
mischief
a872d5241e winwatch: this is not about sanity. rows might be negative 2014-01-08 21:32:27 -08:00
mischief
8319457a10 winwatch: prevent divide by zero if the window height is too small 2014-01-08 20:52:40 -08:00
cinap_lenrek
ce2487c3cc mothra: remove version 2014-01-07 02:57:39 +01:00
cinap_lenrek
720967f984 libframe: fix _frcanfit() for zero width runes, simplify chopframe() 2014-01-07 02:24:16 +01:00
stanley lieber
ee4ddd77f7 weather: trim garbage from output 2014-01-06 14:55:42 -05:00
cinap_lenrek
cae41c18ff libframe: avoid _frcanfit() call in frdelete()
no need to calculate number of runes to fit in
box when box contains no runes.
2014-01-06 03:56:45 +01:00
cinap_lenrek
e3b4950966 libdraw: fix stringwidth problems
cachechars() used to skip over characters on its own when
loadchar() could not find the character or a PJW replacement.
this resulted in wrong width calculation. now we just return
and handle the case inside _string and _stringwidth.

fix subfont leak in stringwidth()

remove annoying prints in stringwidth()
2014-01-06 03:49:14 +01:00
cinap_lenrek
b7ab1354e3 merge 2014-01-05 02:39:23 +01:00
cinap_lenrek
f912e01854 rio: make scrollwheel handling consistent with sam
scrollwheel now works proportional to y mouse position.
special case is when shift is hold down. then scrollwheel
will work like before and scroll one line up or down.
2014-01-05 02:37:42 +01:00
stanley lieber
473e97869f fortunes: This is Go. 2014-01-04 13:13:38 -05:00
cinap_lenrek
536423eba6 9fs: add atom and atomdump (fix the mount spec) 2014-01-03 22:53:21 +01:00
cinap_lenrek
e05d100804 9fs: add atom alias for atom.9atom.org 2014-01-03 22:25:55 +01:00
cinap_lenrek
6929f0a986 kernel: simplify procalarm() 2014-01-03 02:16:18 +01:00
cinap_lenrek
8ebe3f680e alarm: skip timed out alarms when inserting in procalarm() (thanks erik)
from erik quanstros 9fans post:

i think the list insertion code needs a single-read
test that f->alarm != 0. to prevent the 0 from
acting like a fencepost.  e.g. trying to insert -10 into
list -40 -30 0 -20.

	if(alarms.head) {
		l = &alarms.head;
		for(f = *l; f; f = f->palarm) {
>>			fw = f->alarm;
>>			if(fw != 0 && (long)(fw - when) >= 0) {
				up->palarm = f;
				*l = up;
				goto done;
			}
			l = &f->palarm;
		}
		*l = up;
	}
2014-01-03 01:40:17 +01:00
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