Commit graph

4358 commits

Author SHA1 Message Date
cinap_lenrek
dbbe430ec7 libmach: use #pragma pack to force 4 byte alignment of bootexec.h structures for amd64 2015-03-18 19:31:51 +01:00
cinap_lenrek
3889ada959 ape: silence compiler "no return at end of function" for mips lock.c 2015-03-18 19:30:12 +01:00
cinap_lenrek
aac6784fce merge 2015-03-17 16:13:25 +01:00
cinap_lenrek
f5f9ecdcfa 6c: MOVL xxx, r; MOVLQZX r, r -> MOVL xxx, r
eleminate MOVLQXZ instructions after MOVL as MOVL implicitely
zero extends the result.
2015-03-17 16:12:01 +01:00
stanley lieber
848c477af9 ssam: fix typo 2015-03-16 23:44:04 -04:00
stanley lieber
197e4d6e08 ssam: don't pollute the environment. 2015-03-16 23:42:58 -04:00
stanley lieber
17ae0ea757 mp(2) man page: mpinvert, not mpinverse (thanks, pr) 2015-03-16 23:34:37 -04:00
cinap_lenrek
972cd5e3fc kernel: get rid of auxpage() and preserve cache index bits in Page.va in mount cache
the mount cache uses Page.va to store cached range offset and
limit, but mips kernel uses cache index bits from Page.va to
maintain page coloring. Page.va was not initialized by auxpage().

this change removes auxpage() which was primarily used only
by the mount cache and use newpage() with cache file offset
page as va so we will get a page of the right color.

mount cache keeps the index bits intact by only using the top
and buttom PGSHIFT bits of Page.va for the range offset/limit.
2015-03-16 05:46:08 +01:00
cinap_lenrek
d0b1db98bc kernel: avoid repeated calls to reclaim(), dont miss last page in Pte
when we are skipping a process because we could not acquire
its segment lock, dont call reclaim() again (which is pointless
as we didnt pageout any pages), instead try the next process.

the Pte.last pointer is inclusive, so don't miss the last page
in pageout().
2015-03-16 05:23:38 +01:00
cinap_lenrek
c1717aebf7 rsa(8): recommend secstore(1) for Plan 9 RSA private key storage 2015-03-15 21:24:03 +01:00
cinap_lenrek
9b7c978793 mothra: <del>, <ins>, <wbr> 2015-03-15 18:01:06 +01:00
cinap_lenrek
6411efcde8 mothra: add <strike> support 2015-03-15 17:05:24 +01:00
cinap_lenrek
e451804a75 boot: disable group/other permission checking in bootfs paqfs
when building bootfs in d770 mode directory, the other permissions
in bootfs paq are masked off which results in boot to fail. theres
no point in checking group/other permissions on boot, so just disable
permissin checking in paqfs with the -a flag.
2015-03-15 15:27:56 +01:00
cinap_lenrek
b821edbcab doom: print correct version number on mismatch (thanks qu7uux) 2015-03-14 22:23:39 +01:00
cinap_lenrek
2443d46a9e webfs: do not send credentials in automatic referer url 2015-03-14 01:09:37 +01:00
cinap_lenrek
8ef66ca212 rc-httpd: support for http basic authentication, fix cgi support to work with hgweb.cgi 2015-03-14 01:02:43 +01:00
cinap_lenrek
060e69b15a httpauth: little helper for rc-httpd to do http basic authentication with plan9 auth server 2015-03-14 01:00:26 +01:00
cinap_lenrek
85cab72ea0 hg, python: remove proto files 2015-03-13 18:45:58 +01:00
cinap_lenrek
e74d851d69 hg: install hgweb templates 2015-03-13 18:30:59 +01:00
cinap_lenrek
e437b1b289 pemencode: handle base64 input length < 3, fix bogus zero termination 2015-03-12 17:44:33 +01:00
cinap_lenrek
757354dac6 imap4d: simplify auth code using encodefmt(), use readn() to get multiple of 3*18 in base64 input buffer 2015-03-12 17:29:17 +01:00
cinap_lenrek
7e7cc2c8d7 webfs: simplify http basic auth code by using encodefmt() 2015-03-12 17:26:49 +01:00
cinap_lenrek
69af2676b0 upas/marshal: deduplicate cistrcmp()/cistrncmp()/enc64()
use the libc versions of these routines avoiding
code duplication.
2015-03-12 17:23:56 +01:00
cinap_lenrek
6eba362810 ndb/dns: reduce sencodefmt() to not link in enc32()/enc64() encoders
the special sencodefmt() in ndb/dn.c is only used with %H format for
hexadecimal printing for binary strings. removing the unused
calls to enc32() and enc64() reduces the code size by arround 4K.
(this is usefull for ndb/getip which gets linked into the kernel).
2015-03-11 18:09:48 +01:00
cinap_lenrek
9babf6a347 encode(2): clarify lim argument to enc*(), add SOURCE reference for encodefmt() 2015-03-11 17:48:24 +01:00
cinap_lenrek
e6697f2955 merge 2015-03-11 17:28:19 +01:00
cinap_lenrek
8c11b62af9 smtp, smtpd: fix use of enc64(), fix memory leaks in doauth()
the approximation of n*2 to calculate the number of output bytes
for enc64() fails for inputs of size < 3. this is fixed by using
encodefmt() which gets the calculation right and also simplifies
the code avoiding the allocation and freeing of intermediate string
buffers.
2015-03-11 17:14:56 +01:00
aiju
aa3a54246b netaudit: comment file server auth test (unreliable on cwfs) 2015-03-11 16:13:42 +01:00
cinap_lenrek
a44a1dbd19 gif: fix color table clipping (for cb5.gif) 2015-03-11 12:59:19 +01:00
cinap_lenrek
a6f7507661 factotum: remove unused extern declarations of invoker and authdom from header 2015-03-11 11:56:02 +01:00
cinap_lenrek
4d211fdd48 kernel: fix integer overflow in syssegflush(), segment code cleanup
mcountseg(), mfreeseg():
use Pte.first/last pointers when possible and avoid constructs
like s->map[i]->pages[j].

freepte():
do not zero entries in freepte(), the segment is going away and
here is no point in zeroing page pointers. hoist common code at
the top avoiding duplication.

segpage(), fixfault():
avoid load after store for Pte** pointer.

fixfault():
return -1 in default case to avoid the "used but not set" warning
for mmuphys and get rid of the useless initialization.

syssegflush():
due to len being unsigned, the pe = PGROUND(pe) can make "chunk"
bigger than len causing a overflow. rewrite the function and deal
with page alignment and errors at the beginning.

syssegflush(), segpage(), fixfault(), putseg(), relocateseg(),
mcountseg(), mfreeseg():
keep naming consistent.
2015-03-10 18:16:08 +01:00
cinap_lenrek
5639d1e5fc wpa(8): the -p flag will also prompt for user/password on wpa enterprise 2015-03-10 00:44:17 +01:00
cinap_lenrek
dfed1eb851 pushtls(2): fix signature to TLSconn.trace() 2015-03-10 00:41:46 +01:00
cinap_lenrek
482694b72a webfs: implement CONNECT method for https connections over proxy
when using a http proxy, establish secure tls connection to the
other end with the CONNECT method so the proxy.
2015-03-09 20:26:20 +01:00
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