Commit graph

9091 commits

Author SHA1 Message Date
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
Jacob Moody
9e363c506e /lib/rob: Sockets are just so unpleasant
https://minnie.tuhs.org/pipermail/tuhs/2022-June/026012.html
2022-06-28 14:57:39 +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
cinap_lenrek
990ceeef3b nusb/usbd: retry opendevtata() a few times on attach (work around mnt-reform trackball)
this is a known and already fixed issue with version the following version
of the mnt-reform trackball firmware:

55ca5bf848
2022-06-18 23:37:12 +00:00
cinap_lenrek
2b1ecbe87d imx8/usdhc: work around broken multi-write for now
for unknown reasons, multiwrite is busted in usdhc:

sdhc: write error intr 10 stat ff88858e
usdhccmd: need to reset Datinhibit intr 10 stat ff88858e
usdhc: cmd 193a0027 arg 1e5b6b error intr 18010 stat ff88858f

i'm disabling it for now, adding a flag to the SDio struct.
2022-06-18 20:31:49 +00:00
cinap_lenrek
7bae48c452 generate boot.scr in /sys/src/boot/reform 2022-06-18 18:23:22 +00:00
cinap_lenrek
ff7aa0671d /sys/lib/dist/mkfile: add target for mnt-reform image 2022-06-18 18:15:47 +00:00
cinap_lenrek
a16d54da37 add /sys/src/boot/reform/mkfile to download official u-boot for the mnt-reform 2022-06-18 18:15:16 +00:00
cinap_lenrek
7d4ffb8684 aux/txt2uimage: helper for generating uimage script files 2022-06-18 18:12:38 +00:00
cinap_lenrek
73b9f7c362 imx8: fix install target 2022-06-18 14:32:51 +00:00
cinap_lenrek
e760ded494 imx8/usdhc: implement highspeed mode (50Mhz) 2022-06-18 13:19:55 +00:00
cinap_lenrek
524f8c2d53 imx8/lcd: set iomux pad configuration 2022-06-18 12:49:29 +00:00
cinap_lenrek
c14962657c usbxhciimx: set iomux pad configuration 2022-06-18 12:49:04 +00:00
cinap_lenrek
a23e9ac65d imx8: add i2c bus driver 2022-06-18 12:48:26 +00:00
cinap_lenrek
476e7341d5 etherimx: set iomux pad configiguration 2022-06-18 12:46:18 +00:00
cinap_lenrek
63092af6a9 imx8/usdhc: cleanup, set pad configuration 2022-06-18 12:45:39 +00:00
Jacob Moody
15140dcce2 kernel: add dev dtracy provider. 2022-06-17 02:25:15 +00:00
Jacob Moody
227a46e47d ip/dhcpd: quiet up syslog
the packet prints can be found
through -d now.
2022-06-16 02:29:36 +00:00
Jacob Moody
c12022fd8c skel(3) → skelfs(4)
The original intention was to put devskel in to the
kernel to detach what it provides from devsrv.
That is not a good reason, just move it to userspace.

auth/box has been changed to exec skelfs instead
of relying on '#z'.
2022-06-15 06:42:05 +00:00
cinap_lenrek
c7c0ff5db6 merge 2022-06-14 23:55:02 +00:00
cinap_lenrek
28f3dc8224 imx8: port usdhc driver (from bcm/sdhc) for external sdcard
this is a total hack, only works up to 25MHz for now.
2022-06-14 23:53:03 +00:00
Jacob Moody
be1789d78b kernel: bootrc: add bootloop= 2022-06-14 08:16:57 +00:00
Jacob Moody
28709be9a6 kernel: devwalk: correct debug print
nc is not yet tied to the device that
called us
2022-06-14 07:22:58 +00:00
Jacob Moody
96cc6335db kernel: devskel: use RWlock 2022-06-14 07:02:44 +00:00
cinap_lenrek
176206fb02 imx8/gpio: use u32int for bit mask 2022-06-13 23:26:14 +00:00
cinap_lenrek
04d1e6ffe9 imx8/gpio: allow 0 as "no-op" gpio pin
as the gpio controller number starts at 1,
we can use 0 to mean "no pin", so passing
0 to gpioout() or gpioin() pin argument
will have no effect.
2022-06-13 23:24:14 +00:00
cinap_lenrek
fe033ae816 imx8: add gpio helper gpioout()/gpioin() 2022-06-13 23:00:06 +00:00
cinap_lenrek
8dd05d041e imx8: provide iomuxgpr() function to access iomuxc's gpr's 2022-06-13 19:48:01 +00:00
cinap_lenrek
5388575c14 imx8: better syntax for iomuxpad() options using ~ for negation 2022-06-13 19:18:50 +00:00
cinap_lenrek
90428d0561 imx8: add iomuxpad() helper for pad and mux control 2022-06-13 19:06:00 +00:00
cinap_lenrek
d35e41424c imx8: make gpc functionality available with a powerup() function 2022-06-12 21:16:47 +00:00
cinap_lenrek
771a93f3b7 imx8/lcd: reduce flicker
increasing the pixel clock to 80% of the edid clock value
reduces flicker and also seems to not trigger the shifting
issue.
2022-06-12 16:15:55 +00:00
Ori Bernstein
306e7ca618 devsrv: revert 'add /srv/clone'
this leaks /srvs, revert until we can fix it.
2022-06-12 15:23:19 +00:00
cinap_lenrek
e1a95f5630 merge 2022-06-12 14:43:50 +00:00
cinap_lenrek
f1f5045b2e imx8/usbxhci: bring usb out of reset
do all the magic dwc3 specific initalization as well
as reset the hub and power on the phys.

with this, "usb start" command is not needed anymore
from u-boot.
2022-06-12 14:31:55 +00:00
Jacob Moody
c3e1346bbc kernel: add /srv/clone
/srv/clone allows a namespace to get their
own private /srv session.
2022-06-12 00:44:10 +00:00
cinap_lenrek
1d81f7eacb imx8/lcd: silly work around for display instability
running at the actual pixel clock causes the screen
to shift horizontally after a while.

using 60% seems to fix it - for now.
2022-06-12 00:21:28 +00:00
cinap_lenrek
931ae0cfeb imx8: mainscreen turn on!
supports the lcd panel and adds alot of infrastructure
like for the ccm clock module and the i2c controllers.
2022-06-11 21:12:04 +00:00
cinap_lenrek
276f2039a9 devi2c: add generic i2c bus driver 2022-06-11 21:06:39 +00:00