]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
9 years agonintendo(1): update for gbc compatability
stanley lieber [Fri, 10 Apr 2015 22:32:22 +0000 (18:32 -0400)]
nintendo(1): update for gbc compatability

9 years agomerge
cinap_lenrek [Sat, 11 Apr 2015 20:05:00 +0000 (22:05 +0200)]
merge

9 years agoether82563: work arround bad eeprom checksum for some i218 card (thanks BurnZeZ)
cinap_lenrek [Sat, 11 Apr 2015 20:03:47 +0000 (22:03 +0200)]
ether82563: work arround bad eeprom checksum for some i218 card (thanks BurnZeZ)

on some machines, the eeprom checksum reads out as 0x3ABA
because of some bios issue. adding a flag for ignoring the
checksum and on i218 controllers.

9 years agomothra(1): replace code.google.com with code.9front.org
stanley lieber [Fri, 10 Apr 2015 19:00:05 +0000 (15:00 -0400)]
mothra(1): replace code.google.com with code.9front.org

9 years agobootrc: simplify bootargs splitting avoiding awk
cinap_lenrek [Thu, 9 Apr 2015 13:36:20 +0000 (15:36 +0200)]
bootrc: simplify bootargs splitting avoiding awk

9 years agopc, pc64: remove PCICONS debug buffer from pci.c
cinap_lenrek [Thu, 9 Apr 2015 12:55:01 +0000 (14:55 +0200)]
pc, pc64: remove PCICONS debug buffer from pci.c

9 years agopool: avoid triggering assert(b->magic != FREE_MAGIC) in blocksetsize() for mallocali...
cinap_lenrek [Wed, 8 Apr 2015 19:04:10 +0000 (21:04 +0200)]
pool: avoid triggering assert(b->magic != FREE_MAGIC) in blocksetsize() for mallocalignl()

when we trim the front of a block with freefromfront(),
the block magic of the back was not initialized which
could sometimes trigger the assert in blocksetsize()
to fail. fix is to just move the initialization of the
magic field before the blocksetsize() call.

the second b->magic = UNALLOC_MAGIC isnt really required
but just done for consistency with the trim() code above.

9 years agonusb/kb: always try to recover on error, fix recover for multi-function devices
cinap_lenrek [Wed, 8 Apr 2015 16:07:16 +0000 (18:07 +0200)]
nusb/kb: always try to recover on error, fix recover for multi-function devices

when we get an i/o error, always call hdrecover() which
will reset the port and reinitialize the interface of
the calling processes endpoint.

handle the case when we have multi-function device with
multiple reader procs in hdrecover(). the sequence is
as follows:

1) any of the reader procs encounters i/o error and calls hdrecover(),
acquires qlock and initiates port reset.
2) any other readerprocs will now encounter i/o error (due to reset) and also call
hdrecover() but will be waiting on the qlock for reset to complete.
3) first process completes reset and reinitializes its interface with setproto()
and then releases the qlock for the other readers todo the same.

9 years agopci: just in case the bios is drunk
cinap_lenrek [Wed, 8 Apr 2015 01:46:49 +0000 (03:46 +0200)]
pci: just in case the bios is drunk

9 years agopc, pc64: handle 64-bit pci membars
cinap_lenrek [Wed, 8 Apr 2015 01:34:08 +0000 (03:34 +0200)]
pc, pc64: handle 64-bit pci membars

this avoids listing the upper half of 64-bit membars
in Pcidev.mem[] array avoiding potential confusion
in drivers.

we also check if the upper half is programmed to zero
by bios and otherwise zap the entry in Pcidev.mem[]
and print a warning.

9 years agopc, pc64: extend initial memory map for qemu multiboot data
cinap_lenrek [Wed, 8 Apr 2015 00:50:09 +0000 (02:50 +0200)]
pc, pc64: extend initial memory map for qemu multiboot data

qemu puts multiboot data after the end of the kernel image, so
to be able to KADDR() that memory early, we extend the initial
identity mapping by 16K. right now we just got lucky with
the pc kernel as it rounds the map to 4MB pages.

9 years agopc: import intel i218 nic changes from 9atom
mischief [Tue, 7 Apr 2015 18:38:48 +0000 (11:38 -0700)]
pc: import intel i218 nic changes from 9atom

9 years agokernel: move arrow cursor definition to port/devmouse.c
cinap_lenrek [Tue, 7 Apr 2015 20:05:48 +0000 (22:05 +0200)]
kernel: move arrow cursor definition to port/devmouse.c

9 years agosgi: disable graphical arcs console printing on screen modeset
cinap_lenrek [Tue, 7 Apr 2015 20:02:57 +0000 (22:02 +0200)]
sgi: disable graphical arcs console printing on screen modeset

when we switch to graphics mode, we do not want graphical arcs console
to print on the screen anymore as it assumes 8bit color mode and just
messes up the screen on kernel prints.

9 years ago/lib/rob: Да!
stanley lieber [Thu, 2 Apr 2015 22:56:31 +0000 (18:56 -0400)]
/lib/rob: Да!

9 years agosgi: keyboard, mouse and cursor for indy
cinap_lenrek [Thu, 2 Apr 2015 16:35:43 +0000 (18:35 +0200)]
sgi: keyboard, mouse and cursor for indy

9 years agogames/gb: improved audio code
aiju [Thu, 2 Apr 2015 13:30:12 +0000 (15:30 +0200)]
games/gb: improved audio code

9 years agomerge
cinap_lenrek [Thu, 2 Apr 2015 03:31:23 +0000 (05:31 +0200)]
merge

9 years agogames/gba: fix -3 crash and prevent >100% speed
aiju [Thu, 2 Apr 2015 20:09:34 +0000 (22:09 +0200)]
games/gba: fix -3 crash and prevent >100% speed

9 years agoaudiohda: add AMD FCH Azalia Controller (thanks qeed)
cinap_lenrek [Thu, 2 Apr 2015 03:30:00 +0000 (05:30 +0200)]
audiohda: add AMD FCH Azalia Controller (thanks qeed)

9 years agogames/gb: fix gbc dma
aiju [Wed, 1 Apr 2015 17:27:52 +0000 (19:27 +0200)]
games/gb: fix gbc dma

9 years agogames/gb: fix -2/-3
aiju [Wed, 1 Apr 2015 17:02:03 +0000 (19:02 +0200)]
games/gb: fix -2/-3

9 years agonew games/gb: better emulation and gbc support
aiju [Wed, 1 Apr 2015 14:17:17 +0000 (16:17 +0200)]
new games/gb: better emulation and gbc support

9 years agoether8169: fix Macv45
cinap_lenrek [Wed, 1 Apr 2015 13:22:37 +0000 (15:22 +0200)]
ether8169: fix Macv45

9 years agoether8169: add 8168GU mac id (thanks qeed)
cinap_lenrek [Wed, 1 Apr 2015 12:58:29 +0000 (14:58 +0200)]
ether8169: add 8168GU mac id (thanks qeed)

9 years agogames/c64: writes to I/O area do not affect underlying memory (documentation lied)
aiju [Wed, 1 Apr 2015 10:49:59 +0000 (12:49 +0200)]
games/c64: writes to I/O area do not affect underlying memory (documentation lied)

9 years agodevkbd: remove kbdputc() unused definition.
cinap_lenrek [Wed, 1 Apr 2015 10:21:11 +0000 (12:21 +0200)]
devkbd: remove kbdputc() unused definition.

9 years agodevkbd: remove unused constants
cinap_lenrek [Wed, 1 Apr 2015 10:15:54 +0000 (12:15 +0200)]
devkbd: remove unused constants

9 years agomerge
cinap_lenrek [Tue, 31 Mar 2015 23:32:37 +0000 (01:32 +0200)]
merge

9 years agogames/gba: remove debugging print
aiju [Wed, 1 Apr 2015 20:16:52 +0000 (22:16 +0200)]
games/gba: remove debugging print

9 years agosgi: very primitive newport graphics driver for indy
cinap_lenrek [Tue, 31 Mar 2015 23:31:31 +0000 (01:31 +0200)]
sgi: very primitive newport graphics driver for indy

9 years agovl: prevent stack altering instructions to be hoisted above loads
cinap_lenrek [Tue, 31 Mar 2015 23:30:16 +0000 (01:30 +0200)]
vl: prevent stack altering instructions to be hoisted above loads

fixes bug with libmemdraw where the linker would hoist
the final ADD $const, SP at the end over loads from the
stack causing the front to fall off once a interrupt hits.

9 years agowebpaste: update for modified okturing.com
stanley lieber [Tue, 31 Mar 2015 00:53:49 +0000 (20:53 -0400)]
webpaste: update for modified okturing.com

9 years agonintendo(1): add SOURCE entry for games/gba
cinap_lenrek [Mon, 30 Mar 2015 13:55:50 +0000 (15:55 +0200)]
nintendo(1): add SOURCE entry for games/gba

9 years agosgi: preserve R27 in setregisters(), use setregisters() in noted()
cinap_lenrek [Sun, 29 Mar 2015 22:26:33 +0000 (00:26 +0200)]
sgi: preserve R27 in setregisters(), use setregisters() in noted()

GEVector() saves the exception return PC in Ureg.r27 which needs
to be preserved.

there should be no reason for the user to change the status
register from noted() eigther, so we now just use setregisters()
in noted() to restore previous general purpose registers. this
means that CU1 will always be off after noted() because notify()
has disabled the FPU on entry and set fpstatus to FPinactive
if it was on. once user starts using FPU again, it will trap and
restore fpu registers.

9 years agomerge
cinap_lenrek [Mon, 30 Mar 2015 21:46:31 +0000 (23:46 +0200)]
merge

9 years agoetherseeq: reset the card when it gets stuck (dma timeouts)
cinap_lenrek [Mon, 30 Mar 2015 21:45:09 +0000 (23:45 +0200)]
etherseeq: reset the card when it gets stuck (dma timeouts)

9 years ago/lib/faces: add eekee.1
stanley lieber [Sun, 29 Mar 2015 01:08:35 +0000 (21:08 -0400)]
/lib/faces: add eekee.1

9 years agomerge
cinap_lenrek [Sat, 28 Mar 2015 13:12:35 +0000 (14:12 +0100)]
merge

9 years agosgi: new approach for etherseeq
cinap_lenrek [Sat, 28 Mar 2015 13:11:17 +0000 (14:11 +0100)]
sgi: new approach for etherseeq

touching transmit descriptors while dma is running causes the
front to fall off. new approach keeps a counter of free
descriptors in the Ring structure that is incremented
by txintr() when transmit completed.

txintr() will clean descriptors once dma has stopped and
restart dma when there are more descrtors in the chain.

9 years agogames/gba: very subtle timer bug fixed
aiju [Sat, 28 Mar 2015 09:20:52 +0000 (10:20 +0100)]
games/gba: very subtle timer bug fixed

9 years agosgi: work in progress kernel for sgi mips machines (only tested with r5k indy)
cinap_lenrek [Sat, 28 Mar 2015 04:15:40 +0000 (05:15 +0100)]
sgi: work in progress kernel for sgi mips machines (only tested with r5k indy)

this provides basic console support using the ARC bios routines
theu uartarcs driver. and has native seeq ethernet driver which
was written by reading the 2ed devseq driver as i have no
documentation on the hardware. mmu and trap code is based on the
routerboard kernel.

9 years agomothra: remove unused confirmcurs; move confirmcursor up with the other cursors.
ethan [Fri, 27 Mar 2015 01:57:46 +0000 (01:57 +0000)]
mothra: remove unused confirmcurs; move confirmcursor up with the other cursors.

9 years agofortunes: TED, day 1: I want to believe -- WIRED magazine
stanley lieber [Fri, 27 Mar 2015 00:43:41 +0000 (20:43 -0400)]
fortunes: TED, day 1: I want to believe -- WIRED magazine

9 years agopc, pc64: state dependency to usbehci.h in mkfiles
cinap_lenrek [Wed, 25 Mar 2015 16:42:51 +0000 (17:42 +0100)]
pc, pc64: state dependency to usbehci.h in mkfiles

9 years agompdigdiv.s: aaaaand its gone!
cinap_lenrek [Wed, 25 Mar 2015 13:19:05 +0000 (14:19 +0100)]
mpdigdiv.s: aaaaand its gone!

9 years agoape: fix main9 for mips
cinap_lenrek [Wed, 25 Mar 2015 12:56:04 +0000 (13:56 +0100)]
ape: fix main9 for mips

9 years agolibmp: use portable mpdigdiv routines for mips (causes invalid instruction trap on...
cinap_lenrek [Wed, 25 Mar 2015 12:55:37 +0000 (13:55 +0100)]
libmp: use portable mpdigdiv routines for mips (causes invalid instruction trap on indy)

9 years agoape: fix lockinit() for mips
cinap_lenrek [Wed, 25 Mar 2015 07:33:11 +0000 (08:33 +0100)]
ape: fix lockinit() for mips

9 years agozynq: fix out of bounds access in etherprobe()
cinap_lenrek [Wed, 25 Mar 2015 02:03:24 +0000 (03:03 +0100)]
zynq: fix out of bounds access in etherprobe()

calling etherprobe() with -1 cardno will rereference
and call cards[-1].reset() which is wrong. don't do that!

9 years agoboot: allow alternative proto files per kernel and kernel config for bootfs.paq
cinap_lenrek [Tue, 24 Mar 2015 23:11:54 +0000 (00:11 +0100)]
boot: allow alternative proto files per kernel and kernel config for bootfs.paq

bootmkfile will now looks for the following proto files in order
and pick the first one it finds to build the bootfs.paq file:

1) $CONF.boofs.proto (config specific)
2) bootfs.proto (kernel specific)
3) $BOOTDIR/bootfs.proto (default generic)

9 years agovc: fix coffsect.lnno overflow into nreloc
cinap_lenrek [Tue, 24 Mar 2015 21:54:26 +0000 (22:54 +0100)]
vc: fix coffsect.lnno overflow into nreloc

the coffsect.lnno field is 16 bit and can overflow into
the nreloc field confusing arc firmware on load. just
mask it to prevent overflow.

9 years agoircrc: remove unused clonefile
ftrvxmtrx [Mon, 23 Mar 2015 13:28:28 +0000 (14:28 +0100)]
ircrc: remove unused clonefile

9 years agoboot: bind #c to /dev with MREPL instead of MBEFORE to avoid double entries
cinap_lenrek [Mon, 23 Mar 2015 02:15:58 +0000 (03:15 +0100)]
boot: bind #c to /dev with MREPL instead of MBEFORE to avoid double entries

9 years agovl, libmach, kernel: mips has 16K alignment for segments (for bigpages)
cinap_lenrek [Sun, 22 Mar 2015 16:49:28 +0000 (17:49 +0100)]
vl, libmach, kernel: mips has 16K alignment for segments (for bigpages)

9 years agomerge
cinap_lenrek [Sun, 22 Mar 2015 16:42:31 +0000 (17:42 +0100)]
merge

9 years agousbohci: ensure Ed and Td alignment, fix for amd64
cinap_lenrek [Sun, 22 Mar 2015 16:41:35 +0000 (17:41 +0100)]
usbohci: ensure Ed and Td alignment, fix for amd64

9 years agomerge
cinap_lenrek [Thu, 19 Mar 2015 10:45:50 +0000 (11:45 +0100)]
merge

9 years agodb: fix unicode support (thanks giacomo)
cinap_lenrek [Thu, 19 Mar 2015 10:44:26 +0000 (11:44 +0100)]
db: fix unicode support (thanks giacomo)

from the unicode-db patch readme:

command() receives a char* that is assigned to lp, which is a Rune*,
and lp is incremented later in readchar(), so each read consumed 4 bytes.
The only time command() is called is in runpcs() with bkpt->comm,
which is a char* built in subpcs through a char*, so the string stored in
bkpt->comm was not a Rune string. A way to test the bug is:

db program
main:b argv/X
:r

9 years agopushtls(2): tls.h -> libsec.h (thanks, pr)
stanley lieber [Wed, 18 Mar 2015 22:33:34 +0000 (18:33 -0400)]
pushtls(2): tls.h -> libsec.h (thanks, pr)

9 years agodhcpd: ignore ";" filename from sgi arcs bootp(); command
cinap_lenrek [Wed, 18 Mar 2015 18:52:31 +0000 (19:52 +0100)]
dhcpd: ignore ";" filename from sgi arcs bootp(); command

9 years agolibmach: use #pragma pack to force 4 byte alignment of bootexec.h structures for...
cinap_lenrek [Wed, 18 Mar 2015 18:31:51 +0000 (19:31 +0100)]
libmach: use #pragma pack to force 4 byte alignment of bootexec.h structures for amd64

9 years agoape: silence compiler "no return at end of function" for mips lock.c
cinap_lenrek [Wed, 18 Mar 2015 18:30:12 +0000 (19:30 +0100)]
ape: silence compiler "no return at end of function" for mips lock.c

9 years agomerge
cinap_lenrek [Tue, 17 Mar 2015 15:13:25 +0000 (16:13 +0100)]
merge

9 years ago6c: MOVL xxx, r; MOVLQZX r, r -> MOVL xxx, r
cinap_lenrek [Tue, 17 Mar 2015 15:12:01 +0000 (16:12 +0100)]
6c: MOVL xxx, r; MOVLQZX r, r -> MOVL xxx, r

eleminate MOVLQXZ instructions after MOVL as MOVL implicitely
zero extends the result.

9 years agossam: fix typo
stanley lieber [Tue, 17 Mar 2015 03:44:04 +0000 (23:44 -0400)]
ssam: fix typo

9 years agossam: don't pollute the environment.
stanley lieber [Tue, 17 Mar 2015 03:42:58 +0000 (23:42 -0400)]
ssam: don't pollute the environment.

9 years agomp(2) man page: mpinvert, not mpinverse (thanks, pr)
stanley lieber [Tue, 17 Mar 2015 03:34:37 +0000 (23:34 -0400)]
mp(2) man page: mpinvert, not mpinverse (thanks, pr)

9 years agokernel: get rid of auxpage() and preserve cache index bits in Page.va in mount cache
cinap_lenrek [Mon, 16 Mar 2015 04:46:08 +0000 (05:46 +0100)]
kernel: get rid of auxpage() and preserve cache index bits in Page.va in mount cache

the mount cache uses Page.va to store cached range offset and
limit, but mips kernel uses cache index bits from Page.va to
maintain page coloring. Page.va was not initialized by auxpage().

this change removes auxpage() which was primarily used only
by the mount cache and use newpage() with cache file offset
page as va so we will get a page of the right color.

mount cache keeps the index bits intact by only using the top
and buttom PGSHIFT bits of Page.va for the range offset/limit.

9 years agokernel: avoid repeated calls to reclaim(), dont miss last page in Pte
cinap_lenrek [Mon, 16 Mar 2015 04:23:38 +0000 (05:23 +0100)]
kernel: avoid repeated calls to reclaim(), dont miss last page in Pte

when we are skipping a process because we could not acquire
its segment lock, dont call reclaim() again (which is pointless
as we didnt pageout any pages), instead try the next process.

the Pte.last pointer is inclusive, so don't miss the last page
in pageout().

9 years agorsa(8): recommend secstore(1) for Plan 9 RSA private key storage
cinap_lenrek [Sun, 15 Mar 2015 20:24:03 +0000 (21:24 +0100)]
rsa(8): recommend secstore(1) for Plan 9 RSA private key storage

9 years agomothra: <del>, <ins>, <wbr>
cinap_lenrek [Sun, 15 Mar 2015 17:01:06 +0000 (18:01 +0100)]
mothra: <del>, <ins>, <wbr>

9 years agomothra: add <strike> support
cinap_lenrek [Sun, 15 Mar 2015 16:05:24 +0000 (17:05 +0100)]
mothra: add <strike> support

9 years agoboot: disable group/other permission checking in bootfs paqfs
cinap_lenrek [Sun, 15 Mar 2015 14:27:56 +0000 (15:27 +0100)]
boot: disable group/other permission checking in bootfs paqfs

when building bootfs in d770 mode directory, the other permissions
in bootfs paq are masked off which results in boot to fail. theres
no point in checking group/other permissions on boot, so just disable
permissin checking in paqfs with the -a flag.

9 years agodoom: print correct version number on mismatch (thanks qu7uux)
cinap_lenrek [Sat, 14 Mar 2015 21:23:39 +0000 (22:23 +0100)]
doom: print correct version number on mismatch (thanks qu7uux)

9 years agowebfs: do not send credentials in automatic referer url
cinap_lenrek [Sat, 14 Mar 2015 00:09:37 +0000 (01:09 +0100)]
webfs: do not send credentials in automatic referer url

9 years agorc-httpd: support for http basic authentication, fix cgi support to work with hgweb.cgi
cinap_lenrek [Sat, 14 Mar 2015 00:02:43 +0000 (01:02 +0100)]
rc-httpd: support for http basic authentication, fix cgi support to work with hgweb.cgi

9 years agohttpauth: little helper for rc-httpd to do http basic authentication with plan9 auth...
cinap_lenrek [Sat, 14 Mar 2015 00:00:26 +0000 (01:00 +0100)]
httpauth: little helper for rc-httpd to do http basic authentication with plan9 auth server

9 years agohg, python: remove proto files
cinap_lenrek [Fri, 13 Mar 2015 17:45:58 +0000 (18:45 +0100)]
hg, python: remove proto files

9 years agohg: install hgweb templates
cinap_lenrek [Fri, 13 Mar 2015 17:30:59 +0000 (18:30 +0100)]
hg: install hgweb templates

9 years agopemencode: handle base64 input length < 3, fix bogus zero termination
cinap_lenrek [Thu, 12 Mar 2015 16:44:33 +0000 (17:44 +0100)]
pemencode: handle base64 input length < 3, fix bogus zero termination

9 years agoimap4d: simplify auth code using encodefmt(), use readn() to get multiple of 3*18...
cinap_lenrek [Thu, 12 Mar 2015 16:29:17 +0000 (17:29 +0100)]
imap4d: simplify auth code using encodefmt(), use readn() to get multiple of 3*18 in base64 input buffer

9 years agowebfs: simplify http basic auth code by using encodefmt()
cinap_lenrek [Thu, 12 Mar 2015 16:26:49 +0000 (17:26 +0100)]
webfs: simplify http basic auth code by using encodefmt()

9 years agoupas/marshal: deduplicate cistrcmp()/cistrncmp()/enc64()
cinap_lenrek [Thu, 12 Mar 2015 16:23:56 +0000 (17:23 +0100)]
upas/marshal: deduplicate cistrcmp()/cistrncmp()/enc64()

use the libc versions of these routines avoiding
code duplication.

9 years agondb/dns: reduce sencodefmt() to not link in enc32()/enc64() encoders
cinap_lenrek [Wed, 11 Mar 2015 17:09:48 +0000 (18:09 +0100)]
ndb/dns: reduce sencodefmt() to not link in enc32()/enc64() encoders

the special sencodefmt() in ndb/dn.c is only used with %H format for
hexadecimal printing for binary strings. removing the unused
calls to enc32() and enc64() reduces the code size by arround 4K.
(this is usefull for ndb/getip which gets linked into the kernel).

9 years agoencode(2): clarify lim argument to enc*(), add SOURCE reference for encodefmt()
cinap_lenrek [Wed, 11 Mar 2015 16:48:24 +0000 (17:48 +0100)]
encode(2): clarify lim argument to enc*(), add SOURCE reference for encodefmt()

9 years agomerge
cinap_lenrek [Wed, 11 Mar 2015 16:28:19 +0000 (17:28 +0100)]
merge

9 years agosmtp, smtpd: fix use of enc64(), fix memory leaks in doauth()
cinap_lenrek [Wed, 11 Mar 2015 16:14:56 +0000 (17:14 +0100)]
smtp, smtpd: fix use of enc64(), fix memory leaks in doauth()

the approximation of n*2 to calculate the number of output bytes
for enc64() fails for inputs of size < 3. this is fixed by using
encodefmt() which gets the calculation right and also simplifies
the code avoiding the allocation and freeing of intermediate string
buffers.

9 years agonetaudit: comment file server auth test (unreliable on cwfs)
aiju [Wed, 11 Mar 2015 15:13:42 +0000 (16:13 +0100)]
netaudit: comment file server auth test (unreliable on cwfs)

9 years agogif: fix color table clipping (for cb5.gif)
cinap_lenrek [Wed, 11 Mar 2015 11:59:19 +0000 (12:59 +0100)]
gif: fix color table clipping (for cb5.gif)

9 years agofactotum: remove unused extern declarations of invoker and authdom from header
cinap_lenrek [Wed, 11 Mar 2015 10:56:02 +0000 (11:56 +0100)]
factotum: remove unused extern declarations of invoker and authdom from header

9 years agokernel: fix integer overflow in syssegflush(), segment code cleanup
cinap_lenrek [Tue, 10 Mar 2015 17:16:08 +0000 (18:16 +0100)]
kernel: fix integer overflow in syssegflush(), segment code cleanup

mcountseg(), mfreeseg():
use Pte.first/last pointers when possible and avoid constructs
like s->map[i]->pages[j].

freepte():
do not zero entries in freepte(), the segment is going away and
here is no point in zeroing page pointers. hoist common code at
the top avoiding duplication.

segpage(), fixfault():
avoid load after store for Pte** pointer.

fixfault():
return -1 in default case to avoid the "used but not set" warning
for mmuphys and get rid of the useless initialization.

syssegflush():
due to len being unsigned, the pe = PGROUND(pe) can make "chunk"
bigger than len causing a overflow. rewrite the function and deal
with page alignment and errors at the beginning.

syssegflush(), segpage(), fixfault(), putseg(), relocateseg(),
mcountseg(), mfreeseg():
keep naming consistent.

9 years agowpa(8): the -p flag will also prompt for user/password on wpa enterprise
cinap_lenrek [Mon, 9 Mar 2015 23:44:17 +0000 (00:44 +0100)]
wpa(8): the -p flag will also prompt for user/password on wpa enterprise

9 years agopushtls(2): fix signature to TLSconn.trace()
cinap_lenrek [Mon, 9 Mar 2015 23:41:46 +0000 (00:41 +0100)]
pushtls(2): fix signature to TLSconn.trace()

9 years agowebfs: implement CONNECT method for https connections over proxy
cinap_lenrek [Mon, 9 Mar 2015 19:26:20 +0000 (20:26 +0100)]
webfs: implement CONNECT method for https connections over proxy

when using a http proxy, establish secure tls connection to the
other end with the CONNECT method so the proxy.

9 years agotheo: OpenBSD is not generally known as an exposed democracy.
stanley lieber [Mon, 9 Mar 2015 01:52:34 +0000 (21:52 -0400)]
theo: OpenBSD is not generally known as an exposed democracy.

9 years agog: search .awk and .rc files
stanley lieber [Mon, 9 Mar 2015 01:46:00 +0000 (21:46 -0400)]
g: search .awk and .rc files

9 years agogs: fix bug 694539. Reading off the end of the cbuf when dash pattern len is max
cinap_lenrek [Sun, 8 Mar 2015 04:27:24 +0000 (05:27 +0100)]
gs: fix bug 694539. Reading off the end of the cbuf when dash pattern len is max

9 years agokernel: catch address overflow in syssegfree()
cinap_lenrek [Sat, 7 Mar 2015 17:59:06 +0000 (18:59 +0100)]
kernel: catch address overflow in syssegfree()

the "to" address can overflow in syssegfree() causing wrong
number of pages to be passed to mfreeseg(). with the current
implementation of mfreeseg() however, this doesnt cause any
data corruption but was just freeing an unexpected number of
pages.

this change checks for this condition in syssegfree() and
errors out instead. also mfreeseg() was changed to take
ulong argument for number of pages instead of int to keep
it consistent with other routines that work with page counts.

9 years agosnap: fix readseg() to cope with > 2gb segments
cinap_lenrek [Sat, 7 Mar 2015 14:21:01 +0000 (15:21 +0100)]
snap: fix readseg() to cope with > 2gb segments