Commit graph

1315 commits

Author SHA1 Message Date
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
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
Jacob Moody
cac03f355c kernel: revert /srv/clone 2022-06-29 17:35:27 +00:00
Jacob Moody
fa0c807bfb kernel: add /srv/clone to get seperate /srv bulletin boards. 2022-06-21 13:21:38 +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
Jacob Moody
be1789d78b kernel: bootrc: add bootloop= 2022-06-14 08:16:57 +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
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
Jacob Moody
13065e16b3 auth/box: don't bother switching to none
Changing the user to none doesn't do much for us
here. For kernel drivers that check the user of the
current proc we'll be none, but anything from devmnt
will still be accessed using creds from the original
attachment. Instead, running with none can be done
by chaining with auth/none:

auth/none auth/box ...
2022-06-10 04:10:54 +00:00
Jacob Moody
056ad652a4 auth/box: build restricted namespaces using components from the parent. 2022-06-07 05:38:08 +00:00
Jacob Moody
f4840cdba5 kernel: add devskel for pc and pc64 2022-06-07 05:25:44 +00:00
Ori Bernstein
9eb9c9e560 patch(1): remove options that don't exist
the summary mentions options that existed during
development, but no longer do.
2022-06-04 02:13:58 +00:00
Ori Bernstein
9e547f50d1 patch(1): add the manpage
forgot it in the last commit
2022-06-04 02:12:12 +00:00
Jacob Moody
47cff2e833 auth(8): bugs have been squashed 2022-06-02 16:51:55 +00:00
Jacob Moody
57fa781188 aux/listen: Allow per service namespace files 2022-05-28 02:34:43 +00:00
Jacob Moody
774529e440 kernel: add /rc to devroot
This makes it much easier to run a rc
program without needing to bind in all of '#s/boot'.
2022-05-28 02:31:26 +00:00
Jacob Moody
eaa1949ba0 auth/newns: add chdev command 2022-05-28 02:27:59 +00:00
Jacob Moody
6926080a2d add chdev(1) 2022-05-28 02:25:56 +00:00
Jacob Moody
e9bb7876e1 kernel: add chdev command to devcons 2022-05-28 02:23:29 +00:00
Ori Bernstein
a59e61a6a4 patch(1): remove bell labs patch scripts
bell labs is dead, and nobody is listening; 9front
has our own patch submission proces.
2022-05-22 17:27:31 +00:00
Jacob Moody
4ee54b1416 fork(2): fix commas in RFNOMNT references 2022-05-15 16:14:36 +00:00
Jacob Moody
2c67fb9794 fork(2): fix parens in RFNOMNT references (thanks Amavect) 2022-05-15 03:01:49 +00:00
Jacob Moody
e614e819e3 fork(2): Document RFNOMNT edge cases. 2022-05-12 17:50:08 +00:00
Ori Bernstein
a271f62bf2 git/pull: remove '-b' and '-a' option
we do the right thing by default now, let's not
add knobs that nobody cares about.
2022-04-28 03:35:54 +00:00
umbraticus@prosimetrum.com
d606d83ed8 make = command's output plumbable
This patch makes sam's = cmd output what seems to me a more
useful (plumbable) format: /full/path/to/file:addr , where
addr is line(s) under = and rune(s) under =#.
2022-04-16 06:53:35 +00:00
rodri
70e2b4f7ec 9pqueue(2): fix typo 2022-04-19 20:21:37 +00:00
cinap_lenrek
56c86739a8 sol(8): fix example (vncv vs vnc) 2022-04-19 02:09:06 +00:00
cinap_lenrek
1a4e03cf93 ip/sol: kvm (vnc) redirect, bring back plain authentication as a fallback (when unsupported) 2022-04-03 04:19:46 +00:00
cinap_lenrek
31294b6c1a ip/sol: use httpdigest authentication
httpdigest authentication allows one to share the key
in factotum with the amt webserver on https://target:16993
2022-04-02 21:47:00 +00:00
Sigrid Solveig Haflínudóttir
4a401e7703 draw(3): add a missing .br 2022-04-02 21:37:51 +00:00
Sigrid Solveig Haflínudóttir
30f5752710 draw(3): .IR on memlorigin(2), fix wrong "t" param name (should be "top") 2022-04-02 10:37:39 +00:00
cinap_lenrek
ca60e03c5b ip/sol: add intel AMT serial-over-lan console program 2022-04-01 21:24:42 +00:00
cinap_lenrek
ca313087c1 ip(3): use flags instead of tag for 8 column route add/remove
This avoids ipconfig having to explicitely specify the tag
when we want to set route type, as the tag can be provided
implicitely thru the "tag" command.
2022-03-14 18:45:27 +00:00
cinap_lenrek
5186cb3b99 ip(3): document the trans argument for add/try. 2022-03-13 17:38:06 +00:00
cinap_lenrek
c8507f428f ipconfig(8): add -t flag to enable source address translation 2022-03-13 17:29:16 +00:00
cinap_lenrek
d2a7d88662 devip: implement network address translation routes
This adds a new route "t"-flag that enables network address translation,
replacing the source address (and local port) of a forwarded packet to
one of the outgoing interface.

The state for a translation is kept in a new Translation structure,
which contains two Iphash entries, so it can be inserted into the
per protocol 4-tuple hash table, requiering no extra lookups.

Translations have a low overhead (~200 bytes on amd64),
so we can have many of them. They get reused after 5 minutes
of inactivity or when the per protocol limit of 1000 entries
is reached (then the one with longest inactivity is reused).

The protocol needs to export a "forward" function that is responsible
for modifying the forwarded packet, and then handle translations in
its input function for iphash hits with Iphash.trans != 0.

This patch also fixes a few minor things found during development:

- Include the Iphash in the Conv structure, avoiding estra malloc
- Fix ttl exceeded check (ttl < 1 -> ttl <= 1)
- Router should not reply with ttl exceeded for multicast flows
- Extra checks for icmp advice to avoid protocol confusions.
2022-03-12 20:53:17 +00:00
cinap_lenrek
065d601916 nusb: Fix handling of interface altsetting.
The altsetting was handled only for a single endpoint
(per interface number), but has to be handled for each
endpoint (per interface *AND* altsetting number).

A multi function device (like a disk) can have
multiple interfaces, all with the same interface number
but varying altsetting numbers and each of these
interfaces would list distict endpoint configurations.

Multiple interfaces can even share some endpoints (they
use the same endpoint addresses), but
we still have to duplicate them for each
interface+altsetting number (as they'r part of
actually distict interfaces with distict endpoint
configurations).

It is also important to *NOT* make endpoints bi-directional
(dir == Eboth) when only one direction is used in a
interface/altsetting and the other direction in another.
This was the case for nusb/disk with some seagate drive
where endpoints where shared between the UAS and
usb storage class interface (but with distict altsettings).

The duplicate endpoints (as in using the same endpoint address)
are chained together by a next pointer and the head
is stored in Usbdev.ep[addr], where addr is the endpoint
address. These Ep structures will have distinct endpoint
numbers Ep.id (when they have conflicting types), but all
will share the endpoint address (lower 4 bits of the
endpoint number).

The consequence is that all of the endpoints configuration
(attributes, interval) is now stored in the Ep struct and
no more Altc struct is present.

A pointer to the Ep struct has to be passed to openep()
for it to configure the endpoint.

For the Iface struct, we will now create multiple of them:
one for each interface *AND* altsetting nunber,
chained together on a next pointer and the head being
stored in conf->iface[ifaceid].

--
cinap
2022-02-21 19:50:16 +00:00
cinap_lenrek
4b637a24f9 devbridge: implement experimental vlan support 2022-02-16 22:38:03 +00:00
qwx
beeb054209 gba: fix flash chip id for 128k and add setting
Some gba cartridges use flash chips produced by a few different
manufacturers for backup memory.  A game rom may then try to read the
device id for its flash chip and break if it's the wrong one.  There's
no way for us to know which chip is supposed to be there, save for
looking it up in some database.  These chips are either 64k or 128k
big.  gba(1) hardcodes the id for the SST 64k chip, but games like the
Pokémon ones use a 128k Macronix chip and expect a different id,
completely breaking them.

This patch sets a different default for 128k flash backups, and gives
the ability to set the exact type when creating the save file if it's
really necessary.  This new default fixes the Pokémons.  The type is
saved in the save file, but this will *not* break existing ones.  It
may be that we don't need to worry about the type and just have an id
that corresponds to the right chip size, which is why these defaults
make sense, but I haven't tested more than a dozen roms, mostly since
I don't really know which games use 128k flash.
2022-02-10 00:35:13 +00:00
cinap_lenrek
e4f30c89f4 ip/tftpd: add -m argument for name substitution using regular expressions
This allows mapping incoming filenames to a different name
using regular expressions, followed by subtitutions
of the %[ICE] format strings.

I needed this to have individual cmdline.txt files for
netbooted raspberry pi's. In this example, i map cmdline.txt
to %C, which gets substituted for /cfg/pxe/$ether of the client.
2022-02-05 01:34:22 +00:00
cinap_lenrek
60adc40118 devenv: allow environment total size of up to 1MB
Sometimes, there is the one-off occation when one needs to
pass a huge list in rc...

This change makes devenv track total memory consumption
of environment groups allowing them to grow up to 1MB in
size (including overhead).

(Before, only the variable size was restricted, but
not the amount of files being created).

The maximum value size of a single environment variable
is set to half of the total size, which allows the
occational large value. (But not many of them).

Because we track all memory consuption, it is also
now possible to create around 10k small environment
variales.

A hashtable is added for name lookups and the qid.path
was changed to allow direct indexing into the entry
array without needing a scan lookup.

All smalloc() calls have been removed, exhaustion is
handled with error(Enomem) avoiding deadlock
in case we run out of kernel memory.
2022-01-23 21:33:58 +00:00
Igor Böhm
3ba62d3cd0 man(1): reference /rc/bin/sig in SOURCE section 2022-01-23 01:14:05 +00:00
cinap_lenrek
b00b3d3739 rc(1): fix synopsis 2021-12-31 16:08:30 +00:00
cinap_lenrek
44a5f4d2ef remove pushssl(2) 2021-12-31 15:59:13 +00:00
cinap_lenrek
8bebe3ab19 remove ssl(3) 2021-12-31 15:56:40 +00:00
cinap_lenrek
2d105c2d32 0intro(1), acme(1), con(1), rcpu(1), rio(1), namespace(4), authsrv(6), aan(8): cpu -> rcpu 2021-12-31 15:53:00 +00:00
cinap_lenrek
31f66da433 ftpfs(4): import -> rimport 2021-12-31 15:51:22 +00:00
cinap_lenrek
917f57b6c3 consolefs(4): import -> rimport 2021-12-31 15:50:22 +00:00
cinap_lenrek
aa781bfda2 listen(8): get rid of old ports 2021-12-31 15:44:55 +00:00