Commit graph

3981 commits

Author SHA1 Message Date
cinap_lenrek e601e1605b libsec: cleanup x509 and tlshand
- add overflow checks for newbytes(), newbits(), newints()
- remove suspicious nil check from estrdup()
- remove useless nil checks before free
2015-05-28 00:31:36 +02:00
cinap_lenrek 16bbaa2014 ape: include <sys/types.h> in <sys/wait.h> for pid_t (thanks jens staal) 2015-05-27 21:48:42 +02:00
cinap_lenrek a788f2000d libsec/x509: fix verify_signature(), digest_certinfo(), X509dump()
make digest_certinfo() return the digest length, otherwise
return -1 as an error and handle it in the callers.

pass expected digest length to verify_signature() and
check digest length from certificate! make sure we wont
run off the buffer.

fix newlines in error prints of X509dump().
2015-05-27 19:52:06 +02:00
cinap_lenrek 5f7d769a02 libsec/x509: use SHA2-256 digest algorithm instead of MD5
this implements SHA2 (224, 256, 384, 512) signature algorithms and
uses sha256WithRSAEncryption for X509req() and X509gen() instead
of oid_md5WithRSAEncryption.
2015-05-27 18:35:37 +02:00
cinap_lenrek 5ef922959a pci: map pci bars for devices with base class codes (ccrb) 0x00 and 0x0D-0x11 (thanks qeed)
there are a few more device base class codes defined 0x0D-0x11, and
qemu appears to use base class code 0x00 for some of its fake
devices.
2015-05-27 00:23:13 +02:00
cinap_lenrek d6a91e0ae4 cc: set unspecified elements to zero in local variable initializers
the compiler used to skip zero initialization when initializer
list was given not covering unspecified elements. now we zero
all non explicitely initialized elements. for example:

typedef struct F F;
struct F
{
	int a;
	int b;
	int c;
};

void
main(void)
{
	char a[16] = { 1, 2, 3 };	/* a[3..15] initialized to zero */
	F f = { .b = 1 };			/* f.a, f.c initialized to zero */
}
2015-05-26 19:25:06 +02:00
stanley lieber cfafa67640 rootstub: do not create pkg directories 2015-05-25 15:04:30 -04:00
stanley lieber 0853e2cc3b remove pkg(1): we regret the error 2015-05-25 15:03:44 -04:00
cinap_lenrek ff2e8f308d thread(2): fix prototype for threadint() and threadkillgrp() (thanks qwx!) 2015-05-25 13:03:45 +02:00
cinap_lenrek 0d87019a9b cc: handle unaligned data in = {0} local initializer
the emited code that initializes local variables did not handle
unaligned data causing stack corruption, affecting code like:

void main(void)
{
	char a[9] = {0};
}

this change will emit code that does byte stores for the unaligned
bytes and also handles small objects (<= 16 bytes) without branches.
2015-05-25 01:57:18 +02:00
mischief c727d2ae8a cdproto: /sys/log/httpd should be a directory 2015-05-20 18:25:53 -07:00
mischief a94a8a06de revert httpd log file goof 2015-05-20 18:16:54 -07:00
cinap_lenrek 890c459567 webfs: send servername in tls client hello (SNI) 2015-05-21 02:28:06 +02:00
cinap_lenrek 40360a992d libsec: implement tlsClient support for RFC6066 server name identification (SNI)
tlsClient() now can optionally send the server_name in the ClientHello
message by setting the TLSconn.serverName. This is required for some
https sites.
2015-05-21 02:26:57 +02:00
mischief a1bbf39c34 ip/httpd: fix syslog file 2015-05-20 15:38:56 -07:00
mischief 5d2253af99 libhttpd: declare hvprint 2015-05-20 15:09:34 -07:00
cinap_lenrek d8487e98c6 etherigbe: spi eeprom support (thanks echoline) 2015-05-20 09:49:27 +02:00
cinap_lenrek 6198954859 libdraw: don't loop forever when getting eof on /dev/cons in keyboard ioproc 2015-05-19 20:04:47 +02:00
cinap_lenrek 8f8c2d6779 aux/vga: dont use /proc/$pid/mem to access vga bios
using /proc/$pid/mem to access vga bios is not portable and crashes
sgi machines when aux/vga is run. instead, try /dev/realmodemem
first (provided by realemu), then #v/vgabios.
2015-05-19 14:02:02 +02:00
cinap_lenrek 041d732be7 tar, tarfs: implement longname support
this allows extracting tar archives that use longnames extension,
where the real filename is stored in a special entry with
linkflag == 'L' before the file entry. also skip longlink entries
with linkflag == 'K'.
2015-05-19 12:39:45 +02:00
cinap_lenrek 76ee4c3988 usbd: set device info for control file (see usb(3), thanks qeed) 2015-05-18 01:26:29 +02:00
cinap_lenrek c8c65f183d merge 2015-05-18 00:32:19 +02:00
cinap_lenrek 8183f0ec85 cdproto: /sys/log/pop3 2015-05-18 00:29:12 +02:00
stanley lieber 86f22d3c08 colors(1), who(1): add missing SOURCE entries 2015-05-17 12:53:05 -04:00
cinap_lenrek dfdc52ea7a libc: use Runemax instead of hardcoded 0x65536 for fmtchar check (thanks qrstuv) 2015-05-17 07:02:44 +02:00
cinap_lenrek bf74dfbc7a kbdfs: Runemax is inclusive. 2015-05-17 06:59:09 +02:00
stanley lieber 45384b0026 fortunes: What's wrong with the obvious? 2015-05-15 21:08:37 -04:00
cinap_lenrek 0d701b7759 gunzip: the extra length field (XLEN) is two bytes instead of one
example file:
https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R50f.tgz
2015-05-15 07:53:22 +02:00
cinap_lenrek 21f97338f8 tcp: fix loopback slowness issue / set tcb->mss for incoming connections (thanks David du Colombier)
David du Colombier wrote:
> The slowness issue only appears on the loopback, because
> it provides a 16384 MTU.
>
> There is an old bug in the Plan 9 TCP stack, were the TCP
> MSS doesn't take account the MTU for incoming connections.
>
> I originally fixed this issue in January 2015 for the Plan 9
> port on Google Compute Engine. On GCE, there is an unusual
> 1460 MTU.
>
> The Plan 9 TCP stack defines a default 1460 MSS corresponding
> to a 1500 MTU. Then, the MSS is fixed according to the MTU
> for outgoing connections, but not incoming connections.
>
> On GCE, this issue leads to IP fragmentation, but GCE didn't
> handle IP fragmentation properly, so the connections
> were dropped.
>
> On the loopback medium, I suppose this is the opposite issue.
> Since the TCP stack didn't fix the MSS in the incoming
> connection, the programs sent multiple small 1500 bytes
> IP packets instead of large 16384 IP packets, but I don't
> know why it leads to such a slowdown.
2015-05-14 21:09:12 +02:00
Matthew Veety 2b4a488762 fixed by fuck up 2015-05-13 00:15:18 -04:00
Matthew Veety 80845af98b removed ukill. 2015-05-13 00:11:59 -04:00
cinap_lenrek aa0a20ed6e boot/zynq: use ./boothead.$cputype to invoke helper 2015-05-13 04:22:21 +02:00
cinap_lenrek 2d564a5004 boot/zynq: add jtagload utility 2015-05-13 04:12:49 +02:00
cinap_lenrek d57f23fb87 boot/zynq: implement sdmmc boot (fat) 2015-05-13 01:07:35 +02:00
stanley lieber bc4f14e015 fortunes: Feature requests will be ignored. 2015-05-11 11:52:44 -04:00
cinap_lenrek fb9a4ac610 emmc/pmmc: make all symbols static 2015-05-11 05:27:05 +02:00
cinap_lenrek 646062da1c kernel: state errstr.h dependency for proc.acid target (fixes acid kinit() on cleaned kernel source tree) 2015-05-11 05:09:31 +02:00
cinap_lenrek 4bfd4122d9 nusb/serial: recognize aijuboard jtag interface 2015-05-11 02:34:54 +02:00
cinap_lenrek 5275d49d8f webfs: fix proxy authentication 2015-05-10 07:46:53 +02:00
cinap_lenrek 0da5888901 realemu: ignore access to CMOS/RTC address/data registers
the kernel wont allow access to i/o ports 0x70/0x71, so
ignore the access. reads return 0xFF. this fixes vesa on
lenovo e540.
2015-05-09 07:50:05 +02:00
stanley lieber 4547b5070c passwd(1): passwd no longer needs to be run on a terminal; netkey is more stubborn. 2015-05-03 17:37:54 -04:00
stanley lieber bafadebc19 audio(1): explain mp3enc wants raw data in the opposite byte order to /dev/audio (thanks, eekee) 2015-05-01 14:03:29 -04:00
stanley lieber 14ebbcb75b audio(1): fix example 2015-05-01 12:05:30 -04:00
cinap_lenrek 35c9648ee1 pass Ureg* argument to note handler in R0 register on arm
userspace note handlers, like any function, expect ther
first argument in R0 register on arm.
2015-04-30 16:29:40 +02:00
cinap_lenrek 12bb7bcfff libsec: remove aesCTRencrypt()/aesCTRdecrypt() (thanks mischief and qrstuv)
as mischief and qrstuv point out, these functions are not very usefull
and are even implemented wrong (incrementCTR()), so deleting the code.
2015-04-29 02:58:10 +02:00
cinap_lenrek e9c9ea4235 sam: don't make scroll-wheel-up change focus (thanks clsmith) 2015-04-28 19:32:21 +02:00
cinap_lenrek da689241d0 sam: prevent array overflow with multiple -i and -a arguments (thanks clsmith) 2015-04-28 19:30:52 +02:00
cinap_lenrek e20d7c4aad etheriwl: make rxon() static (thanks aap) 2015-04-27 21:32:17 +02:00
cinap_lenrek 64849ab5f3 etheriwl: check the bluetooth co-existance errors (thanks qeed) 2015-04-26 18:02:49 +02:00
cinap_lenrek e10287042e etheriwl: support for Centrino Wireless-N 2230 from freebsd driver (thanks qeed)
big thanks to qeed for porting support for Wireless-N 2230 from
freebsd driver!
2015-04-24 04:13:19 +02:00