kernel-6.6/kernel.spec

1632 lines
53 KiB
RPMSpec
Raw Normal View History

# _get_email() in %%build contains bashisms for regexping
%define _buildshell /bin/bash
2019-11-13 17:35:59 +03:00
# Prevent RPM scripts from stripping signatures,
# we strip binaries manually in %%build
%define __strip %(which true)
# brp-python-bytecompile uses /usr/bin/python,
# but it is a different python version in different ROSA
# releases; there is no good way to tell brp-python-bytecompile
# which iterpreter to use; so just disable it to avoid problems
%define _python_bytecompile_build 0
2020-06-19 23:42:50 +03:00
# Probably dwz bug, on i686 only file is not packaged:
# /usr/lib/debug/usr/bin/trace-5.4.40-3.i386.debug.#dwz#.b5xuKG
# dwz compresses only debuginfo from perf, cpupower, uml,
# not the kernel itself (because it is stripped not by RPM),
# so we do not loose much by disabling it.
%global _find_debuginfo_dwz_opts %{nil}
%define kernelversion 5
%define patchlevel 10
[bot] upd: 5.10.18 -> 5.10.25 Changelog: ACPICA: Fix exception code class checks ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling ACPI: configfs: add missing check after configfs_register_default_group() ACPI: property: Fix fwnode string properties matching ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807 ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits ALSA: fireface: fix to parse sync status register of latter protocol ALSA: hda: Add another CometLake-H PCI ID ALSA: hda: Avoid spurious unsol event handling during S3/S4 ALSA: hda/ca0132: Add Sound BlasterX AE-5 Plus support ALSA: hda/conexant: Add quirk for mute LED control on HP ZBook G5 ALSA: hda: Drop the BATCH workaround for AMD controllers ALSA: hda: Flush pending unsolicited events before suspend ALSA: hda/hdmi: Cancel pending works before suspend ALSA: hda/hdmi: Drop bogus check at closing a stream ALSA: hda: intel-nhlt: verify config type ALSA: hda/realtek: Add quirk for Clevo NH55RZQ ALSA: hda/realtek: Add quirk for Intel NUC 10 ALSA: hda/realtek: Apply dual codec quirks for MSI Godlike X570 board ALSA: hda/realtek: Enable headset mic of Acer SWIFT with ALC256 ALSA: hda/realtek: modify EAPD in the ALC886 ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setup ALSA: pcm: Assure sync with the pending stop operation at suspend ALSA: pcm: Call sync_stop at disconnection ALSA: pcm: Don't call sync_stop if it hasn't been stopped ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk ALSA: usb-audio: Add DJM750 to Pioneer mixer quirk ALSA: usb-audio: add mixer quirks for Pioneer DJM-900NXS2 ALSA: usb-audio: Apply the control quirk to Plantronics headsets ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend() ALSA: usb-audio: Don't avoid stopping the stream at disconnection ALSA: usb-audio: Drop bogus dB range in too low level ALSA: usb-audio: Fix "cannot get freq eq" errors on Dell AE515 sound bar ALSA: usb-audio: fix NULL ptr dereference in usb_audio_probe ALSA: usb-audio: Fix PCM buffer allocation in non-vmalloc mode ALSA: usb-audio: fix use after free in usb_audio_disconnect ALSA: usb-audio: use Corsair Virtuoso mapping for Corsair Virtuoso SE amba: Fix resource leak for drivers without .remove arm64: Add missing ISB after invalidating TLB in __primary_switch arm64: dts: agilex: fix phy interface bit shift for gmac1 and gmac2 arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz arm64: dts: allwinner: A64: properly connect USB PHY to port 0 arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency arm64: dts: allwinner: H6: properly connect USB PHY to port 0 arm64: dts: armada-3720-turris-mox: rename u-boot mtd partition to a53-firmware arm64: dts: exynos: correct PMIC interrupt trigger level on Espresso arm64: dts: exynos: correct PMIC interrupt trigger level on TM2 arm64: dts: meson: fix broken wifi node for Khadas VIM3L arm64: dts: msm8916: Fix reserved and rfsa nodes unit address arm64: dts: qcom: msm8916-samsung-a2015: Fix sensors arm64: dts: qcom: msm8916-samsung-a5u: Fix iris compatible arm64: dts: qcom: qrb5165-rb5: fix pm8009 regulators arm64: dts: qcom: sdm845-db845c: Fix reset-pin of ov8856 node arm64: dts: renesas: beacon: Fix audio-1.8V pin enable arm64: dts: renesas: beacon: Fix EEPROM compatible value arm64: dts: renesas: beacon kit: Fix choppy Bluetooth Audio arm64: dts: rockchip: rk3328: Add clock_in_out property to gmac2phy node arm64: Extend workaround for erratum 1024718 to all versions of Cortex-A55 arm64: kasan: fix page_alloc tagging with DEBUG_VIRTUAL arm64: kexec_file: fix memory leakage in create_dtb() when fdt_open_into() fails arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+ arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory arm64: mm: Move reserve_crashkernel() into mem_init() arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges arm64: mm: Set ZONE_DMA size based on early IORT scan arm64: mm: use a 48-bit ID map when possible on 52-bit VA builds arm64 module: set plt* section addresses to 0x0 arm64: mte: Map hotplugged memory as Normal Tagged arm64: perf: Fix 64-bit event counter read truncation arm64: ptrace: Fix seccomp of traced syscall -1 (NO_SYSCALL) arm64: spectre: Prevent lockdep splat on v4 mitigation enable path arm64: tegra: Add power-domain for Tegra210 HDA arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores ARM: 9065/1: OABI compat: fix build when EPOLL is not enabled ARM: assembler: introduce adr_l, ldr_l and str_l macros ARM: at91: use proper asm syntax in pm_suspend ARM: dts: armada388-helios4: assign pinctrl to each fan ARM: dts: armada388-helios4: assign pinctrl to LEDs ARM: dts: aspeed: Add LCLK to lpc-snoop ARM: dts: Configure missing thermal interrupt for 4430 ARM: dts: exynos: correct PMIC interrupt trigger level on Arndale Octa ARM: dts: exynos: correct PMIC interrupt trigger level on Artik 5 ARM: dts: exynos: correct PMIC interrupt trigger level on Monk ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid XU3 family ARM: dts: exynos: correct PMIC interrupt trigger level on Rinato ARM: dts: exynos: correct PMIC interrupt trigger level on Spring ARM: efistub: replace adrl pseudo-op with adr_l macro invocation ARM: s3c: fix fiq for clang IAS ASoC: codecs: add missing max_register in regmap config ASoC: cpcap: fix microphone timeslot mask ASoC: cs42l56: fix up error handling in probe ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr() ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_SPEAKERS quirk-flag ASoC: Intel: bytcr_rt5640: Add quirk for ARCHOS Cesium 140 ASoC: Intel: bytcr_rt5640: Add quirk for the Acer One S1002 tablet ASoC: Intel: bytcr_rt5640: Add quirk for the Estar Beauty HD MID 7316R tablet ASoC: Intel: bytcr_rt5640: Add quirk for the Voyo Winpad A15 tablet ASoC: Intel: bytcr_rt5651: Add quirk for the Jumper EZpad 7 tablet ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A32 ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A3E ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A5E ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device ASoC: Intel: sof_sdw: detect DMIC number based on mach params ASoC: Intel: sof-sdw: indent and add quirks consistently ASoC: Intel: sof_sdw: reorganize quirks by generation ASoC: qcom: Fix typo error in HDMI regmap config callbacks ASoC: qcom: lpass-cpu: Remove bit clock state check ASoC: qcom: lpass: Fix i2s ctl register bit map ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai ASoC: qcom: Remove useless debug print ASoC: rt5682: Fix panic in rt5682_jack_detect_handler happening during system shutdown ASoC: simple-card-utils: Fix device module clock ASoC: siu: Fix build error by a wrong const prefix ASoC: SOF: debug: Fix a potential issue on string buffer termination ASoC: SOF: Intel: broadwell: fix mutual exclusion with catpt driver ASoC: SOF: Intel: hda: cancel D0i3 work during runtime suspend ASoC: SOF: sof-pci-dev: add missing Up-Extreme quirk ata: ahci_brcm: Add back regulators management ath10k: Fix error handling in case of CE pipe init failure ath10k: Fix lockdep assertion warning in ath10k_sta_statistics ath10k: Fix suspicious RCU usage warning in ath10k_wmi_tlv_parse_peer_stats_info() ath10k: fix wmi mgmt tx queue full due to race condition ath11k: fix a locking bug in ath11k_mac_op_start() ath11k: fix AP mode for QCA6390 ath11k: peer delete synchronization with firmware ath11k: start vdev if a bss peer is already created ath9k: fix data bus crash when setting nf_override via debugfs ath9k: fix transmitting to stations in dynamic SMPS mode auxdisplay: ht16k33: Fix refresh rate handling b43: N-PHY: Fix the update of coef for the PHY revision >= 3case bcache: Give btree_io_wq correct semantics again bcache: Move journal work to new flush wq bfq: Avoid false bfq queue merging binfmt_misc: fix possible deadlock in bm_register_write blk-settings: align max_sectors on "logical_block_size" boundary block: Discard page cache of zone reset target range block: reopen the device in blkdev_reread_part block: rsxx: fix error return code of rsxx_pci_probe() block: Try to handle busy underlying device on discard Bluetooth: Add new HCI_QUIRK_NO_SUSPEND_NOTIFIER quirk Bluetooth: btqca: Add valid le states quirk Bluetooth: btqcomsmd: Fix a resource leak in error handling paths in the probe function Bluetooth: btusb: Fix memory leak in btusb_mtk_wmt_recv Bluetooth: btusb: fix memory leak on suspend and resume Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working Bluetooth: drop HCI device reference before return Bluetooth: Fix initializing response id after clearing struct Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl Bluetooth: hci_qca: Fix memleak in qca_controller_memdump Bluetooth: hci_uart: Fix a race for write_work scheduling Bluetooth: Put HCI device if inquiry procedure interrupts bnxt_en: Fix devlink info's stored fw.psid version format. bnxt_en: reliably allocate IRQ table on reset to avoid crash bnxt_en: reverse order of TX disable and carrier off bpf: Add bpf_patch_call_args prototype to include/linux/bpf.h bpf: Add sanity check for upper ptr_limit bpf: Avoid warning when re-casting __bpf_call_base into __bpf_call_base_args bpf: Clear subreg_def for global function return values bpf, devmap: Use GFP_KERNEL for xdp bulk queue allocation bpf: Fix an unitialized value in bpf_iter bpf: Fix bpf_fib_lookup helper MTU check for SKB ctx bpf: Fix off-by-one for area size in creating mask to left bpf: Fix truncation handling for mod32 dst reg wrt zero bpf_lru_list: Read double-checked variable once without lock bpf: Prohibit alu ops for pointer types not defining ptr_limit bpf, selftests: Fix up some test_verifier cases for unprivileged bpf: Simplify alu_limit masking for pointer arithmetic brcmfmac: Add DMI nvram filename quirk for Predia Basic tablet brcmfmac: Add DMI nvram filename quirk for Voyo winpad A15 tablet bsg: free the request before return error code btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root btrfs: account for new extents being deleted in total_bytes_pinned btrfs: add asserts for deleting backref cache nodes btrfs: avoid double put of block group when emptying cluster btrfs: clarify error returns values in __load_free_space_cache btrfs: do not cleanup upper nodes in btrfs_backref_cleanup_node btrfs: do not warn if we can't find the reloc root when looking up backref btrfs: don't flush from btrfs_delayed_inode_reserve_metadata btrfs: export and rename qgroup_reserve_meta btrfs: fix double accounting of ordered extent for subpage case in btrfs_invalidapge btrfs: fix error handling in commit_fs_roots btrfs: fix extent buffer leak on failure to copy root btrfs: fix race between extent freeing/allocation when using bitmaps btrfs: fix race between swap file activation and snapshot creation btrfs: fix race between writes to swap files and scrub btrfs: fix raid6 qstripe kmap btrfs: fix reloc root leak with 0 ref reloc roots on recovery btrfs: fix stale data exposure after cloning a hole with NO_HOLES enabled btrfs: fix warning when creating a directory with smack enabled btrfs: free correct amount of space in btrfs_delayed_inode_reserve_metadata btrfs: handle space_info::total_bytes_pinned inside the delayed ref itself btrfs: splice remaining dirty_bg's onto the transaction dirty bg list btrfs: unlock extents in btrfs_zero_range in case of quota reservation errors btrfs: validate qgroup inherit for SNAP_CREATE_V2 ioctl bus: ti-sysc: Implement GPMC debug quirk to drop platform data can: flexcan: assert FRZ bit in flexcan_chip_freeze() can: flexcan: enable RX FIFO after FRZ/HALT valid can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode can: mcp251xfd: mcp251xfd_probe(): fix errata reference can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership can: tcan4x5x: tcan4x5x_init(): fix initialization - clear MRAM before entering Normal Mode capabilities: Don't allow writing ambiguous v3 file capabilities ceph: downgrade warning from mdsmap decode to debug ceph: fix flush_snap logic after putting caps certs: Fix blacklist flag type confusion cifs: do not send close in compound create+close requests cifs: fix credit accounting for extra channel cifs: return proper error code in statfs(2) cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath. cipso,calipso: resolve a number of problems with the DOI refcounts clk: aspeed: Fix APLL calculate formula from ast2600-A2 clk: divider: fix initialization with parent_hw clk: meson: clk-pll: fix initializing the old rate (fallback) for a PLL clk: meson: clk-pll: make "ret" a signed integer clk: meson: clk-pll: propagate the error from meson_clk_pll_set_rate() clk: qcom: gcc-msm8998: Fix Alpha PLL type for all GPLLs clk: qcom: gdsc: Implement NO_RET_PERIPH flag clk: qcom: gpucc-msm8998: Add resets, cxc, fix flags on gpu_gx_gdsc clk: renesas: r8a779a0: Fix parent of CBFUSA clock clk: renesas: r8a779a0: Remove non-existent S2 clock clk: sunxi-ng: h6: Fix CEC clock clk: sunxi-ng: h6: Fix clock divider range on some clocks clocksource/drivers/ixp4xx: Select TIMER_OF when needed clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined configfs: fix a use-after-free in __configfs_open_file coresight: etm4x: Handle accesses to TRCSTALLCTLR coresight: etm4x: Skip accessing TRCPDCR in save/restore cpufreq: ACPI: Set cpuinfo.max_freq directly if max boost is known cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove() cpufreq: brcmstb-avs-cpufreq: Free resources in error path cpufreq: intel_pstate: Change intel_pstate_get_hwp_max() argument cpufreq: intel_pstate: Get per-CPU max freq via MSR_HWP_CAPABILITIES if available cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks cpufreq: qcom-hw: fix dereferencing freed memory 'data' cpufreq: qcom-hw: Fix return value check in qcom_cpufreq_hw_cpu_init() crypto: aesni - prevent misaligned buffers on the stack crypto: aesni - Use TEST %reg,%reg instead of CMP $0,%reg crypto: arm64/aes-ce - really hide slower algos when faster ones are enabled crypto: arm64/sha - add missing module aliases crypto: bcm - Rename struct device_private to bcm_device_private crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key() crypto: michael_mic - fix broken misalignment handling crypto: mips/poly1305 - enable for all MIPS processors crypto - shash: reduce minimum alignment of shash_desc structure crypto: sun4i-ss - checking sg length is not sufficient crypto: sun4i-ss - fix kmap usage crypto: sun4i-ss - handle BigEndian for cipher crypto: sun4i-ss - initialize need_fallback crypto: sun4i-ss - IV register does not work on A10 and A13 crypto: sun4i-ss - linearize buffers content must be kept crypto: talitos - Fix ctr(aes) on SEC1 crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error) crypto: tcrypt - avoid signed overflow in byte count crypto: x86/aes-ni-xts - use direct calls to and 4-way stride csky: Fix a size determination in gpr_get() cxgb4: Add new T6 PCI device id 0x6092 cxgb4/chtls/cxgbit: Keeping the max ofld immediate data size same in cxgb4 and ulds debugfs: be more robust at handling improper input in debugfs_lookup() debugfs: do not attempt to create a new file before the filesystem is initalized device-dax: Fix default return code of range_parse() dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function dmaengine: fsldma: Fix a resource leak in the remove function dmaengine: hsu: disable spurious interrupt dmaengine: idxd: set DMA channel to be private dmaengine: owl-dma: Fix a resource leak in the remove function dm bufio: subtract the number of initial sectors in dm_bufio_get_device_size dm era: Fix bitset memory leaks dm era: only resize metadata in preresume dm era: Recover committed writeset after crash dm era: Reinitialize bitset cache before digesting a new writeset dm era: Update in-core bitset after committing the metadata dm era: Use correct value size in equality function of writeset tree dm era: Verify the data block size hasn't changed dm: fix deadlock when swapping to encrypted device dm table: fix DAX iterate_devices based device capability checks dm table: fix iterate_devices based device capability checks dm table: fix zoned iterate_devices based device capability checks dm verity: fix FEC for RS roots unaligned to block size dm writecache: fix performance degradation in ssd mode dm writecache: fix writing beyond end of underlying device when shrinking dm writecache: return the exact table values that were set docs: networking: drop special stable handling dpaa2-eth: fix memory leak in XDP_REDIRECT drivers/base: build kunit tests without structleak plugin drivers/base/memory: don't store phys_device in memory blocks Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind() drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue drm/amd/amdgpu: add error handling to amdgpu_virt_read_pf2vf_data drm/amd/display: Add a backlight module option drm/amd/display: Add FPU wrappers to dcn21_validate_bandwidth() drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1 drm/amd/display: Fix 10/12 bpc setup in DCE output bit depth reduction. drm/amd/display: Fix HDMI deep color output for DCE 6-11. drm/amd/display: Fix nested FPU context in dcn21_validate_bandwidth() drm/amd/display: Guard against NULL pointer deref when get_i2c_info fails drm/amd/display: Remove Assert from dcn10_get_dig_frontend drm/amdgpu: Add check to prevent IH overflow drm/amdgpu:disable VCN for Navi12 SKU drm/amdgpu/display: don't assert in set backlight function drm/amdgpu/display: handle aux backlight in backlight_get_brightness drm/amdgpu/display: remove hdcp_srm sysfs on device removal drm/amdgpu/display: simplify backlight setting drm/amdgpu/display: use GFP_ATOMIC in dcn21_validate_bandwidth_fp() drm/amdgpu: Fix macro name _AMDGPU_TRACE_H_ in preprocessor if condition drm/amdgpu: fix parameter error of RREG32_PCIE() in amdgpu_regs_pcie drm/amdgpu: Prevent shift wrapping in amdgpu_read_mask() drm/amdgpu: Set reference clock to 100Mhz on Renoir (v2) drm/amdgpu: toggle on DF Cstate after finishing xgmi injection drm/amdkfd: Fix recursive lock warnings drm/amd/pm: bug fix for pcie dpm drm/compat: Clear bounce structures drm/dp_mst: Don't cache EDIDs for physical ports drm/fb-helper: Add missed unlocks in setcmap_legacy() drm/fourcc: fix Amlogic format modifier masks drm/gma500: Fix error return code in psb_driver_load() drm/hisilicon: Fix use-after-free drm/i915/gt: Correct surface base address for renderclear drm/i915/gt: Flush before changing register state drm/i915/gt: One more flush for Baytrail clear residuals drm/i915: Reject 446-480MHz HDMI clock on GLK drm/i915: Wedge the GPU if command parser setup fails drm/lima: fix reference leak in lima_pm_busy drm/mediatek: Check if fb is null drm: meson_drv add shutdown function drm/modes: Switch to 64bit maths to avoid integer overflow drm/msm/a5xx: Remove overwriting A5XX_PC_DBG_ECO_CNTL register drm/msm/dp: trigger unplug event in msm_dp_display_disable drm/msm/dsi: Correct io_start for MSM8994 (20nm PHY) drm/msm: Fix MSM_INFO_GET_IOVA with carveout drm/msm: Fix race of GPU init vs timestamp power management. drm/msm: Fix races managing the OOB state for timestamp vs timestamps. drm/msm/mdp5: Fix wait-for-commit for cmd panels drm/nouveau: bail out of nouveau_channel_new if channel init fails drm/nouveau/kms: handle mDP connectors drm/panel: kd35t133: allow using non-continuous dsi clock drm/panel: mantix: Tweak init sequence drm: rcar-du: Fix crash when using LVDS1 clock for CRTC drm: rcar-du: Fix PM reference leak in rcar_cmm_enable() drm: rcar-du: Fix the return check of of_parse_phandle and of_find_device_by_node drm/rockchip: Require the YTR modifier for AFBC drm/sched: Cancel and flush all outstanding jobs before finish. drm/shmem-helper: Check for purged buffers in fault handler drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff drm/shmem-helpers: vunmap: Don't put pages for dma-buf drm/sun4i: tcon: fix inverted DCLK polarity drm/tegra: Fix reference leak when pm_runtime_get_sync() fails drm: Use USB controller's DMA mask when importing dmabufs drm/vc4: hdmi: Compute the CEC clock divider from the clock rate drm/vc4: hdmi: Fix register offset with longer CEC messages drm/vc4: hdmi: Fix up CEC registers drm/vc4: hdmi: Move hdmi reset to bind drm/vc4: hdmi: Restore cec physical address on reconnect drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check drm/vc4: hdmi: Update the CEC clock divider on HSM rate change drm/virtio: make sure context is created in gem open drm/virtio: use kvmalloc for large allocations drm/xlnx: fix kmemleak by sending vblank_event in atomic_disable dt-bindings: ethernet-controller: fix fixed-link specification dt-bindings: net: btusb: DT fix s/interrupt-name/interrupt-names/ dts64: mt7622: fix slow sd card access EDAC/amd64: Do not load on family 0x15, model 0x13 efi: stub: omit SetVirtualAddressMap() if marked unsupported in RT_PROP table enetc: Fix unused var build warning for CONFIG_OF erofs: fix shift-out-of-bounds of blkszbits erofs: initialized fields can only be observed after bit is set ethernet: alx: fix order of calls on resume ethtool: fix the check logic of at least one channel for RX/TX evm: Fix memleak in init_desc exfat: fix shift-out-of-bounds in exfat_fill_super() ext4: don't try to processed freed blocks until mballoc is initialized ext4: fix potential htree index checksum corruption ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it f2fs: compress: fix potential deadlock f2fs: enforce the immutable flag on open files f2fs: fix a wrong condition in __submit_bio f2fs: fix out-of-repair __setattr_copy() f2fs: fix to avoid inconsistent quota data f2fs: fix to set/clear I_LINKABLE under i_lock f2fs: flush data when enabling checkpoint back f2fs: handle unallocated section and zone on pinned/atgc fbdev: aty: SPARC64 requires FB_ATY_CT fdt: Properly handle "no-map" field in the memory region firmware: arm_scmi: Fix call site of scmi_notification_exit floppy: reintroduce O_NDELAY fix fs/affs: release old buffer head on error path fs/jfs: fix potential integer overflow on shift of a int fs: make unlazy_walk() error handling consistent ftrace: Have recordmcount use w8 to read relp->r_info in arm64_is_fake_mcount fuse: fix live lock in fuse_iget() gfs2: Don't skip dlm unlock if glock has an lvb gfs2: fix glock confusion in function signal_our_withdraw gfs2: Lock imbalance on error path in gfs2_recover_one gfs2: Recursive gfs2_quota_hold in gfs2_iomap_end gma500: clean up error handling in init Goodix Fingerprint device is not a modem gpio: fix gpio-device list corruption gpiolib: acpi: Add ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER quirk gpiolib: acpi: Allow to find GpioInt() resource by name and index gpio: pca953x: Set IRQ type when handle Intel Galileo Gen 2 gpio: pcf857x: Fix missing first interrupt HID: core: detect and skip invalid inputs to snto32() HID: i2c-hid: Add I2C_HID_QUIRK_NO_IRQ_AFTER_RESET for ITE8568 EC on Voyo Winpad A15 HID: logitech-dj: add support for keyboard events in eQUAD step 4 Gaming HID: logitech-dj: add support for the new lightspeed connection iteration HID: make arrays usage and value to be the same HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter HID: wacom: Ignore attempts to overwrite the touch_max value from HID hrtimer: Update softirq_expires_next correctly after __hrtimer_get_next_event() HSI: Fix PM usage counter unbalance in ssi_hw_init hugetlb: fix copy_huge_page_from_user contig page struct assumption hugetlb: fix update_and_free_page contig page struct assumption hwmon: (dell-smm) Add XPS 15 L502X to fan control blacklist hwrng: ingenic - Fix a resource leak in an error handling path hwrng: timeriomem - Fix cooldown period calculation i2c: brcmstb: Fix brcmstd_send_i2c_cmd condition i2c: exynos5: Preserve high speed master code i2c: iproc: handle master read request i2c: iproc: handle only slave interrupts which are enabled i2c: iproc: update slave isr mask (ISR_MASK_SLAVE) i2c: qcom-geni: Store DMA mapping data in geni_i2c_dev struct i2c: rcar: faster irq code to minimize HW race condition i2c: rcar: optimize cacheline to minimize HW race condition i40e: Add zero-initialization of AQ command structures i40e: Fix addition of RX filters after enabling FW LLDP agent i40e: Fix add TC filter for IPv6 i40e: Fix flow for IPv6 next header (extension header) i40e: Fix memory leak in i40e_probe i40e: Fix overwriting flow control settings during driver loading i40e: Fix VFs not created IB/cm: Avoid a loop when device has 255 ports IB/mlx5: Add missing error code IB/mlx5: Add mutex destroy call to cap_mask_mutex mutex IB/mlx5: Return appropriate error code instead of ENOMEM ibmvnic: add memory barrier to protect long term buffer ibmvnic: always store valid MAC address ibmvnic: Fix possibly uninitialized old_num_tx_queues variable warning. ibmvnic: Set to CLOSED state even on error ibmvnic: skip send_request_unmap for timeout reset IB/umad: Return EIO in case of when device disassociated IB/umad: Return EPOLLERR in case of when device disassociated ice: Account for port VLAN in VF max packet size calculation ice: Fix state bits on LLDP mode switch ice: report correct max number of TCs ice: update the number of available RSS queues ide/falconide: Fix module unload ima: Free IMA measurement buffer after kexec syscall ima: Free IMA measurement buffer on error include/linux/sched/mm.h: use rcu_dereference in in_vfork() Input: applespi - don't wait for responses to commands indefinitely. Input: elan_i2c - add new trackpoint report type 0x5F Input: elantech - fix protocol errors for some trackpoints in SMBus mode Input: elo - fix an error code in elo_connect() Input: i8042 - add ASUS Zenbook Flip to noselftest list Input: joydev - prevent potential read overflow in ioctl Input: raydium_ts_i2c - do not send zero length Input: sur40 - fix an error code in sur40_probe() Input: xpad - add support for PowerA Enhanced Wired Controller for Xbox Series X|S Input: zinitix - fix return type of zinitix_init_touch() iommu/amd: Fix performance counter initialization iommu/amd: Fix sleeping in atomic in increase_address_space() iommu/arm-smmu-qcom: Fix mask extraction for bootloader programmed SMRs iommu: Move iotlb_sync_map out from __iommu_map iommu: Properly pass gfp_t in _iommu_map() to avoid atomic sleeping iommu: Switch gather->end to the inclusive end iommu/vt-d: Clear PRQ overflow only when PRQ is empty iommu/vt-d: Fix status code for Allocate/Free PASID command io_uring: fix possible deadlock in io_uring_poll io_uring: ignore double poll add on the same waitqueue head ipv6: silence compilation warning for non-IPV6 builds irqchip/imx: IMX_INTMUX should not default to y, unconditionally irqchip/loongson-pch-msi: Use bitmap_zalloc() to allocate bitmap isofs: release buffer head before return iwlwifi: mvm: assign SAR table revision to the command later iwlwifi: mvm: don't check if CSA event is running before removing iwlwifi: mvm: fix the type we use in the PPAG table validity checks iwlwifi: mvm: send stored PPAG command instead of local iwlwifi: mvm: set enabled in the PPAG command properly iwlwifi: mvm: store PPAG enabled/disabled flag properly iwlwifi: pnvm: increment the pointer before checking the TLV iwlwifi: pnvm: set the PNVM again if it was already loaded ixgbe: fail to create xfrm offload of IPsec tunnel mode SA jffs2: fix use after free in jffs2_sum_write_data() JFS: more checks for invalid superblock kasan: fix memory corruption in kasan_bitops_tags test kbuild: clamp SUBLEVEL to 255 kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64 kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE kcsan: Rewrite kcsan_prandom_u32_max() without prandom_u32_state() kdb: Make memory allocations more robust KEYS: trusted: Fix incorrect handling of tpm_get_random() KEYS: trusted: Fix migratable=1 failing KEYS: trusted: Reserve TPM for seal and unseal operations kgdb: fix to kill breakpoints on initmem after boot kprobes: Fix to delay the kprobes jump optimization kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir kunit: tool: fix unit test cleanup handling KVM: arm64: Avoid corrupting vCPU context register in guest exit KVM: arm64: Ensure I-cache isolation between vcpus of a same VM KVM: arm64: Fix exclusive limit for IPA size KVM: arm64: Fix nVHE hyp panic host context restore KVM: arm64: Fix range alignment when walking page tables KVM: arm64: nvhe: Save the SPE context early KVM: arm64: Reject VM creation when the default IPA size is unsupported KVM: do not assume PTE is writable after follow_pfn KVM: kvmclock: Fix vCPUs > 64 can't be online/hotpluged KVM: nSVM: Don't strip host's C-bit from guest's CR3 when reading PDPTRs KVM: nSVM: fix running nested guests when npt=0 KVM: PPC: Make the VMX instruction emulation routines static KVM: SVM: Clear the CR4 register on reset KVM: SVM: Intercept INVPCID when it's disabled to inject #UD KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped() KVM: x86: Ensure deadline timer has truly expired before posting its IRQ KVM: x86/mmu: Expand collapsible SPTE zap for TDP MMU to ZONE_DEVICE and HugeTLB pages KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64 KVM: x86: Supplement __cr4_reserved_bits() with X86_FEATURE_PCID check KVM: x86: Zap the oldest MMU pages, not the newest libbpf: Clear map_info before each bpf_obj_get_info_by_fd libbpf: Ignore non function pointer member in struct_ops linux/compiler-clang.h: define HAVE_BUILTIN_BSWAP* locking/lockdep: Avoid unmatched unlock mac80211: fix potential overflow when multiplying to u32 integers macintosh/adb-iop: Use big-endian autopoll mask mailbox: sprd: correct definition of SPRD_OUTBOX_FIFO_FULL media: allegro: Fix use after free on error media: aspeed: fix error return code in aspeed_video_setup_video() media: atomisp: Fix a buffer overflow in debug code media: camss: missing error code in msm_video_register() media: cx23885: add more quirks for reset DMA on some AMD IOMMU media: cx25821: Fix a bug when reallocating some dma memory media: em28xx: Fix use-after-free in em28xx_alloc_urbs media: i2c: max9286: fix access to unallocated memory media: i2c: ov5670: Fix PIXEL_RATE minimum value media: imx7: csi: Fix pad link validation media: imx7: csi: Fix regression for parallel cameras on i.MX6UL media: imx: Fix csc/scaler unregister media: imx: Unregister csc/scaler only if registered media: ipu3-cio2: Build only for x86 media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt() media: ir_toy: add another IR Droid device media: lmedm04: Fix misuse of comma media: marvell-ccic: power up the device on mclk enable media: mceusb: Fix potential out-of-bounds shift media: mceusb: sanity check for prescaler value media: media/pci: Fix memleak in empress_init media: mtk-vcodec: fix argument used when DEBUG is defined media: mtk-vcodec: fix error return code in vdec_vp9_decode() media: pxa_camera: declare variable when DEBUG is defined media: qm1d1c0042: fix error return code in qm1d1c0042_init() media: rc: compile rc-cec.c into rc-core media: rkisp1: params: fix wrong bits settings media: smipcie: fix interrupt handling and IR timeout media: software_node: Fix refcounts in software_node_get_next_child() media: ti-vpe: cal: fix write to unallocated memory media: tm6000: Fix memleak in tm6000_start_stream media: usbtv: Fix deadlock on suspend media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values media: uvcvideo: Allow entities with no pads media: v4l2-ctrls.c: fix shift-out-of-bounds in std_validate media: v4l: ioctl: Fix memory leak in video_usercopy media: v4l: vsp1: Fix bru null pointer access media: v4l: vsp1: Fix uif null pointer access media: vidtv: psi: fix missing crc for PMT media: vsp1: Fix an error handling path in the probe function mei: fix transfer over dma with extended header mei: hbm: call mei_set_devstate() on hbm stop response mei: me: add adler lake point LP DID mei: me: add adler lake point S DID mei: me: emmitsburg workstation DID memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops memory: ti-aemif: Drop child node when jumping out loop mfd: altera-sysmgr: Fix physical address storing more mfd: bd9571mwv: Use devm_mfd_add_devices() mfd: gateworks-gsc: Fix interrupt type mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq() MIPS: Compare __SYNC_loongson3_war against 0 MIPS: c-r4k: Fix section mismatch for loongson2_sc_init MIPS: Ingenic: Disable HPTLB for D0 XBurst CPUs too MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0 MIPS: properly stop .eh_frame generation MIPS: Support binutils configured with --enable-mips-fix-loongson3-llsc=yes MIPS: VDSO: Use CLANG_FLAGS instead of filtering out '--target=' MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section misc: eeprom_93xx46: Add module alias to avoid breaking support for non device tree users misc: eeprom_93xx46: Add quirk to support Microchip 93LC46B eeprom misc: eeprom_93xx46: Fix module alias to enable module autoprobe misc: fastrpc: fix incorrect usage of dma_map_sgtable misc: fastrpc: restrict user apps from sending kernel RPC messages misc/pvpanic: Export module FDT device table misc: rtsx: init of rts522a add OCP power off when no card is present mlxsw: spectrum_ethtool: Add an external speed to PTYS register mmc: core: Fix partition switch time for eMMC mmc: cqhci: Fix random crash when remove mmc module/card mmc: mediatek: fix race condition between msdc_request_timeout and irq mmc: mmci: Add MMC_CAP_NEED_RSP_BUSY for the stm32 variants mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()' mm/compaction: fix misbehaviors of fast_find_migrateblock() mm, compaction: make fast_isolate_freepages() stay within zone mmc: owl-mmc: Fix a resource leak in an error handling path and in the remove function mmc: renesas_sdhi_internal_dmac: Fix DMA buffer alignment from 8 to 128-bytes mmc: sdhci-esdhc-imx: fix kernel panic when remove module mmc: sdhci-iproc: Add ACPI bindings for the RPi mmc: sdhci-of-dwcmshc: set SDHCI_QUIRK2_PRESET_VALUE_BROKEN mmc: sdhci-pci-o2micro: Bug fix for SDR104 HW tuning failure mmc: sdhci-sprd: Fix some resource leaks in the remove function mmc: sdhci: Update firmware interface API mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe mm: fix memory_failure() handling of dax-namespace metadata mm/hugetlb.c: fix unnecessary address expansion of pmd sharing mm/hugetlb: fix potential double free in hugetlb_register_node() error path mm/hugetlb: suppress wrong warning info when alloc gigantic page mm/madvise: replace ptrace attach requirement for process_madvise mm: memcontrol: fix get_active_memcg return value mm: memcontrol: fix NR_ANON_THPS accounting in charge moving mm: memcontrol: fix slub memory accounting mm: memcontrol: fix swap undercounting in cgroup2 mm/memory.c: fix potential pte_unmap_unlock pte error mm/page_alloc.c: refactor initialization of struct page for holes in memory layout mm: proc: Invalidate TLB after clearing soft-dirty page state mm: provide a saner PTE walking API for modules mm: Remove examples from enum zone_type comment mm/rmap: fix potential pte_unmap on an not mapped pte mm: simplify follow_pte{,pmd} mm,thp,shmem: make khugepaged obey tmpfs mount flags mm: unexport follow_pte_pmd mm/userfaultfd: fix memory corruption due to writeprotect mm/vmscan: restore zone_reclaim_mode ABI module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols mount: fix mounting of detached mounts onto targets that reside on shared mounts mptcp: do not wakeup listener for MPJ subflows mt76: dma: do not report truncated frames to mac80211 mt76: mt7615: reset token when mac_reset happens mtd: parser: imagetag: fix error codes in bcm963xx_parse_imagetag_partitions() mtd: parsers: afs: Fix freeing the part name memory in failure mtd: spi-nor: core: Add erase size check for erase command initialization mtd: spi-nor: core: Fix erase type discovery for overlaid region mtd: spi-nor: hisi-sfc: Put child node np on error path mtd: spi-nor: sfdp: Fix last erase region marking mtd: spi-nor: sfdp: Fix wrong erase type bitmask for overlaid region mwifiex: pcie: skip cancel_work_sync() on reset failure path nbd: handle device refs for DESTROY_ON_DISCONNECT properly net/af_iucv: remove WARN_ONCE on malformed RX packets net: ag71xx: remove unnecessary MTU reservation net: always use icmp{,v6}_ndo_send from ndo_start_xmit net: amd-xgbe: Fix NETDEV WATCHDOG transmit queue timeout warning net: amd-xgbe: Fix network fluctuations when using 1G BELFUSE SFP net: amd-xgbe: Reset link when the link never comes back net: amd-xgbe: Reset the PHY rx data path when mailbox command timeout net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0 net: axienet: Handle deferred probe on clock properly net: bridge: use switchdev for port flags set through sysfs too net: check if protocol extracted by virtio_net_hdr_set_proto is correct net: davicom: Fix regulator not turned off on driver removal net: davicom: Fix regulator not turned off on failed probe netdevsim: init u64 stats for 32bit hardware net: dsa: b53: Support setting learning on port net: dsa: felix: don't deinitialize unused ports net: dsa: felix: perform teardown in reverse order of setup net: dsa: implement a central TX reallocation procedure net: dsa: sja1105: fix SGMII PCS being forced to SPEED_UNKNOWN instead of SPEED_10 net: dsa: tag_ar9331: let DSA core deal with TX reallocation net: dsa: tag_brcm: let DSA core deal with TX reallocation net: dsa: tag_dsa: let DSA core deal with TX reallocation net: dsa: tag_edsa: let DSA core deal with TX reallocation net: dsa: tag_gswip: let DSA core deal with TX reallocation net: dsa: tag_ksz: don't allocate additional memory for padding/tagging net: dsa: tag_lan9303: let DSA core deal with TX reallocation net: dsa: tag_mtk: fix 802.1ad VLAN egress net: dsa: tag_mtk: let DSA core deal with TX reallocation net: dsa: tag_ocelot: let DSA core deal with TX reallocation net: dsa: tag_qca: let DSA core deal with TX reallocation net: dsa: tag_rtl4_a: fix egress tags net: dsa: tag_rtl4_a: Support also egress tags net: dsa: trailer: don't allocate additional memory for padding/tagging net: enetc: allow hardware timestamping on TX queues with tc-etf enabled net: enetc: don't disable VLAN filtering in IFF_PROMISC mode net: enetc: don't overwrite the RSS indirection table when initializing net: enetc: fix destroyed phylink dereference during unbind net: enetc: fix incorrect TPID when receiving 802.1ad tagged packets net: enetc: force the RGMII speed and duplex instead of operating in inband mode net: enetc: initialize RFS/RSS memories for unused ports too net: enetc: keep RX ring consumer index in sync with hardware net: enetc: remove bogus write to SIRXIDR from enetc_setup_rxbdr net: enetc: take the MDIO lock only once per NAPI poll cycle net: ethernet: mtk-star-emac: fix wrong unmap in RX handling netfilter: nf_nat: undo erroneous tcp edemux lookup netfilter: x_tables: gpf inside xt_find_revision() net: fix dev_ifsioc_locked() race condition net: Fix gro aggregation for udp encaps with zero csum net: fix up truesize of cloned skb in skb_prepare_for_shift() net: hns3: fix bug when calculating the TCAM table info net: hns3: fix error mask definition of flow director net: hns3: fix query vlan mask value error for flow director net: hsr: add support for EntryForgetTime net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending net: l2tp: reduce log level of messages in receive path, add counter instead net: lapbether: Remove netif_start_queue / netif_stop_queue net/mlx4_core: Add missed mlx4_free_cmd_mailbox() net/mlx4_en: update moderation when config reset net/mlx5: Disable devlink reload for lag devices net/mlx5: Disable devlink reload for multi port slave device net/mlx5: Disallow RoCE on lag device net/mlx5: Disallow RoCE on multi port slave device net/mlx5e: Change interrupt moderation channel params also when channels are closed net/mlx5e: Check tunnel offload is required before setting SWP net/mlx5e: CT: manage the lifetime of the ct entry object net/mlx5e: Don't change interrupt moderation params when DIM is enabled net/mlx5e: kTLS, Use refcounts to free kTLS RX priv context net/mlx5e: Replace synchronize_rcu with synchronize_net net/mlx5: Fix health error state handling net: mscc: ocelot: properly reject destination IP keys in VCAP IS1 net: mvneta: Remove per-cpu queue mapping for Armada 3700 net: phy: consider that suspend2ram may cut off PHY power net: phy: fix save wrong speed and duplex problem if autoneg is on net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused net: phy: mscc: adding LCPLL reset to VSC8514 net: psample: Fix netlink skb length with tunnel info net: qrtr: fix error return code of qrtr_sendmsg() net: qrtr: Fix memory leak in qrtr_tun_open net: sched: avoid duplicates in classes dump net/sched: cls_flower: Reject invalid ct_state flags rules net: sched: fix police ext initialization net_sched: fix RTNL deadlock again caused by request_module() net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround net: stmmac: dwmac-meson8b: fix enabling the timing-adjustment clock net: stmmac: fix CBS idleslope and sendslope calculation net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10 net: stmmac: Fix VLAN filter delete timeout issue in Intel mGBE SGMII net: stmmac: fix watchdog timeout during suspend/resume stress test net: stmmac: fix wrongly set buffer2 valid when sph unsupport net: stmmac: stop each tx channel independently NET: usb: qmi_wwan: Adding support for Cinterion MV31 net: usb: qmi_wwan: allow qmimux add/del with master up net: usb: qmi_wwan: support ZTE P685M modem nexthop: Do not flush blackhole nexthops when loopback goes down NFS: Don't gratuitously clear the inode cache when lookup failed NFS: Don't revalidate the directory permissions on a lookup failure nfsd: register pernet ops last, unregister first NFSv4.2: fix return value of _nfs4_get_security_label() NFSv4: Fixes for nfs4_bitmask_adjust() nios2: fixed broken sys_clone syscall ntfs: check for valid standard information attribute nvme-core: add cancel tagset helpers nvme-fc: fix racing controller reset and create association nvmem: core: Fix a resource leak on error in nvmem_add_cells_from_of() nvmem: core: skip child nodes not matching binding nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer nvme-multipath: set nr_zones for zoned namespaces nvme-pci: add quirks for Lexar 256GB SSD nvme-pci: mark Kingston SKC2000 as not supporting the deepest power state nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST. nvme-rdma: add clean action for failed reconnection nvme-rdma: Use ibdev_to_node instead of dereferencing ->dma_device nvme-tcp: add clean action for failed reconnection nvmet: remove extra variable in identify ns nvmet: set status to 0 in case for invalid nsid nvmet-tcp: fix potential race of tcp socket closing accept_work nvmet-tcp: fix receive data digest calculation for multiple h2cdata PDUs objtool: Fix ".cold" section suffix check for newer versions of GCC objtool: Fix error handling for STD/CLD warnings objtool: Fix retpoline detection in asm code ocfs2: fix a use after free on error octeontx2-af: Fix an off by one in rvu_dbg_qsize_write() of/address: Introduce of_dma_get_max_cpu_address() of/fdt: Make sure no-map does not remove already reserved regions of: unittest: Add test for of_dma_get_max_cpu_address() of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS opp: Correct debug message in _opp_add_static_v2() optee: simplify i2c access parisc: Bump 64-bit IRQ stack size to 64 KB parisc: Enable -mlong-calls gcc option with CONFIG_COMPILE_TEST PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller PCI: Align checking of syscall user config accessors PCI: cadence: Fix DMA range mapping early return error PCI: cadence: Retrain Link to work around Gen2 training defect PCI: Decline to resize resources if boot config must be preserved PCI: Fix pci_register_io_range() memory leak PCI/LINK: Remove bandwidth notification PCI: mediatek: Add missing of_node_put() to fix reference leak PCI: pci-bridge-emul: Fix array overruns, improve safety PCI: qcom: Use PHY_REFCLK_USE_PAD only for ipq8064 PCI: rcar: Always allocate MSI addresses in 32bit space PCI: rockchip: Make 'ep-gpios' DT property optional PCI: xgene-msi: Fix race in installing chained irq handler PCI: xilinx-cpm: Fix reference count leak on error path perf/arm-cmn: Fix PMU instance naming perf/arm-cmn: Move IRQs when migrating context perf build: Fix ccache usage in $(CC) when generating arch errno table perf/core: Flush PMU internal buffers for per-CPU events perf intel-pt: Fix IPC with CYC threshold perf intel-pt: Fix missing CYC processing in PSB perf intel-pt: Fix premature IPC perf record: Fix continue profiling after draining the buffer perf report: Fix -F for branch & mem modes perf symbols: Fix return value when loading PE DSO perf symbols: Use (long) for iterator for bfd symbols perf test: Fix unaligned access in sample parsing test perf tools: Fix DSO filtering when not finding a map for a sampled address perf traceevent: Ensure read cmdlines are null terminated. perf vendor events arm64: Fix Ampere eMag event typo perf/x86/intel: Set PERF_ATTACH_SCHED_CB for large PEBS and LBR perf/x86/kvm: Add Cascade Lake Xeon steppings to isolation_ucodes[] phy: cadence-torrent: Fix error code in cdns_torrent_phy_probe() phy: lantiq: rcu-usb2: wait after clock enable phy: rockchip-emmc: emmc_phy_init() always return 0 phy: USB_LGM_PHY should depend on X86 pktgen: fix misuse of BUG_ON() in pktgen_thread_worker() platform/chrome: cros_ec_proto: Add LID and BATTERY to default mask platform/chrome: cros_ec_proto: Use EC_HOST_EVENT_MASK not BIT Platform: OLPC: Fix probe error handling platform/x86: acer-wmi: Add ACER_CAP_KBD_DOCK quirk for the Aspire Switch 10E SW3-016 platform/x86: acer-wmi: Add ACER_CAP_SET_FUNCTION_MODE capability flag platform/x86: acer-wmi: Add new force_caps module parameter platform/x86: acer-wmi: Add support for SW_TABLET_MODE on Switch devices platform/x86: acer-wmi: Cleanup accelerometer device handling platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines PM: runtime: Update device status before letting suppliers suspend powerpc/32: Preserve cr1 in exception prolog stack check to fix build error powerpc/32s: Add missing call to kuep_lock on syscall entry powerpc/47x: Disable 256k page size powerpc/603: Fix protection of user pages mapped with PROT_NONE powerpc/64: Fix stack trace not displaying final frame powerpc/64s/exception: Clean up a missed SRR specifier powerpc/64s: Fix instruction encoding for lis in ppc_function_entry() powerpc/8xx: Fix software emulation interrupt powerpc: Fix inverted SET_FULL_REGS bitop powerpc: Fix missing declaration of [en/dis]able_kernel_vsx() powerpc: improve handling of unrecoverable system reset powerpc/kexec_file: fix FDT size estimation for kdump kernel powerpc/kuap: Restore AMR after replaying soft interrupts powerpc/pci: Add ppc_md.discover_phbs() powerpc/perf: Fix handling of privilege level checks in perf interrupt context powerpc/perf: Record counter overflow always if SAMPLE_IP is unset powerpc/prom: Fix "ibm,arch-vec-5-platform-support" scan powerpc/pseries/dlpar: handle ibm, configure-connector delay status powerpc/pseries: Don't enforce MSI affinity with kdump powerpc/sstep: Check instruction validity against ISA version before emulation powerpc/sstep: Fix incorrect return from analyze_instr() powerpc/time: Enable sched clock for irqtime powerpc/uaccess: Avoid might_fault() when user access is enabled power: reset: at91-sama5d2_shdwc: fix wkupdbc mask power: supply: axp20x_usb_power: Init work before enabling IRQs power: supply: cpcap: Add missing IRQF_ONESHOT to fix regression power: supply: cpcap-battery: Fix missing power_supply_put() power: supply: cpcap-charger: Fix missing power_supply_put() power: supply: cpcap-charger: Fix power_supply_put on null battery pointer power: supply: fix sbs-charger build, needs REGMAP_I2C power: supply: smb347-charger: Fix interrupt usage if interrupt is unavailable printk: avoid prb_first_valid_seq() where possible printk: fix deadlock when kernel panic proc: don't allow async path resolution of /proc/thread-self components proc: use kvzalloc for our kernel buffer pstore: Fix typo in compression option name pwm: iqs620a: Fix overflow and optimize calculations pwm: rockchip: Eliminate potential race condition when probing pwm: rockchip: Enable APB clock during register access while probing pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare() quota: Fix memory leak when handling corrupted quota file qxl: Fix uninitialised struct field head.surface_id r8169: fix jumbo packet handling on RTL8168e r8169: fix r8168fp_adjust_ocp_cmd function r8169: fix resuming from suspend on RTL8105e if machine runs on battery random: fix the RNDRESEEDCRNG ioctl rcu/nocb: Perform deferred wake up before last idle's need_resched() check rcu: Pull deferred rcuog wake up to rcu_eqs_enter() callers RDMA/cm: Fix IRQ restore in ib_send_cm_sidr_rep RDMA/hns: Disable RQ inline by default RDMA/hns: Fixed wrong judgments in the goto branch RDMA/hns: Fixes missing error code of CMDQ RDMA/hns: Fix type of sq_signal_bits RDMA: Lift ibdev_to_node from rds to common code RDMA/mlx5: Use the correct obj_id upon DEVX TIR creation RDMA/rtrs: Call kobject_put in the failure path RDMA/rtrs-clt: Refactor the failure cases in alloc_clt RDMA/rtrs-clt: Set mininum limit when create QP RDMA/rtrs-clt: Use bitmask to check sess->flags RDMA/rtrs: Do not signal for heatbeat RDMA/rtrs: Extend ibtrs_cq_qp_create RDMA/rtrs: Only allow addition of path to an already established session RDMA/rtrs-srv: Do not pass a valid pointer to PTR_ERR() RDMA/rtrs-srv: Do not signal REG_MR RDMA/rtrs-srv: fix memory leak by missing kobject free RDMA/rtrs-srv: Fix missing wr_cqe RDMA/rtrs-srv: Fix stack-out-of-bounds RDMA/rtrs-srv: Init wr_cnt as 1 RDMA/rtrs-srv: Release lock before call into close_sess RDMA/rtrs-srv-sysfs: fix missing put_device RDMA/rtrs-srv: Use sysfs_remove_file_self for disconnect RDMA/rxe: Correct skb on loopback path RDMA/rxe: Fix coding error in rxe_rcv_mcast_pkt RDMA/rxe: Fix coding error in rxe_recv.c RDMA/rxe: Fix missing kconfig dependency on CRYPTO RDMA/siw: Fix calculation of tx_valid_cpus size RDMA/siw: Fix handling of zero-sized Read and Receive Queues. RDMA/srp: Fix support for unpopulated and unbalanced NUMA nodes RDMA/ucma: Fix use-after-free bug in ucma_create_uevent RDMA/umem: Use ib_dma_max_seg_size instead of dma_get_max_seg_size regmap: sdw: use _no_pm functions in regmap_read/write regulator: axp20x: Fix reference cout leak regulator: bd718x7, bd71828, Fix dvs voltage levels regulator: core: Avoid debugfs: Directory ... already present! error regulator: qcom-rpmh: fix pm8009 ldo7 regulator: qcom-rpmh-regulator: add pm8009-1 chip revision regulator: s5m8767: Drop regulators OF node reference regulator: s5m8767: Fix reference count leak remoteproc/mediatek: acknowledge watchdog IRQ after handled remoteproc/mediatek: Fix kernel test robot warning Revert 95ebabde382c ("capabilities: Don't allow writing ambiguous v3 file capabilities") Revert "arm64: dts: amlogic: add missing ethernet reset ID" Revert "bcache: Kill btree_io_wq" Revert "drm/amd/display: Update NV1x SR latency values" Revert "MIPS: Octeon: Remove special handling of CONFIG_MIPS_ELF_APPENDED_DTB=y" Revert "mm, slub: consider rest of partial list if acquire_slab() fails" Revert "nfsd4: a client's own opens needn't prevent delegations" Revert "nfsd4: remove check_conflicting_opens warning" Revert "serial: max310x: rework RX interrupt handling" ring-buffer: Force before_stamp and write_stamp to be different on discard riscv: Disable KSAN_SANITIZE for vDSO riscv: Get rid of MAX_EARLY_MAPPING_SIZE rsi: Fix TX EAPOL packet handling against iwlwifi AP rsi: Move card interrupt handling to RX thread rsxx: Return -EFAULT if copy_to_user() fails rtc: s5m: select REGMAP_I2C rtc: zynqmp: depend on HAS_IOMEM s390/cio: return -EFAULT if copy_to_user() fails s390/cio: return -EFAULT if copy_to_user() fails again s390/crypto: return -EFAULT if copy_to_user() fails s390/dasd: fix hanging DASD driver unbind s390/dasd: fix hanging IO request during DASD driver unbind s390/qeth: don't replace a fully completed async TX buffer s390/qeth: fix memory leak after failed TX Buffer allocation s390/qeth: fix notification for pending buffers during teardown s390/qeth: improve completion of pending TX buffers s390/qeth: remove QETH_QDIO_BUF_HANDLED_DELAYED state s390/smp: __smp_rescan_cpus() - move cpumask away from stack s390/vtime: fix inline assembly clobber list s390/zcrypt: return EIO when msg retry limit reached samples, bpf: Add missing munmap in xdpsock sched/core: Allow try_invoke_on_locked_down_task() with irqs disabled sched/eas: Don't update misfit status if the task is pinned sched/fair: Avoid stale CPU util_est value for schedutil in task dequeue sched/features: Fix hrtick reprogramming sched/membarrier: fix missing local execution of ipi_sync_rq_state() scripts/recordmcount.pl: support big endian for ARCH sh scsi: bnx2fc: Fix Kconfig warning & CNIC build errors scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE scsi: iscsi: Restrict sessions and handles to admin capabilities scsi: iscsi: Verify lengths on passthrough PDUs scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling scsi: libsas: docs: Remove notify_ha_event() scsi: lpfc: Fix ancient double free scsi: qla2xxx: Fix mailbox Ch erroneous error scsi: sd: Fix Opal support scsi: sd: sd_zbc: Don't pass GFP_NOIO to kvcalloc scsi: target: core: Add cmd length set before cmd complete scsi: target: core: Prevent underflow for service actions scsi: ufs: Add a quirk to permit overriding UniPro defaults scsi: ufs: Fix a duplicate dev quirk number scsi: ufs: Introduce a quirk to allow only page-aligned sg entries scsi: ufs-mediatek: Enable UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL scsi: ufs: ufs-exynos: Apply vendor-specific values for three timeouts scsi: ufs: ufs-exynos: Use UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE scsi: ufs: WB is only available on LUN #0 to #7 seccomp: Add missing return in non-void function selftests/bpf: Convert test_xdp_redirect.sh to bash selftests/bpf: Mask bpf_csum_diff() return value to 16 bits in test_verifier selftests/bpf: No need to drop the packet when there is no geneve opt selftests/bpf: Use the last page in test_snprintf_btf on s390 selftests: forwarding: Fix race condition in mirror installation selftests/ftrace: Update synthetic event syntax errors selftests: mptcp: fix ACKRX debug message selftests/powerpc: Make the test check in eeh-basic.sh posix compliant selinux: fix inconsistency between inode_getxattr and inode_listsecurity seq_file: document how per-entry resources are managed. seqlock,lockdep: Fix seqcount_latch_init() sh_eth: fix TRSCER mask for R7S72100 sh_eth: fix TRSCER mask for R7S9210 sh_eth: fix TRSCER mask for SH771x smackfs: restrict bytes count in smackfs write functions smp: Process pending softirqs in flush_smp_call_function_from_idle() soc: aspeed: snoop: Add clock control logic soc: qcom: ocmem: don't return NULL in of_get_ocmem soc: qcom: socinfo: Fix an off by one in qcom_show_pmic_model() soc: samsung: exynos-asv: don't defer early on not-supported SoCs soc: samsung: exynos-asv: handle reading revision register error soc: ti: pm33xx: Fix some resource leak in the error handling paths of the probe function software node: Fix node registration soundwire: bus: fix confusion on device used by pm_runtime soundwire: bus: use sdw_update_no_pm when initializing a device soundwire: bus: use sdw_write_no_pm when setting the bus scale registers soundwire: cadence: fix ACK/NAK handling soundwire: export sdw_write/read_no_pm functions soundwire: intel: fix possible crash when no device is detected sparc32: fix a user-triggerable oops in clear_user() sparc32: Limit memblock allocation to low memory sparc64: only select COMPAT_BINFMT_ELF if BINFMT_ELF is set sparc64: Use arch_validate_flags() to validate ADI flag sparc: fix led.c driver when PROC_FS is not enabled spi: atmel: Put allocated master before return spi: cadence-quadspi: Abort read if dummy cycles required are too many spi: dw: Avoid stack content exposure spi: fsl: invert spisel_boot signal on MPC8309 spi: imx: Don't print error on -EPROBEDEFER spi: pxa2xx: Fix the controller numbering for Wildcat Point spi: Skip zero-length transfers in spi_transfer_one_message() spi: spi-synquacer: fix set_cs handling spi: stm32: make spurious and overrun interrupts visible spi: stm32: properly handle 0 byte transfer spmi: spmi-pmic-arb: Fix hw_irq overflow staging: bcm2835-audio: Replace unsafe strcpy() with strscpy() staging: comedi: addi_apci_1032: Fix endian problem for COS sample staging: comedi: addi_apci_1500: Fix endian problem for command sample staging: comedi: adv_pci1710: Fix endian problem for AI command data staging: comedi: das6402: Fix endian problem for AI command data staging: comedi: das800: Fix endian problem for AI command data staging: comedi: dmm32at: Fix endian problem for AI command data staging: comedi: me4000: Fix endian problem for AI command data staging: comedi: pcl711: Fix endian problem for AI command data staging: comedi: pcl818: Fix endian problem for AI command data staging: fwserial: Fix error handling in fwserial_create staging: gdm724x: Fix DMA from stack staging: ks7010: prevent buffer overflow in ks_wlan_set_scan() staging: media: atomisp: Fix size_t format specifier in hmm_alloc() debug statemenet staging: most: sound: add sanity check for function argument staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data() staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan() staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd staging: rtl8712: unterminated string leads to read overflow staging: rtl8723bs: wifi_regd.c: Fix incorrect number of regulatory rules staging: vchiq: Fix bulk transfers on 64-bit builds staging: vchiq: Fix bulk userdata handling staging: wfx: fix possible panic with re-queued frames stmmac: intel: Fixes clock registration error seen for multiple interfaces stop_machine: mark helpers __always_inline SUNRPC: Set memalloc_nofs_save() for sync tasks svcrdma: Hold private mutex while invoking rdma_accept() swap: fix swapfile read/write offset sysctl.c: fix underflow value setting risk in vm_table Take mmap lock in cacheflush syscall tcp: add sanity tests to TCP_QUEUE_SEQ tcp: Fix sign comparison bug in getsockopt(TCP_ZEROCOPY_RECEIVE) tcp: fix SO_RCVLOWAT related hangs under mem pressure tcp: fix tcp_rmem documentation thermal: cpufreq_cooling: freq_qos_update_request() returns < 0 on error tomoyo: ignore data race while checking quota tomoyo: recognize kernel threads correctly tools/resolve_btfids: Fix build error with older host toolchains tpm_tis: Clean up locality release tpm_tis: Fix check_locality for correct locality acquisition tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality() tpm, tpm_tis: Decorate tpm_tis_gen_interrupt() with request_locality() tracepoint: Do not fail unregistering a probe due to memory failure tty: clean up legacy leftovers from n_tty line discipline tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer tty: fix up hung_up_tty_read() conversion tty: fix up iterate_tty_read() EOVERFLOW handling tty: implement read_iter tty: teach n_tty line discipline about the new "cookie continuations" tty: teach the n_tty ICANON case about the new "cookie continuations" too uapi: nfnetlink_cthelper.h: fix userspace compilation error ubifs: Fix error return code in alloc_wbufs() ubifs: Fix memleak in ubifs_init_authentication ubifs: replay: Fix high stack usage, again udf: fix silent AED tagLocation corruption udlfb: Fix memory leak in dlfb_usb_probe um: defer killing userspace on page table update failures um: mm: check more comprehensively for stub changes usb: cdns3: add quirk for enable runtime pm by default usb: cdns3: fix NULL pointer dereference on no platform data usb: cdns3: host: add .suspend_quirk for xhci-plat.c usb: cdns3: host: add xhci_plat_priv quirk XHCI_SKIP_PHY_INIT usb: dwc2: Abort transaction after errors with unknown reason usb: dwc2: Do not update data length if it is 0 on inbound transfers usb: dwc2: Make "trimming xfer length" a debug message usb: dwc3: gadget: Fix dep->interval for fullspeed interrupt usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1 usb: dwc3: qcom: add ACPI device id for sc8180x usb: dwc3: qcom: Add missing DWC3 OF node refcount decrement usb: dwc3: qcom: add URS Host support for sdm845 ACPI boot usb: dwc3: qcom: Honor wakeup enabled/disabled state usb: gadget: f_uac1: stop playback on function disable usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot usb: gadget: u_audio: Free requests only after callback USB: gadget: udc: s3c2410_udc: fix return value check in s3c2410_udc_probe() USB: gadget: u_ether: Fix a configfs return code usbip: fix stub_dev to check for stream socket usbip: fix stub_dev usbip_sockfd_store() races leading to gpf usbip: fix vhci_hcd attach_store() races leading to gpf usbip: fix vhci_hcd to check for stream socket usbip: fix vudc to check for stream socket usbip: fix vudc usbip_sockfd_store races leading to gpf usb: musb: Fix runtime PM race in musb_queue_resume_work usb: quirks: add quirk to start video capture on ELMO L-12F document camera reliable USB: quirks: sort quirk entries usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM USB: serial: ch341: add new Product ID USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter USB: serial: cp210x: add some more GE USB IDs USB: serial: ftdi_sio: fix FTX sub-integer prescaler USB: serial: io_edgeport: fix memory leak in edge_startup USB: serial: mos7720: fix error code in mos7720_write() USB: serial: mos7840: fix error code in mos7840_write() USB: serial: option: update interface mapping for ZTE P685M USB: serial: pl2303: fix line-speed handling on newer chips USB: usblp: fix a hang in poll() if disconnected usb: xhci: do not perform Soft Retry for some xHCI hosts usb: xhci: Fix ASMedia ASM1042A and ASM3242 DMA addressing vdpa/mlx5: fix param validation in mlx5_vdpa_get_config() vfio/iommu_type1: Fix some sanity checks in detach group vfio/iommu_type1: Populate full dirty when detach non-pinned group vfio-pci/zdev: fix possible segmentation fault issue vfio/type1: Use follow_pte() virtio/s390: implement virtio-ccw revision 2 correctly virt: vbox: Do not use wait_event_interruptible when called from kernel context VMCI: Use set_page_dirty_lock() when unregistering guest memory vmlinux.lds.h: add DWARF v5 sections vmlinux.lds.h: Define SANTIZER_DISCARDS with CONFIG_GCOV_KERNEL=y vt/consolemap: do font sum unsigned vxlan: move debug check after netdev unregister w1: w1_therm: Fix conversion result for negative temperatures watchdog: intel-mid_wdt: Postpone IRQ handler registration till SCU is ready watchdog: mei_wdt: request stop on unregister watchdog: qcom: Remove incorrect usage of QCOM_WDT_ENABLE_IRQ watch_queue: Drop references to /dev/watch_queue wireguard: device: do not generate ICMP for non-IP packets wireguard: kconfig: use arm chacha even with no neon wireguard: queueing: get rid of per-peer ring buffers wireguard: selftests: test multiple parallel streams wlcore: Fix command execute failure 19 for wl12xx x86/build: Treat R_386_PLT32 relocation as R_386_PC32 x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls x86/entry: Fix instrumentation annotation x86/entry: Move nmi entry/exit into common code x86/fault: Fix AMD erratum #91 errata fixup for user code x86: fix seq_file iteration for pat/memtype.c x86/MSR: Filter MSR writes through X86_IOC_WRMSR_REGS ioctl too x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk x86/reboot: Force all cpus to exit VMX root if VMX is supported x86/sev-es: Check regs->sp is trusted before adjusting #VC IST stack x86/sev-es: Correctly track IRQ states in runtime #VC handler x86/sev-es: Introduce ip_within_syscall_gap() helper x86/sev-es: Use __copy_from_user_inatomic() x86/unwind/orc: Disable KASAN checking in the ORC unwinder, part 2 x86/virt: Eat faults on VMXOFF in reboot flows xen/events: avoid handling the same event on two cpus at the same time xen/events: don't unmask an event channel when an eoi is pending xen/events: reset affinity of 2-level event when tearing it down xen: fix p2m size in dom0 for disabled memory hotplug case Xen/gnttab: handle p2m update errors on a per-slot basis xen/netback: fix spurious event detection for common event case xen-netback: respect gnttab_map_refs()'s return value xfs: Fix assert failure in xfs_setattr_size() xhci: Fix repeated xhci wake after suspend due to uncleared internal wake state xhci: Improve detection of device initiated wake signal. zonefs: Fix file size of zones in full condition zram: fix return value on writeback_store zsmalloc: account the number of compacted pages correctly Updated by kernel-updater-bot (https://abf.io/mikhailnov/kernel-updater-bot)
2021-03-24 22:09:22 +03:00
%define sublevel 25
2013-11-16 00:27:01 +04:00
# Release number. Increase this before a rebuild.
2021-02-23 19:44:33 +03:00
%define rpmrel 1
%define fullrpmrel %{rpmrel}
2013-11-16 00:27:01 +04:00
%define rpmtag %{disttag}
# fakerel and fakever never change, they are used to fool
# rpm/urpmi/smart and ensure the kernels are installed,
# not upgraded so old kernel is not overwritten or removed
2013-11-16 00:27:01 +04:00
%define fakever 1
%define fakerel %mkrel 1
# version defines
%define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
%define kverrel %{kversion}-%{fullrpmrel}
2013-11-16 00:27:01 +04:00
%define tar_ver %{kernelversion}.%{patchlevel}
%ifarch %{ix86}
%define arch_suffix i586
2020-11-26 21:09:27 +00:00
%endif
%ifarch %{x86_64}
2020-11-27 01:21:49 +03:00
%define arch_suffix x86_64
%endif
2020-11-26 21:09:27 +00:00
%ifarch aarch64
%define arch_suffix arm64
%endif
%define buildrpmrel %{fullrpmrel}%{rpmtag}-%{arch_suffix}
2013-11-16 00:27:01 +04:00
%define buildrel %{kversion}-%{buildrpmrel}
# Add not only the build time generated key to the trusted keyring,
# but also add public keys of private ROSA's keys
%bcond_without additional_keys
2020-03-13 20:35:12 +03:00
# User Mode Linux, https://habr.com/ru/company/itsumma/blog/459558/
# Not buildable on aarch64
%ifarch %{x86_64}
2020-03-13 20:35:12 +03:00
%bcond_without uml
2020-11-26 21:09:27 +00:00
%else
%bcond_with uml
%endif
# "Nickel" is a special brand for certified distros
%if %{mdvver} == 201900 || %{mdvver} == 201905
%bcond_without nickel
# Require kernel modules to be signed
%bcond_without oblig_signed_modules
%else
%bcond_with nickel
%bcond_with oblig_signed_modules
%endif
2020-07-29 10:59:41 +03:00
%if %{mdvver} >= 201905
# Build binary out-of-tree kernel modules (experimental)
2020-07-29 10:59:41 +03:00
%bcond_without binary_extra_modules
# Sign kernel modules with GOST key (experimental)
%bcond_without gost_sign
2020-07-29 10:59:41 +03:00
%else
%bcond_with binary_extra_modules
%bcond_with gost_sign
2020-07-29 10:59:41 +03:00
%endif
%bcond_with ccache
%bcond_without flow_abi
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
# 1. VirtualBox is for x86_32 and x86_64 only
# 2. I do not know how to solve the problem that userspace part of VirtualBox
# will be updated ahead of these binary modules. So just off building them.
%bcond_with binary_virtualbox_host
# shredder-kernel works only on x86_64, makes manipulations with syscalls tables,
# loading/unloading of the module failed sometimes on kernel 5.4
# and it has not been adapted for kernel 5.10 (is not buildable)
%bcond_with binary_shredder
# Kernel flavour
%if %{with nickel}
%define flavour nickel
%else
%define flavour generic
%endif
2013-11-16 00:27:01 +04:00
# The full kernel version
%define kver_full %{kversion}-%{flavour}-%{buildrpmrel}
############################################################################
%define top_dir_name kernel-%{_arch}
2013-11-16 00:27:01 +04:00
%define build_dir ${RPM_BUILD_DIR}/%{top_dir_name}
%define src_dir %{build_dir}/linux-%{tar_ver}
# Common target directories
%define _bootdir /boot
%define _modulesdir /lib/modules
%define devel_root /usr/src/linux-%{kver_full}
# Directories needed for building
%define temp_root %{build_dir}/temp-root
%define temp_boot %{temp_root}%{_bootdir}
%define temp_modules %{temp_root}%{_modulesdir}
%define temp_devel_root %{temp_root}%{devel_root}
# Directories definition needed for installing
%define target_boot %{buildroot}%{_bootdir}
%define target_modules %{buildroot}%{_modulesdir}
2019-11-11 17:47:53 +03:00
# Manual control of creating and deleting keys
# "rnd" is "random" and means that a key pair is generated at build time
# and is not saved anywhere.
%define certs_dir_rnd certs
2019-12-07 21:57:55 +03:00
%define certs_signing_key_priv_rnd %{certs_dir_rnd}/signing_key_priv.key
%define certs_signing_der %{certs_dir_rnd}/signing_key.x509
2019-11-11 17:47:53 +03:00
%define certs_key_config_rnd %{certs_dir_rnd}/x509.genkey
%define certs_public_keys %{certs_dir_rnd}/public.pem
%define certs_verify_tmp %{certs_dir_rnd}/verify.tmp
############################################################################
2013-11-16 00:27:01 +04:00
# Build defines
%define build_doc 0
2020-11-26 22:03:53 +00:00
%define build_devel 1
%define build_debug 1
2013-11-16 00:27:01 +04:00
# Build kernel-headers package
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
# Headers from LTS kernel 5.4 are default in rosa2019.1/05 for now
# and headers from 4.15 are default in rosa2016.1
%define build_headers 0
2013-11-16 00:27:01 +04:00
# build perf and cpupower tools
%if %{mdvver} > 201610
2016-01-06 17:46:38 +03:00
%define build_perf 1
2013-11-16 00:27:01 +04:00
%define build_cpupower 1
%else
# This is not the main kernel in rosa2016.1
# This one will be in contrib, not main, in rosa2016.1
%define build_perf 0
%define build_cpupower 0
%endif
2013-11-16 00:27:01 +04:00
# compress modules with xz
%define build_modxz 1
# End of user definitions
# buildtime flags
%{?_without_doc: %global build_doc 0}
%{?_without_devel: %global build_devel 0}
%{?_without_debug: %global build_debug 0}
%{?_without_perf: %global build_perf 0}
%{?_without_cpupower: %global build_cpupower 0}
%{?_without_modxz: %global build_modxz 0}
%{?_with_doc: %global build_doc 1}
%{?_with_devel: %global build_devel 1}
%{?_with_debug: %global build_debug 1}
%{?_with_perf: %global build_perf 1}
%{?_with_cpupower: %global build_cpupower 1}
%{?_with_modxz: %global build_modxz 1}
2020-07-29 10:59:41 +03:00
%if %{build_modxz}
%define kmod_suffix .xz
%else
%define kmod_suffix .gz
%endif
%if !%{build_debug}
# Disable debug rpms.
%define _enable_debug_packages %{nil}
%define debug_package %{nil}
%endif
# http://nickdesaulniers.github.io/blog/2018/06/02/speeding-up-linux-kernel-builds-with-ccache/
%if %{with ccache}
%define kmake KBUILD_BUILD_TIMESTAMP='' %make CC='ccache gcc' ARCH="%{arch_type}"
2013-11-16 00:27:01 +04:00
%else
%define kmake %make CC='gcc' ARCH="%{arch_type}"
2013-11-16 00:27:01 +04:00
%endif
2013-11-16 00:27:01 +04:00
# there are places where parallel make don't work
%define smake make
2020-11-26 18:48:55 +00:00
%ifarch %{ix86} %{x86_64}
%define arch_type x86
%endif
%ifarch aarch64
%define arch_type arm64
%endif
2014-01-22 18:31:57 +04:00
2013-11-16 00:27:01 +04:00
# Parallelize xargs invocations on smp machines
%define kxargs xargs %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-P $RPM_BUILD_NCPUS")
#
# SRC RPM description
#
Summary: The Linux kernel
Name: kernel
2013-11-16 00:27:01 +04:00
Version: %{kversion}
Release: %{fullrpmrel}
2013-11-16 00:27:01 +04:00
License: GPLv2
Group: System/Kernel and hardware
URL: http://www.kernel.org
####################################################################
#
# Sources
#
2018-01-10 22:20:13 +03:00
Source0: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.xz
Revisited the set of kernel flavours and the generation of config files Until now, the build system for the kernel supported a number of flavours: nrj and non-nrj ones, desktop-, laptop-, server- and netbook-oriented, etc. It turned out over the years, however, that our users mostly need the following: * a kernel to use on the desktops (home and office use) with reasonable default settings for performance and responsiveness; * a kernel for laptops, with a bit more emphasis on power consumption. Other variants were rarely used. We also did not have enough time to properly support all these. Besides, the kernels for ARM and other architectures need a somewhat different build process than for x86. So, they are better off to be in separate ABF projects, even if they are needed. No signs of ROSA on ARM yet, btw. So, I kept only nrj-desktop and nrj-laptop flavours and only x86. Non-PAE systems also seem to be rare now, so I enabled PAE by default for the 32-bit kernels. Non-PAE kernels are no longer built. If they are needed, we may use a separate git branch or an ABF project for that. To simplify debugging, maintenance and experimentation with the kernel builds further, I revisited the process of preparing the kernel configuration files. The goal is to get rid of a separate git repo with the default configs (kernel-patches-and-configs) and keep everything in this project. The default config files are now kept here. For x86_64: * kernel-x86_64.config contains the options for both nrj-desktop and nrn-laptop flavours; * kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the flavour-specific options. This way, it is easier to track which config options changed when, easier to experiment with the custom configs and so on. The kernel will be built with debug info if rpmbuild is called with "--with debug".
2016-07-21 13:56:25 +03:00
2013-11-16 00:27:01 +04:00
# This is for disabling *config, mrproper, prepare, scripts on -devel rpms
# Needed, because otherwise the -devel won't build correctly.
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
Source2: 0001-disable-mrproper-prepare-scripts-configs-in-devel-rp.patch
2013-11-16 00:27:01 +04:00
2020-07-29 10:59:41 +03:00
# TODO: make a separate package "ksobirator" and BR it
# after testing these macros properly
Source3: macros.ksobirator
%{load:%{SOURCE3}}
Revisited the set of kernel flavours and the generation of config files Until now, the build system for the kernel supported a number of flavours: nrj and non-nrj ones, desktop-, laptop-, server- and netbook-oriented, etc. It turned out over the years, however, that our users mostly need the following: * a kernel to use on the desktops (home and office use) with reasonable default settings for performance and responsiveness; * a kernel for laptops, with a bit more emphasis on power consumption. Other variants were rarely used. We also did not have enough time to properly support all these. Besides, the kernels for ARM and other architectures need a somewhat different build process than for x86. So, they are better off to be in separate ABF projects, even if they are needed. No signs of ROSA on ARM yet, btw. So, I kept only nrj-desktop and nrj-laptop flavours and only x86. Non-PAE systems also seem to be rare now, so I enabled PAE by default for the 32-bit kernels. Non-PAE kernels are no longer built. If they are needed, we may use a separate git branch or an ABF project for that. To simplify debugging, maintenance and experimentation with the kernel builds further, I revisited the process of preparing the kernel configuration files. The goal is to get rid of a separate git repo with the default configs (kernel-patches-and-configs) and keep everything in this project. The default config files are now kept here. For x86_64: * kernel-x86_64.config contains the options for both nrj-desktop and nrn-laptop flavours; * kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the flavour-specific options. This way, it is easier to track which config options changed when, easier to experiment with the custom configs and so on. The kernel will be built with debug info if rpmbuild is called with "--with debug".
2016-07-21 13:56:25 +03:00
# Kernel configuration files.
Source111: kernel-x86_64.config
Source112: kernel-i586.config
Source113: kernel-arm64.config
2013-11-16 00:27:01 +04:00
# Cpupower: the service, the config, etc.
2013-11-16 00:27:01 +04:00
Source50: cpupower.service
Source51: cpupower.config
Source52: cpupower-start.sh
Source53: cpupower.path
2013-11-16 00:27:01 +04:00
Revisited the set of kernel flavours and the generation of config files Until now, the build system for the kernel supported a number of flavours: nrj and non-nrj ones, desktop-, laptop-, server- and netbook-oriented, etc. It turned out over the years, however, that our users mostly need the following: * a kernel to use on the desktops (home and office use) with reasonable default settings for performance and responsiveness; * a kernel for laptops, with a bit more emphasis on power consumption. Other variants were rarely used. We also did not have enough time to properly support all these. Besides, the kernels for ARM and other architectures need a somewhat different build process than for x86. So, they are better off to be in separate ABF projects, even if they are needed. No signs of ROSA on ARM yet, btw. So, I kept only nrj-desktop and nrj-laptop flavours and only x86. Non-PAE systems also seem to be rare now, so I enabled PAE by default for the 32-bit kernels. Non-PAE kernels are no longer built. If they are needed, we may use a separate git branch or an ABF project for that. To simplify debugging, maintenance and experimentation with the kernel builds further, I revisited the process of preparing the kernel configuration files. The goal is to get rid of a separate git repo with the default configs (kernel-patches-and-configs) and keep everything in this project. The default config files are now kept here. For x86_64: * kernel-x86_64.config contains the options for both nrj-desktop and nrn-laptop flavours; * kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the flavour-specific options. This way, it is easier to track which config options changed when, easier to experiment with the custom configs and so on. The kernel will be built with debug info if rpmbuild is called with "--with debug".
2016-07-21 13:56:25 +03:00
Source80: kernel.rpmlintrc
# Additional keys that can be used to sign kernel modules
# Generated by https://abf.io/soft/kernel-keys
# Source201..206: public_key_GOST_*.pem
%{expand:%(for i in `seq 1 6`; do echo "Source$((200+${i})): public_key_GOST_${i}.pem"; done)}
# Source207..212: public_key_RSA_*.pem
%{expand:%(for i in `seq 7 12`; do echo "Source$((200+${i})): public_key_RSA_${i}.pem"; done)}
####################################################################
Revisited the set of kernel flavours and the generation of config files Until now, the build system for the kernel supported a number of flavours: nrj and non-nrj ones, desktop-, laptop-, server- and netbook-oriented, etc. It turned out over the years, however, that our users mostly need the following: * a kernel to use on the desktops (home and office use) with reasonable default settings for performance and responsiveness; * a kernel for laptops, with a bit more emphasis on power consumption. Other variants were rarely used. We also did not have enough time to properly support all these. Besides, the kernels for ARM and other architectures need a somewhat different build process than for x86. So, they are better off to be in separate ABF projects, even if they are needed. No signs of ROSA on ARM yet, btw. So, I kept only nrj-desktop and nrj-laptop flavours and only x86. Non-PAE systems also seem to be rare now, so I enabled PAE by default for the 32-bit kernels. Non-PAE kernels are no longer built. If they are needed, we may use a separate git branch or an ABF project for that. To simplify debugging, maintenance and experimentation with the kernel builds further, I revisited the process of preparing the kernel configuration files. The goal is to get rid of a separate git repo with the default configs (kernel-patches-and-configs) and keep everything in this project. The default config files are now kept here. For x86_64: * kernel-x86_64.config contains the options for both nrj-desktop and nrn-laptop flavours; * kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the flavour-specific options. This way, it is easier to track which config options changed when, easier to experiment with the custom configs and so on. The kernel will be built with debug info if rpmbuild is called with "--with debug".
2016-07-21 13:56:25 +03:00
2013-11-16 00:27:01 +04:00
# Patches
# The patch to make kernel x.y.z from x.y.0.
2018-01-10 22:20:13 +03:00
Patch1: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.xz
# Patches from mainline
# none
2013-11-16 00:27:01 +04:00
# ROSA-specific patches
# Perf docs are built after all the kernels. To validate the xml files
# generated during that process, xmlto tries to get DTD files from the Net.
# If it fails, the whole build fails, which is unfortunate. Let us avoid
# this.
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
Patch101: 0001-perf-skip-xmlto-validation.patch
# http://bugs.rosalinux.ru/show_bug.cgi?id=6235
# http://bugs.rosalinux.ru/show_bug.cgi?id=6459
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
Patch102: 0001-audit-make-it-less-verbose.patch
2020-08-18 08:02:38 +03:00
# AUFS 5 from http://aufs.sourceforge.net/
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
Patch109: 0001-Apply-AUFS-5.patch
# Unofficial AUFS for kernel 5.10
# https://sourceforge.net/projects/lxpup/files/Other/huge-kernels/kernel-5.10-aufs-changes/
Patch110: aufs-k510.diff
2019-12-07 21:57:55 +03:00
2020-06-18 18:38:30 +03:00
# For kmod() generator of RPM Provides
# Changes version of aacraid.ko
2020-08-18 08:02:38 +03:00
Patch111: 0001-Remove-RPM-illegal-chars-from-module-version.patch
2020-06-18 18:38:30 +03:00
# AltHa LSM Module
# https://www.altlinux.org/AltHa
# http://git.altlinux.org/gears/k/kernel-image-un-def.git
# TODO: known problem: https://bugzilla.altlinux.org/show_bug.cgi?id=38225
Patch201: 0001-AltHa-LSM-module.patch
Patch202: 0002-Documentation-for-AltHa-LSM.patch
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
Patch203: 0003-security-altha-altha_lsm.c-build-fixed-with-kernel-5.patch
Patch204: 0004-altha-use-path-strings-instead-of-path-structs.patch
2020-03-20 11:27:35 +03:00
# sent to upstream, https://patchwork.kernel.org/patch/11446123/
Patch302: 0001-sign-file-full-functionality-with-modern-LibreSSL.patch
# Support loading GOST-signed modules
Patch305: 0001-crypto-support-loading-GOST-signed-kernel-modules.patch
# Allow to off modules signature check dynamically
Patch306: 0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch
# Experimental patch to reduce freezes in low memory conditions
# Config values are the following:
# CONFIG_UNEVICTABLE_ACTIVEFILE=y
# CONFIG_UNEVICTABLE_ACTIVEFILE_KBYTES_LOW=102400 (100 MB)
# CONFIG_UNEVICTABLE_ACTIVEFILE_KBYTES_MIN=51200 (50 MB)
# + zswap is enabled by default
# 50 MB is default value of min_filelist_kbytes in Chromium OS
# https://chromium.googlesource.com/chromiumos/third_party/kernel-next/+/545e2917dbd863760a51379de8c26631e667c563%5E!/
# 256 and 512 MB values are too big as a distro default because many systems have 512MB-2GB RAM
# TODO: tune 50 and 100 MB to some not random and mathemetically explainable values
# https://www.linux.org.ru/news/kernel/16052362?cid=16075323
Patch307: le9pf.diff
Patch308: 0001-Revert-kallsyms-unexport-kallsyms_lookup_name-and-ka.patch
2013-11-16 00:27:01 +04:00
2020-03-09 10:50:38 +03:00
# Disable AutoReq
AutoReq: 0
# but keep autoprov for kmod(xxx)
AutoProv: 1
2013-11-16 00:27:01 +04:00
2020-03-09 10:46:18 +03:00
BuildRequires: bash
BuildRequires: bc
BuildRequires: binutils
BuildRequires: gcc
# ./scripts/mkcompile_h
2020-12-03 15:12:38 +03:00
# in net-tools in rosa2016.1, already installed
%if %{mdvver} > 201610
BuildRequires: hostname
2020-12-03 15:12:38 +03:00
%endif
# For power tools
BuildRequires: pkgconfig(ncurses)
2013-11-16 00:27:01 +04:00
BuildRequires: kmod-devel kmod-compat
BuildRequires: bison
BuildRequires: flex
BuildRequires: bzip2
2019-09-24 11:56:44 +03:00
BuildRequires: rsync
2020-11-26 21:21:05 +00:00
%ifarch x86_64 aarch64
BuildRequires: numa-devel
%endif
# for perf, cpufreq and all other tools
# for cpupower
%if %{build_cpupower}
BuildRequires: pciutils-devel
%endif
# for perf
%if %{build_perf}
BuildRequires: asciidoc
BuildRequires: audit-devel
2013-11-16 00:27:01 +04:00
BuildRequires: binutils-devel
BuildRequires: elfutils-devel
BuildRequires: libunwind-devel
2013-11-16 00:27:01 +04:00
BuildRequires: newt-devel
BuildRequires: perl-devel
BuildRequires: python3
BuildRequires: pkgconfig(python3)
2013-11-16 00:27:01 +04:00
BuildRequires: xmlto
BuildRequires: zlib-devel
BuildRequires: pkgconfig(libcrypto)
%endif
%if %{with uml}
BuildRequires: vde-devel
%endif
2019-12-01 02:03:15 +03:00
# (To generate keys)
2019-12-07 21:57:55 +03:00
# LibreSSL has GOST support without editing openssl.cnf
# or dlopen()-ing external library
BuildRequires: libressl libressl-devel
# To verify signatures (find, xargs, hexdump)
BuildRequires: findutils util-linux
2019-11-11 17:47:53 +03:00
2020-07-29 10:59:41 +03:00
%if %{with binary_extra_modules}
BuildRequires: kernel-source-rtl8821ce
BuildRequires: kernel-source-tripso
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_virtualbox_host}
2020-07-29 10:59:41 +03:00
BuildRequires: kernel-source-virtualbox
2020-11-26 18:58:01 +00:00
%endif
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_shredder}
BuildRequires: kernel-source-shredder-kernel
%endif
# rosa-test-suite is maintained in certified branches only
# nlkm, memfreetest, pcietest
%if %{with nickel}
BuildRequires: kernel-source-rosa-test-suite
2020-07-29 10:59:41 +03:00
%endif
%endif #with binary_extra_modules
2020-07-29 10:59:41 +03:00
%if %{with ccache}
BuildRequires: ccache
%endif
# might be useful too:
2020-03-09 10:46:18 +03:00
Recommends: microcode
2013-11-16 00:27:01 +04:00
%description
The kernel package contains the Linux kernel (vmlinuz), the core of your
operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
input and output, etc.
############################################################################
%package -n kernel-%{flavour}-%{buildrel}
Version: %{fakever}
Release: %{fakerel}
Provides: kernel = %{kverrel}
Provides: kernel = %{kernelversion}.%{patchlevel}
Provides: kernel-%{flavour} = %{kverrel}
Provides: alsa = 1.0.27
Provides: should-restart = system
Requires(post): dracut
Requires(post): kmod
# Usually necessary, but sometimes user may want to not install them
Recommends: linux-firmware
Recommends: wireless-regdb
Recommends: crda
%if %{with flow_abi}
Requires: kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
%endif
# Set BFQ as default scheduler for HDDs
# https://www.phoronix.com/scan.php?page=article&item=linux-50hdd-io
Recommends: udev-rules-ioschedulers
# Keep these deps on old platforms
# but get rid of puling gcc etc. by the kernel on newer platforms
%if %{build_devel} && %{mdvver} < 201900
Requires: kernel-%{flavour}-devel-%{buildrel}
Requires(post): kernel-%{flavour}-devel-%{buildrel}
2013-11-16 00:27:01 +04:00
%endif
%ifarch %{ix86}
Conflicts: arch(x86_64)
2013-11-16 00:27:01 +04:00
%endif
2016-07-21 15:58:13 +03:00
Summary: A general-purpose Linux Kernel
Group: System/Kernel and hardware
%description -n kernel-%{flavour}-%{buildrel}
The kernel package contains the Linux kernel (vmlinuz), the core of your
operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
input and output, etc. This is a general-purpose kernel.
%post -n kernel-%{flavour}-%{buildrel}
# We always regenerate initrd here, even if it already exists. This may
# happen if kernel-<...>-devel is installed first, triggers rebuild of
# DKMS modules and some of these request remaking of initrd. The initrd
# that is created then will be non-functional. But when the user installs
# kernel-<...> package, that defunct initrd will be replaced with a working
# one here.
2013-11-16 00:27:01 +04:00
#
# depmod is also needed, because some DKMS-modules might have been installed
# when the devel package was installed but that was before the main modules
# were installed.
# This is also the reason the devel package is in Requires(post) for this
# package now: it must be installed completely before we call depmod here.
/sbin/depmod -a %{kver_full}
/sbin/dracut -f /boot/initrd-%{kver_full}.img %{kver_full}
2013-11-16 00:27:01 +04:00
# File triggers from grub packages will handle this.
#/usr/sbin/update-grub2
2013-11-16 00:27:01 +04:00
%postun -n kernel-%{flavour}-%{buildrel}
rm -f /boot/initrd-%{kver_full}.img
rm -f /boot/initrd-%{kver_full}_old.img
rm -f /boot/initrd-%{kver_full}kdump.img
rm -f /boot/initramfs-%{kver_full}kdump.img
# Third-party modules might have left something in /lib/modules/.../kernel/.
rm -rf /lib/modules/%{kver_full}/kernel/
rm -rf /lib/modules/%{kver_full}/modules*
# Remove /lib/modules/<...>/ if it is empty (-devel uses it too).
find /lib/modules/%{kver_full} -maxdepth 0 -empty -exec rm -rf {} \; || true
2019-07-21 23:50:25 +03:00
%files -n kernel-%{flavour}-%{buildrel} -f kernel_files.%{flavour}
############################################################################
%if %build_devel
%package -n kernel-%{flavour}-devel-%{buildrel}
Version: %{fakever}
Release: %{fakerel}
Summary: Development files for kernel-%{flavour}-%{buildrel}
Group: Development/Kernel
Requires: glibc-devel
Requires: ncurses-devel
Requires: make
Requires: gcc
Requires: perl
Provides: kernel-devel = %{kverrel}
Provides: kernel-%{flavour}-devel = %{kverrel}
%ifarch %{ix86}
Conflicts: arch(x86_64)
2013-11-16 00:27:01 +04:00
%endif
%description -n kernel-%{flavour}-devel-%{buildrel}
This package contains the kernel files (headers and build tools)
that should be enough to build additional drivers for
use with kernel-%{flavour}-%{buildrel}.
%post -n kernel-%{flavour}-devel-%{buildrel}
2020-08-03 21:07:52 +03:00
if command -v dkms_autoinstaller >/dev/null 2>&1; then
dkms_autoinstaller start %{kver_full}
fi
%preun -n kernel-%{flavour}-devel-%{buildrel}
# If any DKMS modules with REMAKE_INITRD=yes in their configs have been
# uninstalled, initrd has been regenerated for the given kernel. However,
# the kernel itself might have been uninstalled before, so that (defunct)
# initrd image files would be left behind. Remove them if the kernel itself
# is no longer installed. Should work if they are uninstalled in parallel
# too.
if ! test -f /boot/vmlinuz-%{kver_full}; then
rm -f /boot/initrd-%{kver_full}.img
rm -f /boot/initrd-%{kver_full}_old.img
fi
if ! command -v dkms >/dev/null 2>&1; then exit 0; fi
for ii in $(/usr/sbin/dkms status -k %{kver_full} | awk '{ print $1 $2; }'); do
mod=$(echo $ii | awk -v FS=',' '{ print $1; }')
ver=$(echo $ii | awk -v FS=',' '{ print $2; }')
/usr/sbin/dkms --rpm_safe_upgrade uninstall -m $mod -v $ver -k %{kver_full} || :
done
%postun -n kernel-%{flavour}-devel-%{buildrel}
rm -rf /usr/src/linux-%{kver_full} >/dev/null
# depmod (called when removing DKMS modules) might have created files in
# /lib/modules/.../. Remove these first.
rm -rf /lib/modules/%{kver_full}/modules*
# Remove the dir if it is already empty.
find /lib/modules/%{kver_full} -maxdepth 0 -empty -exec rm -rf {} \; || true
%files -n kernel-%{flavour}-devel-%{buildrel}
2020-11-26 21:33:48 +00:00
%{devel_root}/Documentation
%dir %{devel_root}
%dir %{devel_root}/arch
%dir %{devel_root}/include
%{devel_root}/arch/um
2020-11-26 21:33:48 +00:00
%{devel_root}/arch/x86
%{devel_root}/arch/arm
%{devel_root}/arch/arm64
%{devel_root}/block
%{devel_root}/certs
%{devel_root}/crypto
%{devel_root}/drivers
%{devel_root}/fs
2020-11-26 21:33:48 +00:00
%{devel_root}/include/soc
%{devel_root}/include/acpi
%{devel_root}/include/asm-generic
%{devel_root}/include/clocksource
%{devel_root}/include/config
%{devel_root}/include/crypto
%{devel_root}/include/drm
%{devel_root}/include/dt-bindings
%{devel_root}/include/generated
%{devel_root}/include/keys
%{devel_root}/include/kvm
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%{devel_root}/include/kunit
%{devel_root}/include/linux
%{devel_root}/include/math-emu
%{devel_root}/include/media
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%{devel_root}/include/memory
%{devel_root}/include/misc
%{devel_root}/include/net
%{devel_root}/include/pcmcia
%{devel_root}/include/ras
%{devel_root}/include/rdma
%{devel_root}/include/scsi
%{devel_root}/include/sound
%{devel_root}/include/target
%{devel_root}/include/trace
%{devel_root}/include/uapi
%{devel_root}/include/vdso
%{devel_root}/include/video
%{devel_root}/include/xen
%{devel_root}/init
%{devel_root}/ipc
%{devel_root}/kernel
%{devel_root}/lib
%{devel_root}/mm
%{devel_root}/net
%{devel_root}/samples
%{devel_root}/scripts
%{devel_root}/security
%{devel_root}/sound
%{devel_root}/tools
%{devel_root}/usr
%{devel_root}/virt
%{devel_root}/.config
%{devel_root}/Kbuild
%{devel_root}/Kconfig
%{devel_root}/Makefile
%{devel_root}/Module.symvers
%{devel_root}/arch/Kconfig
%{_modulesdir}/%{kver_full}/build
%{_modulesdir}/%{kver_full}/source
%endif
############################################################################
%if %build_debug
%package -n kernel-%{flavour}-%{buildrel}-debuginfo
Version: %{fakever}
Release: %{fakerel}
Summary: Debuginfo for kernel-%{flavour}-%{buildrel}
Group: Development/Debug
Provides: kernel-debug = %{kverrel}
%ifarch %{ix86}
Conflicts: arch(x86_64)
%endif
%description -n kernel-%{flavour}-%{buildrel}-debuginfo
This package contains the files with debuginfo for kernel-%{flavour}-%{buildrel}.
%files -n kernel-%{flavour}-%{buildrel}-debuginfo -f kernel_debug_files.%{flavour}
%endif
############################################################################
%package -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-latest
Version: %{kversion}
Release: %{fullrpmrel}
Summary: Meta package for the latest kernel-%{flavour} in %{kernelversion}.%{patchlevel} series
Group: System/Kernel and hardware
Requires: kernel-%{flavour}-%{buildrel}
%ifarch %{ix86}
Conflicts: arch(x86_64)
%endif
%description -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-latest
This meta package aims to make sure you always have the
latest kernel-%{flavour} %{kernelversion}.%{patchlevel}.x installed.
%files -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-latest
# no files
############################################################################
%if %build_devel
%package -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-devel-latest
Version: %{kversion}
Release: %{fullrpmrel}
Summary: Meta package for the latest kernel-%{flavour}-devel in %{kernelversion}.%{patchlevel} series
Group: Development/Kernel
Requires: kernel-%{flavour}-devel-%{buildrel}
Provides: kernel-devel-latest
%ifarch %{ix86}
Conflicts: arch(x86_64)
%endif
%description -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-devel-latest
This meta package aims to make sure you always have the
latest kernel-%{flavour}-devel %{kernelversion}.%{patchlevel}.x installed.
%files -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-devel-latest
# no files
%endif
############################################################################
2013-11-16 00:27:01 +04:00
%if %build_doc
%package -n kernel-doc
2013-11-16 00:27:01 +04:00
Version: %{kversion}
Release: %{fullrpmrel}
Summary: Various documentation bits found in the kernel source
2013-11-16 00:27:01 +04:00
Group: Documentation
Buildarch: noarch
%description -n kernel-doc
This package contains documentation files from the kernel source.
%files -n kernel-doc
%doc linux-%{tar_ver}/Documentation/*
2013-11-16 00:27:01 +04:00
%endif
############################################################################
2013-11-16 00:27:01 +04:00
%if %{build_perf}
%package -n perf
Version: %{kversion}
Release: %{fullrpmrel}
2013-11-16 00:27:01 +04:00
Summary: perf tool and the supporting documentation
Group: System/Kernel and hardware
%description -n perf
The package contains perf tool and the supporting documentation.
%files -n perf
%{_bindir}/perf
%ifarch x86_64
%{_bindir}/perf-read-vdso32
2013-11-16 00:27:01 +04:00
%endif
%{_bindir}/trace
%dir %{_prefix}/libexec/perf-core
%dir %{_libdir}/traceevent
%dir %{_libdir}/traceevent/plugins
%{_libdir}/traceevent/plugins/*
%{_prefix}/libexec/perf-core/*
%{_mandir}/man[1-8]/perf*
%{_sysconfdir}/bash_completion.d/perf
%{_datadir}/perf-core/strace/groups/*
%{_datadir}/doc/perf-tip/*.txt
/usr/lib/perf/examples/bpf/*
/usr/lib/perf/include/bpf/*
%endif
############################################################################
2013-11-16 00:27:01 +04:00
%if %{build_cpupower}
%package -n cpupower
Version: %{kversion}
Release: %{fullrpmrel}
Summary: The cpupower tools
2013-11-16 00:27:01 +04:00
Group: System/Kernel and hardware
Requires(post): rpm-helper >= 0.24.0-3
Requires(preun): rpm-helper >= 0.24.0-3
Obsoletes: cpufreq < 3.0
Obsoletes: cpufrequtils < 10.0
2013-11-16 00:27:01 +04:00
%description -n cpupower
The cpupower tools.
2013-11-16 00:27:01 +04:00
%post -n cpupower
if [ $1 -ge 0 ]; then
# Do not enable/disable cpupower.service directly, because it should start
# when cpupower.path triggers it.
/bin/systemctl enable cpupower.path >/dev/null 2>&1 || :
/bin/systemctl start cpupower.path >/dev/null 2>&1 || :
2014-04-01 15:25:39 +04:00
fi
2013-11-16 00:27:01 +04:00
%preun -n cpupower
2014-04-01 15:25:39 +04:00
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable cpupower.path > /dev/null 2>&1 || :
/bin/systemctl stop cpupower.path > /dev/null 2>&1 || :
2014-04-01 15:25:39 +04:00
fi
2013-11-16 00:27:01 +04:00
%files -n cpupower -f cpupower.lang
%{_bindir}/cpupower
%{_bindir}/cpupower-start.sh
%{_libdir}/libcpupower.so.0
%{_libdir}/libcpupower.so.0.0.1
%{_unitdir}/cpupower.service
%{_unitdir}/cpupower.path
%{_datadir}/bash-completion/completions/cpupower
%{_mandir}/man[1-8]/cpupower*
%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
############################################################################
2013-11-16 00:27:01 +04:00
%package -n cpupower-devel
Version: %{kversion}
Release: %{fullrpmrel}
Summary: Development files for cpupower
2013-11-16 00:27:01 +04:00
Group: Development/Kernel
Requires: cpupower = %{kversion}-%{fullrpmrel}
2013-11-16 00:27:01 +04:00
Conflicts: %{_lib}cpufreq-devel
%description -n cpupower-devel
This package contains the development files for cpupower.
%files -n cpupower-devel
%{_libdir}/libcpupower.so
%{_includedir}/cpufreq.h
2020-03-21 12:28:56 +03:00
%{_includedir}/cpuidle.h
2013-11-16 00:27:01 +04:00
%endif
############################################################################
%if %{build_headers}
2013-11-16 00:27:01 +04:00
%package headers
Version: %kversion
Release: %fullrpmrel
2013-11-16 00:27:01 +04:00
Summary: Linux kernel header files mostly used by your C library
Group: System/Kernel and hardware
Epoch: 1
Provides: linux-userspace-headers = %{EVRD}
Provides: kernel-release-headers = %{EVRD}
2013-11-16 00:27:01 +04:00
%description headers
C header files from the Linux kernel. The header files define
structures and constants that are needed for building most
standard programs, notably the C library.
This package is not suitable for building kernel modules, you
should use the 'kernel-devel' package instead.
%files headers
2020-03-21 12:28:56 +03:00
%{_includedir}/*
2013-11-16 00:27:01 +04:00
# Don't conflict with cpupower-devel
%if %{build_cpupower}
2020-03-21 12:28:56 +03:00
%exclude %{_includedir}/cpufreq.h
%exclude %{_includedir}/cpuidle.h
2013-11-16 00:27:01 +04:00
%endif
%endif
2013-11-16 00:27:01 +04:00
############################################################################
2020-03-13 20:35:12 +03:00
%if %{with uml}
2020-03-13 20:35:12 +03:00
%package -n kernel-uml-%{flavour}-%{buildrel}
Version: %{fakever}
Release: %{fakerel}
Provides: kernel-uml = %{kverrel}
Provides: kernel-uml-%{flavour} = %{kverrel}
Summary: User Mode Linux binary
Group: System/Kernel and hardware
%description -n kernel-uml-%{flavour}-%{buildrel}
User Mode Linux binary.
Stripped, debug is in kernel-%{flavour}-%{buildrel}-debuginfo.
2020-03-13 20:35:12 +03:00
%files -n kernel-uml-%{flavour}-%{buildrel}
%{_bindir}/linux-uml-%{kver_full}
#------------------------------------------------
%package -n kernel-uml-modules-%{flavour}-%{buildrel}
Version: %{fakever}
Release: %{fakerel}
Provides: kernel-uml-modules = %{kverrel}
Provides: kernel-uml-modules-%{flavour} = %{kverrel}
Summary: User Mode Linux (UML) kernel modules
Group: System/Kernel and hardware
%description -n kernel-uml-modules-%{flavour}-%{buildrel}
User Mode Linux (UML) kernel modules
- not compressed
- not stripped
- signed
%files -n kernel-uml-modules-%{flavour}-%{buildrel}
/lib/modules-uml/%{kver_full}
#------------------------------------------------
%package -n kernel-uml-%{flavour}-%{kernelversion}.%{patchlevel}-latest
Version: %{kversion}
Release: %{fullrpmrel}
Summary: Meta package for the latest kernel-uml-%{flavour} in %{kernelversion}.%{patchlevel} series
Group: System/Kernel and hardware
Requires: kernel-uml-%{flavour}-%{buildrel}
%ifarch %{ix86}
Conflicts: arch(x86_64)
%endif
%description -n kernel-uml-%{flavour}-%{kernelversion}.%{patchlevel}-latest
This meta package aims to make sure you always have the
latest kernel-uml-%{flavour} %{kernelversion}.%{patchlevel}.x
(User Mode Linux binary) installed.
%files -n kernel-uml-%{flavour}-%{kernelversion}.%{patchlevel}-latest
# no files
#------------------------------------------------
%package -n kernel-uml-modules-%{flavour}-%{kernelversion}.%{patchlevel}-latest
Version: %{kversion}
Release: %{fullrpmrel}
Summary: Meta package for the latest kernel-uml-modules-%{flavour} in %{kernelversion}.%{patchlevel} series
Group: System/Kernel and hardware
Requires: kernel-uml-modules-%{flavour}-%{buildrel}
%ifarch %{ix86}
Conflicts: arch(x86_64)
2020-03-13 20:35:12 +03:00
%endif
%description -n kernel-uml-modules-%{flavour}-%{kernelversion}.%{patchlevel}-latest
This meta package aims to make sure you always have the
latest kernel-uml-modules-%{flavour} %{kernelversion}.%{patchlevel}.x
(User Mode Linux kernel modules) installed.
%files -n kernel-uml-modules-%{flavour}-%{kernelversion}.%{patchlevel}-latest
# no files
#------------------------------------------------
%endif #endif uml
2020-07-29 10:59:41 +03:00
#------------------------------------------------
%if %{with binary_extra_modules}
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%ksob_mk_module_pkg -n 8821ce -s net/wireless -r rtl8821ce-blacklist
2020-07-29 10:59:41 +03:00
%ksob_mk_module_pkg -n xt_TRIPSO -s net -r tripso
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_shredder}
%ksob_mk_module_pkg -n shredder-kernel -s extra -r rosa-shredder-user
%endif
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
#------------------------------------------------
2020-07-29 10:59:41 +03:00
# virtualbox host
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_virtualbox_host}
2020-07-29 10:59:41 +03:00
%ksob_mk_module_pkg -n vboxnetflt -s misc
%ksob_mk_module_pkg -n vboxnetadp -s misc
%ksob_mk_module_pkg -n vboxdrv -s misc
%ksob_mk_module_pkg -n vboxpci -s misc
# a package which will pull all those modules
%package -n kernel-modules-virtualbox-host-%{flavour}-%{kernelversion}.%{patchlevel}-latest
Summary: Meta package to pull VirtualBox host kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
Group: System/Kernel and hardware
Version: %{kversion}
Release: %{fullrpmrel}
2020-07-29 10:59:41 +03:00
Requires: kernel-module-vboxnetflt-%{flavour}-%{buildrel}
Requires: kernel-module-vboxnetadp-%{flavour}-%{buildrel}
Requires: kernel-module-vboxdrv-%{flavour}-%{buildrel}
Requires: kernel-module-vboxpci-%{flavour}-%{buildrel}
%description -n kernel-modules-virtualbox-host-%{flavour}-%{kernelversion}.%{patchlevel}-latest
Meta package to pull VirtualBox host kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
%files -n kernel-modules-virtualbox-host-%{flavour}-%{kernelversion}.%{patchlevel}-latest
# empty
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%endif #ifarch x86
2020-07-29 10:59:41 +03:00
#------------------------------------------------
%if %{with nickel}
%ksob_mk_module_pkg -n nlkm -s misc
%ksob_mk_module_pkg -n memfreetest -s misc
%ksob_mk_module_pkg -n pcietest -s misc
%endif
2020-07-29 10:59:41 +03:00
%endif #binary_extra_modules
############################
%if %{with flow_abi}
%package -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
Summary: Directory to install third-party binary kernel modules for kernels %{kernelversion}.%{patchlevel}.x
Group: System/Kernel and hardware
%description -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
This package contains a directory to install third-party binary kernel modules for kernels %{kernelversion}.%{patchlevel}.x.
Some vendors provide binary-only kernel modules. They can put them into /lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi.
kmod tools will find them for kernels 5.4.x of "generic" and "nickel" flavours,
but there is no guarantee that these modules will load and work correctly on newer
or older kernels then the ones they were build against.
We call this "flow ABI" because most ABIs are not changed between %{kernelversion}.%{patchlevel}.x releases,
but there are no specific guarantees. ABI may evolve and change.
We highly recommend to use DKMS and build third-party kernel modules from source for every kernel!
This package does nothing, just owns a directory for third-party binary kernel modules.
%files -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
/lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi
%endif #with flow_abi
################################################
2020-03-13 20:35:12 +03:00
2013-11-16 00:27:01 +04:00
%prep
%setup -q -n %top_dir_name -c
2020-03-13 20:35:12 +03:00
%if %{with uml}
cp -r %{src_dir} %{src_dir}.uml
%endif
2013-11-16 00:27:01 +04:00
cd %src_dir
2020-11-26 18:48:55 +00:00
%autopatch -p1
2013-11-16 00:27:01 +04:00
#
# Setup Begin
#
# Kernel configuration
echo "Creating the kernel configuration file."
Revisited the set of kernel flavours and the generation of config files Until now, the build system for the kernel supported a number of flavours: nrj and non-nrj ones, desktop-, laptop-, server- and netbook-oriented, etc. It turned out over the years, however, that our users mostly need the following: * a kernel to use on the desktops (home and office use) with reasonable default settings for performance and responsiveness; * a kernel for laptops, with a bit more emphasis on power consumption. Other variants were rarely used. We also did not have enough time to properly support all these. Besides, the kernels for ARM and other architectures need a somewhat different build process than for x86. So, they are better off to be in separate ABF projects, even if they are needed. No signs of ROSA on ARM yet, btw. So, I kept only nrj-desktop and nrj-laptop flavours and only x86. Non-PAE systems also seem to be rare now, so I enabled PAE by default for the 32-bit kernels. Non-PAE kernels are no longer built. If they are needed, we may use a separate git branch or an ABF project for that. To simplify debugging, maintenance and experimentation with the kernel builds further, I revisited the process of preparing the kernel configuration files. The goal is to get rid of a separate git repo with the default configs (kernel-patches-and-configs) and keep everything in this project. The default config files are now kept here. For x86_64: * kernel-x86_64.config contains the options for both nrj-desktop and nrn-laptop flavours; * kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the flavour-specific options. This way, it is easier to track which config options changed when, easier to experiment with the custom configs and so on. The kernel will be built with debug info if rpmbuild is called with "--with debug".
2016-07-21 13:56:25 +03:00
# Configs
cp %{SOURCE111} .
cp %{SOURCE112} .
cp %{SOURCE113} .
cp kernel-%{arch_suffix}.config .config
touch %{build_dir}/.config.append
2020-11-26 21:17:21 +00:00
# get rid of unwanted files
find . -name '*~' -o -name '*.orig' -o -name '*.append' -delete
# wipe all .gitignore/.get_maintainer.ignore files
find . -name "*.g*ignore" -delete
# Enable debug info if requested.
sed -i '/CONFIG_DEBUG_INFO/d' .config
2013-11-16 00:27:01 +04:00
%if %build_debug
echo 'CONFIG_DEBUG_INFO=y' >> %{build_dir}/.config.append
echo 'CONFIG_DEBUG_INFO_DWARF4=y' >> %{build_dir}/.config.append
echo 'CONFIG_GDB_SCRIPTS=y' >> %{build_dir}/.config.append
%else
echo 'CONFIG_DEBUG_INFO=n' >> %{build_dir}/.config.append
2013-11-16 00:27:01 +04:00
%endif
sed -i '/CONFIG_MODULE_SIG_FORCE/d' .config
%if %{with oblig_signed_modules}
2019-11-11 17:47:53 +03:00
# Disallow loading not signed modules
# But 0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch allows to override this in cmdline
2020-03-13 20:35:12 +03:00
echo CONFIG_MODULE_SIG_FORCE=y >> %{build_dir}/.config.append
%else
2020-03-13 20:35:12 +03:00
echo CONFIG_MODULE_SIG_FORCE=n >> %{build_dir}/.config.append
%endif
sed -i '/CONFIG_MODULE_SIG_KEY/d' .config
2019-12-01 02:03:15 +03:00
# Set path to the key that will be generated later by openssl/libressl
2020-03-13 20:35:12 +03:00
echo CONFIG_MODULE_SIG_KEY=\"%{certs_signing_key_priv_rnd}\" >> %{build_dir}/.config.append
# Set path to one PEM file with all keys that the kernel must trust
sed -i '/CONFIG_SYSTEM_TRUSTED_KEYS/d' .config
2020-03-13 20:35:12 +03:00
echo CONFIG_SYSTEM_TRUSTED_KEYS=\"%{certs_public_keys}\" >> %{build_dir}/.config.append
# Memory wiping
# Introduced in kernel 5.3 by commit 6471384af2a6530696fc0203bafe4de41a23c9ef
# Estimated performance impact is described in the commit
# "Fill newly allocated pages and heap objects with zeroes."
# To enable, add to cmdline: init_on_alloc=1
sed -i '/CONFIG_INIT_ON_ALLOC_DEFAULT_ON/d' .config
echo CONFIG_INIT_ON_ALLOC_DEFAULT_ON=n >> %{build_dir}/.config.append
# "Fill freed pages and heap objects with zeroes"
# To disable, add to cmdline: init_on_free=0
sed -i '/CONFIG_INIT_ON_FREE_DEFAULT_ON/d' .config
%if %{with nickel}
2020-03-13 20:35:12 +03:00
echo CONFIG_INIT_ON_FREE_DEFAULT_ON=y >> %{build_dir}/.config.append
%else
echo CONFIG_INIT_ON_FREE_DEFAULT_ON=n >> %{build_dir}/.config.append
%endif
# Here enabling only either only init_on_free or only init_on_alloc
# makes sense; init_on_alloc is not about protecting information.
2020-03-13 20:35:12 +03:00
# To load kernel keyring in UML
for i in STREEBOG SHA1 SHA256 SHA512 ECRDSA RSA ; do
if ! grep -q "^CONFIG_CRYPTO_${i}=y$" .config; then
sed -i "/CONFIG_CRYPTO_${i}/d" .config
echo "CONFIG_CRYPTO_${i}=y" >> %{build_dir}/.config.append
fi
done
2020-03-13 20:35:12 +03:00
cat %{build_dir}/.config.append >> .config
# Store the config file in the appropriate directory.
2020-11-26 18:48:55 +00:00
CONFIG_DIR=arch/%{arch_type}/configs
Revisited the set of kernel flavours and the generation of config files Until now, the build system for the kernel supported a number of flavours: nrj and non-nrj ones, desktop-, laptop-, server- and netbook-oriented, etc. It turned out over the years, however, that our users mostly need the following: * a kernel to use on the desktops (home and office use) with reasonable default settings for performance and responsiveness; * a kernel for laptops, with a bit more emphasis on power consumption. Other variants were rarely used. We also did not have enough time to properly support all these. Besides, the kernels for ARM and other architectures need a somewhat different build process than for x86. So, they are better off to be in separate ABF projects, even if they are needed. No signs of ROSA on ARM yet, btw. So, I kept only nrj-desktop and nrj-laptop flavours and only x86. Non-PAE systems also seem to be rare now, so I enabled PAE by default for the 32-bit kernels. Non-PAE kernels are no longer built. If they are needed, we may use a separate git branch or an ABF project for that. To simplify debugging, maintenance and experimentation with the kernel builds further, I revisited the process of preparing the kernel configuration files. The goal is to get rid of a separate git repo with the default configs (kernel-patches-and-configs) and keep everything in this project. The default config files are now kept here. For x86_64: * kernel-x86_64.config contains the options for both nrj-desktop and nrn-laptop flavours; * kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the flavour-specific options. This way, it is easier to track which config options changed when, easier to experiment with the custom configs and so on. The kernel will be built with debug info if rpmbuild is called with "--with debug".
2016-07-21 13:56:25 +03:00
mkdir -p "${CONFIG_DIR}"
2020-11-26 18:48:55 +00:00
cfg_file=arch/%{arch_type}/configs/%{arch_suffix}_defconfig-%{flavour}
make ARCH=%{arch_type} oldconfig && \
mv .config ${cfg_file}
echo "Created ${cfg_file}."
2013-11-16 00:27:01 +04:00
# make sure the kernel has the sublevel we know it has...
LC_ALL=C sed -ri "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
2013-11-16 00:27:01 +04:00
# get rid of unwanted files
find . -name '*~' -o -name '*.orig' -o -name '*.append' | %kxargs rm -f
find . -name '.get_maintainer.ignore' | %kxargs rm -f
2013-11-16 00:27:01 +04:00
############################################################################
2013-11-16 00:27:01 +04:00
%build
2019-11-11 22:27:50 +03:00
# Ensure that build time generated private keys don't get published
# as e.g. "RPM build root" on ABF!
# Note that ABF sends SIGKILL to rpm-build.sh when the build is terminated;
# in this case trap will not work, but RPM build root also will not be
# saved because rpm-build.sh saves it, but it is SIGKILLed.
# For best security we could store private keys in RAM (not reachable from
# filesystem, so not in /tmp!) and override sth like fopen() by LD_PRELOAD
# to give the content of keys from RAM when a virtual address of a key file
# is accessed, but currently I don't know how to implement this (TODO: ).
_cleanup(){
2020-03-14 13:49:15 +03:00
# Show resulting kernel public keys for debugging
cat "%{src_dir}/%{certs_dir_rnd}/x509_certificate_list" | base64 -d || :
2020-03-14 13:49:15 +03:00
rm -fvr "%{src_dir}/%{certs_dir_rnd}"
2020-03-13 20:35:12 +03:00
%if %{with uml}
cat "%{src_dir}.uml/%{certs_dir_rnd}/x509_certificate_list" | base64 -d || :
2020-03-13 20:35:12 +03:00
rm -fvr "%{src_dir}.uml/%{certs_dir_rnd}"
%endif
2019-11-11 22:27:50 +03:00
}
# Make a trap to delete keys even if %%build fails in the middle
trap "_cleanup" EXIT
rm -rf %{temp_root}
install -d %{temp_root}
2013-11-16 00:27:01 +04:00
cd %src_dir
2013-11-16 00:27:01 +04:00
2019-11-11 17:47:53 +03:00
### Keys for signing kernel modules
# Keys can be generated both manually and automatically,
# let's generate them by ourselves to take full control of the process
# https://www.ibm.com/support/knowledgecenter/en/SSB23S_1.1.0.13/gtps7/cfgcert.html
# See also certs/Makefile in kernel source
2019-11-11 17:47:53 +03:00
mkdir -p "%{certs_dir_rnd}"
# On ABF, %%packager == $username <$email>
# Try to extract email from %%packager if it is set
_get_email(){
# Check that macro %%packager was set and is not empty
if echo '%{packager}' | grep -q 'packager}$' || [ -z "%{packager}" ]
# If was not set or is empty, use default email
then echo 'rpmbuild@rosa.unknown' && return
# Otherwise try to extract email from 'name <email>' or sth else
else temp="$(echo '%{packager}' | tr '[:upper:]' '[:lower:]' | tr ' ' '\n' | tr -d '<>' | grep -E '@.*\..*' | head -n 1)"
fi
# Validate that what we have now is a valid email
# https://stackoverflow.com/a/2138832, https://stackoverflow.com/a/41192733
# Note that we set %%_buildshell to /bin/bash to guarantee the work of this bashism
regex_email="^[a-z0-9!#\$%&'*+/=?^_\`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_\`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?\$"
if [[ "$temp" =~ ${regex_email} ]]
# If it is, use it
then echo "$temp" && return
# Otherwise use default email
else echo 'rpmbuild@rosa.unknown' && return
fi
# If script above has not return'ed for any reason,
# e.g. because of non-bash shell being not able to
# process regexp, use default email
echo 'rpmbuild@rosa.unknown'
}
email="$(_get_email)"
2019-11-11 17:47:53 +03:00
cat <<EOF > "%{certs_key_config_rnd}"
[ req ]
prompt = no
string_mask = utf8only
#default_keyfile = %{certs_signing_key_priv_rnd}
2019-11-11 17:47:53 +03:00
distinguished_name = req_distinguished_name
x509_extensions = myexts
2019-11-11 17:47:53 +03:00
[ req_distinguished_name ]
organizationName = %{vendor} rpmbuild
commonName = Build time autogenerated @ALGO@ kernel key
emailAddress = ${email}
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid
2019-11-11 17:47:53 +03:00
EOF
cat "%{certs_key_config_rnd}"
sed -e 's,@ALGO@,RSA,g' "%{certs_key_config_rnd}" > "%{certs_key_config_rnd}.RSA"
sed -e 's,@ALGO@,GOST R 34.10-2012,g' "%{certs_key_config_rnd}" > "%{certs_key_config_rnd}.GOST"
# avoid using the template
rm -f "%{certs_key_config_rnd}"
_libressl_gen_key(){
if [ "$GOST_KEY" = 1 ]
then
lssl_req_gost_args="\
-newkey gost2001 \
-pkeyopt dgst:streebog512 -pkeyopt paramset:A \
-streebog512"
OUT="%{certs_signing_key_priv_rnd}.GOST"
CONFIG="%{certs_key_config_rnd}.GOST"
else
lssl_req_gost_args=""
OUT="%{certs_signing_key_priv_rnd}.RSA"
CONFIG="%{certs_key_config_rnd}.RSA"
fi
libressl req -new -nodes -utf8 -batch \
$lssl_req_gost_args \
-days 109500 \
-x509 -config "$CONFIG" \
-out "$OUT" \
-keyout "$OUT"
# Verify
if [ "$GOST_KEY" = 1 ]; then
libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
| grep -E 'Signature Algorithm:.*GOST R 34.10-2012'
libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
| grep -E 'Digest Algorithm:.*GOST R 34-11-2012'
libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
| grep -E 'Public Key Algorithm:.*GOST R 34.10-2012'
fi
}
2019-11-11 17:47:53 +03:00
GOST_KEY=0 _libressl_gen_key
GOST_KEY=1 _libressl_gen_key
# Fake CONFIG_MODULE_SIG_KEY to make build scripts happy
cp -v "%{certs_signing_key_priv_rnd}.RSA" "%{certs_signing_key_priv_rnd}"
# Strip public parts from the generated PEMs
sed -n \
'/^-----BEGIN CERTIFICATE-----$/,/^-----END CERTIFICATE-----$/p' \
"%{certs_signing_key_priv_rnd}.GOST" \
"%{certs_signing_key_priv_rnd}.RSA" \
> "%{certs_public_keys}"
2019-12-07 21:57:55 +03:00
# link sign-file and extract-cert with LibreSSL instead of OpenSSL
if [ $? != 0 ] ; then exit $? ; fi
sed -i %{src_dir}/scripts/Makefile \
2020-03-13 20:35:12 +03:00
%if %{with uml}
%{src_dir}.uml/scripts/Makefile \
%endif
-e "s, libcrypto , libressl-libcrypto ,g"
%if %{with additional_keys}
# Add additional public RSA keys to the list of trusted keys for kernel modules
# Build kernel --without additional_keys if you do not want to trust them
cat %{expand:%(for i in `seq 1 12`; do echo "%%SOURCE$((200+${i}))" | tr "\n" " "; done)} \
>> "%{certs_public_keys}"
%endif #endif additional_keys
cat %{certs_public_keys}
2019-11-11 17:47:53 +03:00
# .config
%smake -s mrproper
2020-11-26 18:48:55 +00:00
cp arch/%{arch_type}/configs/%{arch_suffix}_defconfig-%{flavour} .config
2013-11-16 00:27:01 +04:00
# make sure EXTRAVERSION says what we want it to say
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{flavour}-%{buildrpmrel}/" Makefile
2013-11-16 00:27:01 +04:00
# build the kernel
echo "Building kernel %{kver_full}"
2013-11-16 00:27:01 +04:00
2020-11-26 21:09:27 +00:00
TARGETS="all"
# need to install dtbs to proper boot arm64 devices
%ifarch aarch64
TARGETS="$TARGETS dtbs"
%endif
2021-02-23 17:35:52 +03:00
%kmake V=1 -s $TARGETS
2015-04-23 12:11:47 +03:00
2020-07-29 10:59:41 +03:00
# Install modules
mkdir -p %{temp_modules}/%{kver_full}
%smake INSTALL_MOD_PATH=%{temp_root} KERNELRELEASE=%{kver_full} modules_install
%if %{with binary_extra_modules}
# Build and install procedure is specific to each Makefile from kernmel-source-* packages
# See also: https://www.kernel.org/doc/html/latest/kbuild/modules.html
# Copy directory because write permissions are required
# `make modules_install` must be done before this, otherwise these copied files will be deleted
cp -r "$(rpm -q --qf '/usr/src/rtl8821ce-%%{VERSION}-%%{RELEASE}' kernel-source-rtl8821ce)" kernel-source-rtl8821ce
pushd kernel-source-rtl8821ce
%kmake KSRC=%{src_dir} M="$PWD"
mkdir -p %{temp_modules}/%{kver_full}/kernel/net/wireless/
cp 8821ce.ko %{temp_modules}/%{kver_full}/kernel/net/wireless/8821ce.ko
popd
rm -fr kernel-source-rtl8821ce
cp -r "$(rpm -q --qf '/usr/src/tripso-%%{VERSION}-%%{RELEASE}' kernel-source-tripso)" kernel-source-tripso
pushd kernel-source-tripso
%kmake KDIR=%{src_dir}
mkdir -p %{temp_modules}/%{kver_full}/kernel/net
cp xt_TRIPSO.ko %{temp_modules}/%{kver_full}/kernel/net/
popd
rm -fr kernel-source-tripso
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_shredder}
2020-11-26 21:09:27 +00:00
cp -r "$(rpm -q --qf '/usr/src/shredder-kernel-%%{VERSION}-%%{RELEASE}' kernel-source-shredder-kernel)" kernel-source-shredder-kernel
pushd kernel-source-shredder-kernel
%kmake KERNEL_PATH=%{src_dir}
mkdir -p %{temp_modules}/%{kver_full}/kernel/extra/
cp shredder-kernel.ko %{temp_modules}/%{kver_full}/kernel/extra/
popd
rm -fr kernel-source-shredder-kernel
%endif
2020-11-26 21:09:27 +00:00
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_virtualbox_host}
2020-11-26 21:09:27 +00:00
# build commands for virtualbox are based on the ones from the virtualbox package
2020-07-29 10:59:41 +03:00
cp -r "$(rpm -q --qf '/usr/src/virtualbox-%%{VERSION}-%%{RELEASE}' kernel-source-virtualbox)" kernel-source-virtualbox
mkdir -p %{temp_modules}/%{kver_full}/kernel/misc/
pushd kernel-source-virtualbox
make -C vboxdrv KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
cp -fv vboxdrv/Module.symvers vboxnetflt
cp -fv vboxdrv/Module.symvers vboxnetadp
make -C vboxnetflt KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
make -C vboxnetadp KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
cp -fv vboxnetadp/Module.symvers vboxpci/
make -C vboxpci KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
for i in vboxnetflt vboxnetadp vboxdrv vboxpci
do
cp -v "${i}/${i}.ko" %{temp_modules}/%{kver_full}/kernel/misc/
done
popd
2020-11-26 18:58:01 +00:00
%endif
2020-07-29 10:59:41 +03:00
%if %{with nickel}
# rosa-test-suite uses /sr/src/xxx-version, not /usr/src/xxx-version-release
cp -r "$(rpm -q --qf '/usr/src/rosa-test-suite-%%{VERSION}' kernel-source-rosa-test-suite)" kernel-source-rosa-test-suite
pushd kernel-source-rosa-test-suite
mkdir -p %{temp_modules}/%{kver_full}/kernel/misc/
for i in nlkm memfreetest pcietest
do
cat << EOF > Makefile
obj-m := ${i}.o
all:
make -C %{src_dir} M=\$(PWD) modules
EOF
%kmake
cp -fv ${i}.ko %{temp_modules}/%{kver_full}/kernel/misc/
done
popd
%endif #with nickel <- with binary_extra_modules
%endif #with binary_extra_modules
2020-07-29 10:59:41 +03:00
2020-03-13 20:35:12 +03:00
%if %{with uml}
cp -rv %{certs_dir_rnd} %{src_dir}.uml/
pushd %{src_dir}.uml
%kmake ARCH=um defconfig
2020-03-13 20:35:12 +03:00
%kmake ARCH=um linux
install -Dm0755 linux %{temp_root}%{_bindir}/linux-uml-%{kver_full}
#rm -fv linux
%kmake V=1 ARCH=um modules
mkdir -p %{temp_root}/lib/modules-uml/%{kver_full}/
%kmake ARCH=um INSTALL_MOD_PATH=%{temp_root}/lib/modules-uml/%{kver_full}/ modules_install
popd
%endif
install -d %{temp_boot}
install -m 644 System.map %{temp_boot}/System.map-%{kver_full}
install -m 644 .config %{temp_boot}/config-%{kver_full}
xz -c Module.symvers > %{temp_boot}/symvers-%{kver_full}.xz
2013-11-16 00:27:01 +04:00
2020-11-26 21:09:27 +00:00
%ifarch aarch64
cp -f arch/arm64/boot/Image.gz %{temp_boot}/vmlinuz-%{kver_full}
%else
cp -f arch/%{arch_type}/boot/bzImage %{temp_boot}/vmlinuz-%{kver_full}
%endif
2013-11-16 00:27:01 +04:00
# headers
%if %{build_headers}
%make INSTALL_HDR_PATH=%{temp_root}%{_prefix} KERNELRELEASE=%{kver_full} headers_install
find %{temp_root}%{_prefix} -name .install -or -name ..install.cmd | %kxargs rm -f
2013-11-16 00:27:01 +04:00
%endif
# remove /lib/firmware, we use a separate linux-firmware package
rm -rf %{temp_root}/lib/firmware
# Prepare the files for kernel*-devel
%if %build_devel
mkdir -p %{temp_devel_root}
for i in $(find . -name 'Makefile*'); do cp -R --parents $i %{temp_devel_root}; done
for i in $(find . -name 'Kconfig*' -o -name 'Kbuild*'); do cp -R --parents $i %{temp_devel_root}; done
2013-11-16 00:27:01 +04:00
cp -fR include %{temp_devel_root}
cp -fR scripts %{temp_devel_root}
cp -fR kernel/bounds.c %{temp_devel_root}/kernel
cp -fR kernel/time/timeconst.bc %{temp_devel_root}/kernel/time
cp -fR tools %{temp_devel_root}/
2020-11-26 18:48:55 +00:00
cp -fR arch/%{arch_type}/kernel/asm-offsets.{c,s} %{temp_devel_root}/arch/%{arch_type}/kernel/
2020-11-26 21:09:27 +00:00
%ifarch %{ix86} %{x86_64}
2020-11-26 18:48:55 +00:00
cp -fR arch/%{arch_type}/kernel/asm-offsets_{32,64}.c %{temp_devel_root}/arch/%{arch_type}/kernel/
cp -fR arch/%{arch_type}/purgatory/* %{temp_devel_root}/arch/%{arch_type}/purgatory/
2020-11-26 21:09:27 +00:00
# needed for arch/x86/purgatory
cp -fR lib/*.h lib/*.c %{temp_devel_root}/lib/
2020-11-26 18:48:55 +00:00
cp -fR arch/%{arch_type}/entry/syscalls/syscall* %{temp_devel_root}/arch/%{arch_type}/entry/syscalls/
cp -fR arch/%{arch_type}/tools %{temp_devel_root}/arch/%{arch_type}/
2020-11-26 21:09:27 +00:00
# needed for kexec
cp -fR arch/%{arch_type}/boot/*.h %{temp_devel_root}/arch/%{arch_type}/boot/
cp -fR arch/%{arch_type}/boot/*.c %{temp_devel_root}/arch/%{arch_type}/boot/
%endif
cp -fR arch/%{arch_type}/include %{temp_devel_root}/arch/%{arch_type}/
cp -fR .config Module.symvers %{temp_devel_root}
# Needed for truecrypt build (Danny)
cp -fR drivers/md/dm.h %{temp_devel_root}/drivers/md/
2013-11-16 00:27:01 +04:00
# Needed for lirc_gpio (#39004)
cp -fR drivers/media/pci/bt8xx/bttv{,p}.h %{temp_devel_root}/drivers/media/pci/bt8xx/
cp -fR drivers/media/pci/bt8xx/bt848.h %{temp_devel_root}/drivers/media/pci/bt8xx/
cp -fR drivers/media/common/btcx-risc.h %{temp_devel_root}/drivers/media/common/
# add acpica header files, needed for fglrx build
cp -fR drivers/acpi/acpica/*.h %{temp_devel_root}/drivers/acpi/acpica/
2013-11-16 00:27:01 +04:00
# aufs2 has a special file needed
cp -fR fs/aufs/magic.mk %{temp_devel_root}/fs/aufs
2013-11-16 00:27:01 +04:00
# SELinux needs security/selinux/include
cp -fR security/selinux/include %{temp_devel_root}/security/selinux
2013-11-16 00:27:01 +04:00
for i in alpha arc avr32 blackfin c6x cris csky frv h8300 hexagon ia64 m32r m68k m68knommu metag microblaze \
mips mn10300 nds32 nios2 openrisc parisc powerpc riscv s390 score sh sparc tile unicore32 xtensa; do
rm -rf %{temp_devel_root}/arch/$i
done
2013-11-16 00:27:01 +04:00
# Clean the scripts tree, and make sure everything is ok (sanity check)
# running prepare+scripts (tree was already "prepared" in build)
2020-03-14 13:49:15 +03:00
pushd %{temp_devel_root}
2020-11-26 21:09:27 +00:00
%smake V=1 -s clean ARCH=%{arch_type}
2020-03-14 13:49:15 +03:00
popd
2020-11-26 21:09:27 +00:00
rm -f %{temp_devel_root}/.config.old
2013-11-16 00:27:01 +04:00
# fix permissions
chmod -R a+rX %{temp_devel_root}
2013-11-16 00:27:01 +04:00
# disable mrproper in -devel rpms
patch -p1 --fuzz=0 -d %{temp_devel_root} -i %{SOURCE2}
# endif build_devel
2013-11-16 00:27:01 +04:00
%endif
# Manage the files with debug info, provide the debug links in the
# kernel modules.
%if %build_debug
install -m 644 vmlinux %{temp_boot}/vmlinux-%{kver_full}
kernel_debug_files=../kernel_debug_files.%{flavour}
echo "%{_bootdir}/vmlinux-%{kver_full}" >> $kernel_debug_files
find %{temp_modules}/%{kver_full}/kernel \
-name "*.ko" | \
%kxargs -I '{}' objcopy --only-keep-debug '{}' '{}'.debug
find %{temp_modules}/%{kver_full}/kernel \
-name "*.ko" | %kxargs -I '{}' \
sh -c 'cd `dirname {}`; \
objcopy --add-gnu-debuglink=`basename {}`.debug \
--strip-debug `basename {}`'
pushd %{temp_modules}
find %{kver_full}/kernel -name "*.ko.debug" > debug_module_list
popd
cat %{temp_modules}/debug_module_list | \
sed 's|\(.*\)|%{_modulesdir}/\1|' >> $kernel_debug_files
cat %{temp_modules}/debug_module_list | \
sed 's|\(.*\)|%exclude %{_modulesdir}/\1|' \
>> ../kernel_exclude_debug_files.%{flavour}
rm -f %{temp_modules}/debug_module_list
2013-11-16 00:27:01 +04:00
# endif build_debug
%endif
2020-07-29 10:59:41 +03:00
# https://patchwork.kernel.org/patch/11446123/
2019-12-07 21:57:55 +03:00
_libressl_sign(){
if [ ! -f "$1" ]; then
echo "No file $1"
return 0
fi
f="$1"
%if %{with gost_sign}
%{src_dir}/scripts/sign-file streebog512 \
"%{certs_signing_key_priv_rnd}.GOST" "%{certs_signing_key_priv_rnd}.GOST" "$f"
%else
%{src_dir}/scripts/sign-file sha512 \
2020-03-20 11:27:35 +03:00
"%{certs_signing_key_priv_rnd}.RSA" "%{certs_signing_key_priv_rnd}.RSA" "$f"
%endif
2019-12-07 21:57:55 +03:00
unset f
}
export -f _libressl_sign
2020-03-13 20:35:12 +03:00
find %{temp_modules}/%{kver_full}/kernel \
%if %{with uml}
%{temp_root}/lib/modules-uml/%{kver_full} \
%endif
-name '*.ko' -print0 | sort -u | \
2019-12-07 21:57:55 +03:00
xargs --null -P "$(nproc)" -I {} "$SHELL" -e -x -c 'if ! _libressl_sign "{}"; \
then echo Failed _libressl_sign on "{}" && exit 1; fi'
2019-11-13 17:35:59 +03:00
# Create the list of files for the kernel.
kernel_files=../kernel_files.%{flavour}
cat > $kernel_files <<EOF
%{_bootdir}/System.map-%{kver_full}
%{_bootdir}/symvers-%{kver_full}.xz
%{_bootdir}/config-%{kver_full}
%{_bootdir}/vmlinuz-%{kver_full}
%{_modulesdir}/%{kver_full}/kernel
2020-07-29 10:59:41 +03:00
%if %{with binary_extra_modules}
# 8821ce.ko.debug will not be excluded and will be in the main debug subpackage
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8821ce.ko%{kmod_suffix}
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_shredder}
2020-07-29 10:59:41 +03:00
%exclude %{_modulesdir}/%{kver_full}/kernel/extra/shredder-kernel.ko%{kmod_suffix}
%endif
Update from 5.4 to 5.10.1 - 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
2020-12-20 18:49:24 +03:00
%if %{with binary_virtualbox_host}
# vbox host modules may be built here (vboxnetflt vboxnetadp vboxdrv vboxpci)
# vbox guest modules are in the mainline kernel now (vboxvideo vboxguest vboxsf)
2020-07-29 10:59:41 +03:00
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/vbox*.ko%{kmod_suffix}
2020-11-26 21:09:27 +00:00
%endif
%exclude %{_modulesdir}/%{kver_full}/kernel/net/xt_TRIPSO.ko%{kmod_suffix}
%if %{with nickel}
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/nlkm.ko%{kmod_suffix}
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/memfreetest.ko%{kmod_suffix}
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/pcietest.ko%{kmod_suffix}
2020-07-29 10:59:41 +03:00
%endif
%endif #with binary_extra_modules
%{_modulesdir}/%{kver_full}/modules.*
EOF
%if %build_debug
cat ../kernel_exclude_debug_files.%{flavour} >> $kernel_files
%endif
# set extraversion to match srpm to get nice version reported by the tools
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{fullrpmrel}/" Makefile
2013-11-16 00:27:01 +04:00
%if %{build_perf}
%smake -C tools/perf -s PYTHON=%{__python3} HAVE_CPLUS_DEMANGLE=1 WERROR=0 prefix=%{_prefix} lib=%{_lib} NO_GTK2=1 all
2020-11-27 01:21:49 +03:00
%smake -C tools/perf -s prefix=%{_prefix} lib=%{_lib} NO_GTK2=1 man
2013-11-16 00:27:01 +04:00
%endif
%if %{build_cpupower}
# make sure version-gen.sh is executable.
chmod +x tools/power/cpupower/utils/version-gen.sh
%make -C tools/power/cpupower CPUFREQ_BENCH=false
2013-11-16 00:27:01 +04:00
%endif
2019-11-11 22:27:50 +03:00
_cleanup
############################################################################
2013-11-16 00:27:01 +04:00
%install
cd %src_dir
# We want to be able to test several times the install part
rm -rf %{buildroot}
cp -a %{temp_root} %{buildroot}
# Multithreaded verification that every kernel module
# has a signature attached to it
mkdir -p "%{certs_dir_rnd}"
touch %{certs_verify_tmp}
_verify_signature(){
if [ -z "$1" ] || [ ! -f "$1" ]; then return; fi
if hexdump -C "$1" | rev | cut -f 2 -d '|' | rev | tr -d '\n' | \
grep -q '~Module signature appended~'
then
if [ -f %{certs_verify_tmp} ]; then
rm -f %{certs_verify_tmp}
fi
else
echo "ERROR: Module $1 has no signature attached to it!"
exit 1
fi
}
export -f _verify_signature
2020-03-13 20:35:12 +03:00
find %{target_modules} \
%if %{with uml}
%{buildroot}/lib/modules-uml/%{kver_full} \
%endif
-name '*.ko' -print0 | sort -u | \
xargs --null -P "$(nproc)" -I {} "$SHELL" -c '_verify_signature "{}"'
if [ -f %{certs_verify_tmp} ]; then
echo "ERROR: seems that signatures of none modules were verified!"
exit 1
fi
rm -f %{certs_verify_tmp}
2013-11-16 00:27:01 +04:00
# compressing modules
%if %{build_modxz}
find %{target_modules} -name "*.ko" | %kxargs xz -6e
%else
find %{target_modules} -name "*.ko" | %kxargs gzip -9
%endif
pushd %{target_modules}
for i in *; do
rm -f $i/build $i/source
ln -sf /usr/src/linux-$i $i/build
ln -sf /usr/src/linux-$i $i/source
done
2013-11-16 00:27:01 +04:00
# sniff, if we compressed all the modules, we change the stamp :(
# we really need the depmod -ae here
for i in *; do
/sbin/depmod -ae -b %{buildroot} -F %{target_boot}/System.map-$i $i
echo $?
done
# We used to create modules.description files which contained the
# description strings for the modules as shown by modinfo. These files
# are unlikely to be used right now, so create them (in case some old tool
# checks for their existence) but keep them empty.
2013-11-16 00:27:01 +04:00
for i in *; do
touch $i/modules.description
2013-11-16 00:27:01 +04:00
done
popd
# need to set extraversion to match srpm again to avoid rebuild
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{fullrpmrel}/" Makefile
2013-11-16 00:27:01 +04:00
%if %{build_perf}
# perf tool binary and supporting scripts/binaries
2020-12-11 19:39:08 +00:00
make -C tools/perf -s V=1 DESTDIR=%{buildroot} WERROR=0 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} lib=%{_lib} install
2013-11-16 00:27:01 +04:00
2020-05-11 09:33:18 +03:00
# Versionize shebang (#!/usr/bin/env python -> #!/usr/bin/python3)
sed -i -e '1 s,^.*$,#!%{__python3},' %{buildroot}%{_prefix}/libexec/perf-core/scripts/python/exported-sql-viewer.py
2013-11-16 00:27:01 +04:00
# perf man pages (note: implicit rpm magic compresses them later)
2020-12-11 19:39:08 +00:00
make -C tools/perf -s V=1 DESTDIR=%{buildroot} WERROR=0 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man
2013-11-16 00:27:01 +04:00
%endif
%if %{build_cpupower}
make -C tools/power/cpupower DESTDIR=%{buildroot} libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
2013-11-16 00:27:01 +04:00
rm -f %{buildroot}%{_libdir}/*.{a,la}
%find_lang cpupower
mv cpupower.lang ../
chmod 0755 %{buildroot}%{_libdir}/libcpupower.so*
mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
install -m644 %{SOURCE50} %{buildroot}%{_unitdir}/cpupower.service
install -m644 %{SOURCE53} %{buildroot}%{_unitdir}/cpupower.path
2013-11-16 00:27:01 +04:00
install -m644 %{SOURCE51} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
install -m755 %{SOURCE52} %{buildroot}%{_bindir}/cpupower-start.sh
2013-11-16 00:27:01 +04:00
%endif
2020-07-29 10:59:41 +03:00
# delete junk
rm -fr %{buildroot}%{_usr}/src/*/kernel-source-*
%if %{with flow_abi}
# Prefix with "zzz" to put this directory into the end of search list
# and avoid tricks with depmod configs
mkdir -p %{buildroot}/lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi
ln -s /lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi %{buildroot}%{_modulesdir}/%{kver_full}/kernel/zzz-%{kernelversion}.%{patchlevel}-rosa-flow-abi
%endif