Commit graph

2403 commits

Author SHA1 Message Date
cinap_lenrek c01833286b timesync: reduce the frequency tolerance from half to double the system clock
the frequency tolerance used by timesync was from a 10th to 10 times
the frequency of the system clock! switching a system from tsc to pic
timer changes the system clock frequency from 300MHz to arround 1.8Ghz
on a x200s laptop resulting in time running way too slow or way too fast.

so we change timesync to only accept frequencies from half to double the
system clock which still seems huge, but at least catches the case above
resulting in timesync ignoring the old frequency file.
2013-06-25 20:28:51 +02:00
cinap_lenrek 5165864dbb wifi: add watchdog to drop bss if stuck in ap association or get deauthenticated by the ap 2013-06-24 17:24:50 +02:00
cinap_lenrek 196b39126c etheriwl: add rxon() debug print 2013-06-24 17:20:08 +02:00
cinap_lenrek 745be8ad8e wpa: fix error reporting for getptk(), use readn() to read ifstats file 2013-06-24 17:19:10 +02:00
cinap_lenrek a3b35c224b wifi: fix debug print #l1 -> #1 2013-06-24 23:22:05 +02:00
cinap_lenrek 50eb678c72 wpa: deassociation, reply eapol version, send rsc 0 and reset install flag on message D reply, use 0 for txkey tsc 2013-06-24 22:49:38 +02:00
cinap_lenrek 4da4785412 wifi: signal ap deassociation to aux/wpa with a zero length read.
aux/wpa needs to reset its reply counter on deassociation to
properly restart key negotiation. we signal this with a zero
length read on the connections filtering for eapol protocol.
2013-06-24 22:47:07 +02:00
cinap_lenrek 5c0106b7cf etheriwl: allow switching channels in promisc mode
promisc mode prevented the call to rxon() in transmit
possibly causing association to fail while running snoopy.
2013-06-23 18:27:17 +02:00
cinap_lenrek f39374b47e wifi: fix missed eapol frames
allow the driver to associate the node with a new aid right after
we receive the association response, not just when we transmit
a packet which usualy does not happen as eapol is initiated by
the access point so there are no transmit calls. we just call
transmit from the wifiproc with a nil block to introduce the node.
2013-06-23 07:14:52 +02:00
cinap_lenrek fb22c34833 wifi: simplify 2013-06-23 01:01:36 +02:00
ppatience0 9f3cdd7249 wifi: fix typo 2013-06-22 20:36:56 -04:00
cinap_lenrek 677746244d wifi: have to check for both, bssid/essid in wifictl too 2013-06-23 00:32:16 +02:00
cinap_lenrek a8cc5cff0e wifi: allow selecting specific access point with bssid= parameter and wifictl command 2013-06-23 23:54:15 +02:00
cinap_lenrek 43323512f0 wifi: add a debug flag and printing
add a debug flag that can be set in the ethernet options which
causes status transitions and wifictl messages to be printed.
2013-06-23 22:09:16 +02:00
ppatience0 2cf1e43e8c wpa: check for eapol v2 2013-06-22 13:16:41 -04:00
ppatience0 6a1f3823bb wpa: s/peerwise/pairwise/g, fix bug where p is not incremented after
reading wpa1oui into w, making the later memcmp with wpatkipoui
bogus.
2013-06-22 09:27:56 -04:00
cinap_lenrek 58f8d7874b alarm: run checkalarms() only on cpu0 (from eriks alarm-once patch) 2013-06-22 09:53:14 +02:00
cinap_lenrek 04b7803291 apic: eleminate splhi and apictimerlock, per cpu apictimer structure
the splhi() and apictimerlock in the Mach isnt neccesary, as
portclock always holds the ilock of the per mach timer queue
when calling timerset().

as fastticks() and the portclock timers are all handled on a
per processor basis, i think it should be theoretically possible
for the lapics to run at different frequencies. so we measure
the lapic frequency for each individual lapic and keep them in
a per processor Apictimer structure instead of assuming them
to be the same.
2013-06-22 09:50:34 +02:00
cinap_lenrek e38938384f wifi: add list of setup encryption key ciphers and lengths into ifstats file
it is usefull to see what encryption keys have been
estabished by aux/wpa.
2013-06-22 01:22:57 +02:00
cinap_lenrek 769fcc82ef devcons: change /dev/kmesg buffer back to normal 16K
this makes it consistent with the manual again.
2013-06-22 01:18:27 +02:00
cinap_lenrek 3487653524 apic: fix lapic timer divider (fixes wrong lapic frequency on boot)
loading the divider before programming one shot mode *sometimes*
gives the wrong frequency. (X200s got 192Mhz vs. 266Mhz, after
5 boot attempts)

also reload the divider after programming periodic mode. (from
http://wiki.osdev.org/APIC_timer)
2013-06-22 00:47:24 +02:00
cinap_lenrek a59b0bd6a8 merge 2013-06-21 02:49:33 +02:00
cinap_lenrek 49c9955aea reverting *notsc= option, this needs another revision 2013-06-21 02:49:08 +02:00
cinap_lenrek 94fb78a65e merge 2013-06-21 02:48:25 +02:00
cinap_lenrek 19bf2bbfeb reverting guesscpuhz() changes, causes trouble 2013-06-21 02:46:14 +02:00
cinap_lenrek f99007281d uhtml: fix wrong open error handling (fd 0 != fd 1) (thanks BurnZeZ) 2013-06-21 02:37:10 +02:00
cinap_lenrek 41208add72 ndb/dns: avoid duplicate entries for db records
dnauthdb() would relabel expired rr's as rr->db == 0 to make
them get garbage collected by dnage(). but this doesnt work
due to dn->keep and also causes the deduplication to fail on
rrattach() as rrattach1() handles rr->dn/rr->auth as separate
name spaces.

this causes duplicate entries in the rr's when ndb gets
gets changed. to fix, we just delete the expired (removed from
ndb) rr's immidiately in dnauthdb() instead of trying trick
dnage() to garbage collect it.
2013-06-21 02:27:10 +02:00
ppatience0 d1b6c02ac9 nusb/ether: fix asixread() invert/shift in wrong order 2013-06-19 21:25:08 -04:00
cinap_lenrek 17da3e3ff4 disable tscticks in pc kernel (for now)
doesnt seem to be reliable. also, separate tsc frequency measurement
and cpu loopconst measurement. turned out with *notsc=, the simplcycles()
calls would mess up loopconst.
2013-06-20 02:30:17 +02:00
cinap_lenrek 8da4c8dcde plan9.ini: add *notsc= option to disable use of TSC as righ resolution clock
we previously used tsc only on cpu kernel. now that
we use it on terminal kernel too, there might be some
surprises ahead.

so make it possible to disable tsc for machines where
the tsc rate is not kept constant across cores or is
dynamically adjusted by power management.
2013-06-19 20:56:01 +02:00
cinap_lenrek 35314ce1e7 libc: fix compiler warning for mips canlock() and _tas() 2013-06-19 20:18:17 +02:00
cinap_lenrek 82b243b5ad libdraw: fix allocscreen() memory leak with too many retries (from 9atom) 2013-06-19 20:13:55 +02:00
cinap_lenrek 5bb8203bf6 acpi: use Tblsz enum instead of sizeof(Tbl) due to alignment, enable use tsc on terminal kernel (thank erik) 2013-06-19 22:26:27 +02:00
cinap_lenrek 40bc0b9de7 auth/asm12dsa: use fd 0 instead of trying to open /dev/stdin (thanks arpunk) 2013-06-19 22:07:10 +02:00
cinap_lenrek 8ac67646a2 libaml: pikeshedd style, handle division by zero (thanks erik) 2013-06-18 21:49:19 +02:00
cinap_lenrek 32d4721802 smtp: usage for -t flag (thanks erik) 2013-06-18 20:54:25 +02:00
cinap_lenrek 1a6d523d26 nusb/ether: fix asixwrite()
invert/shift in wrong order causing low 16 bits to be all ffff...
2013-06-18 02:00:05 +02:00
cinap_lenrek b5659c0977 libdraw: avoid moving cursor if we dont have to for menuhit
depending on the font, poping the menu would move your cursor
one pixel down each time (due to division). this is annoying
when using a trackpoint and trying to repeat some operation
over 9000 times.

the cursor should only be moved when the menu is repositioned
to contain it on the screen.
2013-06-18 23:23:41 +02:00
cinap_lenrek d7c7c7e4b3 devsrv, devshr: wstat permissions
update permissions last in wstat so it will only get changed when there was
no error.
2013-06-18 22:09:40 +02:00
cinap_lenrek 4b9845d942 devshr: fix wstat, style
- same problem with wstat, if we error then owner has been already updated...
- avoid smalloc while holding qlock in wstat, do it before
- pikeshedd style...
2013-06-18 22:02:07 +02:00
cinap_lenrek b302cc1097 devsrv: fix wstat(), srvname(), avoid smalloc() while holding srv qlock, style
- wstat would half update the Srv data structure if name was too long
- srvname() walked the linked srv list without holding srv qlock
- dont access sp->chan while not holding srv qlock in srvopen()
- dont modify sp->owner while not holding srv qlock in srvcreate()
- avoid smalloc() allocations while holding srv qlock
- style pikeshedding, sorry
2013-06-17 21:58:38 +02:00
cinap_lenrek 9369f83bcd page: use resizewin() to change window size for gif display
resizewin() has some extra logic making sure the rect doesnt get too big.
rio would otherwise refuse to create the window and the operation will fail
completely.
2013-06-17 08:05:04 +02:00
ppatience0 89ed97aaa2 nusb/ether: call sysfatal if dev is nil 2013-06-16 20:37:51 -04:00
cinap_lenrek bf048d94c3 ip/ethermedium: drop short packets instead of producing negative size blocks
on usb ethernet, it can happen that we read truncated packets smaller
than the ethernet header size. this produces a warning in pullupblock()
later like: "pullup negative length packet, called from 0xf0199e46"
2013-06-17 02:28:10 +02:00
cinap_lenrek 202be57bb9 draw: add badrect() function to reject zero, negative size or orverly huge rectangles
not checking the rectangle dimensions causes integer overflows
and memory corruption. adding a new badrect() function that checks
for these cases.
2013-06-16 19:01:46 +02:00
cinap_lenrek e36d9f5c4e make filesystem handling of read9pmsg() consistent 2013-06-16 06:26:31 +02:00
cinap_lenrek d84aeddee7 devmnt: add debug print for convS2M failing, suspecting this causing zero length writes 2013-06-16 06:16:43 +02:00
cinap_lenrek 389f457505 paint: limit zoom to 12 steps 2013-06-16 03:23:41 +02:00
cinap_lenrek 0d1801902d wpa: fix bug 2013-06-16 01:20:35 +02:00
cinap_lenrek 56073b7381 libmemdraw: fix drawing to color mapped with alpha chan (m8a8) 2013-06-16 00:39:31 +02:00
cinap_lenrek 4cbfe26da4 abaco: allow single quotes for ctype attribute (thanks plhk)
plhk9 → abaco: charset 'utf-8'> not supported
plhk9 → http://plhk.ru/trash/abaco-singlequote.diff makes it go away
2013-06-16 22:43:09 +02:00
cinap_lenrek 3d581e8b72 page: 12 zoom levels should be enougth
making zoom too big just causes pagesize() multiplication to overflow
passing bogus rectangles to allocimage().
2013-06-15 21:09:27 +02:00
cinap_lenrek 4cf627a131 wpa: automatically pick cipher suits from beacon rsne 2013-06-15 19:02:17 +02:00
cinap_lenrek 0a7e9ba1f5 rdbfs: add -s srvname (from charles forsyth's rdbfs-srvname patch)
Add a -s srvname option to rdbfs, allowing debugging sessions to be shared
or later reattached after disconnection.
2013-06-14 23:28:59 +02:00
cinap_lenrek c198a557d9 lpdaemon: fix bogus string termination (from sources) 2013-06-14 23:22:57 +02:00
cinap_lenrek 2e0fac766c ndb/cs, ndb/dns: ignore special commands from users different from the one we run the service owner
this prevents users like "none" from toggling special options in ndb/dns
and ndb/cs.
2013-06-14 19:20:06 +02:00
cinap_lenrek 249915c379 pool: use splaying to balance free node tree
use splaytree algorithm to balance the tree of free allocations
as an optimization. the data structures are unchanged by this
optimization.
2013-06-14 17:31:04 +02:00
cinap_lenrek 12853d3ba8 merge 2013-06-13 20:08:17 +02:00
jpathy 166da952f4 fpiarm: condok() verfiy before specialop() omap/kw 2013-06-14 23:42:30 +05:30
cinap_lenrek 38d18342a9 merge 2013-06-12 19:39:02 +02:00
cinap_lenrek c1b55b0328 libmach: add EMMS for disassembly (8db.c, thanks mischief) 2013-06-12 19:38:14 +02:00
stanley lieber 3b4243aa4d fortunes: When Do Apps Become Rituals? 2013-06-12 13:26:25 -04:00
cinap_lenrek f982f8b00b merge 2013-06-12 19:07:47 +02:00
cinap_lenrek 646eb150e1 smtp: add SMTPS support (-t) 2013-06-12 23:39:41 +02:00
jpathy 4b79c8f86f Remove unused fpemu function in omap, kw 2013-06-12 01:17:49 +05:30
jpathy 9f949e3cd3 ARM: kernel: add vfp emulator to bcm, teg2, omap, kw 2013-06-12 01:11:41 +05:30
jpathy f166778ce3 5e: vfp support 2013-06-11 00:30:16 +05:30
cinap_lenrek 0dbde06bc7 merge with jpathy 2013-06-10 20:43:35 +02:00
jpathy de46340848 ARM: kernel changes make teg2 procfork() call fpuprocfork() and acid fixes for vfp instruction 2013-06-10 18:07:16 +05:30
cinap_lenrek dfb0bf24b3 acid: fix dumptree() acid function to work in kernel debug, update malloc.acid and pool.acid files 2013-06-10 01:13:21 +02:00
cinap_lenrek 177c175fda kernel: allow sysr1 debugging only for hostowner 2013-06-10 01:09:52 +02:00
cinap_lenrek 686f9fa1db page: handle interrupt note 2013-06-09 01:51:19 +02:00
cinap_lenrek c9e79c27a6 page: exit on kill note 2013-06-09 01:36:45 +02:00
cinap_lenrek 667abe102c merge 2013-06-08 23:54:47 +02:00
cinap_lenrek b38d197995 ape: fix _main stack setup for arm (_privates and _errnoloc was inside argv) 2013-06-08 23:53:28 +02:00
aiju 1f52da20a2 bitcoin stuff 2013-06-07 19:43:40 +02:00
cinap_lenrek 4e81aab690 libaml: create \_GL name object 2013-06-07 18:34:28 +02:00
cinap_lenrek 62f6d1bc43 no need to disable fpu in execregs, this is done in procsetup() already 2013-06-07 18:04:59 +02:00
cinap_lenrek f0c9bb979f archacpi: handle multiple SSDT tables
we cannot assume theres only one instance of an acpi table. some
bios have multiple SSDT tables and we would only find the first
one.

now, we keep a second array to record the physical address of
the table visited by maptable(). load all instances to the
SSDT.
2013-06-07 18:03:44 +02:00
ppatience0 a5488ad1e6 plan9.ini(8): typo 2013-06-05 19:11:41 -04:00
cinap_lenrek 06ec2ffac6 cifs(4): default method is ntlmv2, fix formatting 2013-06-05 20:35:09 +02:00
cinap_lenrek 60fd776d37 libaml: various fixes found by plhk
- fix bogus execution of Else{} blocks
- always allocate Env in amleval()
- add Sleep() and Stall() instructions
- keep package size for packages with empty body
2013-06-04 22:11:01 +02:00
cinap_lenrek bc9df6c60c time: fix -older t for relative times to current time (thanks arisawa for pointing out)
from test(1):

          f -older t True if file f is older than (modified before)
                     time t. If t is a integer followed by the letters
                     y(years), M(months), d(days), h(hours),
                     m(minutes), or s(seconds), it represents current
                     time minus the specified time.  If there is no
                     letter, it represents seconds since epoch.  You
                     can also concatenate mixed units.  For example,
                     3d12h means three days and twelve hours ago.

this means *without* [y M d h m s] unit, t is *absolute* time
in seconds since epoch.
2013-06-03 23:49:06 +02:00
ppatience0 e1bc28d1dd fgui: check if fd is valid before entering new key 2013-06-01 19:40:38 -04:00
cinap_lenrek d3773c4355 aux/wpa: make sure essid is configured, dont make factotum ask for essid 2013-06-02 00:24:42 +02:00
cinap_lenrek bf2dd0c6bd merge 2013-06-02 23:46:38 +02:00
cinap_lenrek 97c4381dc4 nusb/kb: map button 4 to middle button 2 (for logitech 5 button mouse) 2013-06-02 23:45:38 +02:00
ppatience0 a5589dda22 hjfs: ignore atime on wstat 2013-06-01 16:56:24 -04:00
ppatience0 2502ba5acc auth(2): auth_getkey only takes a single argument: char *params 2013-06-01 14:00:19 -04:00
ppatience0 74416281b0 readgif, readjpg: fix incorrect malloc arguments: use sizeof(Rawimage*) instead of sizeof(Rawimage**) and 2*sizeof(Rawimage*) instead of sizeof(Header)
readtga: switch calloc arguments: nelem is supposed to first, elsize second
2013-06-01 17:14:50 -04:00
cinap_lenrek 6c4d8f8b11 8c: apply charles forsyth's 8c-cgen64-mul-savereg patch (from sources)
If 64-bit multiply has to save both AX and DX, it could load the wrong value
into DX; also, biggen shouldn't allocate either AX or DX as temporaries
when using the template for MUL.
2013-06-01 18:51:47 +02:00
cinap_lenrek 82f9f3df72 usbdwc: sync with sources (Raspberry Pi Model A support) 2013-06-01 16:31:58 +02:00
cinap_lenrek 48d4083efa mothra: implement link buttons
a button embedded in a <a> link tag should follow the link
when clicked.
2013-06-01 02:42:02 +02:00
cinap_lenrek aedb35af2c ether82557: panic() if receive buffer allocation fails on init 2013-06-01 01:42:39 +02:00
cinap_lenrek f7ffca5c1c ether83815: dont raise error() from etherreset
can't raise error() without process context. use panic() instead.
2013-06-01 01:40:56 +02:00
cinap_lenrek 2a94e1fc19 pool: do poolcheck when free nodes get corrupted instead of assert
doing poolcheck should give us better context to figure out
what memory blocks / owners corrupted the blocks after free.

this is for hunting down a memory corruption seen in connection
with usb serial.
2013-05-31 18:55:01 +02:00
mveety a84c51a1e3 fixed a segfault in auth/as because it didn't check to see if argv[0] and argv[1] actually had things in them 2013-05-29 22:25:57 -04:00
cinap_lenrek 9abafe226e hjfs: deal with ORCLOSE in chancreat()
ORCLOSE was effectively ignored for Tcreate. just setting
CHRCLOSE flag on chan should fix it.
2013-05-30 01:58:09 +02:00
cinap_lenrek 5ba51bcd0d merge 2013-05-30 23:27:28 +02:00
cinap_lenrek 8eb12a65e0 merge 2013-05-30 23:27:07 +02:00