Commit graph

9894 commits

Author SHA1 Message Date
Ori Bernstein
1ca26f9924 gefs: work around 8c bug
8c doesn't like assigning struct literals with vlongs
into array indexes, so work around it for now.
2024-07-18 16:25:46 +00:00
Ori Bernstein
0956f48633 git/commit: filter to changed files for git/save
while rehashing the same files over and over will work
just fine, it can be slow with a large number of large
files; this makes 'git/comit .' perform much better in
repos with a large number of large binary blobs.
2024-07-18 13:13:42 +00:00
Ori Bernstein
338e78a024 gefs: dump dirs are dirs too
even if they're down in the dumps
2024-07-17 21:48:15 +00:00
Ori Bernstein
48edf79c69 gefs: modifying a directory should update qid.vers 2024-07-17 15:07:11 +00:00
Ori Bernstein
201fe8de4b gefs: change log compression heuristic
compress when the log doubles in size, rather than
using a fixed size heuristic; this means that we
don't start compressing frequently as the log gets
big and the file system gets fragmented.
2024-07-08 03:29:40 +00:00
Ori Bernstein
a19d90dc8c gefs: fix allocation log compression
We could overwrite the log tail when compressing the
allocation log; this would be bad. Stop doing that.
2024-07-08 03:23:40 +00:00
rodri
1442891a3e samterm: avoid division-by-zero when $tabstop is zero or empty
this happens in libframe:

	/sys/src/libframe/frutil.c:80: 	x -= (x-f->r.min.x)%f->maxtab;

but there's no way to control when the user changes the
maxtab value, so it's samterm's responsibility to
sanitize it.
2024-07-16 11:29:49 +00:00
Ori Bernstein
51c899ca01 bio(2): fix formatting 2024-07-14 19:49:00 +00:00
Ori Bernstein
ee51c91f6f gefs: copy mode down on create, don't truncate walks with no DMEXEC
we were copying the owner and group of the parent dir into the fid
on create, but we forgot the mode; fix that, so that we don't check
perms against the wrong dir.
2024-07-13 15:55:37 +00:00
mkf
23e7a57172 rx: add ssh 2024-07-04 20:26:20 +00:00
sl
79822e96dc /sys/src/9/pc/audiohda.c: add vid/did for Intel Tiger Lake 2024-07-07 21:42:30 +00:00
Ori Bernstein
f628dc850d gefs: temporarily disable log compression
There are some bugs with fixes in progress, but
let's not take any risks while those fixes are
in flight.
2024-07-02 02:55:55 +00:00
Ori Bernstein
ed73544be6 gefs: remove useless cachedel
copy paste error
2024-06-27 05:17:05 +00:00
Ori Bernstein
2350b08401 gefs: remove trace noise
this pushes useful entries out of the ring.
2024-06-23 15:33:09 +00:00
qwx
a71a76745b etheriwl: add support for 3168 2024-06-25 19:08:54 +00:00
Sigrid Solveig Haflínudóttir
9b5d186746 it kbmap: more mapping fixes (thank shura)
The Italian keyboard layout is ISO, and unlike the ANSI layout,
it has an extra key between Shift and Z, and the key above Enter,
which becomes vertical, is moved to the bottom left of it.

 - the key between Shift and Z is mapped to `<`, and shift+`<` is mapped to `>`
 - the old `>` (at the bottom left of Enter) is mapped to `ù`
 - shift+`ù` is mapped to `§`
 - the old shift+`"` is mapped to `°`
 - altgr+`'` is mapped to backtick
 - altgr+`ì` is mapped to `~`
 - altgr+`e` is mapped to `€`
 - shiftaltgr+`[` is mapped to `{`
 - shiftaltgr+`]` is mapped to `}`
2024-06-25 15:52:36 +00:00
Emery Hemingway
2760eef549 kbmap: add Workman layout 2024-01-22 11:13:14 +00:00
Sigrid Solveig Haflínudóttir
c05ee321f8 it kbmap: fix > and < (thanks NeuraL) 2024-06-25 13:23:06 +00:00
mia soweli
f43c301827 9/pc: Remove unused lm78 driver
This seems to have been around but not compiled since the third edition.
Remove it and the accompanying SMBus machinery that is only used
for this driver.
2024-06-24 20:22:31 +00:00
Ori Bernstein
6b5d2ac468 gefs: weaken overzealous assert
When modifying a sparse file, it's possible to get
clobbers and clears to item s that don't exist; in
this case, we try to apply to an empty kvp, and
assert -- we should just not apply.
2024-06-23 14:26:44 +00:00
Ori Bernstein
107a7ba971 git: allow longer authors in commits
there are git repos where the author line is longer than
128 chars; bump our limit up.
2024-06-19 17:42:52 +00:00
Sigrid Solveig Haflínudóttir
c9a153088d sam(1): ^ does not take any range 2024-06-17 22:03:20 +00:00
cinap_lenrek
68b4a8e6ef cc: logical operations (& | ^) operate on integers only (thanks sigrid)
void
main(void)
{
	uchar a[3];
	float f = a[2] | a[1] | (a[0]/1.2);
	USED(f);
}

the code above used to generate impossible
code in the linker like:

main: doasm: notfound from=34 to=35 (872)	ORL	X0,X1
main: doasm: notfound from=34 to=35 (872)	ORL	X0,X1
main: doasm: notfound from=34 to=35 (872)	ORL	X0,X1

with the change, the compiler correctly rejects it:

incompatible types: "UINT" and "DOUBLE" for op "OR"

i assume the BNUMBER in the type matrix must have been
a oversight.
2024-06-17 20:31:01 +00:00
Sigrid Solveig Haflínudóttir
12ad6dffeb sam: make X/.../b work 2024-06-16 15:58:07 +00:00
mia soweli
3d6deb3f69 9/port: make sure MSI-X is off before enabling and disabling MSI 2024-06-16 14:22:58 +00:00
cinap_lenrek
82f44b3ffc ip/ipconfig: properly handle ipv6 address deprecations
do not add default route when address is
deprecated (preflt == 0).

delete previous default route on router change.

implement rfc4862 section 5.5.3 processing rules
in regard to remaining valid lifetime.
2024-06-15 17:20:45 +00:00
Romano
0dc37f9794 dhcpd(8): typos 2024-06-10 04:42:52 +00:00
Ori Bernstein
16369de87d gefs: correctly set duid/dgid on Tcreate
we were updating the dir that the fid pointed
to, but not updating the parent uid/gid.
2024-06-09 14:40:40 +00:00
cinap_lenrek
f3ee064802 ip/ipconfig: ask devip to delete expired ipv6 prefixes (thanks arne)
In addition to removing expired default routes,
ask devip to clean out expired addresses as well.

In the future, devip might do something more
sophisticated than just checking the valid life time
like also considering if the address is still begin
used by active connections.
2024-06-09 13:02:06 +00:00
Ori Bernstein
c91e9322f1 gefs: only start epochs for console procs that need them
we shouldn't need to defer reclamation for procs that
don't actually interact with the tree directly, especially
since if they send on a channel they can stall for a while.
2024-06-08 16:21:16 +00:00
Ori Bernstein
5e6f3db0d7 gefs: fix deadlock between epochclean and truncwait
epochclean should not hold the mutation lock, which
should allow procs within an epoch to make progress
and end their epoch.
2024-06-08 16:02:11 +00:00
Arne Meyer
0db5d2bdd6 nusb/ether: fix typo in previous commit 2024-06-07 21:30:15 +00:00
Arne Meyer
43166ed050 nusb/ether: Don't pass ethernet fcs to the network stack for smsc and lan78xx 2024-06-05 09:22:31 +00:00
Ori Bernstein
f9b061c9bd gefs: bring back write cancellation for free blocks. 2024-06-07 14:50:05 +00:00
Ori Bernstein
f91852c653 gefs: improve flow of blocks/frees
This change covers three improvements:
- inline the limbo entry into the objects
  being freed, meaning we don't need to
  allocate, and thus can't fail to free
  an object when we're out of memory
- Preallocate Bfree objects, for the same
  reason above.
2024-06-07 14:41:15 +00:00
qwx
dd4b1abbe6 gs: ignore more autogenerated headers
the build process could be cleaned up a lot more.  the default.*.h headers are
basically only used in cross-compilation, but every usable arch has its default
header already, so all the mkfile effectively does is copy it to $objtype.h.  it
would perhaps make more sense to just run mk on any new arch and copy to a new
default.$objtype.h and get rid of a lot of this stuff.  but then it's not really
worth messing with this further, so leaving it as is.
2024-06-06 23:05:42 +00:00
qwx
aad45634c8 gs: don't track autogenerated header (thanks James) 2024-06-06 10:35:37 +00:00
Ori Bernstein
8c046fe451 gefs: revert cacheflag()
it seems likely that it was causing writeback
bugs, revert until further testing, and likely
move to a different approach.
2024-06-04 17:49:49 +00:00
Sigrid Solveig Haflínudóttir
005bd2b7e1 sam: M: don't require a current file to operate (thanks umbraticus) 2024-06-04 14:27:41 +00:00
Ori Bernstein
8759403bdb gefs: fix file truncation performance (thanks cinap)
We were inserting very oversized deletion messages when
removing a file, instead of inserting the right size
message. This also batches the insertions, reducing the
number of upserts.
2024-06-02 19:52:12 +00:00
Ori Bernstein
5c0670bfae gefs: remove vestigial bucket lock
it was doing nothing
2024-06-02 18:53:43 +00:00
umbraticus
828c577e03 sam: introduce a new command M for adding commands to mouse b2 menu 2024-06-01 22:55:26 +00:00
Jacob Moody
4e4bd869e9 9[cl]: correct previous changes
37e65b331b
Was to adjust the compiler to better match the ISA w.r.t.
subtraction, but was overzelous and rewrote all additions instead of
just those with constants.

5390130426
Intended to restrict compiler generated immediate operations to only
those of which can be encodable by the ISA.  However the check for
signed constants was incorrect and resulted in constants that do not
properly encode.

0c6fd079ce
Attempted to classify address literals to save on instruction
encoding, but this is actually not possible.  We have to walk the
program first to derive some of the constants (INITDAT depends on
etext) so we can not classify them here.  Instead we should just limit
address literals to 32 bits (with sign extension) as a worst case.  It
would be possible in the future to do a pass over to program later and
find address literals that only need one instruction instead of two
but this works for now.
2024-06-01 17:53:20 +00:00
cinap_lenrek
01e7d784df sdaoe: remove unfinished atapi code (thanks arne) 2024-06-01 16:14:25 +00:00
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
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
Jacob Moody
96c4dbca89 /sys/src/cmd: ?[cl] mkfile consistency 2024-05-18 17:21:43 +00:00
Sigrid Solveig Haflínudóttir
9c5fc1ce37 /sys/doc/mkfile: gefs 2024-05-17 13:12:20 +00:00
Ori Bernstein
b1e897ae44 gefs.ms: sycer => syncer (thanks sigrid) 2024-05-16 21:01:48 +00:00
Ori Bernstein
da1daf3012 gefs: initial import 2024-05-16 20:47:43 +00:00
Jacob Moody
94c69c4f68 9[acl], libmach: L?AR/ST?CCC 2024-05-14 18:26:29 +00:00
Jacob Moody
178cd4d113 9[acl], libmach: LWSYNC/CMPW/CMPWU 2024-05-14 01:54:07 +00:00
Sigrid Solveig Haflínudóttir
2734fa8545 riow(1): mention having to put the rc pipeline into its own script 2024-05-13 20:28:18 +00:00
rodri
ff6a0f490a tmdate(2): fix two little typos in the examples 2024-05-13 13:37:22 +00:00
cinap_lenrek
a74c7ca5ea ipconfig(8): document loopback and null media 2024-05-12 13:50:52 +00:00
cinap_lenrek
c76cc12a17 ip/ipconfig: add "null" verb to bind nullmedium
Example usage:

ip/ipconfig null /dev/mordor 8.8.8.8 /128
2024-05-12 13:42:26 +00:00
cinap_lenrek
0a7279b3af devip: make "null" medium bindable
It can actually be usefull to bind this dummy
"null" medium to an address, which gives a way to
divert packets towards it that should be discarded.
2024-05-12 13:39:58 +00:00
cinap_lenrek
11fa01778a devip: increase MTU to 64k for loopback medium
We should ever attempt fragmenting packets
towards the loopback medium.
2024-05-12 13:35:03 +00:00
phil9
025a2d172e vdiff: exit if diff is empty
currently vdiff will display an empty window if there is no diff.
	Print a message and exit early instead.
2024-05-09 17:18:45 +00:00
rodri
039015ad71 vdiff: fix scrolling and mouse button handling.
vertical scrolling now works in a line-wise manner,
just like in rio(1), sam(1) and friends. horizontal
scrolling showed problems with some line widths
where they got cut before showing the last
characters.

finally, pressing LMB or RMB and swiping while going
through any of the blocks caused a storm of plumbs
and visibility toggling (when over the expander line).
this doesn't happen anymore.
2024-05-09 11:49:09 +00:00
Jacob Moody
92d5d58784 flambe: pass correct name to initdraw() 2024-05-08 23:24:55 +00:00
Jacob Moody
88faa807aa flambe: flame graphs for prof(1) data 2024-05-08 18:01:08 +00:00
Jacob Moody
c8544c91d9 prof: increase precision of measurements
Currently we use millisecond ticks for time spent in each function.
This is not good enough for modern machines where fast functions could
be completed in a handful of nanoseconds.  Instead let us just use the
raw ticks and store the cyclecfreq in the output prof data.  This
requires that we enlargen the time section in the data to 8 bytes,
which broke the assumptions for struct allignment and required a
slight refactor of the code used to read it in prof(1).  Since this is
a breaking change, we've devised a small format to communicate the
version for future revision of this format and this patch includes a
modification to file(1) for recognizing this format.  Additionally
some minor improvements were made across the board.
2024-05-08 17:20:22 +00:00
phil9
0fcab2a6e8 vcrop: fix image panning 2024-05-07 10:43:36 +00:00
phil9
d11ca3b545 vcrop - graphical image cropping tool
vcrop is a graphical version of crop(1).
2024-05-06 16:24:25 +00:00
Jacob Moody
bd1305a0b9 libc: compress directly recursive functions while profiling
When a function calls itself, the execution slot of its child is now
just added to its own time.  This makes conceptual sense and also
reduces a big cause of depth inflation.
2024-05-05 01:57:22 +00:00
Jacob Moody
15d1425b27 libc: increase default allocation for profiling
Current profiling size was 128k, and causes more frustration than it
is worth as demand paging makes this cheap.  Assuming 64 bytes at
worst per Plink this will use ~16M of virtual address space on 64bit
systems.
2024-05-05 01:34:22 +00:00
Jacob Moody
f3216125de limbach: remove unused 9c subdirectory 2024-05-04 19:45:01 +00:00
cinap_lenrek
7aceac32e8 eqn: fix silly mkfile
prevy.tab.h not used at all, dependency between
y.tab.c and y.tab.h is just *WRONG*.
2024-05-04 19:38:39 +00:00
Jacob Moody
2b202ec918 libmach: clean up power64 tests 2024-05-04 17:45:36 +00:00
Jacob Moody
0ab44a0062 9c: copy warning from other compilers regarding pointer -> int truncation 2024-04-29 21:31:05 +00:00
Jacob Moody
bac935c71f 9a: mkfile was pointing to wrong header 2024-04-29 21:30:27 +00:00
Jacob Moody
418f36d7eb libc/libap: update power64 entrypoints to new _callmain standard 2024-04-07 01:27:08 +00:00
Jacob Moody
37e65b331b 9c/9l: do not have the linker rewrite OSUB to negative OADD
POWER does not provided subtract immediate functions and
instead rely on negative addition. It was such that the linker
was the one who would go through and rewrite these to be negative
but it really should be done in the compiler while we still have
the width information.
2024-04-07 00:13:41 +00:00
Jacob Moody
0c6fd079ce 9l: do consize check for SB relative as well 2024-04-07 00:01:30 +00:00
Jacob Moody
5390130426 9c: avoid generating immediates that make the linker use REGTMP 2024-04-06 22:13:54 +00:00
Jacob Moody
8483799d4a 9c/9l/libmach: handle 64 bit constants
* Add a handful of 64 bit classifications to 9l, along with instruction generation for each.
* 9c should avoid generating immediate instructions for 64 constants.
* libmach should know about 9l's generation to present a better disassembly.
* libmach now properly displays MOVD for moves between registers on 64 bit.
2024-04-01 05:20:20 +00:00
Jacob Moody
7f8bd35954 9l: add -H6 for elf targeting kexec 2024-03-27 15:54:10 +00:00
Jacob Moody
5fe33fb808 /sys/src: power64 target 2024-03-30 18:58:36 +00:00
Jacob Moody
0ec381a846 libmach: power64 vector mov and cleanup 2023-11-07 14:45:29 +00:00
Jacob Moody
39c021fbc1 /sys/lib/acid: add power64 2023-11-04 20:52:35 +00:00
Jacob Moody
4cdad07b98 9c: mind which CMP is used when handling constants 2023-11-04 20:51:19 +00:00
Jacob Moody
fe53c0930e libmach: power64 catch up 2023-11-03 15:34:48 +00:00
Jacob Moody
7b63c05b21 9c: allow switches on 64bit values 2023-10-01 23:18:23 +00:00
Jacob Moody
ceba67bc06 9l: fix ELF generation 2023-10-01 21:08:38 +00:00
Jacob Moody
29ce934c91 9a, 9c, 9l: import from 9legacy 2024-04-01 20:46:41 +00:00
Jacob Moody
7628681f83 libmach: remove unused 6c subdirectory
This was leftover from before 6c was
in /sys/src/cmd, as the mkfile adds this
to the include path. Now that we have 6c,
this subdirectory is never used.
2024-05-04 17:13:41 +00:00
cinap_lenrek
0273db0792 ip/torrent: support compact peers6 list 2024-05-04 14:49:03 +00:00
cinap_lenrek
3ba68527b3 ip/torrent: fix wrong interval check 2024-05-04 14:48:27 +00:00
cinap_lenrek
217d2f751c ip/torrent: fix webseed
Commit 9f755671fb broke
webseeding with the last block.

The haveiece() call at the end was because the inner
is not calling havepiece() on the last block as it
does not take the piece length into account.

Now, instead, fix the inner loop, making the code
more setright foward so we call havepiece() on the
last block.
2024-04-28 16:37:29 +00:00
Sigrid Solveig Haflínudóttir
9ebd6f860e ext4srv: reduce the number of options, align more with existing filesystems
Also provide saner defaults (block size 4k instead of 1k).
Cache write back is always enabled now as well.
2024-04-27 16:26:55 +00:00
Ori Bernstein
ce86e64ee0 libc: correct dst transition times
The transition time in the timezone info file is,
confusingly, in local time and not UTC, so we need
to translate it before we do the comparison.

While we're here, revert the Australian timezone
change that made the offsets UTC, and add some test
to make sure we get this right.
2024-04-27 02:19:11 +00:00
cinap_lenrek
498f4f15b5 usbtree(8): document usbtree 2024-04-24 20:31:45 +00:00
cinap_lenrek
b7da224d10 nusb(4): document usbhubctl command format for PPPS 2024-04-24 20:09:57 +00:00
cinap_lenrek
03a52c7cf7 tcp: remove "MaxSegment" MIB stat, add InLimbo stat
This global "Mss" MIB element does not really exists,
and it makes no sense as the MSS is negotiated
per connection.

Put the InLimbo in the statistics table.
2024-04-24 09:06:22 +00:00
Jacob Moody
0320813091 /sys/lib/dist/ndb/common: remove old random auth domains 2024-04-23 00:55:07 +00:00
cinap_lenrek
0298949dd2 tcp: fix limbo entry leaks from hell
In limbo() function, once tpriv->nlimbo
reaches Maxlimbo, we'd try to re-use
Limbo entries from the head of the hash
chain. However, theres a special case
where our current chain contains only
a single entry. Then Limbo **l; points
to its next pointer, and writing:
*l = lp; would just yield in the entry
being linked to itself, leaking it.

The for(;;) loop in limborexmit() was wrong,
as the "continue" case would not advance
the lp pointer at all, (such as when
tpriv->nlimbo reaches > 100), we'd stop
cleaning out entries.

Handle Fsnewcall() returning nil case,
have to free Limbo *lp as we just removed
it from the hash table.

Add tpriv->nlimbo as "InLimbo" at the
end of /net/tcp/stats.
2024-04-22 18:44:53 +00:00
cinap_lenrek
b43c416083 pc: fix link order, libc.a *after* libsec.a (for rand()) 2024-04-22 07:19:58 +00:00
Jacob Moody
567b1b912a rio: fix memory leak with closed kbdtap (thanks aap) 2024-04-21 18:40:08 +00:00
Jacob Moody
ff30a7743b stats: use a high water mark for maximum on graphs 2024-04-21 18:21:54 +00:00
Jacob Moody
46b4b99997 /sys/lib/dist/ndb: update root servers and add script to keep them updated
Also remove dnsdump as that feature is dead now.
2024-04-21 18:20:30 +00:00
cinap_lenrek
a70280308a rudp: better newgen() function, avoiding the lock 2024-04-21 13:16:22 +00:00
cinap_lenrek
a54fcac016 devsdp: fix randomization of dial and acceptid
We where allocating the dialid and acceptid using:

rand()<<16 + rand()

this gives a biased values as rand() retuns a 15-bit
number. Instead, use two calls to nrand() to get
the full 32-bit unsigned range.
2024-04-21 13:10:39 +00:00