]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
3 years agoderoff: fix out-of-bounds access if runes above 0X80 are inside EQ clauses (thanks...
Ori Bernstein [Sat, 1 Aug 2020 17:54:03 +0000 (10:54 -0700)]
deroff: fix out-of-bounds access if runes above 0X80 are inside EQ clauses (thanks mmnmnnmnmm, via plan9port)

Characters greater than 0X80 will cause a read beyond the bounds of the
array chars[]. For particular unicode characters this can cause deroff
to segfault.

A minimal example:
$ deroff
.EQ
u∈
Segmentation fault

Throughout deroff, charclass() is used instead of directly indexing
chars[] so I presume this was just missed.

3 years agohtmlroff: fix out of bounds access (thanks Rei-sen, via plan9port)
Ori Bernstein [Sat, 1 Aug 2020 17:49:29 +0000 (10:49 -0700)]
htmlroff: fix out of bounds access (thanks Rei-sen, via plan9port)

_readx() uses rune count as its argument and not size, so we should
pass nelem() instead of sizeof().

3 years agomk9660(8): fix reference to proto file format
kvik [Sat, 1 Aug 2020 14:17:29 +0000 (16:17 +0200)]
mk9660(8): fix reference to proto file format

3 years agopre-lib9p servers: fix incorrect Tversion handling
kvik [Sat, 1 Aug 2020 13:27:28 +0000 (15:27 +0200)]
pre-lib9p servers: fix incorrect Tversion handling

version(5) says:

If the server does not understand the client's version
string, it should respond with an Rversion message (not
Rerror) with the version string the 7 characters
``unknown''.

Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror.

lib9p(2) follows the above spec, although ignoring the next part
concerning comparison after period-stripping.  It assumes an
Fcall.version starting with "9P" is correctly formed and returns
the only supported version of the protocol, which seems alright.

This patch brings pre-lib9p servers in accordance with the spec.

3 years agovmx(1): use _tos->cyclefreq (thanks cinap)
Sigrid [Sat, 1 Aug 2020 13:23:51 +0000 (15:23 +0200)]
vmx(1): use _tos->cyclefreq (thanks cinap)

3 years agodc: increase exponent limit (thanks unboe, lyndon)
Ori Bernstein [Fri, 31 Jul 2020 15:52:17 +0000 (08:52 -0700)]
dc: increase exponent limit (thanks unboe, lyndon)

dc has an arbitrary limit on the size of the exponent. Lets
replace it with a different arbitrary limit.

3 years agovmx(1): add missing file
Sigrid [Fri, 31 Jul 2020 13:51:32 +0000 (15:51 +0200)]
vmx(1): add missing file

3 years agovmx(1): use cycles() instead of nsec() when possible
Sigrid [Fri, 31 Jul 2020 13:48:54 +0000 (15:48 +0200)]
vmx(1): use cycles() instead of nsec() when possible

this provides better timing and reduced number of syscalls (~2.7M old
vs ~35K new in a test)

3 years agovmx: use _actual_ system kbmap
Sigrid [Fri, 31 Jul 2020 09:24:02 +0000 (11:24 +0200)]
vmx: use _actual_ system kbmap

3 years agoaux/acpi: forgot to commit -p option
Sigrid [Thu, 30 Jul 2020 13:59:04 +0000 (15:59 +0200)]
aux/acpi: forgot to commit -p option

3 years agoaux/acpi: write a man page, fix usage, call threadexits
Sigrid [Thu, 30 Jul 2020 09:25:14 +0000 (11:25 +0200)]
aux/acpi: write a man page, fix usage, call threadexits

3 years agosshfs: update usage text to match man page
Alex Musolino [Wed, 29 Jul 2020 04:26:03 +0000 (13:56 +0930)]
sshfs: update usage text to match man page

3 years agoupasfs: make imap debug logging less noisy
Ori Bernstein [Mon, 27 Jul 2020 02:12:48 +0000 (19:12 -0700)]
upasfs: make imap debug logging less noisy

The current logging prints a debug line for every
message in an inbox, which is unusably verbose.
This removes the prints for unchanged messages,
and adds a print for flag changes.

3 years agoreplica: fix mkfile script installation (thanks Amavect)
Ori Bernstein [Tue, 21 Jul 2020 01:58:52 +0000 (18:58 -0700)]
replica: fix mkfile script installation (thanks Amavect)

The $SCRIPTS were added to $TARG, which complicates the all rule, as
each script's object file must be suppressed.
Fix by removing $SCRIPTS from $TARG, removing the script object file
suppression rule, and overriding the install rule.

The script bin install rule assumes that only one script install is
called at a time. Valid calls like 'mk -a /$objtype/replica/changes
/$objtype/replica/pull' will fail.
Fix by adding a for loop.

Remove the unused $UPDATE variable.

3 years agostdio: fix warnings, make code more standard
Ori Bernstein [Sun, 19 Jul 2020 21:14:14 +0000 (14:14 -0700)]
stdio: fix warnings, make code more standard

Masking with _IO_CHMASK after the assignment causes a warning.
We're better off masking before, but casting the assignment to
prevent sign extension.

3 years agolibndb: order subnets by prefix length for ndbipinfo() lookups
cinap_lenrek [Fri, 17 Jul 2020 14:53:20 +0000 (16:53 +0200)]
libndb: order subnets by prefix length for ndbipinfo() lookups

to reproduce:

ipnet=foo0 ip=192.168.0.0 ipmask=/16
ipnet=foo1 ip=192.168.0.0 ipmask=/24
ip=192.168.0.1 sys=foo2

% ndb/ipquery sys foo2 ipnet ipmask
ipnet=foo0 ipmask=/16

we would expect to get ipnet=foo1 here as it is more
specific subnet.

the solution is to order the subnets by prefix length
in subnet() before calling filter(), so that we process
the longest prefixes first.

3 years agoape: simplify mkfile (thanks amavect)
Ori Bernstein [Thu, 16 Jul 2020 22:22:42 +0000 (15:22 -0700)]
ape: simplify mkfile (thanks amavect)

ape cp, mv, and cc build with ?c, not pcc
ape cp and mv just ignore one or two extra flags,
instead of providing posix compatibility
it's better to fail then do nothing

remove cp.c and mv.c
move cc.c to /sys/src/ape/9src so it doesn't
need its own mkfile rule

3 years agomerge
cinap_lenrek [Thu, 16 Jul 2020 01:12:31 +0000 (03:12 +0200)]
merge

3 years agopc64: disable interrupts in mmuwalk() for checkmmu()
cinap_lenrek [Thu, 16 Jul 2020 01:11:27 +0000 (03:11 +0200)]
pc64: disable interrupts in mmuwalk() for checkmmu()

we have to disable interrupts during mmuwalk() of user pages
as we can get preempted during mmu walk and the original
m->pml4 might become one of a different process.

3 years agog: add '.hs' and 'mkfile' to the walk. (thanks joe9)
Ori Bernstein [Wed, 15 Jul 2020 03:46:00 +0000 (20:46 -0700)]
g: add '.hs' and 'mkfile' to the walk. (thanks joe9)

This expands the set of files that we grep through by default to
include mkfiles and haskell.

3 years agocpp: fix mutually recursive macros
Ori Bernstein [Tue, 14 Jul 2020 01:50:14 +0000 (18:50 -0700)]
cpp: fix mutually recursive macros

Handle cases where parameterless macros expand to each other:

#define FOO BAR
#define BAR FOO
FOO

There were cases where the macros didn't make it into the hidesets,
and we would recurse infinitely. This fixes that.

3 years agokernel: make segments non-executable when icache is not maintained
cinap_lenrek [Sun, 12 Jul 2020 19:42:26 +0000 (21:42 +0200)]
kernel: make segments non-executable when icache is not maintained

This change makes it mandatory for programs to call segflush() on
code that is not in the text segment if they want to execute it.

As a side effect, this means that everything but the text segment
will be non-executable by default, even without the SG_NOEXEC
attribute. Segments with the SG_NOEXEC attribute never become
executable, even when segflush() is called on them.

3 years agoaux/cpuid: flush instruction cache of after patching trampoline
cinap_lenrek [Sun, 12 Jul 2020 17:37:38 +0000 (19:37 +0200)]
aux/cpuid: flush instruction cache of after patching trampoline

3 years agohjfs: update mtime and qid.vers for directory on rename
cinap_lenrek [Sun, 12 Jul 2020 16:54:22 +0000 (18:54 +0200)]
hjfs: update mtime and qid.vers for directory on rename

when wstating a file, its directory should be updated to
reflect this change.

here is what the manpage states:

> The mtime field reflects the time of the last change of content
> (except when later changed by wstat). For a directory it is the
> time of the most recent remove, create, or wstat of a file in the
> directory.

3 years agocwfs: update mtime and qid.vers for directory on rename
cinap_lenrek [Sun, 12 Jul 2020 16:52:28 +0000 (18:52 +0200)]
cwfs: update mtime and qid.vers for directory on rename

when wstating a file, its directory should be updated to
reflect this change.

here is what the manpage states:

> The mtime field reflects the time of the last change of content
> (except when later changed by wstat). For a directory it is the
> time of the most recent remove, create, or wstat of a file in the
> directory.

3 years agostdio, ape/stdio: fix order of operations in putc
Ori Bernstein [Sat, 11 Jul 2020 20:28:58 +0000 (13:28 -0700)]
stdio, ape/stdio: fix order of operations in putc

When calling putc, we need to return either EOF
or the character returned. To distinguish the
two, we need to avoid sign extending 0xff. The
code attempted to do this, but the order of
operations was wrong, so we ended up masking,
setting a character, and then sign extending
the character.

This fixes things so we mask after assignment.

3 years agoimap4d: fix missing return in %δ format of Dfmt()
cinap_lenrek [Sun, 5 Jul 2020 20:15:02 +0000 (22:15 +0200)]
imap4d: fix missing return in %δ format of Dfmt()

3 years agoimap4d: get rid of unixdate/unixfrom handling
cinap_lenrek [Sun, 5 Jul 2020 19:18:26 +0000 (21:18 +0200)]
imap4d: get rid of unixdate/unixfrom handling

all this logic is already done by upas/fs, the unixdate and from
fields in the info file will always be correct.

3 years agoimap4d: fix mkfile to have the correct default target
cinap_lenrek [Sun, 5 Jul 2020 19:16:41 +0000 (21:16 +0200)]
imap4d: fix mkfile to have the correct default target

3 years agoupas/fs: wait until the index becomes unlocked
cinap_lenrek [Sun, 5 Jul 2020 19:15:55 +0000 (21:15 +0200)]
upas/fs: wait until the index becomes unlocked

For big mailboxes with imap4d, ignoring the index and trying to scan
the mailbox concurrently is not very productive. Just wait for the
other upas/fs to write the whole index.

The issue is that imap might time out and make another connection
spawning even more upas/fs instances that all then try to rebuild
the index concurrently.

3 years agoupas/fs: fix wrong nparts field index (changed in previous commit)
cinap_lenrek [Sun, 5 Jul 2020 17:51:59 +0000 (19:51 +0200)]
upas/fs: fix wrong nparts field index (changed in previous commit)

3 years agonedmail: don't try to shoot down subcommand on interrupt
cinap_lenrek [Sun, 5 Jul 2020 16:17:20 +0000 (18:17 +0200)]
nedmail: don't try to shoot down subcommand on interrupt

this breaks interrupt key handling in rio. theres also no
point in trying todo so as rio sends the note to the whole
process group so the subcommand should have got the note
already.

just wait for the subprocess to terminate.

3 years agoupas/fs: put date822 into the index, fix from and replyto handling
cinap_lenrek [Sun, 5 Jul 2020 15:44:32 +0000 (17:44 +0200)]
upas/fs: put date822 into the index, fix from and replyto handling

the date, from and replyto fields where unstable, in that the value
read depended on the state of the cache.

fixing the from and replyto fields is easy, we just handle the
substitution in parsebody().

the date field however requires us to put the date822 into the index
so it can be recovered without requiering to reparse the header
(and body, as we might have a message/rfc822 message with promoted
fields).

with these changes, the fields will be consistent and independnet
of the cache state.

a small optimization also has been added:

after parsing the body, attachments and substitution of from/replyto,
the boundary and unixfrom strings are not needed anymore and can
be freed early.

3 years agoupas/fs: fix memory leak in ref822()
cinap_lenrek [Sun, 5 Jul 2020 15:05:49 +0000 (17:05 +0200)]
upas/fs: fix memory leak in ref822()

3 years agoimap4d: respect errors from read(), remove debug prints
Ori Bernstein [Fri, 3 Jul 2020 18:29:45 +0000 (11:29 -0700)]
imap4d: respect errors from read(), remove debug prints

When read() failed, we were casting the -1 return to
unsigned, which would cause us to index out of bounds.
found using dovecot imap test suite. While we're here,
let's remove the stray debug prints.

3 years agokbdfs/mklatin: allow >16 bit runes in /lib/keyboard
Alex Musolino [Fri, 3 Jul 2020 12:44:49 +0000 (22:14 +0930)]
kbdfs/mklatin: allow >16 bit runes in /lib/keyboard

3 years agobcm64: increase maximum segment size to 8GB
cinap_lenrek [Thu, 2 Jul 2020 23:17:38 +0000 (01:17 +0200)]
bcm64: increase maximum segment size to 8GB

make it possible for one process to use all
of physical memory.

3 years agobcm64: handle 8GB of physical memory for raspberry pi4
cinap_lenrek [Thu, 2 Jul 2020 19:12:40 +0000 (21:12 +0200)]
bcm64: handle 8GB of physical memory for raspberry pi4

widen and move the KMAP window to a new address so we can
handle the 8GB of physical memory of the new raspberry pi4.

the new memory map on pi4 uses the following 4 banks:

0x000000000 0x03e600000
0x040000000 0x0fc000000 <- soc.dramsize (only < 4GB)
0x100000000 0x180000000
0x180000000 0x200000000

3 years agobcm64: fix usb xhci controller on pi4 8GB variant (thanks richard miller)
cinap_lenrek [Thu, 2 Jul 2020 19:04:01 +0000 (21:04 +0200)]
bcm64: fix usb xhci controller on pi4 8GB variant (thanks richard miller)

On the 8GB variant of the raspberry pi 4,
the eeprom chip for the xhci controller is missing and
instead loaded from sdram (by the gpu firmware).

for this, the gpu firmware needs to be notified of
the xhci controllers pci bus address (after reset)
that was assigned by our pci enumeration code.

4 years agomerge
cinap_lenrek [Sun, 28 Jun 2020 22:24:45 +0000 (00:24 +0200)]
merge

4 years agoupas/fs: move unixheader handling to parseheaders()
cinap_lenrek [Sun, 28 Jun 2020 22:23:37 +0000 (00:23 +0200)]
upas/fs: move unixheader handling to parseheaders()

parsing the unixheader in mdir fetch routine is the wrong place,
as no invalid character handling has been performed yet. also
the string is not neccesarily null terminated.

avoid duplication with plan9 mbox parsing and just do it in
parseheaders(), which already handles faking the unix headers
for pop3 and imap.

4 years agographics(2): fix typo
kvik [Sun, 28 Jun 2020 21:45:18 +0000 (23:45 +0200)]
graphics(2): fix typo

4 years agokernel: segflush() needs to flush tlb of other processes
cinap_lenrek [Sun, 28 Jun 2020 14:26:59 +0000 (16:26 +0200)]
kernel: segflush() needs to flush tlb of other processes

instruction cache maintenance is done on tlb miss;
when a page gets fauled in; with putmmu() checking
the page->txtflush cpu bitmap.

syssegflush() used to only call flushmmu() after
segflush() for the calling process, but when a segment
is shared with other processes, we have to flush the
other processes tlb as well.

this adds the missing procflushseg() call into segflush().

note that procflushseg() leaves the calling process alone,
so the flushmmu() call in syssegflush() is still required.

segmentioproc() does not need to call flushmmu() after
segflush() as it is never going to jump to the modified
page, hence the stale icache does not matter.

4 years agoaux/trampoline: Implement inactivity timeout (-t option)
cinap_lenrek [Sat, 27 Jun 2020 14:40:53 +0000 (16:40 +0200)]
aux/trampoline: Implement inactivity timeout (-t option)

Using aux/trampoline to relay udp traffic needs a inactivity
timeout to be practical as there is no explicit connection
termination.

4 years ago9p(2): fix typo
kvik [Thu, 25 Jun 2020 21:23:23 +0000 (23:23 +0200)]
9p(2): fix typo

4 years agoupas/fs: remove now unused Mtrunc mimeflags constant
cinap_lenrek [Wed, 24 Jun 2020 17:21:47 +0000 (19:21 +0200)]
upas/fs: remove now unused Mtrunc mimeflags constant

4 years agoupas/fs: use memchr() instead of strchr() in hdrlen()
cinap_lenrek [Wed, 24 Jun 2020 17:18:37 +0000 (19:18 +0200)]
upas/fs: use memchr() instead of strchr() in hdrlen()

make sure we look for the end of the header within the
pointer range, and not accidentally read beyond hend.

also, messages are not null terminated, so this could
even go beyond the email data buffer.

get rid of mimeflag which was only used for some assert
checks.

take header length into account when comparing header
against ignored header strings.

4 years agomerge
cinap_lenrek [Wed, 24 Jun 2020 16:47:03 +0000 (18:47 +0200)]
merge

4 years agoip/tinc: run script sub-shell in its own environment
cinap_lenrek [Wed, 24 Jun 2020 16:45:58 +0000 (18:45 +0200)]
ip/tinc: run script sub-shell in its own environment

4 years agoacme/win: add trailing space to window tag
Alex Musolino [Tue, 23 Jun 2020 09:11:00 +0000 (18:41 +0930)]
acme/win: add trailing space to window tag

4 years agoupas/marshal: make attachment failure fatal
Alex Musolino [Mon, 22 Jun 2020 07:04:31 +0000 (16:34 +0930)]
upas/marshal: make attachment failure fatal

4 years agousbxhci: implement isochronous in transfers (for webcam, audio recording)
cinap_lenrek [Sun, 21 Jun 2020 19:42:13 +0000 (21:42 +0200)]
usbxhci: implement isochronous in transfers (for webcam, audio recording)

4 years agodevusb: keep isochronous ep->hz consistent with maxpkt, ntds and pollival
cinap_lenrek [Sun, 21 Jun 2020 19:36:50 +0000 (21:36 +0200)]
devusb: keep isochronous ep->hz consistent with maxpkt, ntds and pollival

The sample frequency is an artificial parameter used for
isochronous out transfers to better match the target
frequency (usually, a sound card).

when hz is set, devusb adjusts the endpoint's maxpkt to get
the requested frequency and a multiple of the samplesize per
packet.

however, when hz is not set, then we should calculate the
frequency from maxpkt, ntds and pollival, so all parameters
will be consistent with each other.

4 years agoabaco: add fonts.h to HFILES in mkfile (thanks eekee)
Alex Musolino [Sun, 21 Jun 2020 10:04:54 +0000 (19:34 +0930)]
abaco: add fonts.h to HFILES in mkfile (thanks eekee)

4 years agoip/torrent: fix size check in 64-bit "v" unpack (thanks pr)
cinap_lenrek [Fri, 19 Jun 2020 18:19:57 +0000 (20:19 +0200)]
ip/torrent: fix size check in 64-bit "v" unpack (thanks pr)

4 years agocifsd(8): fix typo (thanks senthil)
Alex Musolino [Thu, 18 Jun 2020 02:41:06 +0000 (12:11 +0930)]
cifsd(8): fix typo (thanks senthil)

4 years agoadd a compose sequence to type ⑨
Sigrid [Tue, 16 Jun 2020 15:29:00 +0000 (17:29 +0200)]
add a compose sequence to type ⑨

4 years agolibc: revert date change again. this is getting ridicuoulus.
cinap_lenrek [Sun, 14 Jun 2020 22:12:57 +0000 (00:12 +0200)]
libc: revert date change again. this is getting ridicuoulus.

this breaks the sample from the seconds manpage, and overall
produces funky results. this needs alot more testing.

term% seconds '23 may 2011'
seconds: tmparse: invalid date 23 may 2011 near 'may 2011'

term% seconds '2019-01-01 00:00:00'
-118370073600

4 years agolibc, seconds: new time and date apis (try 2)
Ori Bernstein [Sun, 14 Jun 2020 16:33:32 +0000 (09:33 -0700)]
libc, seconds: new time and date apis (try 2)

Redo date handling in libc almost entirely. This allows
handling dates and times from outside your timezones,
fixes timezone loading in multithreaded applications,
and allows parsing and formatting using custom format
strings.

As a test of the APIs, we replace the formatting code in
seconds(1), shrinking it massively.

The last commit missed a few removals, and made it
unnecessarily hard to do an update.

4 years agolibc: reverting previous change until ori can fix it
cinap_lenrek [Sun, 14 Jun 2020 02:47:22 +0000 (04:47 +0200)]
libc: reverting previous change until ori can fix it

4 years agolibc, seconds: new time and date apis.
Ori Bernstein [Sat, 13 Jun 2020 19:38:49 +0000 (12:38 -0700)]
libc, seconds: new time and date apis.

Redo date handling in libc almost entirely. This allows
handling dates and times from outside your timezones,
fixes timezone loading in multithreaded applications,
and allows parsing and formatting using custom format
strings.

As a test of the APIs, we replace the formatting code in
seconds(1), shrinking it massively.

4 years agomerge
cinap_lenrek [Thu, 11 Jun 2020 23:36:50 +0000 (01:36 +0200)]
merge

4 years agoramfs: make Elocked[] more consistent (thanks fazlul)
cinap_lenrek [Thu, 11 Jun 2020 23:35:37 +0000 (01:35 +0200)]
ramfs: make Elocked[] more consistent (thanks fazlul)

Go expects the error to be one of the three errors returned in
Bell Labs Plan 9. As listed in
https://github.com/golang/go/blob/f7ba82d68f90e20aa9e6aa973cb6f12321abec71/src/cmd/go/internal/lockedfile/lockedfile_plan9.go#L16:

// Opening an exclusive-use file returns an error.
// The expected error strings are:
//
//  - "open/create -- file is locked" (cwfs, kfs)
//  - "exclusive lock" (fossil)
//  - "exclusive use file already open" (ramfs)
var lockedErrStrings = [...]string{
"file is locked",
"exclusive lock",
"exclusive use file already open",
}

4 years agoacme: implement position-dependent scroll-wheel scrolling
kvik [Thu, 11 Jun 2020 13:33:57 +0000 (15:33 +0200)]
acme: implement position-dependent scroll-wheel scrolling

This brings acme scrolling behaviour in line with that of 9front's rio
and sam, where the amount scrolled varies with a vertical position of
the pointer within the window, similar to how the scrollbar works.

At some point it would be good to implement a line-at-a-time scrolling
when the Shift key is pressed, as seen in rio.  For this to happen the
acme keyboard input needs to be rewritten in terms of /dev/kbd instead
of relying on keyboard(2) -- that is, the /dev/cons interface.

4 years agolibplumb: add missing mkfile
Ori Bernstein [Tue, 9 Jun 2020 19:23:24 +0000 (12:23 -0700)]
libplumb: add missing mkfile

4 years agoacme: document log file in manpage
Ori Bernstein [Sun, 7 Jun 2020 15:27:36 +0000 (08:27 -0700)]
acme: document log file in manpage

4 years agoacme: add missing logf.c
cinap_lenrek [Sun, 7 Jun 2020 15:06:33 +0000 (17:06 +0200)]
acme: add missing logf.c

4 years agoip/6in4: request ipv4 packets only in ipmux filter
cinap_lenrek [Sun, 7 Jun 2020 14:56:54 +0000 (16:56 +0200)]
ip/6in4: request ipv4 packets only in ipmux filter

4 years agodevip: implement ipv6 support in ipmux packet filter
cinap_lenrek [Sun, 7 Jun 2020 14:56:01 +0000 (16:56 +0200)]
devip: implement ipv6 support in ipmux packet filter

Added a ver= field to the filter to distinguish the ip version.
By default, a filter is parsed as ipv6, and after parsing
proto, src and dst fields are converted to ipv4. When no
ver= field is specified, a ip version filter is implicitely
added and both protocols are parsed.

This change also gets rid of the fast compare types as the
filed might not be aligned correctly in the packet.

This also fixes the ifc= filter, as we have to check any
local address.

4 years agosnoopy: add ipmux pseudo protocol
cinap_lenrek [Sun, 7 Jun 2020 14:48:04 +0000 (16:48 +0200)]
snoopy: add ipmux pseudo protocol

the ipmux pseudo protocol handles the extra ipv6 interface address
prefixed to the ip header as used by /net/ipmux packet filter.

4 years agodevip: fix parseipmask() prototype in ip.h
cinap_lenrek [Sun, 7 Jun 2020 14:45:55 +0000 (16:45 +0200)]
devip: fix parseipmask() prototype in ip.h

4 years agoacme: import event log from plan9port (thanks fshahriar)
Ori Bernstein [Sun, 7 Jun 2020 02:05:00 +0000 (19:05 -0700)]
acme: import event log from plan9port (thanks fshahriar)

Based off the following 3 commits:

4a3fb87264f8bc03fc62f00ef335056f30d18023
45f8ba54143323f08a21343633764caa59aa3ea3
fdf6ef333705c844bcf3ccf2f93b2773f1a6aa41

Reading /mnt/acme/log reports a log of window create,
put, focus, and delete events, as they happen. It blocks
until the next event is available.

Example log output:

8 new /Users/rsc/foo.go
8 put /Users/rsc/foo.go
8 del /Users/rsc/foo.go

This lets acme-aware programs react to file writes, for example
compiling code, running a test, or updating an import block.

4 years agodevip: pick less surprising interface address in header for incoming UDP packets
cinap_lenrek [Sat, 6 Jun 2020 21:46:01 +0000 (23:46 +0200)]
devip: pick less surprising interface address in header for incoming UDP packets

We used to just return the first address of the incoming
interface regardless of if the address matches the source
ip type and scope.

This change tries to find the best interface address that
will match the source ip so it can be used as a source
address when replying to the packet.

4 years agomerge
cinap_lenrek [Sat, 6 Jun 2020 14:52:01 +0000 (16:52 +0200)]
merge

4 years agoaux/vga: use 64-bit physical addresses for pci membar
cinap_lenrek [Sat, 6 Jun 2020 14:44:14 +0000 (16:44 +0200)]
aux/vga: use 64-bit physical addresses for pci membar

4 years agodevlml: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:31:39 +0000 (16:31 +0200)]
devlml: use 64-bit physical addresses

4 years agoaudiosb16: cleanup audioprobe(), cast ISAConf.port to ulong
cinap_lenrek [Sat, 6 Jun 2020 14:31:07 +0000 (16:31 +0200)]
audiosb16: cleanup audioprobe(), cast ISAConf.port to ulong

4 years agoaudioac97: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:25:00 +0000 (16:25 +0200)]
audioac97: use 64-bit physical addresses

4 years agoaudiohda: use 64-bit physical addresses, check pci membar types
cinap_lenrek [Sat, 6 Jun 2020 14:23:58 +0000 (16:23 +0200)]
audiohda: use 64-bit physical addresses, check pci membar types

4 years agopc/pcmciamodem: cast i/o port to ulong
cinap_lenrek [Sat, 6 Jun 2020 14:21:42 +0000 (16:21 +0200)]
pc/pcmciamodem: cast i/o port to ulong

4 years agopc/pmmc: check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:19:25 +0000 (16:19 +0200)]
pc/pmmc: check pci membar type

4 years agouartaxp: use 64-bit physical addresses and check pci membar types
cinap_lenrek [Sat, 6 Jun 2020 14:18:52 +0000 (16:18 +0200)]
uartaxp: use 64-bit physical addresses and check pci membar types

4 years agopc/wavelan: print Ether.port as 64-bit value
cinap_lenrek [Sat, 6 Jun 2020 14:18:06 +0000 (16:18 +0200)]
pc/wavelan: print Ether.port as 64-bit value

4 years agosd53c8xx: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:16:48 +0000 (16:16 +0200)]
sd53c8xx: use 64-bit physical addresses

4 years agosdmv50xx: use 64-bit physical addresses and check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:16:03 +0000 (16:16 +0200)]
sdmv50xx: use 64-bit physical addresses and check pci membar type

4 years agosdiahci: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:14:58 +0000 (16:14 +0200)]
sdiahci: use 64-bit physical addresses

4 years agosdodin: use 64-bit physical addresses and check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:14:02 +0000 (16:14 +0200)]
sdodin: use 64-bit physical addresses and check pci membar type

4 years agosdnvme: make sure pci membar type is memory
cinap_lenrek [Sat, 6 Jun 2020 14:10:58 +0000 (16:10 +0200)]
sdnvme: make sure pci membar type is memory

4 years agousbuhci: make sure pci membar type is i/o
cinap_lenrek [Sat, 6 Jun 2020 14:10:04 +0000 (16:10 +0200)]
usbuhci: make sure pci membar type is i/o

4 years agousbehcipc: use 64-bit physical addresses and check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:05:40 +0000 (16:05 +0200)]
usbehcipc: use 64-bit physical addresses and check pci membar type

4 years agopc/ether*: use 64-bit physical addresses and check pci membar types and sizes
cinap_lenrek [Sat, 6 Jun 2020 14:04:24 +0000 (16:04 +0200)]
pc/ether*: use 64-bit physical addresses and check pci membar types and sizes

4 years agopc/vga*: use 64-bit physical addresses and check pci membar types and sizes
cinap_lenrek [Sat, 6 Jun 2020 13:58:18 +0000 (15:58 +0200)]
pc/vga*: use 64-bit physical addresses and check pci membar types and sizes

4 years agoarchacpi: use 64-bit uvlong for physical addresses
cinap_lenrek [Sat, 6 Jun 2020 13:44:17 +0000 (15:44 +0200)]
archacpi: use 64-bit uvlong for physical addresses

4 years agodevvga: use 64-bit physical addresses for framebuffer
cinap_lenrek [Sat, 6 Jun 2020 13:23:50 +0000 (15:23 +0200)]
devvga: use 64-bit physical addresses for framebuffer

4 years agodevpccard: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 13:21:27 +0000 (15:21 +0200)]
devpccard: use 64-bit physical addresses

4 years agousbxhci: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 13:18:18 +0000 (15:18 +0200)]
usbxhci: use 64-bit physical addresses

4 years agodevpnp, devether, devusb: cast ISAConf.port to uvlong (for 32-bit implementations)
cinap_lenrek [Sat, 6 Jun 2020 13:17:08 +0000 (15:17 +0200)]
devpnp, devether, devusb: cast ISAConf.port to uvlong (for 32-bit implementations)

The ISAConf.port might still be 32-bit on some archs.

4 years agodevusb: print Hci.port as 64-bit uvlong
cinap_lenrek [Sat, 6 Jun 2020 13:12:50 +0000 (15:12 +0200)]
devusb: print Hci.port as 64-bit uvlong

4 years agodevether: print Ether.port as 64-bit uvlong
cinap_lenrek [Sat, 6 Jun 2020 13:11:56 +0000 (15:11 +0200)]
devether: print Ether.port as 64-bit uvlong

4 years agodevpnp: print pci membar as 64-bit uvlong
cinap_lenrek [Sat, 6 Jun 2020 13:10:23 +0000 (15:10 +0200)]
devpnp: print pci membar as 64-bit uvlong