Commit graph

7275 commits

Author SHA1 Message Date
Alex Musolino
3a3eb0434c rc-httpd: set charset=utf-8 for all text/* content types 2019-06-17 13:17:16 +09:30
Alex Musolino
8648e06534 rc-httpd: only emit charset option for text/plain content type 2019-06-17 13:13:40 +09:30
Ori Bernstein
873a7716e0 Add test for pow.c 2019-06-16 18:21:52 -07:00
Ori Bernstein
37a5e86bf0 Handle NaN and Inf edge cases as specified by posix, instead of barfing.
We're not a posix system, but the posix spec is a good reference
	for what we should do.

	Thanks Geoff for the inspiration for this patch.
2019-06-16 15:55:55 -07:00
cinap_lenrek
55f018df8a merge 2019-06-14 10:32:26 +02:00
cinap_lenrek
8d36cd8d8a devdtracy: make machlocks and dtktab static 2019-06-14 10:30:50 +02:00
cinap_lenrek
f42e53655e bcm64: implement dtracy support 2019-06-14 10:28:30 +02:00
aiju
9a9403bb66 vmx(1): update BUGS 2019-06-11 11:36:20 +00:00
Alex Musolino
39a435ee1c snoopy(8): add support for dhcp classless static routes option
To complement the new cl-routes field, the bootp static routes option has been
renamed to cf-routes and the network/gateway pairs are separated with a right
arrow.
2019-06-11 15:27:12 +09:30
Alex Musolino
d904a57e17 snoopy(8): avoid extra spaces in dhcp filter output 2019-06-11 15:19:18 +09:30
Alex Musolino
396844787c snoopy(8): include dhcp.h instead of replicating bootp/dhcp options enum 2019-06-11 15:18:27 +09:30
Alex Musolino
26dc73c763 file(1): recognise unified diff output 2019-06-08 15:56:03 +09:30
Alex Musolino
78c7cd0c01 rc-httpd(8): avoid duplicate log output in dir-index handler
Delay calling do_log until just before emitting the response.  This avoids
calling do_log before potentially handing control to the static-index
handler, which also calls do_log.
2019-06-05 16:04:50 +09:30
Ori Bernstein
341b64b5bd Remove trailing whitespace. 2019-06-04 22:47:07 -07:00
Ori Bernstein
41be41b493 Lost a trailing \n 2019-06-04 22:42:10 -07:00
Ori Bernstein
033c2812c2 Make 'g' grep recursively by default. 2019-06-04 22:36:32 -07:00
BurnZeZ
12e136332a plumber: loop will go out of bounds when *++s == '\0'; replace with strstr 2019-05-31 22:15:53 +00:00
cinap_lenrek
ed3a3c4dd4 ssh: work around github.com's broken cipher negotiation code (thanks Ori_B)
key exchange with git@github.com fails as they appear to try to
negotiate a mac algorithm even tho we use an AEAD cipher which
does not use a mac algorithm.

the work around is to supply a dummy mac algorithm that they
can negotiate to make them happy.
2019-05-27 02:11:16 +02:00
cinap_lenrek
569f936660 /sys/src/cmd/mkfile: fix PCONLY exclude (thanks stefan) 2019-05-24 22:52:20 +02:00
cinap_lenrek
d7684982e8 awk: no need to call getargv() twice to get the value for FILENAME 2019-05-24 17:25:44 +02:00
cinap_lenrek
c9a1045d49 gs: fix missing type check in ztype (thanks jsmoody)
to reproduce:

gs <<.
null [[][][][][][][][][][][][][][][]] .type
.
2019-05-24 14:17:18 +02:00
cinap_lenrek
e55778d67e gs: apply fixes for CVE-2018-16509 (thanks jsmoody) 2019-05-23 14:59:28 +02:00
cinap_lenrek
197ff3ac2f devip: if the server does not support TCP ws option, disable window scaling (thanks joe9)
if the server responds without a window scale option in
its syn-ack, disable window scaling alltogether as both
sides need to understand the option.
2019-05-22 22:20:31 +02:00
Alex Musolino
d7aa56c073 upas/fs: remove read timeout via alarm(2) in pop3resp
The alarm note is not handled by upas/fs, so if and when it did fire,
the pop3 client process would terminate rendering the entire fs
unresponsive.
2019-05-20 15:00:14 +09:30
cinap_lenrek
c35f95de2a vmx: handle build arch exclude in /sys/src/cmd/mkfile 2019-05-19 17:11:57 +02:00
cinap_lenrek
c881e33e8e bcm, bcm64: fix cache operations for dma and emmc
always clean AND invalidate caches before dma read,
never just invalidate as the buffer might not be
aligned to cache lines...

we have to invalidate caches again *AFTER* the dma
read has completed. the processor can bring in data
speculatively into the cache while the dma in in
flight.
2019-05-19 16:54:50 +02:00
cinap_lenrek
d667607c26 sshnet(4): ... and incoming TCP calls 2019-05-18 12:45:57 +02:00
cinap_lenrek
a852f55b6c merge 2019-05-17 19:01:14 +02:00
cinap_lenrek
d5e4558078 bcm64: remove unneccesary tlb flush on mmuidmap() 2019-05-17 18:57:05 +02:00
cinap_lenrek
2235660f86 bcm64: no need to flush instruction cache when switching TTBR0 2019-05-17 18:56:34 +02:00
cinap_lenrek
5c5c1b6666 bcm64: switch to 64k page size 2019-05-17 18:35:14 +02:00
cinap_lenrek
e0c19ae048 7l: don't hardcode 4k pagesize, use INITRND 2019-05-17 18:14:10 +02:00
cinap_lenrek
18d67944be merge 2019-05-17 01:53:27 +02:00
cinap_lenrek
335e019746 mkone: fix man target (thanks Amavect)
Amavect wrote:
> mkone and mkmany have backwards targets for installing man pages.
> This patch makes 'mk man' actually work for mkfiles that include mkone.
> mkmany is not easily fixed without breaking changes.
> It may go without saying that external repos should write their own mkfiles.
2019-05-17 01:51:28 +02:00
23hiro
3b00f089ee draw(3): memlorigin 2019-05-15 20:24:39 +02:00
cinap_lenrek
b24ed2bfac bcm64: generalize mmu code
make user page table list heads arrays so we can
index into the right level avoiding the special
cases for differen PTLEVELS.
2019-05-15 16:19:20 +02:00
cinap_lenrek
47d3e8fc63 bcm64: fix mmu0clear() mistake from previous commit 2019-05-15 13:24:34 +02:00
cinap_lenrek
704970074e nusb(2): remove startdevs() reference, document getdev() (thanks BurnZeZ) 2019-05-14 09:06:09 +02:00
cinap_lenrek
adf96a529e bcm: add cache invalidate before accessing prop buffer 2019-05-13 19:21:14 +02:00
cinap_lenrek
a3b5e3994f bcm64: implement reboot support 2019-05-13 19:20:21 +02:00
cinap_lenrek
3b36daa2bb bcm, bcm64: preserve memsize across reboots, avoid trashing atags while parsing cmdline
we override atag memory on reboot, so preserve
the memsize learned from atag as *maxmem plan9
variable. the global memsize variable is not
needed anymore.

avoid trashing the following atag when zero
terminating the cmdline string.

zero memory after plan9.ini variables.
2019-05-13 19:12:41 +02:00
cinap_lenrek
157d7ebdbd devip: do not lock selftab in ipselftabread(), remove unused fields from Ipself
the Ipselftab is designed to not require locking on read
operation. locking the selftab in ipselftabread() risks
deadlock when accessing the user buffer creates a fault.

remove unused fields from the Ipself struct.
2019-05-12 01:20:21 +02:00
BurnZeZ
bf4f158707 memdraw(2): remove references to iprint() 2019-05-11 15:28:18 +00:00
cinap_lenrek
333c320204 devip: reset speed and delay on bind, adjust burst on mtu change, ifc->m nil check, consistent error strings
initialize the rate limits when the device gets
bound, not when it is created. so that the
rate limtis get reset to default when the ifc
is reused.

adjust the burst delay when the mtu is changed.
this is to make sure that we allow at least one
full sized packet burst.

make a local copy of ifc->m before doing nil
check as it can change under us when we do
not have the ifc locked.

specify Ebound[] and Eunbound[] error strings
and use them consistently.
2019-05-11 17:22:33 +02:00
cinap_lenrek
7186be0424 devip: make sure ifc is bound in add6 ctl command 2019-05-11 14:54:10 +02:00
cinap_lenrek
3a0d5f41a8 devip: remove unused c->car qlock, avoid potential deadlock in ipifcregisterproxy()
remove references to the unused Conv.car qlock.

ipifcregisterproxy() is called with the proxy
ifc wlock'd, which means we cannot acquire the
rwlock of the interfaces that will proxy for us
because it is allowed to rlock() multiple ifc's
in any order. to get arround this, we use canrlock()
and skip the interface when we cannot acquire the
lock.

the ifc should get wlock'd only when we are about
to modify the ifc or its lifc chain. that is when
adding or removing addresses. wlock is not required
when we addresses to the selfcache, which has its
own qlock.
2019-05-11 14:01:26 +02:00
cinap_lenrek
a25819c43a devip: avoid media bind/unbind kproc reader startup race, simplify etherbind
mark reader process pointers with (void*)-1 to mean
not started yet. this avoids the race condition when
media unbind happens before the kproc has set its
Proc* pointer. then we would not post the note and
the reader would continue running after unbind.

etherbind can be simplified by reading the #lX/addr
file to get the mac address, avoiding the temporary
buffer.
2019-05-11 07:22:34 +02:00
23hiro
ed3a576e8b timezones: add India (thanks joe9) 2019-05-11 01:23:59 +02:00
cinap_lenrek
db3bf8271b bcm64: use exclusive monitor on nrdy to wake up idlehands()
when the exclusive monitor is cleared, a event is generated
which we can use to wake up idlehands. that way we do not
need to wait for the next timer interrupt until a cpu takes
work from the run queue.
2019-05-10 14:05:04 +02:00
cinap_lenrek
addb36ee48 ape: fix malloc to deal with more than 4GB of memory on 64 bit systems 2019-05-10 12:10:02 +02:00