This patch is applied in Arch Linux kernel and has not been upstreamized yet.
Thanks to tsaruk1van@ for reporting existense of the issue (also with kernel 5.10) and that this fix works.
There are strange build problems with current config, I don't see sense in spending time on solving them because nobody has actually ever used this UML
vde-devel BR is probably not needed any more, but let's keep it for future...
* the kernel may work OK without WiFi and firmware stuff, make it easy to uninstall it (e.g. when trying to save disk space in a VM)
* sysfsutils is not used in scriptlets, remove it
* symlinks vmlinuz-%{flavour} and initrd-%{flavour}.img have not existed for ages, they were removed lots of time ago in ROSA, there is no sense in trying to delete what does not exist and is never created
* disable Atom ISP as recommended by RussianNeuroMancer because it does not make cameras work on x86 Intel-based tablets where cameras are connected on i2c bus, but makes the camera consome power without working
* enable zswap by default and use the default allocator as in Arch Linux where zswap is enabled by default
https://wiki.archlinux.org/index.php/Zswap
* tune values of sysctls from le9 patch to make it have at least some effect on typical desktop and server systems but avoid too agressive OOM killer on systems with 2 GB RAM and less where OOM killer kills too many process
See discussion and my comments in the thread https://www.linux.org.ru/news/kernel/16052362
* remove not used variant of the patch which did not have any effect
Update existing x86 configs manually
Make an arm64 config based on them instead on the old one which was temporary copypasted from ALT Linux
In most cases I answered to `make ARCH=xxx defconfig` like this:
N/y -> Y
N/m(/y) -> M
Y/n(/m) -> Y
M/n(/y) -> M
But did not enable odd debug.
Probably too much hardware is enabled on arm64.
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
Changelog:
```
$ wget -qO- https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.4.81 | grep ^Date: -A2 | grep -v ^Date: | sort -u
arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed
arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()
arm64: pgtable: Fix pte_accessible()
arm64: tegra: Wrong AON HSP reg property size
ARM: dts: dra76x: m_can: fix order of clocks
ARM: OMAP2+: Manage MPU state properly for omap_enter_idle_coupled()
ASoC: Intel: Allow for ROM init retry on CNL platforms
ASoC: Intel: Multiple I/O PCM format support for pipe
ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT
ASoC: Intel: Skylake: Await purge request ack on CNL
ASoC: Intel: Skylake: Enable codec wakeup during chip init
ASoC: Intel: Skylake: Remove superfluous chip initialization
ASoC: Intel: Skylake: Select hda configuration permissively
ASoC: Intel: Skylake: Shield against no-NHLT configurations
batman-adv: set .owner to THIS_MODULE
bnxt_en: fix error return code in bnxt_init_board()
bnxt_en: fix error return code in bnxt_init_one()
bnxt_en: Release PCI regions when DMA mask setup fails during probe.
btrfs: don't access possibly stale fs_info data for printing duplicate device
btrfs: fix lockdep splat when reading qgroup config on mount
btrfs: tree-checker: add missing return after error in root_item
btrfs: tree-checker: add missing returns after data_ref alignment checks
bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw
can: gs_usb: fix endianess problem with candleLight firmware
can: m_can: fix nominal bitiming tseg2 min for version >= 3.1
can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags
cifs: fix a memleak with modefromsid
cxgb4: fix the panic caused by non smac rewrite
dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size
dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant
efi: EFI_EARLYCON should depend on EFI
efivarfs: revert "fix memory leak in efivarfs_create()"
HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices
HID: Add Logitech Dinovo Edge battery quirk
HID: add support for Sega Saturn
HID: cypress: Support Varmilo Keyboards' media hotkeys
HID: hid-sensor-hub: Fix issue with devices with no report ID
HID: ite: Replace ABS_MISC 120/121 events with touchpad on/off keypresses
HID: logitech-hidpp: Add HIDPP_CONSUMER_VENDOR_KEYS quirk for the Dinovo Edge
HID: uclogic: Add ID for Trust Flex Design Tablet
i40e: Fix removing driver while bare-metal VFs pass traffic
IB/mthca: fix return value of error branch in mthca_init_cq()
ibmvnic: fix call_netdevice_notifiers in do_reset
ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq
ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues
ibmvnic: notify peers when failover and migration happen
Input: i8042 - allow insmod to succeed on devices without an i8042 controller
ipv4: use IS_ENABLED instead of ifdef
irqchip/exiu: Fix the index of fwspec for IRQ type
iwlwifi: mvm: write queue_sync_state only for sync
KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace
KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page
KVM: x86: Fix split-irqchip vs interrupt injection window request
KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint
Linux 5.4.81
net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset
net: ena: set initial DMA width to avoid intel iommu issue
netfilter: clear skb->next in NF_HOOK_LIST()
nfc: s3fwrn5: use signed integer for parsing GPIO numbers
nvme: free sq/cq dbbuf pointers when dbbuf set fails
optee: add writeback to valid memory type
perf probe: Fix to die_entrypc() returns error correctly
perf stat: Use proper cpu for shadow stats
perf/x86: fix sysfs type mismatches
phy: tegra: xusb: Fix dangling pointer on probe failure
platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time
platform/x86: toshiba_acpi: Fix the wrong variable assignment
powerpc/64s: Fix allnoconfig build since uaccess flush
proc: don't allow async path resolution of /proc/self components
RDMA/hns: Bugfix for memory window mtpt configuration
RDMA/hns: Fix retry_cnt and rnr_cnt when querying QP
s390/qeth: fix af_iucv notification race
s390/qeth: fix tear down of async TX buffers
s390/qeth: make af_iucv TX notification call more robust
scsi: libiscsi: Fix NOP race condition
scsi: target: iscsi: Fix cmd abort fabric stop race
scsi: ufs: Fix race between shutdown and runtime resume flow
smb3: Avoid Mid pending list corruption
smb3: Call cifs reconnect from demultiplex thread
smb3: Handle error case during offload read path
spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe
spi: bcm2835: Fix use-after-free on unbind
spi: bcm-qspi: Fix use-after-free on unbind
staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK
trace: fix potenial dangerous pointer
USB: core: Change %pK for __user pointers to %px
USB: core: Fix regression in Hercules audio card
usb: gadget: Fix memleak in gadgetfs_fill_super
usb: gadget: f_midi: Fix memleak in f_midi_alloc
USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card
vhost scsi: fix cmd completion race
video: hyperv_fb: Fix the cache type when mapping the VRAM
wireless: Use linux/stddef.h instead of stddef.h
x86/mce: Do not overwrite no_way_out if mce_end() fails
x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak
x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak
x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
x86/xen: don't unbind uninitialized lock_kicker_irq
xtensa: uaccess: Add missing __user to strncpy_from_user() prototype
```
```
DEBUG: + make ARCH=i586 oldconfig
DEBUG: Makefile:583: arch/i586/Makefile: No such file or directory
DEBUG: make: *** No rule to make target 'arch/i586/Makefile'. Stop.
DEBUG: + sed -i s/CONFIG_64BIT=y// arch/x86/configs/i586_defconfig-generic
DEBUG: sed: can't read arch/x86/configs/i586_defconfig-generic: No such file or directory
```
Commit 59b214f0 changed i586 to i686 as we changed in RPM,
but forgot to rename config:
error: Bad file: /builddir/build/SOURCES/kernel-i686.config: No such file or directory
But this spec is still supported on rosa2016.1, let's just use i586 here for now
```
$ wget -qO- https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.4.80 | grep Date: -A2 | grep -v Date: | sort -u
--
ACPI: button: Add DMI quirk for Medion Akoya E2228T
ah6: fix error return code in ah6_input()
ALSA: ctl: fix error path at adding user-defined element set
ALSA: firewire: Clean up a locking issue in copy_resp_to_buf()
ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220)
ALSA: hda/realtek - Add supported for Lenovo ThinkPad Headset Button
ALSA: mixart: Fix mutex deadlock
ALSA: usb-audio: Add delay quirk for all Logitech USB devices
arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
arm64: dts: allwinner: a64: OrangePi Win: Fix ethernet node
arm64: dts: allwinner: a64: Pine64 Plus: Fix ethernet node
arm64: dts: allwinner: beelink-gs1: Enable both RGMII RX/TX delay
arm64: dts: allwinner: h5: OrangePi PC2: Fix ethernet node
arm64: dts: allwinner: h5: OrangePi Prime: Fix ethernet node
arm64: dts: allwinner: Pine H64: Enable both RGMII RX/TX delay
arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point
arm64: dts imx8mn: Remove non-existent USB OTG2
arm64: errata: Fix handling of 1418040 with late CPU onlining
arm64: psci: Avoid printing in cpu_psci_cpu_die()
arm64: smp: Tell RCU about CPUs that fail to come online
ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy
ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
ARM: dts: sun7i: bananapi-m1-plus: Enable RGMII RX/TX delay on Ethernet PHY
ARM: dts: sun7i: cubietruck: Enable RGMII RX/TX delay on Ethernet PHY
ARM: dts: sun8i: a83t: Enable both RGMII RX/TX delay on Ethernet PHY
ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY
ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix ethernet node
ARM: dts: sun9i: Enable both RGMII RX/TX delay on Ethernet PHY
ARM: dts: sunxi: bananapi-m2-plus: Enable RGMII RX/TX delay on Ethernet PHY
ASoC: qcom: lpass-platform: Fix memory leak
atm: nicstar: Unmap DMA on send error
bnxt_en: read EEPROM A2h address using page 0
bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self
bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect
bpf, sockmap: Fix partial copy_page_to_iter so progress can still be made
bpf, sockmap: On receive programs try to fast track SK_PASS ingress
bpf, sockmap: Skb verdict SK_PASS to self already checked rmem limits
bpf, sockmap: Use truesize with sk_rmem_schedule()
can: af_can: prevent potential access of uninitialized member in canfd_rcv()
can: af_can: prevent potential access of uninitialized member in can_rcv()
can: dev: can_restart(): post buffer from the right context
can: flexcan: fix failure handling of pm_runtime_get_sync()
can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery
can: kvaser_pciefd: Fix KCAN bittiming limits
can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits
can: m_can: m_can_class_free_dev(): introduce new function
can: m_can: m_can_handle_state_change(): fix state change
can: m_can: m_can_stop(): set device to software init mode before closing
can: m_can: process interrupt only when not runtime suspended
can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb()
can: peak_usb: fix potential integer overflow on shift of a int
can: tcan4x5x: replace depends on REGMAP_SPI with depends on SPI
can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for devm_regmap_init()
can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration
can: ti_hecc: Fix memleak in ti_hecc_probe
devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()
Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected
drm/amd/display: Add missing pflip irq for dcn2.0
drm/i915: Handle max_bpc==16
drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind()
efivarfs: fix memory leak in efivarfs_create()
efi/x86: Free efi_pgd with free_pages()
Exempt multicast addresses from five-second neighbor lifetime
ext4: fix bogus warning in ext4_update_dx_flag()
fail_function: Remove a redundant mutex unlock
gfs2: fix possible reference leak in gfs2_check_blk_type
HID: logitech-dj: Fix an error in mse_bluetooth_descriptor
HID: logitech-dj: Fix Dinovo Mini when paired with a MX5x00 receiver
HID: logitech-dj: Handle quad/bluetooth keyboards with a builtin trackpad
HID: logitech-hidpp: Add PID for MX Anywhere 2
hwmon: (pwm-fan) Fix RPM calculation
iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode
iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum
iio: adc: mediatek: fix unset field
iio: light: fix kconfig dependency bug for VCNL4035
inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()
Input: adxl34x - clean up a data type in adxl34x_probe()
Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER
iommu/vt-d: Avoid panic if iommu init fails in tboot system
iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header
ip_tunnels: Set tunnel option flag when tunnel metadata is present
ipv6: Fix error path to cancel the meseage
lan743x: fix issue causing intermittent kernel log warnings
lan743x: prevent entire kernel HANG on open, for some platforms
libfs: fix error cast of negative value in simple_attr_write()
Linux 5.4.80
mac80211: free sta in sta_info_insert_finish() on errors
mac80211: minstrel: fix tx status processing corner case
mac80211: minstrel: remove deferred sampling code
MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
MIPS: export has_transparent_hugepage() for modules
mlxsw: core: Use variable timeout for EMAD retries
mmc: sdhci-pci: Prefer SDR25 timing for High Speed mode for BYT-based Intel controllers
mm: memcg/slab: fix root memcg vmstats
mm, page_alloc: skip ->waternark_boost for atomic order-0 allocations
mm/userfaultfd: do not access vma->vm_mm after calling handle_userfault()
net: b44: fix error return code in b44_init_one()
net: bridge: add missing counters to ndo_get_stats64 callback
net: dsa: mv88e6xxx: Avoid VTU corruption on 6097
net: ethernet: ti: cpsw: fix error return code in cpsw_probe()
net: ftgmac100: Fix crash when removing driver
net: Have netpoll bring-up DSA management interface
netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist()
netlabel: fix our progress tracking in netlbl_unlabel_staticlist()
net: lantiq: Wait for the GPHY firmware to be ready
net/mlx4_core: Fix init_hca fields offset
net/mlx5: Add handling of port type in rule deletion
net/mlx5: Disable QoS when min_rates on all VFs are zero
net/mlx5: E-Switch, Fail mlx5_esw_modify_vport_rate if qos disabled
net/ncsi: Fix netlink registration
net: qualcomm: rmnet: Fix incorrect receive packet handling during cleanup
net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid()
net/tls: fix corrupted data in recvmsg
net: usb: qmi_wwan: Set DTR quirk for MR400
net: x25: Increase refcnt of "struct x25_neigh" in x25_rx_call_request
page_frag: Recover from memory pressure
perf lock: Don't free "lock_seq_stat" if read_count isn't zero
pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
ptrace: Set PF_SUPERPRIV when checking capability
qed: fix error return code in qed_iwarp_ll2_start()
qlcnic: fix error return code in qlcnic_83xx_restart_hw()
RDMA/pvrdma: Fix missing kfree() in pvrdma_register_device()
regulator: avoid resolve_supply() infinite recursion
regulator: fix memory leak with repeated set_machine_constraints()
regulator: pfuze100: limit pfuze-support-disable-sw to pfuze{100,200}
regulator: ti-abb: Fix array out of bound read access on the first transition
regulator: workaround self-referent regulators
Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high"
rfkill: Fix use-after-free in rfkill_resume()
RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs
s390/cpum_sf.c: fix file permission for cpum_sfb_size
s390/dasd: fix null pointer dereference for ERP requests
sched/fair: Fix overutilized update in enqueue_task_fair()
scsi: ufs: Fix unbalanced scsi_block_reqs_cnt caused by ufshcd_hold()
sctp: change to hold/put transport for proto_unreach_timer
seccomp: Set PF_SUPERPRIV when checking capability
selftests/bpf: Fix error return code in run_getsockopt_test()
selftests: kvm: Fix the segment descriptor layout to match the actual layout
speakup: Do not let the line discipline be used several times
spi: bcm2835aux: Fix use-after-free on unbind
spi: Introduce device-managed SPI controller allocation
spi: lpspi: Fix use-after-free on unbind
spi: npcm-fiu: Don't leak SPI master in probe error path
staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids
swiotlb: using SIZE_MAX needs limits.h included
tcp: only postpone PROBE_RTT if RTT is < current min_rtt estimate
tools, bpftool: Add missing close before bpftool net attach exit
tty: serial: imx: fix potential deadlock
tty: serial: imx: keep console clocks always on
vfs: remove lockdep bogosity in __sb_start_write
x86/microcode/intel: Check patch signature before saving microcode for early loading
xfs: fix the minrecs logic when dealing with inode root child blocks
xfs: return corresponding errcode if xfs_initialize_perag() fail
xfs: revert "xfs: fix rmap key and record comparison functions"
xfs: strengthen rmap record flags checking
xtensa: disable preemption around cache alias management calls
xtensa: fix TLBTEMP area placement
```