Demand paging, the RTL8168H, links that come up late, and Ctrl+Alt+F1..F12
- Anonymous memory can be reserved without being backed: large mappings, MAP_NORESERVE and PROT_NONE are recorded and each page appears, zeroed, on first touch -- from trap() for the program, from uva2ka() for the kernel on its behalf. WebKit reserves 4 GB at start and touches a sliver; backing it all failed with ENOMEM and Epiphany aborted. - r8169: the 8168G generation and later (the laptop's 8168H, XID 541) are taken from the firmware's out-of-band mode, get their PLL powered, the receive gate opened, and their PHY reached through the OCP window. The PHY's power-down bit is cleared; the old code kept it while restarting autonegotiation. Untested on the hardware so far. - The network thread follows each device's link into lwIP. The link was read once at attach, 0.02 s into boot; real autonegotiation takes seconds, so on hardware the interface stayed down for good. - Twelve terminals, switched with Ctrl+Alt+F1..F12 by default: the keys X uses, so the console and the desktop agree. AltGr+F-key is gone from the defaults (chvt -c altgr+F brings it back). - SO_PASSCRED on Unix sockets, with SCM_CREDENTIALS delivered by recvmsg. WebKit sets it on its IPC sockets and aborted when refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
3113eff7fe
commit
54b25708c3
24 changed files with 4166 additions and 68 deletions
|
|
@ -1,12 +1,13 @@
|
|||
<!-- SPDX-License-Identifier: GPL-2.0-or-later -->
|
||||
# Virtual terminals
|
||||
|
||||
Six of them, `/dev/tty1` through `/dev/tty6`.
|
||||
Twelve of them, `/dev/tty1` through `/dev/tty12`, one per function key.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **AltGr+F1 .. F6** | go to that terminal |
|
||||
| **AltGr+-** / **AltGr+=** | previous / next terminal *in use* |
|
||||
| **Ctrl+Alt+F1 .. F12** | go to that terminal — on the console and under X alike |
|
||||
| **Alt+F1 .. F12** | the same, on the text console only (X keeps plain Alt) |
|
||||
| **Ctrl+Alt+-** / **Ctrl+Alt+=** | previous / next terminal *in use* |
|
||||
| `chvt N` | the same, from a script or a serial console |
|
||||
|
||||
The chord is settable — `chvt -c` — for the reasons below. Each one is an independent terminal: its own screen, its own
|
||||
|
|
@ -14,8 +15,9 @@ cursor, its own line discipline, its own foreground process group and its own
|
|||
session. Two shells on two terminals are two unrelated processes that happen to
|
||||
share a keyboard and a screen.
|
||||
|
||||
A seventh is deliberately not bound. That is where a display server goes,
|
||||
and it will claim switching with `VT_SETMODE` rather than a chord.
|
||||
A display server takes one of them with `VT_SETMODE` and does its own
|
||||
switching; X switches with Ctrl+Alt+F-key, which is why that is the default
|
||||
here too.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -202,8 +204,9 @@ So the kernel ships a default and lets it be moved:
|
|||
|
||||
```sh
|
||||
chvt # report the active terminal and the current chord
|
||||
chvt -c altgr+F # AltGr+F1..F6 (the default)
|
||||
chvt -c ctrl+shift+F # Ctrl+Shift+F1..F6
|
||||
chvt -c ctrl+alt+F # Ctrl+Alt+F1..F12 (the default)
|
||||
chvt -c altgr+F # AltGr+F1..F12 (the default until 2026-10)
|
||||
chvt -c ctrl+shift+F # Ctrl+Shift+F1..F12
|
||||
chvt -c alt+1 # Alt+1..6
|
||||
chvt -c off # no chord; chvt N is then the only way
|
||||
```
|
||||
|
|
@ -211,23 +214,23 @@ chvt -c off # no chord; chvt N is then the only way
|
|||
`off` is a legitimate setting, not a failure mode. On a machine whose host
|
||||
grabs everything worth binding, `chvt N` from a shell is the honest answer.
|
||||
|
||||
The default is **AltGr+F1..F6**, and the `AltGr+`letter row above needs reading
|
||||
carefully: what a Polish layout wants is AltGr with a **letter**. AltGr with a
|
||||
**function key** produces nothing on any layout, no window manager binds it,
|
||||
and no application asks for it. It is the one combination all three parties
|
||||
leave alone.
|
||||
The default is **Ctrl+Alt+F1..F12**. It was AltGr+F-key for a long time —
|
||||
AltGr with a **function key** produces nothing on any layout, no window manager
|
||||
binds it, and no application asks for it — but X owns the keyboard while it
|
||||
runs and switches only with Ctrl+Alt+F-key, so the console and the desktop
|
||||
answered different keys for the same thing. One chord everywhere wins. Inside
|
||||
a VM whose host grabs Ctrl+Alt+F-key, `chvt -c altgr+F` brings the old one
|
||||
back.
|
||||
|
||||
That distinction is only expressible because Right Alt is tracked as its own
|
||||
modifier bit. It used to share `ALT`, which is harmless for typing — neither is
|
||||
used to look up a character — and made this impossible to say.
|
||||
|
||||
Verified rather than argued: with the default set, `AltGr+F2` switches,
|
||||
`AltGr+F1` returns to a pixel-identical tty1, and `AltGr+a` still reaches the
|
||||
shell, so ą is untouched.
|
||||
AltGr+letter still reaches the shell untouched, so ą is unaffected either way.
|
||||
|
||||
Whatever the modifiers are, they also bind **minus** and **equals** to the
|
||||
previous and next terminal. Those step only through terminals that are *in
|
||||
use* — the same `opened` count `VT_GETSTATE` reports — because six terminals
|
||||
use* — the same `opened` count `VT_GETSTATE` reports — because twelve terminals
|
||||
with two shells on them means four blank screens in between, and cycling past
|
||||
them is worse than not having the key.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue