51223c9db5
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmMVswkACgkQONu9yGCS aT5AcA//eKOG3lSbvbott2AIS66Lkcl+1uLfqYwQRa6s8pTurvFWt5gEnHN6GrCi NtcTU4F2WVavCj4YjNTwaqg4U+s2a9sudaVvsQHHcyc8QrTCWbQNcEjZmodAgspD BBnK1CV7s/TRT6V4lb2N9tzOcmxEL32aLCizLS/+KGp9yTKTlHG778BQXWAxzwGB 91IUh0QWKGaK+tG+6tGSvDwYBc0P/02Gdk+v6oxVhIdzojLZzVP0luGMffDg+a9P 6BPPjxwNpKLxu97us9Xdufb6APHgxFYN1KPxA8AGh4JAeaz4yIhaA5rxnvZOsPIo 7dcBgySXdcelYXCtZ0K5bXJITHj5DMv9++l5f0gSEjx8BFXwc8/6ogFC2W8awoys wvK6jt1glbhcyXVdThCoZ8a0jVYM4x2YbFl/jp2EoP7lJEmvMQKCJHWhKZ8u58vN dCtoDXZe0JiGldoFPzeJXCw+qN2P8G+N6sh/J+twQXHBmBMFR7HmpmYVqpAhJ9Mb ixItRBPVGct8njC7PgdRG4RaJqk41Symes6q5mnaMEGQgYzbe250OIoiclSHkUaC +y9Pq/gThKQEdd8T2fwIPYTUMpnq7GX1VDOVDW8gxADKWGl8/0UZUC3ldt+v+wfM Xl6ftWamDkZTz9DL5ctHl2ByfdTISAnL4tl6R0FScLP17ANOTNo= =V2/s -----END PGP SIGNATURE----- Merge 5.4.212 into android11-5.4-lts Changes in 5.4.212 audit: fix potential double free on error path from fsnotify_add_inode_mark parisc: Fix exception handler for fldw and fstw instructions kernel/sys_ni: add compat entry for fadvise64_64 usb: cdns3: Fix issue for clear halt endpoint Revert "selftests/bpf: Fix "dubious pointer arithmetic" test" Revert "selftests/bpf: Fix test_align verifier log patterns" pinctrl: amd: Don't save/restore interrupt status and wake status bits sched/deadline: Unthrottle PI boosted threads while enqueuing sched/deadline: Fix stale throttling on de-/boosted tasks sched/deadline: Fix priority inheritance with multiple scheduling classes kernel/sched: Remove dl_boosted flag comment xfrm: fix refcount leak in __xfrm_policy_check() af_key: Do not call xfrm_probe_algs in parallel SUNRPC: RPC level errors should set task->tk_rpc_status rose: check NULL rose_loopback_neigh->loopback net/mlx5e: Properly disable vlan strip on non-UL reps net: moxa: get rid of asymmetry in DMA mapping/unmapping bonding: 802.3ad: fix no transmission of LACPDUs net: ipvtap - add __init/__exit annotations to module init/exit funcs netfilter: ebtables: reject blobs that don't provide all entry points bnxt_en: fix NQ resource accounting during vf creation on 57500 chips netfilter: nft_payload: report ERANGE for too long offset and length netfilter: nft_payload: do not truncate csum_offset and csum_type netfilter: nft_osf: restrict osf to ipv4, ipv6 and inet families netfilter: nft_tunnel: restrict it to netdev family net: Fix data-races around weight_p and dev_weight_[rt]x_bias. net: Fix data-races around netdev_tstamp_prequeue. ratelimit: Fix data-races in ___ratelimit(). net: Fix a data-race around sysctl_tstamp_allow_data. net: Fix a data-race around sysctl_net_busy_poll. net: Fix a data-race around sysctl_net_busy_read. net: Fix a data-race around netdev_budget. net: Fix a data-race around netdev_budget_usecs. net: Fix a data-race around sysctl_somaxconn. ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter btrfs: fix silent failure when deleting root reference btrfs: replace: drop assert for suspended replace btrfs: add info when mount fails due to stale replace target btrfs: check if root is readonly while setting security xattr x86/unwind/orc: Unwind ftrace trampolines with correct ORC entry loop: Check for overflow while configuring loop asm-generic: sections: refactor memory_intersects s390: fix double free of GS and RI CBs on fork() failure ACPI: processor: Remove freq Qos request for all CPUs mm/hugetlb: fix hugetlb not supporting softdirty tracking md: call __md_stop_writes in md_stop perf/x86/intel/uncore: Fix broken read_counter() for SNB IMC PMU scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq mm: Force TLB flush for PFNMAP mappings before unlink_file_vma() s390/mm: do not trigger write fault when vma does not allow VM_WRITE x86/bugs: Add "unknown" reporting for MMIO Stale Data kbuild: Fix include path in scripts/Makefile.modpost Bluetooth: L2CAP: Fix build errors in some archs HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report udmabuf: Set the DMA mask for the udmabuf device (v2) media: pvrusb2: fix memory leak in pvr_probe HID: hidraw: fix memory leak in hidraw_release() fbdev: fb_pm2fb: Avoid potential divide by zero error ftrace: Fix NULL pointer dereference in is_ftrace_trampoline when ftrace is dead bpf: Don't redirect packets with invalid pkt_len mm/rmap: Fix anon_vma->degree ambiguity leading to double-reuse btrfs: introduce btrfs_lookup_match_dir btrfs: do not pin logs too early during renames btrfs: unify lookup return value when dir entry is missing drm/amd/display: Avoid MPC infinite loop drm/amd/display: clear optc underflow before turn off odm clock neigh: fix possible DoS due to net iface start/stop loop s390/hypfs: avoid error message under KVM drm/amd/display: Fix pixel clock programming netfilter: conntrack: NF_CONNTRACK_PROCFS should no longer default to y btrfs: tree-checker: check for overlapping extent items lib/vdso: Let do_coarse() return 0 to simplify the callsite lib/vdso: Mark do_hres() and do_coarse() as __always_inline kprobes: don't call disarm_kprobe() for disabled kprobes io_uring: disable polling pollfree files net/af_packet: check len when min_header_len equals to 0 net: neigh: don't call kfree_skb() under spin_lock_irqsave() Linux 5.4.212 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I1ef70da3d0bb05506a0c4b6b29c0bf9305a7f5c5
123 lines
4.0 KiB
Makefile
123 lines
4.0 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# ===========================================================================
|
|
# Module versions
|
|
# ===========================================================================
|
|
#
|
|
# Stage one of module building created the following:
|
|
# a) The individual .o files used for the module
|
|
# b) A <module>.o file which is the .o files above linked together
|
|
# c) A <module>.mod file, listing the name of the preliminary <module>.o file,
|
|
# plus all .o files
|
|
# d) modules.order, which lists all the modules
|
|
|
|
# Stage 2 is handled by this file and does the following
|
|
# 1) Find all modules listed in modules.order
|
|
# 2) modpost is then used to
|
|
# 3) create one <module>.mod.c file pr. module
|
|
# 4) create one Module.symvers file with CRC for all exported symbols
|
|
|
|
# Step 3 is used to place certain information in the module's ELF
|
|
# section, including information such as:
|
|
# Version magic (see include/linux/vermagic.h for full details)
|
|
# - Kernel release
|
|
# - SMP is CONFIG_SMP
|
|
# - PREEMPT is CONFIG_PREEMPT[_RT]
|
|
# - GCC Version
|
|
# Module info
|
|
# - Module version (MODULE_VERSION)
|
|
# - Module alias'es (MODULE_ALIAS)
|
|
# - Module license (MODULE_LICENSE)
|
|
# - See include/linux/module.h for more details
|
|
|
|
# Step 4 is solely used to allow module versioning in external modules,
|
|
# where the CRC of each module is retrieved from the Module.symvers file.
|
|
|
|
# KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined
|
|
# symbols in the final module linking stage
|
|
# KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
|
|
# This is solely useful to speed up test compiles
|
|
|
|
PHONY := __modpost
|
|
__modpost:
|
|
|
|
include include/config/auto.conf
|
|
include scripts/Kbuild.include
|
|
|
|
kernelsymfile := $(objtree)/Module.symvers
|
|
modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers
|
|
|
|
MODPOST = scripts/mod/modpost \
|
|
$(if $(CONFIG_MODVERSIONS),-m) \
|
|
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
|
|
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
|
|
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
|
|
$(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \
|
|
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
|
|
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
|
|
$(if $(KBUILD_MODPOST_WARN),-w) \
|
|
$(if $(filter nsdeps,$(MAKECMDGOALS)),-d)
|
|
|
|
ifdef MODPOST_VMLINUX
|
|
|
|
quiet_cmd_modpost = MODPOST vmlinux.o
|
|
cmd_modpost = $(MODPOST) vmlinux.o
|
|
|
|
__modpost:
|
|
$(call cmd,modpost)
|
|
|
|
else
|
|
|
|
# When building external modules load the Kbuild file to retrieve EXTRA_SYMBOLS info
|
|
ifneq ($(KBUILD_EXTMOD),)
|
|
|
|
# set src + obj - they may be used when building the .mod.c file
|
|
obj := $(KBUILD_EXTMOD)
|
|
src := $(obj)
|
|
|
|
# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
|
|
include $(if $(wildcard $(src)/Kbuild), $(src)/Kbuild, $(src)/Makefile)
|
|
endif
|
|
|
|
MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - $(wildcard vmlinux)
|
|
|
|
# find all modules listed in modules.order
|
|
modules := $(sort $(shell cat $(MODORDER)))
|
|
|
|
# With CONFIG_LTO_CLANG, .o files might be LLVM IR, so we need to link them
|
|
# into actual objects before passing them to modpost
|
|
modpost-ext = $(if $(CONFIG_LTO_CLANG),.lto,)
|
|
|
|
ifdef CONFIG_LTO_CLANG
|
|
quiet_cmd_cc_lto_link_modules = LTO [M] $@
|
|
cmd_cc_lto_link_modules = \
|
|
$(LD) $(ld_flags) -r -o $(@) \
|
|
$(shell [ -s $(@:$(modpost-ext).o=.o.symversions) ] && \
|
|
echo -T $(@:$(modpost-ext).o=.o.symversions)) \
|
|
--whole-archive $(filter-out FORCE,$^)
|
|
|
|
$(modules:.ko=$(modpost-ext).o): %$(modpost-ext).o: %.o FORCE
|
|
$(call if_changed,cc_lto_link_modules)
|
|
|
|
PHONY += FORCE
|
|
FORCE:
|
|
|
|
endif
|
|
|
|
# Read out modules.order instead of expanding $(modules) to pass in modpost.
|
|
# Otherwise, allmodconfig would fail with "Argument list too long".
|
|
quiet_cmd_modpost = MODPOST $(words $(modules)) modules
|
|
cmd_modpost = sed 's/\.ko$$/$(modpost-ext)\.o/' $(MODORDER) | $(MODPOST)
|
|
|
|
__modpost: $(modules:.ko=$(modpost-ext).o)
|
|
@$(kecho) ' Building modules, stage 2.'
|
|
$(call cmd,modpost)
|
|
ifneq ($(KBUILD_MODPOST_NOFINAL),1)
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
|
|
endif
|
|
|
|
nsdeps: __modpost
|
|
|
|
endif
|
|
|
|
.PHONY: $(PHONY)
|