summaryrefslogtreecommitdiff
path: root/sys/src
AgeCommit message (Collapse)Author
2015-03-08gs: fix bug 694539. Reading off the end of the cbuf when dash pattern len is maxcinap_lenrek
2015-03-07kernel: catch address overflow in syssegfree()cinap_lenrek
the "to" address can overflow in syssegfree() causing wrong number of pages to be passed to mfreeseg(). with the current implementation of mfreeseg() however, this doesnt cause any data corruption but was just freeing an unexpected number of pages. this change checks for this condition in syssegfree() and errors out instead. also mfreeseg() was changed to take ulong argument for number of pages instead of int to keep it consistent with other routines that work with page counts.
2015-03-07snap: fix readseg() to cope with > 2gb segmentscinap_lenrek
2015-03-06zynq: sdio supportcinap_lenrek
2015-03-06devsd: always page align sd bufferscinap_lenrek
sdbio() tests if it can pass the buffer pointer directly to the driver when it is already in kernel memory. we also need to check if the buffer is properly aligned but alignment requirement is handled in system specific sdmalloc() and was not known to devsd. to solve this, we *always* page align sd buffers and get rid of the system specific sdmalloc() macro (was only used in bcm kernel).
2015-03-06zynq: do mpinit() early so cpu1 debug prints do not intermixcinap_lenrek
2015-03-05zynq: fix usb by implementing delay() and give proper port speed in portstatuscinap_lenrek
2015-03-04libthread: get rid of chaninit() (thanks qrstuv)cinap_lenrek
chaninit() does not initialize Chan.qentry and Chan.nentry and there is no way to get rid of such a channel. nobody is using it, so removing the function to avoid confusion.
2015-03-03kernel: fix physical segment handlingcinap_lenrek
ignore physical segments in mcountseg() and mfreeseg(). physical segments are not backed by user pages, and doing putpage() on physical segment pages in mfreeseg() is an error. do now allow physical segemnts to be resized. the segment size is only checked in segattach() to be within the physical segment! ignore physical segments in portcountpagerefs() as pagenumber() does not work on the malloced page structures of a physical segment. get rid of Physseg.pgalloc() and Physseg.pgfree() indirection as this was never used and if theres a need to do more efficient allocation, it should be done in a portable way.
2015-03-02libdraw: font->display->defaultsubfont vs. display->defaultsubfont, dead ↵cinap_lenrek
code, malloc erros it is possible to have fonts belong to different or no display, so the check for defaultsubfont has to be against font->display, not the global display variable. remove unused freeup() routine. handle strdup() error in allocsubfont() and realloc() error in buildfont().
2015-03-01devmnt: remove unused mntstats fields from Mntrpccinap_lenrek
2015-03-01factotum: cleanup getnvramkey()cinap_lenrek
- remove secstore password code, it is not used anymore. - zero the Nvrsafe structure on the stack before returning. - use smprint(), can't overflow.
2015-03-01libdraw: use multiple read() calls in openfont() to read .font filecinap_lenrek
font files might be bigger than the i/o unit, so do multiple reads until eof to read it.
2015-03-01libdraw: use readn() to read headers and Fontchar arraycinap_lenrek
the Fontchar array might be bigger than the i/o unit, so we have to use readn() to properly read it.
2015-03-016c: fix missing memset in Bconv()cinap_lenrek
2015-02-28libthread: remove unused internal functions and old xinc assembler filescinap_lenrek
2015-02-28libthread: use devdup instead of mounting pipe to /mnt/temp for ↵cinap_lenrek
close-on-exec in procexec() the namespace might be shared by other processes. instead, we create a anonymous pipe with pipe() and use devdup to open one end close-on-exec. this is shorter and avoids the race condition. do not touch Execargs after writing the error message as the process might be gone after the write. this was to manually close the fd which isnt neccesary as the kernel will do it for us on the following exit.
2015-02-26pool: maintain Pool.curalloc for poolallocalign() and blockgrow()cinap_lenrek
blockgrow() and poolallocalign() change the size of allocated blocks which needs to be accounted for in Pool.curalloc.
2015-02-26aux/vga: dont error when vesa setscale fails after modeset (thanks rx9p for ↵cinap_lenrek
reporting)
2015-02-24kbdfs: work arround qemucinap_lenrek
qemu does not send e0 escape for gray (arrow) keys, no matter the numlock state. as a work arround, we assume gray key when numlock is not active.
2015-02-24libdraw: check fontchar count in openmemsubfont() and readsubfont()cinap_lenrek
2015-02-24libdraw: cleanup getsubfont()cinap_lenrek
2015-02-23webfs: check $httpproxy and error when its boguscinap_lenrek
the httpproxy environment variable needs to be a url as stated in the manpage, so give an error when it isnt.
2015-02-23jpg: handle progressive non-interleaved modecinap_lenrek
2015-02-21gs: backport 16MB string supportcinap_lenrek
2015-02-20devusb: check for nil hp->dump and hp->seprintepcinap_lenrek
2015-02-20pc, pc64: simplify intrdisable()cinap_lenrek
2015-02-20devusb: fix debug ctl nil crashcinap_lenrek
2015-02-20gs: backport aes support for pdf-1.6cinap_lenrek
2015-02-18pc, pc64: fix intrdisable() MaxIrqLAPIC -> MaxVectorAPIC (thanks mischief)cinap_lenrek
2015-02-186c: eleminate more MOV instructionscinap_lenrek
convert: x = B || W MOVxLZX a, r; MOVxQZX r, b -> MOVxQZX a, r; MOVQ r, b MOVxLSX a, r; MOVxQSX r, r -> MOVxQSX a, r; MOVQ r, r the MOVQ can then be eleminated by copy propagation. improve subprop() by accepting other mov and lea instructions as the source op.
2015-02-176l: no need to emit rex.w prefix for MOVBQZX and MOVWQZXcinap_lenrek
as with 32 bit operand size, the upper bits 63:32 are automatically zeroed in 64bit mode. this gives a shoter instruction encoding.
2015-02-17nusb/usbd: fix typo in debug prints, dont use %U format as its not installedcinap_lenrek
2015-02-17vc: eleminate strcpy in multab codecinap_lenrek
2015-02-17[125678kqv][cl]: fix sprint() and strcpy() buffer overflowscinap_lenrek
2015-02-17tlssrv: produce meaningfull error message when unable to read certificatecinap_lenrek
2015-02-17tlssrv: fix usage, dont catcinap_lenrek
2015-02-17tlssrv: fix this mess (thanks burnzez for reporting the issue)cinap_lenrek
tlsServer() closes the passed in fd, in our case fd=1 leaving it with no std output which got occupied by pipe() filedescriptor which it then closed after duping... a classic. delete all this mess. theres no reason to fork() and copy traffic on a pipe at all as tlsServer() gives us a perfectly valid filedescriptor. just dup() and exec() and we'r done.
2015-02-15wc: flags dont need to be uvlongcinap_lenrek
2015-02-15wc: bring back old wc but extended for 21 bit runescinap_lenrek
the imported wc from sources is arround 8 times slower than our old one. it is common to run wc on large log files to count lines. so i think the implementation complexity is justified. (just like with grep)
2015-02-14wc: import new wc from sourcescinap_lenrek
2015-02-14usbehci: initial support for usb on zynq, remove uncached.hcinap_lenrek
the following hooks have been added to the ehci Ctlr structore to handle cache coherency (on arm): void* (*tdalloc)(ulong,int,ulong); void* (*dmaalloc)(ulong); void (*dmafree)(void*); void (*dmaflush)(int,void*,ulong); tdalloc() is used to allocate descriptors and the periodic frame schedule array. on arm, this needs to return uncached memory. tdalloc()ed memory is never freed. dmaalloc()/dmafree() is used for io buffers. this can return cached memory when when hardware maintains cache coherency (pc) or dmaflush() is provided to flush/invalidate the cache (zynq), otherwise needs to return uncached memory. dmaflush() is used to flush/invalidate the cache. the first argument tells us if we need to flush (non zero) or invalidate (zero). uncached.h is gone now. this change makes the handling explicit.
2015-02-14zynq: do fixed mapping for ocm memory on boot and make kaddr() and paddr() ↵cinap_lenrek
work with it map the whole ocm memory on boot so we can translate physical to virtual addresses and back for uncached memory using KADDR() and PADDR(). replace ualloc() with ucalloc() returning virtual address. physical address can be acquired with PADDR() now. as ocm is now always mapped, use KADDR() instead of tmpmap() for mp bootstrap.
2015-02-12build and document auth/userpasswdcinap_lenrek
2015-02-11libc: check name in getvent()/putenv()cinap_lenrek
passing "", "." or ".." as name caused a crash in getenv() as it would open the directory; then seek() to determine the file size would fail and return -1. now checking for these special names and set error string when its bad. doing a single read() will not work when /env has a 9p fileserver mounted onto it and the file size is bigger than the i/o unit. so doing incremental reads until we get eof.
2015-02-09igfx: displayport support for ivy bridgecinap_lenrek
2015-02-08mothra: add side scrolling, controlled by left and right buttons on the ↵stanley lieber
keyboard. if desired, x-scrollbar can be set visible via the visxbar variable in mothra.c. (thanks, jpm_)
2015-02-07vga/igfx: add 0x2a02 for GM965/GL960/X3100; comment vid/did with name of chipsetstanley lieber
2015-02-07pc64: enable uartisa in default configstanley lieber
2015-02-07games/c64: map : to \ keyaiju