mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
* remotes/origin/tmp-4c8fb32:
ANDROID: GKI: add Trimble symbol list
UPSTREAM: selinux: ignore unknown extended permissions
ANDROID: ABI: Update allowed list for galaxy
Revert "netfilter: Replace zero-length array with flexible-array member"
Revert "tracing: Constify string literal data member in struct trace_event_call"
Revert "skb_expand_head() adjust skb->truesize incorrectly"
Linux 5.4.289
ftrace: use preempt_enable/disable notrace macros to avoid double fault
mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim()
drm: adv7511: Drop dsi single lane support
net/sctp: Prevent autoclose integer overflow in sctp_association_init()
sky2: Add device ID 11ab:4373 for Marvell 88E8075
pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking
RDMA/uverbs: Prevent integer overflow issue
modpost: fix the missed iteration for the max bit in do_input()
modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
ARC: build: Try to guess GCC variant of cross compiler
irqchip/gic: Correct declaration of *percpu_base pointer in union gic_base
net: usb: qmi_wwan: add Telit FE910C04 compositions
bpf: fix potential error return
sound: usb: format: don't warn that raw DSD is unsupported
wifi: mac80211: wake the queues in case of failure in resume
ila: serialize calls to nf_register_net_hooks()
af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK
af_packet: fix vlan_get_tci() vs MSG_PEEK
ALSA: usb-audio: US16x08: Initialize array before use
net: llc: reset skb->transport_header
netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext
netfilter: Replace zero-length array with flexible-array member
netrom: check buffer length before accessing it
drm/bridge: adv7511_audio: Update Audio InfoFrame properly
drm: bridge: adv7511: Enable SPDIF DAI
RDMA/bnxt_re: Fix max_qp_wrs reported
RDMA/bnxt_re: Fix reporting hw_ver in query_device
RDMA/bnxt_re: Add check for path mtu in modify_qp
RDMA/mlx5: Enforce same type port association for multiport RoCE
net/mlx5: Make API mlx5_core_is_ecpf accept const pointer
IB/mlx5: Introduce and use mlx5_core_is_vf()
Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet
selinux: ignore unknown extended permissions
ipv6: prevent possible UAF in ip6_xmit()
skb_expand_head() adjust skb->truesize incorrectly
btrfs: avoid monopolizing a core when activating a swap file
tracing: Constify string literal data member in struct trace_event_call
bpf: fix recursive lock when verdict program return SK_PASS
ipv6: fix possible UAF in ip6_finish_output2()
ipv6: use skb_expand_head in ip6_xmit
ipv6: use skb_expand_head in ip6_finish_output2
skbuff: introduce skb_expand_head()
MIPS: Probe toolchain support of -msym32
epoll: Add synchronous wakeup support for ep_poll_callback
virtio-blk: don't keep queue frozen during system suspend
scsi: mpt3sas: Diag-Reset when Doorbell-In-Use bit is set during driver load time
platform/x86: asus-nb-wmi: Ignore unknown event 0xCF
regmap: Use correct format specifier for logging range errors
scsi: megaraid_sas: Fix for a potential deadlock
scsi: qla1280: Fix hw revision numbering for ISP1020/1040
tracing/kprobe: Make trace_kprobe's module callback called after jump_label update
mtd: rawnand: fix double free in atmel_pmecc_create_user()
dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset
dmaengine: mv_xor: fix child node refcount handling in early exit
phy: core: Fix that API devm_phy_destroy() fails to destroy the phy
phy: core: Fix that API devm_phy_put() fails to release the phy
phy: core: Fix an OF node refcount leakage in of_phy_provider_lookup()
phy: core: Fix an OF node refcount leakage in _of_phy_get()
mtd: diskonchip: Cast an operand to prevent potential overflow
nfsd: restore callback functionality for NFSv4.0
bpf: Check negative offsets in __bpf_skb_min_len()
media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_reg
of: Fix refcount leakage for OF node returned by __of_get_dma_parent()
of: Fix error path in of_parse_phandle_with_args_map()
udmabuf: also check for F_SEAL_FUTURE_WRITE
nilfs2: prevent use of deleted inode
of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one()
NFS/pnfs: Fix a live lock between recalled layouts and layoutget
btrfs: tree-checker: reject inline extent items with 0 ref count
zram: refuse to use zero sized block device as backing device
sh: clk: Fix clk_enable() to return 0 on NULL clk
USB: serial: option: add Telit FE910C04 rmnet compositions
USB: serial: option: add MediaTek T7XX compositions
USB: serial: option: add Netprisma LCUK54 modules for WWAN Ready
USB: serial: option: add MeiG Smart SLM770A
USB: serial: option: add TCL IK512 MBIM & ECM
efivarfs: Fix error on non-existent file
i2c: riic: Always round-up when calculating bus period
chelsio/chtls: prevent potential integer overflow on 32bit
mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk
netfilter: ipset: Fix for recursive locking warning
net: ethernet: bgmac-platform: fix an OF node reference leak
net: hinic: Fix cleanup in create_rxqs/txqs()
ionic: use ee->offset when returning sprom data
net/smc: check sndbuf_space again after NOSPACE flag is set in smc_poll
erofs: fix incorrect symlink detection in fast symlink
erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
drm/i915: Fix memory leak by correcting cache object name in error handler
i2c: pnx: Fix timeout in wait functions
PCI: Add ACS quirk for Broadcom BCM5760X NIC
ALSA: usb: Fix UBSAN warning in parse_audio_unit()
PCI/AER: Disable AER service on suspend
usb: dwc2: gadget: Don't write invalid mapped sg entries into dma_desc with iommu enabled
net: sched: fix ordering of qlen adjustment
UPSTREAM: ALSA: usb-audio: Fix a DMA to stack memory bug
Linux 5.4.288
ALSA: usb-audio: Fix a DMA to stack memory bug
xen/netfront: fix crash when removing device
tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe()
KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status
blk-iocost: Avoid using clamp() on inuse in __propagate_weights()
blk-iocost: fix weight updates of inner active iocgs
blk-iocost: clamp inuse and skip noops in __propagate_weights()
ACPICA: events/evxfregn: don't release the ContextMutex that was never acquired
net/sched: netem: account for backlog updates from child qdisc
qca_spi: Make driver probing reliable
qca_spi: Fix clock speed for multiple QCA7000
ACPI: resource: Fix memory resource type union access
net: lapb: increase LAPB_HEADER_LEN
tipc: fix NULL deref in cleanup_bearer()
batman-adv: Do not let TT changes list grows indefinitely
batman-adv: Remove uninitialized data in full table TT response
batman-adv: Do not send uninitialized TT changes
bpf, sockmap: Fix update element with same
xfs: don't drop errno values when we fail to ficlone the entire range
usb: gadget: u_serial: Fix the issue that gs_start_io crashed due to accessing null pointer
usb: ehci-hcd: fix call balance of clocks handling routines
usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature
ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys()
usb: host: max3421-hcd: Correctly abort a USB request.
UPSTREAM: ALSA: usb-audio: Fix out of bounds reads when finding clock sources
UPSTREAM: ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices
Revert "cgroup: Make operations on the cgroup root_list RCU safe"
Revert "cgroup: Move rcu_head up near the top of cgroup_root"
Linux 5.4.287
bpf, xdp: Update devmap comments to reflect napi/rcu usage
ALSA: usb-audio: Fix out of bounds reads when finding clock sources
PCI: rockchip-ep: Fix address translation unit programming
Revert "drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()"
modpost: Add .irqentry.text to OTHER_SECTIONS
ocfs2: Revert "ocfs2: fix the la space leak when unmounting an ocfs2 volume"
jffs2: Fix rtime decompressor
jffs2: Prevent rtime decompress memory corruption
KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE
KVM: arm64: vgic-its: Clear DTE when MAPD unmaps a device
KVM: arm64: vgic-its: Add a data length check in vgic_its_save_*
perf/x86/intel/pt: Fix buffer full but size is 0 case
Revert "unicode: Don't special case ignorable code points"
bpf: fix OOB devmap writes when deleting elements
xdp: Simplify devmap cleanup
misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle
powerpc/prom_init: Fixup missing powermac #size-cells
usb: chipidea: udc: handle USB Error Interrupt if IOC not set
i3c: Use i3cdev->desc->info instead of calling i3c_device_get_info() to avoid deadlock
PCI: Add ACS quirk for Wangxun FF5xxx NICs
PCI: Add 'reset_subordinate' to reset hierarchy below bridge
f2fs: fix f2fs_bug_on when uninstalling filesystem call f2fs_evict_inode.
nvdimm: rectify the illogical code within nd_dax_probe()
pinctrl: qcom-pmic-gpio: add support for PM8937
scsi: st: Add MTIOCGET and MTLOAD to ioctls allowed after device reset
scsi: st: Don't modify unknown block number in MTIOCGET
leds: class: Protect brightness_show() with led_cdev->led_access mutex
tracing: Use atomic64_inc_return() in trace_clock_counter()
netpoll: Use rcu_access_pointer() in __netpoll_setup
net/neighbor: clear error in case strict check is not set
rocker: fix link status detection in rocker_carrier_init()
ASoC: hdmi-codec: reorder channel allocation list
Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables
wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw()
wifi: ipw2x00: libipw_rx_any(): fix bad alignment
drm/amdgpu: set the right AMDGPU sg segment limitation
jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree
jfs: fix array-index-out-of-bounds in jfs_readdir
jfs: fix shift-out-of-bounds in dbSplit
jfs: array-index-out-of-bounds fix in dtReadFirst
wifi: ath5k: add PCI ID for Arcadyan devices
wifi: ath5k: add PCI ID for SX76X
net: inet6: do not leave a dangling sk pointer in inet6_create()
net: inet: do not leave a dangling sk pointer in inet_create()
net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()
net: af_can: do not leave a dangling sk pointer in can_create()
Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()
af_packet: avoid erroring out after sock_init_data() in packet_create()
net/sched: cbs: Fix integer overflow in cbs_set_port_rate()
net: ethernet: fs_enet: Use %pa to format resource_size_t
net: fec_mpc52xx_phy: Use %pa to format resource_size_t
samples/bpf: Fix a resource leak
drm/radeon/r600_cs: Fix possible int overflow in r600_packet3_check()
drm/mcde: Enable module autoloading
drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model
media: cx231xx: Add support for Dexatek USB Video Grabber 1d19:6108
media: uvcvideo: Add a quirk for the Kaiweets KTI-W02 infrared camera
s390/cpum_sf: Handle CPU hotplug remove during sampling
mmc: core: Further prevent card detect during shutdown
regmap: detach regmap from dev on regmap_exit
dma-buf: fix dma_fence_array_signaled v4
bcache: revert replacing IS_ERR_OR_NULL with IS_ERR again
nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()
scsi: qla2xxx: Remove check req_sg_cnt should be equal to rsp_sg_cnt
scsi: qla2xxx: Supported speed displayed incorrectly for VPorts
scsi: qla2xxx: Fix NVMe and NPIV connect issue
ocfs2: update seq_file index in ocfs2_dlm_seq_next
tracing: Fix cmp_entries_dup() to respect sort() comparison rules
HID: wacom: fix when get product name maybe null pointer
bpf: Fix exact match conditions in trie_get_next_key()
bpf: Handle BPF_EXIST and BPF_NOEXIST for LPM trie
ocfs2: free inode when ocfs2_get_init_inode() fails
spi: mpc52xx: Add cancel_work_sync before module remove
tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg
drm/sti: Add __iomem for mixer_dbg_mxn's parameter
gpio: grgpio: Add NULL check in grgpio_probe
gpio: grgpio: use a helper variable to store the address of ofdev->dev
crypto: x86/aegis128 - access 32-bit arguments as 32-bit
x86/asm: Reorder early variables
xen: Fix the issue of resource not being properly released in xenbus_dev_probe()
xen/xenbus: fix locking
xenbus/backend: Protect xenbus callback with lock
xenbus/backend: Add memory pressure handler callback
xen/xenbus: reference count registered modules
netfilter: nft_set_hash: skip duplicated elements pending gc run
netfilter: ipset: Hold module reference while requesting a module
igb: Fix potential invalid memory access in igb_init_module()
net/qed: allow old cards not supporting "num_images" to work
tipc: Fix use-after-free of kernel socket in cleanup_bearer().
tipc: add new AEAD key structure for user API
tipc: enable creating a "preliminary" node
tipc: add reference counter to bearer
dccp: Fix memory leak in dccp_feat_change_recv
net/ipv6: release expired exception dst cached in socket
can: j1939: j1939_session_new(): fix skb reference counting
net/sched: tbf: correct backlog statistic for GSO packets
netfilter: x_tables: fix LED ID check in led_tg_check()
ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init()
can: sun4i_can: sun4i_can_err(): fix {rx,tx}_errors statistics
can: sun4i_can: sun4i_can_err(): call can_change_state() even if cf is NULL
watchdog: mediatek: Make sure system reset gets asserted in mtk_wdt_restart()
iTCO_wdt: mask NMI_NOW bit for update_no_reboot_bit() call
drm/etnaviv: flush shader L1 cache after user commandstream
nfsd: fix nfs4_openowner leak when concurrent nfsd4_open occur
nfsd: make sure exp active before svc_export_show
dm thin: Add missing destroy_work_on_stack()
i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs()
util_macros.h: fix/rework find_closest() macros
ad7780: fix division by zero in ad7780_write_raw()
clk: qcom: gcc-qcs404: fix initial rate of GPLL3
ftrace: Fix regression with module command in stack_trace_filter
ovl: Filter invalid inodes with missing lookup function
media: platform: allegro-dvt: Fix possible memory leak in allocate_buffers_internal()
media: gspca: ov534-ov772x: Fix off-by-one error in set_frame_rate()
media: venus: Fix pm_runtime_set_suspended() with runtime pm enabled
media: ts2020: fix null-ptr-deref in ts2020_probe()
media: i2c: tc358743: Fix crash in the probe error path when using polling
btrfs: ref-verify: fix use-after-free after invalid ref action
quota: flush quota_release_work upon quota writeback
ASoC: fsl_micfil: fix the naming style for mask definition
sh: intc: Fix use-after-free bug in register_intc_controller()
sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport
SUNRPC: Replace internal use of SOCKWQ_ASYNC_NOSPACE
SUNRPC: correct error code comment in xs_tcp_setup_socket()
modpost: remove incorrect code in do_eisa_entry()
rtc: ab-eoz9: don't fail temperature reads on undervoltage notification
9p/xen: fix release of IRQ
9p/xen: fix init sequence
block: return unsigned int from bdev_io_min
jffs2: fix use of uninitialized variable
ubifs: authentication: Fix use-after-free in ubifs_tnc_end_commit
ubi: fastmap: Fix duplicate slab cache names while attaching
ubifs: Correct the total block count by deducting journal reservation
rtc: check if __rtc_read_time was successful in rtc_timer_do_work()
rtc: abx80x: Fix WDT bit position of the status register
rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq()
NFSv4.0: Fix a use-after-free problem in the asynchronous open()
um: Always dump trace for specified task in show_stack
um: Clean up stacktrace dump
um: add show_stack_loglvl()
um/sysrq: remove needless variable sp
um: Fix the return value of elf_core_copy_task_fpregs
um: Fix potential integer overflow during physmem setup
rpmsg: glink: Propagate TX failures in intentless mode as well
SUNRPC: make sure cache entry active before cache_show
NFSD: Prevent a potential integer overflow
lib: string_helpers: silence snprintf() output truncation warning
usb: dwc3: gadget: Fix checking for number of TRBs left
ALSA: hda/realtek: Apply quirk for Medion E15433
ALSA: hda/realtek: Fix Internal Speaker and Mic boost of Infinix Y4 Max
ALSA: hda/realtek: Set PCBeep to default value for ALC274
ALSA: hda/realtek: Update ALC225 depop procedure
media: wl128x: Fix atomicity violation in fmc_send_cmd()
HID: wacom: Interpret tilt data from Intuos Pro BT as signed values
block: fix ordering between checking BLK_MQ_S_STOPPED request adding
arm64: tls: Fix context-switching of tpidrro_el0 when kpti is enabled
sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
um: vector: Do not use drvdata in release
serial: 8250: omap: Move pm_runtime_get_sync
um: net: Do not use drvdata in release
um: ubd: Do not use drvdata in release
ubi: wl: Put source PEB into correct list if trying locking LEB failed
spi: Fix acpi deferred irq probe
netfilter: ipset: add missing range check in bitmap_ip_uadt
Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"
serial: sh-sci: Clean sci_ports[0] after at earlycon exit
Revert "usb: gadget: composite: fix OS descriptors w_value logic"
Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}()
tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
comedi: Flush partial mappings in error case
PCI: Fix use-after-free of slot->bus on hot remove
ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()
jfs: xattr: check invalid xattr size more strictly
ext4: fix FS_IOC_GETFSMAP handling
ext4: supress data-race warnings in ext4_free_inodes_{count,set}()
ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices
soc: qcom: socinfo: fix revision check in qcom_socinfo_probe()
cgroup: Move rcu_head up near the top of cgroup_root
cgroup: Make operations on the cgroup root_list RCU safe
usb: ehci-spear: fix call balance of sehci clk handling routines
apparmor: fix 'Do simple duplicate message elimination'
staging: greybus: uart: clean up TIOCGSERIAL
misc: apds990x: Fix missing pm_runtime_disable()
USB: chaoskey: Fix possible deadlock chaoskey_list_lock
USB: chaoskey: fail open after removal
usb: yurex: make waiting on yurex_write interruptible
usb: using mutex lock and supporting O_NONBLOCK flag in iowarrior_read()
ipmr: fix tables suspicious RCU usage
ipmr: convert /proc handlers to rcu_read_lock()
net: stmmac: dwmac-socfpga: Set RX watchdog interrupt as broken
marvell: pxa168_eth: fix call balance of pep->clk handling routines
net: usb: lan78xx: Fix refcounting and autosuspend on invalid WoL configuration
tg3: Set coherent DMA mask bits to 31 for BCM57766 chipsets
net: usb: lan78xx: Fix memory leak on device unplug by freeing PHY device
power: supply: core: Remove might_sleep() from power_supply_put()
vfio/pci: Properly hide first-in-list PCIe extended capability
NFSD: Fix nfsd4_shutdown_copy()
NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir()
NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length
rpmsg: glink: Fix GLINK command prefix
rpmsg: glink: Send READ_NOTIFY command in FIFO full case
rpmsg: glink: Add TX_DATA_CONT command while sending
perf trace: Avoid garbage when not printing a syscall's arguments
perf trace: Do not lose last events in a race
m68k: coldfire/device.c: only build FEC when HW macros are defined
m68k: mcfgpio: Fix incorrect register offset for CONFIG_M5441x
PCI: cpqphp: Fix PCIBIOS_* return value confusion
PCI: cpqphp: Use PCI_POSSIBLE_ERROR() to check config reads
perf probe: Correct demangled symbols in C++ program
perf cs-etm: Don't flush when packet_queue fills up
clk: clk-axi-clkgen: make sure to enable the AXI bus clock
clk: axi-clkgen: use devm_platform_ioremap_resource() short-hand
dt-bindings: clock: axi-clkgen: include AXI clk
dt-bindings: clock: adi,axi-clkgen: convert old binding to yaml format
fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()
fbdev/sh7760fb: Alloc DMA memory from hardware device
powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static
ocfs2: fix uninitialized value in ocfs2_file_read_iter()
scsi: qedi: Fix a possible memory leak in qedi_alloc_and_init_sb()
scsi: qedf: Fix a possible memory leak in qedf_alloc_and_init_sb()
scsi: fusion: Remove unused variable 'rc'
scsi: bfa: Fix use-after-free in bfad_im_module_exit()
mfd: rt5033: Fix missing regmap_del_irq_chip()
RDMA/bnxt_re: Check cqe flags to know imm_data vs inv_irkey
mtd: rawnand: atmel: Fix possible memory leak
cpufreq: loongson2: Unregister platform_driver on failure
mfd: intel_soc_pmic_bxtwc: Use IRQ domain for PMIC devices
mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU device
mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device
mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
mfd: da9052-spi: Change read-mask to write-mask
mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix race
powerpc/vdso: Flag VDSO64 entry points as functions
trace/trace_event_perf: remove duplicate samples on the first tracepoint event
netpoll: Use rcu_access_pointer() in netpoll_poll_lock
ALSA: 6fire: Release resources at card release
ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
ALSA: us122l: Use snd_card_free_when_closed() at disconnection
net: rfkill: gpio: Add check for clk_enable()
selftests: net: really check for bg process completion
bpf, sockmap: Fix sk_msg_reset_curr
bpf, sockmap: Several fixes to bpf_msg_pop_data
bpf, sockmap: Several fixes to bpf_msg_push_data
drm/etnaviv: hold GPU lock across perfmon sampling
drm/etnaviv: fix power register offset on GC300
drm/etnaviv: dump: fix sparse warnings
drm/msm/adreno: Use IRQF_NO_AUTOEN flag in request_irq()
drm/panfrost: Remove unused id_mask from struct panfrost_model
wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()
bpf: Fix the xdp_adjust_tail sample prog issue
ASoC: fsl_micfil: fix regmap_write_bits usage
ASoC: fsl_micfil: use GENMASK to define register bit fields
ASoC: fsl_micfil: do not define SHIFT/MASK for single bits
ASoC: fsl_micfil: Drop unnecessary register read
dt-bindings: vendor-prefixes: Add NeoFidelity, Inc
drm/imx/ipuv3: Use IRQF_NO_AUTOEN flag in request_irq()
wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()
wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
drm/omap: Fix locking in omap_gem_new_dmabuf()
wifi: ath9k: add range check for conn_rsp_epid in htc_connect_service()
drm/mm: Mark drm_mm_interval_tree*() functions with __maybe_unused
firmware: arm_scpi: Check the DVFS OPP count returned by the firmware
regmap: irq: Set lockdep class for hierarchical IRQ domains
ARM: dts: cubieboard4: Fix DCDC5 regulator constraints
tpm: fix signed/unsigned bug when checking event logs
efi/tpm: Pass correct address to memblock_reserve
mmc: mmc_spi: drop buggy snprintf()
soc: qcom: geni-se: fix array underflow in geni_se_clk_tbl_get()
soc: ti: smartreflex: Use IRQF_NO_AUTOEN flag in request_irq()
time: Fix references to _msecs_to_jiffies() handling of values
crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()
crypto: bcm - add error check in the ahash_hmac_init function
crypto: cavium - Fix the if condition to exit loop after timeout
crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY
EDAC/fsl_ddr: Fix bad bit shift operations
EDAC/bluefield: Fix potential integer overflow
firmware: google: Unregister driver_info on failure
firmware: google: Unregister driver_info on failure and exit in gsmi
hfsplus: don't query the device logical block size multiple times
s390/syscalls: Avoid creation of arch/arch/ directory
acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block()
m68k: mvme147: Reinstate early console
m68k: mvme16x: Add and use "mvme16x.h"
m68k: mvme147: Fix SCSI controller IRQ numbers
nvme-pci: fix freeing of the HMB descriptor table
initramfs: avoid filename buffer overrun
mips: asm: fix warning when disabling MIPS_FP_SUPPORT
x86/xen/pvh: Annotate indirect branch as safe
nvme: fix metadata handling in nvme-passthrough
NFSD: Force all NFSv4.2 COPY requests to be synchronous
cifs: Fix buffer overflow when parsing NFS reparse points
ipmr: Fix access to mfc_cache_list without lock held
proc/softirqs: replace seq_printf with seq_put_decimal_ull_width
ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
ASoC: stm: Prevent potential division by zero in stm32_sai_mclk_round_rate()
regulator: rk808: Add apply_bit for BUCK3 on RK809
soc: qcom: Add check devm_kasprintf() returned value
net: usb: qmi_wwan: add Quectel RG650V
x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB
ALSA: hda/realtek: Add subwoofer quirk for Infinix ZERO BOOK 13
selftests/watchdog-test: Fix system accidentally reset after watchdog-test
mac80211: fix user-power when emulating chanctx
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet
mm: revert "mm: shmem: fix data-race in shmem_getattr()"
kbuild: Use uname for LINUX_COMPILE_HOST detection
media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set
Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
nilfs2: fix null-ptr-deref in block_dirty_buffer tracepoint
ocfs2: fix UBSAN warning in ocfs2_verify_volume()
nilfs2: fix null-ptr-deref in block_touch_buffer tracepoint
KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN
ocfs2: uncache inode which has failed entering the group
net/mlx5e: kTLS, Fix incorrect page refcounting
net/mlx5: fs, lock FTE when checking if active
netlink: terminate outstanding dump on socket close
Revert "UPSTREAM: unicode: Don't special case ignorable code points"
Reapply "UPSTREAM: unicode: Don't special case ignorable code points"
Revert "UPSTREAM: unicode: Don't special case ignorable code points"
UPSTREAM: net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT
ANDROID: add file for recording allowed ABI breaks
Revert "spi: Fix deadlock when adding SPI controllers on SPI buses"
Revert "spi: fix use-after-free of the add_lock mutex"
ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER
BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics
UPSTREAM: x86/percpu: Clean up percpu_add_op()
UPSTREAM: x86/percpu: Clean up percpu_from_op()
UPSTREAM: x86/percpu: Clean up percpu_to_op()
UPSTREAM: x86/percpu: Introduce size abstraction macros
BACKPORT: FROMGIT: binder: add delivered_freeze to debugfs output
BACKPORT: FROMGIT: binder: fix memleak of proc->delivered_freeze
FROMGIT: binder: allow freeze notification for dead nodes
FROMGIT: binder: fix BINDER_WORK_CLEAR_FREEZE_NOTIFICATION debug logs
FROMGIT: binder: fix BINDER_WORK_FROZEN_BINDER debug logs
BACKPORT: FROMGIT: binder: fix freeze UAF in binder_release_work()
FROMGIT: binder: fix OOB in binder_add_freeze_work()
FROMGIT: binder: fix node UAF in binder_add_freeze_work()
Linux 5.4.286
mm: avoid leaving partial pfn mappings around in error case
9p: fix slab cache name creation for real
mm: add remap_pfn_range_notrack
mm/memory.c: make remap_pfn_range() reject unaligned addr
mm: fix ambiguous comments for better code readability
mm: clarify a confusing comment for remap_pfn_range()
md/raid10: improve code of mrdev in raid10_sync_request
net: usb: qmi_wwan: add Fibocom FG132 0x0112 composition
fs: Fix uninitialized value issue in from_kuid and from_kgid
powerpc/powernv: Free name on error in opal_event_init()
sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML
bpf: use kvzmalloc to allocate BPF verifier environment
HID: multitouch: Add quirk for HONOR MagicBook Art 14 touchpad
9p: Avoid creating multiple slab caches with the same name
ALSA: usb-audio: Add endianness annotations
vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans
hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer
ftrace: Fix possible use-after-free issue in ftrace_location()
NFSD: Fix NFSv4's PUTPUBFH operation
ALSA: usb-audio: Add quirks for Dell WD19 dock
ALSA: usb-audio: Support jack detection on Dell dock
ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove()
irqchip/gic-v3: Force propagation of the active state with a read-back
USB: serial: option: add Quectel RG650V
USB: serial: option: add Fibocom FG132 0x0112 composition
USB: serial: qcserial: add support for Sierra Wireless EM86xx
USB: serial: io_edgeport: fix use after free in debug printk
usb: musb: sunxi: Fix accessing an released usb phy
fs/proc: fix compile warning about variable 'vmcore_mmap_ops'
media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
net: bridge: xmit: make sure we have at least eth header len bytes
spi: fix use-after-free of the add_lock mutex
spi: Fix deadlock when adding SPI controllers on SPI buses
mtd: rawnand: protect access to rawnand devices while in suspend
btrfs: reinitialize delayed ref list after deleting it from the list
nfs: Fix KMSAN warning in decode_getfattr_attrs()
dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow
dm cache: fix potential out-of-bounds access on the first resume
dm cache: optimize dirty bit checking with find_next_bit when resizing
dm cache: fix out-of-bounds access to the dirty bitset when resizing
dm cache: correct the number of origin blocks to match the target length
drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
pwm: imx-tpm: Use correct MODULO value for EPWM mode
media: v4l2-tpg: prevent the risk of a division by zero
media: cx24116: prevent overflows on SNR calculus
media: s5p-jpeg: prevent buffer overflows
ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init()
media: adv7604: prevent underflow condition when reporting colorspace
media: dvb_frontend: don't play tricks with underflow values
media: dvbdev: prevent the risk of out of memory access
media: stb0899_algo: initialize cfr before using it
net: hns3: fix kernel crash when uninstalling driver
can: c_can: fix {rx,tx}_errors statistics
sctp: properly validate chunk size in sctp_sf_ootb()
net: enetc: set MAC address to the VF net_device
enetc: simplify the return expression of enetc_vf_set_mac_addr()
security/keys: fix slab-out-of-bounds in key_task_permission
HID: core: zero-initialize the report buffer
ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin
ARM: dts: rockchip: Fix the spi controller on rk3036
ARM: dts: rockchip: drop grf reference from rk3036 hdmi
ARM: dts: rockchip: fix rk3036 acodec node
arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma lion
arm64: dts: rockchip: Fix bluetooth properties on Rock960 boards
arm64: dts: rockchip: Remove hdmi's 2nd interrupt on rk3328
arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-sapphire-excavator
ANDROID: GKI: Enable SERIAL_8250_DW
UPSTREAM: USB: media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
Revert "genetlink: hold RCU in genlmsg_mcast()"
Revert "arm64: probes: Fix uprobes for big-endian kernels"
Revert "arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning"
Revert "inet: inet_defrag: prevent sk release while still in use"
Linux 5.4.285
mm: krealloc: Fix MTE false alarm in __do_krealloc
mac80211: always have ieee80211_sta_restart()
vt: prevent kernel-infoleak in con_font_get()
Revert "drm/mipi-dsi: Set the fwnode for mipi_dsi_device"
mm: shmem: fix data-race in shmem_getattr()
nilfs2: fix kernel bug due to missing clearing of checked flag
ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow
riscv: Remove unused GENERATING_ASM_OFFSETS
nilfs2: fix potential deadlock with newly created symlinks
staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg()
wifi: iwlegacy: Clear stale interrupts before resuming device
wifi: ath10k: Fix memory leak in management tx
wifi: mac80211: do not pass a stopped vif to the driver in .get_txpower
Revert "driver core: Fix uevent_show() vs driver detach race"
xhci: Fix Link TRB DMA in command ring stopped completion event
usb: phy: Fix API devm_usb_put_phy() can not release the phy
usbip: tools: Fix detach_port() invalid port error path
misc: sgi-gru: Don't disable preemption in GRU driver
net: amd: mvme147: Fix probe banner message
firmware: arm_sdei: Fix the input parameter of cpuhp_remove_state()
drivers/misc: ti-st: Remove unneeded variable in st_tty_open
netfilter: nft_payload: sanitize offset and length before calling skb_checksum()
net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension
net: support ip generic csum processing in skb_csum_hwoffload_help
bpf: Fix out-of-bounds write in trie_get_next_key()
net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT
gtp: allow -1 to be specified as file description from userspace
gtp: simplify error handling code in 'gtp_encap_enable()'
dt-bindings: gpu: Convert Samsung Image Rotator to dt-schema
ASoC: cs42l51: Fix some error handling paths in cs42l51_probe()
wifi: iwlwifi: mvm: Fix response handling in iwl_mvm_send_recovery_cmd()
wifi: iwlwifi: mvm: disconnect station vifs if recovery failed
mac80211: Add support to trigger sta disconnect on hardware restart
mac80211: do drv_reconfig_complete() before restarting all
wifi: mac80211: skip non-uploaded keys in ieee80211_iter_keys
cgroup: Fix potential overflow issue when checking max_depth
xfrm: validate new SA's prefixlen using SA family when sel.family is unset
arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning
selinux: improve error checking in sel_write_load()
hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event
ALSA: hda/realtek: Add subwoofer quirk for Acer Predator G9-593
nilfs2: fix kernel bug due to missing clearing of buffer delay flag
ACPI: button: Add DMI quirk for Samsung Galaxy Book2 to fix initial lid detection issue
ACPI: resource: Add LG 16T90SP to irq1_level_low_skip_override[]
drm/amd: Guard against bad data for ATIF ACPI method
ALSA: hda/realtek: Update default depop procedure
ALSA: firewire-lib: Avoid division by zero in apply_constraint_to_size()
posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
r8169: avoid unsolicited interrupts
net: sched: fix use-after-free in taprio_change()
net: usb: usbnet: fix name regression
be2net: fix potential memory leak in be_xmit()
net/sun3_82586: fix potential memory leak in sun3_82586_send_packet()
tracing: Consider the NULL character when validating the event length
jfs: Fix sanity check in dbMount
udf: fix uninit-value use in udf_get_fileshortad
drm/vboxvideo: Replace fake VLA at end of vbva_mouse_pointer_shape with real VLA
KVM: s390: gaccess: Check if guest address is in memslot
KVM: s390: gaccess: Cleanup access to guest pages
KVM: s390: gaccess: Refactor access address range check
KVM: s390: gaccess: Refactor gpa and length calculation
arm64: probes: Fix uprobes for big-endian kernels
arm64:uprobe fix the uprobe SWBP_INSN in big-endian
Bluetooth: bnep: fix wild-memory-access in proto_unregister
usb: typec: altmode should keep reference to parent
smb: client: fix OOBs when building SMB2_IOCTL request
genetlink: hold RCU in genlmsg_mcast()
net: systemport: fix potential memory leak in bcm_sysport_xmit()
net: ethernet: aeroflex: fix potential memory leak in greth_start_xmit_gbit()
macsec: don't increment counters for an unrelated SA
drm/msm/dsi: fix 32-bit signed integer extension in pclk_rate calculation
RDMA/bnxt_re: Return more meaningful error
ipv4: give an IPv4 dev to blackhole_netdev
RDMA/cxgb4: Fix RDMA_CM_EVENT_UNREACHABLE error for iWARP
ARM: dts: bcm2837-rpi-cm3-io3: Fix HDMI hpd-gpio pin
RDMA/bnxt_re: Fix incorrect AVID type in WQE structure
mac80211: Fix NULL ptr deref for injected rate info
erofs: fix lz4 inplace decompression
nilfs2: propagate directory read errors from nilfs_find_entry()
x86/apic: Always explicitly disarm TSC-deadline timer
x86/resctrl: Annotate get_mem_config() functions as __init
parport: Proper fix for array out-of-bounds access
USB: serial: option: add Telit FN920C04 MBIM compositions
USB: serial: option: add support for Quectel EG916Q-GL
xhci: Fix incorrect stream context type macro
Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001
Bluetooth: Remove debugfs directory on module init failure
iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
iio: light: opt3001: add missing full-scale range value
iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()
iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig
iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig
drm/vmwgfx: Handle surface check failure correctly
blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race
x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET
KVM: s390: Change virtual to physical address access in diag 0x258 handler
s390/sclp_vt220: Convert newlines to CRLF instead of LFCR
KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()
wifi: mac80211: fix potential key use-after-free
mm/swapfile: skip HugeTLB pages for unuse_vma
fat: fix uninitialized variable
PCI: Add function 0 DMA alias quirk for Glenfly Arise chip
tracing/kprobes: Fix symbol counting logic by looking at modules as well
tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
arm64: probes: Fix simulate_ldr*_literal()
arm64: probes: Remove broken LDR (literal) uprobe support
posix-clock: Fix missing timespec64 check in pc_clock_settime()
nouveau/dmem: Fix vulnerability in migrate_to_ram upon copy error
net: Fix an unsafe loop on the list
hid: intel-ish-hid: Fix uninitialized variable 'rv' in ish_fw_xfer_direct_dma
usb: storage: ignore bogus device raised by JieLi BR21 USB sound chip
usb: xhci: Fix problem with xhci resume from suspend
usb: dwc3: core: Stop processing of pending events if controller is halted
Revert "usb: yurex: Replace snprintf() with the safer scnprintf() variant"
HID: plantronics: Workaround for an unexcepted opposite volume key
CDC-NCM: avoid overflow in sanity checking
resource: fix region_intersects() vs add_memory_driver_managed()
lockdep: fix deadlock issue between lockdep and rcu
locking/lockdep: Avoid potential access of invalid memory in lock_class
locking/lockdep: Rework lockdep_lock
locking/lockdep: Fix bad recursion pattern
slip: make slhc_remember() more robust against malicious packets
ppp: fix ppp_async_encode() illegal access
sctp: ensure sk_state is set to CLOSED if hashing fails in sctp_listen_start
net: annotate lockless accesses to sk->sk_max_ack_backlog
net: annotate lockless accesses to sk->sk_ack_backlog
net: ibm: emac: mal: fix wrong goto
net/sched: accept TCA_STAB only for root qdisc
igb: Do not bring the device up after non-fatal error
gpio: aspeed: Use devm_clk api to manage clock source
gpio: aspeed: Add the flush write to ensure the write complete.
Bluetooth: RFCOMM: FIX possible deadlock in rfcomm_sk_state_change
netfilter: br_netfilter: fix panic with metadata_dst skb
tcp: fix tcp_enter_recovery() to zero retrans_stamp when it's safe
tcp: fix to allow timestamp undo if no retransmits were sent
SUNRPC: Fix integer overflow in decode_rc_list()
ice: fix VLAN replay after reset
RDMA/rxe: Fix seg fault in rxe_comp_queue_pkt
fbdev: sisfb: Fix strbuf array overflow
driver core: bus: Return -EIO instead of 0 when show/store invalid bus attribute
tools/iio: Add memory allocation failure check for trigger_name
virtio_pmem: Check device status before requesting flush
usb: dwc2: Adjust the timing of USB Driver Interrupt Registration in the Crashkernel Scenario
usb: chipidea: udc: enable suspend interrupt after usb reset
media: videobuf2-core: clear memory related fields in __vb2_plane_dmabuf_put()
ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition
PCI: Mark Creative Labs EMU20k2 INTx masking as broken
i2c: i801: Use a different adapter-name for IDF adapters
PCI: Add ACS quirk for Qualcomm SA8775P
clk: bcm: bcm53573: fix OF node leak in init
ktest.pl: Avoid false positives with grub2 skip regex
s390/cpum_sf: Remove WARN_ON_ONCE statements
ext4: nested locking for xattr inode
s390/mm: Add cond_resched() to cmm_alloc/free_pages()
s390/facility: Disable compile time optimization for decompressor code
bpf: Check percpu map value size first
Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal
virtio_console: fix misc probe bugs
tracing: Have saved_cmdlines arrays all in one allocation
drm/crtc: fix uninitialized variable use even harder
tracing: Remove precision vsnprintf() check from print event
net: ethernet: cortina: Drop TSO support
unicode: Don't special case ignorable code points
ext4: fix inode tree inconsistency caused by ENOMEM
ACPI: battery: Fix possible crash when unregistering a battery hook
ACPI: battery: Simplify battery hook locking
r8169: add tally counter fields added with RTL8125
r8169: Fix spelling mistake: "tx_underun" -> "tx_underrun"
clk: qcom: clk-rpmh: Fix overflow in BCM vote
clk: qcom: rpmh: Simplify clk_rpmh_bcm_send_cmd()
nfsd: fix delegation_blocked() to block correctly for at least 30 seconds
nfsd: use ktime_get_seconds() for timestamps
uprobes: fix kernel info leak via "[uprobes]" vma
arm64: errata: Expand speculative SSBS workaround once more
arm64: cputype: Add Neoverse-N3 definitions
arm64: Add Cortex-715 CPU part definition
i2c: qcom-geni: Use IRQF_NO_AUTOEN flag in request_irq()
i2c: qcom-geni: Grow a dev pointer to simplify code
i2c: qcom-geni: Let firmware specify irq trigger flags
gpio: davinci: fix lazy disable
btrfs: wait for fixup workers before stopping cleaner kthread during umount
btrfs: fix a NULL pointer dereference when failed to start a new trasacntion
ACPI: resource: Add Asus ExpertBook B2502CVA to irq1_level_low_skip_override[]
ACPI: resource: Add Asus Vivobook X1704VAP to irq1_level_low_skip_override[]
Input: adp5589-keys - fix adp5589_gpio_get_value()
rtc: at91sam9: fix OF node leak in probe() error path
tomoyo: fallback to realpath if symlink's pathname does not exist
iio: magnetometer: ak8975: Fix reading for ak099xx sensors
media: venus: fix use after free bug in venus_remove due to race condition
media: uapi/linux/cec.h: cec_msg_set_reply_to: zero flags
media: sun4i_csi: Implement link validate for sun4i_csi subdev
clk: rockchip: fix error for unknown clocks
aoe: fix the potential use-after-free problem in more places
riscv: define ILLEGAL_POINTER_VALUE for 64bit
ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate
ocfs2: fix null-ptr-deref when journal load failed.
ocfs2: remove unreasonable unlock in ocfs2_read_blocks
ocfs2: cancel dqi_sync_work before freeing oinfo
ocfs2: reserve space for inline xattr before attaching reflink tree
ocfs2: fix uninit-value in ocfs2_get_block()
ocfs2: fix the la space leak when unmounting an ocfs2 volume
mm: krealloc: consider spare memory for __GFP_ZERO
jbd2: stop waiting for space when jbd2_cleanup_journal_tail() returns error
drm: omapdrm: Add missing check for alloc_ordered_workqueue
of/irq: Support #msi-cells=<0> in of_msi_get_domain
parisc: Fix stack start for ADDR_NO_RANDOMIZE personality
parisc: Fix 64-bit userspace syscall path
ext4: fix incorrect tid assumption in ext4_wait_for_tail_page_commit()
ext4: fix double brelse() the buffer of the extents path
ext4: aovid use-after-free in ext4_ext_insert_extent()
ext4: fix incorrect tid assumption in __jbd2_log_wait_for_space()
ext4: propagate errors from ext4_find_extent() in ext4_insert_range()
ext4: no need to continue when the number of entries is 1
ALSA: core: add isascii() check to card ID generator
drm: Consistently use struct drm_mode_rect for FB_DAMAGE_CLIPS
parisc: Fix itlb miss handler for 64-bit programs
perf/core: Fix small negative period being ignored
spi: bcm63xx: Fix module autoloading
firmware: tegra: bpmp: Drop unused mbox_client_to_bpmp()
i2c: xiic: Wait for TX empty to avoid missed TX NAKs
i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume
selftests: vDSO: fix vDSO symbols lookup for powerpc64
selftests: breakpoints: use remaining time to check if suspend succeed
spi: s3c64xx: fix timeout counters in flush_fifo
ext4: fix i_data_sem unlock order in ext4_ind_migrate()
ext4: ext4_search_dir should return a proper error
of/irq: Refer to actual buffer size in of_irq_parse_one()
drm/radeon/r100: Handle unknown family in r100_cp_init_microcode()
scsi: aacraid: Rearrange order of struct aac_srb_unit
drm/printer: Allow NULL data in devcoredump printer
drm/amd/display: Initialize get_bytes_per_element's default to 1
drm/amd/display: Fix index out of bounds in degamma hardware format translation
drm/amd/display: Check stream before comparing them
jfs: Fix uninit-value access of new_ea in ea_buffer
jfs: check if leafidx greater than num leaves per dmap tree
jfs: Fix uaf in dbFreeBits
jfs: UBSAN: shift-out-of-bounds in dbFindBits
ata: sata_sil: Rename sil_blacklist to sil_quirks
power: reset: brcmstb: Do not go into infinite loop if reset fails
fbdev: pxafb: Fix possible use after free in pxafb_task()
x86/syscall: Avoid memcpy() for ia32 syscall_get_arguments()
ALSA: hdsp: Break infinite MIDI input flush loop
ALSA: asihpi: Fix potential OOB array access
signal: Replace BUG_ON()s
nfp: Use IRQF_NO_AUTOEN flag in request_irq()
wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_cmd_802_11_scan_ext()
proc: add config & param to block forcing mem writes
ACPICA: iasl: handle empty connection_node
tcp: avoid reusing FIN_WAIT2 when trying to find port in connect() process
ipv4: Mask upper DSCP bits and ECN bits in NETLINK_FIB_LOOKUP family
ipv4: Check !in_dev earlier for ioctl(SIOCSIFADDR).
net: mvpp2: Increase size of queue_name buffer
tipc: guard against string buffer overrun
ACPICA: check null return of ACPI_ALLOCATE_ZEROED() in acpi_db_convert_to_package()
ACPI: EC: Do not release locks during operation region accesses
wifi: rtw88: select WANT_DEV_COREDUMP
net: sched: consistently use rcu_replace_pointer() in taprio_change()
ACPICA: Fix memory leak if acpi_ps_get_next_field() fails
ACPICA: Fix memory leak if acpi_ps_get_next_namepath() fails
net: hisilicon: hns_mdio: fix OF node leak in probe()
net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info()
net: hisilicon: hip04: fix OF node leak in probe()
ice: Adjust over allocation of memory in ice_sched_add_root_node() and ice_sched_add_node()
wifi: ath9k_htc: Use __skb_set_length() for resetting urb before resubmit
wifi: ath9k: fix possible integer overflow in ath9k_get_et_stats()
f2fs: Require FMODE_WRITE for atomic write ioctls
ALSA: hda/conexant: Fix conflicting quirk for System76 Pangolin
ALSA: hda/generic: Unconditionally prefer preferred_dacs pairs
ALSA: hda/realtek: Fix the push button function for the ALC257
sctp: set sk_state back to CLOSED if autobind fails in sctp_listen_start
ipv4: ip_gre: Fix drops of small packets in ipgre_xmit
net: add more sanity checks to qdisc_pkt_len_init()
net: avoid potential underflow in qdisc_pkt_len_init() with UFO
net: ethernet: lantiq_etop: fix memory disclosure
Bluetooth: btmrvl: Use IRQF_NO_AUTOEN flag in request_irq()
Bluetooth: btmrvl_sdio: Refactor irq wakeup
netfilter: nf_tables: prevent nf_skb_duplicated corruption
net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()
netfilter: uapi: NFTA_FLOWTABLE_HOOK is NLA_NESTED
net/mlx5: Added cond_resched() to crdump collection
ieee802154: Fix build error
drivers: net: Fix Kconfig indentation, continued
Minor fixes to the CAIF Transport drivers Kconfig file
ceph: remove the incorrect Fw reference check when dirtying pages
mailbox: bcm2835: Fix timeout during suspend mode
mailbox: rockchip: fix a typo in module autoloading
usb: yurex: Fix inconsistent locking bug in yurex_read()
i2c: isch: Add missed 'else'
i2c: aspeed: Update the stop sw state when the bus recovery occurs
mm: only enforce minimum stack gap size if it's sensible
pps: add an error check in parport_attach
pps: remove usage of the deprecated ida_simple_xx() API
USB: misc: yurex: fix race between read and write
usb: yurex: Replace snprintf() with the safer scnprintf() variant
soc: versatile: realview: fix soc_dev leak during device remove
soc: versatile: realview: fix memory leak during device remove
PCI: xilinx-nwl: Fix off-by-one in INTx IRQ handler
PCI: xilinx-nwl: Use irq_data_get_irq_chip_data()
ASoC: meson: axg-card: fix 'use-after-free'
ASoC: meson: axg: extract sound card utils
nfs: fix memory leak in error path of nfs4_do_reclaim
fs: Fix file_set_fowner LSM hook inconsistencies
vfs: fix race between evice_inodes() and find_inode()&iput()
hwrng: mtk - Use devm_pm_runtime_enable
f2fs: avoid potential int overflow in sanity_check_area_boundary()
f2fs: prevent possible int overflow in dir_block_index()
debugobjects: Fix conditions in fill_pool()
wifi: rtw88: 8822c: Fix reported RX band width
ACPI: resource: Add another DMI match for the TongFang GMxXGxx
ACPI: sysfs: validate return type of _STR method
drbd: Add NULL check for net_conf to prevent dereference in state validation
drbd: Fix atomicity violation in drbd_uuid_set_bm()
tty: rp2: Fix reset with non forgiving PCIe host bridges
firmware_loader: Block path traversal
USB: class: CDC-ACM: fix race between get_serial and set_serial
USB: misc: cypress_cy7c63: check for short transfer
USB: appledisplay: close race between probe and completion handler
drm/amd/display: Round calculated vtotal
soc: versatile: integrator: fix OF node leak in probe() error path
Remove *.orig pattern from .gitignore
crypto: aead,cipher - zeroize key buffer after use
netfilter: ctnetlink: compile ctnetlink_label_size with CONFIG_NF_CONNTRACK_EVENTS
net: qrtr: Update packets cloning when broadcasting
tcp: check skb is non-NULL in tcp_rto_delta_us()
net: seeq: Fix use after free vulnerability in ether3 Driver Due to Race Condition
netfilter: nf_reject_ipv6: fix nf_reject_ip6_tcphdr_put()
coresight: tmc: sg: Do not leak sg_table
iio: adc: ad7606: fix standby gpio state to match the documentation
iio: adc: ad7606: fix oversampling gpio array
f2fs: reduce expensive checkpoint trigger frequency
f2fs: remove unneeded check condition in __f2fs_setxattr()
f2fs: fix to update i_ctime in __f2fs_setxattr()
f2fs: fix typo
f2fs: enhance to update i_mode and acl atomically in f2fs_setattr()
nfsd: return -EINVAL when namelen is 0
nfsd: call cache_put if xdr_reserve_space returns NULL
ntb: intel: Fix the NULL vs IS_ERR() bug for debugfs_create_dir()
RDMA/cxgb4: Added NULL check for lookup_atid
riscv: Fix fp alignment bug in perf_callchain_user()
RDMA/hns: Optimize hem allocation performance
watchdog: imx_sc_wdt: Don't disable WDT in suspend
pinctrl: mvebu: Fix devinit_dove_pinctrl_probe function
clk: ti: dra7-atl: Fix leak of of_nodes
pinctrl: single: fix missing error code in pcs_probe()
RDMA/iwcm: Fix WARNING:at_kernel/workqueue.c:#check_flush_dependency
PCI: xilinx-nwl: Fix register misspelling
PCI: keystone: Fix if-statement expression in ks_pcie_quirk()
drivers: media: dvb-frontends/rtl2830: fix an out-of-bounds write error
drivers: media: dvb-frontends/rtl2832: fix an out-of-bounds write error
clk: rockchip: Set parent rate for DCLK_VOP clock on RK3228
perf time-utils: Fix 32-bit nsec parsing
perf sched timehist: Fixed timestamp error when unable to confirm event sched_in time
perf sched timehist: Fix missing free of session in perf_sched__timehist()
bpf: Fix bpf_strtol and bpf_strtoul helpers for 32bit
nilfs2: fix potential oob read in nilfs_btree_check_delete()
nilfs2: determine empty node blocks as corrupted
nilfs2: fix potential null-ptr-deref in nilfs_btree_insert()
ext4: avoid OOB when system.data xattr changes underneath the filesystem
ext4: return error on ext4_find_inline_entry
ext4: avoid negative min_clusters in find_group_orlov()
smackfs: Use rcu_assign_pointer() to ensure safe assignment in smk_set_cipso
ext4: clear EXT4_GROUP_INFO_WAS_TRIMMED_BIT even mount with discard
jbd2: introduce/export functions jbd2_journal_submit|finish_inode_data_buffers()
kthread: fix task state in kthread worker if being frozen
kthread: add kthread_work tracepoints
xz: cleanup CRC32 edits from 2018
selftests/bpf: Fix error compiling test_lru_map.c
selftests/bpf: Fix compiling tcp_rtt.c with musl-libc
selftests/bpf: Fix compiling flow_dissector.c with musl-libc
selftests/bpf: Fix compile error from rlim_t in sk_storage_map.c
tpm: Clean up TPM space after command failure
xen/swiotlb: add alignment check for dma buffers
xen: use correct end address of kernel for conflict checking
drivers:drm:exynos_drm_gsc:Fix wrong assignment in gsc_bind()
drm/msm: fix %s null argument error
ipmi: docs: don't advertise deprecated sysfs entries
drm/msm/a5xx: fix races in preemption evaluation stage
drm/msm/a5xx: properly clear preemption records on resume
drm/msm/a5xx: disable preemption in submits by default
drm/msm: Fix incorrect file name output in adreno_request_fw()
jfs: fix out-of-bounds in dbNextAG() and diAlloc()
drm/radeon/evergreen_cs: fix int overflow errors in cs track offsets
drm/rockchip: dw_hdmi: Fix reading EDID when using a forced mode
drm/rockchip: vop: Allow 4096px width scaling
drm/radeon: properly handle vbios fake edid sizing
drm/radeon: Replace one-element array with flexible-array member
drm/amdgpu: properly handle vbios fake edid sizing
drm/amdgpu: Replace one-element array with flexible-array member
drm/stm: Fix an error handling path in stm_drm_platform_probe()
mtd: powernv: Add check devm_kasprintf() returned value
fbdev: hpfb: Fix an error handling path in hpfb_dio_probe()
power: supply: max17042_battery: Fix SOC threshold calc w/ no current sense
power: supply: axp20x_battery: Remove design from min and max voltage
power: supply: axp20x_battery: allow disabling battery charging
hwmon: (ntc_thermistor) fix module autoloading
mtd: slram: insert break after errors in parsing the map
hwmon: (max16065) Fix overflows seen when writing limits
clocksource/drivers/qcom: Add missing iounmap() on errors in msm_dt_timer_init()
reset: berlin: fix OF node leak in probe() error path
ARM: versatile: fix OF node leak in CPUs prepare
ARM: dts: imx7d-zii-rmu2: fix Ethernet PHY pinctrl property
spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ
spi: ppc4xx: handle irq_of_parse_and_map() errors
block, bfq: don't break merge chain in bfq_split_bfqq()
block, bfq: choose the last bfqq from merge chain in bfq_setup_cooperator()
block, bfq: fix possible UAF for bfqq->bic with merge chain
net: tipc: avoid possible garbage value
Bluetooth: btusb: Fix not handling ZPL/short-transfer
can: bcm: Clear bo->bcm_proc_read after remove_proc_entry().
sock_map: Add a cond_resched() in sock_hash_free()
wifi: wilc1000: fix potential RCU dereference issue in wilc_parse_join_bss_param
wifi: mac80211: use two-phase skb reclamation in ieee80211_do_stop()
mac80211: parse radiotap header when selecting Tx queue
wifi: cfg80211: fix two more possible UBSAN-detected off-by-one errors
wifi: cfg80211: fix UBSAN noise in cfg80211_wext_siwscan()
netfilter: nf_tables: reject expiration higher than timeout
netfilter: nf_tables: reject element expiration with no timeout
netfilter: nf_tables: elements with timeout below CONFIG_HZ never expire
can: j1939: use correct function name in comment
mount: handle OOM on mnt_warn_timestamp_expiry
fs/namespace: fnic: Switch to use %ptTd
mount: warn only once about timestamp range expiration
fs: explicitly unregister per-superblock BDIs
wifi: ath9k: Remove error checks when creating debugfs entries
wifi: ath9k: fix parameter check in ath9k_init_debug()
ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()
USB: usbtmc: prevent kernel-usb-infoleak
USB: serial: pl2303: add device id for Macrosilicon MS3020
bpf: Fix DEVMAP_HASH overflow check on 32-bit arches
inet: inet_defrag: prevent sk release while still in use
gpio: prevent potential speculation leaks in gpio_device_get_desc()
ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()
ocfs2: add bounds checking to ocfs2_xattr_find_entry()
x86/hyperv: Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency
spi: bcm63xx: Enable module autoloading
drm: komeda: Fix an issue related to normalized zpos
ASoC: tda7419: fix module autoloading
wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead
wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room()
net: ftgmac100: Ensure tx descriptor updates are visible
microblaze: don't treat zero reserved memory regions as error
pinctrl: at91: make it work with current gpiolib
ALSA: hda/realtek - FIxed ALC285 headphone no sound
ALSA: hda/realtek - Fixed ALC256 headphone no sound
ASoC: allow module autoloading for table db1200_pids
selftests: breakpoints: Fix a typo of function name
soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps"
spi: nxp-fspi: fix the KASAN report out-of-bounds bug
net: dpaa: Pad packets to ETH_ZLEN
net: ftgmac100: Enable TX interrupt to avoid TX timeout
net/mlx5e: Add missing link modes to ptys2ethtool_map
ice: fix accounting for filters shared by multiple VSIs
arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma
scripts: kconfig: merge_config: config files: add a trailing newline
net: phy: vitesse: repair vsc73xx autonegotiation
net: ethernet: use ip_hdrlen() instead of bit shift
usbnet: ipheth: fix carrier detection in modes 1 and 4
UPSTREAM: unicode: Don't special case ignorable code points
ANDROID: 16K: Fixup padding vm_flags bits on VMA splits
ANDROID: 16K: Introduce pgsize_migration_inline.h
Revert "clocksource/drivers/timer-of: Remove percpu irq related code"
Linux 5.4.284
Revert "parisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367"
cx82310_eth: fix error return code in cx82310_bind()
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
rtmutex: Drop rt_mutex::wait_lock before scheduling
drm/i915/fence: Mark debug_fence_free() with __maybe_unused
drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused
nvmet-tcp: fix kernel crash if commands allocation fails
arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry
arm64: acpi: Move get_cpu_for_acpi_id() to a header
ACPI: processor: Fix memory leaks in error paths of processor_add()
ACPI: processor: Return an error if acpi_processor_get_info() fails in processor_add()
nilfs2: protect references to superblock parameters exposed in sysfs
nilfs2: replace snprintf in show functions with sysfs_emit
tracing: Avoid possible softlockup in tracing_iter_reset()
ring-buffer: Rename ring_buffer_read() to read_buffer_iter_advance()
uprobes: Use kzalloc to allocate xol area
clocksource/drivers/timer-of: Remove percpu irq related code
clocksource/drivers/imx-tpm: Fix next event not taking effect sometime
clocksource/drivers/imx-tpm: Fix return -ETIME when delta exceeds INT_MAX
VMCI: Fix use-after-free when removing resource in vmci_resource_remove()
Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic
uio_hv_generic: Fix kernel NULL pointer dereference in hv_uio_rescind
nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc
binder: fix UAF caused by offsets overwrite
iio: fix scale application in iio_convert_raw_to_processed_unlocked
iio: buffer-dmaengine: fix releasing dma channel on error
staging: iio: frequency: ad9834: Validate frequency parameter value
NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations
ata: pata_macio: Use WARN instead of BUG
lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc()
of/irq: Prevent device address out-of-bounds read in interrupt map walk
Squashfs: sanity check symbolic link size
usbnet: ipheth: race between ipheth_close and error handling
Input: uinput - reject requests with unreasonable number of slots
HID: cougar: fix slab-out-of-bounds Read in cougar_report_fixup
btrfs: initialize location to fix -Wmaybe-uninitialized in btrfs_lookup_dentry()
PCI: Add missing bridge lock to pci_bus_lock()
btrfs: clean up our handling of refs == 0 in snapshot delete
btrfs: replace BUG_ON with ASSERT in walk_down_proc()
smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu()
wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id()
libbpf: Add NULL checks to bpf_object__{prev_map,next_map}
hwmon: (w83627ehf) Fix underflows seen when writing limit attributes
hwmon: (nct6775-core) Fix underflows seen when writing limit attributes
hwmon: (lm95234) Fix underflows seen when writing limit attributes
hwmon: (adc128d818) Fix underflows seen when writing limit attributes
pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
devres: Initialize an uninitialized struct member
um: line: always fill *error_out in setup_one_line()
cgroup: Protect css->cgroup write under css_set_lock
iommu/vt-d: Handle volatile descriptor status read
dm init: Handle minors larger than 255
ASoC: topology: Properly initialize soc_enum values
net: dsa: vsc73xx: fix possible subblocks range of CAPT block
net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN
net: bridge: fdb: convert added_by_external_learn to use bitops
net: bridge: fdb: convert added_by_user to bitops
net: bridge: fdb: convert is_sticky to bitops
net: bridge: fdb: convert is_static to bitops
net: bridge: fdb: convert is_local to bitops
usbnet: modern method to get random MAC
net: usb: don't write directly to netdev->dev_addr
drivers/net/usb: Remove all strcpy() uses
cx82310_eth: re-enable ethernet mode after router reboot
tcp_bpf: fix return value of tcp_bpf_sendmsg()
platform/x86: dell-smbios: Fix error path in dell_smbios_init()
igb: Fix not clearing TimeSync interrupts for 82580
can: bcm: Remove proc entry when dev is unregistered.
pcmcia: Use resource_size function on resource object
media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse
PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0)
usb: uas: set host status byte on data completion error
wifi: brcmsmac: advertise MFP_CAPABLE to enable WPA3
udf: Avoid excessive partition lengths
netfilter: nf_conncount: fix wrong variable type
af_unix: Remove put_pid()/put_cred() in copy_peercred().
irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1
smack: unix sockets: fix accept()ed socket label
ALSA: hda: Add input value sanity checks to HDMI channel map controls
nilfs2: fix state management in error path of log writing function
nilfs2: fix missing cleanup on rollforward recovery error
sched: sch_cake: fix bulk flow accounting logic for host fairness
ila: call nf_unregister_net_hooks() sooner
clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API
clk: qcom: clk-alpha-pll: Fix the pll post div mask
clk: hi6220: use CLK_OF_DECLARE_DRIVER
reset: hi6220: Add support for AO reset controller
fuse: use unsigned type for getxattr/listxattr size truncation
fuse: update stats for pages in dropped aux writeback list
mmc: sdhci-of-aspeed: fix module autoloading
mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K
irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init()
ata: libata: Fix memory leak for error path in ata_host_alloc()
ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices
ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object
sch/netem: fix use after free in netem_dequeue
i2c: Use IS_REACHABLE() for substituting empty ACPI functions
udf: Limit file size to 4TB
virtio_net: Fix napi_skb_cache_put warning
net: set SOCK_RCU_FREE before inserting socket into hashtable
block: initialize integrity buffer to zero before writing it to media
media: uvcvideo: Enforce alignment of frame and interval
drm/amd/display: Skip wbscl_set_scaler_filter if filter is null
wifi: cfg80211: make hash table duplicates more survivable
smack: tcp: ipv4, fix incorrect labeling
usb: typec: ucsi: Fix null pointer dereference in trace
usbip: Don't submit special requests twice
ionic: fix potential irq name truncation
apparmor: fix possible NULL pointer dereference
drm/amdkfd: Reconcile the definition and use of oem_id in struct kfd_topology_device
drm/amdgpu: fix mc_data out-of-bounds read warning
drm/amdgpu: fix ucode out-of-bounds read warning
drm/amd/display: Fix Coverity INTEGER_OVERFLOW within dal_gpio_service_create
drm/amd/display: Check num_valid_sets before accessing reader_wm_sets[]
drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6
drm/amd/display: Check gpio_id before used as array index
drm/amdgpu: fix overflowed array index read warning
drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr
net: usb: qmi_wwan: add MeiG Smart SRM825L
i2c: Fix conditional for substituting empty ACPI functions
drm: panel-orientation-quirks: Add quirk for OrangePi Neo
Linux 5.4.283
scsi: aacraid: Fix double-free on probe failure
net: dsa: mv8e6xxx: Fix stub function parameters
usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes()
usb: dwc3: st: add missing depopulate in probe error path
usb: dwc3: st: fix probed platform device ref count on probe error path
usb: dwc3: core: Prevent USB core invalid event buffer address access
usb: dwc3: omap: add missing depopulate in probe error path
USB: serial: option: add MeiG Smart SRM825L
cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller
soc: qcom: cmd-db: Map shared memory as WC, not WB
nfc: pn533: Add poll mod list filling check
nfc: pn533: Add autopoll capability
nfc: pn533: Add dev_up/dev_down hooks to phy_ops
net: busy-poll: use ktime_get_ns() instead of local_clock()
gtp: fix a potential NULL pointer dereference
ethtool: check device is present when getting link settings
r8152: Factor out OOB link list waits
soundwire: stream: fix programming slave ports for non-continous port maps
net:rds: Fix possible deadlock in rds_message_put
cgroup/cpuset: Prevent UAF in proc_cpuset_show()
ata: libata-core: Fix null pointer dereference on error
media: uvcvideo: Fix integer overflow calculating timestamp
filelock: Correct the filelock owner in fcntl_setlk/fcntl_setlk64
drm/amdkfd: don't allow mapping the MMIO HDP page with large pages
ipc: replace costly bailout check in sysvipc_find_ipc()
wifi: mwifiex: duplicate static structs used in driver instances
pinctrl: single: fix potential NULL dereference in pcs_get_function()
drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc
tools: move alignment-related macros to new <linux/align.h>
Input: MT - limit max slots
Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
ALSA: timer: Relax start tick time check for slave timer elements
mmc: dw_mmc: allow biu and ciu clocks to defer
cxgb4: add forgotten u64 ivlan cast before shift
HID: microsoft: Add rumble support to latest xbox controllers
HID: wacom: Defer calculation of resolution until resolution_code is known
Bluetooth: MGMT: Add error handling to pair_device()
mmc: mmc_test: Fix NULL dereference on allocation failure
drm/msm/dpu: don't play tricks with debug macros
drm/msm: use drm_debug_enabled() to check for debug categories
net: xilinx: axienet: Fix dangling multicast addresses
net: xilinx: axienet: Always disable promiscuous mode
ipv6: prevent UAF in ip6_send_skb()
netem: fix return value if duplicate enqueue fails
net: dsa: mv88e6xxx: Fix out-of-bound access
net: dsa: mv88e6xxx: replace ATU violation prints with trace points
net: dsa: mv88e6xxx: read FID when handling ATU violations
net: dsa: mv88e6xxx: global1_atu: Add helper for get next
net: dsa: mv88e6xxx: global2: Expose ATU stats register
netfilter: nft_counter: Synchronize nft_counter_reset() against reader.
kcm: Serialise kcm_sendmsg() for the same socket.
tc-testing: don't access non-existent variable on exception
Bluetooth: hci_core: Fix LE quote calculation
Bluetooth: hci_core: Fix not handling link timeouts propertly
Bluetooth: Make use of __check_timeout on hci_sched_le
dm suspend: return -ERESTARTSYS instead of -EINTR
dm: do not use waitqueue for request-based DM
dm mpath: pass IO start time to path selector
media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)
block: use "unsigned long" for blk_validate_block_size().
gtp: pull network headers in gtp_dev_xmit()
hrtimer: Prevent queuing of hrtimer without a function callback
nvmet-rdma: fix possible bad dereference when freeing rsps
ext4: set the type of max_zeroout to unsigned int to avoid overflow
irqchip/gic-v3-its: Remove BUG_ON in its_vpe_irq_domain_alloc
usb: dwc3: core: Skip setting event buffers for host only controllers
s390/iucv: fix receive buffer virtual vs physical address confusion
openrisc: Call setup_memory() earlier in the init sequence
NFS: avoid infinite loop in pnfs_update_layout.
nvmet-tcp: do not continue for invalid icreq
Bluetooth: bnep: Fix out-of-bound access
nvme: clear caller pointer on identify failure
usb: gadget: fsl: Increase size of name buffer for endpoints
f2fs: fix to do sanity check in update_sit_entry
btrfs: delete pointless BUG_ON check on quota root in btrfs_qgroup_account_extent()
btrfs: send: handle unexpected data in header buffer in begin_cmd()
btrfs: handle invalid root reference found in may_destroy_subvol()
btrfs: change BUG_ON to assertion when checking for delayed_node root
powerpc/boot: Only free if realloc() succeeds
powerpc/boot: Handle allocation failure in simple_realloc()
parisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367
x86: Increase brk randomness entropy for 64-bit systems
md: clean up invalid BUG_ON in md_ioctl
virtiofs: forbid newlines in tags
drm/lima: set gp bus_stop bit before hard reset
net/sun3_82586: Avoid reading past buffer in debug output
scsi: lpfc: Initialize status local variable in lpfc_sli4_repost_sgl_list()
fs: binfmt_elf_efpic: don't use missing interpreter's properties
media: pci: cx23885: check cx23885_vdev_init() return
quota: Remove BUG_ON from dqget()
ext4: do not trim the group with corrupted block bitmap
nvmet-trace: avoid dereferencing pointer too early
powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu
IB/hfi1: Fix potential deadlock on &irq_src_lock and &dd->uctxt_lock
wifi: iwlwifi: abort scan when rfkill on but device enabled
gfs2: setattr_chown: Add missing initialization
scsi: spi: Fix sshdr use
binfmt_misc: cleanup on filesystem umount
staging: ks7010: disable bh on tx_dev_lock
media: radio-isa: use dev_name to fill in bus_info
i2c: riic: avoid potential division by zero
wifi: cw1200: Avoid processing an invalid TIM IE
ssb: Fix division by zero issue in ssb_calc_clock_rate
ALSA: hda/realtek: Fix noise from speakers on Lenovo IdeaPad 3 15IAU7
net: hns3: fix a deadlock problem when config TC during resetting
net: dsa: vsc73xx: pass value in phy_write operation
net: axienet: Fix register defines comment description
net: axienet: Autodetect 64-bit DMA capability
net: axienet: Upgrade descriptors to hold 64-bit addresses
net: axienet: Wrap DMA pointer writes to prepare for 64 bit
net: axienet: Drop MDIO interrupt registers from ethtools dump
net: axienet: Check for DMA mapping errors
net: axienet: Factor out TX descriptor chain cleanup
net: axienet: Improve DMA error handling
net: axienet: Fix DMA descriptor cleanup path
atm: idt77252: prevent use after free in dequeue_rx()
net/mlx5e: Correctly report errors for ethtool rx flows
s390/uv: Panic for set and remove shared access UVC errors
btrfs: rename bitmap_set_bits() -> btrfs_bitmap_set_bits()
s390/cio: rename bitmap_size() -> idset_bitmap_size()
overflow: Implement size_t saturating arithmetic helpers
overflow.h: Add flex_array_size() helper
memcg_write_event_control(): fix a user-triggerable oops
drm/amdgpu: Actually check flags for all context ops.
selinux: fix potential counting error in avc_add_xperms_decision()
fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE
bitmap: introduce generic optimized bitmap_size()
vfs: Don't evict inode under the inode lru traversing context
dm persistent data: fix memory allocation failure
dm resume: don't return EINVAL when signalled
arm64: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE
s390/dasd: fix error recovery leading to data corruption on ESE devices
xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration
ALSA: usb-audio: Support Yamaha P-125 quirk entry
fuse: Initialize beyond-EOF page contents before setting uptodate
Revert "genirq: Allow the PM device to originate from irq domain"
Revert "genirq: Allow irq_chip registration functions to take a const irq_chip"
Revert "irqchip/imx-irqsteer: Constify irq_chip struct"
Revert "irqchip/imx-irqsteer: Add runtime PM support"
Revert "irqchip/imx-irqsteer: Handle runtime power management correctly"
Linux 5.4.282
media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()"
ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode
nvme/pci: Add APST quirk for Lenovo N60z laptop
exec: Fix ToCToU between perm check and set-uid/gid usage
media: uvcvideo: Use entity get_cur in uvc_ctrl_set
arm64: cpufeature: Fix the visibility of compat hwcaps
drm/i915/gem: Fix Virtual Memory mapping boundaries calculation
netfilter: nf_tables: prefer nft_chain_validate
netfilter: nf_tables: use timestamp to check for set element timeout
netfilter: nf_tables: set element extended ACK reporting support
kbuild: Fix '-S -c' in x86 stack protector scripts
Fix gcc 4.9 build issue in 5.4.y
drm/mgag200: Set DDC timeout in milliseconds
drm/bridge: analogix_dp: properly handle zero sized AUX transactions
x86/mtrr: Check if fixed MTRRs exist before saving them
tracing: Fix overflow in get_free_elt()
power: supply: axp288_charger: Round constant_charge_voltage writes down
power: supply: axp288_charger: Fix constant_charge_voltage writes
genirq/irqdesc: Honor caller provided affinity in alloc_desc()
serial: core: check uartclk for zero to avoid divide by zero
scsi: mpt3sas: Avoid IOMMU page faults on REPORT ZONES
scsi: mpt3sas: Remove scsi_dma_map() error messages
ntp: Safeguard against time_constant overflow
driver core: Fix uevent_show() vs driver detach race
ntp: Clamp maxerror and esterror to operating range
tick/broadcast: Move per CPU pointer access into the atomic section
scsi: ufs: core: Fix hba->last_dme_cmd_tstamp timestamp updating logic
usb: gadget: core: Check for unset descriptor
USB: serial: debug: do not echo input by default
usb: vhci-hcd: Do not drop references before new references are gained
ALSA: hda/hdmi: Yet more pin fix for HP EliteDesk 800 G4
ALSA: hda: Add HP MP9 G4 Retail System AMS to force connect list
ALSA: line6: Fix racy access to midibuf
drm/client: fix null pointer dereference in drm_client_modeset_probe
spi: spi-fsl-lpspi: Fix scldiv calculation
spi: fsl-lpspi: remove unneeded array
bpf: kprobe: remove unused declaring of bpf_kprobe_override
i2c: smbus: Send alert notifications to all devices if source not found
i2c: smbus: Improve handling of stuck alerts
i2c: smbus: Don't filter out duplicate alerts
arm64: errata: Expand speculative SSBS workaround (again)
arm64: cputype: Add Cortex-A725 definitions
arm64: cputype: Add Cortex-X1C definitions
arm64: errata: Expand speculative SSBS workaround
arm64: errata: Unify speculative SSBS errata logic
arm64: cputype: Add Cortex-X925 definitions
arm64: cputype: Add Cortex-A720 definitions
arm64: cputype: Add Cortex-X3 definitions
arm64: errata: Add workaround for Arm errata 3194386 and 3312417
arm64: cputype: Add Neoverse-V3 definitions
arm64: cputype: Add Cortex-X4 definitions
arm64: Add Neoverse-V2 part
arm64: cpufeature: Force HWCAP to be based on the sysreg visible to user-space
ext4: fix wrong unit use in ext4_mb_find_by_goal
SUNRPC: Fix a race to wake a sync task
s390/sclp: Prevent release of buffer in I/O
jbd2: avoid memleak in jbd2_journal_write_metadata_buffer
media: uvcvideo: Fix the bandwdith quirk on USB 3.x
media: uvcvideo: Ignore empty TS packets
drm/amdgpu: Fix the null pointer dereference to ras_manager
btrfs: fix bitmap leak when loading free space cache on duplicate entry
wifi: nl80211: don't give key data to userspace
udf: prevent integer overflow in udf_bitmap_free_blocks()
PCI: Add Edimax Vendor ID to pci_ids.h
selftests/bpf: Fix send_signal test with nested CONFIG_PARAVIRT
ACPI: SBS: manage alarm sysfs attribute through psy core
ACPI: battery: create alarm sysfs attribute atomically
clocksource/drivers/sh_cmt: Address race condition for clock events
md/raid5: avoid BUG_ON() while continue reshape after reassembling
net: fec: Stop PPS on driver remove
Bluetooth: l2cap: always unlock channel in l2cap_conless_channel()
net: linkwatch: use system_unbound_wq
net: usb: qmi_wwan: fix memory leak for not ip packets
sctp: Fix null-ptr-deref in reuseport_add_sock().
sctp: move hlist_node and hashent out of sctp_ep_common
x86/mm: Fix pti_clone_pgtable() alignment assumption
irqchip/mbigen: Fix mbigen node address layout
genirq: Allow irq_chip registration functions to take a const irq_chip
netfilter: ipset: Add list flush to cancel_gc
net: usb: sr9700: fix uninitialized variable use in sr_mdio_read
ALSA: usb-audio: Correct surround channels in UAC1 channel map
protect the fetch of ->fd[fd] in do_dup2() from mispredictions
HID: wacom: Modify pen IDs
ipv6: fix ndisc_is_useropt() handling for PIO
net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys
net/iucv: fix use after free in iucv_sock_close()
drm/vmwgfx: Fix overlay when using Screen Targets
drm/nouveau: prime: fix refcount underflow
remoteproc: imx_rproc: Skip over memory region when node value is NULL
remoteproc: imx_rproc: Fix ignoring mapping vdev regions
remoteproc: imx_rproc: ignore mapping vdev regions
irqchip/imx-irqsteer: Handle runtime power management correctly
irqchip/imx-irqsteer: Add runtime PM support
irqchip/imx-irqsteer: Constify irq_chip struct
genirq: Allow the PM device to originate from irq domain
devres: Fix memory leakage caused by driver API devm_free_percpu()
driver core: Cast to (void *) with __force for __percpu pointer
dev/parport: fix the array out-of-bounds risk
parport: Standardize use of printmode
parport: Convert printk(KERN_<LEVEL> to pr_<level>(
PCI: rockchip: Use GPIOD_OUT_LOW flag while requesting ep_gpio
PCI: rockchip: Make 'ep-gpios' DT property optional
mm: avoid overflows in dirty throttling logic
nvme-pci: add missing condition check for existence of mapped data
ASoC: Intel: use soc_intel_is_byt_cr() only when IOSF_MBI is reachable
ASoC: Intel: Move soc_intel_is_foo() helpers to a generic header
ASoC: Intel: Convert to new X86 CPU match macros
powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
apparmor: Fix null pointer deref when receiving skb during sock creation
mISDN: Fix a use after free in hfcmulti_tx()
bpf: Fix a segment issue when downgrading gso_size
net: nexthop: Initialize all fields in dumped nexthops
tipc: Return non-zero value from tipc_udp_addr2str() on error
net: bonding: correctly annotate RCU in bond_should_notify_peers()
ipv4: Fix incorrect source address in Record Route option
MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later
dma: fix call order in dmam_free_coherent
libbpf: Fix no-args func prototype BTF dumping syntax
um: time-travel: fix time-travel-start option
jfs: Fix array-index-out-of-bounds in diFree
kdb: Use the passed prompt in kdb_position_cursor()
kdb: address -Wformat-security warnings
nilfs2: handle inconsistent state in nilfs_btnode_create_block()
Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x13d3:0x3591
Bluetooth: btusb: Add RTL8852BE device 0489:e125 to device tables
rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings
rbd: rename RBD_LOCK_STATE_RELEASING and releasing_wait
drm/panfrost: Mark simple_ondemand governor as softdep
rbd: don't assume rbd_is_lock_owner() for exclusive mappings
selftests/sigaltstack: Fix ppc64 GCC build
RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
platform: mips: cpu_hwmon: Disable driver on unsupported hardware
watchdog/perf: properly initialize the turbo mode timestamp and rearm counter
rtc: isl1208: Fix return value of nvmem callbacks
perf/x86/intel/pt: Fix a topa_entry base address calculation
perf/x86/intel/pt: Fix topa_entry base length
scsi: qla2xxx: validate nvme_local_port correctly
scsi: qla2xxx: Complete command early within lock
scsi: qla2xxx: Fix for possible memory corruption
scsi: qla2xxx: During vport delete send async logout explicitly
rtc: cmos: Fix return value of nvmem callbacks
kobject_uevent: Fix OOB access within zap_modalias_env()
decompress_bunzip2: fix rare decompression failure
ubi: eba: properly rollback inside self_check_eba
clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use
f2fs: fix to don't dirty inode for readonly filesystem
scsi: qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds
binder: fix hang of unregistered readers
PCI: hv: Return zero, not garbage, when reading PCI_INTERRUPT_PIN
hwrng: amd - Convert PCIBIOS_* return codes to errnos
tools/memory-model: Fix bug in lock.cat
leds: ss4200: Convert PCIBIOS_* return codes to errnos
wifi: mwifiex: Fix interface type change
ext4: make sure the first directory block is not a hole
ext4: check dot and dotdot of dx_root before making dir indexed
m68k: amiga: Turn off Warp1260 interrupts during boot
udf: Avoid using corrupted block bitmap buffer
drm/amd/display: Check for NULL pointer
drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes
drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes
hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode()
media: venus: fix use after free in vdec_close
char: tpm: Fix possible memory leak in tpm_bios_measurements_open()
ipv6: take care of scope when choosing the src addr
af_packet: Handle outgoing VLAN packets without hardware offloading
net: netconsole: Disable target before netpoll cleanup
tick/broadcast: Make takeover of broadcast hrtimer reliable
rtc: interface: Add RTC offset to alarm after fix-up
nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro
fs/nilfs2: remove some unused macros to tame gcc
pinctrl: freescale: mxs: Fix refcount of child
pinctrl: ti: ti-iodelay: fix possible memory leak when pinctrl_enable() fails
pinctrl: ti: ti-iodelay: Drop if block with always false condition
pinctrl: single: fix possible memory leak when pinctrl_enable() fails
pinctrl: core: fix possible memory leak when pinctrl_enable() fails
netfilter: ctnetlink: use helper function to calculate expect ID
bnxt_re: Fix imm_data endianness
macintosh/therm_windtunnel: fix module unload.
powerpc/xmon: Fix disassembly CPU feature checks
MIPS: Octeron: remove source file executable bit
Input: elan_i2c - do not leave interrupt disabled on suspend failure
RDMA/device: Return error earlier if port in not valid
mtd: make mtd_test.c a separate module
ASoC: max98088: Check for clk_prepare_enable() error
RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs
RDMA/mlx4: Fix truncated output warning in alias_GUID.c
RDMA/mlx4: Fix truncated output warning in mad.c
Input: qt1050 - handle CHIP_ID reading error
PCI: Fix resource double counting on remove & rescan
SUNRPC: Fixup gss_status tracepoint error output
sparc64: Fix incorrect function signature and add prototype for prom_cif_init
ext4: avoid writing unitialized memory to disk in EA inodes
SUNRPC: avoid soft lockup when transmitting UDP to reachable server.
mfd: omap-usb-tll: Use struct_size to allocate tll
drm/qxl: Add check for drm_cvt_mode
drm/etnaviv: fix DMA direction handling for cached RW buffers
perf report: Fix condition in sort__sym_cmp()
leds: trigger: Unregister sysfs attributes before calling deactivate()
media: renesas: vsp1: Store RPF partition configuration per RPF instance
media: renesas: vsp1: Fix _irqsave and _irq mix
media: uvcvideo: Override default flags
media: uvcvideo: Allow entity-defined get_info and get_cur
saa7134: Unchecked i2c_transfer function result fixed
media: imon: Fix race getting ictx->lock
media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()
USB: move snd_usb_pipe_sanity_check into the USB core
selftests: forwarding: devlink_lib: Wait for udev events after reloading
bna: adjust 'name' buf size of bna_tcb and bna_ccb structures
wifi: virt_wifi: don't use strlen() in const context
gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey
wifi: virt_wifi: avoid reporting connection success with wrong SSID
qed: Improve the stack space of filter_config()
perf: Prevent passing zero nr_pages to rb_alloc_aux()
perf: Fix perf_aux_size() for greater-than 32-bit size
perf/x86/intel/pt: Fix pt_topa_entry_for_page() address calculation
netfilter: nf_tables: rise cap on SELinux secmark context
ipvs: Avoid unnecessary calls to skb_is_gso_sctp
net: fec: Fix FEC_ECR_EN1588 being cleared on link-down
net: fec: Refactor: #define magic constants
wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he()
wifi: cfg80211: fix typo in cfg80211_calculate_bitrate_he()
mlxsw: spectrum_acl_erp: Fix object nesting warning
lib: objagg: Fix general protection fault
selftests/bpf: Check length of recv in test_sockmap
net/smc: set rmb's SG_MAX_SINGLE_ALLOC limitation only when CONFIG_ARCH_NO_SG_CHAIN is defined
net/smc: Allow SMC-D 1MB DMB allocations
wifi: brcmsmac: LCN PHY code is used for BCM4313 2G-only device
firmware: turris-mox-rwtm: Initialize completion before mailbox
firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout()
m68k: cmpxchg: Fix return value for default case in __arch_xchg()
x86/xen: Convert comma to semicolon
m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages
arm64: dts: amlogic: gx: correct hdmi clocks
arm64: dts: mediatek: mt7622: fix "emmc" pinctrl mux
ARM: dts: imx6qdl-kontron-samx6i: fix PCIe reset polarity
ARM: dts: imx6qdl-kontron-samx6i: fix board reset
ARM: dts: imx6qdl-kontron-samx6i: fix PHY reset
ARM: dts: imx6qdl-kontron-samx6i: move phy reset into phy-node
arm64: dts: rockchip: Increase VOP clk rate on RK3328
arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
arm64: dts: qcom: sdm845: add power-domain to UFS PHY
hwmon: (max6697) Fix swapped temp{1,8} critical alarms
hwmon: (max6697) Fix underflow when writing limit attributes
pwm: stm32: Always do lazy disabling
hwmon: (adt7475) Fix default duty on fan is disabled
x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos
x86/pci/xen: Fix PCIBIOS_* return code handling
x86/pci/intel_mid_pci: Fix PCIBIOS_* return code handling
x86/of: Return consistent error type from x86_of_pci_irq_enable()
hfsplus: fix to avoid false alarm of circular locking
platform/chrome: cros_ec_debugfs: fix wrong EC message version
EDAC, i10nm: make skx_common.o a separate module
EDAC/skx_common: Add new ADXL components for 2-level memory
EDAC, skx: Retrieve and print retry_rd_err_log registers
EDAC, skx_common: Refactor so that we initialize "dev" in result of adxl decode.
Conflicts:
Documentation/devicetree/bindings
Documentation/devicetree/bindings/vendor-prefixes.yaml
drivers/clk/qcom/clk-rpmh.c
drivers/rpmsg/qcom_glink_native.c
drivers/soc/qcom/socinfo.c
drivers/usb/dwc3/core.c
fs/userfaultfd.c
mm/madvise.c
net/qrtr/qrtr.c
Change-Id: I5064cb8c11d2c104b445035a948867f10c88da1b
Signed-off-by: kamasali Satyanarayan <quic_kamasali@quicinc.com>
1997 lines
64 KiB
Makefile
1997 lines
64 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
VERSION = 5
|
|
PATCHLEVEL = 4
|
|
SUBLEVEL = 289
|
|
EXTRAVERSION =
|
|
NAME = Kleptomaniac Octopus
|
|
|
|
# indicate that change "Kbuild: Support nested composite objects" is
|
|
# present in the kernel so that out-of-tree modules can act upon it
|
|
export KERNEL_SUPPORTS_NESTED_COMPOSITES := y
|
|
|
|
# *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.
|
|
|
|
# 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.
|
|
#
|
|
# 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
|
|
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
|
|
|
|
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
|
|
silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
|
|
else
|
|
silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
|
|
endif
|
|
|
|
ifeq ($(silence),s)
|
|
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
|
|
|
|
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.
|
|
$(lastword $(MAKEFILE_LIST)): ;
|
|
endif
|
|
|
|
export abs_srctree abs_objtree
|
|
export sub_make_done := 1
|
|
|
|
ifeq ($(need-sub-make),1)
|
|
|
|
PHONY += $(MAKECMDGOALS) sub-make
|
|
|
|
$(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(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
|
|
|
|
export KBUILD_CHECKSRC KBUILD_EXTMOD
|
|
|
|
extmod-prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
|
|
|
|
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
|
|
no-sync-config-targets := $(no-dot-config-targets) install %install \
|
|
kernelrelease
|
|
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 %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
|
|
|
|
$(filter-out __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
|
|
|
|
# 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
|
|
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
|
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \
|
|
$(HOSTCFLAGS)
|
|
KBUILD_HOSTCXXFLAGS := -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),)
|
|
REAL_CC = clang
|
|
LD = ld.lld
|
|
AR = llvm-ar
|
|
NM = llvm-nm
|
|
OBJCOPY = llvm-objcopy
|
|
OBJDUMP = llvm-objdump
|
|
READELF = llvm-readelf
|
|
OBJSIZE = llvm-size
|
|
STRIP = llvm-strip
|
|
else
|
|
REAL_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
|
|
OBJSIZE = $(CROSS_COMPILE)size
|
|
STRIP = $(CROSS_COMPILE)strip
|
|
endif
|
|
PAHOLE = pahole
|
|
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 = lz4c
|
|
XZ = xz
|
|
|
|
ifndef DISABLE_WRAPPER
|
|
# Use the wrapper for the compiler. This wrapper scans for new
|
|
# warnings and causes the build to stop upon encountering them
|
|
CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
|
|
else
|
|
CC = $(REAL_CC)
|
|
endif
|
|
|
|
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 :=
|
|
export KBUILD_LDS_MODULE := $(srctree)/scripts/module-common.lds
|
|
KBUILD_LDFLAGS :=
|
|
GCC_PLUGINS_CFLAGS :=
|
|
CLANG_FLAGS :=
|
|
|
|
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
|
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF PAHOLE LEX YACC AWK INSTALLKERNEL
|
|
export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
|
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ
|
|
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 CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE CFLAGS_UBSAN
|
|
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
|
|
|
|
KBUILD_CFLAGS += $(call cc-option,-Wno-misleading-indentation)
|
|
|
|
# ===========================================================================
|
|
# 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 | grep clang),)
|
|
ifneq ($(CROSS_COMPILE),)
|
|
CLANG_TRIPLE ?= $(CROSS_COMPILE)
|
|
CLANG_FLAGS += --target=$(notdir $(CLANG_TRIPLE:%-=%))
|
|
ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_FLAGS)), y)
|
|
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
|
|
endif
|
|
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 _all modules nsdeps,$(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
|
|
init-y := init/
|
|
drivers-y := drivers/ sound/ techpack/
|
|
drivers-$(CONFIG_SAMPLES) += samples/
|
|
net-y := net/
|
|
libs-y := lib/
|
|
core-y := usr/
|
|
virt-y := virt/
|
|
endif # KBUILD_EXTMOD
|
|
|
|
# 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
|
|
|
|
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
|
|
|
|
# Make toolchain changes before including arch/$(SRCARCH)/Makefile to ensure
|
|
# ar/cc/ld-* macros return correct values.
|
|
ifdef CONFIG_LTO_CLANG
|
|
# LTO produces LLVM IR instead of object files. Use llvm-ar and llvm-nm, so we
|
|
# can process these.
|
|
AR := llvm-ar
|
|
LLVM_NM := llvm-nm
|
|
export LLVM_NM
|
|
endif
|
|
|
|
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.
|
|
%/auto.conf %/auto.conf.cmd %/tristate.conf: $(KCONFIG_CONFIG)
|
|
$(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)
|
|
|
|
include scripts/Makefile.kcov
|
|
include scripts/Makefile.gcc-plugins
|
|
|
|
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 += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
|
|
endif
|
|
|
|
stackp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -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
|
|
# Quiet clang warning: comparison of unsigned expression < 0 is always false
|
|
KBUILD_CFLAGS += -Wno-tautological-compare
|
|
# 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
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, undefined-optimized)
|
|
KBUILD_CFLAGS += -fno-builtin
|
|
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)
|
|
|
|
# These result in bogus false positives
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer)
|
|
|
|
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
|
|
KBUILD_CFLAGS += -ftrivial-auto-var-init=zero
|
|
ifdef CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_ENABLER
|
|
# https://github.com/llvm/llvm-project/issues/44842
|
|
KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
|
|
endif
|
|
endif
|
|
|
|
DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-assignments)
|
|
|
|
ifdef CONFIG_DEBUG_INFO
|
|
ifdef CONFIG_DEBUG_INFO_SPLIT
|
|
DEBUG_CFLAGS += -gsplit-dwarf
|
|
else
|
|
DEBUG_CFLAGS += -g
|
|
endif
|
|
ifeq ($(LLVM_IAS),1)
|
|
KBUILD_AFLAGS += -g
|
|
else
|
|
KBUILD_AFLAGS += -Wa,-gdwarf-2
|
|
endif
|
|
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
|
|
|
|
KBUILD_CFLAGS += $(DEBUG_CFLAGS)
|
|
export DEBUG_CFLAGS
|
|
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
|
# gcc 5 supports generating the mcount tables directly
|
|
ifeq ($(call cc-option-yn,-mrecord-mcount),y)
|
|
CC_FLAGS_FTRACE += -mrecord-mcount
|
|
export CC_USING_RECORD_MCOUNT := 1
|
|
endif
|
|
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_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)
|
|
ifdef CONFIG_DYNAMIC_FTRACE
|
|
ifdef CONFIG_HAVE_C_RECORDMCOUNT
|
|
BUILD_C_RECORDMCOUNT := y
|
|
export BUILD_C_RECORDMCOUNT
|
|
endif
|
|
endif
|
|
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_LIVEPATCH
|
|
KBUILD_CFLAGS += $(call cc-option, -flive-patching=inline-clone)
|
|
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_THINLTO
|
|
CC_FLAGS_LTO_CLANG := -flto=thin $(call cc-option, -fsplit-lto-unit)
|
|
KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cache
|
|
else
|
|
CC_FLAGS_LTO_CLANG := -flto
|
|
endif
|
|
CC_FLAGS_LTO_CLANG += -fvisibility=default
|
|
|
|
# Limit inlining across translation units to reduce binary size
|
|
LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5
|
|
|
|
KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG)
|
|
KBUILD_LDFLAGS_MODULE += $(LD_FLAGS_LTO_CLANG)
|
|
|
|
KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds
|
|
endif
|
|
|
|
ifdef CONFIG_LTO
|
|
CC_FLAGS_LTO := $(CC_FLAGS_LTO_CLANG)
|
|
KBUILD_CFLAGS += $(CC_FLAGS_LTO)
|
|
export CC_FLAGS_LTO
|
|
endif
|
|
|
|
ifdef CONFIG_CFI_CLANG
|
|
CC_FLAGS_CFI := -fsanitize=cfi \
|
|
-fno-sanitize-cfi-canonical-jump-tables \
|
|
-fno-sanitize-blacklist
|
|
|
|
ifdef CONFIG_MODULES
|
|
CC_FLAGS_CFI += -fsanitize-cfi-cross-dso
|
|
endif
|
|
|
|
ifdef CONFIG_CFI_PERMISSIVE
|
|
CC_FLAGS_CFI += -fsanitize-recover=cfi \
|
|
-fno-sanitize-trap=cfi
|
|
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
|
|
|
|
# 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 += $(call cc-option,-fno-strict-overflow)
|
|
|
|
# clang sets -fmerge-all-constants by default as optimization, but this
|
|
# is non-conforming behavior for C and in fact breaks the kernel, so we
|
|
# need to disable it here generally.
|
|
KBUILD_CFLAGS += $(call cc-option,-fno-merge-all-constants)
|
|
|
|
# for gcc -fno-merge-all-constants disables everything, but it is fine
|
|
# to have actual conforming behavior enabled.
|
|
KBUILD_CFLAGS += $(call cc-option,-fmerge-constants)
|
|
|
|
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
|
|
KBUILD_CFLAGS += $(call cc-option,-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 += $(call cc-option,-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_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
|
|
|
include scripts/Makefile.kasan
|
|
include scripts/Makefile.extrawarn
|
|
include scripts/Makefile.ubsan
|
|
|
|
# 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
|
|
LDFLAGS_vmlinux += --build-id
|
|
|
|
KBUILD_LDFLAGS += -z noexecstack
|
|
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
|
|
|
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
|
|
|
|
# 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)
|
|
|
|
ifdef CONFIG_STACK_VALIDATION
|
|
has_libelf := $(call try-run,\
|
|
echo "int main() {}" | $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -xc -o /dev/null $(HOST_LIBELF_LIBS) -,1,0)
|
|
ifeq ($(has_libelf),1)
|
|
objtool_target := tools/objtool FORCE
|
|
else
|
|
SKIP_STACK_VALIDATION := 1
|
|
export SKIP_STACK_VALIDATION
|
|
endif
|
|
endif
|
|
|
|
PHONY += prepare0
|
|
|
|
export MODORDER := $(extmod-prefix)modules.order
|
|
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
|
|
|
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
|
|
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
|
|
$(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y)))
|
|
|
|
vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
|
|
$(patsubst %/,%,$(filter %/, $(init-) $(core-) \
|
|
$(drivers-) $(net-) $(libs-) $(virt-))))
|
|
|
|
build-dirs := $(vmlinux-dirs)
|
|
clean-dirs := $(vmlinux-alldirs)
|
|
|
|
init-y := $(patsubst %/, %/built-in.a, $(init-y))
|
|
core-y := $(patsubst %/, %/built-in.a, $(core-y))
|
|
drivers-y := $(patsubst %/, %/built-in.a, $(drivers-y))
|
|
net-y := $(patsubst %/, %/built-in.a, $(net-y))
|
|
libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
|
|
libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y)))
|
|
virt-y := $(patsubst %/, %/built-in.a, $(virt-y))
|
|
|
|
# Externally visible symbols (used by link-vmlinux.sh)
|
|
export KBUILD_VMLINUX_OBJS := $(head-y) $(init-y) $(core-y) $(libs-y2) \
|
|
$(drivers-y) $(net-y) $(virt-y)
|
|
export KBUILD_VMLINUX_LIBS := $(libs-y1)
|
|
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
|
|
export LDFLAGS_vmlinux
|
|
# 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
|
|
autoksyms_recursive: descend modules.order
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
|
|
"$(MAKE) -f $(srctree)/Makefile autoksyms_recursive"
|
|
endif
|
|
|
|
# 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)
|
|
ifdef CONFIG_TRIM_UNUSED_KSYMS
|
|
KBUILD_MODULES := 1
|
|
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)
|
|
|
|
vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE
|
|
+$(call if_changed,link-vmlinux)
|
|
|
|
targets := vmlinux
|
|
|
|
# The actual objects are generated when descending,
|
|
# make sure no implicit rule kicks in
|
|
$(sort $(vmlinux-deps)): 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
|
|
|
|
prepare0: archprepare
|
|
$(Q)$(MAKE) $(build)=scripts/mod
|
|
$(Q)$(MAKE) $(build)=.
|
|
|
|
# All the preparing..
|
|
prepare: prepare0 prepare-objtool
|
|
|
|
# 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-objtool: $(objtool_target)
|
|
ifeq ($(SKIP_STACK_VALIDATION),1)
|
|
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
|
|
|
|
# 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
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Kernel headers
|
|
|
|
#Default location for installed headers
|
|
export INSTALL_HDR_PATH = $(objtree)/usr
|
|
|
|
quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
|
|
cmd_headers_install = \
|
|
mkdir -p $(INSTALL_HDR_PATH); \
|
|
rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
|
|
usr/include $(INSTALL_HDR_PATH)
|
|
|
|
PHONY += headers_install
|
|
headers_install: headers
|
|
$(call cmd,headers_install)
|
|
|
|
PHONY += archheaders archscripts
|
|
|
|
hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
|
|
|
|
techpack-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*")
|
|
techpack-dirs := $(subst $(srctree)/,,$(techpack-dirs))
|
|
|
|
PHONY += headers
|
|
headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
|
|
$(if $(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/Kbuild),, \
|
|
$(error Headers not exportable for the $(SRCARCH) architecture))
|
|
$(Q)$(MAKE) $(hdr-inst)=include/uapi
|
|
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
|
|
$(Q)for d in $(techpack-dirs); do \
|
|
$(MAKE) $(hdr-inst)=$$d/include/uapi; \
|
|
done
|
|
|
|
# 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
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Devicetree files
|
|
|
|
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
|
|
dtstree := arch/$(SRCARCH)/boot/dts
|
|
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)),)
|
|
dtbs: dt_binding_check
|
|
endif
|
|
|
|
dtbs_check: export CHECK_DTBS=1
|
|
dtbs_check: dtbs
|
|
|
|
dtbs_install:
|
|
$(Q)$(MAKE) $(dtbinst)=$(dtstree)
|
|
|
|
ifdef CONFIG_OF_EARLY_FLATTREE
|
|
all: dtbs
|
|
endif
|
|
|
|
endif
|
|
|
|
PHONY += scripts_dtc
|
|
scripts_dtc: scripts_basic
|
|
$(Q)$(MAKE) $(build)=scripts/dtc
|
|
|
|
PHONY += dt_binding_check
|
|
dt_binding_check: scripts_dtc
|
|
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# 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
|
|
modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
|
|
ifdef CONFIG_TRIM_UNUSED_KSYMS
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
|
|
"$(MAKE) -f $(srctree)/Makefile vmlinux"
|
|
endif
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
|
|
|
|
modules.order: descend
|
|
$(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
|
|
|
|
modbuiltin-dirs := $(addprefix _modbuiltin_, $(build-dirs))
|
|
|
|
modules.builtin: $(modbuiltin-dirs)
|
|
$(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
|
|
|
|
PHONY += $(modbuiltin-dirs)
|
|
# tristate.conf is not included from this Makefile. Add it as a prerequisite
|
|
# here to make it self-healing in case somebody accidentally removes it.
|
|
$(modbuiltin-dirs): include/config/tristate.conf
|
|
$(Q)$(MAKE) $(modbuiltin)=$(patsubst _modbuiltin_%,%,$@)
|
|
|
|
# Target to prepare building external modules
|
|
PHONY += modules_prepare
|
|
modules_prepare: prepare
|
|
|
|
# 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
|
|
@sed 's:^:kernel/:' modules.builtin > $(MODLIB)/modules.builtin
|
|
@cp -f $(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_DIRS += include/ksym
|
|
CLEAN_FILES += modules.builtin.modinfo
|
|
|
|
# Directories & files removed with 'make mrproper'
|
|
MRPROPER_DIRS += include/config include/generated \
|
|
arch/$(SRCARCH)/include/generated .tmp_objdiff \
|
|
debian/ snap/ tar-install/
|
|
MRPROPER_FILES += .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_DIRS +=
|
|
DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
|
|
|
|
# clean - Delete most, but leave enough to build external modules
|
|
#
|
|
clean: rm-dirs := $(CLEAN_DIRS)
|
|
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
|
|
|
|
# mrproper - Delete all generated files, including .config
|
|
#
|
|
mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
|
|
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,rmdirs)
|
|
$(call cmd,rmfiles)
|
|
|
|
# distclean
|
|
#
|
|
distclean: rm-dirs := $(wildcard $(DISTCLEAN_DIRS))
|
|
distclean: rm-files := $(wildcard $(DISTCLEAN_FILES))
|
|
|
|
PHONY += distclean
|
|
|
|
distclean: mrproper
|
|
$(call cmd,rmdirs)
|
|
$(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 ' namespacecheck - Name space analysis on compiled kernel'
|
|
@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 ''
|
|
@echo 'Tools:'
|
|
@echo ' nsdeps - Generate missing symbol namespace dependencies'
|
|
@echo ''
|
|
@echo 'Kernel selftest:'
|
|
@echo ' kselftest - Build and run kernel selftest (run as root)'
|
|
@echo ' Build, install, and boot kernel before'
|
|
@echo ' running kselftest on it'
|
|
@echo ' kselftest-clean - Remove all generated kselftest files'
|
|
@echo ' kselftest-merge - Merge all the config dependencies of kselftest to existing'
|
|
@echo ' .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 " %-24s - 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 (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 modules
|
|
KBUILD_MODULES := 1
|
|
|
|
PHONY += $(objtree)/Module.symvers
|
|
$(objtree)/Module.symvers:
|
|
@test -e $(objtree)/Module.symvers || ( \
|
|
echo; \
|
|
echo " WARNING: Symbol version dump $(objtree)/Module.symvers"; \
|
|
echo " is missing; modules will have no dependencies and modversions."; \
|
|
echo )
|
|
|
|
build-dirs := $(KBUILD_EXTMOD)
|
|
PHONY += modules
|
|
modules: descend $(objtree)/Module.symvers
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
|
|
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)
|
|
|
|
clean-dirs := $(KBUILD_EXTMOD)
|
|
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
|
|
|
|
PHONY += /
|
|
/:
|
|
@echo >&2 '"$(MAKE) /" is no longer supported. Please use "$(MAKE) ./" instead.'
|
|
|
|
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 ' clean - remove generated files in module directory only'
|
|
@echo ''
|
|
|
|
PHONY += 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)
|
|
$(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
|
|
|
|
# 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 $@/, $(single-no-ko)),1) \
|
|
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,rmdirs)
|
|
$(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 '*.ns_deps' \
|
|
-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 modules.builtin -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: modules
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost nsdeps
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
|
|
|
|
# Scripts to check various things for consistency
|
|
# ---------------------------------------------------------------------------
|
|
|
|
PHONY += includecheck versioncheck coccicheck namespacecheck 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/$@
|
|
|
|
namespacecheck:
|
|
$(PERL) $(srctree)/scripts/namespace.pl
|
|
|
|
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/ $*
|
|
|
|
# FIXME Should go into a make.lib or something
|
|
# ===========================================================================
|
|
|
|
quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs)))
|
|
cmd_rmdirs = rm -rf $(rm-dirs)
|
|
|
|
quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
|
|
cmd_rmfiles = rm -f $(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)
|
|
|
|
# read saved command lines for existing targets
|
|
existing-targets := $(wildcard $(sort $(targets)))
|
|
|
|
-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
|
|
|
|
endif # config-targets
|
|
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)
|