Commit graph

5813 commits

Author SHA1 Message Date
cinap_lenrek
3a7146f8bf stub(8): remove reference to sshnet 2017-01-13 19:15:50 +01:00
cinap_lenrek
19668882ee authsrv(6): remove reference to ssh(1) 2017-01-13 19:13:48 +01:00
cinap_lenrek
39e4bbcfb0 srv(4): remove ssh/sshsrv references 2017-01-13 19:02:39 +01:00
khm
dc8c7bf2b7 ssh: R.I.P. 2017-01-12 16:36:38 -08:00
cinap_lenrek
cb1555c7d7 sgi: change definition of tas() to take void* like the rest 2017-01-12 21:11:34 +01:00
cinap_lenrek
bdc1b187c4 merge 2017-01-12 20:17:52 +01:00
cinap_lenrek
2e23780d2f libsec: implement extended 192-bit nonce xchacha variant and hchacha function 2017-01-12 20:16:38 +01:00
cinap_lenrek
47f07b2669 kernel: make the mntcache robust against fileserver like fossil that do not change the qid.vers on wstat
introducing new ctrunc() function that invalidates any caches
for the passed in chan, invoked when handling wstat with a
specified file length or on file creation/truncation.

test program to reproduce the problem:

#include <u.h>
#include <libc.h>
#include <libsec.h>

void
main(int argc, char *argv[])
{
	int fd;
	Dir *d, nd;

	fd = create("xxx", ORDWR, 0666);
	write(fd, "1234", 4);
	d = dirstat("xxx");
	assert(d->length == 4);
	nulldir(&nd);
	nd.length = 0;
	dirwstat("xxx", &nd);
	d = dirstat("xxx");
	assert(d->length == 0);
	fd = open("xxx", OREAD);
	assert(read(fd, (void*)&d, 4) == 0);
}
2017-01-12 20:13:20 +01:00
cinap_lenrek
4aeefba681 kernel: add "close" ctl message for tcp connection to gracefully hang up a connection without a tcp reset (used by go) 2017-01-12 20:04:41 +01:00
spew
a0cc369c15 games/mix: Add Knuth MIX emulator/assembler 2017-01-10 11:42:11 -06:00
cinap_lenrek
c67d0c699f 6c: reverse register allocation order to avoid having to spill AX,DX and CX
allocating AX,CX,DX last improves 64-bit multiplication-add
chains like a*b + c*d as the multiplication does not need to save
and restore AX and DX registers in most cases. reserving CX for
shifts also helps.
2017-01-08 17:41:10 +01:00
cinap_lenrek
28089ee035 aux/data2s: compress output
encode printable characters litteraly, use D() macro to
reduce DATA instruction overhead.

this halves the time spend assembling $CONF.root.s for
the kernel build.
2017-01-07 20:36:13 +01:00
cinap_lenrek
df6c190831 cfs: fix cfsctl interaction with mount cache (mount -C flag)
the root fileserver is mounted with the mount cache enabled
causing the contents of the cfsctl file to be cached as well
leading to wrong results. so after we generated the new stat
buffer, we increment the qid.vers so the cache starts out
clean.
2017-01-06 02:54:26 +01:00
cinap_lenrek
19dc7c2097 6c, 8c: fix "DI botch" evacuating DI/SI/CX registers to ".save" variables 2017-01-02 05:49:18 +01:00
cinap_lenrek
8547defe70 vgaigfx: enable softscreen by default
given that the igfx driver doesnt provide any acceleration functions
and drawing is usually faster with double buffering as it eleminates
reads over the pci bus, enable softscreen by default.
2016-12-29 03:46:08 +01:00
cinap_lenrek
9e95cb1ac9 samterm: avoid flushimage when theres nothing new to flush 2016-12-28 23:42:56 +01:00
cinap_lenrek
45512020d2 libmp: avoid temporary buffer allocation in mprand() 2016-12-28 18:19:52 +01:00
cinap_lenrek
7755561ae1 fplot: fix zoom egetrect check (thanks qu7uux) 2016-12-28 02:09:33 +01:00
cinap_lenrek
74f62ca21b fplot: parse negative numbers in argument to -r option (thanks qu7uux) 2016-12-28 02:08:45 +01:00
cinap_lenrek
ed9fdc72f5 libsec: replace des based X9.17 genrandom() with chacha random number generator 2016-12-28 02:02:00 +01:00
cinap_lenrek
84228515b6 keyfs: print error message when reading /adm/keys fails 2016-12-26 19:48:38 +01:00
cinap_lenrek
c5e9083558 cdproto: explicitely create /$objtype/bin subdirectories for all archs 2016-12-25 02:13:17 +01:00
spew
ff384cbddc libavl: fix manpage example, minor improvement to code 2016-12-24 17:58:31 -06:00
spew
6187b862b7 avl: fix man page example 2016-12-22 18:44:45 -06:00
spew
0885ed1e80 alv(2): new avl implementation 2016-12-22 16:47:41 -06:00
cinap_lenrek
3bf89ed825 auth/as: simplify further 2016-12-22 21:55:56 +01:00
cinap_lenrek
82bf19941e auth/as, auth/none, auth/newns: consistent handling of command arguments, cleanup 2016-12-22 21:39:59 +01:00
cinap_lenrek
640adc8f82 merge 2016-12-22 01:59:00 +01:00
cinap_lenrek
1ebcdca4ba libauth: don't attempt to mount when opening mount srv file fails in nsop()
making newnsdebug error messages more usefull...
2016-12-22 01:56:19 +01:00
aiju
a37a13074c mpxor: sign should be 1/-1, not 0/-1 2016-12-20 18:33:58 +01:00
cinap_lenrek
cd15849bf2 rcpu: avoid filedescriptor conflict with <{} (thanks mycroftiv)
the rcpu client dup's fd 0,1,2 to fd 10,11,12 which
can accidentally override the pipe file descriptor
allocated by the <{} operator. to avoid this problem,
we generate the remote script as an /env file in a
separate step now.
2016-12-19 19:05:35 +01:00
cinap_lenrek
4f72cda4ac awk: improve random number generation
don't use rand() and scale it to 0..1, instead call
native frand() which produces uniform random number.

instead of seeding the rng with time(0), use truerand().
2016-12-18 18:00:45 +01:00
cinap_lenrek
2830cd7eb6 pc: modify cpu0 page tables in patwc() instead of current cpu ones
on 386 kernel, each processor has its own pdb where the primary
pdb for kernel mappings is on cpu0 and other cpu's lazily pull
pdb entries from cpu0 when they fault in vmapsync().

so we have to edit the table tables in the pdb of cpu0 and not
the current processor.
2016-12-17 19:47:35 +01:00
cinap_lenrek
ea30cf94a5 pat write combinding support for 386 kernel, honor cpuid bits 2016-12-17 16:35:26 +01:00
cinap_lenrek
d48a089486 pc64: implement simple write combining for framebuffers with the PAT
on some modern machines like the x250, the bios arranges the mtrr's
and the framebuffer membar in a way that doesnt allow us to mark
the framebuffer pages as write combining, leading to slow graphics.

since the pentium III, the processor interprets the page table bit
combinations of the WT, CD and bit7 bits as an index into the
page attribute table (PAT).

to not change the semantics of the WT and CD bits, we preserve
the bit patterns 0-3 and use the last entry 7 for write combining.
(done in mmuinit() for each core).

the new patwc() function takes virtual address range and changes
the page table marking the range as write combining. no attempt
is made on invalidating tlb's. doesnt matter in our case as the
following mtrr() call in screen.c does it for us.
2016-12-15 23:27:01 +01:00
cinap_lenrek
f3b5bcffce acid: fix y.tab.h dependency for proc.$O 2016-12-15 22:08:57 +01:00
cinap_lenrek
052abe1cc8 xen: fix build by adding missing rdrandbuf() function 2016-12-14 20:02:07 +01:00
cinap_lenrek
6cbc226351 vncs: update devmouse code 2016-12-11 16:53:51 +01:00
cinap_lenrek
5cc1cb1820 vnc: don't prompt for password on auth_respond() failure 2016-12-11 16:52:38 +01:00
cinap_lenrek
5d353d62fe devmouse: remove unused static map[] array 2016-12-11 16:02:30 +01:00
cinap_lenrek
b3c1fa9ecf devmouse: change msec argument of *mousetrack() to ulong 2016-12-10 16:12:18 +01:00
cinap_lenrek
7a145e89b3 audioac97: support for ICH4-ICH7 based cards with memory mapped registers (thanks echoline) 2016-12-05 18:32:58 +01:00
cinap_lenrek
978628d679 tcp17019: make service proto and netdir arguments optional (for aux/listen1)
this allows /rc/bin/service/tcp17019 to be called from
aux/listen1 without arguments like:

aux/listen1 tcp!*!rcpu /rc/bin/service/tcp17019
2016-12-03 00:24:19 +01:00
cinap_lenrek
9a55346264 devmouse: various bugfixes, simplify
the assumption of only one producer ((abs)moustratrack()) is not true
for external mouse events from /dev/mousein, so protect the mouse state
and queue with ilock().

get rid of mousecreate(), just use devcreate().

reset cursor when all instances of /dev/mouse and /dev/cursor got closed,
instead of also considering /dev/mousectl. the reason is that kbdfs keeps
the mousectl file open. so exiting a program that has the cursor changed
will properly reset the cursor to arrow.

don't access user buffer while holding cursor spinlock! the memory access
can fault. theres also no lock needed there, we'r just copying *from* the
cursor memory.

fix use of strtol(), p will always be set, check for end of string.

keep pointer coordinates onscreen (off by one).

make lastms() function to get the last millisecond delta of last
call for resynchronization.

fix msg[3] buffer overflow in m5mouseputc().

get rid of mouseshifted logic, it is not used.
2016-11-29 21:11:48 +01:00
cinap_lenrek
3dc64de2e4 omap: cleanup mouse.c, just a dummy for mousectl() 2016-11-29 20:54:17 +01:00
cinap_lenrek
807019d6eb omap: fix format string warning %d for long 2016-11-29 20:51:08 +01:00
cinap_lenrek
6d42467411 stdio: fix sclose() buffer overrun when terminating string, realloc() error handling (thanks porlock)
theres a bug is in sclose() where it doesnt check if wp is beyond
the buffer. also wp was not updated after realloc().

bug was reported by porlock on 9fans:

Plan 9's implementation of the standard C functions snprintf and
vsnprintf have a buffer overrun bug.

If the buffer length equals the output length (without the terminating
null), then one too many characters is written to the buffer.

For example,
              snprintf(buf, 4, "ABCD");

will write 5 characters to buf.
2016-11-27 21:20:27 +01:00
cinap_lenrek
0edcb33ca1 merge 2016-11-19 16:47:21 +01:00
cinap_lenrek
93f122b94a link loopbackmedium and netdevmedium in bcm/pif, sgi/indy and zynq kernels 2016-11-19 16:45:18 +01:00
ftrvxmtrx
ee9b0eef89 libavl, libregexp: put debug functions back 2016-11-17 23:07:54 +01:00