Commits on Source (3)
-
Sebastian Krzyszkowiak authored
Citing Wikipedia [0]: Of these protocols [RNDIS, ECM, EEM and NCM] ECM could be classified the simplest - frames are simply sent and received without modification one at a time. This was a satisfactory strategy for USB 1.1 systems (current when the protocol was issued) with 64 byte packets but not for USB 2.0 systems which use 512 byte packets. We're already using USB 3.0, so we should switch away from ECM. Reasonable alternatives include EEM and NCM (RNDIS is a proprietary Windows protocol, which - although supported by Linux - is considered unsafe and may get removed [1]). Bandwidth tests with iperf3 gave me these results: - ECM: 526 Mbits/sec - EEM: 761 Mbits/sec - NCM: 1.67 Gbits/sec While NCM is newer, it's been supported in Linux since 2.6.37 already, which is quite ancient by today's standards, so switching to it should be safe for any kind of reasonably modern Linux host (plus we still expose ACM serial that will be available even if NCM is not supported, so basic communication with the device will still be possible). It also has an added bonus of being supported in Windows 10 and later, while ECM and EEM aren't supported there at all. Therefore, switch the Ethernet gadget to use NCM. [0] https://en.wikipedia.org/wiki/Ethernet_over_USB [1] https://lore.kernel.org/lkml/20221123124620.1387499-1-gregkh@linuxfoundation.org/
75602288 -
Sebastian Krzyszkowiak authored
Reencryption happens before resizing, so it only takes about two minutes on the phone. In order to use it, initial LUKS dump needs to be stored on the rootfs: mkdir -p /var/lib/reencrypt LUKSDEV=$(cryptsetup status crypt_root | awk -F: '$1~/device/ {gsub(/^[ \t]+/, "", $2); print $2}') cryptsetup luksDump $LUKSDEV > /var/lib/reencrypt/dump
9a3101a5 -
4164803d
Showing
- debian/librem5-base-defaults.install 1 addition, 1 deletiondebian/librem5-base-defaults.install
- debian/librem5-base-defaults.librem5-pm.udev 7 additions, 0 deletionsdebian/librem5-base-defaults.librem5-pm.udev
- default/gadget/usb_gadget_start 5 additions, 5 deletionsdefault/gadget/usb_gadget_start
- default/gadget/usb_gadget_stop 1 addition, 1 deletiondefault/gadget/usb_gadget_stop
- default/initramfs-tools/scripts/local-bottom/0reencrypt 44 additions, 0 deletionsdefault/initramfs-tools/scripts/local-bottom/0reencrypt