]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
9 years agowpa: fork note group when going to background (thanks jpm)
cinap_lenrek [Sun, 2 Nov 2014 16:23:10 +0000 (17:23 +0100)]
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.

9 years agopc, pc64: implement acpi reset (for efi)
cinap_lenrek [Sun, 2 Nov 2014 02:52:53 +0000 (03:52 +0100)]
pc, pc64: implement acpi reset (for efi)

x230 booted in efi only (no csp) mode hangs
when traditional i8042reset() keyboard reset
is tried.

so we try acpireset() first which discoveres
and writes the acpi reset register.

9 years agorealemu: make sure instruction arguments are initialized even when decoding traps
cinap_lenrek [Sat, 1 Nov 2014 23:50:37 +0000 (00:50 +0100)]
realemu: make sure instruction arguments are initialized even when decoding traps

9 years agopc, pc64: more sanity checking for lowraminit()
cinap_lenrek [Sat, 1 Nov 2014 23:32:46 +0000 (00:32 +0100)]
pc, pc64: more sanity checking for lowraminit()

9 years agopc64: remove unused pdballoc and pdbfree counters from mach structure
cinap_lenrek [Sat, 1 Nov 2014 19:53:36 +0000 (20:53 +0100)]
pc64: remove unused pdballoc and pdbfree counters from mach structure

9 years agodist: generate efi bootable cd image
cinap_lenrek [Fri, 31 Oct 2014 19:59:35 +0000 (20:59 +0100)]
dist: generate efi bootable cd image

9 years agonusb/kb: dont set boot protocol on HidCSP interface when we failed to read report...
cinap_lenrek [Fri, 31 Oct 2014 19:40:13 +0000 (20:40 +0100)]
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.

9 years agoefi: generate /386/efiboot.fat for generating efi bootable cd images (see -E option...
cinap_lenrek [Fri, 31 Oct 2014 19:07:54 +0000 (20:07 +0100)]
efi: generate /386/efiboot.fat for generating efi bootable cd images (see -E option of mk9660)

9 years agoefi: iso filesystem support for cdrom booting
cinap_lenrek [Fri, 31 Oct 2014 18:43:47 +0000 (19:43 +0100)]
efi: iso filesystem support for cdrom booting

instead of including kernel and config in the efi
fat image, we can just include the loaders and
read the plan9.ini and kernel from iso filesystem
just like the bios loaders.

9 years agoefi: add test targets for iso and fat (for documentation only)
cinap_lenrek [Fri, 31 Oct 2014 02:15:15 +0000 (03:15 +0100)]
efi: add test targets for iso and fat (for documentation only)

9 years agomk9660: add -E option to create EFI boot entry
cinap_lenrek [Fri, 31 Oct 2014 02:06:09 +0000 (03:06 +0100)]
mk9660: add -E option to create EFI boot entry

9 years agobcm: fix baudrate setting for serial console (thanks to aap and hiro)
cinap_lenrek [Thu, 30 Oct 2014 19:13:44 +0000 (20:13 +0100)]
bcm: fix baudrate setting for serial console (thanks to aap and hiro)

the uartmini enable function used to override the baud
register so the effecive baudrate was always set to
115200 baud.

now the default baudrate of 9600 is set correctly and can
be changed in the console= boot parameter.

thanks aap and hiro for debugging, pizza and beer :)

9 years agonewt: delete lines
stanley lieber [Wed, 29 Oct 2014 04:20:41 +0000 (00:20 -0400)]
newt: delete lines

9 years agonewt: do not print first message twice when stepping through messages
stanley lieber [Thu, 30 Oct 2014 02:49:08 +0000 (22:49 -0400)]
newt: do not print first message twice when stepping through messages

9 years agodisable useless ssh daemon by default
Kurt H Maier [Wed, 29 Oct 2014 17:12:44 +0000 (13:12 -0400)]
disable useless ssh daemon by default

9 years agomerge
cinap_lenrek [Wed, 29 Oct 2014 16:31:37 +0000 (17:31 +0100)]
merge

9 years agofix syslog() use with linefeeds for various programs
cinap_lenrek [Wed, 29 Oct 2014 16:29:09 +0000 (17:29 +0100)]
fix syslog() use with linefeeds for various programs

9 years agonewt: only print a date if we've managed to extract a date
stanley lieber [Wed, 29 Oct 2014 16:03:32 +0000 (12:03 -0400)]
newt: only print a date if we've managed to extract a date

9 years agocs: fix linefeeds in syslog(), cleanup
cinap_lenrek [Wed, 29 Oct 2014 02:20:43 +0000 (03:20 +0100)]
cs: fix linefeeds in syslog(), cleanup

9 years agocs: use /net/ether* instead /net/ether[0123], dont remove srv file with -n, dont...
cinap_lenrek [Wed, 29 Oct 2014 01:43:18 +0000 (02:43 +0100)]
cs: use /net/ether* instead /net/ether[0123], dont remove srv file with -n, dont write dns logfile

9 years agonewt: removed unused function
stanley lieber [Tue, 28 Oct 2014 04:43:52 +0000 (00:43 -0400)]
newt: removed unused function

9 years agonewt: implement ned-style address ranges and overhaul h command to suit
stanley lieber [Tue, 28 Oct 2014 04:38:58 +0000 (00:38 -0400)]
newt: implement ned-style address ranges and overhaul h command to suit

9 years agorio: dont serve a kbd file per window when we didnt got one from the environment
cinap_lenrek [Sat, 25 Oct 2014 00:05:44 +0000 (02:05 +0200)]
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)

9 years agofortunes: this exact error message is in the fortunes file.
stanley lieber [Fri, 24 Oct 2014 18:40:48 +0000 (14:40 -0400)]
fortunes: this exact error message is in the fortunes file.

9 years agorob: Working as intended
stanley lieber [Fri, 24 Oct 2014 18:39:50 +0000 (14:39 -0400)]
rob: Working as intended

9 years agoefi: change eficonfig ordering so memconf() is first, dont fallback to fs when /cfg...
cinap_lenrek [Thu, 23 Oct 2014 22:40:09 +0000 (00:40 +0200)]
efi: change eficonfig ordering so memconf() is first, dont fallback to fs when /cfg/pxe/ file isnt there

having the memconf() (*e820=) last clutters the screen.
do it first, so we can read *acpi= and *bootscreen=
prints.

we want to continue using tftp even when the /cfg/pxe/$ether
file is not found. only when we detect no pxe/dhcp session,
then we switch to local filesystem (non-network boot).

9 years agolib9p: prevent files from being created in deleted directories (thanks BurnZeZ)
cinap_lenrek [Wed, 22 Oct 2014 22:43:27 +0000 (00:43 +0200)]
lib9p: prevent files from being created in deleted directories (thanks BurnZeZ)

9 years agolib9p: fix .. walk crash in deleted directory (thanks BurnZeZ)
cinap_lenrek [Thu, 23 Oct 2014 21:59:16 +0000 (23:59 +0200)]
lib9p: fix .. walk crash in deleted directory (thanks BurnZeZ)

to reproduce:

 % ramfs; cd /tmp
 % mkdir foo; cd foo
 % pwd
 /tmp/foo
 % rm /tmp/foo
 % pwd
 /tmp/foo
 % ls
 % ls /tmp
 % ls ..
 ramfs 202751: suicide: sys: trap: fault read addr=0x0 pc=0x0000e46d
 ls: ..: '..' mount rpc error

9 years agoefi: add initial pxe support (v4 only)
cinap_lenrek [Thu, 23 Oct 2014 21:11:49 +0000 (23:11 +0200)]
efi: add initial pxe support (v4 only)

9 years agopc, pc64: make mtrr() callable from interrupt context and before mpinit
cinap_lenrek [Tue, 21 Oct 2014 04:03:03 +0000 (06:03 +0200)]
pc, pc64: make mtrr() callable from interrupt context and before mpinit

to make it possible to mark the bootscreen framebuffer
as write combining in early initialization, mtrr() is
changed not not to error() but to return an error string.

as bootscreen() is used before multiprocessor initialization,
we have to synchronize the mtrr's for every processor as
it comes online. for this, a new mtrrsync() function is
provided that is called from cpuidentify() if mtrr support
is indicated.

the boot processor runs mtrrsync() which snarfs the
registers. later, mtrrsync() is run again from the
application processors which apply the values from the
boot processor.

checkmtrr() from mp.c was removed as its task is also
done by mtrrsync() now.

9 years ago9boot(8): document efi booting
cinap_lenrek [Sun, 19 Oct 2014 19:55:19 +0000 (21:55 +0200)]
9boot(8): document efi booting

9 years agoinst: ignore *bootscreen= variable when generating plan9.ini
cinap_lenrek [Sun, 19 Oct 2014 19:17:08 +0000 (21:17 +0200)]
inst: ignore *bootscreen= variable when generating plan9.ini

9 years agopc, pc64: lookup pci device for bootscreen() and maximize framebuffer aperture so...
cinap_lenrek [Sun, 19 Oct 2014 19:00:34 +0000 (21:00 +0200)]
pc, pc64: lookup pci device for bootscreen() and maximize framebuffer aperture so can change screen resolution

9 years agoefi: use LocateHandle() and HandleProtocol() to check for multiple gop protocols...
cinap_lenrek [Sun, 19 Oct 2014 17:55:45 +0000 (19:55 +0200)]
efi: use LocateHandle() and HandleProtocol() to check for multiple gop protocols to find a usable one

the gop returned by LocateProtocol() is not usable on thinkpad x230,
so iterate over all handles to find a usable one.

9 years agoefi: fix compiler warnings, remove indicator prints in readn()
cinap_lenrek [Sun, 19 Oct 2014 20:01:13 +0000 (22:01 +0200)]
efi: fix compiler warnings, remove indicator prints in readn()

9 years agoefi: simplify bootscreen code
cinap_lenrek [Sat, 18 Oct 2014 17:15:53 +0000 (19:15 +0200)]
efi: simplify bootscreen code

9 years agogames/gba: add state saving
aiju [Sat, 18 Oct 2014 17:08:38 +0000 (19:08 +0200)]
games/gba: add state saving

9 years agoefi: convert pixel format to bootscreen color channel
cinap_lenrek [Sat, 18 Oct 2014 16:48:56 +0000 (18:48 +0200)]
efi: convert pixel format to bootscreen color channel

9 years agoefi: make clean target virtual
cinap_lenrek [Sat, 18 Oct 2014 00:15:40 +0000 (02:15 +0200)]
efi: make clean target virtual

9 years agoefi: add experimental efi bootloader
cinap_lenrek [Sat, 18 Oct 2014 00:13:02 +0000 (02:13 +0200)]
efi: add experimental efi bootloader

this is basically a port of 9boot to EFI. theres
support for IA32 (386) and X64 (amd64).

has been tested only under qemu with OVMF so far.

9 years agopc, pc64: allow passing RSDT pointer in *acpi= boot parameter, early bootscreeninit...
cinap_lenrek [Sat, 18 Oct 2014 00:01:58 +0000 (02:01 +0200)]
pc, pc64: allow passing RSDT pointer in *acpi= boot parameter, early bootscreeninit(), fix rampage() usage

rampage() cannot be used after meminit(), so test for
conf.mem[0].npage != 0 and use xalloc()/mallocalign()
instead. this allows us to use vmap() early before
mmuinit() which is needed for bootscreeninit() and
acpi.

to get memory for page tables, pc64 needs a lowraminit().

with EFI, the RSDT pointer is passed in *acpi= parameter
from the efi loader. as the RSDT is ususally at the end of
the physical address space (and not to be found in
bios areas), we cannot KMAP() it so we need to vmap().

9 years agosysupdate/psfax/play: fix unquoted brackets causing rc to perform unnecessary file...
BurnZeZ [Wed, 15 Oct 2014 19:57:51 +0000 (15:57 -0400)]
sysupdate/psfax/play: fix unquoted brackets causing rc to perform unnecessary file lookups

9 years agopc: add *bootscreen= variable to pass pre-initialized framebuffer info to kernel
cinap_lenrek [Mon, 13 Oct 2014 21:02:53 +0000 (23:02 +0200)]
pc: add *bootscreen= variable to pass pre-initialized framebuffer info to kernel

EFI system has no cga or vesa anymore, so it becomes neccesary to
pass GOP framebuffer info to the kernel to get some output on the
screen.

9 years agopc: sanity check bda value in lowraminit() to avoid overflow with efi
cinap_lenrek [Sun, 12 Oct 2014 18:18:59 +0000 (20:18 +0200)]
pc: sanity check bda value in lowraminit() to avoid overflow with efi

9 years agopkg: change default repo to http://9front.org/pkg/386
stanley lieber [Sun, 12 Oct 2014 17:27:53 +0000 (13:27 -0400)]
pkg: change default repo to http://9front.org/pkg/386

9 years agorio: fix "-cd dir" in mountspec being ignored
BurnZeZ [Sat, 11 Oct 2014 15:47:38 +0000 (11:47 -0400)]
rio: fix "-cd dir" in mountspec being ignored

9 years agofortunes: You have an agenda.
stanley lieber [Tue, 7 Oct 2014 01:17:26 +0000 (21:17 -0400)]
fortunes: You have an agenda.

9 years agogames/gba: new faster ppu code, audio support
aiju [Fri, 3 Oct 2014 14:52:56 +0000 (16:52 +0200)]
games/gba: new faster ppu code, audio support

9 years agoadded gbatype
aiju [Tue, 30 Sep 2014 18:46:13 +0000 (20:46 +0200)]
added gbatype

9 years agogames/gba: fix dma repeat bit and eeprom addresses
aiju [Tue, 30 Sep 2014 13:48:32 +0000 (15:48 +0200)]
games/gba: fix dma repeat bit and eeprom addresses

9 years agoadded crc32
aiju [Tue, 30 Sep 2014 11:07:36 +0000 (13:07 +0200)]
added crc32

9 years agohgfs: make data files with meta headers having the right size after open
cinap_lenrek [Mon, 29 Sep 2014 19:01:51 +0000 (21:01 +0200)]
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.

9 years agosnap: change ulong return of stackptr() to uvlong for amd64
cinap_lenrek [Mon, 29 Sep 2014 18:11:58 +0000 (20:11 +0200)]
snap: change ulong return of stackptr() to uvlong for amd64

9 years agogames/gba: small fixes
aiju [Sun, 28 Sep 2014 17:41:52 +0000 (19:41 +0200)]
games/gba: small fixes

9 years agoapply ps2mouse corruption fix to omap
cinap_lenrek [Sun, 28 Sep 2014 17:02:25 +0000 (19:02 +0200)]
apply ps2mouse corruption fix to omap

the omap ps2mouse driver is currently unused, but
in case of being finished at some point, apply the
fix from the pc driver.

9 years agomerge
cinap_lenrek [Sun, 28 Sep 2014 16:29:41 +0000 (18:29 +0200)]
merge

9 years agopc/pc64: fix ps2mouse memory corruption race
cinap_lenrek [Sun, 28 Sep 2014 16:28:38 +0000 (18:28 +0200)]
pc/pc64: fix ps2mouse memory corruption race

there was a memory corruption bug caused by us enabling the
ps2mouseputc() handler *before* initializing packetsize.

once we enabled the handler, mouse interrupts could come
in and advance the packet buffer index (nb) beyond the
buffer boundaries.

as ps2mouseputc() only checked for ++nb == packetsize, once
nb was advanced beyond the packetsize, it would continue writing
beyond the buffer and corrupt memory with each mouse packet byte.

solution is to initialize packetsize *before* enabling the
handler, and also do a >= check in ps2mouseputc() in case the
packetsize gets changed to a smaller value at runtime.

9 years agondb/dns: request recursion only for local dns servers
cinap_lenrek [Sun, 28 Sep 2014 03:15:25 +0000 (05:15 +0200)]
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.

9 years agodevcons: avoid division by zero reading Qsysstat
cinap_lenrek [Sun, 28 Sep 2014 00:42:33 +0000 (02:42 +0200)]
devcons: avoid division by zero reading Qsysstat

alexchandel got the kernel to crash with divide error
on qemu 2.1.2/macosx at this location. probably
caused by perfticks()/tsc being wrong or accounttime()
not having been called yet from timer interrupt yet for
some reason.

9 years agogames/gba: remove bogus file
aiju [Sun, 28 Sep 2014 20:42:11 +0000 (22:42 +0200)]
games/gba: remove bogus file

9 years agomerge
aiju [Sat, 27 Sep 2014 18:51:00 +0000 (20:51 +0200)]
merge

9 years agogames/gba: slowly working (no pun intended)
aiju [Sat, 27 Sep 2014 18:50:20 +0000 (20:50 +0200)]
games/gba: slowly working (no pun intended)

9 years agohgignore: ignore amd64 kernel and init
mischief [Sat, 27 Sep 2014 08:35:06 +0000 (01:35 -0700)]
hgignore: ignore amd64 kernel and init

9 years agopc64: enable rtl8169 driver (thanks awabimakoto for testing)
mischief [Wed, 24 Sep 2014 21:19:22 +0000 (14:19 -0700)]
pc64: enable rtl8169 driver (thanks awabimakoto for testing)

9 years ago6c/8c: eleminate moves by swaping source and destination operands in peephole pass
cinap_lenrek [Wed, 24 Sep 2014 18:45:16 +0000 (20:45 +0200)]
6c/8c: eleminate moves by swaping source and destination operands in peephole pass

9 years agoacid: fix sysr1() stack corruption
cinap_lenrek [Mon, 22 Sep 2014 21:07:59 +0000 (23:07 +0200)]
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.

9 years agodevip: sanity check Nchan in Fsproto()
cinap_lenrek [Sun, 21 Sep 2014 17:24:38 +0000 (19:24 +0200)]
devip: sanity check Nchan in Fsproto()

devip can only handle Maskconv+1 conversations per
protocol depending on how many bits it uses in the
qid to encode the conversation number.

we check this when the protocol gets registered.

if we do not do this, the kernel will mysteriously
panic when the conversaion numbers collide which
took some time to debug.

9 years agosysinfo: relax regex for start of kernel boot messages
cinap_lenrek [Sun, 21 Sep 2014 16:28:35 +0000 (18:28 +0200)]
sysinfo: relax regex for start of kernel boot messages

we used to look for /^Plan 9$/ for the start of kernel
boot messages in /dev/kmesg. but the xen kernel prints
Plan 9 (.....) on boot. so just look for line starting
with /^Plan 9/ for now.

9 years agodevip: print protocol name in garbage collection notification
cinap_lenrek [Sun, 21 Sep 2014 16:02:53 +0000 (18:02 +0200)]
devip: print protocol name in garbage collection notification

9 years agopc64: print "Plan 9" on boot, cleanup pccpu64 files
cinap_lenrek [Sun, 21 Sep 2014 14:06:25 +0000 (16:06 +0200)]
pc64: print "Plan 9" on boot, cleanup pccpu64 files

9 years agostats: handle /dev/sysstat 32bit overflow in delta calculation
cinap_lenrek [Sat, 20 Sep 2014 16:06:59 +0000 (18:06 +0200)]
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.

9 years agopc64: syscallfmt for nsec syscall
cinap_lenrek [Fri, 19 Sep 2014 23:37:11 +0000 (01:37 +0200)]
pc64: syscallfmt for nsec syscall

9 years agopc64: put return value of nsec syscall in register on amd64
cinap_lenrek [Fri, 19 Sep 2014 23:07:46 +0000 (01:07 +0200)]
pc64: put return value of nsec syscall in register on amd64

WHAT WHERE THEY *THINKING*??!?!

unlike seek, the (new) nsec syscall (not used in 9front libc)
returns the time value in register (from nix), so do the same
for compatibility.

9 years agolibmemdraw: fix byte ordering in memfillcolor()
cinap_lenrek [Fri, 19 Sep 2014 15:49:48 +0000 (17:49 +0200)]
libmemdraw: fix byte ordering in memfillcolor()

memfillcolor() used to write longs in host byte
order which is wrong. have to always use little
endian.

to simplify, moved little endian conversion into
memsetl() and memsets() avoiding code duplication.

9 years agolib9p: fix nil dereference crash in remove for directory permission check
cinap_lenrek [Fri, 19 Sep 2014 03:22:26 +0000 (05:22 +0200)]
lib9p: fix nil dereference crash in remove for directory permission check

file->parent can be nil when the file has been previously removed.
removefile() deals with this, so skip the permission check in
that case and let removefile() error out.

9 years agoteg2: fix wrong l2 setshift address in wholecache() (from sources)
cinap_lenrek [Wed, 17 Sep 2014 14:34:30 +0000 (16:34 +0200)]
teg2: fix wrong l2 setshift address in wholecache() (from sources)

9 years agooggdec: recognize "begin of stream" packets and restart decoding
cinap_lenrek [Tue, 16 Sep 2014 18:25:01 +0000 (20:25 +0200)]
oggdec: recognize "begin of stream" packets and restart decoding

9 years agomerge
cinap_lenrek [Tue, 16 Sep 2014 14:42:16 +0000 (16:42 +0200)]
merge

9 years agolibauthsrv: allow multiple auth= attributes for backup auth servers, authdial() tries...
cinap_lenrek [Tue, 16 Sep 2014 14:41:05 +0000 (16:41 +0200)]
libauthsrv: allow multiple auth= attributes for backup auth servers, authdial() tries each one in order

some of us run auth servers from home that are used by multiple
servers on the internet. when the home authserver becomes unreachable,
services on the outside servers stop working. so we thought about
specifing a secondary auth servers for backup when the primary
server is not reachable.

this changes authdial() to consult multiple auth= entries in
the authdom= or dom= tuples, trying each one in order until
dial() succeeds.

9 years agoramfs: allow changing mtime in wstats
mischief [Mon, 15 Sep 2014 22:49:39 +0000 (15:49 -0700)]
ramfs: allow changing mtime in wstats

9 years agohg: make intermediate directories like newer hg does
mischief [Mon, 15 Sep 2014 20:42:54 +0000 (13:42 -0700)]
hg: make intermediate directories like newer hg does

9 years agoramfs: fix directory check in wstat() (thanks mischief)
cinap_lenrek [Tue, 16 Sep 2014 20:33:27 +0000 (22:33 +0200)]
ramfs: fix directory check in wstat() (thanks mischief)

9 years agodevtls: fix typo in debug print
cinap_lenrek [Mon, 15 Sep 2014 06:19:51 +0000 (08:19 +0200)]
devtls: fix typo in debug print

9 years agotelnetd: let the kernel place the shared segment in segattach() (thanks kenji arisawa)
cinap_lenrek [Sun, 14 Sep 2014 19:20:13 +0000 (21:20 +0200)]
telnetd: let the kernel place the shared segment in segattach() (thanks kenji arisawa)

9 years agolibmemdraw: update drawtest to use same rounding in alpha calculation as libmemdraw
cinap_lenrek [Sun, 14 Sep 2014 15:03:56 +0000 (17:03 +0200)]
libmemdraw: update drawtest to use same rounding in alpha calculation as libmemdraw

9 years agokernel: fix segattach() rounding of va+len (thanks kenji arisawa)
cinap_lenrek [Sun, 14 Sep 2014 14:04:22 +0000 (16:04 +0200)]
kernel: fix segattach() rounding of va+len (thanks kenji arisawa)

from segattach(2):

          Va and len specify the position of the segment in the
          process's address space.  Va is rounded down to the nearest
          page boundary and va+len is rounded up.  The system does not
          permit segments to overlap.  If va is zero, the system will
          choose a suitable address.

just rounding up len isnt enougth. we have to round up va+len
instead of just len so that the span [va, va+len) is covered
even if va is not page aligned.

kenjis example:

print("%p\n",ap); // 206cb0
ap = segattach(0, "shared", ap, 1024);
print("%p\n",ap); // 206000

term% cat /proc/612768/segment
Stack     defff000 dffff000    1
Text   R      1000     6000    1
Data          6000     7000    1
Bss           7000     7000    1
Shared      206000   207000    1
term%

note that 0x206cb0 + 0x400 > 0x20700.

9 years agohgignore: ignore intermediate object files for amd64
mischief [Sat, 13 Sep 2014 13:23:41 +0000 (06:23 -0700)]
hgignore: ignore intermediate object files for amd64

9 years agohgignore: ignore mips binaries
mischief [Sat, 13 Sep 2014 13:14:39 +0000 (06:14 -0700)]
hgignore: ignore mips binaries

9 years agovi: implement _nsec syscall
mischief [Sat, 13 Sep 2014 13:07:57 +0000 (06:07 -0700)]
vi: implement _nsec syscall

9 years agolibsec: experimental DHE client support for tls and cleanups
cinap_lenrek [Sun, 14 Sep 2014 00:30:46 +0000 (02:30 +0200)]
libsec: experimental DHE client support for tls and cleanups

9 years agolibsec: add diffie-hellman functions
cinap_lenrek [Sun, 14 Sep 2014 00:29:18 +0000 (02:29 +0200)]
libsec: add diffie-hellman functions

9 years agolibsec: fix hmac for keys bigger then 64 byte block size
cinap_lenrek [Sun, 14 Sep 2014 00:26:26 +0000 (02:26 +0200)]
libsec: fix hmac for keys bigger then 64 byte block size

RFC2104 defines HMAC for keys bigger than the 64 byte block
size as follows:

Applications that use keys longer than B (64) bytes will
first hash the key using H (the hash function) and then
use the resultant L byte string as the actual key to HMAC.

9 years agolibsec: ecgen() and ecdsasign() fix
aiju [Sat, 13 Sep 2014 17:46:41 +0000 (19:46 +0200)]
libsec: ecgen() and ecdsasign() fix

9 years agoacme: remove unused #include
BurnZeZ [Thu, 11 Sep 2014 16:47:04 +0000 (12:47 -0400)]
acme: remove unused #include

9 years agogames/gb: minor goof
aiju [Thu, 11 Sep 2014 09:36:35 +0000 (11:36 +0200)]
games/gb: minor goof

9 years agogames/nes: reduce volume, causes overflow and confuses ac97
aiju [Thu, 11 Sep 2014 09:20:57 +0000 (11:20 +0200)]
games/nes: reduce volume, causes overflow and confuses ac97

9 years ago/lib/rob: Just write the code.
stanley lieber [Sat, 6 Sep 2014 05:11:18 +0000 (01:11 -0400)]
/lib/rob: Just write the code.

9 years agoadd /lib/terry
stanley lieber [Sat, 6 Sep 2014 05:09:37 +0000 (01:09 -0400)]
add /lib/terry

9 years agoip/ayiya: experimental anything in anything tunnel protocol client
cinap_lenrek [Sat, 6 Sep 2014 20:59:58 +0000 (22:59 +0200)]
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.

9 years agodoom: fix alignment issues for arm
cinap_lenrek [Thu, 4 Sep 2014 21:02:37 +0000 (23:02 +0200)]
doom: fix alignment issues for arm