Commit graph

1748 commits

Author SHA1 Message Date
cinap_lenrek 30871030f5 aux/vga: remove vbs/vbe from mode, use shs/ehs when sync is ment, prefer detailed timing in edid
vbs/vbe members in Mode was only used in the vesadb
and cannot be changed from vgadb.

use shs/ehs in drivers when refering to the horizontal
sync pulse. clarify the matter in a comment.

link detailed timing modes at the head of the edid
modelist. these are the modes we'r interested in,
not the ones from vesadb.
2015-02-05 23:08:46 +01:00
cinap_lenrek 01762349bd aux/vga: fix mistale :-) 2015-02-02 03:05:56 +01:00
cinap_lenrek 8067368e10 aux/vga: use optional edid information to determine mode when vgadb fails
igfx and vesa can determine monitor timing information from ddc
and store the edid info for connected monitors in vga->edid[].
when monitor type cannot be found in vgadb, we consult the edid
information and make a mode based on the edid info.

this avoids having to maintain a vgadb entry for each monitor.

monitor can be set to "[width]x[height]@[freq]Hz" for a specific
edid setting. when not found, a mode is searched based on the
size.

so the following should work:

aux/vga -m 1366x768@60Hz -l 1366x768x32
aux/vga -m auto -l 1366x768x32
2015-02-02 02:58:59 +01:00
cinap_lenrek e34fa15921 aux/vga: cleanup vesa code
dbvesamode() modified the passed in size string in the process
of option parsing. this is a no-go because the string might be
constant in the read only section. provide cracksize() function
for the parsing and make a static copy.

do the vendor specific monitor detection in vbesnarf() instead
of vbecheck(). vbecheck()'s purpose is to check if vesa bios
service is avialable, not snarf graphics card state.

nvidiascale() was a no-op because it missed the vbecall() at
the end of the function. this means it was never tested so i
add the missing vbecall(), but disable nvidiascale for now
until someone tests this.

keep fancy stuff out of the Vbe structure. it is just there for
making bios calls, not keep state about the graphics card.
2015-02-01 19:28:24 +01:00
cinap_lenrek 7fbed4d635 mothra: people do not like it. reverting 2015-01-31 20:18:45 +01:00
cinap_lenrek 3ce514ca0a mothra: wrap long text and images to fit 2015-01-31 20:01:24 +01:00
cinap_lenrek 72be22cd3a wpa: fix password avp padding, recognize wpa1 authentication oui
we have to padd the data portion in the password avp,
not add padding after the avp.
2015-01-27 14:09:24 +01:00
cinap_lenrek a342e5ac5d wpa: do not forward alert tls records, close connection 2015-01-27 10:56:56 +01:00
cinap_lenrek 5fc2f6af6c wpa: cleanup, pad eap-ttls/pap password, zero passwords and key material after use 2015-01-26 01:26:42 +01:00
cinap_lenrek 5a0c34e9fb wpa: experimental wpa2 enterprise support
this adds support for eap-peap/mschapv2 and eap-ttls/pap.

code has only been tested with freeradius and a cheap
access point, not tested with actual eduroam network.
2015-01-25 07:58:20 +01:00
cinap_lenrek 5649042bff factotum: implement proto=mschapv2 client role
this is used for wpa2 enterprise peap/mschapv2. server role
is not implemented as that would require changing the
wire format on the auth server.

the naming is unfortunate as we already have proto=mschap2 which
really refers to ntlmv2.
2015-01-25 07:49:50 +01:00
cinap_lenrek 0c91d121f0 igfx: fix wrong cursor position register address 2015-01-17 04:00:36 +01:00
cinap_lenrek 22d15f98ba igfx: determine amount of preallocated stolen graphics memory for hw cursor
allocate the hardware cursor plane at the end of
preallocated stolen graphics memory.
2015-01-16 13:38:52 +01:00
cinap_lenrek 6afce2e422 igfx: support for X60t with 1400x1050 panel
program secret plane size and position registers described as "reserved"
in g45_vol_3_register_0_0.pdf that was found by inspecting vesa bios
port traces.

also, we have to set 18:19 (Cursor/Dispaly/Overlay Planes Off) in
PIPExCONF while programming the planes on this card. this is what
vesa bios does on modeset.
2015-01-16 07:55:38 +01:00
cinap_lenrek 511cee2f22 webcookies: only sync the jar when dirty on clunk
avoid sync the jar file when fids get clunked.
the only reason to sync the jar on clunk is when it has
been marked dirty (cookies added or deleted) and we
want to flush the changes to disk.
2015-01-16 04:46:52 +01:00
cinap_lenrek e41faad5a6 webcookies: avoid rereading and rewriting the cookie jar file all the time, dont return deleted cookies on search
- rewrite when jar->dirty != 0 (caller modified the in memory jar)
- reread when the jar->qid != stat(jar->file)->qid (on disk file changed)
- ignore deleted cookies in cookiesearch()
2015-01-16 04:04:55 +01:00
cinap_lenrek d115bd0e20 igfx: cursor/plane pipe assign is G45 only, add magic dsp a toggle from enable sequence 2015-01-13 18:04:33 +01:00
cinap_lenrek 9f11d4f689 kbfds: delete autogenerated latin1.h file when mklatin fails 2015-01-13 00:19:18 +01:00
cinap_lenrek 140f7b7fef igfx: set the display/overlay/cursor plane override disbale bits for G45 (like bios) 2015-01-12 16:52:49 +01:00
cinap_lenrek 54a1db15dc igfx: fix typo, initialize more lvds bits for G45, T60 testing 2015-01-12 16:40:02 +01:00
cinap_lenrek 24d693348a igfx: reverting previous change, pci id is for the second graphics controller pci device 2015-01-12 04:07:16 +01:00
cinap_lenrek ce69208641 igfx: support for X200 (thanks bigato) 2015-01-12 03:09:58 +01:00
cinap_lenrek 90c1959fc4 igfx: properly turn vga monitor off 2015-01-12 02:10:00 +01:00
cinap_lenrek 34f2e1eaf6 igfx: aaand vga support for x200s :-) 2015-01-12 02:04:13 +01:00
cinap_lenrek 9b28b2d97b igfx: vga support on x230, fix fdi link setup, LG Flatron L1730P vgadb entry 2015-01-12 01:51:51 +01:00
cinap_lenrek 01a1d96315 igfx: only use mmio... left from debugging 2015-01-11 04:03:14 +01:00
cinap_lenrek 21b0bafd10 igfx: cleanup 2015-01-11 03:44:56 +01:00
cinap_lenrek b4fcd2d68f merge 2015-01-11 03:37:07 +01:00
cinap_lenrek 2cdadb1b2f igfx: get edid information from lvds 2015-01-11 03:35:30 +01:00
mischief a4650bdf83 ip/ipconfig: set ndb database file with -f argument 2015-01-10 11:27:45 -08:00
cinap_lenrek 6e67b04a1f igfx: use mmio to access registers instead of pio, fix wrong igfxmmio segment size
initially, pio was used to access registers so i didnt need
a kernel driver for initial testing.

pio does not work under efi, so use mmio to access registers.
2015-01-10 03:07:29 +01:00
cinap_lenrek 8d8935618c igfx: perserve frame start delay "magic" bits 27:28 in pipe conf register
it turns out, the "magic" bits 27:28 are the frame start
delay setting that need to be preserved.
2015-01-10 02:15:30 +01:00
cinap_lenrek 15590e39c6 igfx: implement hardware cursor
this can even be used with the vesa driver, just
enable the cursor after mode switch like:

echo hwgc igfxhwgc >/dev/vgactl
2015-01-09 22:23:25 +01:00
cinap_lenrek cf76346b37 igfx: fix some comments 2015-01-09 03:18:44 +01:00
cinap_lenrek ce8db466ba igfx: just kidding, heres the code :) 2015-01-09 02:58:14 +01:00
cinap_lenrek 6fe180657f igfx: work in progress intel graphics driver
this driver can modeset lvds on x200s and x230.
everything else is completely untested.
no hardware cursor implemented.
no vgadb entries are provided.
2015-01-09 02:55:12 +01:00
mischief 97d6d9ddaa vncs: add -A for no auth to usage 2015-01-06 20:13:16 -08:00
mischief 1bd467fc0e vncs: turn off auth with -A, do not require -c for -x 2015-01-05 20:21:40 -08:00
mischief 654450bc1d vnc: put newlines in verbose messages 2015-01-05 20:02:01 -08:00
ftrvxmtrx a053d902db aux/realemu: remove unused global 2015-01-02 19:07:40 +01:00
ftrvxmtrx 753bb6b87a aux/vga: revert vbegetmode 2015-01-02 19:07:01 +01:00
ftrvxmtrx 7848fe5970 aux/vga: do not set mode 3 unless connected 2015-01-02 13:29:58 +01:00
ftrvxmtrx 8b9badd6a6 aux/vga: fix switching with different mode
Prior to switching display, switch to text mode 3, which
is supported by anything, then set display, search for the
desired mode, load it if found. If not found, set the display
to the old one and switch to the old mode back.
2015-01-02 13:24:27 +01:00
cinap_lenrek 96595f5101 nedmail: do not recursively plumb email multipart attachments in print command 2015-01-02 12:05:35 +01:00
ftrvxmtrx c5da8810ee nusb/kb: fix alt/altgr being swapped for some reason 2015-01-01 22:53:17 +01:00
ftrvxmtrx f1b1e0d637 aux/vga: display switching for Intel adapters
Magic was discovered by abusing INT 10 on several machines
while switching cables back and forth and watching the end result.
2015-01-01 16:19:24 +01:00
ftrvxmtrx 04efb3a4a3 tcs: update charsets. Fixes issue #214 2015-01-01 11:20:23 +01:00
cinap_lenrek 6adf8466a2 hjfs: fix missing superblock dirty mark when reaming 2015-01-01 23:18:07 +01:00
aiju 941912f5ff hjfs: make -m default 4 MB instead of 40 KB 2014-12-31 20:04:10 +01:00
ftrvxmtrx 5935eeb6de aux/vga: scale only if mode was set successfully 2014-12-29 16:43:33 +01:00
ftrvxmtrx 774065caaa aux/vga: rescale after loading new mode
Intel VBIOS seem to not update its state unless in graphical
mode, so set the scaling mode after loading new graphical mode.
2014-12-29 10:06:29 +01:00
ftrvxmtrx d908aff72f aux/vga: remove -s option, move scaling to the size string itself 2014-12-28 17:42:38 +01:00
ftrvxmtrx 0d5b33a9e8 aux/vga: scaling modes for VESA 2014-12-26 17:01:58 +01:00
cinap_lenrek 7f5f69ebb5 socksd: revert back, previous commit broke UdpAssociate request
should probably figure out a better way to get public ip
address on a interface.
2014-12-26 11:41:53 +01:00
cinap_lenrek de349cf9b0 socksd: dont use myipaddr() for announcing address 2014-12-26 09:11:04 +01:00
cinap_lenrek 4e94094e94 5l: remove -f flag and add -F flag to disable VFP code generation
almost nobody uses FPA anymore, so make VFP the default but
provide -F flag to disable it.
2014-12-24 11:38:44 +01:00
cinap_lenrek d1799f65ca nusb/serial: fix nusb/serial hang with ftdi
have to create process, not a thread in ftdi code so main
process can exit after posting fs service.
2014-12-24 11:04:18 +01:00
cinap_lenrek 127f8f0480 tee: get rid of openf[100] array and just dup() filedescriptors to 3+[0..n-1] 2014-12-21 05:12:56 +01:00
ftrvxmtrx a11fe1959d merge 2014-12-21 01:30:36 +01:00
ftrvxmtrx 758496ecaa sam: '^' and '_' cmds; same as '<' and '|' except that stdout goes to the command window 2014-12-21 01:28:14 +01:00
cinap_lenrek ffe862c543 vblade: fix code so #pragma pack isnt needed 2014-12-19 03:57:27 +01:00
cinap_lenrek 6379939642 add erik quanstros vblade utility 2014-12-19 02:50:22 +01:00
mischief 84f45a4491 acme: allow typing '\n' in window tags 2014-12-17 14:27:31 -08:00
cinap_lenrek bc97fa79b1 audio/flacdec: fix pcmconv pipeline race (thanks mischief and henesy) 2014-12-15 07:26:03 +01:00
cinap_lenrek 5c1803e1ad disk/mkfs: add -o flag to list source files 2014-12-15 00:52:22 +01:00
ftrvxmtrx 0dc1929379 png: fail on invalid bpc 2014-12-14 22:20:06 +01:00
ftrvxmtrx 96525edaae various cmds: replace magic numbers with Kdel/Keof, etc 2014-12-13 21:58:49 +01:00
mischief ff4daa7e93 stats: handle 'q' to close
a side effect of this is keys typed other than q/Del no longer get drawn on top of the window.
2014-12-13 11:28:16 -08:00
cinap_lenrek 9be64bcb8d ndb/cs: fix spelling (thanks mischief) 2014-12-13 23:16:04 +01:00
cinap_lenrek 651fa5bd50 cfs: change default mountpoint to /mnt/cfs and fix the manual (thanks mischief) 2014-12-11 20:38:04 +01:00
cinap_lenrek 854d028db9 acme: fix buffer overrun in xfidutfread() and xfidruneread(), cleanup
the utf8 buffers b1 where allocated from fbufalloc() which gives
us BUFSIZE bytes, but Xfid->count can be bigger than that. so just
emalloc() the requested number of bytes.

when converting from Runes to utf-8, we have to account for the
terminating '\0' byte snprint() places, so fix the maxrune number
calculation instead of using BUFSIZE+1 as buffer size.
2014-12-11 20:20:47 +01:00
cinap_lenrek 86e63c36ed kbmap: fix sprint() buffer overflow (thanks silasm)
A buffer can be overflowed in the init function of kbmap.c by using a filename of more than 112 characters.

sample output:
% cd /sys/lib/kbmap
% touch aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
% kbmap
kbmap 1974: suicide: sys: trap: fault write addr=0xa6a96510 pc=0x000011df
offending code is most likely the call to sprint in the init function of /sys/src/cmd/kbmap.c,
which in this case writes /sys/lib/kbmap/$file to a 128-bit buffer.
I'm willing to submit a patch for this myself along with a few minor improvements/fixes to kbmap
if I can figure out the nuances of doing so.

--silasm
2014-12-11 18:32:50 +01:00
cinap_lenrek 1985bebbdd dnsgetip: filter negative answers, remove -f flag, use dnsgetip logfile 2014-12-10 02:30:25 +01:00
mischief 230cee347f ndb: add dnsgetip program to resolve A and AAAA records during bootstrapping 2014-12-09 16:18:08 -08:00
cinap_lenrek f9d379974a factotum: accept multiple bootstrap auth servers in /net/ndb and -a arguments
we might have to deal with multiple bootstrap auth server
ip addresses (ipv4 and ipv6) in the future, so deal with them.
2014-12-09 22:07:37 +01:00
cinap_lenrek ee6936365f secstore: allow multiple server addresses in $secstore and multiple -s arguments
on bootstrap, we might have to deal with multiple auth server ip
addresses (ipv4 and ipv6), so deal with it.
2014-12-09 21:53:07 +01:00
mischief ee2d30984f ip/ipconfig: treat /32 mask as /0
some dhcp servers send a mask of 255.255.255.255 to indicate the gateway is directly routeable.

thanks to david du colombier for this patch.
2014-12-08 17:27:40 -08:00
cinap_lenrek 501e69d010 ndb/dns: ignore terminating authoritative flag for no-answer when more nameservers are provided
continue recursing when we get empty but non-negative answer
from a (claimed) authoritative nameserer that provides more
nameservers.

this fixes wordpress dns:

63766.3: sending to 192.0.80.93/ns1.wordpress.com bossypally.files.wordpress.com ip
63766: rcvd OK from 192.0.80.93 (authoritative)
	Q:    bossypally.files.wordpress.com ip
	Auth: files.wordpress.com              5 min           ns   	mdns1.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns2.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns3.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns4.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns5.wordpress.com
	Hint: mdns1.wordpress.com              4 hr            ip   	192.0.75.7
	      mdns2.wordpress.com              4 hr            ip   	198.181.117.7
	      mdns3.wordpress.com              4 hr            ip   	198.181.116.7
	      mdns4.wordpress.com              4 hr            ip   	198.181.118.7
	      mdns5.wordpress.com              4 hr            ip   	192.0.74.7


63766.4: sending to 192.0.75.7/mdns1.wordpress.com bossypally.files.wordpress.com ip
63766: rcvd OK from 192.0.75.7 (authoritative)
	Q:    bossypally.files.wordpress.com ip
	Ans:  bossypally.files.wordpress.com   5 min           ip   	192.0.72.2
	      bossypally.files.wordpress.com   5 min           ip   	192.0.72.3
----------------------------
answer bossypally.files.wordpress.com   5 min           ip   	192.0.72.2
answer bossypally.files.wordpress.com   5 min           ip   	192.0.72.3
----------------------------

note the authoritative flag in the first response from ns1.wordpress.com that
would otherwise terminate the search.
2014-12-08 01:26:07 +01:00
mischief e584f7f374 resize: fix typo 2014-11-26 19:32:16 -08:00
mischief 250e120400 astro: fix typo 2014-11-26 18:56:00 -08:00
cinap_lenrek fbdaa03d84 wpa: handle essid: with whitespaces from ether ifstats file 2014-11-17 00:53:02 +01:00
cinap_lenrek 2310258d57 wpa: fix quoting for essid with spaces 2014-11-17 00:12:55 +01:00
BurnZeZ 73eea8402b abaco: cleanup, handle image/x-icon, don't use backspace as a hotkey, and remove urlconvience()/related functions 2014-11-16 09:58:21 -05:00
cinap_lenrek 242007de7c sed: fix error handling for "Output line too long" and other stuff
sed just continued writing past genbuf when it should stop
with "Output line too long".

quit when we get unspecified options.

stupid casts from long to char* for no reason.

some 0 vs nil cleanup.
2014-11-16 01:48:18 +01:00
cinap_lenrek 9841f7f3f5 upas/fs: handle ramfs and hjfs "file locked" error 2014-11-14 10:09:29 +01:00
cinap_lenrek 52c1f712ec upas/fs: handle cwfs "file is locked" error message 2014-11-14 23:36:18 +01:00
cinap_lenrek c79dc3263e httpfile: use webfs, fix 9p flushes
we can improve performance alot by using webfs which
does http keep alives for us, so connection setup
overhead is eleminated.

fix 9p flushes and double frees.
2014-11-12 12:03:51 +01:00
cinap_lenrek 95dbc72801 io: add -E flag to access embedded controller space 2014-11-10 00:35:07 +01:00
cinap_lenrek e4af9bc392 smtpd: cleanup hello() domain check code
theres no point in doing domain checks on literal ip addresses,
so handle that case early.
2014-11-08 09:00:04 +01:00
cinap_lenrek 4908ea43d7 merge 2014-11-08 05:23:59 +01:00
cinap_lenrek 9dfe587b27 smtpd: accept literal ipv6 addresses in HELO/EHLO 2014-11-08 05:22:25 +01:00
mischief cd3a742b32 all: typo fixes from ray@raylai.com 2014-11-07 10:39:50 -08:00
cinap_lenrek 797cc13c70 fix dangerous werrstr() usages
werrstr() takes a format string as its first argument.
a common error is to pass user controlled string buffers
into werrstr() that might contain format string escapes
causing werrstr() to take bogus arguments from the stack
and crash.

so instead of doing:
	werrstr(buf);

we want todo:
	werrstr("%s", buf);

or if we have a local ERRMAX sized buffer that we can override:
	errstr(buf, sizeof buf);
2014-11-07 12:51:59 +01:00
cinap_lenrek 9ac3a0c39e wpa: fork note group when going to background (thanks jpm)
bug: as jpm pointed out, when we run aux/wpa in rio window
and delete the window, aux/wpa was killed as it shared the
note group of the window.

fix: fork the notegroup.
2014-11-02 17:23:10 +01:00
cinap_lenrek 670493fe5e realemu: make sure instruction arguments are initialized even when decoding traps 2014-11-02 00:50:37 +01:00
cinap_lenrek bb33ba6b9a nusb/kb: dont set boot protocol on HidCSP interface when we failed to read report descriptor (thanks aap_)
this fixes wireless keyboard/mouse on raspi.
2014-10-31 20:40:13 +01:00
cinap_lenrek 2cfbc3c1cb mk9660: add -E option to create EFI boot entry 2014-10-31 03:06:09 +01:00
cinap_lenrek 840ade48c4 fix syslog() use with linefeeds for various programs 2014-10-29 17:29:09 +01:00
cinap_lenrek 4616c93e8d cs: fix linefeeds in syslog(), cleanup 2014-10-29 03:20:43 +01:00
cinap_lenrek fe23dcefd4 cs: use /net/ether* instead /net/ether[0123], dont remove srv file with -n, dont write dns logfile 2014-10-29 02:43:18 +01:00
cinap_lenrek c38cd50805 rio: dont serve a kbd file per window when we didnt got one from the environment
9vx doesnt provide a /dev/kbd file and rio faking one
up causes problems with vncv. (issue #223)
2014-10-25 02:05:44 +02:00
stanley lieber ca694c51ef pkg: change default repo to http://9front.org/pkg/386 2014-10-12 13:27:53 -04:00
BurnZeZ 748a95266f rio: fix "-cd dir" in mountspec being ignored 2014-10-11 11:47:38 -04:00
aiju 4f264cedfb added crc32 2014-09-30 13:07:36 +02:00
cinap_lenrek 4f4d71b941 hgfs: make data files with meta headers having the right size after open
to get the right data size of a file, the revlog needs to have been
opened and the metaheader parsed. as an optimization, we used to
open revlog only on the first read resulting revlogs with metaheaders
having the wrong size returned by fstat() until the first read().

tar relies on fstat() giving the correct file size, so just open
the revlog on open. reading directories can still yield the wrong
size but it is not that critical.
2014-09-29 21:01:51 +02:00
cinap_lenrek c1dc5d15c3 snap: change ulong return of stackptr() to uvlong for amd64 2014-09-29 20:11:58 +02:00
cinap_lenrek a494cc74ad ndb/dns: request recursion only for local dns servers
we used to set RD flag in requests unconditionally, which
is fine by the standard but some dns server administrators
seem to use it as a denial of service indicator (for ther
non recursive authoritative nameservers) and ignore the
request.

so only set the RD flag when talking to local dns servers.
2014-09-28 05:15:25 +02:00
cinap_lenrek decc7ec518 6c/8c: eleminate moves by swaping source and destination operands in peephole pass 2014-09-24 20:45:16 +02:00
cinap_lenrek 4cb032442a acid: fix sysr1() stack corruption
the syscall stubs (for amd64) currently have a unconditional
spill of the first (register) argument to the stack.

sysr1 (and _nsec) are exceptional in that they do not
take any arguments, so the stub is writing unconditionally
to ther first argument slot on the stack.

i could avoid emiting the spill in the syscall stubs for
sysr1 but that would also break truss which assumes fixed
instruction sequence from stub start to the syscall number.

i'm not going to complicate the syscall stubs just for
sysr1 (_nsec is not used in 9front), but just add a dummy
argument to sysr1 definition that can receive the bogus
argument spill.
2014-09-22 23:07:59 +02:00
cinap_lenrek 2604bc3603 stats: handle /dev/sysstat 32bit overflow in delta calculation
the numbers from /dev/sysstat overflow on 32bit, so have
to do subtraction modulo 2^32 as we calculate with 64bit
integers.

thanks mischief for reporting this.
2014-09-20 18:06:59 +02:00
cinap_lenrek ce80c5029e oggdec: recognize "begin of stream" packets and restart decoding 2014-09-16 20:25:01 +02:00
mischief e5c47ca18e ramfs: allow changing mtime in wstats 2014-09-15 15:49:39 -07:00
cinap_lenrek 7011194af1 ramfs: fix directory check in wstat() (thanks mischief) 2014-09-16 22:33:27 +02:00
cinap_lenrek 7f295c2055 telnetd: let the kernel place the shared segment in segattach() (thanks kenji arisawa) 2014-09-14 21:20:13 +02:00
mischief 8348a233ae vi: implement _nsec syscall 2014-09-13 06:07:57 -07:00
BurnZeZ 62a8bf1846 acme: remove unused #include 2014-09-11 12:47:04 -04:00
cinap_lenrek a49ddece8b ip/ayiya: experimental anything in anything tunnel protocol client
this is a work in progress implementation of the ayiya (anything
in anything) protocol as used by sixxs.net. hiro tested it and it
worked for him, but progress has stalled as sixxs.net rejected my
request for an account and ignored my emails since.
2014-09-06 22:59:58 +02:00
cinap_lenrek 3a322e9f32 5e: fix signed long multiply 2014-09-04 22:53:54 +02:00
cinap_lenrek e890c3d943 5e: push ERRMAX for note message on stack avoiding unaligned stack pointer 2014-09-03 19:23:55 +02:00
cinap_lenrek 7996878864 ipconfig: remove sleep() left over from debug :-) 2014-08-27 01:41:02 +02:00
cinap_lenrek 46b8a0ac00 ipconfig: fix readipifc() memory leaks in recvra6 and sendra6 processes
to avoid continuously leaking memory in recvra6 and sendra6
processes, pass the previous Ipifc* pointer to readipifc().
2014-08-27 01:12:42 +02:00
cinap_lenrek 7ad08a8515 ipconfig: cleanup code duplication in ip6cfg() 2014-08-26 21:09:57 +02:00
cinap_lenrek dbf165e1bd ping: don't spin when we get error reading icmp connection, print error and sleep 2014-08-26 21:07:59 +02:00
cinap_lenrek 2161885034 secstore: improve error messages, newSConn() can't fail 2014-08-21 01:18:36 +02:00
cinap_lenrek 98e3e12d92 5a: revert MOVM .S and .W are exclusive (broke bcm build) 2014-08-17 04:26:28 +02:00
iru 0bc51a90b0 Fix acme crash: Get D in a new window with D being an existing directory 2014-08-16 18:50:42 -03:00
cinap_lenrek a5bce84600 nusb/kb: delete code for keyboard boot protocol handling, just use hid parser
unify the keyboard and mouse readers into one using the hid
report parser for both. remove the keyboard protocol handling,
as it is now handled by hid parser and all we get is a sequence
of keycodes in Hiddev.k[] which we diff for up/down and translate
to pc scancodes.
2014-08-16 23:34:28 +02:00
aiju 74a276d076 spred: command window improvements 2014-08-14 10:42:39 +02:00
cinap_lenrek a67d18ccf1 import: make aan (-p flag) work in ``backwards mode'' (-B)
in backwards mode, the roles of the aan filters need to be
reversed. add "-n address" option to import to override the
announce address for the aan server part (default tcp!*!0).
2014-08-14 00:11:14 +02:00
cinap_lenrek d8d26c7001 nusb/ptp: do maxpkt reads to avoid babble error with usb 2.0 devices (thanks mischief!)
mischief got babble error with his mobile phone as we used to
read at max 64 bytes for the data response phase. his device
has 512 byte packet size.

thans to mischief for the patience.
2014-08-13 01:10:59 +02:00
mischief 53619de428 aux/8prefix: fix usage 2014-08-12 10:33:47 -07:00
mischief a0b7cabe3a secstore: read server from $secstore environment variable
this allows setting the secstore server with secstore=tcp!example.com!secstore or secstore='$secstore' to read from ndb.
2014-08-10 18:05:57 -07:00
cinap_lenrek 427e925eea cwfs: add optional uid argument to allow command, unify permission override code
the allow command now takes an optional uid argument for the user
to be granted temporary god status on the fileserver for maintenance.

this was kenji okomotos idea, so thanks :)

remove wstatallow and writeallow flags. instead, we have global:

int allowed;

that contains the uid of the currently allowed user id or -1
if permission checking is globally disabled for the fileserver.
when zero, normal permission checking takes place.

added int isallowed(File*) function that returns non-zero when the
context is the console, or the allowed user. this is also used internally
by iaccess(), so all the extra code of in the callers of iaccess()
is gone now.

dont conflate allowed user with noauth flag and auto-allow on ream.
the installer already knows about noauth and allow flags so theres no
problem with bootstraping.
2014-08-11 22:36:59 +02:00
cinap_lenrek 30d4d8984b 5a: MOVM.IA.W.S ..., [R15] is exception return and needs to be allowed (thanks aiju) 2014-08-09 18:23:14 +02:00
cinap_lenrek 760063ab57 cwfs: fix 32bit multiplication overflows for allocation sizes (thanks kenji okomoto) 2014-08-09 17:37:02 +02:00
cinap_lenrek 3472f91129 5a: reject MOVM instruction with .S and .W bits both set (aijus idea) 2014-08-09 22:47:46 +02:00
cinap_lenrek 0ceeee4c8b ndb/dns: fix nil dereference crash with convM2DNS() returning reqmsg.qd == nil 2014-08-08 02:06:03 +02:00
cinap_lenrek bc306a5a63 8c, 6c: generate enam.c file, just like 5c 2014-08-07 21:35:52 +02:00
cinap_lenrek d304dc8119 5a, 5l: add LDREX/STREX/CLREX instructions 2014-08-07 20:22:00 +02:00
cinap_lenrek 7c1ae2ead3 samterm: fix ctrl-b crash when cmd window resized (thanks revex)
for reference:

On IRC revex reported that samterm crashes on Ctrl-b if the command window has
been resized. I was able to reproduce:

http://plan9.stanleylieber.com/sam/bugs/ctrl-b.png

; acid 831213
/proc/831213/text:amd64 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/amd64
acid: lstk()
abort()+0x0 /sys/src/libc/9sys/abort.c:6
panic1(s=0x400448)+0x27 /sys/src/cmd/samterm/main.c:692
panic()+0x19 /sys/src/cmd/samterm/main.c:684
lldelete()+0x71 /sys/src/cmd/samterm/flayer.c:221
flupfront(l=0x40eac0)+0x18 /sys/src/cmd/samterm/flayer.c:139
	v=0x20062900000001
current(nw=0x40eac0)+0x49 /sys/src/cmd/samterm/main.c:156
type(l=0x40eac0,res=0x15300000001)+0x37c /sys/src/cmd/samterm/main.c:658
	t=0x40eaa8
	buf=0x419ec0
	p=0x41dd48
	a=0x0
	backspacing=0x200000000
	c=0x41dd4800000002
	cursor=0x0
	a0=0x0
threadmain(argv=0x7ffffeffefa0)+0x21c /sys/src/cmd/samterm/main.c:75
	r=0xb0000001b1
	got=0xfefefefe00000002
	chord=0x0
	nwhich=0x43c310
	scr=0x200000000
	t=0xfefefefefefefefe
	w=0x43c310fefefefe
mainlauncher()+0x18 /sys/src/libthread/main.c:59
launcheramd64(arg=0x4194a0,f=0x221673)+0x10 /sys/src/libthread/amd64.c:11
0xfefefefefefefefe ?file?:0
acid:
2014-08-04 09:33:23 +02:00
cinap_lenrek 15b5a980d7 iostats: properly distribute exit status and give usefull error messages 2014-08-03 17:09:28 +02:00
cinap_lenrek 718f3358bb iostats: remove unused fcallfmt, dont leak our mount pipe end into exportfs proc 2014-08-03 16:28:07 +02:00
cinap_lenrek d63734eb53 iostats: bring back standard filedescriptor spying 2014-08-03 16:02:47 +02:00
cinap_lenrek 5302e88796 exportfs: simplify freefile() code
remove impossible checks, rewrite as while loop.
2014-08-02 19:22:10 +02:00
cinap_lenrek b185d2fe5c exportfs: remove getsbuf() nil check, can't happen 2014-08-02 19:04:33 +02:00
cinap_lenrek 686cf0b0f3 iostats: isolate fs from interrupt notes
interrupt notes go to the child process, not the filesystem
and filter process.
2014-08-02 18:45:19 +02:00
cinap_lenrek 4f45a40334 iostats: cannot spy on fd 0,1,2 as /fd is per process 2014-08-02 15:47:24 +02:00
cinap_lenrek 73d35f9c7d exportfs: cleanup 2014-08-02 15:07:29 +02:00
cinap_lenrek 7ae4e473da ftpfs: dont convert names to latin when string is valid utf-8 2014-08-02 14:37:16 +02:00
cinap_lenrek 7cc757c3c0 python: disable symlink and readlink compile options, ape has no reasonable way emulating it 2014-08-02 14:28:19 +02:00
cinap_lenrek dc501ae1e3 iostats: dont prefix /bin to argv[0] when already absolute or relative path 2014-08-02 03:06:09 +02:00
cinap_lenrek 4e42b9996f iostats: cleanup, remove bogus Maxrpc constant 2014-08-02 02:41:57 +02:00
cinap_lenrek 23aaa0c59c iostats: reimplement iostats as a 9p filter instead of duplicating exportfs
old iostats failed to work when builidng the kernel due to old bugs
that where already fixed in exportfs. instead of backporting the fixes,
reimplement iostats as a filter that sits between exportfs and the
process mount. from users perspective, theres no difference.

the result is much smaller and can handle everything that exportfs
can like /srv.
2014-08-02 02:30:19 +02:00
cinap_lenrek 1b70ab5979 exportfs: use argv0 instead of hardcoding "/bin/exportfs" in openmount(), dont use 0 for nil 2014-08-01 16:57:39 +02:00
aiju 709e78b9f9 spred: scrolling and other bugfixes 2014-07-31 11:36:24 +02:00
aiju 712fd30652 added sprite editor spred 2014-07-30 15:57:14 +02:00
cinap_lenrek a2f7d03d4e rc: fix slow Xqdol(), avoid recursion in conclist(), estrdup(), avoid copying
Xqdol() used to take quadratic time because of strcat(),
the code isnt really needed as list2str() aready does the
same thing in linear time without the strcat().

add estrdup() which uses emalloc() so allocation error are
catched.

move strdups() of name from callers into newvar().

avoid recursion of conclist(), and avoid copying of word
strings by providing Newword() function which doesnt copy
the word string.
2014-07-23 15:28:37 +02:00
cinap_lenrek 6273bad12d ratrace: make multithreaded ratraces less confusing (for mischief) 2014-07-22 21:54:26 +02:00
cinap_lenrek e4436ec0bb page: fix deadlock with addpage (thanks BurnZeZ for the stacktraces)
addpage() should not be called with the display locked as it
calls showpage1() which sleeps when there are too many
processes active.

the bug was triggered by plumbing to trigger the addpage().
2014-07-15 20:45:00 +02:00
cinap_lenrek cc001c31a7 tftpfs: make sure path is null terminated 2014-07-13 01:17:48 +02:00
cinap_lenrek 4b7b1218bf ftpd: dont skip unmountnet() and return proper error string from dialdata() 2014-07-13 01:03:17 +02:00
cinap_lenrek e14eaacce6 tftpd: fix error string packet overflow in nak(), fix syslog reporting 2014-07-13 01:00:02 +02:00
cinap_lenrek 6bfff754a8 abaco: fix double free race of p->status string (thanks BurnZeZ for the proc snap) 2014-07-09 23:55:54 +02:00
cinap_lenrek 8677db333a nusb/serial: implement flushes
handle reads and writes with 9pqueue(2) so they can
be flushed and wont hang the filesystem. this also
lets us get rid of the timeouts.

ftdi is still full of braindamage that should be
rewritten, but i dont have a device to test.
2014-07-05 08:17:37 +02:00
cinap_lenrek 502247bf92 nusb/serial: more cleanup 2014-07-05 06:01:03 +02:00
cinap_lenrek 336e605a11 support for huawei e220 g3 modem, cleanup nusb/serial 2014-07-05 23:19:13 +02:00
cinap_lenrek 4ad63a4c56 nusb: fix spelling, sorry 2014-06-28 19:55:14 +02:00
cinap_lenrek 7d9339f75e merge 2014-06-28 18:11:04 +02:00
cinap_lenrek 4275c49e72 nusb: implement aijus stable uniqueue device names
instead of naming devices by ther dynamically assigned device address,
we hash device uniqueue fields from the device descriptor and produce
a 5 digit hex string that will identify the device across machines.

when there is a collision (less than 1% chance with 100 devices),
usbd will append the device address to the name to make it uniqueue
for this machine.

the hname is passed to drivers in the devid argument, which now has
the form addr:hname, where the colon and hname can be omited (for backwards
compatibility).

when the new behaviour isnt desired, nousbhname= environment variable
can be defined giving the old behaviour.
2014-06-28 18:09:43 +02:00
cinap_lenrek d8c75e45de iostats: more procs 2014-06-28 17:53:57 +02:00
mischief 9d30b0f32d merge 2014-06-27 23:51:14 -07:00
mischief 5aee1a997f unzip: fix usage 2014-06-27 23:50:42 -07:00
cinap_lenrek ec572a53a9 ptp: fix alignment assumptions for amd64 2014-06-28 01:36:37 +02:00
mischief a1dad87446 upas/fs: disable imap mail fetch pipeline due to race
pipeline = 1 with a dovecot imap server causes FETCH and OK responses
get interleaved so some message bodies accidentally get merged together.
disabling it will make fetching mail over imap slower, but it works.
2014-06-25 22:06:29 -07:00
cinap_lenrek 4f95d75098 ed: dont pass string constants to mktemp() 2014-06-22 01:48:02 +02:00
cinap_lenrek fa09758a73 samterm: use 4K stacks for amd64 (thanks burnzez)
we got a stack overflow on the hostproc on amd64 overflowing
by arround 200 byte. so just use 4K stacks for everything.
2014-06-11 19:31:14 +02:00
mischief 906cc83c35 mkpaqfs: english 2014-06-09 05:05:59 -07:00
cinap_lenrek 01b5ac1402 iostats: add -C flag to enable mount cache 2014-06-08 18:54:36 +02:00
cinap_lenrek 3d12f4f408 iostats: dont sysfatal on 9p read error due to program termination
the note mechanism is racy and can lead to the fs terminating
iostats because it gets "i/o on hugup channel" (namespace closed).
2014-06-08 18:27:39 +02:00
ftrvxmtrx 2739c6514a file: djvu 2014-06-07 23:16:34 +02:00
cinap_lenrek 524720a58d file: detect NES and SEGA rom files, fix newline 2014-06-06 01:29:14 +02:00
cinap_lenrek 863a459691 webfs: explicitely unmount old /mnt/web (thanks BurnZeZ)
webfs forks the namespace to isolate itself from its mount
point which has the side effect that it captures the mount
of previous instances of webfs mounted on /mnt/web.

explicitely unmount the mountpoint in our namespace copy
to drop the reference.
2014-06-04 17:45:08 +02:00
cinap_lenrek 93d0474f77 nusb/usbd: cleanup 2014-06-03 21:40:30 +02:00
cinap_lenrek 5ab9f9c621 nusb/usbd: serialize /dev/usbevent processing
when there are multiple readers of /dev/usbevent, we have to
serialize the processing to make sure that only one driver
is opening the devices control endpoint at a time.

to do this, we assume the device is busy after reading the
event file until the next read or clunk on the same fid.

to mark a device busy, we set the dev->aux pointer to the
fid processing a event. And the Event structure takes a
reference to the device producing the event.

the problem arised from cdc ethernet and nusb/serial sharing
the same device class, and we need to run the particular driver
to figure out if the device can be used. doing this concurrently
fails because devusb allows only one open per endpoint.
2014-06-03 07:21:48 +02:00
Aram Hăvărneanu bf0d5c8abb 6a, 6c, 6l: fix copy propagation
Without an explicit signal for a truncation, copy propagation will
sometimes propagate a 32-bit truncation and end up overwriting uses of
the original 64-bit value.

This was independently discovered and fixed in Go. See:
	http://golang.org/issue/1315
	https://codereview.appspot.com/6002043/

Thanks Charles Forsyth for tips and advice.
2014-05-30 12:28:01 +02:00
cinap_lenrek 17d0dea87c we look for strings.c, it is broken, this strings.c will make us go. 2014-05-30 04:05:18 +02:00
cinap_lenrek 20883bd7de cpu: remove duplicate environment and chdir($home) code (thanks qrstuv)
newns() (called by auth_chuid()) already prepares the
environment variables and puts us in a sane working
directory (as specified by the namespace file).
2014-05-24 02:09:52 +02:00
cinap_lenrek e7b94ba052 syscall: add missing _nsec() declaration 2014-05-20 05:21:22 +02:00
cinap_lenrek c7be3ba9e6 init: dont interpret environment var contents as fmtstring, cleanup 2014-05-19 06:58:53 +02:00
cinap_lenrek 7ae98ac5a6 ip/torrent: use "torrent" as default user agent 2014-05-19 04:56:07 +02:00
cinap_lenrek 1055b951f3 ip/torrent: fix usage, add -A option to set user-agent
trackers do like the new default Mozilla/5.0 (compatible)
user agent. so force useragent to hjdicks and give option
to override it in case trackers get even more clever in
the future.
2014-05-19 23:23:08 +02:00
cinap_lenrek c994152a90 ipconfig: fix dhcp watch
in dhcpwatch, the sleep time "secs" could become
zero potentially freezing the lease time.

give up when in Sinit state in dhcpquery() as this
is a terminal state.
2014-05-18 19:20:31 +02:00
ftrvxmtrx 704bd2b513 samterm: fix esc, change ctrl+b behaviour to a more useful one (thanks cinap) 2014-05-12 14:19:22 +02:00
ftrvxmtrx e993ea3e30 samterm: clean up key defines. use ctrl+b as in rio 2014-05-12 12:58:24 +02:00
cinap_lenrek 679b092ee0 htmlfmt: use uhtml for character set conversion 2014-05-12 02:38:53 +02:00
cinap_lenrek edca217bb9 tcs: handle surrogate pairs 2014-05-11 00:54:59 +02:00
cinap_lenrek 7388792a12 tcs: prevent accidents with runes beyond 16-bit 2014-05-11 22:29:47 +02:00
cinap_lenrek 14cd6df332 tcs: fix inplace 16 bit unicode conversion
inplace conversions do not work anymore as
Rune is not unsigned short anymore.
2014-05-10 17:28:17 +02:00
cinap_lenrek 807af1d847 webfs: use mozilla compatible user agent as default
sites like google return the wrong characterset when
they do not recognize the user-agent. so setting default
user agent to something thats likely to pass these
idiotic browser tests.
2014-05-09 18:22:51 +02:00
cinap_lenrek 144c4ab223 abaco: need more stack on amd64 2014-05-09 17:16:34 +02:00
cinap_lenrek 87fd5240f0 remove old copies of kernels l.s from cmd/?a 2014-05-08 18:48:51 +02:00
cinap_lenrek 47d131c088 abaco: remove strange line 2014-05-08 18:41:30 +02:00
ftrvxmtrx 7ea0732c55 tail: fix follow for empty files (thanks cinap_lenrek) 2014-05-08 14:29:44 +02:00
ftrvxmtrx 1c835e370f tail: seek to EOF to check if seekable. fixes tail on /proc files 2014-05-08 12:33:24 +02:00
cinap_lenrek f4f2ff6038 hgfs: avoid revlogupdate() calls when reading root (thanks burnzez)
we do not need to check for revlog updates on every
(directory) read when reading the root. only do it
when reading from the start.
2014-05-08 22:20:26 +02:00
ftrvxmtrx 428cc541f8 sed: remove unused ecmp function 2014-05-07 14:43:11 +02:00
cinap_lenrek 3426459ab5 cc: fix spurious warning on comparsion with scope redeclared variable (thanks aiju)
> warning: a.c:9 useless or misleading comparison: UINT < 0

the error can be observed by compiling the following code
with warnings enabled:

#include <u.h>
#include <libc.h>

uint r;

void
main(int argc, char *argv[])
{
	int r;

	if(r < 0){
		exits(0);
	}
}

the offending code in the compiler is:

-	if(l->op == ONAME && l->sym->type){
-		lt = l->sym->type;
-		if(lt->etype == TARRAY)
-			lt = lt->link;
-	}

compiler handles scope by overwritin and reverting
symbols while parsing. in the ccom phase, the nodes symbol
(n->sym) is not in the right scope and we wrongly think r
is uint instead of int.

it is not clear to me what this code tried to accomplish in
the first place nor could anyone answer me this question.

the risk is small as this change doesnt affect the compiled
program, only the warning, so removing the offending code.
2014-05-06 21:36:28 +02:00
cinap_lenrek ff7d68e41a gs: fix /undefined in --setcolor-- errors on amd64 2014-05-05 00:49:26 +02:00
cinap_lenrek 826f4c0daf gs: remove PStorage data type from ttf interpreter
i dont see that pointers are stored in PStorage at all,
so just use PLong directly avoding all this confusion.
2014-05-04 00:17:27 +02:00
cinap_lenrek 9cc9d6113c gs: fix truetype interpreter for amd64 2014-05-04 23:31:59 +02:00
ftrvxmtrx d2c3185bfa fix threadsetname usage in few places 2014-05-03 13:07:52 +02:00
ftrvxmtrx 306bee92e1 uniq: use Bsize for buffers 2014-05-03 10:48:13 +02:00
cinap_lenrek 4c639475ce cwfs: fix 1GB memsize limitation
the malloc pool allocator is limited in its allocation
size. as almost all data structures in cwfs are never
freed, use brk() in ialloc() instead of mallocalign().
this means memory returned by ialloc() cannot be freed!

to make sure we do not call free by accident, remove
the #define malloc(n) ialloc(n, 0) macro and use ialloc()
directly as in the original code to show the intend
of permanent allocations.
2014-05-03 00:51:45 +02:00
ftrvxmtrx 72e4d850a4 wc: simplify and avoid buffer overflow on long filenames 2014-05-03 23:38:17 +02:00
cinap_lenrek bd3e9e4b7c 1l, 2l, 7l, kl, vl: add missing setmalloctag() dummy in compat.c 2014-05-02 05:17:40 +02:00
ftrvxmtrx e610c573d7 samterm: free() after getenv() 2014-05-02 03:47:18 +02:00
cinap_lenrek 391198888a 8c, 6c: fix peephole bug for eleminating CMPL $0,R after shift
the shift instructions does not change the zero flag
when the shift count is 0, so we cannot remove the
compare instruction in this case.

this fixes oggdec under 386.
2014-04-28 22:53:50 +02:00
ftrvxmtrx 7b8f4b25be btc mkfile: mkdir -p 2014-04-28 22:39:12 +02:00
ftrvxmtrx 6a905b4560 tr: fix 4-byte runes fix (thanks rsc) 2014-04-26 14:26:40 +02:00
cinap_lenrek 0753d7852d revert previous change, i was confused. 2014-04-24 22:02:47 +02:00
cinap_lenrek 634b40fe27 nusb: use ep->addr instead of ep->id in unstall() library function
this is not a bug, but using ep->addr makes the intend more clear.
2014-04-24 22:00:31 +02:00
ftrvxmtrx 70d7f4c32a nusb/rndis: avoid allocation on each transmission
The slack space for outgoing packets set to 44+16 bytes.
2014-04-23 21:20:11 +02:00
cinap_lenrek 41908149de nusb: resolve endpoint id conflict with different input and output types
ftrvxmtrx repots devices that use the endpoint number for
input and output of different types like:

 nusb/ether:             parsedesc endpoint 5[7]  07 05 81 03 08 00 09	# ep1 in intr
 nusb/ether:             parsedesc endpoint 5[7]  07 05 82 02 00 02 00
 nusb/ether:             parsedesc endpoint 5[7]  07 05 01 02 00 02 00	# ep1 out bulk

the previous change tried to work arround this but had the
concequence that only the lastly defined endpoint was
usable.

this change addresses the issue by allowing up to 32 endpoints
per device (16 output + 16 input endpoints) in devusb. the
hci driver will ignore the 4th bit and will only use the
lower 4 bits as endpoint address when talking to the usb
device.

when we encounter a conflict, we map the input endpoint
to the upper id range 16..31 and the output endpoint
to id 0..15 so two distinct endpoints are created.
2014-04-23 20:03:01 +02:00
ftrvxmtrx 2ef8c9ed41 nusb: workaround for endpoints with same index but different types
nusb code assumes endpoint numbers are unique.  It's true in general
case, but it becomes false once the direction bit is ignored.  The
commit adds a check so that two endpoints of different types are not
merged into one with Eboth direction.  It does overwrite endpoint
though, so it shouldn't be considered as a full fix.
2014-04-23 23:45:00 +02:00
ftrvxmtrx 99c0abc76d nusb/ether: add RNDIS support (tested on Nexus 5) 2014-04-22 23:34:52 +02:00
cinap_lenrek b94c766fef nusb: dont include <bio.h>, we'r not using it (thanks erik) 2014-04-19 16:18:39 +02:00
cinap_lenrek 8d0e4cf37b wpa support for tcp boot, remove duplicate secstore code from factotum
to run aux/wpa at boot, we need factotum to be running. tho
factotum was started only after the network was configured.

what we do now is start factotum early, not fetching keys
from secstore. once network is available and the auth server
is known, we fetch keys from secstore using auth/secstore in
bootrc.

to pass the authserver for p9 authentication to factotum, we
write it in /net/ndb and the special _authdial() in factotum
will picks it up.

as we are using auth/secstore binary in any case, we remove
the duplicated secstore code from factotum and make it just
exec auth/secstore to fetch the keys on startup (unless -n
or -S is specified).
2014-04-18 20:55:41 +02:00
cinap_lenrek 6a7ba3d24a secstore: fix wrong "readnvram %r" error status 2014-04-18 20:41:43 +02:00
ftrvxmtrx 9204ed8910 nusb/kb: fix trackpoint on thinkpad usb keyboard
The trackpoint has no subclass, but it's still a pointer device.
Also close the device while we are here.
2014-04-18 16:43:43 +02:00
cinap_lenrek d9ea4a71b9 secstore: fix gfile/pfile/rfile array sizes
need to have one more entry for terminating nil
2014-04-17 18:57:58 +02:00
cinap_lenrek 75079ab18c vga: add support nVidia 7600GS (and possibly 7950) (from kenji okamoto) 2014-04-15 09:40:41 +02:00
cinap_lenrek 7058640179 webfs: do not unescape escape 2014-04-03 09:44:48 +02:00
cinap_lenrek 8515f4ecb7 eqn: fix parallel build (thanks eekee)
dont just mv y.tab.c, this can cause y.tab.c and y.tab.h to
be accidently regenerated breaking parallel build.
2014-04-03 23:20:48 +02:00
cinap_lenrek 50e2c9b4d4 sam, acme: fix character classes quoting for 21-bit runes
quote handling was broken with 21-bit runes. nextrec()
returned quoted rune as long rune | (Runemax+1) to escape
it.

with 16-bit runes, storing that long into 16-bit Rune
would automatically remove the escaping, but with 21-bit
runes, Rune is uint32 so the escaping would remain. we
now use (Runemask+1) instead, and mask the escaping off
explicitely when storing back to Rune.
2014-04-01 06:04:00 +02:00
cinap_lenrek 0c1dd57544 grep: fix tab2, use int instead of Rune to be compatible to 16bit rune system 2014-03-30 18:11:51 +02:00
cinap_lenrek 4d0a446123 grep: fix wrong rlcass splitting (thanks erik and kenji)
add 0xffff to tab1 as range 0xffff-0x10ffff has 4 byte utf-8 sequence.
use Runemax (0x10ffff) instead of Runemask (0x1fffff) to denote
the last valid rune for inverted [^] match as Runemask is out of the
valid rune space.
2014-03-30 04:29:04 +02:00
cinap_lenrek cde97a4d5f 6c, 8c: optimize away CMPL/CMPQ reg, $0 instruction in peephole pass
when the previous instruction sets the zero flag,
we can remove the CMPL/CMPQ instruction.
this removes compares for zero/non zero tests only.
it only looks at the previous non-nop instruction
to see if it sets our compare value register.
2014-03-29 19:44:04 +01:00
BurnZeZ 91bed257fa ramfs: fix srvname; postmountsrv() already prepends /srv/ 2014-03-26 16:48:40 -04:00
cinap_lenrek 1641d9908b audio/oggdec: wait for pcmconv child process to exit
we have to wait for the pcmconv process to exit before
exiting yourselfs because otherwise pcmconv could
keep /dev/audio open and prevent further reopens for
a short period of time.
2014-03-26 18:39:58 +01:00
cinap_lenrek ffb120199a auth/login: find authdom instead of using hardcoded cs.bell-labs.com (thanks erik) 2014-03-23 18:10:04 +01:00
cinap_lenrek 393dfd1ced 8c, 6c: fix mulgen botch error for handling multiplication by zero constant 2014-03-21 19:05:17 +01:00
cinap_lenrek 1c2fc52081 ramfs: replace with new lib9p based implementation
old ramfs had a limit on the number of files it could serve
and file size was limited to maximum allocaiton size.

the new implementation uses multiple memory chunks to back file data
in a private compactable memory pool to overcome these limits.
files can be sparse. file metadata is maintained by 9pfile data
structures of lib9p.
2014-03-14 21:15:16 +01:00
cinap_lenrek ff677a1cb4 cpu: make -p work with explicit service in dialstring (same as import) 2014-03-14 03:54:08 +01:00
cinap_lenrek 8fb212515d import: make import -p work with explicit service in dialstring (thanks mischief)
mischief → ; import -p tcp!9.offblast.org!17007 / /n/9
mischief → -> import: can't mount /: EOF receiving fversion reply
mischief → on the console
mischief → bmo Mar 13 18:55:30 dialing tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 reconnected to tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 connected from 199.191.58.44
mischief → bmo Mar 13 18:55:34 exiting...bmo Mar 13 18:55:30 dialing tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 reconnected to tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 connected from 199.191.58.44
mischief → bmo Mar 13 18:55:34 exiting...
mischief → aan is dialing the *exportfs* port because i explicitly specified it
2014-03-14 03:48:26 +01:00
cinap_lenrek eed4871674 exportfs: avoid closing netfd in filter()
netfd is initially zero (stdin), when filter() closes fd0,
fd0 is free to be reused. this causes problems with openmount()
that assumes sfd being >2.

instead, we dup the our pipe end over netfd, and close the pipe.
2014-03-11 07:03:15 +01:00
cinap_lenrek 760b3d0667 5e: remove newline from suicide string 2014-03-10 23:20:01 +01:00
cinap_lenrek 3aeca15d3c 5e: trap unaligned memory access 2014-03-10 23:16:47 +01:00
aiju 26a8accad2 nusb: added joy 2014-03-09 18:03:07 +01:00
cinap_lenrek f05af31f36 5e: fix amd64 2014-03-08 21:07:57 +01:00
stanley lieber 0c005b5105 mothra: handle blank lines inside <pre> tags 2014-03-07 11:44:05 -05:00