Commit graph

5289 commits

Author SHA1 Message Date
cinap_lenrek 45f3c56a53 ape: removing openssl 2016-04-11 20:39:12 +02:00
cinap_lenrek 4e04698ab6 python: remove openssl support, use ape/libsec for cryptographics hash functions 2016-04-11 20:31:14 +02:00
cinap_lenrek 8f4db30e78 gs: replace openssl aes implementation with ape/libsec 2016-04-11 20:27:50 +02:00
cinap_lenrek 464763202b ape: add libauth, libbio, libmp and libsec as replacements for openssl 2016-04-11 20:23:34 +02:00
cinap_lenrek 21aee5d8cb hg: create system wide /sys/lib/hgrc to enabled hgwebfs extension
the openssl we currently use is outdated and will be removed
soon. webfs will handle the https for us with native tls code.
keys have to be stored in factotum for everyone who also wants
to commit directly.
2016-04-10 20:39:10 +02:00
cinap_lenrek d71cf7ff1b libauth: remove unneeded includes for authsrv.h, avoid pulling in dependency for rerrstr() 2016-04-10 20:24:20 +02:00
cinap_lenrek 44cbb29308 libsec: make #include headers consistent 2016-04-10 20:23:18 +02:00
cinap_lenrek c3c726a5d0 libsec: dont use mips assembly routines for spim, wrong endianess 2016-04-10 20:22:00 +02:00
cinap_lenrek 1069d018c9 libmp: fix build for spim, reduce by the mips assembly files 2016-04-10 20:20:53 +02:00
cinap_lenrek 0ac4a447b0 hg: set mercurial.url.has_https when hgwebfs extension is in use
this allows the use of SSL/HTTPS even when python is not build
with openssl support.
2016-04-10 20:18:21 +02:00
cinap_lenrek 3238f124b8 ape: move compatibility libc.h to lib9 directory and incooperate needed functions for ape/mp (wip) 2016-04-10 03:01:37 +02:00
cinap_lenrek ea6910b706 ape: remove broken 9errstr.c 2016-04-10 02:54:29 +02:00
cinap_lenrek 5e37087451 ape: add internal _NSEC() function and make gettimeofday() use it 2016-04-10 02:52:31 +02:00
cinap_lenrek 3ba1197aeb libmp: make includes consistent, make test program compile under ape (work in progress) 2016-04-10 02:35:01 +02:00
cinap_lenrek b47c096c8c libdraw: dont postnote to pid==0 in ekill() 2016-04-10 00:00:37 +02:00
cinap_lenrek 4915447b1f merge 2016-04-09 21:29:11 +02:00
cinap_lenrek 5f28fee620 add missing target for antiword in /sys/src/cmd/aux/mkfile (thanks _sl) 2016-04-09 21:27:25 +02:00
aiju e558c88821 aes(2): mention aesCBC bug 2016-04-09 20:51:24 +02:00
cinap_lenrek c53d521508 listen(8): fix html rendering 2016-04-08 22:00:16 +02:00
cinap_lenrek 225a80cf61 listen(8): document tcp17019 rcpu service 2016-04-08 21:53:48 +02:00
cinap_lenrek 67acf2449f tls(3): document support for TLSv1.1 and TLSv1.2 2016-04-08 21:20:15 +02:00
cinap_lenrek 9408c5faa1 qball(2): fix bad manpage reference 2016-04-07 21:51:56 +02:00
cinap_lenrek e98144a29c devstream(3): removed 2016-04-07 21:51:32 +02:00
cinap_lenrek acfd092987 ether82563: initial i217 support from http://www.9legacy.org/9legacy/patch/pc-ether82563-i210.diff (thanks k0ga)
This patch is only an adaptation for 9front of the patch located in
http://www.9legacy.org/9legacy/patch/pc-ether82563-i210.diff.  The
major difference is that this patch ignores errors in checksum of
eeprom, because in my system the checksum was wrong.  After 3 months,
I didn't have problems, and I think the patch can be used.  although
it has some things that need to be fixed.  If the link is inactive
when the system boots then it will remain inactive forever.
2016-04-07 21:24:13 +02:00
cinap_lenrek 1e821d82f2 tcp567: run authserver with p9sk1 tickets disabled preventing offline password brute-force 2016-04-07 21:19:48 +02:00
BurnZeZ 455a0a09ac jpg: fd == 0 is valid, so don't ignore it 2016-04-06 20:22:42 -04:00
cinap_lenrek 796e7b84bd libdraw: fix out of bounds memory access after subfont array reallocation (thanks ray)
/n/bugs/open/libdrawfont.c_buffer_overflow
http://bugs.9front.org/open/libdrawfont.c_buffer_overflow/readme

ray@raylai.com

Hi all,

In plan9port this bug keeps crashing mc when I run lc in a directory with Chinese characters. This is a diff from OpenBSD but it should apply cleanly to the various plan9 sources.

The code is basically trying to do a realloc (I guess realloc wasn't available back then?) but it copies too much from the original buffer.

Since realloc is available, just use it. If realloc isn't available outside plan9port (I haven't checked) the memmove line should be changed from:
	memmove(f->subf, of, (f->nsubf+DSUBF)*sizeof *subf);
to:
	memmove(f->subf, of, f->nsubf*sizeof *subf);

I hope this is helpful.

Ray
2016-04-05 11:24:07 +02:00
cinap_lenrek a74542613d rio: /dev/kbd cleanup
- use free running unsigned indeces for window kbdq
- emalloc() vs malloc() in xfid
2016-04-04 06:47:26 +02:00
cinap_lenrek 84e16f5b5c kbdfs(8): document new /dev/kbd behaviour 2016-04-03 23:16:08 +02:00
cinap_lenrek ce84082205 change /dev/kbd to return multiple messages per read 2016-04-03 22:54:22 +02:00
cinap_lenrek cd9cddf3dd mercurial: CVE-2016-3630
backported the following patches from mercurial 3.7.3:

https://selenic.com/repo/hg/rev/b6ed2505d6cf
https://selenic.com/repo/hg/rev/b9714d958e89
2016-04-03 04:04:56 +02:00
cinap_lenrek 0237b58390 kernel: always clunk closed fids asynchronously, regardless of caching 2016-04-01 14:12:50 +02:00
cinap_lenrek e93f7885da 6in4: ingress filter multicast and link-local, but allow relay traffic 2016-03-31 23:53:10 +02:00
cinap_lenrek 137533bd69 6in4: allow setting the local IPv4 address with -i flag (thanks k0ga) 2016-03-31 20:35:02 +02:00
stanley lieber eed13a5c22 9fs: bind -b /n/9front.org!7734 /n/lists 2016-03-31 14:15:45 -04:00
cinap_lenrek df53b2d69b kernel: remove unused NSMAX, NSLOG, NSCACHE constants from portdat.h 2016-03-31 04:23:27 +02:00
stanley lieber bd9b5f065f fortunes: Ah, nice. the woodpeckers are back. 2016-03-30 21:14:39 -04:00
cinap_lenrek 1057a859b8 devsegment: cleanups
- return distinct error message when attempting to create Globalseg with physseg name
- copy directory name to up->genbuf so it stays valid after we unlock(&glogalseglock)
- cleanup wstat() handling, allow changing uid
- make sure global segment size is below SEGMAXSIZE
- move isoverlap() check from globalsegattach() into segattach()
- remove Proc* argument from globalsegattach(), segattach() and isoverlap()
- make Physseg.attr and segattach attr parameter an int for consistency
2016-03-30 22:49:13 +02:00
cinap_lenrek f846721035 bullshit: +progressive +enhancement 2016-03-30 02:36:33 +02:00
cinap_lenrek b4e7d8fbf3 zynq: cleanup devarch, flushmmu() after procflushpsecg() 2016-03-29 05:06:32 +02:00
cinap_lenrek e6b30b287c kernel: fix procflushmmu()
fix bug introduced in previous change for zynq, broke
procflushseg() function only flushing the first proc
matching the segment.
2016-03-29 02:09:49 +02:00
cinap_lenrek ce00c68059 kernel: print pid as %lud instead %lux (in tsleep() debug print) 2016-03-28 23:01:54 +02:00
cinap_lenrek fd9560d7d8 libsec: fix tlsid for TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
the previous cipher id's where fore TLS_ECDH_* not TLS_ECDHE_*... sorry :(
2016-03-28 21:58:37 +02:00
cinap_lenrek 89f9966aed devtls: print the path of the underlying chan in status file
to figure out what network connection a particular tls
conversation refers to, we add the path of the underlying
we send the encrypted tls traffic over in the status file,
example:

term% grep -n '^Chan:' '#a'/tls/*/status
#a/tls/0/status:7: Chan: /net/tcp/6/data
#a/tls/1/status:7: Chan: /net/tcp/0/data
2016-03-28 20:12:54 +02:00
cinap_lenrek 38a8af2d72 devip: applying changes for bug: multicasts_and_udp_buffers
/n/bugs/open/multicasts_and_udp_buffers
http://bugs.9front.org/open/multicasts_and_udp_buffers/readme

michal@Lnet.pl

I have ported my small MPEG-TS analisis tool to Plan9.

To allow this application working I had to fix a bug in the kernel IPv4 code and increase UDP input buffer.

Bug is related to listening for IPv4 multicast traffic. There is no problem if you listen for only one group or multiple groups with different UDP ports. This works:

Write to UDP ctl:

anounce PORT
addmulti INTERFACE_ADDR MULTICAST_ADDR
headers

and you can read packets from data file.

You need to set headers option because otherwise every UDP packet for MULTICAST_ADDR!PORT is treat as separate connection. This is a bug and should be fixed too, but I didn't tried it.

There is a problem when you need to receive packets for multiple multicast groups. Usually the same destination port is used by multiple streams and above sequence of commands fails for second group because the port is the same.

Simple and probably non-intrusive fix is adding "|| ipismulticast(addr)" to if statement at /sys/src/9/ip/devip.c:861 line:

if(ipforme(c->p->f, addr) || ipismulticast(addr))

This fixes the problem and now you can use the following sequence to listen for multiple multicast groups even if they all have the same destination port:

announce MULTICAST_ADDR!PORT
addmulti INTERFACE_ADDR MULTICAST_ADDR
headers

After that my application started working but signals packet drops at >2 Mb/s input rate. The same is reported by kernel netlog. Increase capacity of UDP connection input queue fixes this problem /sys/src/9/ip/udp.c:153

c->rq = qopen(512*1024, Qmsg, 0, 0);

--
Michał Derkacz
2016-03-28 16:58:09 +02:00
cinap_lenrek 04c3a6f66e zynq: introduce SG_FAULT to prevent access to AXI segment while PL is not ready
access to the axi segment hangs the machine when the fpga
is not programmed yet. to prevent access, we introduce a
new SG_FAULT flag, that when set on the Segment.type or
Physseg.attr, causes the fault handler to immidiately
return with an error (as if the segment would not be mapped).

during programming, we temporarily set the SG_FAULT flag
on the axi physseg, flush all processes tlb's that have
the segment mapped and when programming is done, we clear
the flag again.
2016-03-27 20:57:01 +02:00
cinap_lenrek bf2195b88c file: deal with negative coordinates in plan9 bitmaps, print image size 2016-03-27 16:38:39 +02:00
cinap_lenrek 9aa6573359 kernel: fix tsleep()/twakeup()/tsemacquire() race
tsleep() used to cancel the timer with:

if(up->tt != nil)
	timerdel(up);

which still can result in twakeup() to fire after tsleep()
returns (because we set Timer.tt to nil *before* we call the tfn).
in most cases, this is not an issue as the Rendez*
usually is just &up->sleep, but when it is dynamically allocated
or on the stack like in tsemacquire(), twakeup() will call
wakeup() on a potentially garbage Rendez structure!

to fix the race, we execute the wakup() with the Timer lock
held, and set p->trend to nil only after we called wakeup().

that way, the timerdel(); which unconditionally locks the Timer;
can act as a proper barrier and use up->trend == nil as the
condition if the timer has already fired.
2016-03-26 02:37:42 +01:00
cinap_lenrek 5c95c50c6c rio: flushimage() before wscrsleep() 2016-03-23 20:17:58 +01:00
cinap_lenrek e7bc98b057 devtls: zero secret information before freeing, cleanup 2016-03-23 13:50:58 +01:00