summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-07rio: fix goodrect() bug (thanks mike)cinap_lenrek
mike from eff0ff.net reported the following: > I was running a second instance of rio inside a rio window and > suddenly weird things started happening. The second instance started > imposing arbitrary limits on the size of its windows and refused to > resize some of its windows when its own window was resized. > Turns out this happens if rio's screen is 3 times as high as wide > because of a tiny mistake in its goodrect function. ... and kindly provided a patch. thanks!
2020-03-07dossrv, 9660srv, hjfs: stop *READING* standard *OUTPUT* with -s flagcinap_lenrek
with the -s flag, we should read 9P messages from standard *INPUT* (fd 0) and write responses to standard *OUTPUT* (fd 1). before these servers where reading from fd 1, assuming they where both the same files.
2020-03-07lib9p: get rid of Srv.nopipe and Srv.leavefdsopen hackscinap_lenrek
it is unclear how Srv.nopipe flag should work inside postmountserv(). if a server wants to serve on stdio descriptors, he can just call srv() after initializing Srv.infd and Srv.outfd. The Srv.leavefdsopen hack can be removed now that acme win has been fixed.
2020-03-07acme: split win into winfs and rc script, get rid of lib9p leavefdsopen hackcinap_lenrek
split the acme win command into a winfs fileserver which handles /dev/cons emulation and a rc script responsible for launching the command. with these changes, the fd fiddling is not neccesary anymore and we can get rid of the leavefdsopen hack.
2020-03-07lib9p: fix typocinap_lenrek
2020-03-07lib9p: zero out per connection state in Srv template for listensrv()cinap_lenrek
in case listensrv() is called with a previously active Srv, we have to make sure that per connection state is zeroed out (locks and reference conuts). also, dont assume anything about the Ref structure. there might be implementations that have a spinlock in them.
2020-03-07dossrv: output iotrack error message to stderrcinap_lenrek
2020-03-07ramfs: don't use Srv.nopipecinap_lenrek
2020-03-07aux/acpi, aux/apm: remove nopipe -i flagcinap_lenrek
2020-03-07hgignore: ignore section 9 manpage indices, ignore init, kernels and ↵cinap_lenrek
bootloader binaries
2020-03-05devproc: fix syscalltrace read for ratracecinap_lenrek
2020-03-01hgfs: fix loadrevinfo() for empty log bugcinap_lenrek
loadrevinfo() would fail on a empty log portion due to a bug in the previous commit. the loop is supposed to skip all bytes until we encounter a empty line. the loop starts at the beginning of a line so when we encounter a \n, we have to terminate, otherwise read bytes until we see \n (end of a line) and then read another and test the condition again.
2020-03-01libsec: move AES XTS function prototypes to AES definition section in the ↵cinap_lenrek
header file
2020-03-01libsec: remove hash pickle functions, document ripemd160, cleanup sechash(2) ↵cinap_lenrek
manpage
2020-02-29kernel: simplify exec()cinap_lenrek
progarg[0] can be assigned to elem directly as it is a copy in kernel memory, so the char proelem[64] buffer is not neccesary. do the close-on-exit outside of the segment lock. there is no reason to keep the segment table locked.
2020-02-28devproc: make sure writewatchpt() doesnt overflow the watchpoint arraycinap_lenrek
the user buffer could be changed while we parse it resulting in a different number of watchpoints than initially calculated. so add a check to the parse loop so we wont overflow the watchpoint array.
2020-02-28kernel: make sure we wont run into the tos when copying exec() argumentscinap_lenrek
in case the calling process changes its arguments under us, it could happen that the final argument string lengths become bigger than initially calculated. this is fine as we still make sure we wont overflow the stack segment, but we could overrun into the tos structure at the end of the stack. so change the limit to the base of the tos, not the end of the stack segment.
2020-02-28devproc: cleanup procwrite size checkscinap_lenrek
writes to /proc/n/notepg and /proc/n/note should be able to write at ERRMAX-1 bytes, not ERRMAX-2. simplify write to /proc/n/args by just copying to local buf first and then doing a kstrdup(). the value of Proc.nargs does not matter when Proc.setargs is 1.
2020-02-27fix special case for null pointer constants in cond expressionsOri Bernstein
Section 6.5.15 of the C99 spec requires that if one argument of a ?: expression is a null pointer constant, and the other has a pointer type T*, then the type of the expression is T*. We were attempting to follow this rule, however, we only handled literal expressions when checking for null pointers. This change looks through casts, so 'nil' and 'NULL', and their expansion '(void*)0' are all detected as null pointer constants.
2020-02-26walk arguments to gOri Bernstein
This allows us to 'g' the files within a directory, as in: g _MAX /sys/include/ape Before this change, we'd attempt to grep the directory structure, which is not ideal. After, we grep the files within the directory.
2020-02-26include section 9 in manpage plumb rules.Ori Bernstein
We added section 9 to the manual. However, the plumb rule only recognized sections 1 through 8. Fix it to include section 9.
2020-02-23ape/cc: stop spamming arguments that are only needed onceBurnZeZ
2020-02-23devcons: fix permissions for reboot and sysstatcinap_lenrek
#c/reboot is a write only file #c/sysstat should not be writable by everyone (write resets counters)
2020-02-23kernel: avoid selecting the boot process in killbig()cinap_lenrek
2020-02-23kernel: fix multiple devproc bugs and pid reuse issuescinap_lenrek
devproc assumes that when we hold the Proc.debug qlock, the process will be prevented from exiting. but there is another race where the process has already exited and the Proc* slot gets reused. to solve this, on process creation we also have to acquire the debug qlock while initializing the fields of the process. this also means newproc() should only initialize fields *not* protected by the debug qlock. always acquire the Proc.debug qlock when changing strings in the proc structure to avoid doublefree on concurrent update. for changing the user string, we add a procsetuser() function that does this for auth.c and devcap. remove pgrpnote() from pgrp.c and replace by static postnotepg() in devproc. avoid the assumption that the Proc* entries returned by proctab() are continuous. fixed devproc permission issues: - make sure only eve can access /proc/trace - none should only be allowed to read its own /proc/n/text - move Proc.kp checks into procopen() pid reuse was not handled correctly, as we where only checking if a pid had a living process, but there still could be processes expecting a particular parentpid or noteid. this is now addressed with reference counted Pid structures which are organized in a hash table. read access to the hash table does not require locks which will be usefull for dtracy later.
2020-02-23devswap: dont assume Proc* structures returned from proctab() are continuouscinap_lenrek
2020-02-23sdiahci, sdodin: avoid calling kproc() while holding ilock()cinap_lenrek
2020-02-23/sys/lib/kbmap: update 0xf860 to Kshift value, fix fake shifts on esc1Sigrid
2020-02-19sed: allow whitespace after ! negation (thanks k0ga)cinap_lenrek
2020-02-13acme(1): fix scrolling when swiping text at the top or bottom of a framespew
2020-02-10remove C99_SPRINTF_EXTENSION define.Ori Bernstein
It's been 20 years since c99 came out. By now, if code hasn't been fixed, it's not going to be. Requiring this define just confuses porters.
2020-02-09bcm: change ARGB32 to XRGB32 for framebuffer to avoid slow drawingRoberto E. Vargas Caballero
2020-02-05upas/fs plumb modify messages for self-changed flagsOri Bernstein
Currently upas/fs plumbs modify messages only if the flag changes are made by another imap connection. If the flag changes are made within the running upas/fs no modify message is plumbed. This changes upas/fs to set the modify flag if we made the change ourself. It also moves the flag setting before the imap read, so that we don't clobber flag changes coming from the imap server with our own flags. (Thanks Tobias Heinicke)
2020-02-04image(6): fix typorgl
2020-02-02kernel: cleanup makefile for $CONF.$O targetcinap_lenrek
2020-02-02mergecinap_lenrek
2020-02-02listen(1): implement one-shot mode flag for listen1 (thanks kivik)cinap_lenrek
2020-01-31fix double free in acme.Ori Bernstein
in acmerrorproc(): sendp(s); free(s); in waitthread(): recv(&err) free(err) We only want waitthread to free.
2020-01-29document common emulator keysrgl
2020-01-28walk: add D and T fmt characters (fileserver device/type)BurnZeZ
2020-01-28walk(1): formatting/correctionsBurnZeZ
2020-01-28walk: remove superfluous newlineBurnZeZ
2020-01-27kernel: restore old behaviour that kprocs have ther noteid == pidcinap_lenrek
2020-01-27kernel: fix mistake from previous commit (noteid not being inherited by default)cinap_lenrek
2020-01-26kernel: implement portable userinit() and simplify process creationcinap_lenrek
replace machine specific userinit() by a portable implemntation that uses kproc() to create the first process. the initcode text is mapped using kmap(), so there is no need for machine specific tmpmap() functions. initcode stack preparation should be done in init0() where the stack is mapped and can be accessed directly. replacing the machine specific userinit() allows some big simplifications as sysrfork() and kproc() are now the only callers of newproc() and we can avoid initializing fields that we know are being initialized by these callers. rename autogenerated init.h and reboot.h headers. the initcode[] and rebootcode[] blobs are now in *.i files and hex generation was moved to portmkfile. the machine specific mkfile only needs to specify how to build rebootcode.out and initcode.out.
2020-01-25ppc: remove old duplicate of devtls.ccinap_lenrek
2020-01-22add v8eaiju
2020-01-20page(1): fix troff manual exampleAlex Musolino
2020-01-19mergecinap_lenrek
2020-01-19Apply http://www.9paste.net/qrstuv/patch/acme-movetodelmesg/Roberto E. Vargas Caballero