Commit graph

4324 commits

Author SHA1 Message Date
stanley lieber e87bbc878e theo: OpenBSD is not generally known as an exposed democracy. 2015-03-08 21:52:34 -04:00
stanley lieber 9b63280ae8 g: search .awk and .rc files 2015-03-08 21:46:00 -04:00
cinap_lenrek b69556052e gs: fix bug 694539. Reading off the end of the cbuf when dash pattern len is max 2015-03-08 05:27:24 +01:00
cinap_lenrek fcc336b902 kernel: catch address overflow in syssegfree()
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-07 18:59:06 +01:00
cinap_lenrek 0c705580ab snap: fix readseg() to cope with > 2gb segments 2015-03-07 15:21:01 +01:00
cinap_lenrek 7b7c7f4451 merge 2015-03-06 18:30:25 +01:00
cinap_lenrek dc6d81cc7e zynq: sdio support 2015-03-06 18:29:39 +01:00
cinap_lenrek 374d4ec2c1 devsd: always page align sd buffers
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-06 16:16:45 +01:00
cinap_lenrek fadbb92afa zynq: do mpinit() early so cpu1 debug prints do not intermix 2015-03-06 14:31:51 +01:00
cinap_lenrek 4e259dffbb merge 2015-03-05 10:17:23 +01:00
cinap_lenrek aade4d9d8a set /mail/tmp permissions world writable in cdproto 2015-03-05 10:16:17 +01:00
cinap_lenrek 3cd7978a72 zynq: fix usb by implementing delay() and give proper port speed in portstatus 2015-03-05 23:48:23 +01:00
stanley lieber f7160e633c col(1): add SOURCE (thanks, qrstuv) 2015-03-04 19:23:34 -05:00
cinap_lenrek 07c7fa6716 libthread: get rid of chaninit() (thanks qrstuv)
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-04 10:20:31 +01:00
cinap_lenrek eaf91d0f8e kernel: fix physical segment handling
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-03 13:08:29 +01:00
cinap_lenrek 2259f3fb9a libdraw: font->display->defaultsubfont vs. display->defaultsubfont, dead 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-02 11:01:12 +01:00
cinap_lenrek fc1ff7705b devmnt: remove unused mntstats fields from Mntrpc 2015-03-01 18:56:45 +01:00
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