Commit graph

10919 commits

Author SHA1 Message Date
cinap_lenrek
40cb72e7f8 2c: fix indirect calls
The peeophole optimizer was removing MOVL R0, A0
instructions before BSR (A0) because copyu()
decided all registers are being written (because
function calls clobber the registers).

For indirect calls, the register operand must
be correctly reported as being used (and then
clobbered).
2024-05-31 21:04:41 +00:00
cinap_lenrek
865a0f43f1 hjfs: check mount spec (aname) in Tauth
Filesystems should ensure that the mount
spec (aname) is valid before handing out
an auth fid.

This avoids pointless authenticaiton
protocols being run just for the
mount later to fail.

This happens with our current /lib/namespace
file for the opportunistic line:

mount /srv/boot /n/other other
2024-05-31 20:50:41 +00:00
rodri
9bbbc13ce2 libgeometry: simplify rframes
i got rid of redundant code, and added routines
to get the xform matrix out of an rframe, so it
can be stored and used separately or as part of
a composition of xforms.

also replaced the big example in the man page for
more concise, useful ones.
2024-05-30 21:11:33 +00:00
Alex Musolino
33572bd895 sshnet: update usage text to match man page 2024-05-30 12:46:36 +00:00
Alex Musolino
31b7b7a75b sshnet(4): merge usage lines 2024-05-30 12:46:01 +00:00
Ori Bernstein
eddf77b8f9 gefs: revert the last commit; we added a deadlock 2024-05-29 23:53:41 +00:00
Ori Bernstein
dd82b07a86 gefs: correctly serialize updates to mounts
we don't need a lock free list, we just need an
rwlock; this isn't a high contention data structure.
2024-05-29 19:34:14 +00:00
Ori Bernstein
79323e05d1 gefs: make dent cache per-mount
with a global dent cache, directory entries from different
trees can be cached. This almost works, but QID state can
change as the files get modified -- ownership, permissions,
and similar can get changed.

A global mount cache means that changes to a qid may leak
across mount boundaries. Don't do that.
2024-05-29 17:12:21 +00:00
Ori Bernstein
04d0d77e4b gefs: improve 'print fid' on cons 2024-05-28 14:45:01 +00:00
cinap_lenrek
68a98ec9d1 devip: don't send and ignore MLD messages for invalid multicast groups
RFC2710 states that MLD messages should never
be sent for scope 0 and 1 mcast addresses
as well as FF02::1.
2024-05-28 18:16:44 +00:00
cinap_lenrek
dc85e6d01a ipconfig(8): fix /net/null vs /dev/null (thanks humm) 2024-05-28 17:25:52 +00:00
Ori Bernstein
857d06b644 gefs: skip writeback on data blocks
when writing back data blocks, we didn't
read the data back from disk, and instead
just enqueued the block pointer; This means
that we don't have the Blk struct to set
the freed flag on, so we would commit every
IO operation to a data block.

This change opportunistically reaches into
the cache and flags the data block as dead,
so we can skip writeback.
2024-05-28 01:57:52 +00:00
Ori Bernstein
89017223e1 gefs: allow halting read-only file system
we would bail out of any adm op when we were in
read-only mode; we should really complain and
skip when we're not shutting it down.
2024-05-28 01:56:26 +00:00
sl
421057ca68 /sys/man/8/plan9.ini: document the existence of git.9front.org/plan9front/firmware (thanks, orib) 2024-05-27 23:59:22 +00:00
Ori Bernstein
1a1b1c4b6a git/clone: allow cloning into an empty directory 2024-05-27 15:02:28 +00:00
Ori Bernstein
45b5336f88 gefs: add command to show free ranges on console 2024-05-27 04:17:29 +00:00
Ori Bernstein
33b0e1bb81 users(6): it's not just older servers 2024-05-27 01:35:22 +00:00
Ori Bernstein
12bf41489c gefs(8): docment user creation commands 2024-05-26 23:39:07 +00:00
Ori Bernstein
469573c3fe gefs: avoid holding the wrlock when syncing the file system
we only need to enforce ordering or syncedness to disk when
writing out the blocks during sync, we don't need to prevent
mutation on the tree once the arenas and superblock are
serialized.
2024-05-26 22:01:41 +00:00
Ori Bernstein
843b2168c6 gefs: tweak block address heuristic to sequentialize allocation
When churning through data blocks and writing out of order, we would
copy blocks and release them often, leading to gaps at the back of
the file. Retrying an allocation could also lead to allocating a block
in the same arena as the metadata.

This would leave gaps in the allocated files, which would cause seeks
when accessing the data later.

This set of changes allocates blocks that are expected to be accessed
sequentially from the start of the arena, and blocks that are expected
to be accessed out of order at the end of the arena.

For full data blocks (ie, where the write is at the end of the block),
we assume that the accesses will be sequential. For partial data blocks,
when the write offset is not at the end of the data block, we assume
that future appends are inbound, and we allocate the block in the non
sequential part of the arena. As a result, when we eventuall fill the
block, we will allocate the sequential block.

This doesn't help us too much if we have writes to files interleaved,
or we overwrite the same section of a file over and over, but it's
better than nothing.
2024-05-27 00:42:36 +00:00
Ori Bernstein
90d8e4d944 gefs: improve heuristic for arena selection 2024-05-27 00:17:35 +00:00
Ori Bernstein
80ed3922c3 gefs: use a single syncer proc to flush to disk 2024-05-27 00:11:26 +00:00
qwx
ded308e576 devsegment: don't use ulong as negative index
len is ulong, hence &l[-len] makes no sense.
&l[-(uintptr)len] and l - len are correct.

igfx uses a fixed segment to extend its memory when stolen memory is
insufficient for the requested mode.  this caused segment allocation
to always fail since no page in the loop would fall within the range.
modesetting then fails but the bottom of the screen stays garbled.
2024-05-26 02:02:29 +00:00
Ori Bernstein
8a2efea90c gefs: fix memory leak on nop syncs
when syncing a clean file system, we would leak
the sync messsage; stop doing that.
2024-05-26 03:05:20 +00:00
Ori Bernstein
ae8836d46a gefs(8): say some words about snapshots 2024-05-24 12:59:21 +00:00
Ori Bernstein
85ca0c9adc gefs: set gid correctly when creating directory entries 2024-05-23 03:28:38 +00:00
Ori Bernstein
95077e876a gefs: clean up blk logging code 2024-05-23 02:30:00 +00:00
Ori Bernstein
d7b6319891 gefs: add lock assertion for paranoia 2024-05-23 02:29:48 +00:00
Ori Bernstein
e6fa5a21f9 fs: acquire mutation lock around ORCLOSE upsert
only one upsert can go at once.
2024-05-23 01:51:11 +00:00
Jacob Moody
d76c9642e0 inst: add option to use esp as 9fat
Currently we place efi boot binaries on to the 9fat and hope that the
firmware will look in more places than just the esp.  Based on user
reports we've found that it is quite common for firmware to only
search the esp.
2024-05-22 01:49:46 +00:00
Keegan Saunders
5b13dcf68d boot: add honeycomb 2024-05-22 01:20:23 +00:00
Keegan Saunders
8e03baff8b add honeycomb kernel
This is a kernel for the NXP LX2160A, specifically the SolidRun
Honeycomb board which is available for sale on the SolidRun
website.

It currently boots on U-Boot. UEFI support is planned. Build or
download the U-Boot firmware from the SolidRun site and then write
it to the on-board SD card. Then, plug in a USB with the honeycomb
image and proceed to install as normal. Only NVMe or USB storage
is supported (SATA is planned).

This kernel supports PCIe and USB. On-board ethernet and SFP are
not supported (yet). It uses 2GB of memory by default, but that
can be increased using *maxmem depending on how much RAM you have
in the system. As well, SMP is currently disabled until an
uncommon deadlock issue is fixed (could be a hardware issue, unknown
at this point).
2024-05-21 23:54:48 +00:00
Ori Bernstein
5e34f6ae06 gefs: dump set of directory entry attributes 2024-05-21 14:17:59 +00:00
Jacob Moody
5ed2ea3310 mp(2): typos (thanks sirjofri) 2024-05-21 04:42:03 +00:00
Jacob Moody
a9d09ee1f1 webfs(4): typo around connection close (thanks halfwit) 2024-05-21 04:28:08 +00:00
Jacob Moody
5994b10942 /sys/src/cmd/test: enable zones.rc test (thanks unobe) 2024-05-21 04:27:27 +00:00
Ori Bernstein
796e4078d2 gefs: remove unused blk field 2024-05-21 01:34:43 +00:00
Sigrid Solveig Haflínudóttir
93da12e8aa nusb/audio: use correct buffer size for d2h requests, else some devices stalls 2024-05-20 22:26:42 +00:00
Sigrid Solveig Haflínudóttir
078d7a0281 nusb/audio: don't add a control if getvalues errored 2024-05-20 17:14:31 +00:00
Ori Bernstein
b2518fd92a fs: correct mode check for other group
we copied and pasted the structure of this from
cwfs, but they lay out the bits differently. We
fixed this for the other cases, but forgot this
one, which lead to exec being permitted when it
shouldn't have been.
2024-05-20 00:38:55 +00:00
Jacob Moody
17f7f6be4e /sys/src: cleanup power64 assembly 2024-05-19 20:57:04 +00:00
mia soweli
01140dbe17 gefs: convert to atomic instructions
8[al] now support the required atomics, so let's
stop using byte constants.
2024-05-19 15:35:55 +00:00
mia soweli
1b09060f46 8[al]: support XADD 2024-05-19 15:31:32 +00:00
mia soweli
1c7e58e75b 8[al]: support CMPXCHG and CMPXCHG8B 2024-05-19 14:54:06 +00:00
Ori Bernstein
61c6a24d35 gefs(8): small formatting fixes (thanks kvik) 2024-05-18 19:00:16 +00:00
Ori Bernstein
020b9bdd65 upas/smtp: add -C flag to disable thumbprint verification (thanks sirjofri) 2024-05-18 18:47:36 +00:00
Igor Böhm
6cd07cf340 gefs.ms: Minor fixes and improvements. 2024-05-16 22:16:45 +00:00
Ori Bernstein
037bc7b432 gefs: make it impossible for clunkfid to error
in out of memory situations, clunkfid could run
out of memory and error; preallocating moves the
error to fscreate/fsopen, which are prepared to
handle them.
2024-05-18 18:28:17 +00:00
Ori Bernstein
b2cd4959fe gefs: check name lengths before packing them 2024-05-18 18:26:38 +00:00
Jacob Moody
b37238edb8 vdiff: show filename instead of "/dev/null" when removing entire file 2024-05-18 18:07:46 +00:00