Commit graph

5644 commits

Author SHA1 Message Date
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
ftrvxmtrx ed76659c05 /sys/src/lib*: clean up 2016-11-17 22:58:16 +01:00
cinap_lenrek 28f4567ba6 libmemdraw: cleanup fillpoly(), remove unused fillcolor hack 2016-11-17 20:10:07 +01:00
cinap_lenrek 6fc0e0541c libsec: remove unused get32() function 2016-11-17 19:54:13 +01:00
cinap_lenrek b4db73795e libmemdraw: remove unused static drawbuf variables and ptrfn() declaration 2016-11-17 19:42:12 +01:00
cinap_lenrek dd4de0b0fa devtls: remove unused get32() function 2016-11-17 18:14:06 +01:00
ftrvxmtrx 0930f44feb cmd: remove a bit of unused stuff 2016-11-17 02:59:40 +01:00
ftrvxmtrx c0d0f86b14 tar: remove unused variable 2016-11-17 02:14:59 +01:00
ftrvxmtrx e49f163ef3 clock: remove unused variable 2016-11-17 02:12:49 +01:00
ftrvxmtrx 4c0c82d6f7 page: remove unused variables 2016-11-17 02:11:35 +01:00
ftrvxmtrx ec32701973 ramfs: remove unused variable 2016-11-17 02:09:57 +01:00
ftrvxmtrx 4195e1a54e aan: didn't ask about sendcommand 2016-11-17 02:07:52 +01:00
ftrvxmtrx 8f221cfec1 libsec: remove unused aes_setupDec 2016-11-17 02:02:32 +01:00
cinap_lenrek 1a782fda3e pc64: check if vmap() range fits in VMAPLEN window, remove unneeded vmapsync(), rename fault386() to faultamd64() 2016-11-17 01:28:11 +01:00
cinap_lenrek 78d2a52577 ip/tcp: never raise the mss over the link mtu < 1280 for v6
v6 mandates minimum mtu of 1280, tho someone *could* setup
an interface with a lower mtu or set it lower for testing.
2016-11-16 00:54:04 +01:00
cinap_lenrek 323d625864 ip: get rid of update_mtucache() and restrict_mtu() prototypes 2016-11-15 22:13:08 +01:00
cinap_lenrek 30c5c3404b ip/pktmedium: no mintu, no maclen... thi is ip packets 2016-11-15 22:11:47 +01:00
cinap_lenrek 3579757291 ip/pktmedium: fix wrong hsize, theres no ethernet header on packet media
packet media is just raw ip packets, so theres no link-level
header there. was probably copy-pasted from ethermedium...
2016-11-15 21:54:03 +01:00
cinap_lenrek 1f628ef132 ip/tcp: only calculae mss from interface mtu when directly reachable for v6
we currently do not implement path mtu discovery so for
destinations that are not directly reachable assume the
minimum mtu of 1280 bytes.
2016-11-15 20:28:45 +01:00
cinap_lenrek fdc8187038 nusb/ether: support for "bridge" ctl message 2016-11-12 23:11:03 +01:00