]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
11 years agohgfs: work in progress stuff...
cinap_lenrek [Wed, 21 Nov 2012 23:02:43 +0000 (00:02 +0100)]
hgfs: work in progress stuff...

11 years agohgfs: remove bogus OTRUNC mode from create() call in fmktemp()
cinap_lenrek [Wed, 21 Nov 2012 18:28:40 +0000 (19:28 +0100)]
hgfs: remove bogus OTRUNC mode from create() call in fmktemp()

11 years agohgfs: various improvements
cinap_lenrek [Wed, 21 Nov 2012 18:22:46 +0000 (19:22 +0100)]
hgfs: various improvements

lazily close revlog files and keep up to 8
revlogs arround. also cache the latest extracted
file descriptor of a revision in the revlog.
this avoids the quite expensive reextracting/patching
when we reopen the same file revision.

dont use the racy mktemp()/create, instead create
a uniqueue name and create with OEXCL. this also
avoids a bunch of access() calls.

fix eof case and use pread() in fcopy() to avoid the
seeks.

dont modify changelog temp file but simulate trailing
newline instead.

11 years agoderp: handle file type changes
cinap_lenrek [Wed, 21 Nov 2012 14:34:12 +0000 (15:34 +0100)]
derp: handle file type changes

handle cases when files become directories or directories
become files.

11 years agohjfs: eleminate seek syscalls
cinap_lenrek [Sun, 18 Nov 2012 11:53:31 +0000 (12:53 +0100)]
hjfs: eleminate seek syscalls

reduce syscalls by using pread/pwrite instead
of seek/read/write.

11 years agomerge
cinap_lenrek [Sun, 18 Nov 2012 11:02:36 +0000 (12:02 +0100)]
merge

11 years agomerge
cinap_lenrek [Sun, 18 Nov 2012 11:01:16 +0000 (12:01 +0100)]
merge

11 years agohjfs: ORCLOSE parent check, estrdup / erealloc, CHFNOPERM consistency
cinap_lenrek [Sun, 18 Nov 2012 11:00:13 +0000 (12:00 +0100)]
hjfs: ORCLOSE parent check, estrdup / erealloc, CHFNOPERM consistency

check for write premission in the parent directory
for open with ORCLOSE. honor CHFNOPERM not just in
chancreat(), pikeshedd the error handling. added
estrdup()/erealloc() that call sysfatal instead
of returning nil.

11 years agohgfs: work in progress stuff
cinap_lenrek [Sun, 18 Nov 2012 10:54:04 +0000 (11:54 +0100)]
hgfs: work in progress stuff

11 years agomerge
cinap_lenrek [Sun, 18 Nov 2012 00:12:27 +0000 (01:12 +0100)]
merge

11 years agohjfs: fix dump / create
cinap_lenrek [Sat, 17 Nov 2012 23:06:54 +0000 (00:06 +0100)]
hjfs: fix dump / create

getdent() introduced a bug as the qid check fails in
the case when we walk to DUMPROOTQID, but get ROOTQID
in the directory instead.

newentry() getblk(..., GBCREATE) caused the whole
directory to get dumped until it hit a free slot.
we cannot do this because this changes the addresses
of Dentries of files but doesnt update the loctree.

this caused the bogus walks when we hit a different
directory than we expected.

what we do now is the following: newentry() was changed
to never dump anything. it will just read the directory
and return a the address of a free slot or create a
new block having space for one. chancreat() then makes
a loc in the loctree for the free slot, drops the dirent
buffer and calls willmodify() on the new slot. this will
dump the block containing the slot (and possible other
slots) and updates the loctree to the new version.

after that, chancreate() modifies the slot filling the
Dentry. there should be no race, as newentry() skips
slots that have a loc in the loctree.

theres one case where newentry() can dump the block
immidiately when it is called from dump. added new
parameter for that and documented in the comment.

createuserdir() was simplified by just calling chancreat().
to get arround the permission check, a new per channel
flag CHFNOPERM was added.

11 years agofortunes: did anyone at iwp9 give an update about osprey? anyone ask when it'll be...
stanley lieber [Sat, 17 Nov 2012 20:24:01 +0000 (14:24 -0600)]
fortunes: did anyone at iwp9 give an update about osprey? anyone ask when it'll be available?

11 years agohjfs: fix getfree() races, fix very rare buf leak in deltraverse()
cinap_lenrek [Fri, 16 Nov 2012 21:57:43 +0000 (22:57 +0100)]
hjfs: fix getfree() races, fix very rare buf leak in deltraverse()

11 years agohjfs: fix potential deadlock in putloc()
cinap_lenrek [Fri, 16 Nov 2012 18:55:58 +0000 (19:55 +0100)]
hjfs: fix potential deadlock in putloc()

11 years agohjfs: dentry qid checking, prevent newentry() from allocating already in use slot
cinap_lenrek [Fri, 16 Nov 2012 12:42:45 +0000 (13:42 +0100)]
hjfs: dentry qid checking, prevent newentry() from allocating already in use slot

always check if the directory entry qid from the loc still
matches the one on disk before doing anything. helps
catching bugs and is basically equivalent to what cwfs does
with its checktag.

make a haveloc() check in newentry() to make sure we dont
allocate a file slot thats still in use, but deleted.
this seems to fix the NPROC>1 build problems.

11 years agofix spaces
cinap_lenrek [Thu, 15 Nov 2012 18:41:13 +0000 (19:41 +0100)]
fix spaces

11 years agoadd C-Keens tls-client-auth
cinap_lenrek [Thu, 15 Nov 2012 18:32:53 +0000 (19:32 +0100)]
add C-Keens tls-client-auth

This patch adds client TLS authentication to libsec in compliance with
rfc 4346.

A new -c flag has been introduced for tlsclient allowing the user to
specify a certificate in pem(8) format which will be provided to the
server upon request.

A -D debug flag has been introduced to enable debugging output.

The patch has been tested against OpenSSL 0.9.7j 04 May 2006.

It exists today because of the great (debugging) help and insight
provided by Matthias Bauer.

TODOs:

- specification of a certain client key in factotum is not possible at
the moment
- tlssrv should support this too

These will get added in another patch.

The first try to submit this patch failed due to a network error.
Sorry for the duplication!

Kind regards,

Christian

11 years agohjfs: fix more missing dirty marks, error handling, cleanup
cinap_lenrek [Thu, 15 Nov 2012 15:43:35 +0000 (16:43 +0100)]
hjfs: fix more missing dirty marks, error handling, cleanup

11 years agohjfs: fix missing BDELWRI mark in newentry()
cinap_lenrek [Thu, 15 Nov 2012 08:22:13 +0000 (09:22 +0100)]
hjfs: fix missing BDELWRI mark in newentry()

11 years agomerge
cinap_lenrek [Mon, 12 Nov 2012 06:01:25 +0000 (07:01 +0100)]
merge

11 years agotap: various improvements
cinap_lenrek [Mon, 12 Nov 2012 01:12:05 +0000 (02:12 +0100)]
tap: various improvements

dont use sed pipeline for indention, cache process arguments,
get process list once at start.

11 years agossam: add usage
stanley lieber [Sat, 10 Nov 2012 21:24:58 +0000 (21:24 +0000)]
ssam: add usage

11 years agovt: on resize, restore screen using history buffer
cinap_lenrek [Sat, 10 Nov 2012 06:56:39 +0000 (07:56 +0100)]
vt: on resize, restore screen using history buffer

11 years agorio: fix auto compmplete candidates getting read back without prompt
cinap_lenrek [Sat, 10 Nov 2012 01:30:17 +0000 (02:30 +0100)]
rio: fix auto compmplete candidates getting read back without prompt

11 years agokbdfs: send interrupt note in separate proc to prevent potential deadlock
cinap_lenrek [Fri, 9 Nov 2012 16:39:35 +0000 (17:39 +0100)]
kbdfs: send interrupt note in separate proc to prevent potential deadlock

11 years agokbdfs: kill input buffer on interrupt key
cinap_lenrek [Fri, 9 Nov 2012 16:09:20 +0000 (17:09 +0100)]
kbdfs: kill input buffer on interrupt key

11 years agopstree: manpage, print pid in first column, bio, silly walks
cinap_lenrek [Wed, 7 Nov 2012 23:06:54 +0000 (00:06 +0100)]
pstree: manpage, print pid in first column, bio, silly walks

11 years agolimit clunk queue length for cclose()
cinap_lenrek [Wed, 7 Nov 2012 21:04:29 +0000 (22:04 +0100)]
limit clunk queue length for cclose()

dont let the clunk queue grow too large if we are allowed to
block (cclose) as the fileserver might run out of fids.

11 years agopstree: sort children, fix missing close, strip newline from args
cinap_lenrek [Wed, 7 Nov 2012 20:14:41 +0000 (21:14 +0100)]
pstree: sort children, fix missing close, strip newline from args

11 years agofix spurious kproc ppid
cinap_lenrek [Wed, 7 Nov 2012 19:46:30 +0000 (20:46 +0100)]
fix spurious kproc ppid

newproc() didnt zero parentpid and kproc() didnt set it, so
kprocs ended up with random parent pid. this is harmless as
kprocs have no up->parent but it gives confusing results in
pstree(1).

now we zero parentpid in newproc(), and set it in sysrfork()
unless RFNOWAIT has been set.

11 years agoremove tty(1) command as kbdfs now handles interrupts
cinap_lenrek [Wed, 7 Nov 2012 18:04:26 +0000 (19:04 +0100)]
remove tty(1) command as kbdfs now handles interrupts

11 years agodevproc: remove pgrpid == 1 check for notepg open
cinap_lenrek [Wed, 7 Nov 2012 17:57:02 +0000 (18:57 +0100)]
devproc: remove pgrpid == 1 check for notepg open

assuming that this check tried to prevent the hostowner
from killing init, it is silly because init would just
handle the note.

with kbdfs, we actually want to send interrupt note to
the initial process group so instead of working arround
this with rfork(RFNOTEG|RFNAMEG), we remove the check.

11 years agomerge
cinap_lenrek [Tue, 6 Nov 2012 16:21:15 +0000 (17:21 +0100)]
merge

11 years agomake interrupt key (Del) just work in the console
cinap_lenrek [Tue, 6 Nov 2012 16:19:41 +0000 (17:19 +0100)]
make interrupt key (Del) just work in the console

these changes make the interrupt key available in the
console (before rio is started).

kbdfs: will now send a "interrupt" note to its invoking
process group in cooked mode.

bootrc: is now prepared to handle interrupts, mainly to
not accidently spawn a new bootargs prompt.

init: forwards the interrupt to the cpurc/termrc pgrp.

vncs: shields itself from kbdfs notegroup so interrrupt
wont kill the whole vnc session.

11 years agoOops, make exponential function work
iru [Mon, 5 Nov 2012 17:47:13 +0000 (15:47 -0200)]
Oops, make exponential function work

11 years agoAdd exponential function.
iru [Mon, 5 Nov 2012 17:45:10 +0000 (15:45 -0200)]
Add exponential function.

11 years agofplot(1) man page
iru [Mon, 5 Nov 2012 17:38:39 +0000 (15:38 -0200)]
fplot(1) man page

11 years agowikifmt: fix trailing _ in heading name reference
cinap_lenrek [Mon, 5 Nov 2012 02:16:13 +0000 (03:16 +0100)]
wikifmt: fix trailing _ in heading name reference

11 years agoadd google code wiki formatter aux/wikifmt
cinap_lenrek [Mon, 5 Nov 2012 01:39:33 +0000 (02:39 +0100)]
add google code wiki formatter aux/wikifmt

11 years agoderp(1) spelling (thanks pap)
cinap_lenrek [Fri, 2 Nov 2012 21:15:17 +0000 (22:15 +0100)]
derp(1) spelling (thanks pap)

11 years agoadd directory-examining recursive compare derp(1)
cinap_lenrek [Fri, 2 Nov 2012 19:28:12 +0000 (20:28 +0100)]
add directory-examining recursive compare derp(1)

11 years agohgfs: fix metaheader offset for log
cinap_lenrek [Fri, 2 Nov 2012 02:31:55 +0000 (03:31 +0100)]
hgfs: fix metaheader offset for log

11 years agohjfs: fix group permissions for /adm and /adm/users for init
cinap_lenrek [Thu, 1 Nov 2012 15:34:33 +0000 (16:34 +0100)]
hjfs: fix group permissions for /adm and /adm/users for init

11 years agohgfs: strip metadata header, bogus .n walks
cinap_lenrek [Thu, 1 Nov 2012 02:42:24 +0000 (03:42 +0100)]
hgfs: strip metadata header, bogus .n walks

11 years agorio: fix topping a hidden window does not activate the foreground font color
cinap_lenrek [Tue, 30 Oct 2012 22:18:53 +0000 (23:18 +0100)]
rio: fix topping a hidden window does not activate the foreground font color

11 years agohgfs: work in progress stuff...
cinap_lenrek [Mon, 29 Oct 2012 21:00:38 +0000 (22:00 +0100)]
hgfs: work in progress stuff...

11 years agohgfs: more work in progress stuff
cinap_lenrek [Sun, 28 Oct 2012 21:18:38 +0000 (23:18 +0200)]
hgfs: more work in progress stuff

11 years agodevdraw: fix stats for #i/winname (thanks jas)
cinap_lenrek [Sat, 27 Oct 2012 20:27:19 +0000 (22:27 +0200)]
devdraw: fix stats for #i/winname (thanks jas)

11 years agofile: paq, troff, hp pcl, lua, vcard
cinap_lenrek [Fri, 26 Oct 2012 14:06:17 +0000 (16:06 +0200)]
file: paq, troff, hp pcl, lua, vcard

11 years agofix permissiosn for upas and telco rc script
cinap_lenrek [Thu, 25 Oct 2012 16:51:55 +0000 (18:51 +0200)]
fix permissiosn for upas and telco rc script

11 years agofix permissions for auth/(status enable disable)
cinap_lenrek [Thu, 25 Oct 2012 16:25:31 +0000 (18:25 +0200)]
fix permissions for auth/(status enable disable)

11 years agorealemu: fix REP prefix condition
cinap_lenrek [Thu, 25 Oct 2012 04:55:41 +0000 (06:55 +0200)]
realemu: fix REP prefix condition

11 years ago/sys/src/cmd/mk*: add $CLEANFILES to clean and nuke targets
cinap_lenrek [Wed, 24 Oct 2012 23:58:43 +0000 (01:58 +0200)]
/sys/src/cmd/mk*: add $CLEANFILES to clean and nuke targets

11 years agomerge
cinap_lenrek [Wed, 24 Oct 2012 23:07:16 +0000 (01:07 +0200)]
merge

11 years agohgfs: add wip debug command
cinap_lenrek [Wed, 24 Oct 2012 23:05:39 +0000 (01:05 +0200)]
hgfs: add wip debug command

11 years agolibmemlayer: remove pool.h includes (import from sources)
cinap_lenrek [Wed, 24 Oct 2012 22:47:55 +0000 (00:47 +0200)]
libmemlayer: remove pool.h includes (import from sources)

there are no pool calls/data structures used in
libmemlayer so the dependency can be removed.

11 years agopkg(1): update man page
stanley lieber [Tue, 23 Oct 2012 23:08:18 +0000 (18:08 -0500)]
pkg(1): update man page

11 years agocreate bio file (/adm/keys.who) if it doesnt exist
cinap_lenrek [Tue, 23 Oct 2012 06:55:26 +0000 (08:55 +0200)]
create bio file (/adm/keys.who) if it doesnt exist

11 years agofmt: improved version using less memory
cinap_lenrek [Tue, 23 Oct 2012 00:08:35 +0000 (02:08 +0200)]
fmt: improved version using less memory

functional identical, but uses different data structure.
instead of reading all words into memory, we read and
tokenize on demand keeping a simple linked list of words
to conume by further calls of getword(). once the list
is empty we read the next line, tokenize it and fill the
list up again. so we only need as mutch memory to hold
all the words of the longest line.

11 years agodevproc: fix another channel leak, move the cclose(c) from proctext() to procopen.
cinap_lenrek [Mon, 22 Oct 2012 19:59:52 +0000 (21:59 +0200)]
devproc: fix another channel leak, move the cclose(c) from proctext() to procopen.

11 years agofix devproc text chan leak
cinap_lenrek [Mon, 22 Oct 2012 16:51:19 +0000 (18:51 +0200)]
fix devproc text chan leak

11 years agomerge
cinap_lenrek [Mon, 22 Oct 2012 05:11:51 +0000 (07:11 +0200)]
merge

11 years agorio: fix deadlock
cinap_lenrek [Mon, 22 Oct 2012 05:03:47 +0000 (07:03 +0200)]
rio: fix deadlock

we can't really change the Window *input from
outside the winctl() thread. the problem is
that the window might end up reading the
mouse (scroll, select) which makes the w->cctl
channel block once you try to talk to the
window again (from the mousethread). this also
means we have to coordinate window switchin
from the winctl proc waiting for the current
window to release the input and then take over.
thers a new Winctl message Topped that basically
does that now using Wakeup and a chan to
synchronize.

11 years agopkg/list: handle werc directory listings
stanley lieber [Mon, 22 Oct 2012 02:44:53 +0000 (21:44 -0500)]
pkg/list: handle werc directory listings

11 years agorio: fix cursor for sizing nocurrent window
cinap_lenrek [Sun, 21 Oct 2012 16:27:43 +0000 (18:27 +0200)]
rio: fix cursor for sizing nocurrent window

wrepaint() used to also set the cursor for the window
if it was current. this reset the corner cursors on
bandresize when one tried to attempt to size a window
that was not current. make repaint just repaint the
window and border. set cursor explicitely for hold
toggle.

11 years agorio: various fixes
cinap_lenrek [Sun, 21 Oct 2012 15:00:12 +0000 (17:00 +0200)]
rio: various fixes

use notefd in killprocs() insead of postnote() as the process
might'v exited. the notefd stays valid even if the particular
process it was originaly opend on exited. remove the Window.pid
field as its not needed.

dup() the notefd for interruptproc as the window might'v gone
away and closed the notefd file descriptor, resulting in us
writing to the wrong thing.

use snprint() instead of sprint() for safety.

fix bogus debug fprint().

add missing "visible" flushimage() after Reshaped winctl message
got handled. i assumed wsetname()/nameimage() would be enough,
it but does a invisible flush so softscreen doesnt get updated
immidiately.

do not make allocimage() failure in scrtemps() fatal. it wont
draw the window properly, but it gives the user a chance to
delete some windows to recover.

11 years ago/sys/doc: permissions for cleanps, mkdirlist, mkfilelist
cinap_lenrek [Sat, 20 Oct 2012 17:09:54 +0000 (19:09 +0200)]
/sys/doc: permissions for cleanps, mkdirlist, mkfilelist

11 years agorio: colors, flicker reduction, refresh after mouse close
cinap_lenrek [Sat, 20 Oct 2012 13:51:32 +0000 (15:51 +0200)]
rio: colors, flicker reduction, refresh after mouse close

allocate all the colors in iconinit(), remove unused ones
like grey. rename darkgrey to paletextcol because thats
what it is used for. new approach to window image allocation.
we allocate the window with DNofill and let the window fill
itself. this reduces flickering especially with (-b) option
and makes rio resize feel a lot faster.

wrefresh() didnt work. now fixed.

11 years agorio: wtop() after resize fix
cinap_lenrek [Sat, 20 Oct 2012 08:38:11 +0000 (10:38 +0200)]
rio: wtop() after resize fix

wtop() checked w->topped == topped as a fast exit. if you
had the top most window not being current (== input) which
can happen when you delete the current window, then wtop would
after resize would not make the window current because it
is already top topmost one. wtopme() and wcurrent() both are
non-ops when window is already the topmost or window is already
current, so remove the check as its not needed. also topping
the window feels less sluggish.

11 years agorio: preserve window z-order on resize, fix race conditions
cinap_lenrek [Sat, 20 Oct 2012 20:42:01 +0000 (22:42 +0200)]
rio: preserve window z-order on resize, fix race conditions

sort the window array by w->topped before reshaping all
windows. this preserves the window z-order.

remove implicit focus change on reshape/move. it called
wcurrent() in wtcl thread which might send a wctl message
to itself, bad... also we might not want to change focus
on reshape, like for the rio resize. so we set the input
window explicitely in all call sites.

window deletion was racy. wclosewin() destroys w->i, but
it is called outside the wctl thread so it might just
free the image under libframe doing some text selection.
this is fixed the following: add wclunk() function,
which basically just marks the window as deleted and
removes the reference from the window[] and hidden[]
arrays. (called on wclose() when refcount drops to
zero). wclosewin() now just frees the image and is only
called from the wctl thread on exit or when handing
the Deleted message.

get a reference to the window when doing sweeping or
moving as the filesystem might just clunk it under
us and we might end up sending wctl messages to
a Exited window.

wctl resize message has to fail if the window is not
current as it might be hidden... would also be annoying.

11 years agomore generic way to deal with image chan conversion for resize/resample/rotate
cinap_lenrek [Thu, 18 Oct 2012 18:17:12 +0000 (20:17 +0200)]
more generic way to deal with image chan conversion for resize/resample/rotate

this is to catch crazy color channels like k8a8 and the 15/16 bit
ones and CMAP. basically, just convert to RGBA32 or RGB24 depending
on if it has an alpha channel.

11 years agorio: copy window labels for menu3
cinap_lenrek [Thu, 18 Oct 2012 16:51:32 +0000 (18:51 +0200)]
rio: copy window labels for menu3

as the menu is displayed, the window might go away or change its
label causing menuhit() to dereference bad memory. just strdup()
the labels before passing to menu3str to prevent accidents.

11 years agodocument urlencode in hget(1)
cinap_lenrek [Thu, 18 Oct 2012 13:23:40 +0000 (15:23 +0200)]
document urlencode in hget(1)

11 years agohpost: better handling of optional -u flag
cinap_lenrek [Thu, 18 Oct 2012 12:55:56 +0000 (14:55 +0200)]
hpost: better handling of optional -u flag

11 years agohpost: add -l flag to get location url after POST
cinap_lenrek [Thu, 18 Oct 2012 12:38:07 +0000 (14:38 +0200)]
hpost: add -l flag to get location url after POST

11 years ago/sys/src/cmd/auth/mkfile: fix lib.$O.a race
cinap_lenrek [Thu, 18 Oct 2012 01:49:40 +0000 (03:49 +0200)]
/sys/src/cmd/auth/mkfile: fix lib.$O.a race

11 years agokernel: mnt cache rework
cinap_lenrek [Wed, 17 Oct 2012 13:48:30 +0000 (15:48 +0200)]
kernel: mnt cache rework

avoid double entries in the cache for copen() and properly handle
locking so we wont just give up if we cant lock the Mntcache entry,
but drop the cache lock, qlock the Mntcache entry, and then recheck
the cache.

general cleanup (cdev -> ccache, use eqchantdqid())

11 years agofortunes, rob, rsc, troll: the war is over
stanley lieber [Tue, 16 Oct 2012 16:21:21 +0000 (11:21 -0500)]
fortunes, rob, rsc, troll: the war is over

11 years agokernel: duppage cleanup
cinap_lenrek [Tue, 16 Oct 2012 14:10:26 +0000 (16:10 +0200)]
kernel: duppage cleanup

remove the sched() call and retry loop from duppage() and just
drop the page lock, then reacquire it after lock(&palloc).

11 years agokernel: cachedel() lock order, lookpage, cleanup
cinap_lenrek [Tue, 16 Oct 2012 12:12:21 +0000 (14:12 +0200)]
kernel: cachedel() lock order, lookpage, cleanup

the lock order of page.Lock -> palloc.hashlock was
violated in cachedel() which is called from the
pager. change the code to do it in the right oder
to prevent deadlock.

change lookpage to retry on false hit. i assume that
a false hit means:

a) we'r low on memory -> cached page got uncached/reused

b) duppage() got called on the page, meaning theres another
cached copy in the image now.

paging in is expensive compared to the hashtable lookup, so
i think retrying is better.

cleanup fixfault, adding comments.

11 years agoswap: track swap pages with > 255 references, setswapchan() swapimage.c
cinap_lenrek [Mon, 15 Oct 2012 12:04:30 +0000 (14:04 +0200)]
swap: track swap pages with > 255 references, setswapchan() swapimage.c

swaped pages use a 8bit refcount where as the Page uses a 16bit one.
this might be exploited with having a process having a single page
swaped out and then forking 255 times to make the swap map refcount
overflow and panic the kernel.

this condition is probably very rare. so instead of doubling the
size of the swap map, we add a single 32bit refcount swapalloc.xref
which will keep the combined refcount of all swap map entries who
exceeded 255 references.

zero swapimage.c in setswapchan() after closing it as the stat() call
below might error leaving a dangeling pointer.

11 years agokernel: attachimage / exec error handling
cinap_lenrek [Sun, 14 Oct 2012 17:48:46 +0000 (19:48 +0200)]
kernel: attachimage / exec error handling

attachimage()'s approach to handling newseg() error is flawed:

a) the the image is on the hash table, but ref is still 0, and
there is no segment/pages attached to it so nobody is going to
reclaim / putimage() it -> leak

b) calling pexit() would deadlock us because exec has acquired
up->seglock when calling attachimage(), so this would just deadlock.

the fix does the following:

attachimage() will putimage() and nexterror() if newseg() fails
instead of pexit(). this is less surprising.

exec now keeps the condition variable commit which is set once
we are commited / reached the point of no return and check this
variable in the highest waserror() handler and pexit() us there.

this way we have released up all the locks and pexit() will
cleanup.

note: this bug shouldnt us hit in with the current newseg()
implementation as it uses smalloc() which would wait to
satisfy the allocation instead of erroring.

11 years agoupdate fshalt(8) manpage
cinap_lenrek [Sun, 14 Oct 2012 11:33:10 +0000 (13:33 +0200)]
update fshalt(8) manpage

11 years agoformpost becomes hpost
cinap_lenrek [Sun, 14 Oct 2012 04:28:58 +0000 (06:28 +0200)]
formpost becomes hpost

11 years agourlencode: fix /fd/0 use
cinap_lenrek [Sat, 13 Oct 2012 13:35:39 +0000 (15:35 +0200)]
urlencode: fix /fd/0 use

11 years agoircrc: fix spurious autojoin
cinap_lenrek [Fri, 12 Oct 2012 17:13:34 +0000 (19:13 +0200)]
ircrc: fix spurious autojoin

11 years agoircrc(1): man page fixes, thanks pap
stanley lieber [Fri, 12 Oct 2012 14:17:47 +0000 (09:17 -0500)]
ircrc(1): man page fixes, thanks pap

11 years agohget(1): fix man page errors, add another example
stanley lieber [Fri, 12 Oct 2012 03:06:11 +0000 (22:06 -0500)]
hget(1): fix man page errors, add another example

11 years agoircrc: various improvements (thanks again pap!)
cinap_lenrek [Thu, 11 Oct 2012 23:05:34 +0000 (01:05 +0200)]
ircrc: various improvements (thanks again pap!)

the -t option was ineffective. this fixes is.

fix incompatibility with 9vx as its tcp/status
file returns slightly different format than
Plan 9.

strip annoying \ 2 character from nickserv.

11 years agoadd /rc/bin/formpost; add formpost to hget(1) man page
stanley lieber [Thu, 11 Oct 2012 21:37:48 +0000 (16:37 -0500)]
add /rc/bin/formpost; add formpost to hget(1) man page

11 years agocifsd: fix 64bit fileoffset bug
cinap_lenrek [Thu, 11 Oct 2012 19:38:54 +0000 (21:38 +0200)]
cifsd: fix 64bit fileoffset bug

the low 32bit word got *sign-extended* on vlong conversion. m(

11 years agoircrc(1): fix error
stanley lieber [Thu, 11 Oct 2012 16:34:15 +0000 (11:34 -0500)]
ircrc(1): fix error

11 years agoadd /sys/man/1/ircrc, thanks pap
stanley lieber [Thu, 11 Oct 2012 16:31:40 +0000 (11:31 -0500)]
add /sys/man/1/ircrc, thanks pap

11 years agokernel: try to catch some (rare) mistakes
cinap_lenrek [Thu, 11 Oct 2012 15:29:16 +0000 (17:29 +0200)]
kernel: try to catch some (rare) mistakes

kstrcpy() did not null terminate for < 4 byte buffers. fixed,
but i dont think there is any case where this can happen in
practice.

always set malloctag in kstrdup(), cleanup.

always use ERRMAX bounded kstrcpy() to set up->errstr, q->err
and note[]->msg. paranoia.

instead of silently truncating interface name in netifinit(),
panic the kernel if interface name is too long as this case
is clearly a mistake.

panic kernel when filename is too long for addbootfile() in
devroot. this might happen if your kernel configuration is
messed up.

11 years ago6in4: fix exit status, less strict src filtering, logging (import from sources)
cinap_lenrek [Thu, 11 Oct 2012 11:21:30 +0000 (13:21 +0200)]
6in4: fix exit status, less strict src filtering, logging (import from sources)

11 years agokenrel: simplify image cache by use of ccloseq()
cinap_lenrek [Wed, 10 Oct 2012 06:22:35 +0000 (08:22 +0200)]
kenrel: simplify image cache by use of ccloseq()

11 years agovncv: cleanup
cinap_lenrek [Tue, 9 Oct 2012 14:22:19 +0000 (16:22 +0200)]
vncv: cleanup

11 years agovncv: fork tcs with RFNOWAIT as we dont collect wait message
cinap_lenrek [Tue, 9 Oct 2012 13:26:45 +0000 (15:26 +0200)]
vncv: fork tcs with RFNOWAIT as we dont collect wait message

11 years agovncv: snarfvers race, silly walks, add -l option for clipboard charset
cinap_lenrek [Tue, 9 Oct 2012 13:15:57 +0000 (15:15 +0200)]
vncv: snarfvers race, silly walks, add -l option for clipboard charset

11 years ago/sys/lib/acid/kernel: fix imagecache() and procenv()
cinap_lenrek [Tue, 9 Oct 2012 01:52:18 +0000 (03:52 +0200)]
/sys/lib/acid/kernel: fix imagecache() and procenv()