Commit graph

8605 commits

Author SHA1 Message Date
cinap_lenrek e4b5f170cf libc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize 2021-07-25 15:54:22 +00:00
cinap_lenrek 8a8329ad95 bcm64: make the kernel use virtual timer counter register for cycles() 2021-07-25 14:12:17 +00:00
cinap_lenrek b7e67e9e36 kernel: page counts a ulong, not usize 2021-07-25 14:03:12 +00:00
cinap_lenrek c38fcb5dc3 arm64: use generic timer virtual counter for cycles()
We used to use performance cycle counter for cycles(),
but it is kind of useless in userspace as each core
has its own counter and hence not comparable between
cores. Also, the cycle counter stops counting when
the cores are idle.

Most callers expect cycles() to return a high resolution
timestamp instead, so do the best we can do here
and enable the userspace generic timer virtual counter.
2021-07-23 15:10:01 +00:00
cinap_lenrek 2c1727e55c /sys/src/9/mkfile: add bcm64 (thanks stuart morrow) 2021-07-22 18:30:38 +00:00
cinap_lenrek 403149d7de gzip, bzip2: add -n flag to suppress modification timestamp 2021-07-21 17:36:02 +00:00
Jacob Moody 28057f67a0 ssh: fix typo (thanks izaki) 2021-07-21 16:16:29 +00:00
cinap_lenrek 669b3abd70 brk(2): .... we define lowest addres not used by the program above, so use that instead 2021-07-20 21:49:30 +00:00
cinap_lenrek 7bd6679c82 brk(2): sbrk(0) returns end address, not the base
sbrk(0) returns the current end address of the BSS segment,
not the base. This might have been confused with the behaviour
of segbrk(), which when given a zero address returns the base.
2021-07-20 21:44:34 +00:00
cinap_lenrek 90ce513fb0 merge 2021-07-18 20:21:06 +00:00
cinap_lenrek 187806ad20 screenlock: don't poll to top window (thanks Stuart Morrow)
> String becomes stringbg so we have guaranteed max contrast in case the
> user changes the picture. (If you don't change the picture, it's
> white-on-black-on-black (sic) and you would never notice the change.)
2021-07-18 19:54:58 +00:00
Ori Bernstein 07c32fb3da auth/rsa2jwk: add code to produce jwk rsa keys
This is useful for acmed, and possibly other web
technologies.
2021-07-18 15:30:35 +00:00
Ori Bernstein acc504c319 git/fetch: fix overly eager 's/pack/idx/g' in refactor
This would break pulling. We would try to index into
a place that didn't exist.
2021-07-18 14:59:51 +00:00
Jacob Moody be36c092ac aux/cddb: Provide -e option to print commands to rip audio with tags.
Also parse title/track artist and year.
2021-07-17 18:56:11 +00:00
Ori Bernstein 2204634275 git/fetch: ensure we clean packfiles on failure
When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.

We also leave it behind if we bail out early due
to an error, or due to only listing the changes.

This pushes down the creation of the file, and
cleans it up on error.

thanks to Anthony Martin for spotting the bug.
git/fetch: ensure we clean packfiles on failure

When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.

We also leave it behind if we bail out early due
to an error, or due to only listing the changes.

This pushes down the creation of the file, and
cleans it up on error.

Also, while we're here, clean up index caching,
and ensure we close the fd in all cases.

thanks to Anthony Martin for spotting the bug.
2021-07-17 00:10:44 +00:00
cinap_lenrek fad1b3f7f7 kbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc. 2021-07-16 23:36:40 +00:00
kvik e85aa1089d webfs(4): fix typos 2021-07-15 18:53:42 +00:00
cinap_lenrek c2a315c78e legal: mercurial -> git 2021-07-15 16:46:16 +00:00
cinap_lenrek 5899d2f0a6 legal: remove references to python and mercurial
THIS IS AN EX PYTHON!!
2021-07-15 16:43:12 +00:00
cinap_lenrek 006c4d7ffc archacpi: make *acpi=1 the default 2021-07-15 16:07:54 +00:00
cinap_lenrek 3b1c450cd5 ether82563: add pci id for i219-LM from ThinkPad P17 Gen1 Professional Mobile Workstation (thanks tschak909) 2021-07-15 07:50:56 +00:00
kvik 431dbabcc1 graphics(2): fix typo 2021-07-14 20:38:12 +00:00
cinap_lenrek 4483500f62 pc, pc64: increase confmem slots to 64
Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation
comes up with around 36 separate memory ranges.

ridiculous!
2021-07-14 17:06:28 +00:00
cinap_lenrek 1a46b6c19e libaml: fix gc bug, need to amltake()/amldrop() temporary buffer
we have to protect the temporary buffer allocated by rwfield()
as rwreg() calls amlmapio() which might cause further aml code
execution causing gc() which frees it under us (as it is not
referenced from the interpreter state).

this fixes a panic on boot of a

Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation
2021-07-14 17:04:40 +00:00
Ori Bernstein 6560e7c6fd fs(4): describe the noauth toggle better (thanks izaki) 2021-07-12 23:47:06 +00:00
Jacob Moody 5a23b752eb strcat(2): 0 → nil in manpage in refrence to pointers 2021-07-12 21:42:39 +00:00
cinap_lenrek e8259861da virtio: set FeaturesOk flag after feature negotiation, and enable queues before DriverOk flag 2021-07-11 21:49:15 +00:00
cinap_lenrek ad37339a1c vmx: reset virtio queue state on device reset
when a virtio device gets reset, we have to also reset the device
shadow indices: availableidx and usedidx. for extra safetly,
we also reset the buffer descriptor table addresses.

this is accomplished by adding a vioqreset(VIOQueue*) function
that brings the queue to its initial reset state.

this fixes non functional ethernet after reboot(8).
2021-07-11 12:12:51 +00:00
cinap_lenrek f58d99aa7a virtio: add non-legacy virtio 1.0 drivers for disk and ethernet
The new interface uses pci capability structures to locate the
registers in a rather fine granular way making it more complicated
as they can be located anywhere in any pci bar at any offset.

As far as i can see, qemu (6.0.50) never uses i/o bars in
non-legacy mode, so only mmio is implemented for now.

The previous virtio drivers implemented the legacy interface only
which uses i/o ports for all register accesses. This is still
the preferred method (and also qemu default) as it is easier to
emulate and most likely faster.

However, some vps providers like vultr force the legacy interface
to disabled with qemu -device option "disable-legacy=on" resulting
on a system without a disk and ethernet.
2021-07-11 11:24:13 +00:00
cinap_lenrek c3589ef3cf kernel: export pcienumcaps() for custom capability enumeration in drivers (virtio)
This used to be a internal function, but virtio
uses multiple structures with the same cap type
to indicate the location of various register
blocks in the pci bars so export it.
2021-07-10 18:34:22 +00:00
Jacob Moody 51a351e845 aux/cddb: freedb.org is dead, use gnudb.org 2021-07-10 15:57:46 +00:00
Sigrid Solveig Haflínudóttir bf6769d3f0 mouse(3): mousein is NOT exclusive, see 30907f1d00 2021-07-09 14:40:23 +00:00
Ori Bernstein 2f8a59f4b5 rc: add subshell-function syntax
fn foo @{bar} is now equivalent to
fn foo {@{bar}}. As a side effect,
this disallows creating functions
named after keywords without first
quoting them.
2021-07-08 21:35:34 +00:00
cinap_lenrek b542dce430 libsec: take just the CN part of Distinguished Name in subjectAltName 2021-07-08 20:20:09 +00:00
Ori Bernstein 8b550e73c2 fortunes: unremove 2021-07-08 15:47:49 +00:00
Ori Bernstein 4001d24ec3 fortunes: revision: allow pseudo options after --end-of-options 2021-07-08 15:21:59 +00:00
kvik a0e65ca075 git: create .git/objects/ on git/init 2021-07-06 16:21:18 +00:00
Sigrid Solveig Haflínudóttir 16da8c0529 vmx: emulate ps/2 intellimouse scrolling 2021-07-06 15:44:16 +00:00
cinap_lenrek 78cf847bfb rsa(8): document auth/x5092pub, fix usage lines 2021-07-04 22:38:22 +00:00
cinap_lenrek 58b61ff9b9 libsec: do proper type checking, fix wrong deduplication check 2021-07-04 22:28:16 +00:00
cinap_lenrek 88060e7501 libsec: add X509reqtoRSApub() function and return subject alt names in X509to*pub() name buffer
We need a way to parse a rsa certificate request and return the public
key and subject names. The new function X509reqtoRSApub() works the
same way as X509toRSApub() but on a certificate request.

We also need to support certificates that are valid for multiple domain
names (as tlshand does not support certificate selection). For this
reason, a comma separated list is returned as the certificate subject,
making it symmetric to X509rsareq() handling.

A little helper is provided with this change (auth/x5092pub) that takes
a certificate (or a certificate request when -r flag is provided) and
outputs the RSA public key in plan 9 format appended with the subject
attribute.
2021-07-04 22:00:24 +00:00
Ori Bernstein 7010ad85c5 git/export: make output pipable to /bin/mail
git/export *almost* produces output that can be
emailed with upas using

	git/export $commit | mail maintainer@site.com

but, the

	From: commit-id date

line that git generates trips it up. Luckily,
'git am' doesn't seem to care much if that line
is missing, so we can simply omit it with no issue.
2021-07-04 20:18:37 +00:00
Ori Bernstein e934530ee4 libc: add encode(2) variants for custom alphabets
There are a number of alphabets in common use for base32
and base64 encoding, such as url-safe encodings.

This adds support for passing a function to encode into
arbitary alphabets.
2021-07-03 20:03:17 +00:00
cinap_lenrek c848ca6267 devmouse: default to no blanking instead of 30 minute blank timeout 2021-07-01 23:11:11 +00:00
Alex Musolino 2929a3bf67 upas/Mail: avoid showing empty To: and CC: lines in compose windows 2021-06-30 12:23:45 +00:00
Alex Musolino a5c4ac4804 upas/Mail: fix CC addresses in "Reply All" compose windows 2021-06-30 12:22:28 +00:00
Ori Bernstein dd7352fd35 git/revert: revert
the old implementation was correct; we want to
mark it dirty and let walk sort it out.
2021-06-29 20:03:26 +00:00
Ori Bernstein ca6058e0e1 git/revert: fix previous commit (helps if you save the file, thanks qwx)
git/revert: fix previous commit (helps if you save the file, thanks qwx)
2021-06-28 23:40:40 +00:00
Ori Bernstein 682aabf9f6 git/branch: mark files we couldn't update as dirty 2021-06-28 18:28:08 +00:00
Anthony Martin 658757abed manual: don't match nonexistent file while preprocessing
Authsrv(6) used to be called auth(6) before
the fourth edition and was preprocessed by
eqn(6) before the third edition. The mkfile
was never updated to reflect the changes.

All other files are accounted for:

% cd /sys/man
% for(i in TS EQ PS G1) echo $i `{grep -l '^\.'$i ?/[0-9a-z]*}
TS 1/tbl
EQ 1/eqn 3/usb
PS 1/pic
G1 1/grap
%
2021-06-27 00:13:58 +00:00