Commit graph

5759 commits

Author SHA1 Message Date
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
cinap_lenrek c86b5ddaa6 kernel/qio: make readblist() offset of type ulong as the rest 2016-11-12 17:41:58 +01:00
cinap_lenrek 2127b8c552 kernel/qio: get rid of unused qcopycnt debug variable 2016-11-12 16:05:00 +01:00
cinap_lenrek d2ad8df947 kernel/qio: implement concatblock() with pullupblock() 2016-11-09 19:44:38 +01:00
cinap_lenrek d97eb114d5 kernel/ip: fix typo (rfc -> ifc) 2016-11-08 22:33:48 +01:00
cinap_lenrek ba38aa8b9d gre: check nil for pullupblock() 2016-11-08 22:33:19 +01:00
cinap_lenrek 58fe71b2f5 devbridge: simplify etherwrite() as we dont deal with block lists 2016-11-08 21:06:06 +01:00
cinap_lenrek 99cc56f2e9 kernel/ip: remove nil checks for allocb() and padblock() 2016-11-08 21:05:01 +01:00
cinap_lenrek 5cbffd6e6b kernel/qio: maintain Block.next pointer in padblock() 2016-11-08 21:03:08 +01:00
cinap_lenrek 8f782ac916 srv(4): add SOURCE for srvtls 2016-11-08 02:10:47 +01:00
cinap_lenrek b431b6c169 kernel/qio: fix comments, fix qiwrite() on close queue, remove debug setmalloctag() call in qwrite() 2016-11-08 00:38:07 +01:00
cinap_lenrek 32dfbc7c50 devcons: simplify putstrn0() 2016-11-08 00:34:59 +01:00
cinap_lenrek 48b49361d8 devbridge: various bugfixes and improvements from charles forsyth 2016-11-07 22:43:37 +01:00
cinap_lenrek a54d1cd95e kernel/qio: big cleanup of qio functions
remove bl2mem(), it is broken. a fault while copying to memory
yields a partially freed block list. it can be simply replaced
by readblist() and freeblist(), which we also use for qcopy()
now.

remove mem2bl(), and handle putting back remainer from a short
read internally (splitblock()) avoiding the releasing and re-
acquiering of the ilock.

always attempt to free blocks outside of the ilock.

have qaddlist() return the number of bytes enqueued, which
avoids walking the block list twice.
2016-11-07 22:20:10 +01:00
cinap_lenrek 23d217afb4 devloopback: simplify loopoput()
remove unneeded waserror() block, loopoput is alled from
loopbackbwrite only so we will always get called with a
*single* block, so the concatblock() is not needed.
2016-11-07 22:08:21 +01:00
cinap_lenrek 857f2528e0 ip: always pass a single block to Medium.bwrite(), avoid concatblock() calls in Dev.bwrite()
the convention for Dev.bwrite() is that it accepts a *single* block,
and not a block chain. so we never have concatblock here.

to keep stuff consistent, we also guarantee thet Medium.bwrite()
will get a *single* block passed as well, as the callers are
few in number.
2016-11-07 22:05:29 +01:00
cinap_lenrek ea993877a9 ip/nullmedium: free passed block in nullbwrite() 2016-11-07 21:40:12 +01:00
cinap_lenrek 59dd0af53a ip/tcp: remove useless nil checks for padblock() and allocb() return value 2016-11-07 21:39:28 +01:00
cinap_lenrek c1fd7c210b kernel: fix missing ; in panic() call 2016-11-05 20:08:20 +01:00
cinap_lenrek 963497f06b kernel: avoid padblock copying for devtls/devssl/esp, cleanup debugging
to avoid copying in padblock() when adding cryptographics macs to a block
in devtls/devssl/esp we reserve 16 extra bytes to the allocation.

remove qio ixsummary() function and add acid function qiostats() to
/sys/lib/acid/kernel

simplify iallocb(), remove iallocsummary() statitics.
2016-11-05 20:05:40 +01:00
cinap_lenrek 240590ab0a archacpi: fix format string warning on amd64 2016-11-05 18:31:50 +01:00
cinap_lenrek fa5bd71218 devmnt: avoid memory copies of I/O rpc buffer by using bwrite()
given that devmnt will almost always write into a pipe
or a network connection, which supports te bwrite routine,
we can avoid the memory copy that would have been done by
devbwrite(). this also means the i/o buffer for writes
will get freed sooner without having to wait for the 9p
rpc to get a response, saving memory.

theres one case where we have to keep the rpc arround and
that is when we write to a cached file, as we want to update
the cache with the data that was written, but the user buffer
cannot be trusted to stay the same during the rpc.
2016-11-05 18:26:12 +01:00
cinap_lenrek 5c1feb0ef0 libc: move calloc() into its own compilation unit
move calloc() in its own compilation unit to avoid
code duplication. also, calloc() is used rarely in
plan9 programs.
2016-11-05 18:00:10 +01:00
cinap_lenrek bf9bada0c2 winwatch: put previous label contents in edit buffer for relabling 2016-11-01 09:50:25 +01:00
cinap_lenrek 95609d520e 8c: fix double compiling FNX complex lvalue in cgen64()
sugen() calls cgen64() speculatively so that when cgen64() returns
zero, it will fall back and compile 64-bit copy.

the bug was that cgen64() compiled the left hand side and then recursively
called cgen64() again, which didnt handle the memory copy so it returned
zero and sugen() would compile the left hand side again resulting in two
function calls being emited.

some code that reproduced the issue:

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

typedef struct
{
	char x[10];
	vlong a;
} X;

X a;
X *f(void) { return &a; }

void
main(int argc, char *argv[])
{
	f()->a = a.a;
}

producing:

TEXT	f+0(SB),0,$0
	MOVL	$a+0(SB),AX
	RET	,
	RET	,
	TEXT	main+0(SB),0,$0
	CALL	,f+0(SB)
	CALL	,f+0(SB)			<- bug
	MOVL	AX,CX
	LEAL	a+12(SB),DX
	MOVL	(DX),AX
	MOVL	AX,12(CX)
	MOVL	4(DX),AX
	MOVL	AX,16(CX)
	RET	,
	GLOBL	a+0(SB),$20
	END	,
2016-10-30 23:30:13 +01:00
cinap_lenrek 62d3108646 ape/libsec: add secp384r1 curve parameters for tls 2016-10-30 20:32:03 +01:00
cinap_lenrek ef8cbbba03 merge 2016-10-30 02:17:12 +01:00
cinap_lenrek c9d55cadb3 libsec: add secp384r1 curve parameters for tls 2016-10-30 02:15:40 +01:00
spew cf5d24033d winwatch: no more 'l' key labeling 2016-10-26 14:01:13 -05:00
spew d5992857bb winwatch: middle mouse button click also prompts for label 2016-10-25 22:53:38 -05:00
ftrvxmtrx 7b8c6ae432 stats: alternatively read battery and temp from aux/acpi 2016-10-24 23:51:16 +02:00
ftrvxmtrx 1f3600c83f aux/acpi: make it stats(8)-friendly 2016-10-24 23:50:04 +02:00
cinap_lenrek 234137bce3 fix bugs and cleanup cryptsetup code
devfs:

- fix memory leak in devfs leaking the aes key
- allocate aes-xts cipher state in secure memory
- actually check if the hexkey got fully parsed

cryptsetup:

- get rid of stupid "type YES" prompt
- use genrandom() to generate salts and keys
- rewrite cryptsetup to use common pbkdf2 and readcons routines
- fix alot of error handling and simplify the code
- move cryptsetup command to disk/cryptsetup
- update cryptsetup(8) manual page
2016-10-24 20:56:11 +02:00
cinap_lenrek f3feafc476 auth/factotum: bound the number of srv processes to 16, error the 9p rpc when it is over limit 2016-10-23 17:18:35 +02:00
cinap_lenrek b728f50a79 lib9p: limit the number of srv processes kept arround 8 2016-10-23 17:16:22 +02:00
cinap_lenrek 98dba9a4a3 pc/archacpi: don't do acpi initialization in the kernel, provide generic acpimem routines
get rid of _INI and _REG method calls, this is not full acpi environment
anyway and all we really want todo at kernel boot time is figuring out
the interrupt routing. aux/acpi can try to enable more stuff if it needs
to later when battery status desired.

dont snoop memory space regions in amlmapio(), this is just wrong as
amlmapio() is *lazily* mapping regions as they are accessed, so the
range table would never be really complete. instead, we provide generic
access to the physical address space, excluding kernel and user memory
with acpimem file.
2016-10-23 04:09:27 +02:00