Commit graph

6717 commits

Author SHA1 Message Date
cinap_lenrek cc5d74262c vncs: silence devdraw debug prints 2018-07-07 17:11:51 +02:00
spew 77ca4e0056 ape: fix MAXSIG 2018-07-03 14:41:14 -04:00
spew ede15f38e5 ape: remove getitimer setitimer implemenations 2018-07-03 12:28:05 -04:00
aiju ac891003ea games/mines: add missing checks for UseGhost 2018-07-03 07:22:19 +00:00
spew 2e05af858e ape: improve setitimer 2018-07-01 23:35:23 -04:00
spew 91d0343627 ape: an implemenation of getitimer setitimer 2018-07-01 18:48:12 -04:00
cinap_lenrek 9dc907361c hgfs(4): fix typo (thanks piroko) 2018-06-28 20:14:43 +02:00
cinap_lenrek 899ec4d0b5 ssh: wait for remote channel close (thanks piroko) 2018-06-28 20:10:11 +02:00
23hiro 2f1b8246e2 Persist 'k' command in mothra and add matching -k flag (thanks piroko)
"I sometimes find myself on either slow or data-capped network links where downloading images isn't ideal. Attached is a simple patch to mothra that changes the 'k' command to not only remove already-downloaded images from a page, but also toggle a state such that mothra won't attempt to download images on future visited sites until 'k' is toggled again. This also adds a '-k' flag to mothra which enables the flag at startup." --Jeremy O'Brien<neutral@fastmail.com> on 9fans
2018-06-27 19:20:28 +02:00
cinap_lenrek 902eceee63 ndb/dns: fix encoding of srv record target
the target has to be encoded as a domain name (the individual
name components as separate labels followed by . (empty) label),
not as a literal string.

to disable compression, pass nil dictionary to pname().
2018-06-26 19:30:52 +02:00
qwx deae5c854b mus: fix note volume and channel selection; simplify
- fix overwriting channel 10 with channel 9
- fix using channel volume instead of last volume when setting note
  (fixes d_doom and others)
- remove useless state
2018-06-26 10:35:23 +02:00
mischief 07b237b10c /sys/lib/dist/ndb/common: synchronize root servers and link to root hints source 2018-06-25 22:58:52 +00:00
cinap_lenrek 65e0e1c3e3 merge 2018-06-24 21:54:21 +02:00
cinap_lenrek 8f1eb1ac77 webfs: don't handle unknown status codes as continuations, reset status when handling continuation to avoid infinite loop 2018-06-24 21:52:17 +02:00
qwx 0da9e3a7f5 gba: handle 8bit writes to vram
ignore 8bit writes to obj and oam, and duplicate bits for bg and palette
memory, as per gbatek.

thanks aiju for helping with the implementation.
2018-06-22 14:49:18 +02:00
mischief f554155ed0 stats(8): document -z flag (thanks xcko) 2018-06-22 02:02:46 +00:00
spew 55c122d59f ape: add strnlen 2018-06-21 11:56:37 -04:00
spew 3b376b43af ape: provide bogus chroot implementation 2018-06-20 22:19:37 -04:00
cinap_lenrek 8dd003eb04 devip: fix flush, copy tag when replacing route entry 2018-06-19 21:17:15 +02:00
Alex Musolino 1de2698dc8 play(1): handle file names containing consecutive spaces 2018-06-18 13:11:03 +09:30
spew 583c6d269b ape: add some common fields for stat, grp and pwd 2018-06-17 17:38:00 -04:00
cinap_lenrek 0763dd4279 zunq: add sdram driver 2018-06-14 21:54:42 +02:00
cinap_lenrek 4971db9e32 udp: fix udp checksum
we did not apply the special case to store 0xFFFF (-0)
in the checksum field when the checksum calculation
returned zero. we survived this for v4 as RFC768 states:

> If the computed checksum is zero, it is transmitted as
> all ones (the equivalent in one's complement arithmetic).
>
> An all zero transmitted checksum value means that the
> transmitter generated no checksum (for debuging or for
> higher level protocols that don't care).

for ipv6 however, the checksum is not optional and receivers
would drop packets with a zero checksum.
2018-06-14 20:48:21 +02:00
cinap_lenrek 39fb26df70 9pc, 9pc64: make mapalloc() and mapfree() static in memory.c 2018-06-14 20:22:34 +02:00
cinap_lenrek 5c87dfb9d5 merge 2018-06-14 01:12:46 +02:00
cinap_lenrek a9a92cab48 stats: fix crash with -Y fag when window too narrow 2018-06-14 01:10:52 +02:00
cinap_lenrek 4d496b3c7a merge 2018-06-14 00:08:46 +02:00
cinap_lenrek de9141bc6d devip: don't send arp requests from null address
during dhcp, ipconfig assigns the null address :: which makes
ipforme() return Runi for any destination, which can trigger
arp resolution when we attempt to reply. so have v4local()
skip the null address and have sendarp() check the return
status of v4local(), avoing the spurious arp requests.
2018-06-14 00:07:45 +02:00
cinap_lenrek 71ce6f53a4 devip: reject incompatible multicast/interface ip address pairs for ipifcaddmulti() 2018-06-13 18:58:17 +02:00
aiju 21a221129a sysinfo: minor formatting fix 2018-06-13 16:05:31 +01:00
qwx e4b842056c emulators ui: don't drink and code 2018-06-13 14:14:25 +02:00
qwx 09c6120444 emulators ui: add option for fixed factor scaling and bound scale vertically 2018-06-13 14:05:19 +02:00
mischief 382c9ef92c stats: read cputemp as C, set scale max to 100 C 2018-06-13 11:59:14 +00:00
aiju 9fbce3b1b4 games/gb: attempt at fixing sprite priority 2018-06-13 09:52:41 +00:00
aiju 5d202d3456 games/gb: fix mbc5 register addressing (fixes warioland3 gamebreaking bug) 2018-06-13 09:26:55 +00:00
cinap_lenrek 8fdd633d57 devip: fix missing wunlock() for "ipifc not yet bound to device" case, don't create multicast entry on error 2018-06-12 20:31:39 +02:00
cinap_lenrek 55b73cbbbf ip/dhcp6d: don't drink and code 2018-06-12 19:50:04 +02:00
cinap_lenrek b9b6fcd85f ip/dhcp6d: only announce all-dhcp-servers multicast address on interface with link-local address on it 2018-06-12 19:36:31 +02:00
cinap_lenrek fca2c1cb31 /sys/src/mkfile: add libttf 2018-06-12 19:29:38 +02:00
Alex Musolino 1c862bd24e upas/nedmail: marshal(1) options -n and -8 are mutually exclusive 2018-06-12 20:04:16 +09:30
cinap_lenrek 232382bfc1 ip/dhcp6d: ignore short and from non-local source packets 2018-06-11 19:32:44 +02:00
cinap_lenrek 71402b2ea1 devip: fix use after free in ipifcremmulti()
closeconv() calls ipifcremmulti() like:

	while((mp = cv->multi) != nil)
		ipifcremmulti(cv, mp->ma, mp->ia);

so we have to defer freeing the entry after doing:

		if((lifc = iplocalonifc(ifc, ia)) != nil)
			remselfcache(f, ifc, lifc, ma);

which accesses the otherwise free'd ia and ma arguments.
2018-06-11 03:19:42 +02:00
cinap_lenrek 94f6f89ac1 devip: do not icmp reply on multicast destination 2018-06-11 03:14:28 +02:00
cinap_lenrek d497eb2d2f dhcp6d: make constants for message types, check server identifier in request, only recheck ndb every minute 2018-06-10 22:48:51 +02:00
cinap_lenrek a3f3e31b20 dhcp6d: add minimal stateless DHCPv6 server for network boot and DNS configuration 2018-06-10 22:08:57 +02:00
cinap_lenrek eed90aa0ad kernel: don't cap the minimum sleep time to TK2MS(1) for syssleep()
on HZ 100 systems like pc and pc64, the minium sleep time
was 10ms, which is quite high. the cap isnt really needed
as arch specific timerset() enforces its own limit, but on
a higher resolution.

background:

from Charles Forsyth:

I haven't really got an opinion on it. The 10ms interval was first used on
machines that were much slower.
I thought someone did set HZ to a bigger value, partly to support better
in-kernel timing. I haven't done it because I never had a need for it.
If I were doing (say) protocol implementation in user mode, I'd certainly
reconsider. Sleep itself forces at best ms granularity,
and for some applications that's too big.

initial mail from qwx raising the issue:

> Hello,
>
> I found out recently that sleep(2)'s resolution on 386 and 9front's amd64
> kernel is 10 ms rather than 1 ms.  The reason is that on those kernels,
> HZ is set to 100 rather than say 1000.  In syssleep, we get 1 tich every
> 10 ms.
>
> What is unclear is why.
>
> To paraphrase cinap_lenrek's answer to my question:
>
> In syssleep:
>                 if(ms < TK2MS(1))
>                         ms = TK2MS(1);
>                 tsleep(&up->sleep, return0, 0, ms);
>
> "TK2MS(1)" can be replaced with just "1", and the arch specific
> timerset() routine would do its own capping of the period if it's too
> small for the timer resolution, and make better decisions based on what
> the minimum timer period should be given the latency overhead of the
> given arch's interrupt handling and performance characteristics.
>
> Alternatively, HZ could be raised to 500 or 1000.
>
> It seems it's just trying to prevent excessive context switches and
> interrupts, but it seems somewhat arbitrary.  A ton of syscalls can be
> done in 1 ms, and it's the lowest we can go without changing the unit.
>
>
> What do you think?
>
> Thanks in advance,
>
> qwx
2018-06-10 19:47:21 +02:00
aiju ce9d09a965 libttf: add missing file impl.h 2018-06-09 14:55:32 +00:00
aiju 3b63c5a73f add ttfrender(1) 2018-06-09 14:34:44 +00:00
aiju db71e19005 add libttf 2018-06-09 14:33:19 +00:00
qwx 198f10bb25 snes: fix input botch 2 2018-06-09 07:12:43 +02:00