]>
git.lizzy.rs Git - plan9front.git/log
cinap_lenrek [Sat, 19 Dec 2020 16:46:55 +0000 (17:46 +0100)]
libauth: add procsetuser() function to change user id of the calling process
Provide a central function to change the user id
of the calling process.
This is mostly used by programs to become the none
user, followed by a call to newns().
cinap_lenrek [Sat, 19 Dec 2020 14:52:41 +0000 (15:52 +0100)]
aux/kbdfs: use getuser() from libc
cinap_lenrek [Sat, 19 Dec 2020 14:50:30 +0000 (15:50 +0100)]
acme: use global user string variable instead of getuser()
cinap_lenrek [Sat, 19 Dec 2020 14:36:07 +0000 (15:36 +0100)]
acme: use getuser() in fsinit()
cinap_lenrek [Sat, 19 Dec 2020 14:15:38 +0000 (15:15 +0100)]
libc: implement getppid() reading /proc/$pid/ppid instead of /dev/ppid
The devcons driver is really the wrong place to
serve per process information.
cinap_lenrek [Sat, 19 Dec 2020 13:59:19 +0000 (14:59 +0100)]
devsons: remove #c/pgrpid
The process group id is essentially a unique id
of the namespace but it was never well documented
nor is it used by any program.
Sigrid [Sat, 19 Dec 2020 12:33:11 +0000 (13:33 +0100)]
g: initialize files env var
Ori Bernstein [Sat, 19 Dec 2020 03:23:48 +0000 (19:23 -0800)]
vt: rfork environment varibles (thanks fshahriar)
vt sets several environment variables ($TERM, $COLS, $LINES)
after exiting. This change rforks the environment so that this
detritus doesn't get left behind.
Ori Bernstein [Fri, 18 Dec 2020 15:16:29 +0000 (07:16 -0800)]
strndup: don't assume buffer is terminated
Using strlen in strndup will walk past the first
n bytes up to the terminator, which may not be
present. This is not what we want.
While we're here, do some cleanups.
kvik [Fri, 18 Dec 2020 14:15:49 +0000 (15:15 +0100)]
kbmap: add Turkish keymap (thanks Kemal)
Ori Bernstein [Fri, 18 Dec 2020 04:26:38 +0000 (20:26 -0800)]
hpost: support custom headers (thanks julienxx)
hget supports adding custom headers with -r;
it makes sense for hpost to do the same, both
because custom headers are more likely necessary
with POSTs, and for consistency.
Ori Bernstein [Fri, 18 Dec 2020 03:20:04 +0000 (19:20 -0800)]
libap: add strndup
strndup is part of POSIX.1, so APE should provide it.
This patch adds it, so need to patch it out of fewer
programs going forward.
cinap_lenrek [Thu, 17 Dec 2020 20:02:11 +0000 (21:02 +0100)]
ether2114x: make sure pci bar0 is I/O
cinap_lenrek [Thu, 17 Dec 2020 19:55:59 +0000 (20:55 +0100)]
ether2114x: vetting the driver for pc64
the tulip driver is used in microsofts hypver-v
as the legacy ethernet adapter for pxe booting.
to make the driver work on pc64, we need to
store the Block* pointers in a separate array
instead of stuffing them into buffer address 2
of the hardware descriptor.
also, enable the driver in the pc64 kernel.
Sigrid [Tue, 15 Dec 2020 13:37:36 +0000 (14:37 +0100)]
pc: set exit status depending on errors
Sigrid [Tue, 15 Dec 2020 13:25:59 +0000 (14:25 +0100)]
pc: treat EOF gracefully, allowing easier use within sam command language
Alex Musolino [Tue, 15 Dec 2020 10:25:41 +0000 (20:55 +1030)]
merge
Alex Musolino [Tue, 15 Dec 2020 10:15:26 +0000 (20:45 +1030)]
ico: avoid potential nil pointer dereferences
Bgeticon can fail, leaving the Icon img pointers nil.
Alex Musolino [Tue, 15 Dec 2020 10:14:11 +0000 (20:44 +1030)]
ico: fix interpretation of 0 widths/heights
cinap_lenrek [Sun, 13 Dec 2020 19:23:03 +0000 (20:23 +0100)]
iostats: dup 9p pipe to both fd 0 and fd 1 for exportfs
cinap_lenrek [Sun, 13 Dec 2020 19:11:44 +0000 (20:11 +0100)]
cpu(1): refer to oexportfs(4)
cinap_lenrek [Sun, 13 Dec 2020 19:11:30 +0000 (20:11 +0100)]
import(4): refer to oexportfs(4)
cinap_lenrek [Sun, 13 Dec 2020 19:09:03 +0000 (20:09 +0100)]
oexportfs: move legacy code for cpu and import to separate program
The initial protocol handling in exportfs for
cpu and import services is a huge mess.
Saparate the code out into its own program with
its own oexportfs(4) manpage.
cinap_lenrek [Sun, 13 Dec 2020 15:04:09 +0000 (16:04 +0100)]
kernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when opening /fd, /srv and /shr
The OCEXEC flag used to be maintained per channel,
making it shared between all the file desciptors.
This has a unexpected side effects with regard to
channel passing drivers such as devdup (/fd),
devsrv (/srv) and devshr (/shr).
For example, opening a /srv file with OCEXEC
makes it impossible to be remounted by exportfs
as it internally does a exec() to mount and
re-export it. There is no way to reset the flag.
This change makes the OCEXEC flag per file descriptor,
so a open with the OCEXEC flag only affects the fd
group of the calling process, and not the channel
itself.
On rfork(RFFDG), the per file descriptor flags get
copied.
On dup(), the per file descriptor flags are reset.
The second modification is that /fd, /srv and /shr
should reject the ORCLOSE flag, as the files that
are returned have already been opend.
cinap_lenrek [Sat, 12 Dec 2020 17:16:06 +0000 (18:16 +0100)]
sdiahci: assume 64-bit PCIWADDR()
cinap_lenrek [Sat, 12 Dec 2020 17:00:41 +0000 (18:00 +0100)]
sdiahci: enable pci busmaster before ahciconfigdrive() (fix qemu crash)
enable pci busmaster before set the fis-receive-enable
bit in the port command register.
not doing so triggers a crash in qemu like:
address_space_unmap: Assertion `mr != NULL' failed.
as qemu tries to process the dma command list as soon
as we set that flag and busmaster dma needs to be enabled
at this point.
cinap_lenrek [Fri, 11 Dec 2020 14:24:35 +0000 (15:24 +0100)]
merge
cinap_lenrek [Fri, 11 Dec 2020 14:23:03 +0000 (15:23 +0100)]
pc, pc64: make sure write combining is supported in MTRR's before setting it
cinap_lenrek [Fri, 11 Dec 2020 14:21:44 +0000 (15:21 +0100)]
pc, pc64: ignore MTRR's when MTRRCap.vcnt and MTRRCap.fix are zero
Bhyve returns 0 in MTRRCap register, so we
can use that instead on relying on cpuid only
to see if MTRR's are supported.
That way we can get rid of the sanity check
in memory.c.
Sigrid [Fri, 11 Dec 2020 14:18:41 +0000 (15:18 +0100)]
update Finnish kbmap: fix ¤ on shift+4 and add more AltGr variants
Sigrid [Thu, 10 Dec 2020 11:19:45 +0000 (12:19 +0100)]
vmx: clean up mksegment, memset only if segment existed (devsegment clears new ones)
Sigrid [Thu, 10 Dec 2020 09:33:42 +0000 (10:33 +0100)]
src: work on awk scripts too, see "src valley" (thanks phil9)
cinap_lenrek [Thu, 10 Dec 2020 00:47:19 +0000 (01:47 +0100)]
pc, pc64: work around bhyve all uncached MTRR's
cinap_lenrek [Wed, 9 Dec 2020 00:05:14 +0000 (01:05 +0100)]
merge
cinap_lenrek [Wed, 9 Dec 2020 00:04:03 +0000 (01:04 +0100)]
backout OCEXEC changes when potentially opening /srv files
Opening a /srv file sets the close-on-exec flag on the
shared channel breaking the exportfs openmount() hack.
The devsrv tries to prevent posting a channel with the
close-on-exec or remove-on-close flags. but nothing
currently prevents this poisoning on open.
Until this gets fixed in eigther exportfs or devsrv,
i'll back out the changes that could have potential side
effects like this.
kvik [Tue, 8 Dec 2020 20:20:13 +0000 (21:20 +0100)]
sega(1): fix keys (thanks bigato)
cinap_lenrek [Tue, 8 Dec 2020 16:16:12 +0000 (17:16 +0100)]
plan9.ini(8): document *nomtrr= and order the table
cinap_lenrek [Tue, 8 Dec 2020 15:58:41 +0000 (16:58 +0100)]
pc, pc64: cleanup cpuidentify() and some comments
cinap_lenrek [Tue, 8 Dec 2020 15:34:36 +0000 (16:34 +0100)]
pc, pc64: add *nomtrr= kernel parameter
cinap_lenrek [Tue, 8 Dec 2020 15:00:57 +0000 (16:00 +0100)]
pc64: preserve reserved bits in CR0/CR4 for amd64 in mtrr setstate()
On AMD64, CR0/CR4 are 64-bit registers, with
the upper half reserved. So use uintptr type
to store the register values to get 32 bit on 386
and 64 bit on AMD64.
cinap_lenrek [Tue, 8 Dec 2020 14:15:13 +0000 (15:15 +0100)]
vncv: backing out previous change, this needs another revision
Sigrid [Tue, 8 Dec 2020 13:32:28 +0000 (14:32 +0100)]
vncv: do NOT map Kaltgr to meta, introduce Mod4 (Super) as an extra key to use instead
Sigrid [Tue, 8 Dec 2020 12:18:10 +0000 (13:18 +0100)]
vmx(1): build vmxgdb by default, clean it up as well
cinap_lenrek [Tue, 8 Dec 2020 12:04:52 +0000 (13:04 +0100)]
vmx: nanosec(): fix non-interruptable temporary, assign fasthz only once after xstart
cinap_lenrek [Tue, 8 Dec 2020 11:42:36 +0000 (12:42 +0100)]
pc: move ldmxcsr() prototype to fpu.c
cinap_lenrek [Tue, 8 Dec 2020 11:40:28 +0000 (12:40 +0100)]
vmx: add fmt checking, fix fmt errors, remove duplication for vmdebug
Sigrid [Tue, 8 Dec 2020 10:47:15 +0000 (11:47 +0100)]
nusb/kb: update button state if event was actually received, fix typos (thanks umbraticus)
Sigrid [Tue, 8 Dec 2020 10:21:18 +0000 (11:21 +0100)]
devmouse: remove redundant check
Sigrid [Tue, 8 Dec 2020 09:34:10 +0000 (10:34 +0100)]
mouse(3): blankS, setS to follow the convention (thanks umbraticus)
Sigrid [Tue, 8 Dec 2020 09:21:17 +0000 (10:21 +0100)]
mouse(3): document "scrollswap" ctl message, fix style a bit (thanks umbraticus)
Sigrid [Tue, 8 Dec 2020 09:08:49 +0000 (10:08 +0100)]
vesa: make unsupported function not an error, set return status
Sigrid [Tue, 8 Dec 2020 09:01:44 +0000 (10:01 +0100)]
vmx: add -D option to enable debug messages, use vmdebug for non-fatal "errors"
cinap_lenrek [Mon, 7 Dec 2020 17:59:54 +0000 (18:59 +0100)]
vmx: add -v|-w flag to control window creation behaviour
The -v flag now does not create a new rio window,
while -w flag does (restores the old behaviour).
This allows vmx to run under vncs and is in general
mode aligned to other emulators and programs.
cinap_lenrek [Mon, 7 Dec 2020 16:18:33 +0000 (17:18 +0100)]
libcomplete: open internal file-descriptor with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 16:14:34 +0000 (17:14 +0100)]
libsec: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 15:48:19 +0000 (16:48 +0100)]
merge
cinap_lenrek [Mon, 7 Dec 2020 15:47:06 +0000 (16:47 +0100)]
libauthsrv: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 15:46:34 +0000 (16:46 +0100)]
libauth: open internal file-descriptors with OCEXEC flag
Sigrid [Mon, 7 Dec 2020 15:42:56 +0000 (16:42 +0100)]
aux/kbdfs, kbmaps: enable Kmod4 for other layouts, not just neo2
cinap_lenrek [Mon, 7 Dec 2020 15:30:27 +0000 (16:30 +0100)]
libdraw: open file-descriptor with OCEXEC flag in readcolmap()
cinap_lenrek [Mon, 7 Dec 2020 14:15:02 +0000 (15:15 +0100)]
libndb: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:54:27 +0000 (14:54 +0100)]
lib9p: open internal file-descriptor with OCEXEC flag in getremotesys()
cinap_lenrek [Mon, 7 Dec 2020 13:51:53 +0000 (14:51 +0100)]
lib9p: open /mnt/factotum/rpc with OCEXEC flag in auth9p()
cinap_lenrek [Mon, 7 Dec 2020 13:49:12 +0000 (14:49 +0100)]
lib9p: improve reqqueuecreate()
- open /proc/n/ctl with OCEXEC flag
- format pid as ulong
- don't leak the fd
cinap_lenrek [Mon, 7 Dec 2020 13:33:51 +0000 (14:33 +0100)]
merge
cinap_lenrek [Mon, 7 Dec 2020 13:32:34 +0000 (14:32 +0100)]
libdraw: open internal file-descriptors with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:32:12 +0000 (14:32 +0100)]
libdraw: remove unused Error label in freescreen()
cinap_lenrek [Mon, 7 Dec 2020 13:31:02 +0000 (14:31 +0100)]
libthread: reduce stack usage of threadkill*(), open /proc/n/ctl with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:29:45 +0000 (14:29 +0100)]
libthread: reduce stack usage for ioprocs, open /proc/n/ctl with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:27:46 +0000 (14:27 +0100)]
libthread: simplify threadsetname()
- open /proc/n/args with OCEXEC flag
- reduce stack usage by using smaller buffer for path
- format pid as ulong
cinap_lenrek [Mon, 7 Dec 2020 13:24:51 +0000 (14:24 +0100)]
libc: open internal file-descriptor with OCEXEC flag
cinap_lenrek [Mon, 7 Dec 2020 13:23:41 +0000 (14:23 +0100)]
rio: format pid's as ulongs
cinap_lenrek [Mon, 7 Dec 2020 13:23:23 +0000 (14:23 +0100)]
rio: open /dev/snarf with OCEXEC flag when writing
cinap_lenrek [Mon, 7 Dec 2020 13:22:30 +0000 (14:22 +0100)]
rio: simplify filsysinit() by using getuser(), format pid's as ulongs
kvik [Sun, 6 Dec 2020 23:36:41 +0000 (00:36 +0100)]
libndb: remove db file size limit
Removes the 128 kB limit for files making up the database.
We used to skip over and complain about files that exceeded
the limit, forcing the user to generate hash files.
This caused things to inexplicably stop working after a file
hit the hidden limit, which is unreasonable behaviour considering
that libndb happily, albeit slowly, works with bigger files.
cinap_lenrek [Sun, 6 Dec 2020 21:06:32 +0000 (22:06 +0100)]
merge
cinap_lenrek [Sun, 6 Dec 2020 21:05:00 +0000 (22:05 +0100)]
pc64: assign fpsave/fprestore only once in fpuinit()
kvik [Sun, 6 Dec 2020 20:52:01 +0000 (21:52 +0100)]
ptrap: implement filtering on plumb attributes
cinap_lenrek [Sun, 6 Dec 2020 20:44:26 +0000 (21:44 +0100)]
pc64: AMD64 mandates SSE support, remove the check in fpuinit()
cinap_lenrek [Sun, 6 Dec 2020 20:28:11 +0000 (21:28 +0100)]
xen: use pc/fpu.c
cinap_lenrek [Sun, 6 Dec 2020 20:07:30 +0000 (21:07 +0100)]
pc, pc64: move all fpu specific code from main.c to fpu.c
Sigrid [Sun, 6 Dec 2020 19:28:53 +0000 (20:28 +0100)]
xen: fix for the last avx changes
Sigrid [Sun, 6 Dec 2020 18:40:57 +0000 (19:40 +0100)]
amd64: FP: back to static size for allocation and copying
Sigrid [Sun, 6 Dec 2020 18:31:56 +0000 (19:31 +0100)]
amd64: FP: always use enough to fit AVX state and align to 64 bytes
Sigrid [Sun, 6 Dec 2020 17:48:32 +0000 (18:48 +0100)]
amd64, vmx: support avx/avx2 for host/guest; use *noavx= in plan9.ini to disable
cinap_lenrek [Sun, 6 Dec 2020 14:08:23 +0000 (15:08 +0100)]
rio: undo previous commit, was a stupid idea
cinap_lenrek [Sun, 6 Dec 2020 13:50:50 +0000 (14:50 +0100)]
rio: give visual clue during sweep and bandsizing when window is too small
We color the window border with a dark red in case the
window is too small.
cinap_lenrek [Sun, 6 Dec 2020 13:44:23 +0000 (14:44 +0100)]
rio: use libdraw's badrect() to exclude some extreme cases in goodrect()
cinap_lenrek [Sun, 6 Dec 2020 12:20:29 +0000 (13:20 +0100)]
rio: rewrite better portion() function
Sigrid [Sun, 6 Dec 2020 12:04:36 +0000 (13:04 +0100)]
rio: handle corner selection for resizing better (thanks cinap)
Sigrid [Sun, 6 Dec 2020 12:02:33 +0000 (13:02 +0100)]
rio: goodrect: clarify minimal height and actually use the smallest reasonable value
Sigrid [Sun, 6 Dec 2020 11:17:05 +0000 (12:17 +0100)]
rio: allow windows as small as one line of text, still scrollable
Sigrid [Sun, 6 Dec 2020 10:55:27 +0000 (11:55 +0100)]
aux/status^(bar msg): few small fixes (thanks umbraticus)
Alex Musolino [Sun, 6 Dec 2020 03:24:10 +0000 (13:54 +1030)]
cwfs: fix interpretation of startdump argument
cinap_lenrek [Sat, 5 Dec 2020 16:01:24 +0000 (17:01 +0100)]
pc/dma, pc/sdide: use uintptr for physical address instead of ulong
cinap_lenrek [Sat, 5 Dec 2020 15:59:30 +0000 (16:59 +0100)]
pc, pc64: allocate dma bounce buffer right after xinit()
cinap_lenrek [Sat, 5 Dec 2020 15:57:12 +0000 (16:57 +0100)]
pc, pc64: exclude memory regions with unusual MTRR cache attributes
Use the MTRR registers to exclude memory ranges that
do not have the expected cache attributes:
RAM -> writeback
UMB -> uncached
UPA -> uncached
Sigrid [Fri, 4 Dec 2020 08:33:55 +0000 (09:33 +0100)]
faces: add -c option to remove faces with button 1 click (thanks sirjofri)
cinap_lenrek [Tue, 1 Dec 2020 23:57:21 +0000 (00:57 +0100)]
merge
cinap_lenrek [Tue, 1 Dec 2020 23:56:21 +0000 (00:56 +0100)]
libdraw: do not force flushimage() on freescreen()
This causes visual flashes of white in rio. If it is
really needed (it is rare) it should be done by the caller.