Commit graph

3661 commits

Author SHA1 Message Date
cinap_lenrek ce80c5029e oggdec: recognize "begin of stream" packets and restart decoding 2014-09-16 20:25:01 +02:00
cinap_lenrek 187aad97be merge 2014-09-16 16:42:16 +02:00
cinap_lenrek e060bc6df6 libauthsrv: allow multiple auth= attributes for backup auth servers, authdial() tries each one in order
some of us run auth servers from home that are used by multiple
servers on the internet. when the home authserver becomes unreachable,
services on the outside servers stop working. so we thought about
specifing a secondary auth servers for backup when the primary
server is not reachable.

this changes authdial() to consult multiple auth= entries in
the authdom= or dom= tuples, trying each one in order until
dial() succeeds.
2014-09-16 16:41:05 +02:00
mischief e5c47ca18e ramfs: allow changing mtime in wstats 2014-09-15 15:49:39 -07:00
mischief 222018340b hg: make intermediate directories like newer hg does 2014-09-15 13:42:54 -07:00
cinap_lenrek 7011194af1 ramfs: fix directory check in wstat() (thanks mischief) 2014-09-16 22:33:27 +02:00
cinap_lenrek 694597de3b devtls: fix typo in debug print 2014-09-15 08:19:51 +02:00
cinap_lenrek 7f295c2055 telnetd: let the kernel place the shared segment in segattach() (thanks kenji arisawa) 2014-09-14 21:20:13 +02:00
cinap_lenrek fdf3883ce4 libmemdraw: update drawtest to use same rounding in alpha calculation as libmemdraw 2014-09-14 17:03:56 +02:00
cinap_lenrek e9fddbaad8 kernel: fix segattach() rounding of va+len (thanks kenji arisawa)
from segattach(2):

          Va and len specify the position of the segment in the
          process's address space.  Va is rounded down to the nearest
          page boundary and va+len is rounded up.  The system does not
          permit segments to overlap.  If va is zero, the system will
          choose a suitable address.

just rounding up len isnt enougth. we have to round up va+len
instead of just len so that the span [va, va+len) is covered
even if va is not page aligned.

kenjis example:

	print("%p\n",ap);	// 206cb0
	ap = segattach(0, "shared", ap, 1024);
	print("%p\n",ap);	// 206000

term% cat /proc/612768/segment
Stack     defff000 dffff000    1
Text   R      1000     6000    1
Data          6000     7000    1
Bss           7000     7000    1
Shared      206000   207000    1
term%

note that 0x206cb0 + 0x400 > 0x20700.
2014-09-14 16:04:22 +02:00
mischief 8348a233ae vi: implement _nsec syscall 2014-09-13 06:07:57 -07:00
cinap_lenrek c8008e1ffd libsec: experimental DHE client support for tls and cleanups 2014-09-14 02:30:46 +02:00
cinap_lenrek 6c68876db6 libsec: add diffie-hellman functions 2014-09-14 02:29:18 +02:00
cinap_lenrek 4cf00ca6cb libsec: fix hmac for keys bigger then 64 byte block size
RFC2104 defines HMAC for keys bigger than the 64 byte block
size as follows:

Applications that use keys longer than B (64) bytes will
first hash the key using H (the hash function) and then
use the resultant L byte string as the actual key to HMAC.
2014-09-14 02:26:26 +02:00
aiju 69fab298be libsec: ecgen() and ecdsasign() fix 2014-09-13 19:46:41 +02:00
BurnZeZ 62a8bf1846 acme: remove unused #include 2014-09-11 12:47:04 -04:00
aiju 418ce96ca2 games/gb: minor goof 2014-09-11 11:36:35 +02:00
aiju d63850570c games/nes: reduce volume, causes overflow and confuses ac97 2014-09-11 11:20:57 +02:00
cinap_lenrek a49ddece8b ip/ayiya: experimental anything in anything tunnel protocol client
this is a work in progress implementation of the ayiya (anything
in anything) protocol as used by sixxs.net. hiro tested it and it
worked for him, but progress has stalled as sixxs.net rejected my
request for an account and ignored my emails since.
2014-09-06 22:59:58 +02:00
cinap_lenrek 460f482ad0 doom: fix alignment issues for arm 2014-09-04 23:02:37 +02:00
cinap_lenrek 3a322e9f32 5e: fix signed long multiply 2014-09-04 22:53:54 +02:00
cinap_lenrek e890c3d943 5e: push ERRMAX for note message on stack avoiding unaligned stack pointer 2014-09-03 19:23:55 +02:00
cinap_lenrek b864727723 ether8139: fix pointer to smaller int tuncation warning on amd64 2014-09-02 16:20:43 +02:00
stanley lieber 585ab698de /sys/lib/dist/ndb/common: add auth=fs.stanleylieber.com authdom=inri 2014-08-28 20:46:56 -04:00
stanley lieber 935e8472d1 fortunes: $75K Prosthetic Arm Is Bricked When Paired iPod Is Stolen 2014-08-27 01:13:11 -04:00
cinap_lenrek 7996878864 ipconfig: remove sleep() left over from debug :-) 2014-08-27 01:41:02 +02:00
cinap_lenrek 46b8a0ac00 ipconfig: fix readipifc() memory leaks in recvra6 and sendra6 processes
to avoid continuously leaking memory in recvra6 and sendra6
processes, pass the previous Ipifc* pointer to readipifc().
2014-08-27 01:12:42 +02:00
cinap_lenrek acb49987e6 ip: set arp entry for own v6 address when not tentative
after running ip/ipconfig -6, we are unable to ping our
own link-local address and the arp daemon sends out useless
neighbor solicitation requests to itself. this change
adds an arp entry for our ipv6 address. however, this
must not be done for tentative interface configuration.
2014-08-26 21:29:37 +02:00
cinap_lenrek 7ad08a8515 ipconfig: cleanup code duplication in ip6cfg() 2014-08-26 21:09:57 +02:00
cinap_lenrek dbf165e1bd ping: don't spin when we get error reading icmp connection, print error and sleep 2014-08-26 21:07:59 +02:00
cinap_lenrek 6031dd83b6 pc64: enable ether8139 in kernel config (thanks hiro) 2014-08-22 00:00:06 +02:00
cinap_lenrek 15755a5f83 ether8139: fix pointer truncation by ulong cast, use mallocalign() 2014-08-21 10:56:15 +02:00
cinap_lenrek 2161885034 secstore: improve error messages, newSConn() can't fail 2014-08-21 01:18:36 +02:00
cinap_lenrek 2ec9006e9e ip: fix memory leak in ipicadd6()
allocate the Iplifc structure on the stack instead.
i assuming that it was allocated on heap in fear of
causing stack oveflow. on 386, this adds arround
88 bytes on the stack but it doesnt seem to cause
any trouble. (checked with poolcheck after ctl write)
2014-08-21 00:30:13 +02:00
cinap_lenrek 0d5491fb08 pc, pc64: fix off by one error in _multibootentry 2014-08-18 03:16:11 +02:00
cinap_lenrek f128c6eab0 boot: dont print errors if ethernet has no ifstats file, can happen with usb ethernet 2014-08-17 06:08:06 +02:00
cinap_lenrek 98e3e12d92 5a: revert MOVM .S and .W are exclusive (broke bcm build) 2014-08-17 04:26:28 +02:00
cinap_lenrek 3b661a96ef kernel: make noswap flag exclude processes from killbig() if not eve, reset noswap flag on exec 2014-08-17 00:50:20 +02:00
iru 0bc51a90b0 Fix acme crash: Get D in a new window with D being an existing directory 2014-08-16 18:50:42 -03:00
cinap_lenrek 773b57b676 kernel: fix todfix() race
we have to recheck the condition under tod lock, otherwise
another process can come in and updated tod.last and
tod.off and once we have the lock, we would make time
jump backwards.
2014-08-16 21:04:41 +02:00
cinap_lenrek ce0b77e2b9 kernel: xinit() use ulong for page counts, cleanup 2014-08-16 17:26:12 +02:00
cinap_lenrek a5bce84600 nusb/kb: delete code for keyboard boot protocol handling, just use hid parser
unify the keyboard and mouse readers into one using the hid
report parser for both. remove the keyboard protocol handling,
as it is now handled by hid parser and all we get is a sequence
of keycodes in Hiddev.k[] which we diff for up/down and translate
to pc scancodes.
2014-08-16 23:34:28 +02:00
aiju 74a276d076 spred: command window improvements 2014-08-14 10:42:39 +02:00
cinap_lenrek a67d18ccf1 import: make aan (-p flag) work in ``backwards mode'' (-B)
in backwards mode, the roles of the aan filters need to be
reversed. add "-n address" option to import to override the
announce address for the aan server part (default tcp!*!0).
2014-08-14 00:11:14 +02:00
cinap_lenrek d8d26c7001 nusb/ptp: do maxpkt reads to avoid babble error with usb 2.0 devices (thanks mischief!)
mischief got babble error with his mobile phone as we used to
read at max 64 bytes for the data response phase. his device
has 512 byte packet size.

thans to mischief for the patience.
2014-08-13 01:10:59 +02:00
cinap_lenrek bedffdd8c3 devenv: prevent non-hostowner from creating or removing variables in '#ec', cleanup 2014-08-13 23:09:47 +02:00
cinap_lenrek 55bf3d6399 ip: fix missed unlocks and waserror handlers
ipifcunbind() could error out from ipifcremlifc() and Medium.unbind()
*after* decrementing ifc->conv->inuse! move the decrement after
calling these functions.

make ipifcremlifc() never raise error but return error string.
the only places where it could error is when it calls into
medium functions like Medium.remroute() and Medium.remmulti().
Ignore these errors as they could happen when the ethernet driver
crashed (think imported ethernet device or usb ethernet
in userspace), so we will be able to unbind.

add waserror() handlers as neccesary to deal with errors from
Medium.addmulti(), Medium.areg() and arpenter() to properly
unlock the data structures.
2014-08-12 21:35:31 +02:00
mischief 53619de428 aux/8prefix: fix usage 2014-08-12 10:33:47 -07:00
mischief b0d7ade423 secstore(1): clarify how the server is dialed and add new $secstore environment variable 2014-08-10 20:38:59 -07:00
mischief a0b7cabe3a secstore: read server from $secstore environment variable
this allows setting the secstore server with secstore=tcp!example.com!secstore or secstore='$secstore' to read from ndb.
2014-08-10 18:05:57 -07:00
stanley lieber e17025174a fortunes: it´s easy but you are complicated 2014-08-10 19:04:20 -04:00
stanley lieber 443b046bff fs(8): correct spelling 2014-08-10 19:00:55 -04:00
cinap_lenrek 427e925eea cwfs: add optional uid argument to allow command, unify permission override code
the allow command now takes an optional uid argument for the user
to be granted temporary god status on the fileserver for maintenance.

this was kenji okomotos idea, so thanks :)

remove wstatallow and writeallow flags. instead, we have global:

int allowed;

that contains the uid of the currently allowed user id or -1
if permission checking is globally disabled for the fileserver.
when zero, normal permission checking takes place.

added int isallowed(File*) function that returns non-zero when the
context is the console, or the allowed user. this is also used internally
by iaccess(), so all the extra code of in the callers of iaccess()
is gone now.

dont conflate allowed user with noauth flag and auto-allow on ream.
the installer already knows about noauth and allow flags so theres no
problem with bootstraping.
2014-08-11 22:36:59 +02:00
cinap_lenrek 30d4d8984b 5a: MOVM.IA.W.S ..., [R15] is exception return and needs to be allowed (thanks aiju) 2014-08-09 18:23:14 +02:00
cinap_lenrek 760063ab57 cwfs: fix 32bit multiplication overflows for allocation sizes (thanks kenji okomoto) 2014-08-09 17:37:02 +02:00
cinap_lenrek 3472f91129 5a: reject MOVM instruction with .S and .W bits both set (aijus idea) 2014-08-09 22:47:46 +02:00
cinap_lenrek daa15d1edb kernel: more nil vs 0 cleanup in chan.c 2014-08-08 17:02:10 +02:00
cinap_lenrek ee6409366e kernel: use nil for pointers instead of 0, zero channel umc and dirrock in newchan() 2014-08-08 16:44:41 +02:00
cinap_lenrek 0ceeee4c8b ndb/dns: fix nil dereference crash with convM2DNS() returning reqmsg.qd == nil 2014-08-08 02:06:03 +02:00
cinap_lenrek 45333cdc92 devmnt: fix potential race with mntflushfree(), remove mntstats, 0 vs nil cleanup
when mountmux() completes a request for another process, enforce odering
of the loads and stores to the request prior to writing q->done = 1
so mntflushfree() sees q->done != 0 only when the request has actually
completed. otherwise, the q->done = 1 store could have been reordered
before the load from q->z, reading from already freed request and causing
spurious wakeups.

removing unused mntstats callback.

use nil for pointers instead of 0.
2014-08-08 23:28:47 +02:00
cinap_lenrek bc306a5a63 8c, 6c: generate enam.c file, just like 5c 2014-08-07 21:35:52 +02:00
cinap_lenrek 0a101736b8 pc, pc64: make pc kaddr() check reject -KZERO address (thanks aiju) 2014-08-07 21:11:11 +02:00
cinap_lenrek d304dc8119 5a, 5l: add LDREX/STREX/CLREX instructions 2014-08-07 20:22:00 +02:00
cinap_lenrek ca4f815cfc pc64: fix wrong Ureg* argument on note handler (thanks _sl!)
_sl reported crash:

stats 593: suicide: sys: trap: fault write addr=0xffffffff8258d1b0 pc=0x204cc7

; acid 593
/proc/593/text:amd64 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/amd64
acid: lstk()
notejmp(ret=0x1,j=0x40ac90)+0x13 /sys/src/libc/amd64/notejmp.c:10
alarmed(a=0xffffffff8258d1b0,s=0x7ffffeffea58)+0x3f /sys/src/cmd/stats.c:718
notifier+0x3e /sys/src/libc/port/atnotify.c:15
acid:

note how a in alarmed is a kernel address!

the first Ureg* argument is passed to the note handler in the
RARG (BX) register, which was not loaded when returning to
userspace from syscall() thru forkret(). fix by returning thru
noteret() from syscall().
2014-08-07 19:55:25 +02:00
cinap_lenrek 7c1ae2ead3 samterm: fix ctrl-b crash when cmd window resized (thanks revex)
for reference:

On IRC revex reported that samterm crashes on Ctrl-b if the command window has
been resized. I was able to reproduce:

http://plan9.stanleylieber.com/sam/bugs/ctrl-b.png

; acid 831213
/proc/831213/text:amd64 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/amd64
acid: lstk()
abort()+0x0 /sys/src/libc/9sys/abort.c:6
panic1(s=0x400448)+0x27 /sys/src/cmd/samterm/main.c:692
panic()+0x19 /sys/src/cmd/samterm/main.c:684
lldelete()+0x71 /sys/src/cmd/samterm/flayer.c:221
flupfront(l=0x40eac0)+0x18 /sys/src/cmd/samterm/flayer.c:139
	v=0x20062900000001
current(nw=0x40eac0)+0x49 /sys/src/cmd/samterm/main.c:156
type(l=0x40eac0,res=0x15300000001)+0x37c /sys/src/cmd/samterm/main.c:658
	t=0x40eaa8
	buf=0x419ec0
	p=0x41dd48
	a=0x0
	backspacing=0x200000000
	c=0x41dd4800000002
	cursor=0x0
	a0=0x0
threadmain(argv=0x7ffffeffefa0)+0x21c /sys/src/cmd/samterm/main.c:75
	r=0xb0000001b1
	got=0xfefefefe00000002
	chord=0x0
	nwhich=0x43c310
	scr=0x200000000
	t=0xfefefefefefefefe
	w=0x43c310fefefefe
mainlauncher()+0x18 /sys/src/libthread/main.c:59
launcheramd64(arg=0x4194a0,f=0x221673)+0x10 /sys/src/libthread/amd64.c:11
0xfefefefefefefefe ?file?:0
acid:
2014-08-04 09:33:23 +02:00
cinap_lenrek 15b5a980d7 iostats: properly distribute exit status and give usefull error messages 2014-08-03 17:09:28 +02:00
cinap_lenrek 718f3358bb iostats: remove unused fcallfmt, dont leak our mount pipe end into exportfs proc 2014-08-03 16:28:07 +02:00
cinap_lenrek d63734eb53 iostats: bring back standard filedescriptor spying 2014-08-03 16:02:47 +02:00
cinap_lenrek 5302e88796 exportfs: simplify freefile() code
remove impossible checks, rewrite as while loop.
2014-08-02 19:22:10 +02:00
cinap_lenrek b185d2fe5c exportfs: remove getsbuf() nil check, can't happen 2014-08-02 19:04:33 +02:00
cinap_lenrek 686cf0b0f3 iostats: isolate fs from interrupt notes
interrupt notes go to the child process, not the filesystem
and filter process.
2014-08-02 18:45:19 +02:00
cinap_lenrek 4f45a40334 iostats: cannot spy on fd 0,1,2 as /fd is per process 2014-08-02 15:47:24 +02:00
cinap_lenrek 73d35f9c7d exportfs: cleanup 2014-08-02 15:07:29 +02:00
cinap_lenrek 7ae4e473da ftpfs: dont convert names to latin when string is valid utf-8 2014-08-02 14:37:16 +02:00
cinap_lenrek 7cc757c3c0 python: disable symlink and readlink compile options, ape has no reasonable way emulating it 2014-08-02 14:28:19 +02:00
cinap_lenrek dc501ae1e3 iostats: dont prefix /bin to argv[0] when already absolute or relative path 2014-08-02 03:06:09 +02:00
cinap_lenrek 4e42b9996f iostats: cleanup, remove bogus Maxrpc constant 2014-08-02 02:41:57 +02:00
cinap_lenrek 23aaa0c59c iostats: reimplement iostats as a 9p filter instead of duplicating exportfs
old iostats failed to work when builidng the kernel due to old bugs
that where already fixed in exportfs. instead of backporting the fixes,
reimplement iostats as a filter that sits between exportfs and the
process mount. from users perspective, theres no difference.

the result is much smaller and can handle everything that exportfs
can like /srv.
2014-08-02 02:30:19 +02:00
cinap_lenrek 1b70ab5979 exportfs: use argv0 instead of hardcoding "/bin/exportfs" in openmount(), dont use 0 for nil 2014-08-01 16:57:39 +02:00
aiju 709e78b9f9 spred: scrolling and other bugfixes 2014-07-31 11:36:24 +02:00
stanley lieber a39ce6a934 fortunes: From: urielc@cantv.net 2014-07-30 12:11:58 -04:00
stanley lieber e7a3cd0fd0 spred(1): fix troff 2014-07-30 12:09:35 -04:00
aiju 712fd30652 added sprite editor spred 2014-07-30 15:57:14 +02:00
stanley lieber 555a05018b fstype(1): document hjfs 2014-07-29 22:32:16 -04:00
cinap_lenrek a2f7d03d4e rc: fix slow Xqdol(), avoid recursion in conclist(), estrdup(), avoid copying
Xqdol() used to take quadratic time because of strcat(),
the code isnt really needed as list2str() aready does the
same thing in linear time without the strcat().

add estrdup() which uses emalloc() so allocation error are
catched.

move strdups() of name from callers into newvar().

avoid recursion of conclist(), and avoid copying of word
strings by providing Newword() function which doesnt copy
the word string.
2014-07-23 15:28:37 +02:00
mischief 2bdd2663db ratrace(1): uses syscall not syscalltrace file 2014-07-22 23:40:53 -07:00
stanley lieber e42d8492c6 fortunes: I wanted to do something that didn't involve arguing online about trivia. -- jwz 2014-07-22 18:41:36 -04:00
stanley lieber de8752e45e sega(1): add man page for games/md (and potential future sega emulators) 2014-07-22 18:29:33 -04:00
stanley lieber 0d909ae6ab nintendo(1): document snes 2014-07-22 17:44:46 -04:00
stanley lieber 33592e9d7c games/md: add -2 -3 -a and trailing newline to usage 2014-07-22 17:38:44 -04:00
stanley lieber 69eb0cd713 games/snes: add -a -h -m -T to usage 2014-07-22 17:00:32 -04:00
cinap_lenrek 6273bad12d ratrace: make multithreaded ratraces less confusing (for mischief) 2014-07-22 21:54:26 +02:00
cinap_lenrek 168b9f3de4 libdraw: add missing borderop() (thanks aiju) 2014-07-21 18:10:58 +02:00
cinap_lenrek 1021caa395 pc64: cleanup syscallentry()
avoid the stack shuffeling and make syscallentry() and
forkret() use the same stack offsets.
2014-07-21 18:02:14 +02:00
cinap_lenrek c78c6e349a pc64: dont save/restore DS/ES/FS/GS segment registers on syscall or interrupt, they are ignored in long mode.
we do not support 32 bit processes and DS, ES, FS and GS segment
registers are ignored in long mode, so theres no point in saving
and restoring them.
2014-07-20 02:59:45 +02:00
cinap_lenrek 20b7a19c58 pc64: preserve user extern registers R14 and R15 across syscalls, use Ureg.bp (RARG) for syscall number
the 6c compiler reserves R14 and R15 for extern register variables,
which is used by the kernel to hold the m and up pointers. until
now, the meaning of R14 and R15 was undefined for userspace and
extern register would not work as the kernel trashes R14 and R15
on syscalls. with this change, user extern registers R14 and R15
are zeroed on exec and otherwise preserved across syscalls. so
userspace *could* use them for per process variables like the
kernel does.

use Ureg.bp (RARG) for syscall number instead of Ureg.ax. this is
less confusing and mirrors the amd64 calling convention.
2014-07-20 22:49:02 +02:00
mischief b603991593 a.out(6): sync definitions 2014-07-17 23:22:48 -07:00
cinap_lenrek 4a7d29dd5f libframe: use correct text color on frinsert depending on selection (thanks sl)
frinsert() used cols[TEXT] for drawing selected text instead of the
HTEXT color. this was discovered with rio -b.
2014-07-17 23:29:55 +02:00
cinap_lenrek e4436ec0bb page: fix deadlock with addpage (thanks BurnZeZ for the stacktraces)
addpage() should not be called with the display locked as it
calls showpage1() which sleeps when there are too many
processes active.

the bug was triggered by plumbing to trigger the addpage().
2014-07-15 20:45:00 +02:00
cinap_lenrek 4f3724e6e1 devproc: nil 2014-07-15 18:51:58 +02:00
cinap_lenrek 3d3a29cd84 devproc: fix syscalltrace error handling, conistent use of nil for pointers 2014-07-15 07:54:22 +02:00
cinap_lenrek e4db040bcf devproc: fix mistake 2014-07-14 06:45:23 +02:00
cinap_lenrek 655ec332a7 devproc: fix proccrlmemio bugs
dont kill the calling process when demand load fails if fixfault()
is called from devproc. this happens when you delete the binary
of a running process and try to debug the process accessing uncached
pages thru /proc/$pid/mem file.

fixes to procctlmemio():

- fix missed unlock as txt2data() can error
- make sure the segment isnt freed by taking a reference (under p->seglock)
- access the page with segment locked (see comment)
- get rid of the segment stealer lock

other stuff:

- move txt2data() and data2txt() to segment.c
- add procpagecount() function
- make return type mcounseg() to ulong
2014-07-14 06:02:21 +02:00
cinap_lenrek e53511ef4c libmach: fix break point instruction for little endian MIPS (from sources)
fix break point instruction for little endian MIPS in
libmach. (patch /n/sources/patch/libmach-mipsle-bpinst)
2014-07-13 01:24:55 +02:00
cinap_lenrek cc001c31a7 tftpfs: make sure path is null terminated 2014-07-13 01:17:48 +02:00
cinap_lenrek 4b7b1218bf ftpd: dont skip unmountnet() and return proper error string from dialdata() 2014-07-13 01:03:17 +02:00
cinap_lenrek e14eaacce6 tftpd: fix error string packet overflow in nak(), fix syslog reporting 2014-07-13 01:00:02 +02:00
cinap_lenrek fafc17b049 expr: fix missing type declarations for match(), which broke on amd64 as pointers dont fit into a long 2014-07-12 03:02:21 +02:00
cinap_lenrek 03f68c49f6 kernel: only complain about no images when theres nothing more to reclaim
uncaching a thousand pages (arround 4MB) might not be
enougth. so keep on reclaiming pages and only complain
once theres nothing more to reclaim.
2014-07-11 03:57:21 +02:00
stanley lieber 3cfdae9787 pkg(1): add mischief's repositories 2014-07-09 19:48:59 -04:00
cinap_lenrek e89ca39e53 Add AHCI support for Intel 8 Series/C220 Series Chipset Family SATA Controller. (from sources) 2014-07-10 00:07:51 +02:00
cinap_lenrek d0895186a1 Add Intel C226 chipset PCI support. (from sources) 2014-07-10 00:07:09 +02:00
cinap_lenrek 6bfff754a8 abaco: fix double free race of p->status string (thanks BurnZeZ for the proc snap) 2014-07-09 23:55:54 +02:00
cinap_lenrek 3a6a754051 pc, pc64: initial machine check architecture support 2014-07-09 22:45:51 +02:00
cinap_lenrek 3fe38f7001 bcm: apply richards fix for mmukmap (from /n/sources/patch/bcm-mmukmap-bug) 2014-07-08 21:57:35 +02:00
cinap_lenrek 8677db333a nusb/serial: implement flushes
handle reads and writes with 9pqueue(2) so they can
be flushed and wont hang the filesystem. this also
lets us get rid of the timeouts.

ftdi is still full of braindamage that should be
rewritten, but i dont have a device to test.
2014-07-05 08:17:37 +02:00
cinap_lenrek 502247bf92 nusb/serial: more cleanup 2014-07-05 06:01:03 +02:00
cinap_lenrek 336e605a11 support for huawei e220 g3 modem, cleanup nusb/serial 2014-07-05 23:19:13 +02:00
stanley lieber c20bab6fe0 ndb/common: add ipv6-icmp, ipv6-nonxt, ipv6-opts, bootps 2014-07-03 12:03:40 -04:00
cinap_lenrek 013054ef6f merge 2014-07-03 01:11:05 +02:00
stanley lieber 5814e66560 9pqueue(2): english 2014-07-02 19:01:20 -04:00
cinap_lenrek 2dc3180f98 9p(2): add reference to 9pqueue(2) 2014-07-03 00:57:40 +02:00
cinap_lenrek fa56753ed8 add 9pqueue(2), medium to low quality manpage. 2014-07-03 00:47:10 +02:00
cinap_lenrek 51cb8f50d8 remove executable bit from /sys/src/lib9p/ramfs.c 2014-07-03 00:17:28 +02:00
Aram Hăvărneanu 0577d20890 merge 2014-07-01 11:21:47 +02:00
Aram Hăvărneanu 889afd97de acid: fix notestk() on amd64
Use Ureg->pc instead of Ureg->ir.
2014-07-01 11:20:55 +02:00
cinap_lenrek 92e43acb1c authsrv(6): fix typos (from /n/sources/patch/authsrv-6-typos) 2014-06-30 08:27:51 +02:00
stanley lieber 114a5bdce6 fortunes: Subject: ftp(1) User-Agent 2014-06-29 15:01:44 -04:00
stanley lieber 6a182d56b7 nusbrc: ensure rpi ethernet always appears as /net/etherU0 2014-06-29 14:58:03 -04:00
cinap_lenrek 4ad63a4c56 nusb: fix spelling, sorry 2014-06-28 19:55:14 +02:00
cinap_lenrek 7d9339f75e merge 2014-06-28 18:11:04 +02:00
cinap_lenrek 4275c49e72 nusb: implement aijus stable uniqueue device names
instead of naming devices by ther dynamically assigned device address,
we hash device uniqueue fields from the device descriptor and produce
a 5 digit hex string that will identify the device across machines.

when there is a collision (less than 1% chance with 100 devices),
usbd will append the device address to the name to make it uniqueue
for this machine.

the hname is passed to drivers in the devid argument, which now has
the form addr:hname, where the colon and hname can be omited (for backwards
compatibility).

when the new behaviour isnt desired, nousbhname= environment variable
can be defined giving the old behaviour.
2014-06-28 18:09:43 +02:00
cinap_lenrek d8c75e45de iostats: more procs 2014-06-28 17:53:57 +02:00
mischief 9d30b0f32d merge 2014-06-27 23:51:14 -07:00
mischief 5aee1a997f unzip: fix usage 2014-06-27 23:50:42 -07:00
cinap_lenrek ec572a53a9 ptp: fix alignment assumptions for amd64 2014-06-28 01:36:37 +02:00
mischief a1dad87446 upas/fs: disable imap mail fetch pipeline due to race
pipeline = 1 with a dovecot imap server causes FETCH and OK responses
get interleaved so some message bodies accidentally get merged together.
disabling it will make fetching mail over imap slower, but it works.
2014-06-25 22:06:29 -07:00
mischief 072c45d463 xen: delete screen.h from pc that accidentally snuck in. a screen.h for xen framebuffer will be added later. 2014-06-25 16:56:39 -07:00
mischief 3812a4bf41 xen: fix boot argv0 2014-06-25 16:03:08 -07:00
mischief 500a91e7a3 xen: gotta go fast
use smaller timeouts for sleeps while waiting for xen ether and sd devices to come online. in practice they come up very quickly.
2014-06-25 15:47:31 -07:00
mischief 3f230d717d xen: correct print format for long 2014-06-25 15:45:04 -07:00
mischief 46cc1c444b sam: mark samsave executable
sam generates $home/sam.save for modified files. it expects /sys/lib/samsave to be executable to restore the modified files.
2014-06-25 03:13:52 -07:00
mischief 2060daf3b0 xen: fix early console 2014-06-24 19:37:03 -07:00
mischief 5ba95fdb07 import xen 32 bit paravirtual kernel from /n/sources/xen. 2014-06-24 18:02:25 -07:00
cinap_lenrek fa03455b50 kernel: more proc.c cleanup 2014-06-23 21:51:34 +02:00
cinap_lenrek 6a05751132 kernel: make use of nil and 0 consistent in proc.c
always explicitely compare with nil if pointer.
sorry for the noise. :(
2014-06-23 21:24:12 +02:00
cinap_lenrek 650d794cbf merge 2014-06-23 20:30:18 +02:00
cinap_lenrek 7cf6a35486 kernel: fix cooperative scheduling for wired processes 2014-06-23 20:29:10 +02:00
stanley lieber c87e7ffe2b newt(1): minor man page clarifications 2014-06-22 18:10:04 -04:00
cinap_lenrek 87d5626af0 ether8169: use u16int instead of u8int for C+ command register (thanks pavel / erik) 2014-06-22 19:01:37 +02:00
cinap_lenrek e7bfa556ad pc64: fix comment for preallocpages() 2014-06-22 16:05:53 +02:00
cinap_lenrek 3c41f98e0c remove imagepagerefs() acid function 2014-06-22 15:40:36 +02:00
cinap_lenrek d4d86df2ab kernel: new pagecache, remove Lock from page, use cmpswap for Ref instead of Lock
make the Page stucture less than half its original size by getting rid of
the Lock and the lru.

The Lock was required to coordinate the unchaining of pages that where
both cached and on the lru freelist.

now pages have a single next pointer that is used for palloc.head
freelist xor for page cache hash chains in Image.pghash[].

cached pages are not on the freelist anymore, but will be reclaimed
from images by the pager when the freelist runs out of pages.

each Image has its own 512 hash chains for cached page lookup. That is
2MB worth of pages and there should be no collisions for most text images.

page reclaiming can be done without holding palloc.lock as the Image is
the owner of the page hash chains protected by the Image's lock.

reclaiming Image structures can be done quickly by only reclaiming pages from
inactive images, that is images which are not currently in use by segments.

the Ref structure has no Lock anymore. Only a single long that is atomically
incremented or decremnted using cmpswap().

there are various other changes as a consequence code. and lots of pikeshedding,
sorry.
2014-06-22 15:12:45 +02:00
cinap_lenrek 4f95d75098 ed: dont pass string constants to mktemp() 2014-06-22 01:48:02 +02:00
aiju f65d27b0fc games/md: small bug fixes 2014-06-15 20:11:24 +02:00
aiju 1bacbf5651 games/md: add shadow/hilight support 2014-06-15 19:02:06 +02:00
aiju 838163670c games/md: add save game support, fix cpu bug 2014-06-15 15:52:29 +02:00
aiju e30fc1fbdf games/md: small fixes 2014-06-14 20:18:57 +02:00
aiju 37a5b4e9c3 games/snes: fix -T 2014-06-13 19:54:33 +02:00
aiju f0ed9ed9f0 games/md: vdp window fix, added ym2612 timers 2014-06-13 18:06:44 +02:00
aiju 7c25ae8a34 games/md: add z80, audio support 2014-06-13 17:21:25 +02:00
cinap_lenrek e6f37cf64e pc64: fix MS2HZ (thanks Anthony Martin) 2014-06-13 10:19:46 +02:00
cinap_lenrek 63ac70281a libstdio: avoid issues with aliasing in dtoa() on amd64 (from 9atom, thanks to erik and charles) 2014-06-12 20:14:12 +02:00
cinap_lenrek d4e66accaa libsec: use u32int instead of uint when we need 32 bit (thanks erik) 2014-06-12 14:05:10 +02:00
cinap_lenrek fa09758a73 samterm: use 4K stacks for amd64 (thanks burnzez)
we got a stack overflow on the hostproc on amd64 overflowing
by arround 200 byte. so just use 4K stacks for everything.
2014-06-11 19:31:14 +02:00
cinap_lenrek 3a5b2189ed revert ramfs example
the code was correct. erealloc9p() terminates the process
on error, but the code was handling realloc() error explicitely
and responded the request with Enomem error.
2014-06-11 18:01:20 +02:00
ftrvxmtrx b4c3726381 libsec: fix dsagen 64-bit bug (thanks rsc) 2014-06-11 17:35:05 +02:00
ftrvxmtrx 6dd3cf4c40 lib9p: ramfs example: s/realloc/erealloc9p/ 2014-06-11 17:22:32 +02:00
mischief 4afbc988ca pool: declare pooldump in pool.h. the manual says it is public. 2014-06-09 12:17:45 -07:00
ftrvxmtrx f6a7c62823 audiohda: add Intel 8 Series/C220 Series support 2014-06-09 21:53:40 +02:00
ftrvxmtrx 52174db958 ether8169: support for RTL8168G 2014-06-09 21:06:22 +02:00
mischief 906cc83c35 mkpaqfs: english 2014-06-09 05:05:59 -07:00
mischief ca5cc6519d pc: clip rectangles before sending them to the hardware in flushmemscreen
the vmware svga video card emulated by qemu (qemu -vga vmware) complains and eventually causes a panic if the rectangles aren't clipped.

messages like the following can be observed from qemu before the kernel panics:
vmsvga_update_rect: update h was < 0 (-20000)
vmsvga_update_rect: update height too large y: 10000, h: 0
vmsvga_update_rect: update w was < 0 (-20000)
vmsvga_update_rect: update width too large x: 10000, w: 0

i could only reproduce this in qemu 2.0.50 on the master branch, when using the ui and had selected 'Zoom To Fit' from the View menu.
2014-06-09 00:22:11 -07:00
cinap_lenrek 858d3e39ab ether79c970: fix mistake
fix bug introduced by amd64 support:

forgot to update ring index i on receive. surprisingly
this was working until there where more than one packet
to process. sorry.

ilock the controller while processing rings. this should
be fixed and use kprocs instead.
2014-06-09 07:21:36 +02:00
cinap_lenrek 01b5ac1402 iostats: add -C flag to enable mount cache 2014-06-08 18:54:36 +02:00
cinap_lenrek 3d12f4f408 iostats: dont sysfatal on 9p read error due to program termination
the note mechanism is racy and can lead to the fs terminating
iostats because it gets "i/o on hugup channel" (namespace closed).
2014-06-08 18:27:39 +02:00
cinap_lenrek 1b8fb4fec3 swap: make sure swap address sticks arround until page is written to swap
we have to make sure the *swap address* doesnt go away,
after putting the swap address in the segment pte.

after we unlock the segment, the process could be
killed or fault which would cause the swap address to
be freed *before* we write the page to disk when it
pulls the page from the cache and putswap() swap pte.

keeping a reference to the page is no good. we have
to hold on the swap address. this also has the advantage
that we can now test if the swap address is still
referenced and can avoid writing to disk.
2014-06-08 17:39:40 +02:00
cinap_lenrek fcfa74a1cf pc64: use pc/pcrandom.$O instead of port/random.$O for RDRAND instruction support 2014-06-08 04:40:18 +02:00
cinap_lenrek 72ba3571a3 kernel: remove _xinc()/_xdec()
as with the Block refcount changes, _xinc() and _xdec() arent
used anymore, so remove them.

architecure can still define ainc()/adec() when it needs them.
2014-06-08 01:35:22 +02:00
cinap_lenrek 0a2b418535 pc, pc64: fix missed qunlock, use Ref with incref()/decref() instead of _xinc()/_xdec() 2014-06-08 01:33:15 +02:00
cinap_lenrek ce38380b8f omap: move syscall.$O target from config to mkfile 2014-06-08 00:26:39 +02:00
cinap_lenrek 3d20da3f8b omap: remove Block refcounting 2014-06-08 00:26:23 +02:00
cinap_lenrek be3a5a6dc3 kernel: remove Block refcounting (thanks erik) 2014-06-08 00:19:33 +02:00
cinap_lenrek 9ee3095553 teg2: move syscall.$O and syscallfmt.$O targets from config to mkfile 2014-06-08 00:15:53 +02:00
cinap_lenrek 9e63895e80 kw: move syscall.$O target from config to mkfile 2014-06-08 00:14:31 +02:00
cinap_lenrek 07f7c46d37 omap4: update for new syscall interface and syscallfmt 2014-06-08 00:13:10 +02:00
cinap_lenrek 865368f604 pc64: remove unneeded parens in pmap() 2014-06-07 09:43:37 +02:00
cinap_lenrek 3cc15d2301 merge 2014-06-07 09:28:33 +02:00
cinap_lenrek 7bc8f4d993 pc64: implement checkmmu() debug function 2014-06-07 09:26:57 +02:00
cinap_lenrek 2e713acc2c sdvirtio: experimental support for virtio-scsi 2014-06-07 02:13:57 +02:00
ftrvxmtrx 2739c6514a file: djvu 2014-06-07 23:16:34 +02:00
stanley lieber 20b2f7a38e fortunes: i believe any successful Plan 9 distro will need to provide some transparency in the change review process. -- Skip Tavakkolian 2014-06-06 00:58:36 -04:00
cinap_lenrek 524720a58d file: detect NES and SEGA rom files, fix newline 2014-06-06 01:29:14 +02:00
cinap_lenrek 91614f582f kernel: dont use atomic increment for Proc.nlocks, maintain Lock.m for lock(), use uintptr intstead of long for pc values
change Proc.nlocks from Ref to int and just use normal increment and decrelemt
as done in erik quanstros 9atom.

It is not clear why we used atomic increment in the fist place as even if we
get preempted by interrupt and scheduled before we write back the incremented
value, it shouldnt be a problem and we'll just continue where we left off as
our process is the only one that can write to it.

Yoann Padioleau found that the Mach pointer Lock.m wasnt maintained
consistently for lock() vs canlock() and ilock(). Fixed.

Use uintptr instead of ulong for maxlockpc, maxilockpc and ilockpc debug variables.
2014-06-05 21:54:32 +02:00
cinap_lenrek 76db435e3c pc64: dont trap _xinc()/_xdec() overflow/underflow, delete unused atomic functions 2014-06-05 07:57:23 +02:00
cinap_lenrek 863a459691 webfs: explicitely unmount old /mnt/web (thanks BurnZeZ)
webfs forks the namespace to isolate itself from its mount
point which has the side effect that it captures the mount
of previous instances of webfs mounted on /mnt/web.

explicitely unmount the mountpoint in our namespace copy
to drop the reference.
2014-06-04 17:45:08 +02:00
cinap_lenrek 972f60a794 nusbrc: dont fork usb drivers into background
probing needs to run synchronous to avoid races with other
readers of /dev/usbevent.
2014-06-04 23:59:17 +02:00
cinap_lenrek 93d0474f77 nusb/usbd: cleanup 2014-06-03 21:40:30 +02:00
cinap_lenrek 0aa3af0934 kernel: remove wrong and needles mapsize check in newseg() (thanks Yoann Padioleau) 2014-06-03 07:47:09 +02:00
cinap_lenrek 5ab9f9c621 nusb/usbd: serialize /dev/usbevent processing
when there are multiple readers of /dev/usbevent, we have to
serialize the processing to make sure that only one driver
is opening the devices control endpoint at a time.

to do this, we assume the device is busy after reading the
event file until the next read or clunk on the same fid.

to mark a device busy, we set the dev->aux pointer to the
fid processing a event. And the Event structure takes a
reference to the device producing the event.

the problem arised from cdc ethernet and nusb/serial sharing
the same device class, and we need to run the particular driver
to figure out if the device can be used. doing this concurrently
fails because devusb allows only one open per endpoint.
2014-06-03 07:21:48 +02:00
cinap_lenrek 1427ba3126 pc64: fix for unsigned comparsion of (top - base) >= size
the rounding of base can make it above top, so have to
use signed comparsion.
2014-06-01 06:54:55 +02:00
cinap_lenrek fb97665a14 pc64: use 2MB pages for preallocpages() 2014-06-01 06:31:50 +02:00
cinap_lenrek c9f91d5015 pc64: allocate palloc.pages from upages
the palloc.pages array takes arround 5% of the upages which
gives us:

16GB = ~0.8GB
32GB = ~1.6GB
64GB = ~3.2GB

we only have 2GB of address space above KZERO so this will not
work for long.

instead, pageinit() was altered to accept a preallocated memory
in palloc.pages. and preallocpages() in pc64/main.c allocates the
in upages memory, mapping it in the VMAP area (which has 512GB).

the drawback is that we cannot poke at Page structures now from
/proc/n/mem as the VMAP area is not accessible from it.
2014-06-01 03:13:58 +02:00
ftrvxmtrx 8061f30e55 games/nes: support Battle City two players mode with joypads 2014-06-01 01:21:00 +02:00
Aram Hăvărneanu bf0d5c8abb 6a, 6c, 6l: fix copy propagation
Without an explicit signal for a truncation, copy propagation will
sometimes propagate a 32-bit truncation and end up overwriting uses of
the original 64-bit value.

This was independently discovered and fixed in Go. See:
	http://golang.org/issue/1315
	https://codereview.appspot.com/6002043/

Thanks Charles Forsyth for tips and advice.
2014-05-30 12:28:01 +02:00
cinap_lenrek 17d0dea87c we look for strings.c, it is broken, this strings.c will make us go. 2014-05-30 04:05:18 +02:00
cinap_lenrek 5246416621 pc, pc64: simplify reboot code
as we do system reset and reboot only from boot processor cpu0 now,
theres no need for active.rebooting conditional variable.
mpshutdown() will unconditionally park application processors and
and cpu0 boots the new kernel or calls mpshutdown() causing system
reset.
2014-05-29 18:50:52 +02:00
cinap_lenrek 215f6cc64a pc: initiate machine reset only from boot processors in mpshutdown()
in vmware, mpshutdown() used to hang in i8042reset() when not
called from the boot processor, so instead of reseting from first
cpu that acquires the shutdown lock, we park all application
processors and let the boot processor do the reset.
2014-05-29 18:24:40 +02:00
aiju aa125d37e9 games/md: bug fixes 2014-05-29 00:50:06 +02:00
cinap_lenrek ca35949c20 ape/stdio: set errno to EMFILE when running out of streams 2014-05-29 00:34:47 +02:00
aiju 52153c32dc games/snes: originwindow confuses the cat 2014-05-27 01:01:55 +02:00
cinap_lenrek 527ab6405c page(1): or 2014-05-26 10:00:39 +02:00
cinap_lenrek c73ade70e3 page(1): minus 2014-05-26 09:59:57 +02:00
cinap_lenrek 97c28a6c80 page(1): theres no -r option, nor multipage restrictions 2014-05-26 09:52:47 +02:00
aiju a106a19bbf merge 2014-05-26 01:11:08 +02:00
aiju c124e341b9 games/md: moonwalker! 2014-05-26 01:10:46 +02:00
cinap_lenrek 3dc82dc04b pc64: fix ulongs for address of devarchs realmodemem file 2014-05-26 00:45:10 +02:00
cinap_lenrek 15fc6c1cc0 devproc: handle 64bit address writes to /proc/n/mem files
procwrite() did truncate the offset to 32bit ulong.
introduce off2addr() function that does the sign
extension hack and use it conststently for Qmem
reads and writes.
2014-05-26 00:27:06 +02:00
cinap_lenrek b672403c6d merge 2014-05-26 22:49:07 +02:00
cinap_lenrek 9ebbfae28b kernel: simplify fdclose() 2014-05-26 22:47:34 +02:00
cinap_lenrek 89acedb9b8 devproc: fix close and closefiles procctl
for the CMclose procctl, the fd number was not
bounds checked before indexing in the Fgrp.fd
array.

for the CMclosefiles, we looped fd from 0..maxfd-1,
but need to loop from 0..maxfd as maxfd is inclusive.
2014-05-26 22:43:21 +02:00
aiju 235cc0747d games/md: small cpu and vdp bug fixes 2014-05-25 21:45:13 +02:00
cinap_lenrek c5214cd6d9 pc64: cleanup mmuzap 2014-05-25 20:34:26 +02:00
aiju 79355486f7 games/md: first bug fixes 2014-05-25 01:11:21 +02:00
aiju 93cfa1be72 added crude version of games/md 2014-05-25 23:14:23 +02:00
cinap_lenrek ea480e74bb libauth: dont print blobs in auth_proxy error strings 2014-05-24 19:49:54 +02:00
cinap_lenrek 20883bd7de cpu: remove duplicate environment and chdir($home) code (thanks qrstuv)
newns() (called by auth_chuid()) already prepares the
environment variables and puts us in a sane working
directory (as specified by the namespace file).
2014-05-24 02:09:52 +02:00
cinap_lenrek 2185188f83 kernel: fix read size calculation in pio() demand load
on amd64, the text segment is aligned and padded to
2MB, but segment granularity is 4K which can give
us page faults that are beyond the highest file
offset. this is perfectly valid, but was not handled
correctly in pio().
2014-05-24 01:27:57 +02:00
cinap_lenrek eef4565003 libc: avoid static table and supurious reads in nsec()
use two per process memory slots, one for the
pid and one for the fd instead of a global table
avoiding the case when the table gets full.

instead of calling pread() on the cached fd
(dangerous as it has side effects when the
fd was not closed), we check if the cached fd
is still good  using fd2path() when called
the first time in this process.
2014-05-23 18:56:20 +02:00
cinap_lenrek 440202d029 libc: revert nsec() change, bring back filedescriptor caching
theres big performance regression with this using
cwfs. cwfs calls time() to update atime on every
read/write which now causes walks on /dev.

reverting to the previous version for now. in the
long run, we'll use new _nsec() syscall but this
has to wait for a later release once new kernels
are established.
2014-05-20 07:05:53 +02:00
cinap_lenrek e7b94ba052 syscall: add missing _nsec() declaration 2014-05-20 05:21:22 +02:00
cinap_lenrek 3207e8b6a4 add _nsec() syscall 53 for binary compatibility with labs distribution
the new syscall is added under the symbol _nsec() for
binary compatibility.

nsec() is still a library function reading /dev/bintime.
2014-05-20 05:06:31 +02:00
cinap_lenrek 7abf926bcf libc: dont cache /dev/bintime filedescriptor for nsec() 2014-05-20 05:01:26 +02:00
cinap_lenrek c7be3ba9e6 init: dont interpret environment var contents as fmtstring, cleanup 2014-05-19 06:58:53 +02:00
cinap_lenrek 06ad4e5fff pc64: remove cpuserver bigboy hack and honor *kernelpercent= 2014-05-19 06:57:04 +02:00
cinap_lenrek 7ae98ac5a6 ip/torrent: use "torrent" as default user agent 2014-05-19 04:56:07 +02:00
cinap_lenrek 1055b951f3 ip/torrent: fix usage, add -A option to set user-agent
trackers do like the new default Mozilla/5.0 (compatible)
user agent. so force useragent to hjdicks and give option
to override it in case trackers get even more clever in
the future.
2014-05-19 23:23:08 +02:00
cinap_lenrek c994152a90 ipconfig: fix dhcp watch
in dhcpwatch, the sleep time "secs" could become
zero potentially freezing the lease time.

give up when in Sinit state in dhcpquery() as this
is a terminal state.
2014-05-18 19:20:31 +02:00
stanley lieber 48a644aa31 fortunes: 14:37 -!- kfx was kicked from #suckless by __20h__ [kfx] 2014-05-16 16:31:41 -04:00
cinap_lenrek b3eeb59964 sdiahci: fix (unused) hba reset function (thanks erik quanstro)
from the specification:

software may reset the entire HBA by setting GHC.HR to '1'.
When software sets the GHC.HR bit to '1', the HBA shall perform
an internal reset action. The bit shall be cleared to '0'
by the HBA when the reset is complete.
2014-05-16 21:33:49 +02:00
Matthew Veety eb687adecd added devgpio (thanks Krystian!). Also added getrevision() to vcore which allows you to get the raspberry pi board revision. I kept in the segment that allows direct access to the gpio memory 2014-05-16 10:56:23 -04:00
ftrvxmtrx ead171d29f sam(1): add ctrl+b 2014-05-12 14:49:10 +02:00
ftrvxmtrx 704bd2b513 samterm: fix esc, change ctrl+b behaviour to a more useful one (thanks cinap) 2014-05-12 14:19:22 +02:00
ftrvxmtrx e993ea3e30 samterm: clean up key defines. use ctrl+b as in rio 2014-05-12 12:58:24 +02:00
cinap_lenrek 679b092ee0 htmlfmt: use uhtml for character set conversion 2014-05-12 02:38:53 +02:00
cinap_lenrek 66f76c2821 doom: get rid of floating point code for division 2014-05-11 20:24:27 +02:00
cinap_lenrek 17d932eca9 pc, pc64: add simd error exception name in trap.c 2014-05-11 06:17:13 +02:00
cinap_lenrek a9155014c0 pc, pc64: handle sse simd exceptions 2014-05-11 05:59:10 +02:00
cinap_lenrek edca217bb9 tcs: handle surrogate pairs 2014-05-11 00:54:59 +02:00
cinap_lenrek 7388792a12 tcs: prevent accidents with runes beyond 16-bit 2014-05-11 22:29:47 +02:00
cinap_lenrek 14cd6df332 tcs: fix inplace 16 bit unicode conversion
inplace conversions do not work anymore as
Rune is not unsigned short anymore.
2014-05-10 17:28:17 +02:00
cinap_lenrek 807af1d847 webfs: use mozilla compatible user agent as default
sites like google return the wrong characterset when
they do not recognize the user-agent. so setting default
user agent to something thats likely to pass these
idiotic browser tests.
2014-05-09 18:22:51 +02:00
cinap_lenrek 144c4ab223 abaco: need more stack on amd64 2014-05-09 17:16:34 +02:00
cinap_lenrek 87fd5240f0 remove old copies of kernels l.s from cmd/?a 2014-05-08 18:48:51 +02:00
cinap_lenrek 47d131c088 abaco: remove strange line 2014-05-08 18:41:30 +02:00
ftrvxmtrx 7ea0732c55 tail: fix follow for empty files (thanks cinap_lenrek) 2014-05-08 14:29:44 +02:00
ftrvxmtrx 1c835e370f tail: seek to EOF to check if seekable. fixes tail on /proc files 2014-05-08 12:33:24 +02:00
cinap_lenrek f4f2ff6038 hgfs: avoid revlogupdate() calls when reading root (thanks burnzez)
we do not need to check for revlog updates on every
(directory) read when reading the root. only do it
when reading from the start.
2014-05-08 22:20:26 +02:00
ftrvxmtrx 428cc541f8 sed: remove unused ecmp function 2014-05-07 14:43:11 +02:00
cinap_lenrek 3426459ab5 cc: fix spurious warning on comparsion with scope redeclared variable (thanks aiju)
> warning: a.c:9 useless or misleading comparison: UINT < 0

the error can be observed by compiling the following code
with warnings enabled:

#include <u.h>
#include <libc.h>

uint r;

void
main(int argc, char *argv[])
{
	int r;

	if(r < 0){
		exits(0);
	}
}

the offending code in the compiler is:

-	if(l->op == ONAME && l->sym->type){
-		lt = l->sym->type;
-		if(lt->etype == TARRAY)
-			lt = lt->link;
-	}

compiler handles scope by overwritin and reverting
symbols while parsing. in the ccom phase, the nodes symbol
(n->sym) is not in the right scope and we wrongly think r
is uint instead of int.

it is not clear to me what this code tried to accomplish in
the first place nor could anyone answer me this question.

the risk is small as this change doesnt affect the compiled
program, only the warning, so removing the offending code.
2014-05-06 21:36:28 +02:00
cinap_lenrek 59e53f818d pc64: fix embrassing typo in mmuzap() 2014-05-06 18:59:56 +02:00
cinap_lenrek ff7d68e41a gs: fix /undefined in --setcolor-- errors on amd64 2014-05-05 00:49:26 +02:00
cinap_lenrek 826f4c0daf gs: remove PStorage data type from ttf interpreter
i dont see that pointers are stored in PStorage at all,
so just use PLong directly avoding all this confusion.
2014-05-04 00:17:27 +02:00
cinap_lenrek 9cc9d6113c gs: fix truetype interpreter for amd64 2014-05-04 23:31:59 +02:00
ftrvxmtrx d2c3185bfa fix threadsetname usage in few places 2014-05-03 13:07:52 +02:00
ftrvxmtrx 6f58f7fed4 thread.h: varargck argpos for threadsetname 2014-05-03 12:09:53 +02:00
ftrvxmtrx 462f1d0688 bio.h: add varargck argpos pragma for Berror 2014-05-03 11:46:01 +02:00
ftrvxmtrx 19cdd8c4b9 uniq: document -s option (thanks heaumer) 2014-05-03 11:38:36 +02:00
ftrvxmtrx 306bee92e1 uniq: use Bsize for buffers 2014-05-03 10:48:13 +02:00
cinap_lenrek 4c639475ce cwfs: fix 1GB memsize limitation
the malloc pool allocator is limited in its allocation
size. as almost all data structures in cwfs are never
freed, use brk() in ialloc() instead of mallocalign().
this means memory returned by ialloc() cannot be freed!

to make sure we do not call free by accident, remove
the #define malloc(n) ialloc(n, 0) macro and use ialloc()
directly as in the original code to show the intend
of permanent allocations.
2014-05-03 00:51:45 +02:00
ftrvxmtrx 72e4d850a4 wc: simplify and avoid buffer overflow on long filenames 2014-05-03 23:38:17 +02:00
cinap_lenrek bd3e9e4b7c 1l, 2l, 7l, kl, vl: add missing setmalloctag() dummy in compat.c 2014-05-02 05:17:40 +02:00
ftrvxmtrx f7f3e4780a bio: Brdstr, Bopen: set malloc tag to the caller 2014-05-02 04:27:29 +02:00
cinap_lenrek beb665051b sdide: never timeout or retry scsi commands from the controller driver
this was a big mistake. we should never attempt to
timeout or retry a scsi command from the controller
driver because theres no way to tell how long a
command would take or if a command has side effects
when being retried.
2014-05-02 04:23:21 +02:00
ftrvxmtrx 8fea0399b0 bio: on a second thought, make it one line less 2014-05-02 04:03:35 +02:00
ftrvxmtrx f9b6c4c5a3 bio: do not leak memory if realloc fails 2014-05-02 03:58:38 +02:00
ftrvxmtrx e610c573d7 samterm: free() after getenv() 2014-05-02 03:47:18 +02:00
cinap_lenrek 405de1e6a2 pc64: increase sizes of physical memory bank maps
number of bank slots in Conf.mem[4] was too small
for kenjis machine, set it to maximum 16 (the
size of the RAM map in pc64/memory.c).

also increasing the UPA memory map to 64. the
e820 map on my x200s has 31 entries and many
holes. this gets rid of the "mapfree: ... losing"
messages on boot.
2014-05-01 17:24:50 +02:00
ftrvxmtrx a1ee457ebc leak(1): typo 2014-05-01 13:08:43 +02:00
cinap_lenrek a2d96d47c9 kernel: always reset notepending in eqlock, handle forceclosefgrp in eqlocks 2014-04-29 21:17:07 +02:00
cinap_lenrek b7d8431036 kernel: stop queue bloat before allocating blocks 2014-04-29 21:15:09 +02:00
ftrvxmtrx a2f0fdbfa0 aan(8): fix aanuke synopsis 2014-04-29 23:17:06 +02:00
cinap_lenrek 40b6959788 devmnt: make abandoning fid on botched clunk handle flushes
make mntflushfree() return the original rpc and do the
botched clunk check on the original instead of the
current rpc.

so if we get a botched flush of a clunk, we abandon the
fid of the channel as well.
2014-04-28 06:55:06 +02:00
cinap_lenrek 2c2a71cd51 devmnt: abandon fid on botched Tclunk or Tremove
if theres an error transmitting a Tclunk or Tremove request,
we cannot assume the fid to be clunked. in case this was
a transient error, reusing the fid on further requests
will fail.

as a work arround, we zero the channels fid and allocate
a new fid before the chan is reused.

this is not correct as we essentially leak the fid
on the fileserver, but we will still be able to use
the mount.
2014-04-28 05:59:10 +02:00
cinap_lenrek 219c312163 libip: use snprint() in myetheraddr() to prevent accidents 2014-04-28 02:32:06 +02:00
cinap_lenrek 391198888a 8c, 6c: fix peephole bug for eleminating CMPL $0,R after shift
the shift instructions does not change the zero flag
when the shift count is 0, so we cannot remove the
compare instruction in this case.

this fixes oggdec under 386.
2014-04-28 22:53:50 +02:00
ftrvxmtrx 7b8f4b25be btc mkfile: mkdir -p 2014-04-28 22:39:12 +02:00
ftrvxmtrx 9f2e627ec6 iwl: support another (broken) variant of centrino ultimate-n 6300 2014-04-27 15:12:15 +02:00
ftrvxmtrx c0fada1560 merge 2014-04-26 18:24:39 +02:00
ftrvxmtrx e41893d94f iwl: add Wifi Link 5150 did 2014-04-26 18:22:50 +02:00
cinap_lenrek f3749669ba pmmc: recognize generic mmc controllers (untested) 2014-04-26 18:22:17 +02:00
cinap_lenrek 28f7f3f9d7 tlshand: cleanup 36 -> MD5dlen+SHA1dlen 2014-04-26 18:09:26 +02:00
cinap_lenrek 3b1a0ab1f3 tlshand: fix memory leaks, fix alloc element size for certs pointer array, error handling 2014-04-26 18:04:04 +02:00
glenda c8ac5d7eb7 games/geigerstats: fix usage() to exit; games(1): geigerstats args 2014-04-26 15:08:28 +01:00
ftrvxmtrx 6a905b4560 tr: fix 4-byte runes fix (thanks rsc) 2014-04-26 14:26:40 +02:00
ftrvxmtrx 4468438c70 merge 2014-04-26 13:22:48 +02:00
ftrvxmtrx b4fa1e617b man pages: fix duplicate words 2014-04-26 13:22:15 +02:00
glenda 5e201a7d2e draw(2): fix missing arg of bezspline on page 5 2014-04-26 03:38:07 +01:00
ftrvxmtrx 244bb0038d man pages: the the wich 2014-04-26 01:47:36 +02:00
mischief 3dbc32d794 nusb(4): fix spelling 2014-04-24 20:05:09 -07:00