Commit graph

8364 commits

Author SHA1 Message Date
Benjamin Riefenstahl
b3dc2af6d6 man/3/ip (ip): Discuss local IP addresses for "announce" and "bind". 2022-06-11 13:00:05 +00:00
Benjamin Riefenstahl
e402fd8340 ape/bsd/bind.c, ape/bsd/listen.c: Use _syserrno. 2022-07-06 03:46:07 +00:00
Benjamin Riefenstahl
e01e80c5e7 ape/bsd/listen.c: Drop "bind 0".
There does not seem to be a good reason for this.  The "bind" command
has no practical consequence.
2022-07-06 03:38:17 +00:00
Benjamin Riefenstahl
2ca5abbc2b ape/bsd/bind.c: Do not pretend that the port could be negative.
Ports are filtered through "htons" which returns an "unsigned short".
2022-06-11 12:34:31 +00:00
Benjamin Riefenstahl
25a0d57478 ape/bsd/bind.c, ape/bsd/listen.c: Set local IP.
Despite what the man pages say, local addresses can actually be set so
do that.
2022-06-10 20:39:28 +00:00
Benjamin Riefenstahl
d618223086 ape/bsd/listen.c: Do not try to issue "announce *".
"port >= 0" is always true, because the port always gets filtered
through "htons" which returns "unsigned short", so we can just drop
the "else" branch here.

Anyway "announce 0" works fine with the Plan9 API, there is not need
for "announce *" here.
2022-06-10 20:22:39 +00:00
Benjamin Riefenstahl
9fc38d43d4 ape/bsd/bind.c: Do not issue "bind *".
Despite the documentation, "bind *" is invalid and gives the error
"bad numeric port" in devip.c:setladdrport.

"bind 0" OTOH is actually supported fine in the Plan9 API and has the
right sematics.
2022-06-10 16:02:13 +00:00
Jacob Moody
0ec0154bc9 ktrans: don't leak on conflicting jisho lines
Tidy up the hash interface to make cleanup
a bit more explicit vs non cleanup.
2022-07-17 17:51:11 +00:00
Jacob Moody
c147614656 ktrans: 你好
This consolidates jisho and map lookups
to use the same structure and removes
the old jisho code.
2022-07-17 14:52:11 +00:00
cinap_lenrek
ccbabf1c16 i2c(3): fix typos, thanks quinq 2022-07-17 14:43:46 +00:00
cinap_lenrek
06d7118e94 i2c(3): Add documentation for kernels devi2c 2022-07-17 14:22:47 +00:00
Sigrid Solveig Haflínudóttir
1c585c2cc2 sam(1): clarify "<rio>" works on dot just like "look" 2022-07-14 21:12:37 +00:00
Sigrid Solveig Haflínudóttir
ce2ad9701d imx8: gic: irqenable → intrenable 2022-07-14 01:06:52 +00:00
Ori Bernstein
8f1954c0dd upas/Mail: check if plumb attrs are nil 2022-07-13 21:01:11 +00:00
Sigrid Solveig Haflínudóttir
62a4e64d31 imx8: fix reduced lcdif pix clk workaround by enabling underflow recovery 2022-07-12 16:38:41 +00:00
rodri
76f8d642ee ktrans(1): added a history section (thanks moody!) 2022-07-11 20:24:24 +00:00
cinap_lenrek
845f8d12e4 /sys/lib/dist/mkfile: create a default plan9.ini for reform image 2022-07-10 16:50:07 +00:00
cinap_lenrek
65bd53b9b8 imx8: load a plan9.ini at CONFADDR 0x40010000 2022-07-10 16:40:36 +00:00
Jacob Moody
cd64b7129c auth/box: -s, -. flags
-. decides where we chdir to before execing, we can't
sit where we are because our directory may not exist.
If not specified we go to '/'.

-s is used to source a rc script instead of execing cmd.
This is primarily to enable:
	'#!/bin/auth/box -s'
Shebang line size is a bit tight(32), so we have this shorthand
to use rc along with setting up the required namespace components.
2022-07-10 13:13:03 +00:00
cinap_lenrek
34dab15f40 imx8: reset lcdif and sn65sdi86 bridge before init 2022-07-10 13:03:55 +00:00
rodri
739e15c178 ktrans(1): documented $jisho and made some improvements. (thanks to Kenji Okamoto, cinap, BurnZez, romi and Aaron for your work on ktrans!) 2022-07-10 12:54:09 +00:00
cinap_lenrek
fe14f67c92 imx8: get mac address from OTP rom 2022-07-10 12:02:00 +00:00
cinap_lenrek
fdd3e1808f imx8: cleanup mem.h 2022-07-10 11:42:03 +00:00
cinap_lenrek
32183b1abf imx8: implement /dev/reboot support 2022-07-10 11:35:58 +00:00
cinap_lenrek
414cefcb0b imx8: fix fracpll code, enable 1.4Ghz turbo for arm 2022-07-09 21:12:20 +00:00
cinap_lenrek
90f47fadf8 imx8: detect cpu lcycles() frequency 2022-07-09 16:06:42 +00:00
cinap_lenrek
2b89cdee02 imx8: set virtual timer offset to zero for all cores
we want CNTVCT_EL0 to be the same on all cores,
so we set the offset the same so it effectively
becomes the system counter.
2022-07-09 15:15:55 +00:00
cinap_lenrek
29a6cbf7ee imx8: turn backlight off when blanking 2022-07-09 14:13:07 +00:00
Jacob Moody
c539d64d22 man: turn on troff -mnihongo if JP font is used
This specifically fixes
	% man -P ktrans

We dont have font widths for kanji in our troff
font files, so we can use aux/mnihongo to render
the character using libdraw, and grab the bitmap from
there. It's not pretty, but aux/mnihongo exists so
lets at least use it.

This also updates /sys/man/1/ktrans to specify the
Jp font to comply with aux/mnihongo.
2022-07-09 03:43:33 +00:00
rodri
566c512106 add ktrans. こんにちは! 2022-07-06 20:19:14 +00:00
Sigrid Solveig Haflínudóttir
6972974f8d imx8: ccm: fix sai copy-paste typos 2022-07-04 23:51:56 +00:00
cinap_lenrek
c5cf9b3e26 imx8: qos magic to avoid interference between pcie and lcdif
when writing to the nvme ssd, the screen can glitch out.

found this in linux lcdif driver (mxcfb) that appears to
resolve the issue.

the QoSc registers are all completely undocumented tho :-(
2022-07-03 16:13:19 +00:00
cinap_lenrek
940e3165d3 imx8: less stupid pci interrupt handler 2022-07-03 12:10:27 +00:00
cinap_lenrek
548a48d156 imx8: pcie and nvme support 2022-07-03 11:36:50 +00:00
cinap_lenrek
e39d924907 sdnvme: add dmaflush() instructions, move to port/ 2022-07-03 11:35:20 +00:00
Ori Bernstein
c2c397422f git/log: fix log count
saved wrong version when rebasing, oops.
2022-07-03 06:42:17 +00:00
Ori Bernstein
126cc163e2 git/compat: expand to cover go bootstrap
go bootstrap uses more of git than we supported, so
stub in enough that we can bootstrap go.
2022-07-03 04:25:08 +00:00
Ori Bernstein
21aac62c1f git/log: support -n option to restrict log counts
this is useful for scripting, and convenient for
interactive use.
2022-07-03 04:38:13 +00:00
Ori Bernstein
d457233c70 patch: handle stripped/empty lines mid-hunk
Some programs will strip trailing spaces from hunks;
in this case we want to treat the line as though it
came with a leading space.

This fixes applying some patches, such as

	[PATCH] Permissions for child boards in /srv
2022-07-02 20:13:31 +00:00
akw@oneirism.org
6dbfe8c356 nusb/ptp: increase payload
A silly little patch, but some ptp devices (like the camera I own) use USB3 endpoints and subsequently require the data size of the payload to be 1024(-12 for metadata). This is reflected in libgphoto2's current ptp driver.
2022-06-30 01:58:01 +00:00
Ori Bernstein
e6d31c1715 spf: limit recursion depth to prevent ddos (thanks tijay, iashiq5)
An attacker may use an infinite number of SPF referrals in his/her SPF
setting and can send an email to your mail server which would make
your SMTP server make a lot of DNS queries.  By exploiting this
vulnerability, an attacker can block your SMTP queue, flood the
associated recursive resolver, or any DNS authoritative server.

According to RFC recommendations
(https://datatracker.ietf.org/doc/html/rfc7208#section-4.6), a few DNS
lookup limits exist that an SMTP server needs to maintain while
resolving an SPF record.  That is, SPF implementations MUST limit the
total number of query-causing terms to 10 and the number of void
lookups to 2 to avoid unreasonable load on the DNS.

from:

Taejoong “Tijay” Chung (tijay@vt.edu)
Ishtiaq Ashiq (iashiq5@vt.edu)
2022-06-30 01:24:27 +00:00
Jacob Moody
1f95e98ddd skelfs: dont mount if not asked to 2022-06-30 00:56:10 +00:00
Jacob Moody
a13aa17e4a aux/9pcon: add assert flag 2022-06-30 00:51:59 +00:00
Jacob Moody
cac03f355c kernel: revert /srv/clone 2022-06-29 17:35:27 +00:00
Ori Bernstein
10afa189d5 awk: correct incoherent cell in assignment (thanks smj, mpinjr)
In run.c::assign(), assigning to $0 from $F, a field,
where F >= 2, produces an incoherent cell.

The assignment occurs in two steps, first the string value
and then the float. When the string value is assigned to $0,
setsval invalidates the fields. If FS hasn't changed, after
getfval rebuilds the fields, NF = 1 and F >= 2, therefore $F
is definitely uninitialized. The result is a float val of
0.0, producing a boolean false in the pattern expression.

Coercing a string comparison gives the expected result
because the incoherent cell has the correct string
value, which is not empty and evaluates to true.
2022-06-25 20:03:41 +00:00
Ori Bernstein
5579176f4a awk: initialize records fully in recinit()
when using records in BEGIN, we would read
from the field table before we read into it;
this ensures that the fields are an empty
string before we start touching their contents.
2022-06-25 18:58:55 +00:00
Jacob Moody
5ee86cf824 kernel: correct error handling in /srv/clone read
readstr can error, we need to catch the error and unlock.
2022-06-22 15:53:32 +00:00
Jacob Moody
fa0c807bfb kernel: add /srv/clone to get seperate /srv bulletin boards. 2022-06-21 13:21:38 +00:00
Ori Bernstein
7ca997bf7e ndb: increase buffer size to allow longer lines
when reading a long line such as a dkim key in a
txt record, ndb calls Brdstr, which is limited
to the size of the buffer. This means we would
fail to parse the line from NDB, and bail out
early.

Increasing the buffer size allows us to read and
parse longer lines.
2022-06-19 23:42:04 +00:00
cinap_lenrek
f0fc84aba3 etherimx: fix link negotiation
mdio interrupt command completion handling was broken,
as the interrupt handler would clear the mii status
register before mdiodone() sees it.

handle errors in miistatus() and miiane(), to not get
confused.
2022-06-19 18:07:50 +00:00