d82a30eae9
* refs/heads/tmp-495c24a:
Revert half of "ANDROID: cpu/hotplug: create vendor hook for cpu_up/cpu_down"
Revert half of "ANDROID: arm64: add vendor hooks for bti and pauth fault"
Revert half of "ANDROID: vendor_hooks: Add param for android_vh_cpu_up/down"
Revert "ANDROID: vendor_hooks: Add a hook for task tagging"
Revert "ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle"
Revert "ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle"
Revert "ANDROID: vendor_hooks: add hook and OEM data for slab shrink"
Revert half of "ANDROID: vendor_hooks: Add hooks for memory when debug"
Revert half of "ANDROID: gic-v3: Add vendor hook to GIC v3"
UPSTREAM: tracefs: Set all files to the same group ownership as the mount option
UPSTREAM: tracefs: Have new files inherit the ownership of their parent
UPSTREAM: tracefs: Have tracefs directories not set OTH permission bits by default
Revert "ANDROID: vendor_hooks: Add hooks to recognize special worker thread."
Revert "ANDROID: sysrq: add vendor hook for sysrq crash information"
Revert "ANDROID: user: Add vendor hook to user for GKI purpose"
Revert portions of "ANDROID: sched: Add vendor hooks for sched."
Revert portions of "ANDROID: vendor_hooks: Add hooks for scheduler"
UPSTREAM: vfs: fs_context: fix up param length parsing in legacy_parse_param
ANDROID: GKI: disable CONFIG_FORTIFY_SOURCE
Linux 5.10.81
selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage
thermal: Fix NULL pointer dereferences in of_thermal_ functions
perf/core: Avoid put_page() when GUP fails
scripts/lld-version.sh: Rewrite based on upstream ld-version.sh
erofs: fix unsafe pagevec reuse of hooked pclusters
erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
PCI: Add MSI masking quirk for Nvidia ION AHCI
PCI/MSI: Deal with devices lying about their MSI mask capability
PCI/MSI: Destroy sysfs before freeing entries
parisc/entry: fix trace test in syscall exit path
x86/iopl: Fake iopl(3) CLI/STI usage
net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
net: stmmac: fix issue where clk is being unprepared twice
net: stmmac: fix system hang if change mac address after interface ifdown
net: stmmac: fix missing unlock on error in stmmac_suspend()
net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP
net: stmmac: add clocks management for gmac driver
bootconfig: init: Fix memblock leak in xbc_make_cmdline()
loop: Use blk_validate_block_size() to validate block size
block: Add a helper to validate the block size
fortify: Explicitly disable Clang support
Revert "tcp: switch orphan_count to bare per-cpu counters"
Revert "net: sched: update default qdisc visibility after Tx queue cnt changes"
Revert "serial: core: Fix initializing and restoring termios speed"
Linux 5.10.80
soc/tegra: pmc: Fix imbalanced clock disabling in error code path
x86/sev: Make the #VC exception stacks part of the default stacks storage
x86/sev: Add an x86 version of cc_platform_has()
arch/cc: Introduce a function to check for confidential computing features
selftests/bpf: Fix also no-alu32 strobemeta selftest
mmc: moxart: Fix null pointer dereference on pointer host
ath10k: fix invalid dma_addr_t token assignment
SUNRPC: Partial revert of commit 6f9f17287e
PCI: aardvark: Fix PCIe Max Payload Size setting
PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros
drm/sun4i: Fix macros in sun8i_csc.h
powerpc/85xx: fix timebase sync issue when CONFIG_HOTPLUG_CPU=n
powerpc/powernv/prd: Unregister OPAL_MSG_PRD2 notifier during module unload
mtd: rawnand: au1550nd: Keep the driver compatible with on-die ECC engines
mtd: rawnand: plat_nand: Keep the driver compatible with on-die ECC engines
mtd: rawnand: orion: Keep the driver compatible with on-die ECC engines
mtd: rawnand: pasemi: Keep the driver compatible with on-die ECC engines
mtd: rawnand: gpio: Keep the driver compatible with on-die ECC engines
mtd: rawnand: mpc5121: Keep the driver compatible with on-die ECC engines
mtd: rawnand: xway: Keep the driver compatible with on-die ECC engines
mtd: rawnand: ams-delta: Keep the driver compatible with on-die ECC engines
s390/cio: make ccw_device_dma_* more robust
s390/ap: Fix hanging ioctl caused by orphaned replies
s390/tape: fix timer initialization in tape_std_assign()
s390/cio: check the subchannel validity for dev_busid
video: backlight: Drop maximum brightness override for brightness zero
mfd: dln2: Add cell for initializing DLN2 ADC
mm, oom: do not trigger out_of_memory from the #PF
mm, oom: pagefault_out_of_memory: don't force global OOM for dying tasks
powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC
powerpc/security: Add a helper to query stf_barrier type
powerpc/bpf: Validate branch ranges
powerpc/lib: Add helper to check if offset is within conditional branch range
memcg: prohibit unconditional exceeding the limit of dying tasks
9p/net: fix missing error check in p9_check_errors
net, neigh: Enable state migration between NUD_PERMANENT and NTF_USE
f2fs: should use GFP_NOFS for directory inodes
irqchip/sifive-plic: Fixup EOI failed when masked
posix-cpu-timers: Clear task::posix_cputimers_work in copy_process()
x86/mce: Add errata workaround for Skylake SKX37
MIPS: Fix assembly error from MIPSr2 code used within MIPS_ISA_ARCH_LEVEL
parisc: Fix backtrace to always include init funtion names
ARM: 9156/1: drop cc-option fallbacks for architecture selection
ARM: 9155/1: fix early early_iounmap()
selftests/net: udpgso_bench_rx: fix port argument
cxgb4: fix eeprom len when diagnostics not implemented
net/smc: fix sk_refcnt underflow on linkdown and fallback
vsock: prevent unnecessary refcnt inc for nonblocking connect
net: stmmac: allow a tc-taprio base-time of zero
net: hns3: allow configure ETS bandwidth of all TCs
net: hns3: fix kernel crash when unload VF while it is being reset
net/sched: sch_taprio: fix undefined behavior in ktime_mono_to_any
seq_file: fix passing wrong private data
gve: Fix off by one in gve_tx_timeout()
bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding
bpf, sockmap: Remove unhash handler for BPF sockmap usage
arm64: pgtable: make __pte_to_phys/__phys_to_pte_val inline functions
nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails
llc: fix out-of-bound array index in llc_sk_dev_hash()
perf bpf: Add missing free to bpf_event__print_bpf_prog_info()
zram: off by one in read_block_state()
mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and zs_unregister_migration()
can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251xfd_chip_rx_int_enable()
mfd: core: Add missing of_node_put for loop iteration
bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed
net: phy: fix duplex out of sync problem while changing settings
drm/nouveau/svm: Fix refcount leak bug and missing check against null bug
ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses
ice: Fix not stopping Tx queues for VFs
ice: Fix replacing VF hardware MAC to existing MAC filter
net: vlan: fix a UAF in vlan_dev_real_dev()
openrisc: fix SMP tlb flush NULL pointer dereference
ethtool: fix ethtool msg len calculation for pause stats
net: davinci_emac: Fix interrupt pacing disable
xen-pciback: Fix return in pm_ctrl_init()
i2c: xlr: Fix a resource leak in the error handling path of 'xlr_i2c_probe()'
NFSv4: Fix a regression in nfs_set_open_stateid_locked()
scsi: qla2xxx: Turn off target reset during issue_lip
scsi: qla2xxx: Fix gnl list corruption
scsi: qla2xxx: Relogin during fabric disturbance
scsi: qla2xxx: Changes to support FCP2 Target
ar7: fix kernel builds for compiler test
watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT
m68k: set a default value for MEMORY_RESERVE
signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL)
dmaengine: dmaengine_desc_callback_valid(): Check for `callback_result`
netfilter: nfnetlink_queue: fix OOB when mac header was cleared
soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read
auxdisplay: ht16k33: Fix frame buffer device blanking
auxdisplay: ht16k33: Connect backlight to fbdev
auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string
Fix user namespace leak
NFS: Fix an Oops in pnfs_mark_request_commit()
NFS: Fix up commit deadlocks
dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro
rtc: rv3032: fix error handling in rv3032_clkout_set_rate()
remoteproc: Fix a memory leak in an error handling path in 'rproc_handle_vdev()'
mtd: core: don't remove debugfs directory if device is in use
PCI: uniphier: Serialize INTx masking/unmasking and fix the bit operation
mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare()
fs: orangefs: fix error return code of orangefs_revalidate_lookup()
NFS: Fix deadlocks in nfs_scan_commit_list()
opp: Fix return in _opp_add_static_v2()
PCI: aardvark: Fix preserving PCI_EXP_RTCTL_CRSSVE flag on emulated bridge
PCI: aardvark: Don't spam about PIO Response Status
drm/plane-helper: fix uninitialized variable reference
pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds
NFS: Fix dentry verifier races
i2c: mediatek: fixing the incorrect register offset
nfsd: don't alloc under spinlock in rpc_parse_scope_id
rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined
apparmor: fix error check
power: supply: bq27xxx: Fix kernel crash on IRQ handler register error
mips: cm: Convert to bitfield API to fix out-of-bounds access
virtio_ring: check desc == NULL when using indirect with packed
ASoC: cs42l42: Correct configuring of switch inversion from ts-inv
ASoC: cs42l42: Use device_property API instead of of_property
ASoC: cs42l42: Disable regulators if probe fails
powerpc/44x/fsp2: add missing of_node_put
HID: u2fzero: properly handle timeouts in usb_submit_urb
HID: u2fzero: clarify error check and length calculations
clk: at91: sam9x60-pll: use DIV_ROUND_CLOSEST_ULL
serial: xilinx_uartps: Fix race condition causing stuck TX
phy: qcom-snps: Correct the FSEL_MASK
phy: ti: gmii-sel: check of_get_address() for failure
phy: qcom-qusb2: Fix a memory leak on probe
pinctrl: equilibrium: Fix function addition in multiple groups
soc: qcom: apr: Add of_node_put() before return
firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()
usb: dwc2: drd: reset current session before setting the new one
usb: dwc2: drd: fix dwc2_drd_role_sw_set when clock could be disabled
usb: dwc2: drd: fix dwc2_force_mode call in dwc2_ovr_init
serial: imx: fix detach/attach of serial console
scsi: ufs: ufshcd-pltfrm: Fix memory leak due to probe defer
scsi: ufs: Refactor ufshcd_setup_clocks() to remove skip_ref_clk
iio: adis: do not disabe IRQs in 'adis_init()'
usb: typec: STUSB160X should select REGMAP_I2C
soc: qcom: rpmhpd: Make power_on actually enable the domain
soc: qcom: rpmhpd: Provide some missing struct member descriptions
ASoC: cs42l42: Defer probe if request_threaded_irq() returns EPROBE_DEFER
ASoC: cs42l42: Correct some register default values
ARM: dts: stm32: fix AV96 board SAI2 pin muxing on stm32mp15
ARM: dts: stm32: fix SAI sub nodes register range
ARM: dts: stm32: Reduce DHCOR SPI NOR frequency to 50 MHz
pinctrl: renesas: checker: Fix off-by-one bug in drive register check
staging: ks7010: select CRYPTO_HASH/CRYPTO_MICHAEL_MIC
staging: most: dim2: do not double-register the same device
usb: musb: select GENERIC_PHY instead of depending on it
RDMA/mlx4: Return missed an error if device doesn't support steering
scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()
power: supply: max17040: fix null-ptr-deref in max17040_probe()
power: supply: rt5033_battery: Change voltage values to µV
usb: gadget: hid: fix error code in do_config()
serial: 8250_dw: Drop wrong use of ACPI_PTR()
powerpc: fix unbalanced node refcount in check_kvm_guest()
powerpc: Fix is_kvm_guest() / kvm_para_available()
powerpc: Reintroduce is_kvm_guest() as a fast-path check
powerpc: Rename is_kvm_guest() to check_kvm_guest()
powerpc: Refactor is_kvm_guest() declaration to new header
video: fbdev: chipsfb: use memset_io() instead of memset()
clk: at91: check pmc node status before registering syscore ops
memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe
soc/tegra: Fix an error handling path in tegra_powergate_power_up()
ASoC: SOF: topology: do not power down primary core during topology removal
arm: dts: omap3-gta04a4: accelerometer irq fix
driver core: Fix possible memory leak in device_link_add()
scsi: pm80xx: Fix misleading log statement in pm8001_mpi_get_nvmd_resp()
soundwire: debugfs: use controller id and link_id for debugfs
ALSA: hda: Use position buffer for SKL+ again
ALSA: hda: Fix hang during shutdown due to link reset
ALSA: hda: Release controller display power during shutdown/reboot
ALSA: hda: Reduce udelay() at SKL+ position reporting
arm64: dts: qcom: pm8916: Remove wrong reg-names for rtc@6000
arm64: dts: renesas: beacon: Fix Ethernet PHY mode
arm64: dts: qcom: msm8916: Fix Secondary MI2S bit clock
JFS: fix memleak in jfs_mount
MIPS: loongson64: make CPU_LOONGSON64 depends on MIPS_FP_SUPPORT
scsi: dc395: Fix error case unwinding
ARM: dts: at91: tse850: the emac<->phy interface is rmii
bus: ti-sysc: Fix timekeeping_suspended warning on resume
arm64: dts: meson-g12b: Fix the pwm regulator supply properties
arm64: dts: meson-g12a: Fix the pwm regulator supply properties
arm64: dts: ti: k3-j721e-main: Fix "bus-range" upto 256 bus number for PCIe
arm64: dts: ti: k3-j721e-main: Fix "max-virtual-functions" in PCIe EP nodes
RDMA/bnxt_re: Fix query SRQ failure
ARM: dts: qcom: msm8974: Add xo_board reference clock to DSI0 PHY
arm64: dts: rockchip: Fix GPU register width for RK3328
ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc()
clk: mvebu: ap-cpu-clk: Fix a memory leak in error handling paths
ARM: dts: BCM5301X: Fix memory nodes names
RDMA/rxe: Fix wrong port_cap_flags
iio: st_sensors: disable regulators after device unregistration
iio: st_sensors: Call st_sensors_power_enable() from bus drivers
of: unittest: fix EXPECT text for gpio hog errors
bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit.
bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off.
cgroup: Fix rootcg cpu.stat guest double counting
ibmvnic: Process crqs after enabling interrupts
ibmvnic: don't stop queue in xmit
udp6: allow SO_MARK ctrl msg to affect routing
selftests/bpf: Fix fclose/pclose mismatch in test_progs
crypto: pcrypt - Delay write to padata->info
net: phylink: avoid mvneta warning when setting pause parameters
net: amd-xgbe: Toggle PLL settings during rate change
selftests/bpf: Fix fd cleanup in sk_lookup test
selftests: bpf: Convert sk_lookup ctx access tests to PROG_TEST_RUN
drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
wcn36xx: Fix discarded frames due to wrong sequence number
wcn36xx: add proper DMA memory barriers in rx path
libertas: Fix possible memory leak in probe and disconnect
libertas_tf: Fix possible memory leak in probe and disconnect
KVM: s390: Fix handle_sske page fault handling
samples/kretprobes: Fix return value if register_kretprobe() failed
spi: spi-rpc-if: Check return value of rpcif_sw_init()
tcp: don't free a FIN sk_buff in tcp_remove_empty_skb()
libbpf: Fix endianness detection in BPF_CORE_READ_BITFIELD_PROBED()
tpm_tis_spi: Add missing SPI ID
tpm: fix Atmel TPM crash caused by too frequent queries
irq: mips: avoid nested irq_enter()
KVM: s390: pv: avoid stalls for kvm_s390_pv_init_vm
KVM: s390: pv: avoid double free of sida page
s390/gmap: don't unconditionally call pte_unmap_unlock() in __gmap_zap()
libbpf: Fix BTF header parsing checks
libbpf: Fix overflow in BTF sanity checks
libbpf: Allow loading empty BTFs
libbpf: Fix BTF data layout checks and allow empty BTF
bpftool: Avoid leaking the JSON writer prepared for program metadata
KVM: selftests: Fix nested SVM tests when built with clang
KVM: selftests: Add operand to vmsave/vmload/vmrun in svm.c
smackfs: use netlbl_cfg_cipsov4_del() for deleting cipso_v4_doi
drm/msm: Fix potential NULL dereference in DPU SSPP
x86/sev: Fix stack type check in vc_switch_off_ist()
clocksource/drivers/timer-ti-dm: Select TIMER_OF
PM: hibernate: fix sparse warnings
nvme-rdma: fix error code in nvme_rdma_setup_ctrl
phy: micrel: ksz8041nl: do not use power down mode
net: enetc: unmap DMA in enetc_send_cmd()
mwifiex: Send DELBA requests according to spec
rsi: stop thread firstly in rsi_91x_init() error handling
mt76: mt7915: fix muar_idx in mt7915_mcu_alloc_sta_req()
mt76: mt7915: fix sta_rec_wtbl tag len
mt76: mt7915: fix possible infinite loop release semaphore
mt76: mt76x02: fix endianness warnings in mt76x02_mac.c
mt76: mt7615: fix endianness warning in mt7615_mac_write_txwi
platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
mmc: mxs-mmc: disable regulator on error and in the remove function
media: ir_toy: assignment to be16 should be of correct type
net: stream: don't purge sk_error_queue in sk_stream_kill_queues()
drm/msm: uninitialized variable in msm_gem_import()
drm/msm: potential error pointer dereference in init()
tcp: switch orphan_count to bare per-cpu counters
kernel/sched: Fix sched_fork() access an invalid sched_task_group
ath10k: fix max antenna gain unit
hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff
hwmon: Fix possible memleak in __hwmon_device_register()
net, neigh: Fix NTF_EXT_LEARNED in combination with NTF_USE
memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host()
memstick: avoid out-of-range warning
mmc: sdhci-omap: Fix context restore
mmc: sdhci-omap: Fix NULL pointer exception if regulator is not configured
gve: Recover from queue stall due to missed IRQ
b43: fix a lower bounds test
b43legacy: fix a lower bounds test
hwrng: mtk - Force runtime pm ops for sleep ops
crypto: qat - disregard spurious PFVF interrupts
crypto: qat - detect PFVF collision after ACK
media: dvb-frontends: mn88443x: Handle errors of clk_prepare_enable()
netfilter: nft_dynset: relax superfluous check on set updates
rcu: Always inline rcu_dynticks_task*_{enter,exit}()
EDAC/amd64: Handle three rank interleaving mode
PM: EM: Fix inefficient states detection
ath9k: Fix potential interrupt storm on queue reset
media: em28xx: Don't use ops->suspend if it is NULL
cpuidle: Fix kobject memory leaks in error paths
crypto: ecc - fix CRYPTO_DEFAULT_RNG dependency
kprobes: Do not use local variable when creating debugfs file
media: cx23885: Fix snd_card_free call on null card pointer
media: tm6000: Avoid card name truncation
media: si470x: Avoid card name truncation
media: radio-wl1273: Avoid card name truncation
media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()'
media: TDA1997x: handle short reads of hdmi info frame.
media: v4l2-ioctl: S_CTRL output the right value
media: dvb-usb: fix ununit-value in az6027_rc_query
media: cxd2880-spi: Fix a null pointer dereference on error handling path
media: em28xx: add missing em28xx_close_extension
drm/amdgpu: fix warning for overflow check
arm64: mm: update max_pfn after memory hotplug
drm/ttm: stop calling tt_swapin in vm_access
ath10k: sdio: Add missing BH locking around napi_schdule()
ath10k: Fix missing frame timestamp for beacon/probe-resp
ath11k: Fix memory leak in ath11k_qmi_driver_event_work
ath11k: fix packet drops due to incorrect 6 GHz freq value in rx status
ath11k: Avoid race during regd updates
ath11k: fix some sleeping in atomic bugs
net: dsa: rtl8366rb: Fix off-by-one bug
rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()
crypto: caam - disable pkc for non-E SoCs
Bluetooth: btmtkuart: fix a memleak in mtk_hci_wmt_sync
wilc1000: fix possible memory leak in cfg_scan_result()
wcn36xx: Fix Antenna Diversity Switching
cgroup: Make rebind_subsystems() disable v2 controllers all at once
net: net_namespace: Fix undefined member in key_remove_domain()
lockdep: Let lock_is_held_type() detect recursive read as read
virtio-gpu: fix possible memory allocation failure
drm/v3d: fix wait for TMU write combiner flush
objtool: Fix static_call list generation
x86/xen: Mark cpu_bringup_and_idle() as dead_end_function
objtool: Add xen_start_kernel() to noreturn list
MIPS: lantiq: dma: fix burst length for DEU
rcu: Fix existing exp request check in sync_sched_exp_online_cleanup()
Bluetooth: fix init and cleanup of sco_conn.timeout_work
selftests/bpf: Fix strobemeta selftest regression
netfilter: conntrack: set on IPS_ASSURED if flows enters internal stream state
parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling
parisc/unwind: fix unwinder when CONFIG_64BIT is enabled
erofs: don't trigger WARN() when decompression fails
task_stack: Fix end_of_stack() for architectures with upwards-growing stack
parisc: fix warning in flush_tlb_all
selftests/core: fix conflicting types compile error for close_range()
drm/amd/display: dcn20_resource_construct reduce scope of FPU enabled
x86/hyperv: Protect set_hv_tscchange_cb() against getting preempted
wcn36xx: Correct band/freq reporting on RX
spi: bcm-qspi: Fix missing clk_disable_unprepare() on error in bcm_qspi_probe()
btrfs: do not take the uuid_mutex in btrfs_rm_device
btrfs: reflink: initialize return value to 0 in btrfs_extent_same()
ACPI: AC: Quirk GK45 to skip reading _PSR
net: annotate data-race in neigh_output()
vrf: run conntrack only in context of lower/physdev for locally generated packets
ARM: 9136/1: ARMv7-M uses BE-8, not BE-32
gfs2: Fix glock_hash_walk bugs
gfs2: Cancel remote delete work asynchronously
gre/sit: Don't generate link-local addr if addr_gen_mode is IN6_ADDR_GEN_MODE_NONE
ARM: clang: Do not rely on lr register for stacktrace
smackfs: use __GFP_NOFAIL for smk_cipso_doi()
iwlwifi: mvm: disable RX-diversity in powersave
selftests/bpf: Fix perf_buffer test on system with offline cpus
selftests: kvm: fix mismatched fclose() after popen()
PM: hibernate: Get block device exclusively in swsusp_check()
nvme: drop scan_lock and always kick requeue list when removing namespaces
nvmet-tcp: fix use-after-free when a port is removed
nvmet-rdma: fix use-after-free when a port is removed
nvmet: fix use-after-free when a port is removed
media: allegro: ignore interrupt if mailbox is not initialized
block: remove inaccurate requeue check
mwl8k: Fix use-after-free in mwl8k_fw_state_machine()
mt76: mt7915: fix an off-by-one bound check
tracing/cfi: Fix cmp_entries_* functions signature mismatch
workqueue: make sysfs of unbound kworker cpumask more clever
lib/xz: Validate the value before assigning it to an enum variable
lib/xz: Avoid overlapping memcpy() with invalid input with in-place decompression
memstick: r592: Fix a UAF bug when removing the driver
md: update superblock after changing rdev flags in state_store
block: bump max plugged deferred size from 16 to 32
drm/msm: prevent NULL dereference in msm_gpu_crashstate_capture()
leaking_addresses: Always print a trailing newline
net: phy: micrel: make *-skew-ps check more lenient
drm/amdkfd: fix resume error when iommu disabled in Picasso
ACPI: battery: Accept charges over the design capacity as full
iov_iter: Fix iov_iter_get_pages{,_alloc} page fault return value
mmc: moxart: Fix reference count leaks in moxart_probe
ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create()
tracefs: Have tracefs directories not set OTH permission bits by default
net-sysfs: try not to restart the syscall if it will fail eventually
media: usb: dvd-usb: fix uninit-value bug in dibusb_read_eeprom_byte()
media: ipu3-imgu: VIDIOC_QUERYCAP: Fix bus_info
media: ipu3-imgu: imgu_fmt: Handle properly try
ACPICA: Avoid evaluating methods too early during system resume
fs/proc/uptime.c: Fix idle time reporting in /proc/uptime
ipmi: Disable some operations during a panic
media: rcar-csi2: Add checking to rcsi2_start_receiver()
brcmfmac: Add DMI nvram filename quirk for Cyberbook T116 tablet
rtw88: fix RX clock gate setting while fifo dump
ia64: don't do IA64_CMPXCHG_DEBUG without CONFIG_PRINTK
media: mceusb: return without resubmitting URB in case of -EPROTO error.
media: imx: set a media_device bus_info string
media: s5p-mfc: Add checking to s5p_mfc_probe().
media: s5p-mfc: fix possible null-pointer dereference in s5p_mfc_probe()
media: uvcvideo: Set unique vdev name based in type
media: uvcvideo: Return -EIO for control errors
media: uvcvideo: Set capability in s_param
media: stm32: Potential NULL pointer dereference in dcmi_irq_thread()
media: atomisp: Fix error handling in probe
media: netup_unidvb: handle interrupt properly according to the firmware
media: mt9p031: Fix corrupted frame after restarting stream
ath10k: high latency fixes for beacon buffer
ath11k: Change DMA_FROM_DEVICE to DMA_TO_DEVICE when map reinjected packets
ath11k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED
ath11k: Avoid reg rules update during firmware recovery
drm/amdgpu: Fix MMIO access page fault
fscrypt: allow 256-bit master keys with AES-256-XTS
mwifiex: Properly initialize private structure on interface type changes
mwifiex: Run SET_BSS_MODE when changing from P2P to STATION vif-type
x86: Increase exception stack sizes
ath11k: Align bss_chan_info structure with firmware
smackfs: Fix use-after-free in netlbl_catmap_walk()
rcu-tasks: Move RTGS_WAIT_CBS to beginning of rcu_tasks_kthread() loop
net: sched: update default qdisc visibility after Tx queue cnt changes
locking/lockdep: Avoid RCU-induced noinstr fail
MIPS: lantiq: dma: reset correct number of channel
MIPS: lantiq: dma: add small delay after reset
platform/x86: wmi: do not fail if disabling fails
rcutorture: Avoid problematic critical section nesting on PREEMPT_RT
drm/panel-orientation-quirks: add Valve Steam Deck
Bluetooth: fix use-after-free error in lock_sock_nested()
Bluetooth: sco: Fix lock_sock() blockage by memcpy_from_msg()
drm: panel-orientation-quirks: Add quirk for the Samsung Galaxy Book 10.6
drm: panel-orientation-quirks: Add quirk for KD Kurio Smart C15200 2-in-1
drm: panel-orientation-quirks: Update the Lenovo Ideapad D330 quirk (v2)
dma-buf: WARN on dmabuf release with pending attachments
power: supply: max17042_battery: Clear status bits in interrupt handler
USB: chipidea: fix interrupt deadlock
USB: iowarrior: fix control-message timeouts
most: fix control-message timeouts
serial: 8250: fix racy uartclk update
USB: serial: keyspan: fix memleak on probe errors
iio: ad5770r: make devicetree property reading consistent
iio: dac: ad5446: Fix ad5622_write() return value
coresight: cti: Correct the parameter for pm_runtime_put
pinctrl: core: fix possible memory leak in pinctrl_enable()
quota: correct error number in free_dqentry()
quota: check block number when reading the block in quota file
PCI: aardvark: Fix support for PCI_ROM_ADDRESS1 on emulated bridge
PCI: aardvark: Set PCI Bridge Class Code to PCI Bridge
PCI: aardvark: Fix support for PCI_BRIDGE_CTL_BUS_RESET on emulated bridge
PCI: aardvark: Fix support for bus mastering and PCI_COMMAND on emulated bridge
PCI: aardvark: Read all 16-bits from PCIE_MSI_PAYLOAD_REG
PCI: aardvark: Fix return value of MSI domain .alloc() method
PCI: aardvark: Fix configuring Reference clock
PCI: aardvark: Fix reporting Data Link Layer Link Active
PCI: aardvark: Do not unmask unused interrupts
PCI: aardvark: Fix checking for link up via LTSSM state
PCI: aardvark: Do not clear status bits of masked interrupts
PCI: cadence: Add cdns_plat_pcie_probe() missing return
PCI: pci-bridge-emul: Fix emulation of W1C bits
ovl: fix use after free in struct ovl_aio_req
xen/balloon: add late_initcall_sync() for initial ballooning done
ALSA: mixer: fix deadlock in snd_mixer_oss_set_volume
ALSA: mixer: oss: Fix racy access to slots
ifb: fix building without CONFIG_NET_CLS_ACT
serial: core: Fix initializing and restoring termios speed
ring-buffer: Protect ring_buffer_reset() from reentrancy
powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found
can: j1939: j1939_can_recv(): ignore messages with invalid source address
can: j1939: j1939_tp_cmd_recv(): ignore abort message in the BAM transport
KVM: nVMX: Query current VMCS when determining if MSR bitmaps are in use
KVM: arm64: Extract ESR_ELx.EC only
power: supply: max17042_battery: use VFSOC for capacity when no rsns
power: supply: max17042_battery: Prevent int underflow in set_soc_threshold
mtd: rawnand: socrates: Keep the driver compatible with on-die ECC engines
soc: fsl: dpio: use the combined functions to protect critical zone
soc: fsl: dpio: replace smp_processor_id with raw_smp_processor_id
signal/mips: Update (_save|_restore)_fp_context to fail with -EFAULT
memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode
signal: Remove the bogus sigkill_pending in ptrace_stop
RDMA/qedr: Fix NULL deref for query_qp on the GSI QP
perf/x86/intel/uncore: Fix Intel ICX IIO event constraints
perf/x86/intel/uncore: Support extra IMC channel on Ice Lake server
rsi: Fix module dev_oper_mode parameter description
rsi: fix rate mask set leading to P2P failure
rsi: fix key enabled check causing unwanted encryption for vap_id > 0
rsi: fix occasional initialisation failure with BT coex
wcn36xx: handle connection loss indication
libata: fix checking of DMA state
mwifiex: Try waking the firmware until we get an interrupt
mwifiex: Read a PCI register after writing the TX ring write pointer
PM: sleep: Do not let "syscore" devices runtime-suspend during system transitions
wcn36xx: Fix (QoS) null data frame bitrate/modulation
wcn36xx: Fix tx_status mechanism
wcn36xx: Fix HT40 capability for 2Ghz band
ifb: Depend on netfilter alternatively to tc
evm: mark evm_fixmode as __ro_after_init
rtl8187: fix control-message timeouts
PCI: Mark Atheros QCA6174 to avoid bus reset
ath10k: fix division by zero in send path
ath10k: fix control-message timeout
ath6kl: fix control-message timeout
ath6kl: fix division by zero in send path
mwifiex: fix division by zero in fw download path
EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell
regulator: dt-bindings: samsung,s5m8767: correct s5m8767,pmic-buck-default-dvs-idx property
regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled
hwmon: (pmbus/lm25066) Add offset coefficients
selinux: fix race condition when computing ocontext SIDs
ia64: kprobes: Fix to pass correct trampoline address to the handler
KVM: VMX: Unregister posted interrupt wakeup handler on hardware unsetup
btrfs: call btrfs_check_rw_degradable only if there is a missing device
btrfs: fix lost error handling when replaying directory deletes
btrfs: clear MISSING device status bit in btrfs_close_one_device
rds: stop using dmapool
net/smc: Correct spelling mistake to TCPF_SYN_RECV
net/smc: Fix smc_link->llc_testlink_time overflow
nfp: bpf: relax prog rejection for mtu check through max_pkt_offset
vmxnet3: do not stop tx queues after netif_device_detach()
r8169: Add device 10ec:8162 to driver r8169
nvmet-tcp: fix header digest verification
block: schedule queue restart after BLK_STS_ZONE_RESOURCE
drm: panel-orientation-quirks: Add quirk for GPD Win3
watchdog: Fix OMAP watchdog early handling
net: multicast: calculate csum of looped-back and forwarded packets
spi: spl022: fix Microwire full duplex mode
nvmet-tcp: fix a memory leak when releasing a queue
xen/netfront: stop tx queues during live migration
gpio: mlxbf2.c: Add check for bgpio_init failure
bpf: Prevent increasing bpf_jit_limit above max
bpf: Define bpf_jit_alloc_exec_limit for arm64 JIT
fcnal-test: kill hanging ping/nettest binaries on cleanup
drm: panel-orientation-quirks: Add quirk for Aya Neo 2021
mmc: winbond: don't build on M68K
reset: socfpga: add empty driver allowing consumers to probe
ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode
hyperv/vmbus: include linux/bitops.h
sfc: Don't use netif_info before net_device setup
sfc: Export fibre-specific supported link modes
cavium: Fix return values of the probe function
mISDN: Fix return values of the probe function
scsi: qla2xxx: Fix unmap of already freed sgl
scsi: qla2xxx: Return -ENOMEM if kzalloc() fails
cavium: Return negative value when pci_alloc_irq_vectors() fails
ALSA: hda/realtek: Fixes HP Spectre x360 15-eb1xxx speakers
ASoC: soc-core: fix null-ptr-deref in snd_soc_del_component_unlocked()
x86/irq: Ensure PI wakeup handler is unregistered before module unload
x86/cpu: Fix migration safety with X86_BUG_NULL_SEL
x86/sme: Use #define USE_EARLY_PGTABLE_L5 in mem_encrypt_identity.c
fuse: fix page stealing
ext4: refresh the ext4_ext_path struct after dropping i_data_sem.
ext4: ensure enough credits in ext4_ext_shift_path_extents
ext4: fix lazy initialization next schedule time computation in more granular unit
ALSA: timer: Unconditionally unlink slave instances, too
ALSA: timer: Fix use-after-free problem
ALSA: synth: missing check for possible NULL after the call to kstrdup
ALSA: hda: Free card instance properly at probe errors
ALSA: usb-audio: Add registration quirk for JBL Quantum 400
ALSA: usb-audio: Line6 HX-Stomp XL USB_ID for 48k-fixed quirk
ALSA: line6: fix control and interrupt message timeouts
ALSA: 6fire: fix control and bulk message timeouts
ALSA: ua101: fix division by zero at probe
ALSA: hda/realtek: Add quirk for HP EliteBook 840 G7 mute LED
ALSA: hda/realtek: Add quirk for ASUS UX550VE
ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N
ALSA: hda/realtek: Headset fixup for Clevo NH77HJQ
ALSA: hda/realtek: Add quirk for Clevo PC70HS
ALSA: hda/realtek: Add a quirk for HP OMEN 15 mute LED
ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14
media: v4l2-ioctl: Fix check_ext_ctrls
media: ir-kbd-i2c: improve responsiveness of hauppauge zilog receivers
media: rkvdec: Support dynamic resolution changes
media: ite-cir: IR receiver stop working after receive overflow
media: rkvdec: Do not override sizeimage for output format
crypto: s5p-sss - Add error handling in s5p_aes_probe()
firmware/psci: fix application of sizeof to pointer
tpm: Check for integer overflow in tpm2_map_response_body()
parisc: Fix ptrace check on syscall return
parisc: Fix set_fixmap() on PA1.x CPUs
exfat: fix incorrect loading of i_blocks for large files
mmc: dw_mmc: Dont wait for DRTO on Write RSP error
mmc: mtk-sd: Add wait dma stop done flow
scsi: qla2xxx: Fix use after free in eh_abort path
scsi: qla2xxx: Fix kernel crash when accessing port_speed sysfs file
scsi: core: Remove command size deduction from scsi_setup_scsi_cmnd()
ocfs2: fix data corruption on truncate
libata: fix read log timeout value
Input: i8042 - Add quirk for Fujitsu Lifebook T725
Input: elantench - fix misreporting trackpoint coordinates
Input: iforce - fix control-message timeout
binder: use cred instead of task for getsecid
binder: use cred instead of task for selinux checks
binder: use euid from cred instead of using task
usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
ANDROID: GKI: fix up abi break in ehci code
Linux 5.10.79
rsi: fix control-message timeout
media: staging/intel-ipu3: css: Fix wrong size comparison imgu_css_fw_init
staging: rtl8192u: fix control-message timeouts
staging: r8712u: fix control-message timeout
comedi: vmk80xx: fix bulk and interrupt message timeouts
comedi: vmk80xx: fix bulk-buffer overflow
comedi: vmk80xx: fix transfer-buffer overflows
comedi: ni_usb6501: fix NULL-deref in command paths
comedi: dt9812: fix DMA buffers on stack
isofs: Fix out of bound access for corrupted isofs image
staging: rtl8712: fix use-after-free in rtl8712_dl_fw
printk/console: Allow to disable console output by using console="" or console=null
binder: don't detect sender/target during buffer cleanup
usb-storage: Add compatibility quirk flags for iODD 2531/2541
usb: musb: Balance list entry in musb_gadget_queue
usb: gadget: Mark USB_FSL_QE broken on 64-bit
usb: ehci: handshake CMD_RUN instead of STS_HALT
Revert "x86/kvm: fix vcpu-id indexed array sizes"
KVM: x86: avoid warning with -Wbitwise-instead-of-logical
Linux 5.10.78
ALSA: usb-audio: Add Audient iD14 to mixer map quirk table
ALSA: usb-audio: Add Schiit Hel device to mixer map quirk table
Revert "wcn36xx: Disable bmps when encryption is disabled"
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Revert "drm/ttm: fix memleak in ttm_transfered_destroy"
mm: khugepaged: skip huge page collapse for special files
Revert "usb: core: hcd: Add support for deferring roothub registration"
Revert "xhci: Set HCD flag to defer primary roothub registration"
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
net: ethernet: microchip: lan743x: Fix skb allocation failure
vrf: Revert "Reset skb conntrack connection..."
sfc: Fix reading non-legacy supported link modes
Revert "io_uring: reinforce cancel on flush during exit"
scsi: core: Put LLD module refcnt after SCSI device is released
ANDROID: GKI: fix up abi breakage from "cfg80211: fix management registrations locking"
Linux 5.10.77
perf script: Check session->header.env.arch before using it
riscv: Fix asan-stack clang build
riscv: fix misalgned trap vector base address
scsi: ufs: ufs-exynos: Correct timeout value setting registers
KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu
KVM: s390: clear kicked_mask before sleeping again
lan743x: fix endianness when accessing descriptors
sctp: add vtag check in sctp_sf_ootb
sctp: add vtag check in sctp_sf_do_8_5_1_E_sa
sctp: add vtag check in sctp_sf_violation
sctp: fix the processing for COOKIE_ECHO chunk
sctp: fix the processing for INIT_ACK chunk
sctp: use init_tag from inithdr for ABORT chunk
phy: phy_ethtool_ksettings_set: Lock the PHY while changing settings
phy: phy_start_aneg: Add an unlocked version
phy: phy_ethtool_ksettings_set: Move after phy_start_aneg
phy: phy_ethtool_ksettings_get: Lock the phy for consistency
net/tls: Fix flipped sign in async_wait.err assignment
net: nxp: lpc_eth.c: avoid hang when bringing interface down
net: ethernet: microchip: lan743x: Fix dma allocation failure by using dma_set_mask_and_coherent
net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
mlxsw: pci: Recycle received packet upon allocation failure
nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
gpio: xgs-iproc: fix parsing of ngpios property
RDMA/sa_query: Use strscpy_pad instead of memcpy to copy a string
net: Prevent infinite while loop in skb_tx_hash()
cfg80211: correct bridge/4addr mode check
net-sysfs: initialize uid and gid before calling net_ns_get_ownership
net: batman-adv: fix error handling
regmap: Fix possible double-free in regcache_rbtree_exit()
reset: brcmstb-rescal: fix incorrect polarity of status bit
arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node
RDMA/mlx5: Set user priority for DCT
octeontx2-af: Display all enabled PF VF rsrc_alloc entries.
nvme-tcp: fix possible req->offset corruption
nvme-tcp: fix data digest pointer calculation
nvmet-tcp: fix data digest pointer calculation
IB/hfi1: Fix abba locking issue with sc_disable()
IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields
bpf: Fix error usage of map_fd and fdget() in generic_map_update_batch()
bpf: Fix potential race in tail call compatibility check
tcp_bpf: Fix one concurrency problem in the tcp_bpf_send_verdict function
riscv, bpf: Fix potential NULL dereference
cgroup: Fix memory leak caused by missing cgroup_bpf_offline
drm/amdgpu: fix out of bounds write
drm/ttm: fix memleak in ttm_transfered_destroy
mm, thp: bail out early in collapse_file for writeback page
net: lan78xx: fix division by zero in send path
cfg80211: fix management registrations locking
cfg80211: scan: fix RCU in cfg80211_add_nontrans_list()
nvme-tcp: fix H2CData PDU send accounting (again)
ocfs2: fix race between searching chunks and release journal_head from buffer_head
mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
mmc: sdhci: Map more voltage level to SDHCI_POWER_330
mmc: dw_mmc: exynos: fix the finding clock sample value
mmc: mediatek: Move cqhci init behind ungate clock
mmc: cqhci: clear HALT state after CQE enable
mmc: vub300: fix control-message timeouts
net/tls: Fix flipped sign in tls_err_abort() calls
Revert "net: mdiobus: Fix memory leak in __mdiobus_register"
nfc: port100: fix using -ERRNO as command type mask
tipc: fix size validations for the MSG_CRYPTO type
ata: sata_mv: Fix the error handling of mv_chip_id()
pinctrl: amd: disable and mask interrupts on probe
Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode"
usbnet: fix error return code in usbnet_probe()
usbnet: sanity check for maxpacket
ext4: fix possible UAF when remounting r/o a mmp-protected file system
arm64: Avoid premature usercopy failure
powerpc/bpf: Fix BPF_MOD when imm == 1
io_uring: don't take uring_lock during iowq cancel
ARM: 9141/1: only warn about XIP address when not compile testing
ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
ARM: 9138/1: fix link warning with XIP + frame-pointer
ARM: 9134/1: remove duplicate memcpy() definition
ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
ARM: 9132/1: Fix __get_user_check failure with ARM KASAN images
Linux 5.10.76
pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume()
ARM: 9122/1: select HAVE_FUTEX_CMPXCHG
selftests: bpf: fix backported ASSERT_FALSE
e1000e: Separate TGP board type from SPT
tracing: Have all levels of checks prevent recursion
net: mdiobus: Fix memory leak in __mdiobus_register
bpf, test, cgroup: Use sk_{alloc,free} for test cases
s390/pci: fix zpci_zdev_put() on reserve
can: isotp: isotp_sendmsg(): fix TX buffer concurrent access in isotp_sendmsg()
scsi: core: Fix shost->cmd_per_lun calculation in scsi_add_host_with_dma()
net: hns3: fix for miscalculation of rx unused desc
sched/scs: Reset the shadow stack when idle_task_exit
scsi: qla2xxx: Fix a memory leak in an error path of qla2x00_process_els()
scsi: iscsi: Fix set_param() handling
Input: snvs_pwrkey - add clk handling
perf/x86/msr: Add Sapphire Rapids CPU support
libperf tests: Fix test_stat_cpu
ALSA: hda: avoid write to STATESTS if controller is in reset
platform/x86: intel_scu_ipc: Update timeout value in comment
isdn: mISDN: Fix sleeping function called from invalid context
ARM: dts: spear3xx: Fix gmac node
net: stmmac: add support for dwmac 3.40a
btrfs: deal with errors when checking if a dir entry exists during log replay
ALSA: hda: intel: Allow repeatedly probing on codec configuration errors
gcc-plugins/structleak: add makefile var for disabling structleak
net: hns3: fix the max tx size according to user manual
drm: mxsfb: Fix NULL pointer dereference crash on unload
net: bridge: mcast: use multicast_membership_interval for IGMPv3
selftests: netfilter: remove stray bash debug line
netfilter: Kconfig: use 'default y' instead of 'm' for bool config option
isdn: cpai: check ctr->cnr to avoid array index out of bound
nfc: nci: fix the UAF of rf_conn_info object
KVM: nVMX: promptly process interrupts delivered while in guest mode
mm, slub: fix incorrect memcg slab count for bulk free
mm, slub: fix potential memoryleak in kmem_cache_open()
mm, slub: fix mismatch between reconstructed freelist depth and cnt
powerpc/idle: Don't corrupt back chain when going idle
KVM: PPC: Book3S HV: Make idle_kvm_start_guest() return 0 if it went to guest
KVM: PPC: Book3S HV: Fix stack handling in idle_kvm_start_guest()
powerpc64/idle: Fix SP offsets when saving GPRs
net: dsa: mt7530: correct ds->num_ports
audit: fix possible null-pointer dereference in audit_filter_rules
ASoC: DAPM: Fix missing kctl change notifications
ALSA: hda/realtek: Add quirk for Clevo PC50HS
ALSA: usb-audio: Provide quirk for Sennheiser GSP670 Headset
vfs: check fd has read access in kernel_read_file_from_fd()
elfcore: correct reference to CONFIG_UML
userfaultfd: fix a race between writeprotect and exit_mmap()
ocfs2: mount fails with buffer overflow in strlen
ocfs2: fix data corruption after conversion from inline format
ceph: fix handling of "meta" errors
ceph: skip existing superblocks that are blocklisted or shut down when mounting
can: j1939: j1939_xtp_rx_rts_session_new(): abort TP less than 9 bytes
can: j1939: j1939_xtp_rx_dat_one(): cancel session if receive TP.DT with error length
can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv
can: j1939: j1939_tp_rxtimer(): fix errant alert in j1939_tp_rxtimer
can: isotp: isotp_sendmsg(): add result check for wait_event_interruptible()
can: isotp: isotp_sendmsg(): fix return error on FC timeout on TX path
can: peak_pci: peak_pci_remove(): fix UAF
can: peak_usb: pcan_usb_fd_decode_status(): fix back to ERROR_ACTIVE state notification
can: rcar_can: fix suspend/resume
net: enetc: fix ethtool counter name for PM0_TERR
drm/panel: ilitek-ili9881c: Fix sync for Feixin K101-IM2BYL02 panel
ice: Add missing E810 device ids
e1000e: Fix packet loss on Tiger Lake and later
net: stmmac: Fix E2E delay mechanism
net: hns3: disable sriov before unload hclge layer
net: hns3: fix vf reset workqueue cannot exit
net: hns3: schedule the polling again when allocation fails
net: hns3: add limit ets dwrr bandwidth cannot be 0
net: hns3: reset DWRR of unused tc to zero
powerpc/smp: do not decrement idle task preempt count in CPU offline
NIOS2: irqflags: rename a redefined register name
net: dsa: lantiq_gswip: fix register definition
ipv6: When forwarding count rx stats on the orig netdev
tcp: md5: Fix overlap between vrf and non-vrf keys
lan78xx: select CRC32
netfilter: ipvs: make global sysctl readonly in non-init netns
netfilter: ip6t_rt: fix rt0_hdr parsing in rt_mt6
ice: fix getting UDP tunnel entry
ASoC: wm8960: Fix clock configuration on slave mode
dma-debug: fix sg checks in debug_dma_map_sg()
netfilter: xt_IDLETIMER: fix panic that occurs when timer_type has garbage value
NFSD: Keep existing listeners on portlist error
xtensa: xtfpga: Try software restart before simulating CPU reset
xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF
drm/amdgpu/display: fix dependencies for DRM_AMD_DC_SI
xen/x86: prevent PVH type from getting clobbered
block: decode QUEUE_FLAG_HCTX_ACTIVE in debugfs output
ARM: dts: at91: sama5d2_som1_ek: disable ISC node by default
arm: dts: vexpress-v2p-ca9: Fix the SMB unit-address
io_uring: fix splice_fd_in checks backport typo
xhci: add quirk for host controllers that don't update endpoint DCS
parisc: math-emu: Fix fall-through warnings
Linux 5.10.75
net: dsa: mv88e6xxx: don't use PHY_DETECT on internal PHY's
ionic: don't remove netdev->dev_addr when syncing uc list
net: mscc: ocelot: warn when a PTP IRQ is raised for an unknown skb
nfp: flow_offload: move flow_indr_dev_register from app init to app start
r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256
qed: Fix missing error code in qed_slowpath_start()
mqprio: Correct stats in mqprio_dump_class_stats().
platform/x86: intel_scu_ipc: Fix busy loop expiry time
acpi/arm64: fix next_platform_timer() section mismatch error
drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()
drm/msm/a6xx: Track current ctx by seqno
drm/msm/mdp5: fix cursor-related warnings
drm/msm: Fix null pointer dereference on pointer edp
drm/edid: In connector_bad_edid() cap num_of_ext by num_blocks read
drm/panel: olimex-lcd-olinuxino: select CRC32
spi: bcm-qspi: clear MSPI spifie interrupt during probe
platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes
platform/mellanox: mlxreg-io: Fix argument base in kstrtou32() call
mlxsw: thermal: Fix out-of-bounds memory accesses
ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators()
pata_legacy: fix a couple uninitialized variable bugs
NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
nfc: fix error handling of nfc_proto_register()
vhost-vdpa: Fix the wrong input in config_cb
ethernet: s2io: fix setting mac address during resume
net: encx24j600: check error in devm_regmap_init_encx24j600
net: dsa: microchip: Added the condition for scheduling ksz_mib_read_work
net: stmmac: fix get_hw_feature() on old hardware
net/mlx5e: Mutually exclude RX-FCS and RX-port-timestamp
net/mlx5e: Fix memory leak in mlx5_core_destroy_cq() error path
net: korina: select CRC32
net: arc: select CRC32
gpio: pca953x: Improve bias setting
sctp: account stream padding length for reconf chunk
nvme-pci: Fix abort command id
ARM: dts: bcm2711-rpi-4-b: Fix pcie0's unit address formatting
ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states
ARM: dts: bcm2711: fix MDIO #address- and #size-cells
ARM: dts: bcm2711-rpi-4-b: Fix usb's unit address
tee: optee: Fix missing devices unregister during optee_remove
iio: dac: ti-dac5571: fix an error code in probe()
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
iio: ssp_sensors: add more range checking in ssp_parse_dataframe()
iio: adc: max1027: Fix the number of max1X31 channels
iio: light: opt3001: Fixed timeout error when 0 lux
iio: mtk-auxadc: fix case IIO_CHAN_INFO_PROCESSED
iio: adc: max1027: Fix wrong shift with 12-bit devices
iio: adc128s052: Fix the error handling path of 'adc128_probe()'
iio: adc: ad7793: Fix IRQ flag
iio: adc: ad7780: Fix IRQ flag
iio: adc: ad7192: Add IRQ flag
driver core: Reject pointless SYNC_STATE_ONLY device links
drivers: bus: simple-pm-bus: Add support for probing simple bus only devices
iio: adc: aspeed: set driver data when adc probe.
powerpc/xive: Discard disabled interrupts in get_irqchip_state()
x86/Kconfig: Do not enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT automatically
nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells
EDAC/armada-xp: Fix output of uncorrectable error counter
virtio: write back F_VERSION_1 before validate
misc: fastrpc: Add missing lock before accessing find_vma()
USB: serial: option: add prod. id for Quectel EG91
USB: serial: option: add Telit LE910Cx composition 0x1204
USB: serial: option: add Quectel EC200S-CN module support
USB: serial: qcserial: add EM9191 QDL support
Input: xpad - add support for another USB ID of Nacon GC-100
usb: musb: dsps: Fix the probe error path
efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock()
efi/cper: use stack buffer for error record decoding
cb710: avoid NULL pointer subtraction
xhci: Enable trust tx length quirk for Fresco FL11 USB controller
xhci: Fix command ring pointer corruption while aborting a command
xhci: guard accesses to ep_state in xhci_endpoint_reset()
USB: xhci: dbc: fix tty registration race
mei: me: add Ice Lake-N device id.
x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
btrfs: fix abort logic in btrfs_replace_file_extents
btrfs: update refs for any root except tree log roots
btrfs: check for error when looking up inode during dir entry replay
btrfs: deal with errors when adding inode reference during log replay
btrfs: deal with errors when replaying dir entry during log replay
btrfs: unlock newly allocated extent buffer after error
drm/msm: Avoid potential overflow in timeout_to_jiffies()
arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE
csky: Fixup regs.sr broken in ptrace
csky: don't let sigreturn play with priveleged bits of status register
clk: socfpga: agilex: fix duplicate s2f_user0_clk
s390: fix strrchr() implementation
nds32/ftrace: Fix Error: invalid operands (*UND* and *UND* sections) for `^'
ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo 13s Gen2
ALSA: hda/realtek: Add quirk for TongFang PHxTxX1
ALSA: hda/realtek - ALC236 headset MIC recording issue
ALSA: hda/realtek: Add quirk for Clevo X170KM-G
ALSA: hda/realtek: Complete partial device name to avoid ambiguity
ALSA: hda - Enable headphone mic on Dell Latitude laptops with ALC3254
ALSA: hda/realtek: Enable 4-speaker output for Dell Precision 5560 laptop
ALSA: seq: Fix a potential UAF by wrong private_free call order
ALSA: pcm: Workaround for a wrong offset in SYNC_PTR compat ioctl
ALSA: usb-audio: Add quirk for VF0770
Linux 5.10.74
hwmon: (pmbus/ibm-cffps) max_power_out swap changes
sched: Always inline is_percpu_thread()
perf/core: fix userpage->time_enabled of inactive events
scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"
scsi: ses: Fix unsigned comparison with less than zero
drm/amdgpu: fix gart.bo pin_count leak
net: sun: SUNVNET_COMMON should depend on INET
vboxfs: fix broken legacy mount signature checking
mac80211: check return value of rhashtable_init
net: prevent user from passing illegal stab size
hwmon: (ltc2947) Properly handle errors when looking for the external clock
m68k: Handle arrivals of multiple signals correctly
mac80211: Drop frames from invalid MAC address in ad-hoc mode
netfilter: nf_nat_masquerade: defer conntrack walk to work queue
netfilter: nf_nat_masquerade: make async masq_inet6_event handling generic
ASoC: SOF: loader: release_firmware() on load failure to avoid batching
HID: wacom: Add new Intuos BT (CTL-4100WL/CTL-6100WL) device IDs
netfilter: ip6_tables: zero-initialize fragment offset
HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
ext4: correct the error path of ext4_write_inline_data_end()
ext4: check and update i_disksize properly
Linux 5.10.73
x86/hpet: Use another crystalball to evaluate HPET usability
x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n
x86/entry: Correct reference to intended CONFIG_64_BIT
x86/sev: Return an error on a returned non-zero SW_EXITINFO1[31:0]
x86/Kconfig: Correct reference to MWINCHIP3D
x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
pseries/eeh: Fix the kdump kernel crash during eeh_pseries_init
powerpc/64s: fix program check interrupt emergency stack path
powerpc/bpf: Fix BPF_SUB when imm == 0x80000000
RISC-V: Include clone3() on rv32
bpf, s390: Fix potential memory leak about jit_data
riscv/vdso: make arch_setup_additional_pages wait for mmap_sem for write killable
i2c: mediatek: Add OFFSET_EXT_CONF setting back
i2c: acpi: fix resource leak in reconfiguration device addition
powerpc/iommu: Report the correct most efficient DMA mask for PCI devices
net: prefer socket bound to interface when not in VRF
i40e: Fix freeing of uninitialized misc IRQ vector
i40e: fix endless loop under rtnl
gve: report 64bit tx_bytes counter from gve_handle_report_stats()
gve: fix gve_get_stats()
rtnetlink: fix if_nlmsg_stats_size() under estimation
gve: Avoid freeing NULL pointer
gve: Correct available tx qpl check
drm/nouveau/debugfs: fix file release memory leak
drm/nouveau/kms/nv50-: fix file release memory leak
drm/nouveau: avoid a use-after-free when BO init fails
video: fbdev: gbefb: Only instantiate device when built for IP32
drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup
bus: ti-sysc: Use CLKDM_NOAUTO for dra7 dcan1 for errata i893
perf jevents: Tidy error handling
netlink: annotate data races around nlk->bound
net: sfp: Fix typo in state machine debug string
net/sched: sch_taprio: properly cancel timer from taprio_destroy()
net: bridge: fix under estimation in br_get_linkxstats_size()
net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size()
ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence
dt-bindings: drm/bridge: ti-sn65dsi86: Fix reg value
arm64: dts: ls1028a: add missing CAN nodes
ptp_pch: Load module automatically if ID matches
powerpc/fsl/dts: Fix phy-connection-type for fm1mac3
net_sched: fix NULL deref in fifo_set_limit()
phy: mdio: fix memory leak
net/mlx5: E-Switch, Fix double allocation of acl flow counter
net/mlx5e: IPSEC RX, enable checksum complete
bpf: Fix integer overflow in prealloc_elems_and_freelist()
soc: ti: omap-prm: Fix external abort for am335x pruss
bpf, arm: Fix register clobbering in div/mod implementation
iwlwifi: pcie: add configuration of a Wi-Fi adapter on Dell XPS 15
xtensa: call irqchip_init only when CONFIG_USE_OF is selected
xtensa: use CONFIG_USE_OF instead of CONFIG_OF
arm64: dts: qcom: pm8150: use qcom,pm8998-pon binding
ath5k: fix building with LEDS=m
PCI: hv: Fix sleep while in non-sleep context when removing child devices from the bus
ARM: dts: imx6qdl-pico: Fix Ethernet support
ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo
ARM: dts: imx: Add missing pinctrl-names for panel on M53Menlo
soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment
ARM: at91: pm: do not panic if ram controllers are not enabled
ARM: dts: qcom: apq8064: Use 27MHz PXO clock as DSI PLL reference
soc: qcom: socinfo: Fixed argument passed to platform_set_data()
bus: ti-sysc: Add break in switch statement in sysc_init_soc()
riscv: Flush current cpu icache before other cpus
ARM: dts: qcom: apq8064: use compatible which contains chipid
ARM: dts: imx6dl-yapp4: Fix lp5562 LED driver probe
ARM: dts: omap3430-sdp: Fix NAND device node
xen/balloon: fix cancelled balloon action
SUNRPC: fix sign error causing rpcsec_gss drops
nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero
nfsd: fix error handling of register_pernet_subsys() in init_nfsd()
ovl: fix IOCB_DIRECT if underlying fs doesn't support direct IO
ovl: fix missing negative dentry check in ovl_rename()
mmc: sdhci-of-at91: replace while loop with read_poll_timeout
mmc: sdhci-of-at91: wait for calibration done before proceed
mmc: meson-gx: do not use memcpy_to/fromio for dram-access-quirk
xen/privcmd: fix error handling in mmap-resource processing
drm/nouveau/kms/tu102-: delay enabling cursor until after assign_windows
usb: typec: tcpm: handle SRC_STARTUP state if cc changes
USB: cdc-acm: fix break reporting
USB: cdc-acm: fix racy tty buffer accesses
usb: chipidea: ci_hdrc_imx: Also search for 'phys' phandle
Partially revert "usb: Kconfig: using select for USB_COMMON dependency"
ANDROID: Different fix for KABI breakage in 5.10.71 in struct sock
ANDROID: ABI: update .xml file with new symbols to track
Linux 5.10.72
libata: Add ATA_HORKAGE_NO_NCQ_ON_ATI for Samsung 860 and 870 SSD.
perf/x86: Reset destroy callback on event init failure
KVM: x86: nSVM: restore int_vector in svm_clear_vintr
kvm: x86: Add AMD PMU MSRs to msrs_to_save_all[]
KVM: do not shrink halt_poll_ns below grow_start
selftests: KVM: Align SMCCC call with the spec in steal_time
tools/vm/page-types: remove dependency on opt_file for idle page tracking
smb3: correct smb3 ACL security descriptor
irqchip/gic: Work around broken Renesas integration
scsi: ses: Retry failed Send/Receive Diagnostic commands
thermal/drivers/tsens: Fix wrong check for tzd in irq handlers
nvme-fc: avoid race between time out and tear down
nvme-fc: update hardware queues before using them
selftests:kvm: fix get_warnings_count() ignoring fscanf() return warn
selftests: be sure to make khdr before other targets
habanalabs/gaudi: fix LBW RR configuration
usb: dwc2: check return value after calling platform_get_resource()
usb: testusb: Fix for showing the connection speed
scsi: sd: Free scsi_disk device via put_device()
ext2: fix sleeping in atomic bugs on error
sparc64: fix pci_iounmap() when CONFIG_PCI is not set
xen-netback: correct success/error reporting for the SKB-with-fraglist case
net: mdio: introduce a shutdown method to mdio device drivers
btrfs: fix mount failure due to past and transient device flush error
btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error handling
nfsd: back channel stuck in SEQ4_STATUS_CB_PATH_DOWN
platform/x86: touchscreen_dmi: Update info for the Chuwi Hi10 Plus (CWI527) tablet
platform/x86: touchscreen_dmi: Add info for the Chuwi HiBook (CWI514) tablet
spi: rockchip: handle zero length transfers without timing out
ANDROID: Fix up KABI breakage in 5.10.71 in struct sock
Linux 5.10.71
netfilter: nf_tables: Fix oversized kvmalloc() calls
netfilter: conntrack: serialize hash resizes and cleanups
KVM: x86: Handle SRCU initialization failure during page track init
HID: usbhid: free raw_report buffers in usbhid_stop
mm: don't allow oversized kvmalloc() calls
netfilter: ipset: Fix oversized kvmalloc() calls
HID: betop: fix slab-out-of-bounds Write in betop_probe
crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
usb: hso: remove the bailout parameter
ASoC: dapm: use component prefix when checking widget names
net: udp: annotate data race around udp_sk(sk)->corkflag
HID: u2fzero: ignore incomplete packets without data
ext4: fix potential infinite loop in ext4_dx_readdir()
ext4: add error checking to ext4_ext_replay_set_iblocks()
ext4: fix reserved space counter leakage
ext4: limit the number of blocks in one ADD_RANGE TLV
ext4: fix loff_t overflow in ext4_max_bitmap_size()
ipack: ipoctal: fix module reference leak
ipack: ipoctal: fix missing allocation-failure check
ipack: ipoctal: fix tty-registration error handling
ipack: ipoctal: fix tty registration race
ipack: ipoctal: fix stack information leak
debugfs: debugfs_create_file_size(): use IS_ERR to check for error
elf: don't use MAP_FIXED_NOREPLACE for elf interpreter mappings
nvme: add command id quirk for apple controllers
hwmon: (pmbus/mp2975) Add missed POUT attribute for page 1 mp2975 controller
perf/x86/intel: Update event constraints for ICX
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
net: sched: flower: protect fl_walk() with rcu
net: phy: bcm7xxx: Fixed indirect MMD operations
net: hns3: fix always enable rx vlan filter problem after selftest
net: hns3: reconstruct function hns3_self_test
net: hns3: fix prototype warning
net: hns3: fix show wrong state when add existing uc mac address
net: hns3: fix mixed flag HCLGE_FLAG_MQPRIO_ENABLE and HCLGE_FLAG_DCB_ENABLE
net: hns3: keep MAC pause mode when multiple TCs are enabled
net: hns3: do not allow call hns3_nic_net_open repeatedly
ixgbe: Fix NULL pointer dereference in ixgbe_xdp_setup
scsi: csiostor: Add module softdep on cxgb4
Revert "block, bfq: honor already-setup queue merges"
net: ks8851: fix link error
selftests, bpf: test_lwt_ip_encap: Really disable rp_filter
selftests, bpf: Fix makefile dependencies on libbpf
bpf: Exempt CAP_BPF from checks against bpf_jit_limit
RDMA/hns: Fix inaccurate prints
e100: fix buffer overrun in e100_get_regs
e100: fix length calculation in e100_get_regs_len
dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports
dsa: mv88e6xxx: Fix MTU definition
dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
drm/i915/request: fix early tracepoints
smsc95xx: fix stalled rx after link change
net: ipv4: Fix rtnexthop len when RTA_FLOW is present
net: enetc: fix the incorrect clearing of IF_MODE bits
hwmon: (tmp421) fix rounding for negative values
hwmon: (tmp421) report /PVLD condition as fault
mptcp: don't return sockets in foreign netns
sctp: break out if skb_header_pointer returns NULL in sctp_rcv_ootb
mac80211-hwsim: fix late beacon hrtimer handling
mac80211: mesh: fix potentially unaligned access
mac80211: limit injected vht mcs/nss in ieee80211_parse_tx_radiotap
mac80211: Fix ieee80211_amsdu_aggregate frag_tail bug
hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs
bpf, mips: Validate conditional branch offsets
RDMA/cma: Fix listener leak in rdma_cma_listen_on_all() failure
IB/cma: Do not send IGMP leaves for sendonly Multicast groups
bpf: Handle return value of BPF_PROG_TYPE_STRUCT_OPS prog
ipvs: check that ip_vs_conn_tab_bits is between 8 and 20
drm/amdgpu: correct initial cp_hqd_quantum for gfx9
drm/amd/display: Pass PCI deviceid into DC
RDMA/cma: Do not change route.addr.src_addr.ss_family
media: ir_toy: prevent device from hanging during transmit
KVM: rseq: Update rseq when processing NOTIFY_RESUME on xfer to KVM guest
KVM: nVMX: Filter out all unsupported controls when eVMCS was activated
KVM: x86: nSVM: don't copy virt_ext from vmcb12
KVM: x86: Fix stack-out-of-bounds memory access from ioapic_write_indirect()
x86/kvmclock: Move this_cpu_pvti into kvmclock.h
mac80211: fix use-after-free in CCMP/GCMP RX
scsi: ufs: Fix illegal offset in UPIU event trace
gpio: pca953x: do not ignore i2c errors
hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (w83793) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (tmp421) handle I2C errors
fs-verity: fix signed integer overflow with i_size near S64_MAX
ACPI: NFIT: Use fallback node id when numa info in NFIT table is incorrect
ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i 15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.
usb: cdns3: fix race condition before setting doorbell
cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory
scsi: qla2xxx: Changes to support kdump kernel for NVMe BFS
cpufreq: schedutil: Use kobject release() method to free sugov_tunables
tty: Fix out-of-bound vmalloc access in imageblit
ANDROID: GKI: update .xml file with new symbols to track
Revert "treewide: Change list_sort to use const pointers"
Revert "crypto: public_key: fix overflow during implicit conversion"
Revert "drm/vmwgfx: fix potential UAF in vmwgfx_surface.c"
Revert "drm: serialize drm_file.master with a new spinlock"
Revert "drm: protect drm_master pointers in drm_lease.c"
Linux 5.10.70
qnx4: work around gcc false positive warning bug
xen/balloon: fix balloon kthread freezing
USB: serial: cp210x: fix dropped characters with CP2102
thermal/drivers/int340x: Do not set a wrong tcc offset on resume
EDAC/dmc520: Assign the proper type to dimm->edac_mode
EDAC/synopsys: Fix wrong value type assignment for edac_mode
spi: Fix tegra20 build with CONFIG_PM=n
net: 6pack: Fix tx timeout and slot time
alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile
arm64: Mark __stack_chk_guard as __ro_after_init
parisc: Use absolute_pointer() to define PAGE0
qnx4: avoid stringop-overread errors
sparc: avoid stringop-overread errors
net: i825xx: Use absolute_pointer for memcpy from fixed memory location
compiler.h: Introduce absolute_pointer macro
blk-cgroup: fix UAF by grabbing blkcg lock before destroying blkg pd
block: flush the integrity workqueue in blk_integrity_unregister
block: check if a profile is actually registered in blk_integrity_unregister
amd/display: downgrade validation failure log level
sparc32: page align size in arch_dma_alloc
nvme-rdma: destroy cm id before destroy qp to avoid use after free
nvme-multipath: fix ANA state updates when a namespace is not present
xen/balloon: use a kernel thread instead a workqueue
bpf: Add oversize check before call kvcalloc()
cpufreq: intel_pstate: Override parameters if HWP forced by BIOS
ipv6: delay fib6_sernum increase in fib6_add
m68k: Double cast io functions to unsigned long
blk-mq: avoid to iterate over stale request
net: stmmac: allow CSR clock of 300MHz
net: macb: fix use after free on rmmod
net: phylink: Update SFP selected interface on advertising changes
blktrace: Fix uaf in blk_trace access after removing by sysfs
io_uring: put provided buffer meta data under memcg accounting
x86/asm: Fix SETZ size enqcmds() build failure
x86/asm: Add a missing __iomem annotation in enqcmds()
md: fix a lock order reversal in md_alloc
irqchip/gic-v3-its: Fix potential VPE leak on error
irqchip/goldfish-pic: Select GENERIC_IRQ_CHIP to fix build
scsi: lpfc: Use correct scnprintf() limit
scsi: qla2xxx: Restore initiator in dual mode
cifs: fix a sign extension bug
thermal/core: Potential buffer overflow in thermal_build_list_of_policies()
nvme: keep ctrl->namespaces ordered
treewide: Change list_sort to use const pointers
nvme-tcp: fix incorrect h2cdata pdu offset accounting
fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
fpga: machxo2-spi: Return an error on failure
tty: synclink_gt: rename a conflicting function name
tty: synclink_gt, drop unneeded forward declarations
scsi: target: Fix the pgr/alua_support_store functions
scsi: iscsi: Adjust iface sysfs attr detection
atlantic: Fix issue in the pm resume flow.
net/mlx4_en: Don't allow aRFS for encapsulated packets
qed: rdma - don't wait for resources under hw error recovery flow
gpio: uniphier: Fix void functions to remove return value
s390/qeth: fix NULL deref in qeth_clear_working_pool_list()
kselftest/arm64: signal: Skip tests if required features are missing
kselftest/arm64: signal: Add SVE to the set of features we can check for
net: dsa: realtek: register the MDIO bus under devres
net: dsa: don't allocate the slave_mii_bus using devres
net/smc: fix 'workqueue leaked lock' in smc_conn_abort_work
net/smc: add missing error check in smc_clc_prfx_set()
net: hns3: check queue id range before using
net: hns3: fix change RSS 'hfunc' ineffective issue
bnxt_en: Fix TX timeout when TX ring size is set to the smallest
enetc: Fix uninitialized struct dim_sample field usage
enetc: Fix illegal access when reading affinity_hint
platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR()
afs: Fix updating of i_blocks on file/dir extension
afs: Fix incorrect triggering of sillyrename on 3rd-party invalidation
comedi: Fix memory leak in compat_insnlist()
net: hso: fix muxed tty registration
drm/amd/pm: Update intermediate power state for SI
scsi: sd_zbc: Ensure buffer size is aligned to SECTOR_SIZE
serial: mvebu-uart: fix driver's tx_empty callback
serial: 8250: 8250_omap: Fix RX_LVL register offset
xhci: Set HCD flag to defer primary roothub registration
btrfs: prevent __btrfs_dump_space_info() to underflow its free space
erofs: fix up erofs_lookup tracepoint
mcb: fix error handling in mcb_alloc_bus()
USB: serial: option: add device id for Foxconn T99W265
USB: serial: option: remove duplicate USB device ID
USB: serial: option: add Telit LN920 compositions
USB: serial: mos7840: remove duplicated 0xac24 device ID
usb: core: hcd: Add support for deferring roothub registration
usb: dwc3: core: balance phy init and exit
Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
staging: greybus: uart: fix tty use after free
binder: make sure fd closes complete
Revert "USB: bcma: Add a check for devm_gpiod_get"
USB: cdc-acm: fix minor-number release
USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
xen/x86: fix PV trap handling on secondary processors
cifs: fix incorrect check for null pointer in header_assemble
usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave
usb: gadget: r8a66597: fix a loop in set_feature()
mm: fix uninitialized use in overcommit_policy_handler
ocfs2: drop acl cache for directories too
PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO response
ANDROID: GKI: update the .xml file after modifying the ANDROID_KABI_USE() macro
ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use __UNIQUE()
ANDROID: GKI: update .xml file to handle previous issues
Linux 5.10.69
drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
sched/idle: Make the idle timer expire in hard interrupt context
rtc: rx8010: select REGMAP_I2C
blk-mq: allow 4x BLK_MAX_REQUEST_COUNT at blk_plug for multiple_queues
blk-throttle: fix UAF by deleteing timer in blk_throtl_exit()
pwm: stm32-lp: Don't modify HW state in .remove() callback
pwm: rockchip: Don't modify HW state in .remove() callback
pwm: img: Don't modify HW state in .remove() callback
habanalabs: add validity check for event ID received from F/W
nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group
nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
nilfs2: fix NULL pointer in nilfs_##name##_attr_release
nilfs2: fix memory leak in nilfs_sysfs_create_device_group
btrfs: fix lockdep warning while mounting sprout fs
btrfs: update the bdev time directly when closing
ceph: lockdep annotations for try_nonblocking_invalidate
ceph: remove the capsnaps when removing caps
ceph: request Fw caps before updating the mtime in ceph_write_iter
dmaengine: xilinx_dma: Set DMA mask for coherent APIs
dmaengine: ioat: depends on !UML
dmaengine: sprd: Add missing MODULE_DEVICE_TABLE
dmaengine: idxd: depends on !UML
iommu/amd: Relocate GAMSup check to early_enable_iommus
parisc: Move pci_dev_is_behind_card_dino to where it is used
dma-buf: DMABUF_MOVE_NOTIFY should depend on DMA_SHARED_BUFFER
drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION()
drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
thermal/core: Fix thermal_cooling_device_register() prototype
tools/bootconfig: Fix tracing_on option checking in ftrace2bconf.sh
Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH
ceph: cancel delayed work instead of flushing on mdsc teardown
ceph: allow ceph_put_mds_session to take NULL or ERR_PTR
platform/chrome: cros_ec_trace: Fix format warnings
platform/chrome: sensorhub: Add trace events for sample
dmaengine: idxd: fix wq slot allocation index check
pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered
pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
PM: sleep: core: Avoid setting power.must_resume to false
profiling: fix shift-out-of-bounds bugs
nilfs2: use refcount_dec_and_lock() to fix potential UAF
prctl: allow to setup brk for et_dyn executables
9p/trans_virtio: Remove sysfs file on probe failure
thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
perf tools: Allow build-id with trailing zeros
tools lib: Adopt memchr_inv() from kernel
perf test: Fix bpf test sample mismatch reporting
dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
um: virtio_uml: fix memory leak on init failures
coredump: fix memleak in dump_vma_snapshot()
staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()
sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
sctp: validate chunk size in __rcv_asconf_lookup
Revert "net/mlx5: Register to devlink ingress VLAN filter trap"
ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE
ARM: 9079/1: ftrace: Add MODULE_PLTS support
ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link()
ARM: 9077/1: PLT: Move struct plt_entries definition to header
ARM: Qualify enabling of swiotlb_init()
s390/pci_mmio: fully validate the VMA before calling follow_pte()
console: consume APC, DM, DCS
PCI: aardvark: Fix reporting CRS value
PCI: pci-bridge-emul: Add PCIe Root Capabilities Register
ANDROID: GKI: Update symbol list for new modules
Linux 5.10.68
net: dsa: bcm_sf2: Fix array overrun in bcm_sf2_num_active_ports()
bnxt_en: Fix error recovery regression
x86/mce: Avoid infinite loop for copy from user recovery
net: renesas: sh_eth: Fix freeing wrong tx descriptor
mfd: lpc_sch: Rename GPIOBASE to prevent build error
mfd: lpc_sch: Partially revert "Add support for Intel Quark X1000"
bnxt_en: Fix possible unintended driver initiated error recovery
bnxt_en: Improve logging of error recovery settings information.
bnxt_en: Convert to use netif_level() helpers.
bnxt_en: Consolidate firmware reset event logging.
bnxt_en: log firmware debug notifications
bnxt_en: Fix asic.rev in devlink dev info command
bnxt_en: fix stored FW_PSID version masks
net: dsa: b53: Fix IMP port setup on BCM5301x
ip_gre: validate csum_start only on pull
qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom
fq_codel: reject silly quantum parameters
netfilter: socket: icmp6: fix use-after-scope
net: dsa: b53: Set correct number of ports in the DSA struct
net: dsa: b53: Fix calculating number of switch ports
net: hso: add failure handler for add_net_device
selftests: mptcp: clean tmp files in simult_flows
net: dsa: tag_rtl4_a: Fix egress tags
gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak
gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'
perf bench inject-buildid: Handle writen() errors
perf unwind: Do not overwrite FEATURE_CHECK_LDFLAGS-libunwind-{x86,aarch64}
ARC: export clear_user_page() for modules
mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n
KVM: arm64: Handle PSCI resets before userspace touches vCPU state
KVM: arm64: Fix read-side race on updates to vcpu reset state
mtd: mtdconcat: Check _read, _write callbacks existence before assignment
mtd: mtdconcat: Judge callback existence based on the master
tracing/boot: Fix a hist trigger dependency for boot time tracing
mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is set
PCI: Fix pci_dev_str_match_path() alloc while atomic bug
KVM: arm64: Restrict IPA size to maximum 48 bits on 4K and 16K page size
netfilter: nft_ct: protect nft_ct_pcpu_template_refcnt with mutex
netfilter: Fix fall-through warnings for Clang
PCI: iproc: Fix BCMA probe resource handling
PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges'
backlight: ktd253: Stabilize backlight
mfd: axp20x: Update AXP288 volatile ranges
s390/bpf: Fix branch shortening during codegen pass
s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
s390/bpf: Fix optimizing out zero-extensions
NTB: perf: Fix an error code in perf_setup_inbuf()
NTB: Fix an error code in ntb_msit_probe()
ethtool: Fix an error code in cxgb2.c
PCI: ibmphp: Fix double unmap of io_mem
block, bfq: honor already-setup queue merges
net: usb: cdc_mbim: avoid altsetting toggling for Telit LN920
Set fc_nlinfo in nh_create_ipv4, nh_create_ipv6
octeontx2-af: Add additional register check to rvu_poll_reg()
watchdog: Start watchdog in watchdog_set_last_hw_keepalive only if appropriate
PCI: Add ACS quirks for Cavium multi-function devices
PCI: j721e: Add PCIe support for AM64
PCI: j721e: Add PCIe support for J7200
PCI: cadence: Add quirk flag to set minimum delay in LTSSM Detect.Quiet state
PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool
tracing/probes: Reject events which have the same name of existing one
PCI: rcar: Fix runtime PM imbalance in rcar_pcie_ep_probe()
mfd: Don't use irq_create_mapping() to resolve a mapping
PCI: tegra: Fix OF node reference leak
PCI: tegra194: Fix MSI-X programming
PCI: tegra194: Fix handling BME_CHGED event
fuse: fix use after free in fuse_read_interrupt()
PCI: Add ACS quirks for NXP LX2xx0 and LX2xx2 platforms
mfd: db8500-prcmu: Adjust map to reality
dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range()
net: hns3: fix the timing issue of VF clearing interrupt sources
net: hns3: disable mac in flr process
net: hns3: change affinity_mask to numa node range
net: hns3: pad the short tunnel frame before sending to hardware
bnxt_en: make bnxt_free_skbs() safe to call after bnxt_free_mem()
KVM: PPC: Book3S HV: Tolerate treclaim. in fake-suspend mode changing registers
ibmvnic: check failover_pending in login response
dt-bindings: arm: Fix Toradex compatible typo
udp_tunnel: Fix udp_tunnel_nic work-queue type
qed: Handle management FW error
selftest: net: fix typo in altname test
tcp: fix tp->undo_retrans accounting in tcp_sacktag_one()
x86/uaccess: Fix 32-bit __get_user_asm_u64() when CC_HAS_ASM_GOTO_OUTPUT=y
net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup
net/af_unix: fix a data-race in unix_dgram_poll
vhost_net: fix OoB on sendmsg() failure.
gen_compile_commands: fix missing 'sys' package
net: ipa: initialize all filter table slots
events: Reuse value read using READ_ONCE instead of re-reading it
nvme-tcp: fix io_work priority inversion
net/mlx5: Fix potential sleeping in atomic context
net/mlx5: FWTrace, cancel work on alloc pd error flow
perf machine: Initialize srcline string member in add_location struct
drm/rockchip: cdn-dp-core: Make cdn_dp_core_resume __maybe_unused
tipc: increase timeout in tipc_sk_enqueue()
r6040: Restore MDIO clock frequency after MAC reset
net/l2tp: Fix reference count leak in l2tp_udp_recv_core
dccp: don't duplicate ccid when cloning dccp sock
ptp: dp83640: don't define PAGE0
net-caif: avoid user-triggerable WARN_ON(1)
net/{mlx5|nfp|bnxt}: Remove unnecessary RTNL lock assert
ethtool: Fix rxnfc copy to user buffer overflow
tipc: fix an use-after-free issue in tipc_recvmsg
x86/mm: Fix kern_addr_valid() to cope with existing but not present entries
x86/pat: Pass valid address to sanitize_phys()
s390/sclp: fix Secure-IPL facility detection
drm/etnaviv: add missing MMU context put when reaping MMU mapping
drm/etnaviv: reference MMU context when setting up hardware state
drm/etnaviv: fix MMU context leak on GPU reset
drm/etnaviv: exec and MMU state is lost when resetting the GPU
drm/etnaviv: keep MMU context across runtime suspend/resume
drm/etnaviv: stop abusing mmu_context as FE running marker
drm/etnaviv: put submit prev MMU context when it exists
drm/etnaviv: return context from etnaviv_iommu_context_get
drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10
PCI: Add AMD GPU multi-function power dependencies
PM: base: power: don't try to use non-existing RTC for storing data
arm64/sve: Use correct size when reinitialising SVE state
bnx2x: Fix enabling network interfaces without VFs
xen: reset legacy rtc flag for PV domU
io_uring: ensure symmetry in handling iter types in loop_rw_iter()
btrfs: fix upper limit for max_inline for page size 64K
drm/bridge: lt9611: Fix handling of 4k panels
Linux 5.10.67
fanotify: limit number of event merge attempts
drm/panfrost: Clamp lock region to Bifrost minimum
drm/panfrost: Use u64 for size in lock_region
drm/panfrost: Simplify lock_region calculation
drm/amd/display: Update bounding box states (v2)
drm/amd/display: Update number of DCN3 clock states
drm/amdgpu: Fix BUG_ON assert
drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv
drm/dp_mst: Fix return code on sideband message failure
drm/msi/mdp4: populate priv->kms in mdp4_kms_init
drm/mgag200: Select clock in PLL update functions
net: dsa: lantiq_gswip: fix maximum frame length
lib/test_stackinit: Fix static initializer test
platform/chrome: cros_ec_proto: Send command again when timeout occurs
libnvdimm/pmem: Fix crash triggered when I/O in-flight during unbind
memcg: enable accounting for pids in nested pid namespaces
mm,vmscan: fix divide by zero in get_scan_count
mm/hugetlb: initialize hugetlb_usage in mm_init
mm/hmm: bypass devmap pte when all pfn requested flags are fulfilled
hugetlb: fix hugetlb cgroup refcounting during vma split
s390/pv: fix the forcing of the swiotlb
cpufreq: powernv: Fix init_chip_info initialization in numa=off
scsi: qla2xxx: Sync queue idx with queue_pair_map idx
scsi: qla2xxx: Changes to support kdump kernel
scsi: BusLogic: Fix missing pr_cont() use
ovl: fix BUG_ON() in may_delete() when called from ovl_cleanup()
parisc: fix crash with signals and alloca
io_uring: remove duplicated io_size from rw
fs/io_uring Don't use the return value from import_iovec().
net: hns3: clean up a type mismatch warning
net: w5100: check return value after calling platform_get_resource()
fix array-index-out-of-bounds in taprio_change
net: fix NULL pointer reference in cipso_v4_doi_free
ath9k: fix sleeping in atomic context
ath9k: fix OOB read ar9300_eeprom_restore_internal
wcn36xx: Fix missing frame timestamp for beacon/probe-resp
selftests/bpf: Fix potential unreleased lock
parport: remove non-zero check on count
net/mlx5: DR, Enable QP retransmission
net/mlx5: DR, fix a potential use-after-free bug
iwlwifi: mvm: Fix scan channel flags settings
iwlwifi: fw: correctly limit to monitor dump
iwlwifi: mvm: fix access to BSS elements
iwlwifi: mvm: avoid static queue number aliasing
iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed
iwlwifi: pcie: free RBs during configure
nfsd: fix crash on LOCKT on reexported NFSv3
drm/amdkfd: Account for SH/SE count when setting up cu masks.
ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B
ASoC: rockchip: i2s: Fix regmap_ops hang
usbip:vhci_hcd USB port can get stuck in the disabled state
usbip: give back URBs for unsent unlink requests during cleanup
usb: musb: musb_dsps: request_irq() after initializing musb
Revert "USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set"
cifs: fix wrong release in sess_alloc_buffer() failed path
mmc: core: Return correct emmc response in case of ioctl error
selftests/bpf: Enlarge select() timeout for test_maps
mmc: rtsx_pci: Fix long reads when clock is prescaled
mmc: sdhci-of-arasan: Check return value of non-void funtions
mmc: sdhci-of-arasan: Modified SD default speed to 19MHz for ZynqMP
of: Don't allow __of_attached_node_sysfs() without CONFIG_SYSFS
ASoC: Intel: Skylake: Fix passing loadable flag for module
ASoC: Intel: Skylake: Fix module configuration for KPB and MIXER
soundwire: intel: fix potential race condition during power down
btrfs: tree-log: check btrfs_lookup_data_extent return value
m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch
octeontx2-pf: Fix NIX1_RX interface backpressure
rtw88: wow: fix size access error of probe request
rtw88: wow: build wow function only if CONFIG_PM is on
rtw88: use read_poll_timeout instead of fixed sleep
rtl8xxxu: Fix the handling of TX A-MPDU aggregation
drm/exynos: Always initialize mapping in exynos_drm_register_dma()
lockd: lockd server-side shouldn't set fl_ops
usb: chipidea: host: fix port index underflow and UBSAN complains
gfs2: Don't call dlm after protocol is unmounted
kselftest/arm64: pac: Fix skipping of tests on systems without PAC
kselftest/arm64: mte: Fix misleading output when skipping tests
net: Fix offloading indirect devices dependency on qdisc order creation
staging: rts5208: Fix get_ms_information() heap buffer size
hwmon: (pmbus/ibm-cffps) Fix write bits for LED control
selftests/bpf: Fix flaky send_signal test
rpc: fix gss_svc_init cleanup on failure
tcp: enable data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD
iomap: pass writeback errors to the mapping
serial: sh-sci: fix break handling for sysrq
opp: Don't print an error if required-opps is missing
Bluetooth: Fix handling of LE Enhanced Connection Complete
nvme: code command_id with a genctr for use-after-free validation
nvme-tcp: don't check blk_mq_tag_to_rq when receiving pdu data
arm64: dts: ls1046a: fix eeprom entries
arm64: tegra: Fix compatible string for Tegra132 CPUs
ARM: tegra: tamonten: Fix UART pad setting
ARM: tegra: acer-a500: Remove bogus USB VBUS regulators
mac80211: Fix monitor MTU limit so that A-MSDUs get through
drm/display: fix possible null-pointer dereference in dcn10_set_clock()
gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()
net/mlx5: Fix variable type to match 64bit
drm/msm/dp: return correct edid checksum after corrupted edid checksum read
Bluetooth: avoid circular locks in sco_sock_connect
Bluetooth: schedule SCO timeouts with delayed_work
drm/vmwgfx: fix potential UAF in vmwgfx_surface.c
selftests/bpf: Fix xdp_tx.c prog section name
drm/amd/display: fix incorrect CM/TF programming sequence in dwb
drm/amd/display: fix missing writeback disablement if plane is removed
thunderbolt: Fix port linking by checking all adapters
drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers
drm: xlnx: zynqmp_dpsub: Call pm_runtime_get_sync before setting pixel clock
drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660
drm/msm: mdp4: drop vblank get/put from prepare/complete_commit
net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe()
nvmem: qfprom: Fix up qfprom_disable_fuse_blowing() ordering
arm64: dts: qcom: sm8250: Fix epss_l3 unit address
arm64: dts: qcom: msm8996: don't use underscore in node name
arm64: dts: qcom: msm8994: don't use underscore in node name
arm64: dts: qcom: sdm630: don't use underscore in node name
arm64: dts: qcom: ipq6018: drop '0x' from unit address
arm64: dts: qcom: sdm660: use reg value for memory node
arm64: dts: qcom: ipq8074: fix pci node reg property
ARM: dts: imx53-ppd: Fix ACHC entry
serial: 8250_omap: Handle optional overrun-throttle-ms property
arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration
arm64: dts: qcom: sdm630: Rewrite memory map
gfs2: Fix glock recursion in freeze_go_xmote_bh
media: tegra-cec: Handle errors of clk_prepare_enable()
media: TDA1997x: fix tda1997x_query_dv_timings() return value
media: v4l2-dv-timings.c: fix wrong condition in two for-loops
media: imx258: Limit the max analogue gain to 480
media: imx258: Rectify mismatch of VTS value
ASoC: Intel: update sof_pcm512x quirks
ASoC: Intel: bytcr_rt5640: Move "Platform Clock" routes to the maps for the matching in-/output
arm64: tegra: Fix Tegra194 PCIe EP compatible string
ARM: dts: at91: use the right property for shutdown controller
bonding: 3ad: fix the concurrency between __bond_release_one() and bond_3ad_state_machine_handler()
ARM: dts: stm32: Update AV96 adv7513 node per dtbs_check
ARM: dts: stm32: Set {bitclock,frame}-master phandles on ST DKx
ARM: dts: stm32: Set {bitclock,frame}-master phandles on DHCOM SoM
workqueue: Fix possible memory leaks in wq_numa_init()
Bluetooth: skip invalid hci_sync_conn_complete_evt
ata: sata_dwc_460ex: No need to call phy_exit() befre phy_init()
libbpf: Fix race when pinning maps in parallel
samples: bpf: Fix tracex7 error raised on the missing argument
staging: ks7010: Fix the initialization of the 'sleep_status' structure
serial: 8250_pci: make setup_port() parameters explicitly unsigned
hvsi: don't panic on tty_register_driver failure
xtensa: ISS: don't panic in rs_init
serial: 8250: Define RX trigger levels for OxSemi 950 devices
s390: make PCI mio support a machine flag
s390/jump_label: print real address in a case of a jump label bug
flow_dissector: Fix out-of-bounds warnings
ipv4: ip_output.c: Fix out-of-bounds warning in ip_copy_addrs()
video: fbdev: riva: Error out if 'pixclock' equals zero
video: fbdev: kyro: Error out if 'pixclock' equals zero
video: fbdev: asiliantfb: Error out if 'pixclock' equals zero
arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names
drm/bridge: nwl-dsi: Avoid potential multiplication overflow on 32-bit
bpf/tests: Do not PASS tests without actually testing the result
bpf/tests: Fix copy-and-paste error in double word test
drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex
drm/amdgpu: Fix a printing message
ethtool: improve compat ioctl handling
nfp: fix return statement in nfp_net_parse_meta()
media: atomisp: pci: fix error return code in atomisp_pci_probe()
media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe
media: platform: stm32: unprepare clocks at handling errors in probe
media: hantro: vp8: Move noisy WARN_ON to vpu_debug
drm/amd/display: Fix timer_per_pixel unit error
selftests: firmware: Fix ignored return val of asprintf() warn
bus: fsl-mc: fix mmio base address for child DPRCs
tty: serial: jsm: hold port lock when reporting modem line changes
staging: board: Fix uninitialized spinlock when attaching genpd
usb: gadget: composite: Allow bMaxPower=0 if self-powered
USB: EHCI: ehci-mv: improve error handling in mv_ehci_enable()
usb: gadget: u_ether: fix a potential null pointer dereference
usb: host: fotg210: fix the actual_length of an iso packet
usb: host: fotg210: fix the endpoint's transactional opportunities calculation
igc: Check if num of q_vectors is smaller than max before array access
rcu: Fix macro name CONFIG_TASKS_RCU_TRACE
drm: protect drm_master pointers in drm_lease.c
drm: serialize drm_file.master with a new spinlock
drm: avoid blocking in drm_clients_info's rcu section
Smack: Fix wrong semantics in smk_access_entry()
netlink: Deal with ESRCH error in nlmsg_notify()
video: fbdev: kyro: fix a DoS bug by restricting user input
ARM: dts: qcom: apq8064: correct clock names
iavf: fix locking of critical sections
iavf: do not override the adapter state in the watchdog task
iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
net: phy: Fix data type in DP83822 dp8382x_disable_wol()
tipc: keep the skb in rcv queue until the whole data is read
PCI: Use pci_update_current_state() in pci_enable_device_flags()
crypto: mxs-dcp - Use sg_mapping_iter to copy data
x86/hyperv: fix for unwanted manipulation of sched_clock when TSC marked unstable
libbpf: Fix reuse of pinned map on older kernel
media: dib8000: rewrite the init prbs logic
ASoC: atmel: ATMEL drivers don't need HAS_DMA
drm/amdgpu: Fix amdgpu_ras_eeprom_init()
drm/vc4: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET
userfaultfd: prevent concurrent API initialization
kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y
MIPS: Malta: fix alignment of the devicetree buffer
f2fs: should put a page beyond EOF when preparing a write
f2fs: deallocate compressed pages when error happens
f2fs: fix to unmap pages from userspace process in punch_hole()
f2fs: fix unexpected ENOENT comes from f2fs_map_blocks()
f2fs: fix to account missing .skipped_gc_rwsem
soc: mediatek: cmdq: add address shift in jump
KVM: PPC: Fix clearing never mapped TCEs in realmode
clk: at91: clk-generated: Limit the requested rate to our range
fscache: Fix cookie key hashing
RDMA/hns: Fix QP's resp incomplete assignment
powerpc/smp: Update cpu_core_map on all PowerPc systems
platform/x86: dell-smbios-wmi: Add missing kfree in error-exit from run_smbios_call
KVM: PPC: Book3S HV Nested: Reflect guest PMU in-use to L0 when guest SPRs are live
scsi: ufs: ufs-exynos: Fix static checker warning
KVM: PPC: Book3S HV: Fix copy_tofrom_guest routines
clk: imx8m: fix clock tree update of TF-A managed clocks
HID: i2c-hid: Fix Elan touchpad regression
iommu/vt-d: Update the virtual command related registers
powerpc/config: Renable MTD_PHYSMAP_OF
scsi: qedf: Fix error codes in qedf_alloc_global_queues()
scsi: qedi: Fix error codes in qedi_alloc_global_queues()
scsi: smartpqi: Fix an error code in pqi_get_raid_map()
powerpc/numa: Consider the max NUMA node for migratable LPAR
pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry()
scsi: fdomain: Fix error return code in fdomain_probe()
sunrpc: Fix return value of get_srcport()
SUNRPC query transport's source port
SUNRPC/xprtrdma: Fix reconnection locking
SUNRPC: Fix potential memory corruption
NFSv4/pnfs: The layout barrier indicate a minimal value for the seqid
NFSv4/pNFS: Always allow update of a zero valued layout barrier
NFSv4/pNFS: Fix a layoutget livelock loop
dma-debug: fix debugfs initialization order
openrisc: don't printk() unconditionally
f2fs: reduce the scope of setting fsck tag when de->name_len is zero
cpuidle: pseries: Mark pseries_idle_proble() as __init
RDMA/mlx5: Delete not-available udata check
RDMA/efa: Remove double QP type assignment
powerpc/stacktrace: Include linux/delay.h
cpuidle: pseries: Fixup CEDE0 latency only for POWER10 onwards
scsi: ufs: Fix memory corruption by ufshcd_read_desc_param()
vfio: Use config not menuconfig for VFIO_NOIOMMU
pinctrl: samsung: Fix pinctrl bank pin count
scsi: BusLogic: Use %X for u32 sized integer rather than %lX
docs: Fix infiniband uverbs minor number
RDMA/iwcm: Release resources if iw_cm module initialization fails
IB/hfi1: Adjust pkey entry in index 0
clk: rockchip: drop GRF dependency for rk3328/rk3036 pll types
scsi: bsg: Remove support for SCSI_IOCTL_SEND_COMMAND
pinctrl: armada-37xx: Correct PWM pins definitions
pinctrl: remove empty lines in pinctrl subsystem
f2fs: quota: fix potential deadlock
HID: input: do not report stylus battery state as "full"
PCI: aardvark: Fix masking and unmasking legacy INTx interrupts
PCI: aardvark: Fix checking for PIO status
PCI: Export pci_pio_to_address() for module use
PCI: aardvark: Configure PCIe resources from 'ranges' DT property
PCI: xilinx-nwl: Enable the clock through CCF
PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported
PCI/portdrv: Enable Bandwidth Notification only if port supports it
f2fs: fix to do sanity check for sb/cp fields correctly
ARM: 9105/1: atags_to_fdt: don't warn about stack size
libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
dmaengine: imx-sdma: remove duplicated sdma_load_context
Revert "dmaengine: imx-sdma: refine to load context only once"
s390/qdio: cancel the ESTABLISH ccw after timeout
s390/qdio: fix roll-back after timeout on ESTABLISH ccw
media: rc-loopback: return number of emitters rather than error
media: uvc: don't do DMA on stack
VMCI: fix NULL pointer dereference when unmapping queue pair
crypto: ccp - shutdown SEV firmware on kexec
dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()
power: supply: max17042: handle fails of reading status register
block: bfq: fix bfq_set_next_ioprio_data()
crypto: public_key: fix overflow during implicit conversion
wcn36xx: Ensure finish scan is not requested before start scan
iio: ltc2983: fix device probe
arm64: head: avoid over-mapping in map_memory
arm64: mm: Fix TLBI vs ASID rollover
soc: aspeed: p2a-ctrl: Fix boundary check for mmap
soc: aspeed: lpc-ctrl: Fix boundary check for mmap
soc: qcom: aoss: Fix the out of bound usage of cooling_devs
pinctrl: ingenic: Fix incorrect pull up/down info
pinctrl: stmfx: Fix hazardous u8[] to unsigned long cast
clk: socfpga: agilex: add the bypass register for s2f_usr0 clock
clk: socfpga: agilex: fix up s2f_user0_clk representation
clk: socfpga: agilex: fix the parents of the psi_ref_clk
tools/thermal/tmon: Add cross compiling support
selftests/ftrace: Fix requirement check of README file
ceph: fix dereference of null pointer cf
9p/xen: Fix end of loop tests for list_for_each_entry
xen: fix setting of max_pfn in shared_info
powerpc/perf/hv-gpci: Fix counter value parsing
PCI/MSI: Skip masking MSI-X on Xen PV
blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN
blk-zoned: allow zone management send operations without CAP_SYS_ADMIN
btrfs: reset replace target device to allocation state on close
btrfs: wake up async_delalloc_pages waiters after submit
io-wq: fix wakeup race when adding new work
io_uring: fail links of cancelled timeouts
io_uring: add ->splice_fd_in checks
io_uring: place fixed tables under memcg limits
io_uring: limit fixed table size by RLIMIT_NOFILE
rtc: tps65910: Correct driver module alias
Conflicts:
Documentation/devicetree/bindings
Documentation/devicetree/bindings/arm/tegra.yaml
Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
Documentation/devicetree/bindings/mtd/gpmc-nand.txt
Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt
Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
drivers/hwmon/pmbus/ibm-cffps.c
drivers/scsi/ufs/ufshcd-pltfrm.c
Change-Id: I94d112906379c4c336a78341d21cd20b1eb7d420
Signed-off-by: Sivasri Kumar, Vanka <quic_svanka@quicinc.com>
2082 lines
67 KiB
Makefile
2082 lines
67 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
VERSION = 5
|
|
PATCHLEVEL = 10
|
|
SUBLEVEL = 81
|
|
EXTRAVERSION =
|
|
NAME = Dare mighty things
|
|
|
|
# *DOCUMENTATION*
|
|
# To see a list of typical targets execute "make help"
|
|
# More info can be located in ./README
|
|
# Comments in this file are targeted only to the developer, do not
|
|
# expect to learn how to build the kernel reading this file.
|
|
|
|
$(if $(filter __%, $(MAKECMDGOALS)), \
|
|
$(error targets prefixed with '__' are only for internal use))
|
|
|
|
# That's our default target when none is given on the command line
|
|
PHONY := __all
|
|
__all:
|
|
|
|
# We are using a recursive build, so we need to do a little thinking
|
|
# to get the ordering right.
|
|
#
|
|
# Most importantly: sub-Makefiles should only ever modify files in
|
|
# their own directory. If in some directory we have a dependency on
|
|
# a file in another dir (which doesn't happen often, but it's often
|
|
# unavoidable when linking the built-in.a targets which finally
|
|
# turn into vmlinux), we will call a sub make in that other dir, and
|
|
# after that we are sure that everything which is in that other dir
|
|
# is now up to date.
|
|
#
|
|
# The only cases where we need to modify files which have global
|
|
# effects are thus separated out and done before the recursive
|
|
# descending is started. They are now explicitly listed as the
|
|
# prepare rule.
|
|
|
|
ifneq ($(sub_make_done),1)
|
|
|
|
# Do not use make's built-in rules and variables
|
|
# (this increases performance and avoids hard-to-debug behaviour)
|
|
MAKEFLAGS += -rR
|
|
|
|
# Avoid funny character set dependencies
|
|
unexport LC_ALL
|
|
LC_COLLATE=C
|
|
LC_NUMERIC=C
|
|
export LC_COLLATE LC_NUMERIC
|
|
|
|
# Avoid interference with shell env settings
|
|
unexport GREP_OPTIONS
|
|
|
|
# Beautify output
|
|
# ---------------------------------------------------------------------------
|
|
#
|
|
# Normally, we echo the whole command before executing it. By making
|
|
# that echo $($(quiet)$(cmd)), we now have the possibility to set
|
|
# $(quiet) to choose other forms of output instead, e.g.
|
|
#
|
|
# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
|
|
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
|
|
#
|
|
# If $(quiet) is empty, the whole command will be printed.
|
|
# If it is set to "quiet_", only the short version will be printed.
|
|
# If it is set to "silent_", nothing will be printed at all, since
|
|
# the variable $(silent_cmd_cc_o_c) doesn't exist.
|
|
#
|
|
# A simple variant is to prefix commands with $(Q) - that's useful
|
|
# for commands that shall be hidden in non-verbose mode.
|
|
#
|
|
# $(Q)ln $@ :<
|
|
#
|
|
# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
|
|
# If KBUILD_VERBOSE equals 1 then the above command is displayed.
|
|
# If KBUILD_VERBOSE equals 2 then give the reason why each target is rebuilt.
|
|
#
|
|
# To put more focus on warnings, be less verbose as default
|
|
# Use 'make V=1' to see the full commands
|
|
|
|
ifeq ("$(origin V)", "command line")
|
|
KBUILD_VERBOSE = $(V)
|
|
endif
|
|
ifndef KBUILD_VERBOSE
|
|
KBUILD_VERBOSE = 0
|
|
endif
|
|
|
|
ifeq ($(KBUILD_VERBOSE),1)
|
|
quiet =
|
|
Q =
|
|
else
|
|
quiet=quiet_
|
|
Q = @
|
|
endif
|
|
|
|
# If the user is running make -s (silent mode), suppress echoing of
|
|
# commands
|
|
|
|
ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
|
|
quiet=silent_
|
|
endif
|
|
|
|
export quiet Q KBUILD_VERBOSE
|
|
|
|
# Kbuild will save output files in the current working directory.
|
|
# This does not need to match to the root of the kernel source tree.
|
|
#
|
|
# For example, you can do this:
|
|
#
|
|
# cd /dir/to/store/output/files; make -f /dir/to/kernel/source/Makefile
|
|
#
|
|
# If you want to save output files in a different location, there are
|
|
# two syntaxes to specify it.
|
|
#
|
|
# 1) O=
|
|
# Use "make O=dir/to/store/output/files/"
|
|
#
|
|
# 2) Set KBUILD_OUTPUT
|
|
# Set the environment variable KBUILD_OUTPUT to point to the output directory.
|
|
# export KBUILD_OUTPUT=dir/to/store/output/files/; make
|
|
#
|
|
# The O= assignment takes precedence over the KBUILD_OUTPUT environment
|
|
# variable.
|
|
|
|
# Do we want to change the working directory?
|
|
ifeq ("$(origin O)", "command line")
|
|
KBUILD_OUTPUT := $(O)
|
|
endif
|
|
|
|
ifneq ($(KBUILD_OUTPUT),)
|
|
# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot
|
|
# expand a shell special character '~'. We use a somewhat tedious way here.
|
|
abs_objtree := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd)
|
|
$(if $(abs_objtree),, \
|
|
$(error failed to create output directory "$(KBUILD_OUTPUT)"))
|
|
|
|
# $(realpath ...) resolves symlinks
|
|
abs_objtree := $(realpath $(abs_objtree))
|
|
else
|
|
abs_objtree := $(CURDIR)
|
|
endif # ifneq ($(KBUILD_OUTPUT),)
|
|
|
|
ifeq ($(abs_objtree),$(CURDIR))
|
|
# Suppress "Entering directory ..." unless we are changing the work directory.
|
|
MAKEFLAGS += --no-print-directory
|
|
else
|
|
need-sub-make := 1
|
|
endif
|
|
|
|
abs_srctree := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
|
|
|
ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
|
|
$(error source directory cannot contain spaces or colons)
|
|
endif
|
|
|
|
ifneq ($(abs_srctree),$(abs_objtree))
|
|
# Look for make include files relative to root of kernel src
|
|
#
|
|
# This does not become effective immediately because MAKEFLAGS is re-parsed
|
|
# once after the Makefile is read. We need to invoke sub-make.
|
|
MAKEFLAGS += --include-dir=$(abs_srctree)
|
|
need-sub-make := 1
|
|
endif
|
|
|
|
this-makefile := $(lastword $(MAKEFILE_LIST))
|
|
|
|
ifneq ($(filter 3.%,$(MAKE_VERSION)),)
|
|
# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x
|
|
# We need to invoke sub-make to avoid implicit rules in the top Makefile.
|
|
need-sub-make := 1
|
|
# Cancel implicit rules for this Makefile.
|
|
$(this-makefile): ;
|
|
endif
|
|
|
|
export abs_srctree abs_objtree
|
|
export sub_make_done := 1
|
|
|
|
ifeq ($(need-sub-make),1)
|
|
|
|
PHONY += $(MAKECMDGOALS) __sub-make
|
|
|
|
$(filter-out $(this-makefile), $(MAKECMDGOALS)) __all: __sub-make
|
|
@:
|
|
|
|
# Invoke a second make in the output directory, passing relevant variables
|
|
__sub-make:
|
|
$(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS)
|
|
|
|
endif # need-sub-make
|
|
endif # sub_make_done
|
|
|
|
# We process the rest of the Makefile if this is the final invocation of make
|
|
ifeq ($(need-sub-make),)
|
|
|
|
# Do not print "Entering directory ...",
|
|
# but we want to display it when entering to the output directory
|
|
# so that IDEs/editors are able to understand relative filenames.
|
|
MAKEFLAGS += --no-print-directory
|
|
|
|
# Call a source code checker (by default, "sparse") as part of the
|
|
# C compilation.
|
|
#
|
|
# Use 'make C=1' to enable checking of only re-compiled files.
|
|
# Use 'make C=2' to enable checking of *all* source files, regardless
|
|
# of whether they are re-compiled or not.
|
|
#
|
|
# See the file "Documentation/dev-tools/sparse.rst" for more details,
|
|
# including where to get the "sparse" utility.
|
|
|
|
ifeq ("$(origin C)", "command line")
|
|
KBUILD_CHECKSRC = $(C)
|
|
endif
|
|
ifndef KBUILD_CHECKSRC
|
|
KBUILD_CHECKSRC = 0
|
|
endif
|
|
|
|
# Use make M=dir or set the environment variable KBUILD_EXTMOD to specify the
|
|
# directory of external module to build. Setting M= takes precedence.
|
|
ifeq ("$(origin M)", "command line")
|
|
KBUILD_EXTMOD := $(M)
|
|
endif
|
|
|
|
$(if $(word 2, $(KBUILD_EXTMOD)), \
|
|
$(error building multiple external modules is not supported))
|
|
|
|
export KBUILD_CHECKSRC KBUILD_EXTMOD
|
|
|
|
extmod-prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
|
|
|
|
# ANDROID: set up mixed-build support. mixed-build allows device kernel modules
|
|
# to be compiled against a GKI kernel. This approach still uses the headers and
|
|
# Kbuild from device kernel, so care must be taken to ensure that those headers match.
|
|
ifdef KBUILD_MIXED_TREE
|
|
# Need vmlinux.symvers for modpost and System.map for depmod, check whether they exist in KBUILD_MIXED_TREE
|
|
required_mixed_files=vmlinux.symvers System.map
|
|
$(if $(filter-out $(words $(required_mixed_files)), \
|
|
$(words $(wildcard $(add-prefix $(KBUILD_MIXED_TREE)/,$(required_mixed_files))))),,\
|
|
$(error KBUILD_MIXED_TREE=$(KBUILD_MIXED_TREE) doesn't contain $(required_mixed_files)))
|
|
endif
|
|
|
|
mixed-build-prefix = $(if $(KBUILD_MIXED_TREE),$(KBUILD_MIXED_TREE)/)
|
|
export KBUILD_MIXED_TREE
|
|
|
|
ifeq ($(abs_srctree),$(abs_objtree))
|
|
# building in the source tree
|
|
srctree := .
|
|
building_out_of_srctree :=
|
|
else
|
|
ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
|
|
# building in a subdirectory of the source tree
|
|
srctree := ..
|
|
else
|
|
srctree := $(abs_srctree)
|
|
endif
|
|
building_out_of_srctree := 1
|
|
endif
|
|
|
|
ifneq ($(KBUILD_ABS_SRCTREE),)
|
|
srctree := $(abs_srctree)
|
|
endif
|
|
|
|
objtree := .
|
|
VPATH := $(srctree)
|
|
|
|
export building_out_of_srctree srctree objtree VPATH
|
|
|
|
# To make sure we do not include .config for any of the *config targets
|
|
# catch them early, and hand them over to scripts/kconfig/Makefile
|
|
# It is allowed to specify more targets when calling make, including
|
|
# mixing *config targets and build targets.
|
|
# For example 'make oldconfig all'.
|
|
# Detect when mixed targets is specified, and make a second invocation
|
|
# of make so .config is not included in this case either (for *config).
|
|
|
|
version_h := include/generated/uapi/linux/version.h
|
|
old_version_h := include/linux/version.h
|
|
|
|
clean-targets := %clean mrproper cleandocs
|
|
no-dot-config-targets := $(clean-targets) \
|
|
cscope gtags TAGS tags help% %docs check% coccicheck \
|
|
$(version_h) headers headers_% archheaders archscripts \
|
|
%asm-generic kernelversion %src-pkg dt_binding_check \
|
|
outputmakefile
|
|
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \
|
|
image_name
|
|
single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
|
|
|
|
config-build :=
|
|
mixed-build :=
|
|
need-config := 1
|
|
may-sync-config := 1
|
|
single-build :=
|
|
|
|
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
|
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
|
need-config :=
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
|
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
|
may-sync-config :=
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(KBUILD_EXTMOD),)
|
|
may-sync-config :=
|
|
endif
|
|
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
ifneq ($(filter %config,$(MAKECMDGOALS)),)
|
|
config-build := 1
|
|
ifneq ($(words $(MAKECMDGOALS)),1)
|
|
mixed-build := 1
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
# We cannot build single targets and the others at the same time
|
|
ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
|
|
single-build := 1
|
|
ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
|
|
mixed-build := 1
|
|
endif
|
|
endif
|
|
|
|
# For "make -j clean all", "make -j mrproper defconfig all", etc.
|
|
ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
|
|
ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
|
|
mixed-build := 1
|
|
endif
|
|
endif
|
|
|
|
# install and modules_install need also be processed one by one
|
|
ifneq ($(filter install,$(MAKECMDGOALS)),)
|
|
ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
|
|
mixed-build := 1
|
|
endif
|
|
endif
|
|
|
|
ifdef mixed-build
|
|
# ===========================================================================
|
|
# We're called with mixed targets (*config and build targets).
|
|
# Handle them one by one.
|
|
|
|
PHONY += $(MAKECMDGOALS) __build_one_by_one
|
|
|
|
$(MAKECMDGOALS): __build_one_by_one
|
|
@:
|
|
|
|
__build_one_by_one:
|
|
$(Q)set -e; \
|
|
for i in $(MAKECMDGOALS); do \
|
|
$(MAKE) -f $(srctree)/Makefile $$i; \
|
|
done
|
|
|
|
else # !mixed-build
|
|
|
|
include scripts/Kbuild.include
|
|
|
|
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
|
|
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
|
|
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
|
|
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
|
|
|
|
include scripts/subarch.include
|
|
|
|
# Cross compiling and selecting different set of gcc/bin-utils
|
|
# ---------------------------------------------------------------------------
|
|
#
|
|
# When performing cross compilation for other architectures ARCH shall be set
|
|
# to the target architecture. (See arch/* for the possibilities).
|
|
# ARCH can be set during invocation of make:
|
|
# make ARCH=ia64
|
|
# Another way is to have ARCH set in the environment.
|
|
# The default ARCH is the host where make is executed.
|
|
|
|
# CROSS_COMPILE specify the prefix used for all executables used
|
|
# during compilation. Only gcc and related bin-utils executables
|
|
# are prefixed with $(CROSS_COMPILE).
|
|
# CROSS_COMPILE can be set on the command line
|
|
# make CROSS_COMPILE=ia64-linux-
|
|
# Alternatively CROSS_COMPILE can be set in the environment.
|
|
# Default value for CROSS_COMPILE is not to prefix executables
|
|
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
|
|
ARCH ?= $(SUBARCH)
|
|
|
|
# Architecture as present in compile.h
|
|
UTS_MACHINE := $(ARCH)
|
|
SRCARCH := $(ARCH)
|
|
|
|
# Additional ARCH settings for x86
|
|
ifeq ($(ARCH),i386)
|
|
SRCARCH := x86
|
|
endif
|
|
ifeq ($(ARCH),x86_64)
|
|
SRCARCH := x86
|
|
endif
|
|
|
|
# Additional ARCH settings for sparc
|
|
ifeq ($(ARCH),sparc32)
|
|
SRCARCH := sparc
|
|
endif
|
|
ifeq ($(ARCH),sparc64)
|
|
SRCARCH := sparc
|
|
endif
|
|
|
|
# Additional ARCH settings for sh
|
|
ifeq ($(ARCH),sh64)
|
|
SRCARCH := sh
|
|
endif
|
|
|
|
KCONFIG_CONFIG ?= .config
|
|
export KCONFIG_CONFIG
|
|
|
|
# Default file for 'make defconfig'. This may be overridden by arch-Makefile.
|
|
export KBUILD_DEFCONFIG := defconfig
|
|
|
|
# SHELL used by kbuild
|
|
CONFIG_SHELL := sh
|
|
|
|
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
|
|
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
|
|
HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
|
|
|
|
ifneq ($(LLVM),)
|
|
HOSTCC = clang
|
|
HOSTCXX = clang++
|
|
else
|
|
HOSTCC = gcc
|
|
HOSTCXX = g++
|
|
endif
|
|
|
|
export KBUILD_USERCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
|
|
-O2 -fomit-frame-pointer -std=gnu89
|
|
export KBUILD_USERLDFLAGS :=
|
|
|
|
KBUILD_HOSTCFLAGS := $(KBUILD_USERCFLAGS) $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
|
|
KBUILD_HOSTCXXFLAGS := -Wall -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
|
|
KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
|
|
KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
|
|
|
|
# Make variables (CC, etc...)
|
|
CPP = $(CC) -E
|
|
ifneq ($(LLVM),)
|
|
CC = clang
|
|
LD = ld.lld
|
|
AR = llvm-ar
|
|
NM = llvm-nm
|
|
OBJCOPY = llvm-objcopy
|
|
OBJDUMP = llvm-objdump
|
|
READELF = llvm-readelf
|
|
STRIP = llvm-strip
|
|
else
|
|
CC = $(CROSS_COMPILE)gcc
|
|
LD = $(CROSS_COMPILE)ld
|
|
AR = $(CROSS_COMPILE)ar
|
|
NM = $(CROSS_COMPILE)nm
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
|
READELF = $(CROSS_COMPILE)readelf
|
|
STRIP = $(CROSS_COMPILE)strip
|
|
endif
|
|
PAHOLE = pahole
|
|
RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids
|
|
LEX = flex
|
|
YACC = bison
|
|
AWK = awk
|
|
INSTALLKERNEL := installkernel
|
|
DEPMOD = depmod
|
|
PERL = perl
|
|
PYTHON = python
|
|
PYTHON3 = python3
|
|
CHECK = sparse
|
|
BASH = bash
|
|
KGZIP = gzip
|
|
KBZIP2 = bzip2
|
|
KLZOP = lzop
|
|
LZMA = lzma
|
|
LZ4 = lz4
|
|
XZ = xz
|
|
ZSTD = zstd
|
|
|
|
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
|
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
|
|
NOSTDINC_FLAGS :=
|
|
CFLAGS_MODULE =
|
|
AFLAGS_MODULE =
|
|
LDFLAGS_MODULE =
|
|
CFLAGS_KERNEL =
|
|
AFLAGS_KERNEL =
|
|
LDFLAGS_vmlinux =
|
|
|
|
# Use USERINCLUDE when you must reference the UAPI directories only.
|
|
USERINCLUDE := \
|
|
-I$(srctree)/arch/$(SRCARCH)/include/uapi \
|
|
-I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \
|
|
-I$(srctree)/include/uapi \
|
|
-I$(objtree)/include/generated/uapi \
|
|
-include $(srctree)/include/linux/kconfig.h
|
|
|
|
# Use LINUXINCLUDE when you must reference the include/ directory.
|
|
# Needed to be compatible with the O= option
|
|
LINUXINCLUDE := \
|
|
-I$(srctree)/arch/$(SRCARCH)/include \
|
|
-I$(objtree)/arch/$(SRCARCH)/include/generated \
|
|
$(if $(building_out_of_srctree),-I$(srctree)/include) \
|
|
-I$(objtree)/include \
|
|
$(USERINCLUDE)
|
|
|
|
KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
|
|
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
|
|
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
|
|
-Werror=implicit-function-declaration -Werror=implicit-int \
|
|
-Werror=return-type -Wno-format-security \
|
|
-std=gnu89
|
|
KBUILD_CPPFLAGS := -D__KERNEL__
|
|
KBUILD_AFLAGS_KERNEL :=
|
|
KBUILD_CFLAGS_KERNEL :=
|
|
KBUILD_AFLAGS_MODULE := -DMODULE
|
|
KBUILD_CFLAGS_MODULE := -DMODULE
|
|
KBUILD_LDFLAGS_MODULE :=
|
|
KBUILD_LDFLAGS :=
|
|
CLANG_FLAGS :=
|
|
|
|
CC := scripts/basic/cc-wrapper $(CC)
|
|
|
|
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
|
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
|
export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
|
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
|
|
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
|
|
|
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS
|
|
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
|
|
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
|
|
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
|
|
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
|
|
|
|
# Files to ignore in find ... statements
|
|
|
|
export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \
|
|
-name CVS -o -name .pc -o -name .hg -o -name .git \) \
|
|
-prune -o
|
|
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
|
|
--exclude CVS --exclude .pc --exclude .hg --exclude .git
|
|
|
|
# ===========================================================================
|
|
# Rules shared between *config targets and build targets
|
|
|
|
# Basic helpers built in scripts/basic/
|
|
PHONY += scripts_basic
|
|
scripts_basic:
|
|
$(Q)$(MAKE) $(build)=scripts/basic
|
|
$(Q)rm -f .tmp_quiet_recordmcount
|
|
|
|
PHONY += outputmakefile
|
|
# Before starting out-of-tree build, make sure the source tree is clean.
|
|
# outputmakefile generates a Makefile in the output directory, if using a
|
|
# separate output directory. This allows convenient use of make in the
|
|
# output directory.
|
|
# At the same time when output Makefile generated, generate .gitignore to
|
|
# ignore whole output directory
|
|
outputmakefile:
|
|
ifdef building_out_of_srctree
|
|
$(Q)if [ -f $(srctree)/.config -o \
|
|
-d $(srctree)/include/config -o \
|
|
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
|
echo >&2 "***"; \
|
|
echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
|
|
echo >&2 "*** in $(abs_srctree)";\
|
|
echo >&2 "***"; \
|
|
false; \
|
|
fi
|
|
$(Q)ln -fsn $(srctree) source
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
|
$(Q)test -e .gitignore || \
|
|
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
|
|
endif
|
|
|
|
ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
|
|
ifneq ($(CROSS_COMPILE),)
|
|
CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
|
|
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
|
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
|
|
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
|
endif
|
|
ifneq ($(GCC_TOOLCHAIN),)
|
|
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
|
endif
|
|
ifneq ($(LLVM_IAS),1)
|
|
CLANG_FLAGS += -no-integrated-as
|
|
endif
|
|
CLANG_FLAGS += -Werror=unknown-warning-option
|
|
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
|
KBUILD_AFLAGS += $(CLANG_FLAGS)
|
|
export CLANG_FLAGS
|
|
endif
|
|
|
|
# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
|
|
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
|
|
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
|
|
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
|
|
CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)
|
|
|
|
ifdef config-build
|
|
# ===========================================================================
|
|
# *config targets only - make sure prerequisites are updated, and descend
|
|
# in scripts/kconfig to make the *config target
|
|
|
|
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
|
|
# KBUILD_DEFCONFIG may point out an alternative default configuration
|
|
# used for 'make defconfig'
|
|
include arch/$(SRCARCH)/Makefile
|
|
export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT
|
|
|
|
config: outputmakefile scripts_basic FORCE
|
|
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
|
|
|
%config: outputmakefile scripts_basic FORCE
|
|
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
|
|
|
else #!config-build
|
|
# ===========================================================================
|
|
# Build targets only - this includes vmlinux, arch specific targets, clean
|
|
# targets and others. In general all targets except *config targets.
|
|
|
|
# If building an external module we do not care about the all: rule
|
|
# but instead __all depend on modules
|
|
PHONY += all
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
__all: all
|
|
else
|
|
__all: modules
|
|
endif
|
|
|
|
# Decide whether to build built-in, modular, or both.
|
|
# Normally, just do built-in.
|
|
|
|
KBUILD_MODULES :=
|
|
KBUILD_BUILTIN := 1
|
|
|
|
# If we have only "make modules", don't compile built-in objects.
|
|
ifeq ($(MAKECMDGOALS),modules)
|
|
KBUILD_BUILTIN :=
|
|
endif
|
|
|
|
# If we have "make <whatever> modules", compile modules
|
|
# in addition to whatever we do anyway.
|
|
# Just "make" or "make all" shall build modules as well
|
|
|
|
ifneq ($(filter all modules nsdeps %compile_commands.json clang-%,$(MAKECMDGOALS)),)
|
|
KBUILD_MODULES := 1
|
|
endif
|
|
|
|
ifeq ($(MAKECMDGOALS),)
|
|
KBUILD_MODULES := 1
|
|
endif
|
|
|
|
export KBUILD_MODULES KBUILD_BUILTIN
|
|
|
|
ifdef need-config
|
|
include include/config/auto.conf
|
|
endif
|
|
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
# Objects we will link into vmlinux / subdirs we need to visit
|
|
core-y := init/ usr/
|
|
drivers-y := drivers/ sound/ techpack/
|
|
drivers-$(CONFIG_SAMPLES) += samples/
|
|
drivers-y += net/ virt/
|
|
libs-y := lib/
|
|
endif # KBUILD_EXTMOD
|
|
|
|
ifndef KBUILD_MIXED_TREE
|
|
# The all: target is the default when no target is given on the
|
|
# command line.
|
|
# This allow a user to issue only 'make' to build a kernel including modules
|
|
# Defaults to vmlinux, but the arch makefile usually adds further targets
|
|
all: vmlinux
|
|
endif
|
|
|
|
CFLAGS_GCOV := -fprofile-arcs -ftest-coverage \
|
|
$(call cc-option,-fno-tree-loop-im) \
|
|
$(call cc-disable-warning,maybe-uninitialized,)
|
|
export CFLAGS_GCOV
|
|
|
|
# The arch Makefiles can override CC_FLAGS_FTRACE. We may also append it later.
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
CC_FLAGS_FTRACE := -pg
|
|
endif
|
|
|
|
RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
|
|
RETPOLINE_VDSO_CFLAGS_GCC := -mindirect-branch=thunk-inline -mindirect-branch-register
|
|
RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk
|
|
RETPOLINE_VDSO_CFLAGS_CLANG := -mretpoline
|
|
RETPOLINE_CFLAGS := $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG)))
|
|
RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_VDSO_CFLAGS_CLANG)))
|
|
export RETPOLINE_CFLAGS
|
|
export RETPOLINE_VDSO_CFLAGS
|
|
|
|
include arch/$(SRCARCH)/Makefile
|
|
|
|
ifdef need-config
|
|
ifdef may-sync-config
|
|
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
|
|
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
|
|
# because some architectures define CROSS_COMPILE there.
|
|
include include/config/auto.conf.cmd
|
|
|
|
$(KCONFIG_CONFIG):
|
|
@echo >&2 '***'
|
|
@echo >&2 '*** Configuration file "$@" not found!'
|
|
@echo >&2 '***'
|
|
@echo >&2 '*** Please run some configurator (e.g. "make oldconfig" or'
|
|
@echo >&2 '*** "make menuconfig" or "make xconfig").'
|
|
@echo >&2 '***'
|
|
@/bin/false
|
|
|
|
# The actual configuration files used during the build are stored in
|
|
# include/generated/ and include/config/. Update them if .config is newer than
|
|
# include/config/auto.conf (which mirrors .config).
|
|
#
|
|
# This exploits the 'multi-target pattern rule' trick.
|
|
# The syncconfig should be executed only once to make all the targets.
|
|
# (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
|
|
#
|
|
# Do not use $(call cmd,...) here. That would suppress prompts from syncconfig,
|
|
# so you cannot notice that Kconfig is waiting for the user input.
|
|
%/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h: $(KCONFIG_CONFIG)
|
|
$(Q)$(kecho) " SYNC $@"
|
|
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
|
|
else # !may-sync-config
|
|
# External modules and some install targets need include/generated/autoconf.h
|
|
# and include/config/auto.conf but do not care if they are up-to-date.
|
|
# Use auto.conf to trigger the test
|
|
PHONY += include/config/auto.conf
|
|
|
|
include/config/auto.conf:
|
|
$(Q)test -e include/generated/autoconf.h -a -e $@ || ( \
|
|
echo >&2; \
|
|
echo >&2 " ERROR: Kernel configuration is invalid."; \
|
|
echo >&2 " include/generated/autoconf.h or $@ are missing.";\
|
|
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
|
|
echo >&2 ; \
|
|
/bin/false)
|
|
|
|
endif # may-sync-config
|
|
endif # need-config
|
|
|
|
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
|
|
|
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
|
KBUILD_CFLAGS += -O2
|
|
else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
|
KBUILD_CFLAGS += -O3
|
|
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
|
KBUILD_CFLAGS += -Os
|
|
endif
|
|
|
|
# Tell gcc to never replace conditional load with a non-conditional one
|
|
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
|
|
KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races)
|
|
|
|
ifdef CONFIG_READABLE_ASM
|
|
# Disable optimizations that make assembler listings hard to read.
|
|
# reorder blocks reorders the control in the function
|
|
# ipa clone creates specialized cloned functions
|
|
# partial inlining inlines only parts of functions
|
|
KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
|
|
$(call cc-option,-fno-ipa-cp-clone,) \
|
|
$(call cc-option,-fno-partial-inlining)
|
|
endif
|
|
|
|
ifneq ($(CONFIG_FRAME_WARN),0)
|
|
KBUILD_CFLAGS += -Wframe-larger-than=$(CONFIG_FRAME_WARN)
|
|
endif
|
|
|
|
stackp-flags-y := -fno-stack-protector
|
|
stackp-flags-$(CONFIG_STACKPROTECTOR) := -fstack-protector
|
|
stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
|
|
|
|
KBUILD_CFLAGS += $(stackp-flags-y)
|
|
|
|
ifdef CONFIG_CC_IS_CLANG
|
|
KBUILD_CPPFLAGS += -Qunused-arguments
|
|
KBUILD_CFLAGS += -Wno-format-invalid-specifier
|
|
KBUILD_CFLAGS += -Wno-gnu
|
|
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
|
|
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
|
|
# See modpost pattern 2
|
|
KBUILD_CFLAGS += -mno-global-merge
|
|
else
|
|
|
|
# Warn about unmarked fall-throughs in switch statement.
|
|
# Disabled for clang while comment to attribute conversion happens and
|
|
# https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
|
|
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
|
|
endif
|
|
|
|
# These warnings generated too much noise in a regular build.
|
|
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
|
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
|
ifdef CONFIG_FRAME_POINTER
|
|
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
|
else
|
|
# Some targets (ARM with Thumb2, for example), can't be built with frame
|
|
# pointers. For those, we don't have FUNCTION_TRACER automatically
|
|
# select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is
|
|
# incompatible with -fomit-frame-pointer with current GCC, so we don't use
|
|
# -fomit-frame-pointer with FUNCTION_TRACER.
|
|
ifndef CONFIG_FUNCTION_TRACER
|
|
KBUILD_CFLAGS += -fomit-frame-pointer
|
|
endif
|
|
endif
|
|
|
|
# Initialize all stack variables with a 0xAA pattern.
|
|
ifdef CONFIG_INIT_STACK_ALL_PATTERN
|
|
KBUILD_CFLAGS += -ftrivial-auto-var-init=pattern
|
|
endif
|
|
|
|
# Initialize all stack variables with a zero value.
|
|
ifdef CONFIG_INIT_STACK_ALL_ZERO
|
|
# Future support for zero initialization is still being debated, see
|
|
# https://bugs.llvm.org/show_bug.cgi?id=45497. These flags are subject to being
|
|
# renamed or dropped.
|
|
KBUILD_CFLAGS += -ftrivial-auto-var-init=zero
|
|
KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
|
|
endif
|
|
|
|
DEBUG_CFLAGS :=
|
|
|
|
# Workaround for GCC versions < 5.0
|
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
|
|
ifdef CONFIG_CC_IS_GCC
|
|
DEBUG_CFLAGS += $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments))
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO
|
|
|
|
ifdef CONFIG_DEBUG_INFO_SPLIT
|
|
DEBUG_CFLAGS += -gsplit-dwarf
|
|
else
|
|
DEBUG_CFLAGS += -g
|
|
endif
|
|
|
|
ifneq ($(LLVM_IAS),1)
|
|
KBUILD_AFLAGS += -Wa,-gdwarf-2
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO_DWARF4
|
|
DEBUG_CFLAGS += -gdwarf-4
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO_REDUCED
|
|
DEBUG_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
|
|
$(call cc-option,-fno-var-tracking)
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO_COMPRESSED
|
|
DEBUG_CFLAGS += -gz=zlib
|
|
KBUILD_AFLAGS += -gz=zlib
|
|
KBUILD_LDFLAGS += --compress-debug-sections=zlib
|
|
endif
|
|
|
|
endif # CONFIG_DEBUG_INFO
|
|
|
|
KBUILD_CFLAGS += $(DEBUG_CFLAGS)
|
|
export DEBUG_CFLAGS
|
|
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
ifdef CONFIG_FTRACE_MCOUNT_USE_CC
|
|
CC_FLAGS_FTRACE += -mrecord-mcount
|
|
ifdef CONFIG_HAVE_NOP_MCOUNT
|
|
ifeq ($(call cc-option-yn, -mnop-mcount),y)
|
|
CC_FLAGS_FTRACE += -mnop-mcount
|
|
CC_FLAGS_USING += -DCC_USING_NOP_MCOUNT
|
|
endif
|
|
endif
|
|
endif
|
|
ifdef CONFIG_FTRACE_MCOUNT_USE_OBJTOOL
|
|
CC_FLAGS_USING += -DCC_USING_NOP_MCOUNT
|
|
endif
|
|
ifdef CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT
|
|
ifdef CONFIG_HAVE_C_RECORDMCOUNT
|
|
BUILD_C_RECORDMCOUNT := y
|
|
export BUILD_C_RECORDMCOUNT
|
|
endif
|
|
endif
|
|
ifdef CONFIG_HAVE_FENTRY
|
|
ifeq ($(call cc-option-yn, -mfentry),y)
|
|
CC_FLAGS_FTRACE += -mfentry
|
|
CC_FLAGS_USING += -DCC_USING_FENTRY
|
|
endif
|
|
endif
|
|
export CC_FLAGS_FTRACE
|
|
KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_FLAGS_USING)
|
|
KBUILD_AFLAGS += $(CC_FLAGS_USING)
|
|
endif
|
|
|
|
# We trigger additional mismatches with less inlining
|
|
ifdef CONFIG_DEBUG_SECTION_MISMATCH
|
|
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
|
|
endif
|
|
|
|
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
|
|
KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
|
|
LDFLAGS_vmlinux += --gc-sections
|
|
endif
|
|
|
|
ifdef CONFIG_SHADOW_CALL_STACK
|
|
CC_FLAGS_SCS := -fsanitize=shadow-call-stack
|
|
KBUILD_CFLAGS += $(CC_FLAGS_SCS)
|
|
export CC_FLAGS_SCS
|
|
endif
|
|
|
|
ifdef CONFIG_LTO_CLANG
|
|
ifdef CONFIG_LTO_CLANG_THIN
|
|
CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit
|
|
KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod-prefix).thinlto-cache
|
|
else
|
|
CC_FLAGS_LTO := -flto
|
|
endif
|
|
|
|
ifeq ($(SRCARCH),x86)
|
|
# TODO(b/182572011): Revert workaround for compiler / linker bug.
|
|
CC_FLAGS_LTO += -fvisibility=hidden
|
|
else
|
|
CC_FLAGS_LTO += -fvisibility=default
|
|
endif
|
|
|
|
# Limit inlining across translation units to reduce binary size
|
|
KBUILD_LDFLAGS += -mllvm -import-instr-limit=5
|
|
endif
|
|
|
|
ifdef CONFIG_LTO
|
|
KBUILD_CFLAGS += $(CC_FLAGS_LTO)
|
|
export CC_FLAGS_LTO
|
|
endif
|
|
|
|
ifdef CONFIG_CFI_CLANG
|
|
CC_FLAGS_CFI := -fsanitize=cfi \
|
|
-fsanitize-cfi-cross-dso \
|
|
-fno-sanitize-cfi-canonical-jump-tables \
|
|
-fno-sanitize-blacklist
|
|
|
|
ifdef CONFIG_CFI_PERMISSIVE
|
|
CC_FLAGS_CFI += -fsanitize-recover=cfi \
|
|
-fno-sanitize-trap=cfi
|
|
else
|
|
ifndef CONFIG_UBSAN_TRAP
|
|
CC_FLAGS_CFI += -ftrap-function=__ubsan_handle_cfi_check_fail_abort
|
|
endif
|
|
endif
|
|
|
|
# If LTO flags are filtered out, we must also filter out CFI.
|
|
CC_FLAGS_LTO += $(CC_FLAGS_CFI)
|
|
KBUILD_CFLAGS += $(CC_FLAGS_CFI)
|
|
export CC_FLAGS_CFI
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B
|
|
KBUILD_CFLAGS += -falign-functions=32
|
|
endif
|
|
|
|
# arch Makefile may override CC so keep this after arch Makefile is included
|
|
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
|
|
|
# warn about C99 declaration after statement
|
|
KBUILD_CFLAGS += -Wdeclaration-after-statement
|
|
|
|
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
|
|
KBUILD_CFLAGS += -Wvla
|
|
|
|
# disable pointer signed / unsigned warnings in gcc 4.0
|
|
KBUILD_CFLAGS += -Wno-pointer-sign
|
|
|
|
# disable stringop warnings in gcc 8+
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
|
|
|
|
# We'll want to enable this eventually, but it's not going away for 5.7 at least
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
|
|
|
|
# Another good warning that we'll want to enable eventually
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
|
|
|
|
# Enabled with W=2, disabled by default as noisy
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
|
|
|
|
# disable invalid "can't wrap" optimizations for signed / pointers
|
|
KBUILD_CFLAGS += -fno-strict-overflow
|
|
|
|
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
|
|
KBUILD_CFLAGS += -fno-stack-check
|
|
|
|
# conserve stack if available
|
|
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
|
|
|
|
# Prohibit date/time macros, which would make the build non-deterministic
|
|
KBUILD_CFLAGS += -Werror=date-time
|
|
|
|
# enforce correct pointer usage
|
|
KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
|
|
|
|
# Require designated initializers for all marked structures
|
|
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
|
|
|
|
# change __FILE__ to the relative path from the srctree
|
|
KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
|
|
|
# include additional Makefiles when needed
|
|
include-y := scripts/Makefile.extrawarn
|
|
include-$(CONFIG_KASAN) += scripts/Makefile.kasan
|
|
include-$(CONFIG_KCSAN) += scripts/Makefile.kcsan
|
|
include-$(CONFIG_UBSAN) += scripts/Makefile.ubsan
|
|
include-$(CONFIG_KCOV) += scripts/Makefile.kcov
|
|
include-$(CONFIG_GCC_PLUGINS) += scripts/Makefile.gcc-plugins
|
|
|
|
include $(addprefix $(srctree)/, $(include-y))
|
|
|
|
# scripts/Makefile.gcc-plugins is intentionally included last.
|
|
# Do not add $(call cc-option,...) below this line. When you build the kernel
|
|
# from the clean source tree, the GCC plugins do not exist at this point.
|
|
|
|
# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
|
|
KBUILD_CPPFLAGS += $(KCPPFLAGS)
|
|
KBUILD_AFLAGS += $(KAFLAGS)
|
|
KBUILD_CFLAGS += $(KCFLAGS)
|
|
|
|
KBUILD_LDFLAGS_MODULE += --build-id=sha1
|
|
LDFLAGS_vmlinux += --build-id=sha1
|
|
|
|
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
|
|
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
|
endif
|
|
|
|
ifeq ($(CONFIG_RELR),y)
|
|
LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags
|
|
endif
|
|
|
|
# We never want expected sections to be placed heuristically by the
|
|
# linker. All sections should be explicitly named in the linker script.
|
|
ifdef CONFIG_LD_ORPHAN_WARN
|
|
LDFLAGS_vmlinux += --orphan-handling=warn
|
|
endif
|
|
|
|
# Align the bit size of userspace programs with the kernel
|
|
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
|
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
|
|
|
# make the checker run with the right architecture
|
|
CHECKFLAGS += --arch=$(ARCH)
|
|
|
|
# insure the checker run with the right endianness
|
|
CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian)
|
|
|
|
# the checker needs the correct machine size
|
|
CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)
|
|
|
|
# Default kernel image to build when no specific target is given.
|
|
# KBUILD_IMAGE may be overruled on the command line or
|
|
# set in the environment
|
|
# Also any assignments in arch/$(ARCH)/Makefile take precedence over
|
|
# this default value
|
|
export KBUILD_IMAGE ?= vmlinux
|
|
|
|
#
|
|
# INSTALL_PATH specifies where to place the updated kernel and system map
|
|
# images. Default is /boot, but you can set it to other values
|
|
export INSTALL_PATH ?= /boot
|
|
|
|
#
|
|
# INSTALL_DTBS_PATH specifies a prefix for relocations required by build roots.
|
|
# Like INSTALL_MOD_PATH, it isn't defined in the Makefile, but can be passed as
|
|
# an argument if needed. Otherwise it defaults to the kernel install path
|
|
#
|
|
export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
|
|
|
|
#
|
|
# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
|
|
# relocations required by build roots. This is not defined in the
|
|
# makefile but the argument can be passed to make if needed.
|
|
#
|
|
|
|
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
|
|
export MODLIB
|
|
|
|
#
|
|
# INSTALL_MOD_STRIP, if defined, will cause modules to be
|
|
# stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
|
|
# the default option --strip-debug will be used. Otherwise,
|
|
# INSTALL_MOD_STRIP value will be used as the options to the strip command.
|
|
|
|
ifdef INSTALL_MOD_STRIP
|
|
ifeq ($(INSTALL_MOD_STRIP),1)
|
|
mod_strip_cmd = $(STRIP) --strip-debug
|
|
else
|
|
mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
|
|
endif # INSTALL_MOD_STRIP=1
|
|
else
|
|
mod_strip_cmd = true
|
|
endif # INSTALL_MOD_STRIP
|
|
export mod_strip_cmd
|
|
|
|
# CONFIG_MODULE_COMPRESS, if defined, will cause module to be compressed
|
|
# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP
|
|
# or CONFIG_MODULE_COMPRESS_XZ.
|
|
|
|
mod_compress_cmd = true
|
|
ifdef CONFIG_MODULE_COMPRESS
|
|
ifdef CONFIG_MODULE_COMPRESS_GZIP
|
|
mod_compress_cmd = $(KGZIP) -n -f
|
|
endif # CONFIG_MODULE_COMPRESS_GZIP
|
|
ifdef CONFIG_MODULE_COMPRESS_XZ
|
|
mod_compress_cmd = $(XZ) -f
|
|
endif # CONFIG_MODULE_COMPRESS_XZ
|
|
endif # CONFIG_MODULE_COMPRESS
|
|
export mod_compress_cmd
|
|
|
|
ifdef CONFIG_MODULE_SIG_ALL
|
|
$(eval $(call config_filename,MODULE_SIG_KEY))
|
|
|
|
mod_sign_cmd = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY) certs/signing_key.x509
|
|
else
|
|
mod_sign_cmd = true
|
|
endif
|
|
export mod_sign_cmd
|
|
|
|
HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
|
|
|
|
has_libelf := $(call try-run,\
|
|
echo "int main() {}" | \
|
|
$(HOSTCC) $(KBUILD_HOSTCFLAGS) -xc -o /dev/null $(KBUILD_HOSTLDFLAGS) $(HOST_LIBELF_LIBS) -,1,0)
|
|
|
|
ifdef CONFIG_STACK_VALIDATION
|
|
ifeq ($(has_libelf),1)
|
|
objtool_target := tools/objtool FORCE
|
|
else
|
|
SKIP_STACK_VALIDATION := 1
|
|
export SKIP_STACK_VALIDATION
|
|
endif
|
|
endif
|
|
|
|
PHONY += resolve_btfids_clean
|
|
|
|
resolve_btfids_O = $(abspath $(objtree))/tools/bpf/resolve_btfids
|
|
|
|
# tools/bpf/resolve_btfids directory might not exist
|
|
# in output directory, skip its clean in that case
|
|
resolve_btfids_clean:
|
|
ifneq ($(wildcard $(resolve_btfids_O)),)
|
|
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
|
|
endif
|
|
|
|
ifdef CONFIG_BPF
|
|
ifdef CONFIG_DEBUG_INFO_BTF
|
|
ifeq ($(has_libelf),1)
|
|
resolve_btfids_target := tools/bpf/resolve_btfids FORCE
|
|
else
|
|
ERROR_RESOLVE_BTFIDS := 1
|
|
endif
|
|
endif # CONFIG_DEBUG_INFO_BTF
|
|
endif # CONFIG_BPF
|
|
|
|
PHONY += prepare0
|
|
|
|
export MODORDER := $(extmod-prefix)modules.order
|
|
export MODULES_NSDEPS := $(extmod-prefix)modules.nsdeps
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Kernel headers
|
|
|
|
PHONY += headers
|
|
|
|
techpack-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*")
|
|
techpack-dirs := $(subst $(srctree)/,,$(techpack-dirs))
|
|
|
|
#Default location for installed headers
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
PHONY += archheaders archscripts
|
|
hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
|
|
headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
|
|
else
|
|
hdr-prefix = $(KBUILD_EXTMOD)/
|
|
hdr-inst := -f $(srctree)/scripts/Makefile.headersinst dst=$(KBUILD_EXTMOD)/usr/include objtree=$(objtree)/$(KBUILD_EXTMOD) obj
|
|
endif
|
|
|
|
export INSTALL_HDR_PATH = $(objtree)/$(hdr-prefix)usr
|
|
|
|
quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
|
|
cmd_headers_install = \
|
|
mkdir -p $(INSTALL_HDR_PATH); \
|
|
rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
|
|
$(hdr-prefix)usr/include $(INSTALL_HDR_PATH);
|
|
|
|
PHONY += headers_install
|
|
headers_install: headers
|
|
$(call cmd,headers_install)
|
|
|
|
headers:
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
$(if $(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/Kbuild),, \
|
|
$(error Headers not exportable for the $(SRCARCH) architecture))
|
|
endif
|
|
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)include/uapi
|
|
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)arch/$(SRCARCH)/include/uapi
|
|
$(Q)for d in $(techpack-dirs); do \
|
|
$(MAKE) $(hdr-inst)=$$d/include/uapi; \
|
|
done
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Devicetree files
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
|
|
dtstree := arch/$(SRCARCH)/boot/dts
|
|
endif
|
|
|
|
else # KBUILD_EXTMOD
|
|
# Devicetree source should live in $(KBUILD_EXTMOD)/arch/$(SRCARCH)/boot/dts/
|
|
# But it may live inside some other folder relative to KBUILD_EXTMOD, as specified
|
|
# by KBUILD_EXTMOD_DTS
|
|
KBUILD_EXTMOD_DTS = arch/$(SRCARCH)/boot/dts
|
|
ifneq ($(wildcard $(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)/ $(srctree)/$(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)/),)
|
|
dtstree := $(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(dtstree),)
|
|
|
|
%.dtb: include/config/kernel.release scripts_dtc
|
|
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
|
|
|
PHONY += dtbs dtbs_install dtbs_check
|
|
dtbs: include/config/kernel.release scripts_dtc
|
|
$(Q)$(MAKE) $(build)=$(dtstree)
|
|
|
|
ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
|
|
export CHECK_DTBS=y
|
|
dtbs: dt_binding_check
|
|
endif
|
|
|
|
dtbs_check: dtbs
|
|
|
|
dtbs_install:
|
|
$(Q)$(MAKE) $(dtbinst)=$(dtstree) dst=$(INSTALL_DTBS_PATH)
|
|
|
|
ifdef CONFIG_OF_EARLY_FLATTREE
|
|
all: dtbs
|
|
endif
|
|
|
|
endif
|
|
|
|
PHONY += scripts_dtc
|
|
scripts_dtc: scripts_basic
|
|
$(Q)$(MAKE) $(build)=scripts/dtc
|
|
|
|
ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),)
|
|
export CHECK_DT_BINDING=y
|
|
endif
|
|
|
|
PHONY += dt_binding_check
|
|
dt_binding_check: scripts_dtc
|
|
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
|
|
|
|
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
|
|
|
vmlinux-dirs := $(patsubst %/,%,$(filter %/, \
|
|
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
|
|
$(libs-y) $(libs-m)))
|
|
|
|
vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
|
|
$(patsubst %/,%,$(filter %/, $(core-) \
|
|
$(drivers-) $(libs-))))
|
|
|
|
subdir-modorder := $(addsuffix modules.order,$(filter %/, \
|
|
$(core-y) $(core-m) $(libs-y) $(libs-m) \
|
|
$(drivers-y) $(drivers-m)))
|
|
|
|
build-dirs := $(vmlinux-dirs)
|
|
clean-dirs := $(vmlinux-alldirs)
|
|
|
|
# Externally visible symbols (used by link-vmlinux.sh)
|
|
KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
|
|
KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))
|
|
ifdef CONFIG_MODULES
|
|
KBUILD_VMLINUX_OBJS += $(patsubst %/, %/lib.a, $(filter %/, $(libs-y)))
|
|
KBUILD_VMLINUX_LIBS := $(filter-out %/, $(libs-y))
|
|
else
|
|
KBUILD_VMLINUX_LIBS := $(patsubst %/,%/lib.a, $(libs-y))
|
|
endif
|
|
KBUILD_VMLINUX_OBJS += $(patsubst %/,%/built-in.a, $(drivers-y))
|
|
|
|
export KBUILD_VMLINUX_OBJS KBUILD_VMLINUX_LIBS
|
|
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
|
|
# used by scripts/Makefile.package
|
|
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) LICENSES arch include scripts tools)
|
|
|
|
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
|
|
|
|
# Recurse until adjust_autoksyms.sh is satisfied
|
|
PHONY += autoksyms_recursive
|
|
ifdef CONFIG_TRIM_UNUSED_KSYMS
|
|
# For the kernel to actually contain only the needed exported symbols,
|
|
# we have to build modules as well to determine what those symbols are.
|
|
# (this can be evaluated only once include/config/auto.conf has been included)
|
|
KBUILD_MODULES := 1
|
|
|
|
autoksyms_recursive: descend modules.order
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
|
|
"$(MAKE) -f $(srctree)/Makefile vmlinux"
|
|
endif
|
|
|
|
autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h)
|
|
|
|
quiet_cmd_autoksyms_h = GEN $@
|
|
cmd_autoksyms_h = mkdir -p $(dir $@); \
|
|
$(CONFIG_SHELL) $(srctree)/scripts/gen_autoksyms.sh $@
|
|
|
|
$(autoksyms_h):
|
|
$(call cmd,autoksyms_h)
|
|
|
|
ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
|
|
|
|
# Final link of vmlinux with optional arch pass after final link
|
|
cmd_link-vmlinux = \
|
|
$(CONFIG_SHELL) $< "$(LD)" "$(KBUILD_LDFLAGS)" "$(LDFLAGS_vmlinux)"; \
|
|
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
|
|
|
|
ifndef KBUILD_MIXED_TREE
|
|
vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE
|
|
+$(call if_changed,link-vmlinux)
|
|
endif
|
|
|
|
targets := vmlinux
|
|
|
|
# The actual objects are generated when descending,
|
|
# make sure no implicit rule kicks in
|
|
$(sort $(vmlinux-deps) $(subdir-modorder)): descend ;
|
|
|
|
filechk_kernel.release = \
|
|
echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion \
|
|
$(srctree) $(BRANCH) $(KMI_GENERATION))"
|
|
|
|
# Store (new) KERNELRELEASE string in include/config/kernel.release
|
|
include/config/kernel.release: FORCE
|
|
$(call filechk,kernel.release)
|
|
|
|
# Additional helpers built in scripts/
|
|
# Carefully list dependencies so we do not try to build scripts twice
|
|
# in parallel
|
|
PHONY += scripts
|
|
scripts: scripts_basic scripts_dtc
|
|
$(Q)$(MAKE) $(build)=$(@)
|
|
|
|
# Things we need to do before we recursively start building the kernel
|
|
# or the modules are listed in "prepare".
|
|
# A multi level approach is used. prepareN is processed before prepareN-1.
|
|
# archprepare is used in arch Makefiles and when processed asm symlink,
|
|
# version.h and scripts_basic is processed / created.
|
|
|
|
PHONY += prepare archprepare
|
|
|
|
archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
|
|
asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \
|
|
include/generated/autoconf.h
|
|
|
|
prepare0: archprepare
|
|
$(Q)$(MAKE) $(build)=scripts/mod
|
|
$(Q)$(MAKE) $(build)=.
|
|
|
|
# All the preparing..
|
|
prepare: prepare0 prepare-objtool prepare-resolve_btfids
|
|
|
|
# Support for using generic headers in asm-generic
|
|
asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj
|
|
|
|
PHONY += asm-generic uapi-asm-generic
|
|
asm-generic: uapi-asm-generic
|
|
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm \
|
|
generic=include/asm-generic
|
|
uapi-asm-generic:
|
|
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \
|
|
generic=include/uapi/asm-generic
|
|
|
|
PHONY += prepare-objtool prepare-resolve_btfids
|
|
prepare-objtool: $(objtool_target)
|
|
ifeq ($(SKIP_STACK_VALIDATION),1)
|
|
ifdef CONFIG_FTRACE_MCOUNT_USE_OBJTOOL
|
|
@echo "error: Cannot generate __mcount_loc for CONFIG_DYNAMIC_FTRACE=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
@false
|
|
endif
|
|
ifdef CONFIG_UNWINDER_ORC
|
|
@echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
@false
|
|
else
|
|
@echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
endif
|
|
endif
|
|
|
|
prepare-resolve_btfids: $(resolve_btfids_target)
|
|
ifeq ($(ERROR_RESOLVE_BTFIDS),1)
|
|
@echo "error: Cannot resolve BTF IDs for CONFIG_DEBUG_INFO_BTF, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
@false
|
|
endif
|
|
# Generate some files
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# KERNELRELEASE can change from a few different places, meaning version.h
|
|
# needs to be updated, so this check is forced on all builds
|
|
|
|
uts_len := 64
|
|
ifneq (,$(BUILD_NUMBER))
|
|
UTS_RELEASE=$(KERNELRELEASE)-ab$(BUILD_NUMBER)
|
|
else
|
|
UTS_RELEASE=$(KERNELRELEASE)
|
|
endif
|
|
define filechk_utsrelease.h
|
|
if [ `echo -n "$(UTS_RELEASE)" | wc -c ` -gt $(uts_len) ]; then \
|
|
echo '"$(UTS_RELEASE)" exceeds $(uts_len) characters' >&2; \
|
|
exit 1; \
|
|
fi; \
|
|
echo \#define UTS_RELEASE \"$(UTS_RELEASE)\"
|
|
endef
|
|
|
|
define filechk_version.h
|
|
if [ $(SUBLEVEL) -gt 255 ]; then \
|
|
echo \#define LINUX_VERSION_CODE $(shell \
|
|
expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + 255); \
|
|
else \
|
|
echo \#define LINUX_VERSION_CODE $(shell \
|
|
expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \
|
|
fi; \
|
|
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + \
|
|
((c) > 255 ? 255 : (c)))'
|
|
endef
|
|
|
|
$(version_h): PATCHLEVEL := $(if $(PATCHLEVEL), $(PATCHLEVEL), 0)
|
|
$(version_h): SUBLEVEL := $(if $(SUBLEVEL), $(SUBLEVEL), 0)
|
|
$(version_h): FORCE
|
|
$(call filechk,version.h)
|
|
$(Q)rm -f $(old_version_h)
|
|
|
|
include/generated/utsrelease.h: include/config/kernel.release FORCE
|
|
$(call filechk,utsrelease.h)
|
|
|
|
PHONY += headerdep
|
|
headerdep:
|
|
$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
|
|
$(srctree)/scripts/headerdep.pl -I$(srctree)/include
|
|
|
|
# Deprecated. It is no-op now.
|
|
PHONY += headers_check
|
|
headers_check:
|
|
@:
|
|
$(Q)for d in $(techpack-dirs); do \
|
|
$(MAKE) $(hdr-inst)=$$d/include/uapi HDRCHECK=1; \
|
|
done
|
|
|
|
ifdef CONFIG_HEADERS_INSTALL
|
|
prepare: headers
|
|
endif
|
|
|
|
PHONY += scripts_unifdef
|
|
scripts_unifdef: scripts_basic
|
|
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Kernel selftest
|
|
|
|
PHONY += kselftest
|
|
kselftest:
|
|
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
|
|
|
|
kselftest-%: FORCE
|
|
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
|
|
|
|
PHONY += kselftest-merge
|
|
kselftest-merge:
|
|
$(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!))
|
|
$(Q)find $(srctree)/tools/testing/selftests -name config | \
|
|
xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config
|
|
$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Modules
|
|
|
|
ifdef CONFIG_MODULES
|
|
|
|
# By default, build modules as well
|
|
|
|
all: modules
|
|
|
|
# When we're building modules with modversions, we need to consider
|
|
# the built-in objects during the descend as well, in order to
|
|
# make sure the checksums are up to date before we record them.
|
|
ifdef CONFIG_MODVERSIONS
|
|
KBUILD_BUILTIN := 1
|
|
endif
|
|
|
|
# Build modules
|
|
#
|
|
# A module can be listed more than once in obj-m resulting in
|
|
# duplicate lines in modules.order files. Those are removed
|
|
# using awk while concatenating to the final file.
|
|
|
|
PHONY += modules
|
|
# if KBUILD_BUILTIN && !KBUILD_MIXED_TREE, depend on vmlinux
|
|
modules: $(if $(KBUILD_BUILTIN), $(if $(KBUILD_MIXED_TREE),,vmlinux))
|
|
modules: modules_check modules_prepare
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
|
|
PHONY += modules_check
|
|
modules_check: modules.order
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh $<
|
|
|
|
cmd_modules_order = $(AWK) '!x[$$0]++' $(real-prereqs) > $@
|
|
|
|
modules.order: $(subdir-modorder) FORCE
|
|
$(call if_changed,modules_order)
|
|
|
|
targets += modules.order
|
|
|
|
# Target to prepare building external modules
|
|
PHONY += modules_prepare
|
|
modules_prepare: prepare
|
|
$(Q)$(MAKE) $(build)=scripts scripts/module.lds
|
|
|
|
# Target to install modules
|
|
PHONY += modules_install
|
|
modules_install: _modinst_ _modinst_post
|
|
|
|
PHONY += _modinst_
|
|
_modinst_:
|
|
@rm -rf $(MODLIB)/kernel
|
|
@rm -f $(MODLIB)/source
|
|
@mkdir -p $(MODLIB)/kernel
|
|
@ln -s $(abspath $(srctree)) $(MODLIB)/source
|
|
@if [ ! $(objtree) -ef $(MODLIB)/build ]; then \
|
|
rm -f $(MODLIB)/build ; \
|
|
ln -s $(CURDIR) $(MODLIB)/build ; \
|
|
fi
|
|
@sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order
|
|
@cp -f $(mixed-build-prefix)modules.builtin $(MODLIB)/
|
|
@cp -f $(or $(mixed-build-prefix),$(objtree)/)modules.builtin.modinfo $(MODLIB)/
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
|
|
|
|
# This depmod is only for convenience to give the initial
|
|
# boot a modules.dep even before / is mounted read-write. However the
|
|
# boot script depmod is the master version.
|
|
PHONY += _modinst_post
|
|
_modinst_post: _modinst_
|
|
$(call cmd,depmod)
|
|
|
|
ifeq ($(CONFIG_MODULE_SIG), y)
|
|
PHONY += modules_sign
|
|
modules_sign:
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
|
|
endif
|
|
|
|
else # CONFIG_MODULES
|
|
|
|
# Modules not configured
|
|
# ---------------------------------------------------------------------------
|
|
|
|
PHONY += modules modules_install
|
|
modules modules_install:
|
|
@echo >&2
|
|
@echo >&2 "The present kernel configuration has modules disabled."
|
|
@echo >&2 "Type 'make config' and enable loadable module support."
|
|
@echo >&2 "Then build a kernel with module support enabled."
|
|
@echo >&2
|
|
@exit 1
|
|
|
|
endif # CONFIG_MODULES
|
|
|
|
###
|
|
# Cleaning is done on three levels.
|
|
# make clean Delete most generated files
|
|
# Leave enough to build external modules
|
|
# make mrproper Delete the current configuration, and all generated files
|
|
# make distclean Remove editor backup files, patch leftover files and the like
|
|
|
|
# Directories & files removed with 'make clean'
|
|
CLEAN_FILES += include/ksym vmlinux.symvers modules-only.symvers \
|
|
modules.builtin modules.builtin.modinfo modules.nsdeps \
|
|
compile_commands.json .thinlto-cache
|
|
|
|
# Directories & files removed with 'make mrproper'
|
|
MRPROPER_FILES += include/config include/generated \
|
|
arch/$(SRCARCH)/include/generated .tmp_objdiff \
|
|
debian snap tar-install \
|
|
.config .config.old .version \
|
|
Module.symvers \
|
|
signing_key.pem signing_key.priv signing_key.x509 \
|
|
x509.genkey extra_certificates signing_key.x509.keyid \
|
|
signing_key.x509.signer vmlinux-gdb.py \
|
|
*.spec
|
|
|
|
# Directories & files removed with 'make distclean'
|
|
DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
|
|
|
|
# clean - Delete most, but leave enough to build external modules
|
|
#
|
|
clean: rm-files := $(CLEAN_FILES)
|
|
|
|
PHONY += archclean vmlinuxclean
|
|
|
|
vmlinuxclean:
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
|
|
$(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean)
|
|
|
|
clean: archclean vmlinuxclean resolve_btfids_clean
|
|
|
|
# mrproper - Delete all generated files, including .config
|
|
#
|
|
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
|
|
mrproper-dirs := $(addprefix _mrproper_,scripts)
|
|
|
|
PHONY += $(mrproper-dirs) mrproper
|
|
$(mrproper-dirs):
|
|
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
|
|
|
|
mrproper: clean $(mrproper-dirs)
|
|
$(call cmd,rmfiles)
|
|
|
|
# distclean
|
|
#
|
|
distclean: rm-files := $(wildcard $(DISTCLEAN_FILES))
|
|
|
|
PHONY += distclean
|
|
|
|
distclean: mrproper
|
|
$(call cmd,rmfiles)
|
|
@find $(srctree) $(RCS_FIND_IGNORE) \
|
|
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
|
|
-o -name '*.bak' -o -name '#*#' -o -name '*%' \
|
|
-o -name 'core' \) \
|
|
-type f -print | xargs rm -f
|
|
|
|
|
|
# Packaging of the kernel to various formats
|
|
# ---------------------------------------------------------------------------
|
|
|
|
%src-pkg: FORCE
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
|
%pkg: include/config/kernel.release FORCE
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
|
|
|
# Brief documentation of the typical targets used
|
|
# ---------------------------------------------------------------------------
|
|
|
|
boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
|
|
boards := $(sort $(notdir $(boards)))
|
|
board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig))
|
|
board-dirs := $(sort $(notdir $(board-dirs:/=)))
|
|
|
|
PHONY += help
|
|
help:
|
|
@echo 'Cleaning targets:'
|
|
@echo ' clean - Remove most generated files but keep the config and'
|
|
@echo ' enough build support to build external modules'
|
|
@echo ' mrproper - Remove all generated files + config + various backup files'
|
|
@echo ' distclean - mrproper + remove editor backup and patch files'
|
|
@echo ''
|
|
@echo 'Configuration targets:'
|
|
@$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
|
|
@echo ''
|
|
@echo 'Other generic targets:'
|
|
@echo ' all - Build all targets marked with [*]'
|
|
@echo '* vmlinux - Build the bare kernel'
|
|
@echo '* modules - Build all modules'
|
|
@echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
|
|
@echo ' dir/ - Build all files in dir and below'
|
|
@echo ' dir/file.[ois] - Build specified target only'
|
|
@echo ' dir/file.ll - Build the LLVM assembly file'
|
|
@echo ' (requires compiler support for LLVM assembly generation)'
|
|
@echo ' dir/file.lst - Build specified mixed source/assembly target only'
|
|
@echo ' (requires a recent binutils and recent build (System.map))'
|
|
@echo ' dir/file.ko - Build module including final link'
|
|
@echo ' modules_prepare - Set up for building external modules'
|
|
@echo ' tags/TAGS - Generate tags file for editors'
|
|
@echo ' cscope - Generate cscope index'
|
|
@echo ' gtags - Generate GNU GLOBAL index'
|
|
@echo ' kernelrelease - Output the release version string (use with make -s)'
|
|
@echo ' kernelversion - Output the version stored in Makefile (use with make -s)'
|
|
@echo ' image_name - Output the image name (use with make -s)'
|
|
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
|
|
echo ' (default: $(INSTALL_HDR_PATH))'; \
|
|
echo ''
|
|
@echo 'Static analysers:'
|
|
@echo ' checkstack - Generate a list of stack hogs'
|
|
@echo ' versioncheck - Sanity check on version.h usage'
|
|
@echo ' includecheck - Check for duplicate included header files'
|
|
@echo ' export_report - List the usages of all exported symbols'
|
|
@echo ' headerdep - Detect inclusion cycles in headers'
|
|
@echo ' coccicheck - Check with Coccinelle'
|
|
@echo ' clang-analyzer - Check with clang static analyzer'
|
|
@echo ' clang-tidy - Check with clang-tidy'
|
|
@echo ''
|
|
@echo 'Tools:'
|
|
@echo ' nsdeps - Generate missing symbol namespace dependencies'
|
|
@echo ''
|
|
@echo 'Kernel selftest:'
|
|
@echo ' kselftest - Build and run kernel selftest'
|
|
@echo ' Build, install, and boot kernel before'
|
|
@echo ' running kselftest on it'
|
|
@echo ' Run as root for full coverage'
|
|
@echo ' kselftest-all - Build kernel selftest'
|
|
@echo ' kselftest-install - Build and install kernel selftest'
|
|
@echo ' kselftest-clean - Remove all generated kselftest files'
|
|
@echo ' kselftest-merge - Merge all the config dependencies of'
|
|
@echo ' kselftest to existing .config.'
|
|
@echo ''
|
|
@$(if $(dtstree), \
|
|
echo 'Devicetree:'; \
|
|
echo '* dtbs - Build device tree blobs for enabled boards'; \
|
|
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
|
|
echo ' dt_binding_check - Validate device tree binding documents'; \
|
|
echo ' dtbs_check - Validate device tree source files';\
|
|
echo '')
|
|
|
|
@echo 'Userspace tools targets:'
|
|
@echo ' use "make tools/help"'
|
|
@echo ' or "cd tools; make help"'
|
|
@echo ''
|
|
@echo 'Kernel packaging:'
|
|
@$(MAKE) -f $(srctree)/scripts/Makefile.package help
|
|
@echo ''
|
|
@echo 'Documentation targets:'
|
|
@$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
|
|
@echo ''
|
|
@echo 'Architecture specific targets ($(SRCARCH)):'
|
|
@$(if $(archhelp),$(archhelp),\
|
|
echo ' No architecture specific help defined for $(SRCARCH)')
|
|
@echo ''
|
|
@$(if $(boards), \
|
|
$(foreach b, $(boards), \
|
|
printf " %-27s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
|
|
echo '')
|
|
@$(if $(board-dirs), \
|
|
$(foreach b, $(board-dirs), \
|
|
printf " %-16s - Show %s-specific targets\\n" help-$(b) $(b);) \
|
|
printf " %-16s - Show all of the above\\n" help-boards; \
|
|
echo '')
|
|
|
|
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
|
|
@echo ' make V=2 [targets] 2 => give reason for rebuild of target'
|
|
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
|
|
@echo ' make C=1 [targets] Check re-compiled c source with $$CHECK'
|
|
@echo ' (sparse by default)'
|
|
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
|
|
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
|
|
@echo ' make W=n [targets] Enable extra build checks, n=1,2,3 where'
|
|
@echo ' 1: warnings which may be relevant and do not occur too often'
|
|
@echo ' 2: warnings which occur quite often but may still be relevant'
|
|
@echo ' 3: more obscure warnings, can most likely be ignored'
|
|
@echo ' Multiple levels can be combined with W=12 or W=123'
|
|
@echo ''
|
|
@echo 'Execute "make" or "make all" to build all targets marked with [*] '
|
|
@echo 'For further info see the ./README file'
|
|
|
|
|
|
help-board-dirs := $(addprefix help-,$(board-dirs))
|
|
|
|
help-boards: $(help-board-dirs)
|
|
|
|
boards-per-dir = $(sort $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig)))
|
|
|
|
$(help-board-dirs): help-%:
|
|
@echo 'Architecture specific targets ($(SRCARCH) $*):'
|
|
@$(if $(boards-per-dir), \
|
|
$(foreach b, $(boards-per-dir), \
|
|
printf " %-24s - Build for %s\\n" $*/$(b) $(subst _defconfig,,$(b));) \
|
|
echo '')
|
|
|
|
|
|
# Documentation targets
|
|
# ---------------------------------------------------------------------------
|
|
DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
|
|
linkcheckdocs dochelp refcheckdocs
|
|
PHONY += $(DOC_TARGETS)
|
|
$(DOC_TARGETS):
|
|
$(Q)$(MAKE) $(build)=Documentation $@
|
|
|
|
# Misc
|
|
# ---------------------------------------------------------------------------
|
|
|
|
PHONY += scripts_gdb
|
|
scripts_gdb: prepare0
|
|
$(Q)$(MAKE) $(build)=scripts/gdb
|
|
$(Q)ln -fsn $(abspath $(srctree)/scripts/gdb/vmlinux-gdb.py)
|
|
|
|
ifdef CONFIG_GDB_SCRIPTS
|
|
all: scripts_gdb
|
|
endif
|
|
|
|
else # KBUILD_EXTMOD
|
|
|
|
###
|
|
# External module support.
|
|
# When building external modules the kernel used as basis is considered
|
|
# read-only, and no consistency checks are made and the make
|
|
# system is not used on the basis kernel. If updates are required
|
|
# in the basis kernel ordinary make commands (without M=...) must
|
|
# be used.
|
|
#
|
|
# The following are the only valid targets when building external
|
|
# modules.
|
|
# make M=dir clean Delete all automatically generated files
|
|
# make M=dir modules Make all modules in specified dir
|
|
# make M=dir Same as 'make M=dir modules'
|
|
# make M=dir modules_install
|
|
# Install the modules built in the module directory
|
|
# Assumes install directory is already created
|
|
|
|
# We are always building only modules.
|
|
KBUILD_BUILTIN :=
|
|
KBUILD_MODULES := 1
|
|
|
|
build-dirs := $(KBUILD_EXTMOD)
|
|
PHONY += modules
|
|
modules: $(MODORDER)
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
|
|
$(MODORDER): descend
|
|
@:
|
|
|
|
PHONY += modules_install
|
|
modules_install: _emodinst_ _emodinst_post
|
|
|
|
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
|
|
PHONY += _emodinst_
|
|
_emodinst_:
|
|
$(Q)mkdir -p $(MODLIB)/$(install-dir)
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
|
|
|
|
PHONY += _emodinst_post
|
|
_emodinst_post: _emodinst_
|
|
$(call cmd,depmod)
|
|
|
|
compile_commands.json: $(extmod-prefix)compile_commands.json
|
|
PHONY += compile_commands.json
|
|
|
|
clean-dirs := $(KBUILD_EXTMOD)
|
|
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \
|
|
$(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache
|
|
|
|
PHONY += help
|
|
help:
|
|
@echo ' Building external modules.'
|
|
@echo ' Syntax: make -C path/to/kernel/src M=$$PWD target'
|
|
@echo ''
|
|
@echo ' modules - default target, build the module(s)'
|
|
@echo ' modules_install - install the module'
|
|
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'
|
|
@echo ' (default: $(abspath $(INSTALL_HDR_PATH)))'
|
|
@echo ' clean - remove generated files in module directory only'
|
|
@echo ''
|
|
|
|
# no-op for external module builds
|
|
PHONY += prepare modules_prepare
|
|
|
|
endif # KBUILD_EXTMOD
|
|
|
|
# Single targets
|
|
# ---------------------------------------------------------------------------
|
|
# To build individual files in subdirectories, you can do like this:
|
|
#
|
|
# make foo/bar/baz.s
|
|
#
|
|
# The supported suffixes for single-target are listed in 'single-targets'
|
|
#
|
|
# To build only under specific subdirectories, you can do like this:
|
|
#
|
|
# make foo/bar/baz/
|
|
|
|
ifdef single-build
|
|
|
|
# .ko is special because modpost is needed
|
|
single-ko := $(sort $(filter %.ko, $(MAKECMDGOALS)))
|
|
single-no-ko := $(sort $(patsubst %.ko,%.mod, $(MAKECMDGOALS)))
|
|
|
|
$(single-ko): single_modpost
|
|
@:
|
|
$(single-no-ko): descend
|
|
@:
|
|
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
# For the single build of in-tree modules, use a temporary file to avoid
|
|
# the situation of modules_install installing an invalid modules.order.
|
|
MODORDER := .modules.tmp
|
|
endif
|
|
|
|
PHONY += single_modpost
|
|
single_modpost: $(single-no-ko) modules_prepare
|
|
$(Q){ $(foreach m, $(single-ko), echo $(extmod-prefix)$m;) } > $(MODORDER)
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
|
|
KBUILD_MODULES := 1
|
|
|
|
export KBUILD_SINGLE_TARGETS := $(addprefix $(extmod-prefix), $(single-no-ko))
|
|
|
|
# trim unrelated directories
|
|
build-dirs := $(foreach d, $(build-dirs), \
|
|
$(if $(filter $(d)/%, $(KBUILD_SINGLE_TARGETS)), $(d)))
|
|
|
|
endif
|
|
|
|
ifndef CONFIG_MODULES
|
|
KBUILD_MODULES :=
|
|
endif
|
|
|
|
# Handle descending into subdirectories listed in $(build-dirs)
|
|
# Preset locale variables to speed up the build process. Limit locale
|
|
# tweaks to this spot to avoid wrong language settings when running
|
|
# make menuconfig etc.
|
|
# Error messages still appears in the original language
|
|
PHONY += descend $(build-dirs)
|
|
descend: $(build-dirs)
|
|
$(build-dirs): prepare
|
|
$(Q)$(MAKE) $(build)=$@ \
|
|
single-build=$(if $(filter-out $@/, $(filter $@/%, $(KBUILD_SINGLE_TARGETS))),1) \
|
|
$(if $(KBUILD_MIXED_TREE),,need-builtin=1) need-modorder=1
|
|
|
|
clean-dirs := $(addprefix _clean_, $(clean-dirs))
|
|
PHONY += $(clean-dirs) clean
|
|
$(clean-dirs):
|
|
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
|
|
|
clean: $(clean-dirs)
|
|
$(call cmd,rmfiles)
|
|
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
|
|
\( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \
|
|
-o -name '*.ko.*' \
|
|
-o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \
|
|
-o -name '*.dwo' -o -name '*.lst' \
|
|
-o -name '*.su' -o -name '*.mod' \
|
|
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
|
|
-o -name '*.lex.c' -o -name '*.tab.[ch]' \
|
|
-o -name '*.asn1.[ch]' \
|
|
-o -name '*.symtypes' -o -name 'modules.order' \
|
|
-o -name '.tmp_*.o.*' \
|
|
-o -name '*.c.[012]*.*' \
|
|
-o -name '*.ll' \
|
|
-o -name '*.gcno' \
|
|
-o -name '*.*.symversions' \) -type f -print | xargs rm -f
|
|
|
|
# Generate tags for editors
|
|
# ---------------------------------------------------------------------------
|
|
quiet_cmd_tags = GEN $@
|
|
cmd_tags = $(BASH) $(srctree)/scripts/tags.sh $@
|
|
|
|
tags TAGS cscope gtags: FORCE
|
|
$(call cmd,tags)
|
|
|
|
# Script to generate missing namespace dependencies
|
|
# ---------------------------------------------------------------------------
|
|
|
|
PHONY += nsdeps
|
|
nsdeps: export KBUILD_NSDEPS=1
|
|
nsdeps: modules
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/nsdeps
|
|
|
|
# Clang Tooling
|
|
# ---------------------------------------------------------------------------
|
|
|
|
quiet_cmd_gen_compile_commands = GEN $@
|
|
cmd_gen_compile_commands = $(PYTHON3) $< -a $(AR) -o $@ $(filter-out $<, $(real-prereqs))
|
|
|
|
$(extmod-prefix)compile_commands.json: scripts/clang-tools/gen_compile_commands.py \
|
|
$(if $(KBUILD_EXTMOD),,$(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)) \
|
|
$(if $(CONFIG_MODULES), $(MODORDER)) FORCE
|
|
$(call if_changed,gen_compile_commands)
|
|
|
|
targets += $(extmod-prefix)compile_commands.json
|
|
|
|
PHONY += clang-tidy clang-analyzer
|
|
|
|
ifdef CONFIG_CC_IS_CLANG
|
|
quiet_cmd_clang_tools = CHECK $<
|
|
cmd_clang_tools = $(PYTHON3) $(srctree)/scripts/clang-tools/run-clang-tools.py $@ $<
|
|
|
|
clang-tidy clang-analyzer: $(extmod-prefix)compile_commands.json
|
|
$(call cmd,clang_tools)
|
|
else
|
|
clang-tidy clang-analyzer:
|
|
@echo "$@ requires CC=clang" >&2
|
|
@false
|
|
endif
|
|
|
|
# Scripts to check various things for consistency
|
|
# ---------------------------------------------------------------------------
|
|
|
|
PHONY += includecheck versioncheck coccicheck export_report
|
|
|
|
includecheck:
|
|
find $(srctree)/* $(RCS_FIND_IGNORE) \
|
|
-name '*.[hcS]' -type f -print | sort \
|
|
| xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl
|
|
|
|
versioncheck:
|
|
find $(srctree)/* $(RCS_FIND_IGNORE) \
|
|
-name '*.[hcS]' -type f -print | sort \
|
|
| xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
|
|
|
|
coccicheck:
|
|
$(Q)$(BASH) $(srctree)/scripts/$@
|
|
|
|
export_report:
|
|
$(PERL) $(srctree)/scripts/export_report.pl
|
|
|
|
PHONY += checkstack kernelrelease kernelversion image_name
|
|
|
|
# UML needs a little special treatment here. It wants to use the host
|
|
# toolchain, so needs $(SUBARCH) passed to checkstack.pl. Everyone
|
|
# else wants $(ARCH), including people doing cross-builds, which means
|
|
# that $(SUBARCH) doesn't work here.
|
|
ifeq ($(ARCH), um)
|
|
CHECKSTACK_ARCH := $(SUBARCH)
|
|
else
|
|
CHECKSTACK_ARCH := $(ARCH)
|
|
endif
|
|
checkstack:
|
|
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
|
|
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
|
|
|
|
kernelrelease:
|
|
@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion \
|
|
$(srctree) $(BRANCH) $(KMI_GENERATION))"
|
|
|
|
kernelversion:
|
|
@echo $(KERNELVERSION)
|
|
|
|
image_name:
|
|
@echo $(KBUILD_IMAGE)
|
|
|
|
# Clear a bunch of variables before executing the submake
|
|
|
|
ifeq ($(quiet),silent_)
|
|
tools_silent=s
|
|
endif
|
|
|
|
tools/: FORCE
|
|
$(Q)mkdir -p $(objtree)/tools
|
|
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
|
|
|
|
tools/%: FORCE
|
|
$(Q)mkdir -p $(objtree)/tools
|
|
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
|
|
|
|
quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
|
|
cmd_rmfiles = rm -rf $(rm-files)
|
|
|
|
# Run depmod only if we have System.map and depmod is executable
|
|
quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
|
|
cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
|
|
$(KERNELRELEASE) $(mixed-build-prefix)
|
|
|
|
# read saved command lines for existing targets
|
|
existing-targets := $(wildcard $(sort $(targets)))
|
|
|
|
-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
|
|
|
|
endif # config-build
|
|
endif # mixed-build
|
|
endif # need-sub-make
|
|
|
|
PHONY += FORCE
|
|
FORCE:
|
|
|
|
# Declare the contents of the PHONY variable as phony. We keep that
|
|
# information in a variable so we can use it in if_changed and friends.
|
|
.PHONY: $(PHONY)
|