Commit graph

2577 commits

Author SHA1 Message Date
cinap_lenrek 2009d55643 ether82563, etheriwl, pmmc: fix potential multiprocessor races with wakeup
make sure that the wakeup enable conditions
are seen by different processors before sleep
is called.

the problems havnt been observed so far.
2013-07-26 04:37:32 +02:00
cinap_lenrek ac52599eef ether82563: avoid deadlock due to icansleep() trying to acquire Rbpool.Lock
icansleep() violates the lock ordering due to the following cases:

rbfree(): ilock(Rbpool.Lock) -> wakeup(): spli(), lock(Rbpool.Rendez)
sleep(): splhi(), lock(Rbpool.Rendez) -> icansleep(): ilock(Rbpool.Lock)

erik fixed this moving the wakeup() out of the ilock() in rbfree(),
but i think it is an error to try acquiering a ilock in sleeps wait
condition function in general.

so this is what we do:

in the icansleep() function, we check for the *real* event we care about;
that is, if theres a buffer available in the Rbpool. this is to handle
the case when rbfree() makes a buffer available *before* it sees us
setting p->starve = 1.

p->starve is now just used to gate rbfree() from calling wakeup() as
an optimization.

this might cause spurious wakeups but they are not a problem. missed
wakeups is the thing we have to prevent.
2013-07-26 01:51:03 +02:00
cinap_lenrek 2759b81dec ether82563: work arround for 82579LM on Lenovo X230
dont reset the the phy on reset as this causes the link
to be stuck at 10mbps.
2013-07-24 22:17:13 +02:00
ppatience0 9a5763624f etherrt2860: add rt3090 support and make style more consistent 2013-07-21 18:13:27 -04:00
ppatience0 776056dcd0 readtif, writetif: remove multiplication in inner loops of predict functions 2013-07-21 10:56:11 -04:00
cinap_lenrek 176569ca4d apply erik quanstros tcp-bdp patch (from sources)
this patch consists of two bits of work submitted as one
patch.

the first bit fixed a "pacing" problem, where a tcp connection
rate-limited by the reading process would experience 10%
of the expected throughput, and could even get into live
lock.  it was noticed at the time of this initial work that
the stack often sent tiny grams.  some good bits from nix'
original tcp were merged in.  the test program
	/n/sources/contrib/quanstro/tcptest.c
will verify that under most conditions, a reader-paced connection
now gets the expected throughput.  expected arguments
would be
	tcptest -s1 -n 5000 -l

the second bit is a first step in preparing tcp to handle
modest (1-2MB) bandwidth-delay products.  the strategy
was to completely implement NewReno.  the testing network
was a 7/35/70ms by 100Mbit wan emulator with 0/.05/.1% loss.
here are the performance comparisons from the changes after
the first round "old" to the submitted patch "new".  the
smallest improvement was 80%, the largest was 11x.

loss%	rtt	old	new
0.10	7	4.40	7.85
0.10	35	0.88	1.79
0.10	70	0.47	0.84
0.05	7	4.80	9.38
0.05	35	1.00	2.02
0.05	70	0.52	1.77
0.01	7	5.33	11.87
0.01	35	1.14	10.97
0.01	70	0.54	4.75
0.00	7	4.49	11.92
0.00	35	1.04	11.35
0.00	70	0.58	10.56

since the diff is not very easy to read, i wrote a small
paper detailing the changes

	http://www.quanstro.net/plan9/tcp/tcp.pdf

- erik
2013-07-21 14:41:51 +02:00
cinap_lenrek 638a822362 abaco: use faster resize instead of resample for image scaling 2013-07-21 00:55:56 +02:00
ppatience0 61c82d2bb8 readtif: simplify rounding in other places 2013-07-20 18:19:20 -04:00
ppatience0 171db68c3d readtif, writetif: simplify rounding 2013-07-20 18:00:34 -04:00
ppatience0 0fc3aa99a1 readtif: if getbit returns less than 0 during eol fill bits, return early 2013-07-20 16:56:29 -04:00
ppatience0 92b14e72b0 readtif, writetif: prevent buffer overflows in some corner cases 2013-07-20 16:42:33 -04:00
ppatience0 105155880c tojpg, totif: change flags to better match those of the decoders 2013-07-20 12:11:52 -04:00
ppatience0 360cabb858 readtif: fix many bugs
totif: add tiff encoder
2013-07-19 02:16:43 -04:00
ppatience0 24a5720bec writejpg: the call to Bflush() is unnecessary; free data before exiting in case of malloc error
writeppm: do not print a space after the last pixel
2013-07-19 01:07:15 -04:00
cinap_lenrek b0cd0020df mothra: use pldraw() to put cmd box on screen for alt display
the cmd box is not part of the alt display hirarchy. for command
typing to show the box in alt display, we call pldraw() on it
in eresized() to initialize its cmd->b image so it knows where to
draw itself on typing.
2013-07-18 20:56:19 +02:00
cinap_lenrek 4755fce1dc wpa: wait for bss to connect
waiting at the auth command is too late because we want to
read the brsne first to build the rsne used in the auth message.
2013-07-18 16:16:31 +02:00
cinap_lenrek b6122a4c42 wifi: make "auth" command non-blocking, let aux/wpa do the waiting for bss scan to complete. 2013-07-18 15:30:53 +02:00
cinap_lenrek 24e8c78cb2 cwfs: add rtmp flag for check command to remove temporary files after recover 2013-07-18 15:04:37 +02:00
cinap_lenrek 8ef9f7bbee mothra: restore usage fix, document -a option in manual 2013-07-18 11:18:31 +02:00
cinap_lenrek 26e93aa49c mothra: add -a flag to start in alt-display mode 2013-07-18 11:03:39 +02:00
stanley lieber 07b4aeeacc mothra: fix usage 2013-07-17 20:25:57 -04:00
cinap_lenrek a7a90b2f3c abaco: remove unused stuff, move pipeline() into util.c 2013-07-14 18:37:10 +02:00
cinap_lenrek 1bc8f69780 abaco: simplify, pipeline html directly thru uhtml 2013-07-14 18:31:07 +02:00
cinap_lenrek 1f850cbab1 uhtml: honor default charset -c when not found in document 2013-07-14 16:44:16 +02:00
cinap_lenrek 1af7323238 abaco: use uhtml to handle charset conversions 2013-07-14 16:31:59 +02:00
cinap_lenrek 0ca4c2ea45 pmmc: remove unsued initfreq vairables 2013-07-14 01:56:51 +02:00
cinap_lenrek aa671181e8 add ricoh pci sdmmc host controller driver for X230
the driver should work for standard sdhc
(see http://www.sdcard.org/) controllers,
but matches for the ricoh controller only
as it was the only one i have for testing.
2013-07-14 01:33:07 +02:00
cinap_lenrek deaa290f85 aml: preserve reference type when indexing into package to prevent implicit type conversion when storing to arg or local
if LocalX or ArgX is a package, the store into
a element should *not* type convert. so when taking
the index reference, we have to carry over the type.
2013-07-12 01:58:47 +02:00
cinap_lenrek 7b08f4496b pci: add Intel 82hm67 southbridge 2013-07-12 00:32:59 +02:00
cinap_lenrek 4c47ba6996 mothra: handle empty attributes (for base-tag and others...)
empty href="" attribute in base-tag causes the page to break.
while at it, handle empty attributes in other parts of the
code as well. (mostly stuff like id, name shouldnt be empty)
2013-07-11 20:06:34 +02:00
cinap_lenrek ee67552c4b cc: fix include array overflow handling 2013-07-11 19:01:03 +02:00
mveety d0bde76422 merge 2013-07-10 21:22:11 -04:00
mveety 72cde47068 fixed the bug that arisawa posted about on 9fans where file(1) would mistake 386 intermediates for HTML files. 2013-07-10 21:16:15 -04:00
cinap_lenrek 4102ba93d6 increase MaxEther to 64 avoiding "too many ether cards" panic 2013-07-09 19:17:38 +02:00
cinap_lenrek 2d101158e4 add erik quanstros yukon2 ethernet driver 2013-07-09 18:52:01 +02:00
Alexander Polakov efe1c9087a Add rt2860 to plan9.ini(8) 2013-07-09 17:41:25 +04:00
Alexander Polakov 6cf9d283ed Add Ralink RT2860 wireless driver 2013-07-09 16:16:28 +04:00
Alexander Polakov 22cc50307b wifi: make wifihdrlen() public
Required for upcoming RT2860 driver
2013-07-09 16:12:04 +04:00
cinap_lenrek 33c3a22cb0 merge 2013-07-08 21:00:19 +02:00
cinap_lenrek 41c306dfda page: handle combination or -w and -R flags (thanks BurnZeZ) 2013-07-08 20:50:39 +02:00
ppatience0 94fea3b1a6 dc(1): typo 2013-07-08 14:19:22 -04:00
cinap_lenrek bb11bb1c1f vesa: fix blank/unblank wakeups
it could happen that we unblanked while vesaproc was
currently blanking (when manually blanking using vgactl
for example). the wakeup of the unblank is lost.
2013-07-07 21:02:46 +02:00
cinap_lenrek e32940f726 acpi: skip disabled LAPIC entries
disabled LAPIC entries overwrote the bootstrap processor
apic causing the machine panic with: "no bootstrap processor".
(problem with lenovo X230)

just ignore entries that are disabled or collide with
entries already found. (should not happen)
2013-07-07 12:44:30 +02:00
cinap_lenrek c333697c41 pci: add intel panter point lpc south bridge 2013-07-06 15:19:15 +02:00
cinap_lenrek b31d6f0665 audiohda: x230 pci magic 2013-07-06 13:44:25 +02:00
stanley lieber 72f95b8aae pkg(1): add jens staal's repository 2013-07-05 22:46:04 -04:00
ppatience0 473d12c94f nusb: only read 18 bytes for device descriptor 2013-07-05 18:42:15 -04:00
ethan 0e9a80d129 merge 2013-07-05 21:51:35 +01:00
ethan 6fd3e90d85 rc(1): $ifs cleanup 2013-07-05 21:45:24 +01:00
stanley lieber 252b0ff3c9 sysinfo: add -e to include a reply-to e-mail address 2013-07-05 15:42:45 -04:00
stanley lieber 33e13fa09c fortunes: Let me put in a word about the Apple wireless trackpad. 2013-07-05 15:41:51 -04:00
cinap_lenrek cd65a865dd vnc(1): remove obsolete section about keyboard events (9front has /dev/kbd) 2013-07-05 19:43:48 +02:00
cinap_lenrek b76142bfef hjfs: add users command, fix newuser ? documentation 2013-07-05 15:17:32 +02:00
stanley lieber 76677bb8f0 sysinfo: remove -m, add -p, which posts output at http://sysinfo.9front.org, which forwards the information to 9front-sysinfo@9front.org mailing list 2013-07-04 20:52:12 -04:00
cinap_lenrek 6d24cced8f mtrr: fix mtrr index out of range for vcnt > Nmtrr 2013-07-05 00:55:48 +02:00
ftrvxmtrx fa4448b2d5 tcs: fix koi8-ru chars (ukrainian and belorussian) 2013-07-04 11:51:13 +02:00
ftrvxmtrx a189ded772 tcs: fix koi8-r ё and Ё 2013-07-04 10:54:44 +02:00
ppatience0 e0f1e9e715 plan9.ini(8): typo 2013-07-03 21:28:49 -04:00
ppatience0 cbf6be5bae tif: initialize max to one instead of zero for palette rescaling in case all values are zero. 2013-07-03 21:08:13 -04:00
ppatience0 e6b647e8ec tif: rescale palette color map to [0, 255] 2013-07-03 20:49:33 -04:00
cinap_lenrek 7853a37e63 merge 2013-07-04 00:06:20 +02:00
cinap_lenrek 3fbf35112f wifi: move scanning/probe into wifi layer, avoid associating with wpa network until rsne is setup 2013-07-04 00:04:47 +02:00
ppatience0 043c8e4453 tif: add tiff decoder 2013-07-02 01:57:14 -04:00
cinap_lenrek 82ccf5b26a wifi: send probe requests for hidden ssid 2013-07-01 00:55:34 +02:00
cinap_lenrek 6c2e9a98e2 wifi: handle authentication independent of current bss to allow multiple ap's (roaming) 2013-07-01 23:32:21 +02:00
cinap_lenrek 0542f08d10 dump9660: fix volume space size field (from sources, paure)
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf

page 19:

Volume Space Size (BP 81 to 88)
This field shall specify as a 32-bit number the number of Logical Blocks
in which the Volume Space of the volume is recorded.
This field shall be recorded according to 7.3.3.
2013-06-29 12:10:12 +02:00
cinap_lenrek 61aeb582ca libaml: add Concatenate instruction, fix type conversions 2013-06-29 11:56:18 +02:00
cinap_lenrek b34a1394c2 rio: run filename completion in background process
this avoids locking up rio when doing filename completion
on a unresponsive directory.
2013-06-29 11:26:08 +02:00
cinap_lenrek 1bf892cc67 libaml: add Load and Unload instructions
not very usefull at the moment as theres no code to map/unmap
memory regions right now.
2013-06-29 22:14:34 +02:00
cinap_lenrek 639cec9329 paint: cleanup 2013-06-28 18:22:24 +02:00
cinap_lenrek 97a17520c2 merge 2013-06-26 02:30:43 +02:00
cinap_lenrek 3b1e582fc6 samterm: fix crash on scroll when there is no layer (thanks BurnZeZ) 2013-06-26 02:28:16 +02:00
cinap_lenrek b3e120ecb6 paint: restore color channel on undo after conversion thru pipe
converting image thru pipe would not properly restore the
original color channel on undo. like |iconv -c k8 would
still be grayscale after undo.
2013-06-26 02:27:35 +02:00
cinap_lenrek cf38ab75fc reintroduce *notsc= option
the issues with the previous tsc change where not related to the tsc
but where problems with timesync using an old frequency file. a
patch to fix timesync was commited, so so we reintroduce the *notsc=
again.
2013-06-25 20:32:43 +02:00
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
cinap_lenrek d94ffb4808 kernel: do all fp state fork from procfork() (like pc kernel)
this simplifies the arm ports and keeps all the stuff in one place
instead of spreading it thru notify(), trap() and syscall() functions
and prevents useless fp state copying for kernel procs.

also make sure to save fp in notify while still splhi().
2013-05-30 23:26:21 +02:00
cinap_lenrek 9652f5bec5 pc kernel: simulate FXSAVE/FXRSTOR tag-byte from x87 tag-word, copy fp state across fork
the tag-word is not compatible between x87 and sse, have to convert
properly for emulation to work.

we now copy fp state across fork (again!) to preserve FCW and MXCSR
registers. this might not be neccesary as we could probably just
get the current value for the curren process and avoid the fpsave()
call, but become conservative again.
2013-05-30 23:16:22 +02:00
cinap_lenrek 580a467f63 libmach: fix reversed F0-F7 register order 2013-05-30 23:01:59 +02:00
ppatience0 9fee166e10 io, seg: we should exits(nil) at the end of main 2013-05-28 20:06:53 -04:00
ppatience0 6a0d21acca mothra: clicking on the url scroll bar, snarfing, or saving a hit when no urls have been loaded (right after running mothra) would crash. this was due to use of w->url and selection when they are actually nil.
to fix this, make genwww return 0 if w->url is nil and output an error message when attempting to access selection if it's nil. the problem with the w->url fix is that after clicking on the url scroll bar, an empty url history row could be highlighted by clicking on it. fix this by making sure lp->lo is not less than zero.
2013-05-27 00:26:19 -04:00
ppatience0 ffef3278ef tojpg: GREY[1248] images should be grayscale 2013-05-27 19:32:28 -04:00
cinap_lenrek 723018c1de merge 2013-05-28 23:42:59 +02:00
cinap_lenrek 8cce104fcb kernel: sysrfork abortion
when we fail to fork resources for the child due to resource
exhaustion, make the half forked child process call pexit()
to free the resources that where allocated and error out.
2013-05-28 23:41:54 +02:00
ppatience0 410ce8feec tojpg: add jpeg encoder 2013-05-26 21:56:56 -04:00
cinap_lenrek 71a3ab3f13 kernel: make imagereclaim() skip notext pages (prevent it from blowing the mount cache)
imagereclaim would happily uncache pages from the mountcache (port/cache.c)
without ever getting a Image* released from it. simple fix, just check for
p->image->notext but make sure todo it under the page lock :)
2013-05-27 03:26:53 +02:00
cinap_lenrek 6025ad06da merge 2013-05-27 01:20:46 +02:00
cinap_lenrek 44e4aad870 kernel: dont copy fpsave on fork, simplify freeing waitq in pexit(), remove unused semlock from Proc sturcure 2013-05-27 01:17:11 +02:00
cinap_lenrek 410d6bea6a devfs/devsd: fix waserror() and unused variable compiler problem
the compiler optimizes setting unused variables out, which is
problematic if they are used in waserror() handler which the
compiler isnt aware of. rearrange the code to avoid this problem.
2013-05-27 01:12:21 +02:00
cinap_lenrek c4153b7755 kernel: closechanq error
catch potential interrupt error from kproc(). this can happen when
we run out of processes, then newproc() will call rsrcwait()
which does tsleep(). if the process gets a note, this might
raise a interrupt error.
2013-05-27 01:09:34 +02:00
cinap_lenrek 24b908be8a kernel: image reclaim pauses
get a bit more verbose about process image exhaustion and make
imagreclaim() try to get at least one image on the freelist.

use rsrcwait() to notify the state, and call freebroken() in
case imagereclaim() couldnt free any images.
2013-05-27 01:04:53 +02:00
cinap_lenrek 3e567afed5 kernel: fix sysexec() error handling compiler problem, sysrendez() busyloop
the variables elem and file0 and commited are explicitely
set to avoid that they get freed in ther waserror() handlers.

but it turns out the compiler optimizes this out as he
thinks the variables arent used any further. (the compiler
is not aware of the waserror() / longjmp() semantics).

rearrange the code to account for this. instead of using
a local variable to check for point of no return (commited),
we use up->seg[SSEG] to figure it out.

for file0 and elem, we just rearrange the code. elem can be
checked in the error handler if it was already assigned to
up->text, and file0 is just free()'d after the poperror().

remove silly busy loop in sysrendez. it is not needed.
dequeueproc() will make sure that the process has come to
rest.
2013-05-27 00:59:43 +02:00
cinap_lenrek 257c7e958e keep fpregs always in sse (FXSAVE) format, adapt libmach and acid files for new format
we now always use the new FXSAVE format in FPsave structure and fpregs
file, converting back and forth in fpx87save() and fpx87restore().

document that fprestore() is a destructive operation now.

change fp register definition in libmach and adapt fpr() acid funciton.

avoid unneccesary copy of fpstate and fpsave in sysfork(). functions
including syscalls do not preserve the fp registers and copying fpstate
from the current process would mean we had to fpsave(&up->fpsave); first.
simply not doing it, new process starts in FPinit state.
2013-05-26 22:41:40 +02:00
cinap_lenrek ef5e19b9be add leading dot for explicit domain in webcookies, bump redirection limit to 12 in webfs 2013-05-26 03:33:39 +02:00
cinap_lenrek 7aea1204b9 graphics(2): remove non existing char *mousedir argument from geninitdraw (from sources / geninitdraw-no-mousedir patch) 2013-05-25 04:39:53 +02:00
cinap_lenrek cf657b418b libdraw: fix agefont crash when display == nil (from sources / agefont-nodisplay patch)
If you run this:
	{for (i in `{seq 1 70000}) echo '½•α·'} | mc | wc
mc will eventually suicide. The error comes from
/sys/src/libdraw/font.c:/^agefont which assumes it has a
display. Normally, this is set up by geninitdraw (usually
via initdraw), but mc.c avoids that to avoid the screen
redraws (flicker, at a minimum, but worse in long-running
cases).

graphics(2) does not prohibit this use, so I made the least
intrusive change to make it work.
2013-05-25 04:36:16 +02:00
cinap_lenrek 96511b274d kernel: fix floating point exceptions (was broken by sse kernel changes)
the fpenv() instruction stores in x87 format, using mathstate()
would interpret fpsave as FPssestate in case it was enabled!
instead, pass the status word and fppc explicitely to mathnote()
in matherror().

get rid of m->fpsavealign buffer, as we can just use FPssesave struct
which has enougth padding so rounding up base pointer will not overflow.
2013-05-25 22:44:19 +02:00
cinap_lenrek 8b40eecea8 kernel: cleanup /sys/src/9/pc/mkfile PORT= and OBJ= lists 2013-05-21 19:45:40 +02:00
cinap_lenrek 92b550d665 kernel: prevent alarm(2) from returning instantly when the tick timer wraps. (from erik quanstros alarmwrap patch) 2013-05-21 19:31:41 +02:00
cinap_lenrek f6833ce428 wifi: properly size internal wifi input processing queue
we only used wifi->iq to process management frames only, now its also used
to forward encrypted data frames, so size it accordingly.
2013-05-21 19:29:57 +02:00
cinap_lenrek 7a9ecbed6a merge 2013-05-21 18:58:13 +02:00
jpathy 5331734335 merge 2013-05-22 21:55:08 +05:30