Commit graph

4758 commits

Author SHA1 Message Date
cinap_lenrek
ff6e15ec3a add /spim 2015-08-08 08:38:25 +02:00
cinap_lenrek
1f8e6c916a python: fix build for objtype=$spim 2015-08-08 08:34:16 +02:00
cinap_lenrek
79213052a2 gs: fix build for objtype=spim 2015-08-08 08:31:49 +02:00
cinap_lenrek
acc4d8b8aa libmp: fix build for objtype=spim 2015-08-08 08:25:36 +02:00
cinap_lenrek
4b6506cb57 ape: fix build for objtype=spim 2015-08-08 08:17:54 +02:00
cinap_lenrek
ebe88f34cb fix library mkfiles for objtype=spim 2015-08-08 08:04:41 +02:00
mischief
23215e14d0 libmach: remove redundant check for big endian 2015-08-05 06:37:02 -07:00
mischief
8e78804fc0 libmach: remove useless error check from previous commit 2015-08-05 06:30:57 -07:00
mischief
7844dafe62 libmach: set correct endianness with little endian ELF32 mips binaries 2015-08-05 06:26:23 -07:00
cinap_lenrek
8ce456bd19 kernel: remove unused MAXCRYPT constant from portdat.h 2015-08-06 13:35:03 +02:00
cinap_lenrek
a87b550183 vgaigfx: remove #define MB, theres a MB enum in portdat.h 2015-08-06 13:33:39 +02:00
cinap_lenrek
87d7a3c875 kernel: have to validate argv[] again when copying to the new stack
we have to validaddr() and vmemchr() all argv[] elements a second
time when we copy to the new stack to deal with the fact that another
process can come in and modify the memory of the process doing the
exec. so the argv[] strings could have changed and increased in
length. we just make sure the data being copied will fit into the
new stack and error when we would overflow.

also make sure to free the ESEG in case the copy pass errors.
2015-08-06 13:20:41 +02:00
cinap_lenrek
281729551f kernel: limit argv[] strings to the USTKSIZE to avoid overflow
argv[] strings get copied to the new processes stack segment, which
has a maximum size of USTKSIZE, so limit the size of the strings to
that and check early for overflow.
2015-08-06 11:51:23 +02:00
cinap_lenrek
b09cd67860 kernel: validnamedup() the name argument for segattach()
this moves the name validation out of segattach() to syssegattach()
to make sure the segment name cannot be changed by the user while
segattach looks at it.
2015-08-06 11:48:51 +02:00
cinap_lenrek
d275add1a8 kernel: fix indention in validname0() 2015-08-06 11:43:22 +02:00
cinap_lenrek
9585e9b7f8 kernel: limit syscallfmt user strings to 64K (as in validname) 2015-08-06 11:42:05 +02:00
cinap_lenrek
86eb8ea6bb kernel: change vmemchr() length argument to ulong and simplify 2015-08-06 10:15:07 +02:00
cinap_lenrek
8d196aeec7 kernel: use Etoolong[] constant instead of string literal in validname0() 2015-08-06 10:01:45 +02:00
cinap_lenrek
9110ae6eae kernel: make shargs() function static in sysproc.c 2015-08-06 09:09:57 +02:00
cinap_lenrek
2acb02f29b kernel: reject empty argv (argv[0] == nil) in sysexec()
when executing a script, we did advance argp0 unconditionally
to replace argv[0] with the script name. this fails when
argv[] is empty, then we'd advance argp0 past the nil terminator.

the alternative would be to *not* advance if *argp0 == nil, but that
would require another validaddr() check for a case that is unlikely
to have been anticipated in most programs being invoked as
libc's ARGBEGIN macro assumes argv[0] being non-nil as it also
unconditionally advances the argv pointer.

to keep us sane, we now reject an empty argv[]. on entry, we
verify that argv[] is valid for at least two elements:
- the program name argv[0], has to be non-nil
- the first potential nil terminator in argv[1]

when argv[0] == nil, we throw Ebadarg "bad arg in system call"
2015-08-06 08:47:38 +02:00
cinap_lenrek
b89fcf2fe3 init: do not run $home/lib/profile when cd $home failed
avoiding follow up error messages, which is annoying and
quite common when running a terminal as "none" for testing.
2015-08-05 14:09:02 +02:00
cinap_lenrek
00eb2fa448 kfs: set permission of / to 0775 on ream
this allows members of the -1 group to create new directories in /
without having to fiddle with the fileserver console. this also
makes it consistent to hjfs and cwfs.
2015-08-05 13:13:40 +02:00
cinap_lenrek
ad91dc7ffb cwfs: set permission of / to 0775 on ream
this allows members of the -1 group to create new directories in /
without having to fiddle with the fileserver console. this also
makes it consistent to hjfs.
2015-08-05 13:06:11 +02:00
cinap_lenrek
7304deaec1 pc, pc64: remove unused psaux driver, cleanup devkbd
the psaux driver is not used in any kernel configuration and theres
no userspace mouse daemon. i8042auxcmds() is wrong as access
to the user buffer can fault and we are holding an ilocks.

little cleanups in devkbd.
2015-08-05 10:44:03 +02:00
cinap_lenrek
f7514acc95 devkbd: disable mosue/keyboard on shutdown, disable ps2 mouse on init, remove kbdenable()/kbdinit()
on vmware, loading a new kernel sometimes reboots when
wiggling the mouse. disabling keyboard and mouse on
shutdown fixes the issue.
make sure ps2 mouse is disabled on init, will get re-enabled
in i8042auxenable().
keyboard isnt special anymore, we can just use the devreset
entry point in the device to do the keyboard initialization,
so kbdinit()/kbdenable() are not needed anymore.
2015-08-05 09:22:07 +02:00
cinap_lenrek
145624eec2 kernel: remove unused qstate() function 2015-08-04 13:52:29 +02:00
cinap_lenrek
dcb5f4212b devkbd: poll pc keyboard before blocking on kbd.q
the keyboard stops sending interrupts when its fifo gets full,
which can happen on boot when keys get mashed while interrupts
are still disabled. to work arround this, call the keyboard
interrupt handler when kbd.q is starved before blocking.
2015-08-04 13:43:35 +02:00
cinap_lenrek
1f0057c5fd python: use altzone 2015-08-04 02:03:38 +02:00
cinap_lenrek
63759d2efb ape: implement altzone for tzset() 2015-08-04 02:01:41 +02:00
cinap_lenrek
333812ca38 ape: fix mktime() again 2015-08-04 02:00:37 +02:00
cinap_lenrek
402741bc01 resample: simplify getint() 2015-08-03 18:30:02 +02:00
cinap_lenrek
d457a43461 libc: make atoi() not parse c-style octal and hex numbers
interpreting octal breaks parsing of decimal numbers with
leading zeros. the manpage listed this in the BUGS section,
so we'r going to fix it as this just causes confusion as
most callers of atoi() do not expect it.
2015-08-03 18:10:53 +02:00
cinap_lenrek
2513946536 crop: use strtol() instead of atoi() 2015-08-03 17:29:30 +02:00
cinap_lenrek
953387d7ba bitsy: replace atoi() calls with strtol() when hex can be expcted 2015-08-03 17:08:33 +02:00
cinap_lenrek
2ef29e10f4 pc, pc64: replace atoi() calls with strtol() when hex can be expcte 2015-08-03 17:07:40 +02:00
cinap_lenrek
1b7e120c09 kernel: dont rely on atoi() parsing hex for netif/devbridge 2015-08-03 16:24:14 +02:00
cinap_lenrek
887ae1a17b webcookies: fix typo 2015-08-03 15:52:03 +02:00
cinap_lenrek
9cf59a2c63 9pcon: use strtol() to parse integers 2015-08-03 15:48:01 +02:00
cinap_lenrek
0915174850 libcontrol: use strtol() to parse integer arguments 2015-08-03 15:32:16 +02:00
cinap_lenrek
9289c4b796 libhttpd: use strtol to parse decimal character references in httpunesc() 2015-08-03 15:26:33 +02:00
cinap_lenrek
0d93e2fe70 snoopy: dont rely on atoi() being able to parse hex 2015-08-03 14:58:41 +02:00
cinap_lenrek
4b787e3205 bitsy/keyboard: do not rely on atoi() being able to parse hex 2015-08-03 14:52:07 +02:00
cinap_lenrek
d7f4ef7bbc libauthsrv: readnvram() use vlong for nvroff, parse $nvlen/$nvoff with strtol() instead of atoi() 2015-08-03 14:45:23 +02:00
cinap_lenrek
8aee1c5060 webcookies: use strtol() to parse HH:MM:SS
atoi() currently interprets leading zeros as octal (BUG!),
so use strtol with explicit base 10 avoiding the issue.
2015-08-03 14:28:16 +02:00
cinap_lenrek
fc77a2d3d3 aux/vga: dont rely on atoi() being able to parse hex 2015-08-03 14:24:29 +02:00
cinap_lenrek
d5d6724805 devenv: simplify envremove(), cleanup 2015-08-03 22:08:10 +02:00
cinap_lenrek
37e4ce0ea7 devenv: avoid indirection, keep Evalue's allocated in an array
avoid the indirection for envlookup() by allocating Evalue structs
together in an array. remove unused link field in Evalue.
2015-08-02 21:39:33 +02:00
cinap_lenrek
29a53a52fd 1c,2c,7c,kc,vc: honor suppress condition for outstring() in swt.c 2015-08-02 14:52:54 +02:00
cinap_lenrek
8234f9d906 ipv6on: fix search for ip attribute (thanks kenji arisawa) 2015-08-02 14:48:53 +02:00
cinap_lenrek
1f3c43c017 pc, pc64: set *bootscreen= when framebuffer changes
add bootscreenconf(VGAscr *) function, that is called whenever
the framebuffer configuration is changed by devvga. that way, we
can pass the current setting of the framebuffer to the new
kernel when using /dev/reboot.
2015-08-02 07:32:49 +02:00