Commit graph

4507 commits

Author SHA1 Message Date
cinap_lenrek 3f869a6894 factotum: cleanup getnvramkey()
- 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-01 11:17:21 +01:00
cinap_lenrek 0467b41972 libdraw: use multiple read() calls in openfont() to read .font file
font files might be bigger than the i/o unit, so do multiple reads
until eof to read it.
2015-03-01 05:45:22 +01:00
cinap_lenrek e725771b5d libdraw: use readn() to read headers and Fontchar array
the Fontchar array might be bigger than the i/o unit,
so we have to use readn() to properly read it.
2015-03-01 05:39:45 +01:00
cinap_lenrek 7cdc13accc 6c: fix missing memset in Bconv() 2015-03-01 05:33:41 +01:00
cinap_lenrek 692e32caf4 thread(2): remove another instance of /mnt/temp 2015-02-28 13:27:00 +01:00
cinap_lenrek 95565d289e libthread: remove unused internal functions and old xinc assembler files 2015-02-28 13:26:38 +01:00
cinap_lenrek 45d1d31847 libthread: use devdup instead of mounting pipe to /mnt/temp for 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-28 12:50:17 +01:00
cinap_lenrek 1d2ce3583e leak: report alloc size mismatch 2015-02-26 22:33:03 +01:00
cinap_lenrek 098884981d pool: maintain Pool.curalloc for poolallocalign() and blockgrow()
blockgrow() and poolallocalign() change the size of
allocated blocks which needs to be accounted for
in Pool.curalloc.
2015-02-26 22:22:07 +01:00
stanley lieber 244d5ab76b fortunes: My recent incompetence is humbling. I should quit the industry. 2015-02-25 19:22:47 -05:00
cinap_lenrek 5866bd5ada aux/vga: dont error when vesa setscale fails after modeset (thanks rx9p for reporting) 2015-02-26 00:54:23 +01:00
cinap_lenrek 1e14429f47 kbdfs: work arround qemu
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-24 14:21:47 +01:00
cinap_lenrek 4235556c16 libdraw: check fontchar count in openmemsubfont() and readsubfont() 2015-02-24 03:30:21 +01:00
cinap_lenrek 5f8cacd2de libdraw: cleanup getsubfont() 2015-02-24 03:25:26 +01:00
cinap_lenrek cc77058aea webfs: check $httpproxy and error when its bogus
the httpproxy environment variable needs to be a url as stated
in the manpage, so give an error when it isnt.
2015-02-23 07:27:19 +01:00
cinap_lenrek 60fd51b9b7 merge 2015-02-23 01:23:31 +01:00
cinap_lenrek d7a4fdee99 jpg: handle progressive non-interleaved mode 2015-02-23 01:20:42 +01:00
cinap_lenrek cd34655642 merge 2015-02-21 10:56:32 +01:00
cinap_lenrek ccb624e2bb gs: backport 16MB string support 2015-02-21 10:55:09 +01:00
khm e3ddbf12bd restore balance to reality 2015-02-20 15:09:25 -05:00
stanley lieber c9785a08ff io(1), seg(1): add HISTORY section to man pages (thanks, jpm_) 2015-02-20 14:28:56 -05:00
cinap_lenrek 6f1787adcb devusb: check for nil hp->dump and hp->seprintep 2015-02-20 18:56:22 +01:00
cinap_lenrek c6069e28ac pc, pc64: simplify intrdisable() 2015-02-20 18:43:32 +01:00
cinap_lenrek 173bafd800 devusb: fix debug ctl nil crash 2015-02-20 18:42:24 +01:00
cinap_lenrek 0b016a77e4 gs: backport aes support for pdf-1.6 2015-02-20 00:21:45 +01:00
cinap_lenrek 13508a99a8 gs: work arround broken xref table pdfs
rebuilding the xref table does not work for pdfs with
compressed object streams. as a work arround, we skip
xref table verification and ignore wrong xref gen #
for gen 0 objects.
2015-02-19 11:44:16 +01:00
cinap_lenrek 581f3852fe pc, pc64: fix intrdisable() MaxIrqLAPIC -> MaxVectorAPIC (thanks mischief) 2015-02-18 06:30:01 +01:00
cinap_lenrek 0037c93433 6c: eleminate more MOV instructions
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-18 23:34:33 +01:00
cinap_lenrek 8210f857f1 6l: no need to emit rex.w prefix for MOVBQZX and MOVWQZX
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-17 22:25:55 +01:00
cinap_lenrek eec5799f4c nusb/usbd: fix typo in debug prints, dont use %U format as its not installed 2015-02-17 22:17:30 +01:00
cinap_lenrek 5c84044f51 vc: eleminate strcpy in multab code 2015-02-17 22:16:02 +01:00
cinap_lenrek 03feba8cc1 [125678kqv][cl]: fix sprint() and strcpy() buffer overflows 2015-02-17 22:13:35 +01:00
cinap_lenrek fdeea811b7 tlssrv: produce meaningfull error message when unable to read certificate 2015-02-17 07:05:54 +01:00
cinap_lenrek ebeb158a08 tlssrv: fix usage, dont cat 2015-02-17 06:59:55 +01:00
cinap_lenrek a55c2b2b81 tlssrv: fix this mess (thanks burnzez for reporting the issue)
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-17 06:54:19 +01:00
cinap_lenrek d99a4ed1b8 wc: flags dont need to be uvlong 2015-02-15 06:26:49 +01:00
cinap_lenrek 94d3d64c88 wc: bring back old wc but extended for 21 bit runes
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-15 06:22:19 +01:00
cinap_lenrek b06a35ba56 wc: import new wc from sources 2015-02-14 16:20:40 +01:00
cinap_lenrek 995379e388 usbehci: initial support for usb on zynq, remove uncached.h
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-14 03:00:31 +01:00
cinap_lenrek 6b2d1f0186 zynq: do fixed mapping for ocm memory on boot and make kaddr() and paddr() 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-14 02:44:19 +01:00
cinap_lenrek 48c5cf1f11 ircrc: dont require nick and user to be the same for auth/userpasswd (thanks spew) 2015-02-12 18:40:20 +01:00
cinap_lenrek 3805e56edc ircrc(1): remove auth/userpasswd complaint from BUGS section 2015-02-12 18:24:41 +01:00
cinap_lenrek 92602d08d6 build and document auth/userpasswd 2015-02-12 18:18:34 +01:00
cinap_lenrek 8b57e59ea9 libc: check name in getvent()/putenv()
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-11 23:54:28 +01:00
cinap_lenrek 21570a4719 igfx: displayport support for ivy bridge 2015-02-09 19:17:04 +01:00
stanley lieber 20f2add592 mothra: add side scrolling, controlled by left and right buttons on the keyboard. if desired, x-scrollbar can be set visible via the visxbar variable in mothra.c. (thanks, jpm_) 2015-02-08 13:19:47 -05:00
stanley lieber b2c2d1ed2a vga/igfx: add 0x2a02 for GM965/GL960/X3100; comment vid/did with name of chipset 2015-02-07 01:12:46 -05:00
stanley lieber 92d75fe03f vgadb: add vid=0x8086 did=0x2a02 for Intel GM965/GL960/X3100; comment recent igfx ctlr definitions with the names of specific chipsets instead of the model numbers of laptops they may ship in 2015-02-07 01:10:35 -05:00
stanley lieber cab445eb62 pc64: enable uartisa in default config 2015-02-07 01:01:11 -05:00
aiju dc506ad17e games/c64: map : to \ key 2015-02-07 18:55:03 +01:00