Commit graph

2158 commits

Author SHA1 Message Date
cinap_lenrek
b6dc4ba5a4 ape: initial IPv6 support, inet_pton()/inet_ntop(), getaddrinfo()/getnameinfo() 2013-03-31 18:52:45 +02:00
cinap_lenrek
9c7e1db701 ape: define FD_SETSIZE for select() 2013-03-31 18:46:14 +02:00
ppatience0
eddc8dea86 merge 2013-03-30 22:52:30 -04:00
ppatience0
c70c20de12 ether82563: add untested devices from OpenBSD's em(4) Intel driver. also update some names according to OpenBSD's driver (previously added device, 0x10c0, is also from OpenBSD's driver). 2013-03-30 22:50:48 -04:00
cinap_lenrek
c97a0268f3 ape: fix potential double close in socket() and protect rock chain with spinlock 2013-03-29 20:49:49 +01:00
ppatience0
10987d2dc7 ether82563: add 82562V-2 did 2013-03-24 01:51:43 -04:00
stanley lieber
c8cba84e3e fortunes: Now reboot twice[1]. 2013-03-24 19:49:02 -04:00
cinap_lenrek
b9214d6662 wifi: cleanup
cleanup wifiencrypt()/wifidecrypt() routines moving tkip
and ccmp in separate routines so we dont use less stack
space.
2013-03-24 21:59:47 +01:00
cinap_lenrek
33d00fce10 wpa(8) document -1 and -2 options 2013-03-24 02:30:11 +01:00
cinap_lenrek
34e46d0837 wpa: fix rsc for wpa2
in wpa2, the rsc field of the eapol message3 is the packet number for
*group* messages that the ap will use as there is no separate group
key message. in wpa1, we use it for the peerwise key.
2013-03-23 22:09:46 +01:00
cinap_lenrek
66a3ffe248 unrolling loops in aesCCMencrypt() and aesCCMdecrypt()
do the xoring word wise for 16-byte block instead
of doing it bytewise in a loop.
2013-03-23 20:52:54 +01:00
cinap_lenrek
f079c71966 wpa: remove debug print 2013-03-23 04:50:43 +01:00
cinap_lenrek
2b9ed2057a merge 2013-03-23 04:31:45 +01:00
cinap_lenrek
49a4ac0728 wpa2 support continued... 2013-03-23 04:30:20 +01:00
cinap_lenrek
e7131e9313 add experimental wpa2/ccmp support 2013-03-23 04:27:49 +01:00
khm
12b35bbef1 fortunes: stockholm 2013-03-22 19:25:50 -04:00
cinap_lenrek
7ae6508d7e merge 2013-03-17 19:41:39 +01:00
cinap_lenrek
d6da605605 wpa: initial support for rsn 2013-03-17 19:39:44 +01:00
ftrvxmtrx
6862f4ee0e aux/cpuid: xsaveopt 2013-03-17 13:20:03 +01:00
ftrvxmtrx
8580ec595b aux/cpuid: better looking arrays 2013-03-16 21:13:49 +01:00
ftrvxmtrx
f4174739bb aux/cpuid: fix wrong extfunc1 bits 2013-03-16 18:07:48 +01:00
cinap_lenrek
f37465fd7f sysexec: fix possible segment overlap with temporary stack
the kernel uses fixed area (TSTKTOP, TSTKSIZ) of the address
space to temporarily map the new stack segment for exec. for
386 and arm, this area was right below the stack segment which
has the problem that the program can map arbitrary segments
there (even readonly).

alpha and ppc dont have this problem as they map the temporary
exec stack *above* the user reachable stack segement and segattach
prevents one from mapping anything above or overlaping the stack.

lots of arch code assumes USTKTOP being the end of userspace
address space and changing this to TSTKTOP would work, but results
in lots of hard to test changes.

instead, we'r going to map the temporary stack programmatically
finding a hole in the address space where to map it. we also lift
the size limitation for arguments and allow arguments to fill
the whole new stack segement.

the TSTKTOP and TSTKSIZ are not used anymore so they where removed.

references:

http://9fans.net/archive/2013/03/203
http://9fans.net/archive/2013/03/202
http://9fans.net/archive/2013/03/197
http://9fans.net/archive/2013/03/195
http://9fans.net/archive/2013/03/181
2013-03-16 02:37:07 +01:00
cinap_lenrek
42224f7e5b hjfs: fix the megashit
aiju → what is this huge if(d != nil) {} megashit

if getdent() fails in newentry() then return immidiately
and dont override the error string.
2013-03-14 20:55:16 +01:00
cinap_lenrek
f0303b65ca merge 2013-03-12 21:08:47 +01:00
cinap_lenrek
da66a67a94 ether8169: add RTL8101/8102E macid 2013-03-12 21:07:40 +01:00
ftrvxmtrx
f28ccb0ed9 etheriwl: 6005 - set rom calibration flags and temperature sensor offset 2013-03-12 00:14:55 +01:00
cinap_lenrek
25f04a68a1 ape: threadsafe errno
store errno on the private process stack so its always per process
and not just per memory space. errno itself becomes a macro
dereferencing int *_errnoloc; which is initialized from main9.s
pointing to the private stack location.

various fixes in programs that just imported errno variable with
"extern int errno;" instead of including <errno.h>.
2013-03-11 18:57:22 +01:00
cinap_lenrek
34ec205604 merge 2013-03-11 01:17:45 +01:00
cinap_lenrek
631aef280d ape: fix thread race with close() and select()
in ape close(), do the real filedescriptor _CLOSE() *after* we cleared
the _fdinfo[] slot because once closed, we dont own the slot anymore and
another process doing open() can trash the slot. make sure open() retuns
fd < OPEN_MAX.

double check in _startbuf() holding mux->lock if the fd is already buffered
preveting running double copyprocs on a fd.

dont zero the mux->rwant/ewant bitmaps at the end of select() as we do not
hold the mix->lock.

in _closebuf() kill copyproc while holding the mux->lock to make sure the
copyproc isnt holding it at the time it is killed. run kill() multiple times
to make sure the proc is gone.
2013-03-11 01:16:34 +01:00
cinap_lenrek
d526ee0750 ape/malloc: make malloc and free threadsafe for python 2013-03-11 00:55:26 +01:00
cinap_lenrek
48b0c10681 ape/stdio: make fopen() quasi threadsafe for python
python uses processes sharing memory. it requires at least fopen() to
be called by multiple threads at once so we introduce _IO_newfile()
which allocates the FILE structure slot under a lock.
2013-03-11 00:48:35 +01:00
ppatience0
39eaaaf07d wpa(8): fix typos 2013-03-10 19:25:01 -04:00
cinap_lenrek
530a2bc5e9 ape: check for invalid filedescriptors in select() 2013-03-10 18:35:07 +01:00
cinap_lenrek
9f25f9504a nusb/disk: add small delay after unit start command (for thinkpad sdcard reader)
diskparts fails on thinkpad x200 sdcard reader if we dont
give the unit some time to startup. the device took about
100ms to become ready so status poll loop with a long
timeout would be overkill.
2013-03-10 04:06:42 +01:00
cinap_lenrek
cc02f96ed9 provide wpa(8) manual page 2013-03-09 19:18:00 +01:00
cinap_lenrek
b6581f21e5 aux/wpa: check reply counter only after mic check 2013-03-09 18:12:49 +01:00
cinap_lenrek
6f374a5243 add wpa key setup program aux/wpa 2013-03-09 17:33:58 +01:00
cinap_lenrek
26792d8db5 wifi: add experimental wpa / tkip encryption support 2013-03-09 17:28:41 +01:00
cinap_lenrek
420efd93d7 factotum: add wpapsk client authentication 2013-03-09 17:22:59 +01:00
aiju
d9dd0970b1 added geigerstats 2013-03-08 20:51:08 +01:00
stanley lieber
2cb20023eb fortunes: He wasn't asking about plan9port. 2013-03-07 18:34:35 -05:00
cinap_lenrek
cc2017f0b3 aan: fix structure padding for amd64 2013-03-06 14:11:21 +01:00
ppatience0
95d41e8ff4 fltfmt: make %g print decimal numbers less than 1 with a leading zero 2013-03-03 14:12:33 -05:00
ppatience0
1a88844069 fltfmt: %.0g should print with one significant figure 2013-03-03 13:21:17 -05:00
ppatience0
3d908529e9 fltfmt: fix %g not printing as %e in some cases when it should 2013-03-01 17:23:26 -05:00
cinap_lenrek
6bd2c26a85 nusb/kb: fix "Home" key producing "7" with some usb keyboards (import from sources patch/usb-khome)
Fixes the problem with certain keyboards generating "7" on "Home" key press.

http://9fans.net/archive/2013/03/8
http://9fans.net/archive/2013/03/10
2013-03-01 19:53:11 +01:00
cinap_lenrek
03ae4fa162 6c: fix 32bit pointer truncation (from patch/6c-sugen-types)
1. Go group spotted that a slightly-obscured pointer move was done by AMOVL not AMOVQ.
2. Inspecting the code further, I noticed that other pointer types were set to TLONG not TIND,
   causing similar truncation of pointers to 32 bits.
2013-02-28 19:23:54 +01:00
cinap_lenrek
8b72726549 ape: add PASS_MAX constant for getpass() to limits.h (from patch/ape-pass_max)
add PASS_MAX to limits.h for ape, and make getpass respect it. also increase the size of
the maximum passwords (we use long ones at work). Needed for native port of SVN (in progress).
2013-02-28 19:21:03 +01:00
ppatience0
24ea306fa6 fltfmt: %.ng is supposed to print a number with n significant figures, but it prints it with n+1. This fixes that behaviour. 2013-02-27 16:15:18 -05:00
cinap_lenrek
6b03a9495c dont use full qualified domain names in example configuration
use shorter sysnames instead of full qualified domain names
so one doesnt have to setup the dns server in the example
configuration.
2013-02-27 08:18:18 +01:00
cinap_lenrek
70b9c8574f cwfs: fix mtime for dump yyyy directories 2013-02-25 06:11:43 +01:00
cinap_lenrek
201a98d06c cdproto: only include binaries for $objtype, filter temporary files 2013-02-24 04:48:12 +01:00
cinap_lenrek
5c4f2f9d35 sdiahci: only wait for drives that are in the process of becoming ready when onlining, add *noahci option 2013-02-23 14:05:51 +01:00
cinap_lenrek
3a79bf2ae6 libip: make myetheraddr() accept # device names 2013-02-23 09:33:04 +01:00
ppatience0
82c816d15c ether8169: add another RTL8111/8168B mac id 2013-02-22 01:14:31 -05:00
ftrvxmtrx
412c23204d ndb(2): fix wrong attr names 2013-02-22 22:52:52 +01:00
cinap_lenrek
3612d281aa sdiahci: fix mistake 2013-02-22 13:47:04 +01:00
cinap_lenrek
f5ff6d6f34 sdiahci: prevent nil pointer dereference on spurious interrupt status
on some controllers, we get bogus interrupt indication
for non present drives. ack the irq but ignore.
2013-02-22 12:23:01 +01:00
cinap_lenrek
56d9f57dc8 ether8169: add RTL8111e mac id (thanks glorfdev for the patch) 2013-02-22 10:37:47 +01:00
cinap_lenrek
f9e0bc9eb4 merge 2013-02-21 16:13:37 +01:00
cinap_lenrek
5bcc932168 netif: fix stat() on "stats" and "ifstats" files in network interface
the kernel would go into endless loop when stating "stats" and "ifstats"
files and the network interface having no connections, or otherwise return
wrong stat info.
2013-02-21 16:10:28 +01:00
cinap_lenrek
00ba1aac9e etheriwl: fix rominit
we used use the *last* block in otp block list instead of
the block *before* the last block resulting in wrong eeprom
data (1000er series only)
2013-02-19 07:57:30 +01:00
khm
e68130f082 add wifi link 1000 pci id 2013-02-18 21:04:19 -05:00
cinap_lenrek
2fc31e9a70 9boot: fix 9bootiso
rearrange sub.c for putc(), readn(), memcmp(), memmove(), strchr() and strlen()
and uart to fit into the first 2K of the image.
2013-02-18 04:16:33 +01:00
cinap_lenrek
c9c06dd8ba 9boot: serial console support 2013-02-18 01:22:29 +01:00
cinap_lenrek
364f1f78d4 9boot: make print handle \n -> \r\n conversion, style 2013-02-17 21:48:51 +01:00
ppatience0
ec15df1d81 filter(1), nedmail(1): fix typos in both and consistency in nedmail(1) 2013-02-17 12:02:14 -05:00
ppatience0
4aae319f76 rdbio: fix bug where a->user never gets set if Bopen fails. 2013-02-17 09:55:03 -05:00
ftrvxmtrx
cb25ae9fe6 merge 2013-02-17 12:35:01 +01:00
ftrvxmtrx
0f2caad8b6 ftpfs: fix wrong comment 2013-02-17 12:32:50 +01:00
cinap_lenrek
3da5b76c0b 9boot: preserve configuration on boot error, add show command 2013-02-17 09:30:02 +01:00
ftrvxmtrx
b8990cfbb4 ftpfs: do not call getfields after NLST 2013-02-16 22:06:26 +01:00
cinap_lenrek
012273f39d etheriwl: simplify 2013-02-16 21:37:36 +01:00
cinap_lenrek
c5c9233c3d etheriwl: add otp rom initialization (for 1000er series, untested) 2013-02-16 21:16:05 +01:00
cinap_lenrek
f6290afb14 etheriwl: use first available antenna from eeprom txantmask instead of hardcode to antenna A 2013-02-16 04:42:42 +01:00
ftrvxmtrx
a8d97f31f6 etheriwl: move runtime dc calibration block to proper place 2013-02-16 03:28:21 +01:00
ftrvxmtrx
d676eaf59a etheriwl: support for Centrino Advanced-N 6205 2013-02-16 02:56:40 +01:00
cinap_lenrek
328a3001b2 troff macros: change unix /usr/lib paths to plan9 /sys/lib and /usr/bin/col -> /bin/col 2013-02-16 23:56:17 +01:00
cinap_lenrek
0ef41a6718 boot(8): manpage correction $objtype vs. $cputype (from /n/sources/patch/boot-cputype-objtype)
boot(8) claims that boot will launch /$objtype/init;
that is incorrect. It launches /$cputype/init (so says
both boot.c and cpurc(8)). That's the more sensible
choice. This patch fixes the man page to resolve the
mismatch.
2013-02-16 23:38:58 +01:00
cinap_lenrek
126d7e6feb etheriwl: avoid leaking blocks when controller breaks 2013-02-15 22:56:54 +01:00
cinap_lenrek
8deac637d7 merge 2013-02-15 22:21:45 +01:00
cinap_lenrek
9bcf45da9a etheriwl: fix bugs, support for Centrino Ultimate-N 6300 2013-02-15 22:20:25 +01:00
ftrvxmtrx
e712752229 pci: add intel qm67 pch 2013-02-14 01:04:45 +01:00
ppatience0
6d7bb96b22 merge 2013-02-13 07:37:26 -05:00
ppatience0
0734a0b836 ether8169: support for RTL8111/8168B 2013-02-13 07:12:51 -05:00
cinap_lenrek
3c3808b280 plan9.ini(8): make more clear what firmware file to get for iwl 2013-02-13 11:03:19 +01:00
cinap_lenrek
42fc57d543 plan9.ini(8): document iwl options 2013-02-13 10:57:47 +01:00
cinap_lenrek
af3dad5490 nusb/disk: allow 12 and 16 byte raw scsi commands (from erik quanstro) 2013-02-13 10:03:53 +01:00
cinap_lenrek
0243f52bae etheriwl: dont let transmit change back receiver settings when in promisc mode, cleanup 2013-02-13 08:23:54 +01:00
stanley lieber
194094683a fortunes: Monument To Steve Jobs Goes Up In St. Petersburg 2013-02-12 16:43:02 -06:00
cinap_lenrek
78fc90ec86 etheriwl: support for WiFi Link 4965 2013-02-12 14:28:22 +01:00
cinap_lenrek
8d271549cd wifi: filter SNAP ethernet orgcode only 2013-02-11 16:02:16 +01:00
cinap_lenrek
1f6a402c46 wifi: reset status when clearing essid 2013-02-11 02:10:36 +01:00
cinap_lenrek
6e0835f7d8 wifi: clear out ssid in node table entry, cleanup 2013-02-11 02:02:44 +01:00
cinap_lenrek
3376977d06 wifi: actually check if management replies are for us 2013-02-11 01:29:10 +01:00
cinap_lenrek
8f991a3faa create /lib/firmware in rootstub 2013-02-11 00:53:51 +01:00
cinap_lenrek
dacc4dc31a merge 2013-02-11 00:11:28 +01:00
cinap_lenrek
ffb3ded366 etheriwl: automatic channel scanning, transmission handling, promisc mode
the channel= plan9.ini parameter isnt needed anymore as we now
hop the channels to scan for beacons. the status is also indicated
with the link led :-)

handle all these flags on packet transmission like RTS for big
packets and sending data packets to the AP instead of broadcasting
everything.

properly setup bss hardware node table and filtering. now promisc
mode is only used when requested.

handle deauth message from ap.

increase node table to 32 entries.
2013-02-11 00:09:41 +01:00
ftrvxmtrx
092fd36154 mp.h: fix typo 2013-02-10 20:46:56 +01:00
stanley lieber
c2f5d36d7f fix typo 2013-02-09 23:34:15 -06:00