mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Merge remote-tracking branch 'remotes/origin/tmp-0453f563cce0' into msm-5.4
* remotes/origin/tmp-0453f563cce0:
FROMLIST: pwm: Convert period and duty cycle to u64
ANDROID: gki_defconfig: FW_CACHE to no
FROMGIT: firmware_class: make firmware caching configurable
ANDROID: gki_defconfig: removed CONFIG_PM_WAKELOCKS
ANDROID: gki_defconfig: enable CONFIG_IKHEADERS as m
ANDROID: update ABI representation
FROMLIST: reboot: Export reboot_mode
FROMLIST: iommu/arm-smmu: Update my email address in MODULE_AUTHOR()
FROMLIST: iommu/arm-smmu: Allow building as a module
FROMLIST: iommu/arm-smmu: Unregister IOMMU and bus ops on device removal
FROMLIST: iommu/arm-smmu-v3: Allow building as a module
FROMLIST: iommu/arm-smmu-v3: Unregister IOMMU and bus ops on device removal
FROMLIST: iommu/arm-smmu: Prevent forced unbinding of Arm SMMU drivers
FROMLIST: Revert "iommu/arm-smmu: Make arm-smmu explicitly non-modular"
FROMLIST: Revert "iommu/arm-smmu: Make arm-smmu-v3 explicitly non-modular"
FROMLIST: drivers/iommu: Allow IOMMU bus ops to be unregistered
FROMLIST: iommu/of: Take a ref to the IOMMU driver during ->of_xlate()
FROMLIST: drivers/iommu: Take a ref to the IOMMU driver prior to ->add_device()
FROMLIST: PCI: Export pci_ats_disabled() as a GPL symbol to modules
FROMLIST: iommu/of: Request ACS from the PCI core when configuring IOMMU linkage
FROMLIST: drivers/iommu: Export core IOMMU API symbols to permit modular drivers
FROMGIT: of: property: Add device link support for "iommu-map"
Revert "FROMLIST: iommu: Export core IOMMU functions to kernel modules"
Revert "FROMLIST: PCI: Export PCI ACS and DMA searching functions to modules"
Revert "FROMLIST: of: Export of_phandle_iterator_args() to modules"
ANDROID: initial branch preparations for 5.4
Linux 5.4
cramfs: fix usage on non-MTD device
Revert "Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation"
afs: Fix large file support
afs: Fix possible assert with callbacks from yfs servers
r8152: avoid to call napi_disable twice
MAINTAINERS: Add myself as maintainer of virtio-vsock
udp: drop skb extensions before marking skb stateless
net: rtnetlink: prevent underflows in do_setvfinfo()
mm/ksm.c: don't WARN if page is still mapped in remove_stable_node()
mm/memory_hotplug: don't access uninitialized memmaps in shrink_zone_span()
Revert "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()"
can: m_can_platform: remove unnecessary m_can_class_resume() call
can: m_can_platform: set net_device structure as driver data
hv_netvsc: Fix send_table offset in case of a host bug
hv_netvsc: Fix offset usage in netvsc_send_table()
net-ipv6: IPV6_TRANSPARENT - check NET_RAW prior to NET_ADMIN
ANDROID: gki_defconfig: disable FUNCTION_TRACER
sfc: Only cancel the PPS workqueue if it exists
nfc: port100: handle command failure cleanly
drm/i915/fbdev: Restore physical addresses for fb_mmap()
net-sysfs: fix netdev_queue_add_kobject() breakage
ANDROID: update ABI representation
ANDROID: add unstripped modules to the distribution
Revert "drm/amd/display: enable S/G for RAVEN chip"
drm/amdgpu: disable gfxoff on original raven
drm/amdgpu: disable gfxoff when using register read interface
drm/amd/powerplay: correct fine grained dpm force level setting
drm/amd/powerplay: issue no PPSMC_MSG_GetCurrPkgPwr on unsupported ASICs
drm/amdgpu: remove experimental flag for Navi14
r8152: Re-order napi_disable in rtl8152_close
net: qca_spi: Move reset_count to struct qcaspi
net: qca_spi: fix receive buffer size check
net/ibmvnic: Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode
Revert "net/ibmvnic: Fix EOI when running in XIVE mode"
net/mlxfw: Verify FSM error code translation doesn't exceed array size
net/mlx5: Update the list of the PCI supported devices
net/mlx5: Fix auto group size calculation
net/mlx5e: Add missing capability bit check for IP-in-IP
net/mlx5e: Do not use non-EXT link modes in EXT mode
net/mlx5e: Fix set vf link state error flow
net/mlx5: DR, Limit STE hash table enlarge based on bytemask
net/mlx5: DR, Skip rehash for tables with byte mask zero
net/mlx5: DR, Fix invalid EQ vector number on CQ creation
net/mlx5e: Reorder mirrer action parsing to check for encap first
net/mlx5e: Fix ingress rate configuration for representors
net/mlx5e: Fix error flow cleanup in mlx5e_tc_tun_create_header_ipv4/6
s390/qeth: return proper errno on IO error
s390/qeth: fix potential deadlock on workqueue flush
ipv6/route: return if there is no fib_nh_gw_family
net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject
arm64: uaccess: Remove uaccess_*_not_uao asm macros
arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
BACKPORT: FROMLIST: pwm: Add support for different PWM output types
ANDROID: SoC: core: Introduce macro SOC_SINGLE_MULTI_EXT
ANDROID: usb: gadget: configfs: fix compiler warning
fork: fix pidfd_poll()'s return type
PM: QoS: Invalidate frequency QoS requests after removal
virtio_balloon: fix shrinker count
virtio_balloon: fix shrinker scan number of pages
mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
Revert "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled"
net: hns3: fix a wrong reset interrupt status mask
net: fec: fix clock count mis-match
net/sched: act_pedit: fix WARN() in the traffic path
net: phylink: fix link mode modification in PHY mode
net: phylink: update documentation on create and destroy
r8169: disable TSO on a single version of RTL8168c to fix performance
MAINTAINERS: forcedeth: Change Zhu Yanjun's email address
taprio: don't reject same mqprio settings
net/tls: enable sk_msg redirect to tls socket egress
afs: Fix missing timeout reset
ANDROID: drivers: gpu: drm: add support to batch commands
gve: fix dma sync bug where not all pages synced
drm/i915: make pool objects read-only
mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
nbd:fix memory leak in nbd_get_socket()
virtio_console: allocate inbufs in add_port() only if it is needed
virtio_ring: fix return code on DMA mapping fails
mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled
net/ipv4: fix sysctl max for fib_multipath_hash_policy
phy: mdio-sun4i: add missed regulator_disable in remove
net/mlx4_en: Fix wrong limitation for number of TX rings
net: sched: ensure opts_len <= IP_TUNNEL_OPTS_MAX in act_tunnel_key
mlxsw: spectrum_router: Fix determining underlay for a GRE tunnel
net: atm: Reduce the severity of logging in unlink_clip_vcc
ANDROID: virtio_blk: Remove BUG_ON for discard/zero ops
drm/i915: Protect request peeking with RCU
drm/i915/userptr: Try to acquire the page lock around set_page_dirty()
drm/i915/pmu: "Frequency" is reported as accumulated cycles
drm/i915: Preload LUTs if the hw isn't currently using them
drm/i915: Don't oops in dumb_create ioctl if we have no crtcs
ANDROID: usb: gadget: configfs: Support multiple android instances
Linux 5.4-rc8
net/mlx4_en: fix mlx4 ethtool -N insertion
Revert "hwrng: core - Freeze khwrng thread during suspend"
ipmr: Fix skb headroom in ipmr_get_route().
net: hns3: cleanup of stray struct hns3_link_mode_mapping
net/smc: fix fastopen for non-blocking connect()
rds: ib: update WR sizes when bringing up connection
net: gemini: add missed free_netdev
net: dsa: tag_8021q: Fix dsa_8021q_restore_pvid for an absent pvid
seg6: fix skb transport_header after decap_and_validate()
seg6: fix srh pointer in get_srh()
net: stmmac: Use the correct style for SPDX License Identifier
octeontx2-af: Use the correct style for SPDX License Identifier
mm/debug.c: PageAnon() is true for PageKsm() pages
mm/debug.c: __dump_page() prints an extra line
mm/page_io.c: do not free shared swap slots
mm/memory_hotplug: fix try_offline_node()
mm,thp: recheck each page before collapsing file THP
mm: slub: really fix slab walking for init_on_free
mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
lib/xz: fix XZ_DYNALLOC to avoid useless memory reallocations
mm: fix trying to reclaim unevictable lru page when calling madvise_pageout
mm: mempolicy: fix the wrong return value and potential pages leak of mbind
ANDROID: ion: Fix buffer_lock mutex initialization
Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation
i2c: core: fix use after free in of_i2c_notify
i2c: acpi: Force bus speed to 400KHz if a Silead touchscreen is present
ptp: Extend the test program to check the external time stamp flags.
mlx5: Reject requests to enable time stamping on both edges.
igb: Reject requests that fail to enable time stamping on both edges.
dp83640: Reject requests to enable time stamping on both edges.
mv88e6xxx: Reject requests to enable time stamping on both edges.
ptp: Introduce strict checking of external time stamp options.
renesas: reject unsupported external timestamp flags
mlx5: reject unsupported external timestamp flags
igb: reject unsupported external timestamp flags
dp83640: reject unsupported external timestamp flags
mv88e6xxx: reject unsupported external timestamp flags
net: reject PTP periodic output requests with unsupported flags
ptp: Validate requests to enable time stamping of external signals.
net: ep93xx_eth: fix mismatch of request_mem_region in remove
ax88172a: fix information leak on short answers
selftests: mlxsw: Adjust test to recent changes
Input: synaptics-rmi4 - destroy F54 poller workqueue when removing
Input: ff-memless - kill timer in destroy()
FROMGIT: driver core: Allow device link operations inside sync_state()
afs: Fix race in commit bulk status fetch
Revert "ANDROID: Revert "Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux""
sched/uclamp: Fix incorrect condition
KVM: Add a comment describing the /dev/kvm no_compat handling
net: hns3: fix ETS bandwidth validation bug
net: hns3: reallocate SSU' buffer size when pfc_en changes
net: hns3: add compatible handling for MAC VLAN switch parameter configuration
ravb: implement MTU change while device is up
tipc: add back tipc prefix to log messages
ANDROID: uid_sys_stats: avoid double accounting of dying threads
ANDROID: drm: edid: add support for additional CEA extension blocks
ANDROID: include: uapi: drm: add additional drm mode flags
ANDROID: drivers: gpu: drm: fix bugs encountered while fuzzing
ANDROID: driver: gpu: drm: add notifier for panel related events
ANDROID: include: drm: add the definitions for DP Link Compliance tests
ANDROID: drm: dsi: add two DSI mode flags for BLLP
ANDROID: include: drm: support unicasting mipi cmds to dsi ctrls
ANDROID: include: drm: increase DRM max property count to 64
ANDROID: drivers: gpu: drm: add support for secure framebuffer
ANDROID: include: uapi: drm: add additional QCOM modifiers
ANDROID: build kernels with llvm-nm and llvm-objcopy
drm/amdgpu: fix null pointer deref in firmware header printing
rsxx: add missed destroy_workqueue calls in remove
iocost: check active_list of all the ancestors in iocg_activate()
rbd: silence bogus uninitialized warning in rbd_object_map_update_finish()
ceph: increment/decrement dio counter on async requests
ceph: take the inode lock before acquiring cap refs
ALSA: usb-audio: Fix incorrect size check for processing/extension units
KVM: x86/mmu: Take slots_lock when using kvm_mmu_zap_all_fast()
kbuild: tell sparse about the $ARCH
sparc: vdso: fix build error of vdso32
block, bfq: deschedule empty bfq_queues not referred by any process
mmc: sdhci-of-at91: fix quirk2 overwrite
ALSA: usb-audio: Fix incorrect NULL check in create_yamaha_midi_quirk()
slcan: Fix memory leak in error path
io_uring: ensure registered buffer import returns the IO length
net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()
io_uring: Fix getting file for timeout
ANDROID: scsi: ufs-qcom: Enable BROKEN_CRYPTO quirk flag
ANDROID: scsi: ufs-hisi: Enable BROKEN_CRYPTO quirk flag
ANDROID: scsi: ufs: Add quirk bit for controllers that don't play well with inline crypto
ANDROID: scsi: ufs: UFS init should not require inline crypto
gpiolib: acpi: Add Terra Pad 1061 to the run_edge_events_on_boot_blacklist
drm/i915/tgl: MOCS table update
Revert "drm/i915/ehl: Update MOCS table for EHL"
slip: Fix memory leak in slip_open error path
net: usb: qmi_wwan: add support for Foxconn T77W968 LTE modules
KVM: Forbid /dev/kvm being opened by a compat task when CONFIG_KVM_COMPAT=n
KVM: X86: Reset the three MSR list number variables to 0 in kvm_init_msr_list()
selftests: kvm: fix build with glibc >= 2.30
kvm: x86: disable shattered huge page recovery for PREEMPT_RT.
drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.
tools: gpio: Correctly add make dependencies for gpio_utils
x86/resctrl: Fix potential lockdep warning
scripts/tools-support-relr.sh: un-quote variables
Revert "ANDROID: Revert "Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux""
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
ALSA: usb-audio: not submit urb for stopped endpoint
can: j1939: warn if resources are still linked on destroy
can: j1939: j1939_can_recv(): add priv refcounting
can: j1939: transport: j1939_cancel_active_session(): use hrtimer_try_to_cancel() instead of hrtimer_cancel()
can: j1939: make sure socket is held as long as session exists
can: j1939: transport: make sure the aborted session will be deactivated only once
can: j1939: socket: rework socket locking for j1939_sk_release() and j1939_sk_sendmsg()
can: j1939: main: j1939_ndev_to_priv(): avoid crash if can_ml_priv is NULL
can: j1939: move j1939_priv_put() into sk_destruct callback
can: af_can: export can_sock_destruct()
perf/core: Fix missing static inline on perf_cgroup_switch()
perf/core: Consistently fail fork on allocation failures
perf/aux: Disallow aux_output for kernel events
perf/core: Reattach a misplaced comment
perf/aux: Fix the aux_output group inheritance fix
perf/core: Disallow uncore-cgroup events
sched/pelt: Fix update of blocked PELT ordering
sched/core: Avoid spurious lock dependencies
dpaa2-eth: free already allocated channels on probe defer
Input: cyttsp4_core - fix use after free bug
Input: synaptics-rmi4 - clear IRQ enables for F54
Remove VirtualBox guest shared folders filesystem
net/smc: fix refcount non-blocking connect() -part 2
drm/i915: update rawclk also on resume
x86/quirks: Disable HPET on Intel Coffe Lake platforms
block: check bi_size overflow before merge
gpio: bd70528: Use correct unit for debounce times
gpio: max77620: Fixup debounce delays
KVM: MMU: Do not treat ZONE_DEVICE pages as being reserved
KVM: VMX: Introduce pi_is_pir_empty() helper
KVM: VMX: Do not change PID.NDST when loading a blocked vCPU
KVM: VMX: Consider PID.PIR to determine if vCPU has pending interrupts
KVM: VMX: Fix comment to specify PID.ON instead of PIR.ON
KVM: X86: Fix initialization of MSR lists
xfrm: release device reference for invalid state
io_uring: make timeout sequence == 0 mean no sequence
ntp/y2038: Remove incorrect time_t truncation
mdio_bus: Fix PTR_ERR applied after initialization to constant
NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
mlxsw: core: Enable devlink reload only on probe
FROMGIT: of: property: Add device link support for iommus, mboxes and io-channels
FROMGIT: of: property: Make it easy to add device links from DT properties
FROMGIT: of: property: Minor style clean up of of_link_to_phandle()
Revert "ANDROID: of/property: Add device link support for iommus"
devlink: Add method for time-stamp on reporter's dump
net: ethernet: dwmac-sun8i: Use the correct function in exit path
Btrfs: fix log context list corruption after rename exchange operation
drm/i915/cmdparser: Fix jump whitelist clearing
iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
MAINTAINERS: Update for INTEL IOMMU (VT-d) entry
KVM: fix placement of refcount initialization
KVM: Fix NULL-ptr deref after kvm_create_vm fails
ALSA: hda: hdmi - fix pin setup on Tigerlake
ALSA: hda: Add Cometlake-S PCI ID
Revert "Revert "sched: Rework pick_next_task() slow-path""
Linux 5.4-rc7
lib: Remove select of inexistant GENERIC_IO
ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
ecryptfs: fix unlink and rmdir in face of underlying fs modifications
audit_get_nd(): don't unlock parent too early
exportfs_decode_fh(): negative pinned may become positive without the parent locked
cgroup: don't put ERR_PTR() into fc->root
tcp: remove redundant new line from tcp_event_sk_skb
devlink: disallow reload operation during device cleanup
ALSA: usb-audio: Fix missing error check at mixer resolution test
ixgbe: need_wakeup flag might not be set for Tx
i40e: need_wakeup flag might not be set for Tx
igb/igc: use ktime accessors for skb->tstamp
i40e: Fix for ethtool -m issue on X722 NIC
iavf: initialize ITRN registers with correct values
ice: fix potential infinite loop because loop counter being too small
qede: fix NULL pointer deref in __qede_remove()
net: fix data-race in neigh_event_send()
sched: Fix pick_next_task() vs 'change' pattern race
sched/core: Fix compilation error when cgroup not selected
cgroup,writeback: don't switch wbs immediately on dead wbs if the memcg is dead
vsock/virtio: fix sock refcnt holding during the shutdown
iwlwifi: pcie: don't consider IV len in A-MSDU
net: ethernet: octeon_mgmt: Account for second possible VLAN header
pwm: bcm-iproc: Prevent unloading the driver module while in use
block: drbd: remove a stray unlock in __drbd_send_protocol()
cpufreq: intel_pstate: Fix invalid EPB setting
mac80211: fix station inactive_time shortly after boot
net/fq_impl: Switch to kvmalloc() for memory allocation
mac80211: fix ieee80211_txq_setup_flows() failure path
drm/i915/gvt: fix dropping obj reference twice
ANDROID: Kconfig.gki: Add SND_SOC_COMPRESS
ipv4: Fix table id reference in fib_sync_down_addr
ipv6: fixes rt6_probe() and fib6_nh->last_probe init
net: hns: Fix the stray netpoll locks causing deadlock in NAPI path
Revert "ANDROID: Kconfig.gki: Add SND_SOC_COMPRESS"
net: usb: qmi_wwan: add support for DW5821e with eSIM support
CDC-NCM: handle incomplete transfer of MTU
nfc: netlink: fix double device reference drop
ANDROID: Kconfig.gki: Add SND_SOC_COMPRESS
ceph: return -EINVAL if given fsc mount option on kernel w/o support
staging: Fix error return code in vboxsf_fill_super()
staging: vboxsf: fix dereference of pointer dentry before it is null checked
staging: vboxsf: Remove unused including <linux/version.h>
x86/speculation/taa: Fix printing of TAA_MSG_SMT on IBRS_ALL CPUs
xfrm: Fix memleak on xfrm state destroy
pinctrl: stmfx: fix valid_mask init sequence
NFC: st21nfca: fix double free
net: hns3: add compatible handling for command HCLGE_OPC_PF_RST_DONE
r8169: fix page read in r8168g_mdio_read
net: stmmac: Fix the TX IOC in xmit path
net: stmmac: Fix TSO descriptor with Enhanced Addressing
net: stmmac: Fix the packet count in stmmac_rx()
net: stmmac: xgmac: Disable MMC interrupts by default
net: stmmac: xgmac: Disable Flow Control when 1 or more queues are in AV
net: stmmac: xgmac: Fix AV Feature detection
net: stmmac: xgmac: Fix TSA selection
net: stmmac: xgmac: Only get SPH header len if available
net: stmmac: selftests: Prevent false positives in filter tests
net: stmmac: xgmac: bitrev32 returns u32
net: stmmac: gmac4: bitrev32 returns u32
SMB3: Fix persistent handles reconnect
drm/radeon: fix si_enable_smc_cac() failed issue
drm/amdgpu/renoir: move gfxoff handling into gfx9 module
drm/amdgpu: add warning for GRBM 1-cycle delay issue in gfx9
drm/amdgpu: add dummy read by engines for some GCVM status registers in gfx10
drm/amdgpu: register gpu instance before fan boost feature enablment
drm/amd/swSMU: fix smu workload bit map error
net/smc: fix ethernet interface refcounting
selftests/tls: add test for concurrent recv and send
net/tls: add a TX lock
net/tls: don't pay attention to sk_write_pending when pushing partial records
blkcg: make blkcg_print_stat() print stats only for online blkgs
drm/shmem: Add docbook comments for drm_gem_shmem_object madvise fields
net: mscc: ocelot: fix __ocelot_rmw_ix prototype
bpf, offload: Unlock on error in bpf_offload_dev_create()
net: mscc: ocelot: fix NULL pointer on LAG slave removal
net: mscc: ocelot: don't handle netdev events for other netdevs
net/mlx5e: Use correct enum to determine uplink port
net/mlx5: DR, Fix memory leak during rule creation
net/mlx5: DR, Fix memory leak in modify action destroy
net/mlx5e: Fix eswitch debug print of max fdb flow
HID: wacom: generic: Treat serial number and related fields as unsigned
drm/amdgpu: add navi14 PCI ID
Revert "drm/amd/display: setting the DIG_MODE to the correct value."
drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14
drm/amdgpu: dont schedule jobs while in reset
drm/amdgpu/arcturus: properly set BANK_SELECT and FRAGMENT_SIZE
arm64: Do not mask out PTE_RDONLY in pte_same()
ANDROID: nf: IDLETIMER: Fix possible use before initialization in idletimer_resume
ANDROID: gki_defconfig: enable FW_LOADER configs
net: bcmgenet: reapply manual settings to the PHY
Revert "net: bcmgenet: soft reset 40nm EPHYs before MAC init"
net: bcmgenet: use RGMII loopback for MAC reset
drm/atomic: fix self-refresh helpers crtc state dereference
RDMA/hns: Correct the value of srq_desc_size
RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
configfs: calculate the depth of parent item
IB/hfi1: TID RDMA WRITE should not return IB_WC_RNR_RETRY_EXC_ERR
IB/hfi1: Calculate flow weight based on QP MTU for TID RDMA
IB/hfi1: Ensure r_tid_ack is valid before building TID RDMA ACK packet
IB/hfi1: Ensure full Gen3 speed in a Gen4 system
ALSA: timer: Fix incorrectly assigned timer instance
mm: memcontrol: fix network errors from failing __GFP_ATOMIC charges
mm/memory_hotplug: fix updating the node span
scripts/gdb: fix debugging modules compiled with hot/cold partitioning
mm: slab: make page_cgroup_ino() to recognize non-compound slab pages properly
MAINTAINERS: update information for "MEMORY MANAGEMENT"
dump_stack: avoid the livelock of the dump_lock
zswap: add Vitaly to the maintainers list
mm/page_alloc.c: ratelimit allocation failure warnings more aggressively
mm/khugepaged: fix might_sleep() warn with CONFIG_HIGHPTE=y
mm, vmstat: reduce zone->lock holding time by /proc/pagetypeinfo
mm, vmstat: hide /proc/pagetypeinfo from normal users
mm/mmu_notifiers: use the right return code for WARN_ON
ocfs2: protect extent tree in ocfs2_prepare_inode_for_write()
mm: thp: handle page cache THP correctly in PageTransCompoundMap
mm, meminit: recalculate pcpu batch and high limits after init completes
mm/gup_benchmark: fix MAP_HUGETLB case
mm: memcontrol: fix NULL-ptr deref in percpu stats flush
MAINTAINERS: update Cavium ThunderX2 maintainers
ASoC: SOF: topology: Fix bytes control size checks
ARM: dts: stm32: change joystick pinctrl definition on stm32mp157c-ev1
ARM: dts: stm32: remove OV5640 pinctrl definition on stm32mp157c-ev1
ARM: dts: stm32: Fix CAN RAM mapping on stm32mp157c
ARM: dts: stm32: relax qspi pins slew-rate for stm32mp157
scsi: core: Handle drivers which set sg_tablesize to zero
scsi: qla2xxx: fix NPIV tear down process
scsi: sd_zbc: Fix sd_zbc_complete()
Documentation: TLS: Add missing counter description
NFC: fdp: fix incorrect free object
net: prevent load/store tearing on sk->sk_stamp
net: qualcomm: rmnet: Fix potential UAF when unregistering
net/tls: fix sk_msg trim on fallback to copy mode
mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
net: dsa: bcm_sf2: Fix driver removal
net: sched: prevent duplicate flower rules from tcf_proto destroy race
net: hns3: Use the correct style for SPDX License Identifier
bonding: fix state transition issue in link monitoring
taprio: fix panic while hw offload sched list swap
FROMLIST: overlayfs: override_creds=off option bypass creator_cred
FROMLIST: overlayfs: internal getxattr operations without sepolicy checking
FROMLIST: overlayfs: handle XATTR_NOSECURITY flag for get xattr method
FROMLIST: Add flags option to get xattr method paired to __vfs_getxattr
FROMLIST: afs: xattr: use scnprintf
nvme: change nvme_passthru_cmd64 to explicitly mark rsvd
drm/i915/gen8+: Add RC6 CTX corruption WA
drm/i915: Lower RM timeout to avoid DSI hard hangs
drm/i915/cmdparser: Ignore Length operands during command matching
drm/i915/cmdparser: Add support for backward jumps
drm/i915/cmdparser: Use explicit goto for error paths
drm/i915: Add gen9 BCS cmdparsing
drm/i915: Allow parsing of unsized batches
drm/i915: Support ro ppgtt mapped cmdparser shadow buffers
drm/i915: Add support for mandatory cmdparsing
drm/i915: Remove Master tables from cmdparser
drm/i915: Disable Secure Batches for gen6+
drm/i915: Rename gen7 cmdparser tables
ALSA: hda: hdmi - add Tigerlake support
ASoC: max98373: replace gpio_request with devm_gpio_request
ASoC: stm32: sai: add restriction on mmap support
watchdog: bd70528: Add MODULE_ALIAS to allow module auto loading
watchdog: imx_sc_wdt: Pretimeout should follow SCU firmware format
watchdog: meson: Fix the wrong value of left time
watchdog: pm8916_wdt: fix pretimeout registration flow
watchdog: cpwd: fix build regression
nvme-multipath: fix crash in nvme_mpath_clear_ctrl_paths
nvme-rdma: fix a segmentation fault during module unload
clone3: validate stack arguments
ceph: don't allow copy_file_range when stripe_count != 1
ceph: don't try to handle hashed dentries in non-O_CREAT atomic_open
ALSA: hda/ca0132 - Fix possible workqueue stall
scripts/nsdeps: make sure to pass all module source files to spatch
perf tools: Fix time sorting
can: don't use deprecated license identifiers
can: mcp251x: mcp251x_restart_work_handler(): Fix potential force_quit race condition
perf tools: Remove unused trace_find_next_event()
perf scripting engines: Iterate on tep event arrays directly
FROMGIT: of: property: Skip adding device links to suppliers that aren't devices
x86/tsc: Respect tsc command line paraemeter for clocksource_tsc_early
Input: synaptics-rmi4 - remove unused result_bits mask
Input: synaptics-rmi4 - do not consume more data than we have (F11, F12)
Input: synaptics-rmi4 - disable the relative position IRQ in the F12 driver
Input: synaptics-rmi4 - fix video buffer size
x86/dumpstack/64: Don't evaluate exception stacks before setup
irq/irqdomain: Update __irq_domain_alloc_fwnode() function documentation
x86/apic/32: Avoid bogus LDR warnings
timekeeping/vsyscall: Update VDSO data unconditionally
drm/i915/dp: Do not switch aux to TBT mode for non-TC ports
drm/i915: Avoid HPD poll detect triggering a new detect cycle
can: j1939: transport: j1939_xtp_rx_eoma_one(): Add sanity check for correct total message size
can: j1939: transport: j1939_session_fresh_new(): make sure EOMA is send with the total message size set
can: j1939: fix memory leak if filters was set
can: j1939: fix resource leak of skb on error return paths
can: ti_hecc: add missing state changes
can: ti_hecc: properly report state changes
can: ti_hecc: add fifo overflow error reporting
can: ti_hecc: release the mailbox a bit earlier
can: ti_hecc: keep MIM and MD set
can: ti_hecc: ti_hecc_stop(): stop the CPK on down
can: ti_hecc: ti_hecc_error(): increase error counters if skb enqueueing via can_rx_offload_queue_sorted() fails
can: flexcan: increase error counters if skb enqueueing via can_rx_offload_queue_sorted() fails
can: rx-offload: can_rx_offload_irq_offload_fifo(): continue on error
can: rx-offload: can_rx_offload_irq_offload_timestamp(): continue on error
can: rx-offload: can_rx_offload_offload_one(): use ERR_PTR() to propagate error value in case of errors
can: rx-offload: can_rx_offload_offload_one(): increment rx_fifo_errors on queue overflow or OOM
can: rx-offload: can_rx_offload_offload_one(): do not increase the skb_queue beyond skb_queue_len_max
can: rx-offload: can_rx_offload_queue_tail(): fix error handling, avoid skb mem leak
can: rx-offload: can_rx_offload_queue_sorted(): fix error handling, avoid skb mem leak
can: xilinx_can: Fix flags field initialization for axi can
can: c_can: C_CAN: add bus recovery events
can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
can: c_can: c_can_poll(): only read status register after status IRQ
can: peak_usb: report bus recovery as well
can: peak_usb: fix slab info leak
can: peak_usb: fix a potential out-of-sync while decoding packets
can: flexcan: disable completely the ECC mechanism
can: usb_8dev: fix use-after-free on disconnect
can: mcba_usb: fix use-after-free on disconnect
can: gs_usb: gs_can_open(): prevent memory leak
can: dev: add missing of_node_put() after calling of_get_child_by_name()
btrfs: un-deprecate ioctls START_SYNC and WAIT_SYNC
btrfs: save i_size to avoid double evaluation of i_size_read in compress_file_range
stacktrace: Don't skip first entry on noncurrent tasks
netfilter: nf_tables_offload: skip EBUSY on chain update
netfilter: nf_tables: bogus EOPNOTSUPP on basechain update
bridge: ebtables: don't crash when using dnat target in output chains
netfilter: nf_tables: fix unexpected EOPNOTSUPP error
netfilter: nf_tables: Align nft_expr private data to 64-bit
netfilter: ipset: Fix nla_policies to fully support NL_VALIDATE_STRICT
netfilter: ipset: Copy the right MAC address in hash:ip,mac IPv6 sets
netfilter: ipset: Fix an error code in ip_set_sockfn_get()
dccp: do not leak jiffies on the wire
net: fec: add missed clk_disable_unprepare in remove
Documentation: Add ITLB_MULTIHIT documentation
kvm: x86: mmu: Recovery of shattered NX large pages
MAINTAINERS: Remove Kevin as maintainer of BMIPS generic platforms
clk: ti: clkctrl: Fix failed to enable error with double udelay timeout
clk: ti: dra7-atl-clock: Remove ti_clk_add_alias call
netfilter: nf_tables_offload: check for register data length mismatches
intel_th: pci: Add Jasper Lake PCH support
intel_th: pci: Add Comet Lake PCH support
intel_th: msu: Fix possible memory leak in mode_store()
intel_th: msu: Fix overflow in shift of an unsigned int
intel_th: msu: Fix missing allocation failure check on a kstrndup
intel_th: msu: Fix an uninitialized mutex
intel_th: gth: Fix the window switching sequence
ASoC: hdac_hda: fix race in device removal
kvm: Add helper function for creating VM worker threads
kvm: mmu: ITLB_MULTIHIT mitigation
cpu/speculation: Uninline and export CPU mitigations helpers
x86/cpu: Add Tremont to the cpu vulnerability whitelist
x86/bugs: Add ITLB_MULTIHIT bug infrastructure
fbdev: c2p: Fix link failure on non-inlining
ALSA: bebob: fix to detect configured source of sampling clock for Focusrite Saffire Pro i/o series
arm64: dts: zii-ultra: fix ARM regulator GPIO handle
Revert "gpio: merrifield: Pass irqchip when adding gpiochip"
Revert "gpio: merrifield: Restore use of irq_base"
Revert "gpio: merrifield: Move hardware initialization to callback"
x86/resctrl: Prevent NULL pointer dereference when reading mondata
idr: Fix idr_alloc_u32 on 32-bit systems
idr: Fix integer overflow in idr_for_each_entry
HID: i2c-hid: Send power-on command after reset
radix tree: Remove radix_tree_iter_find
idr: Fix idr_get_next_ul race with idr_remove
powerpc/bpf: Fix tail call implementation
MIPS: SGI-IP27: fix exception handler replication
bpf: Change size to u64 for bpf_map_{area_alloc, charge_init}()
samples/bpf: fix build by setting HAVE_ATTR_TEST to zero
perf tools: Make usage of test_attr__* optional for perf-sys.h
bpf: Allow narrow loads of bpf_sysctl fields with offset > 0
staging: Add VirtualBox guest shared folder (vboxsf) support
ceph: add missing check in d_revalidate snapdir handling
ceph: fix RCU case handling in ceph_d_revalidate()
ceph: fix use-after-free in __ceph_remove_cap()
bpf, doc: Add Andrii as official reviewer to BPF subsystem
ARM: sunxi: Fix CPU powerdown on A83T
ARM: dts: sun8i-a83t-tbs-a711: Fix WiFi resume from suspend
clk: sunxi-ng: a80: fix the zero'ing of bits 16 and 18
clk: sunxi: Fix operator precedence in sunxi_divs_clk_setup
clk: ast2600: Fix enabling of clocks
clk: at91: avoid sleeping early
ASoC: rockchip: rockchip_max98090: Enable SHDN to fix headset detection
ASoC: ti: sdma-pcm: Add back the flags parameter for non standard dma names
ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data
ASoC: SOF: Fix memory leak in sof_dfsentry_write
ASoC: SOF: Intel: hda-stream: fix the CONFIG_ prefix missing
arm64: dts: imx8mn: fix compatible string for sdma
arm64: dts: imx8mm: fix compatible string for sdma
reset: fix reset_control_ops kerneldoc comment
clk: imx8m: Use SYS_PLL1_800M as intermediate parent of CLK_ARM
x86/tsx: Add config options to set tsx=on|off|auto
x86/speculation/taa: Add documentation for TSX Async Abort
x86/tsx: Add "auto" option to the tsx= cmdline parameter
kvm/x86: Export MDS_NO=0 to guests when TSX is enabled
x86/speculation/taa: Add sysfs reporting for TSX Async Abort
x86/speculation/taa: Add mitigation for TSX Async Abort
x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default
x86/cpu: Add a helper function x86_read_arch_cap_msr()
x86/msr: Add the IA32_TSX_CTRL MSR
ARM: dts: imx6-logicpd: Re-enable SNVS power key
iio: adc: stm32-adc: fix stopping dma
soc: imx: gpc: fix initialiser format
ARM: dts: imx6qdl-sabreauto: Fix storm of accelerometer interrupts
Btrfs: fix race leading to metadata space leak after task received signal
btrfs: tree-checker: Fix wrong check on max devid
btrfs: Consider system chunk array size for new SYSTEM chunks
pinctrl: cherryview: Allocate IRQ chip dynamic
clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume
arm64: dts: ls1028a: fix a compatible issue
autofs: fix a leak in autofs_expire_indirect()
soundwire: slave: fix scanf format
reset: fix reset_control_get_exclusive kerneldoc comment
reset: fix reset_control_lookup kerneldoc comment
reset: fix of_reset_control_get_count kerneldoc comment
reset: fix of_reset_simple_xlate kerneldoc comment
ASoC: kirkwood: fix device remove ordering
ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
ASoC: hdmi-codec: drop mutex locking again
ASoC: kirkwood: fix external clock probe defer
clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU
clk: samsung: exynos5433: Fix error paths
tools: gpio: Use !building_out_of_srctree to determine srctree
iio: imu: inv_mpu6050: fix no data on MPU6050
reset: Fix memory leak in reset_control_array_put()
aio: Fix io_pgetevents() struct __compat_aio_sigset layout
pinctrl: cherryview: Fix irq_valid_mask calculation
ASoC: compress: fix unsigned integer overflow check
ASoC: msm8916-wcd-analog: Fix RX1 selection in RDAC2 MUX
pinctrl: intel: Avoid potential glitches if pin is in GPIO mode
soundwire: intel: fix intel_register_dai PDI offsets and numbers
interconnect: Add locking in icc_set_tag()
interconnect: qcom: Fix icc_onecell_data allocation
clocksource/drivers/sh_mtu2: Do not loop using platform_get_irq_by_name()
fs/namespace.c: fix use-after-free of mount in mnt_warn_timestamp_expiry()
clocksource/drivers/mediatek: Fix error handling
soundwire: depend on ACPI || OF
soundwire: depend on ACPI
iio: srf04: fix wrong limitation in distance measuring
iio: imu: adis16480: make sure provided frequency is positive
cgroup: freezer: call cgroup_enter_frozen() with preemption disabled in ptrace_stop()
thunderbolt: Drop unnecessary read when writing LC command in Ice Lake
thunderbolt: Fix lockdep circular locking depedency warning
thunderbolt: Read DP IN adapter first two dwords in one go
clk: at91: sam9x60: fix programmable clock
clk: meson: g12a: set CLK_MUX_ROUND_CLOSEST on the cpu clock muxes
clk: meson: g12a: fix cpu clock rate setting
clk: meson: gxbb: let sar_adc_clk_div set the parent clock rate
XArray: Fix xas_next() with a single entry at 0
Change-Id: I594a629aca56b3ff5a224d65f0d8d79fe4f4f34b
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
commit
43dee37fa9
668 changed files with 115929 additions and 108192 deletions
|
|
@ -54,7 +54,8 @@ MODPOST = scripts/mod/modpost \
|
|||
$(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 $(KBUILD_MODPOST_WARN),-w) \
|
||||
$(if $(filter nsdeps,$(MAKECMDGOALS)),-d)
|
||||
|
||||
ifdef MODPOST_VMLINUX
|
||||
|
||||
|
|
@ -95,6 +96,8 @@ ifneq ($(KBUILD_MODPOST_NOFINAL),1)
|
|||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
|
||||
endif
|
||||
|
||||
nsdeps: __modpost
|
||||
|
||||
endif
|
||||
|
||||
.PHONY: $(PHONY)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ if (defined $opt{'o'}) {
|
|||
#
|
||||
while ( <$module_symvers> ) {
|
||||
chomp;
|
||||
my (undef, $symbol, $module, $gpl) = split;
|
||||
my (undef, $symbol, $namespace, $module, $gpl) = split('\t');
|
||||
$SYMBOL { $symbol } = [ $module , "0" , $symbol, $gpl];
|
||||
}
|
||||
close($module_symvers);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ lx-symbols command."""
|
|||
attrs[n]['name'].string(): attrs[n]['address']
|
||||
for n in range(int(sect_attrs['nsections']))}
|
||||
args = []
|
||||
for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]:
|
||||
for section_name in [".data", ".data..read_mostly", ".rodata", ".bss",
|
||||
".text", ".text.hot", ".text.unlikely"]:
|
||||
address = section_name_to_address.get(section_name)
|
||||
if address:
|
||||
args.append(" -s {name} {addr}".format(
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ static int sec_mismatch_count = 0;
|
|||
static int sec_mismatch_fatal = 0;
|
||||
/* ignore missing files */
|
||||
static int ignore_missing_files;
|
||||
/* write namespace dependencies */
|
||||
static int write_namespace_deps;
|
||||
|
||||
enum export {
|
||||
export_plain, export_unused, export_gpl,
|
||||
|
|
@ -164,6 +166,7 @@ struct symbol {
|
|||
struct module *module;
|
||||
unsigned int crc;
|
||||
int crc_valid;
|
||||
char *namespace;
|
||||
unsigned int weak:1;
|
||||
unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */
|
||||
unsigned int kernel:1; /* 1 if symbol is from kernel
|
||||
|
|
@ -235,6 +238,37 @@ static struct symbol *find_symbol(const char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static bool contains_namespace(struct namespace_list *list,
|
||||
const char *namespace)
|
||||
{
|
||||
struct namespace_list *ns_entry;
|
||||
|
||||
for (ns_entry = list; ns_entry != NULL; ns_entry = ns_entry->next)
|
||||
if (strcmp(ns_entry->namespace, namespace) == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void add_namespace(struct namespace_list **list, const char *namespace)
|
||||
{
|
||||
struct namespace_list *ns_entry;
|
||||
|
||||
if (!contains_namespace(*list, namespace)) {
|
||||
ns_entry = NOFAIL(malloc(sizeof(struct namespace_list) +
|
||||
strlen(namespace) + 1));
|
||||
strcpy(ns_entry->namespace, namespace);
|
||||
ns_entry->next = *list;
|
||||
*list = ns_entry;
|
||||
}
|
||||
}
|
||||
|
||||
static bool module_imports_namespace(struct module *module,
|
||||
const char *namespace)
|
||||
{
|
||||
return contains_namespace(module->imported_namespaces, namespace);
|
||||
}
|
||||
|
||||
static const struct {
|
||||
const char *str;
|
||||
enum export export;
|
||||
|
|
@ -314,6 +348,32 @@ static enum export export_from_sec(struct elf_info *elf, unsigned int sec)
|
|||
return export_unknown;
|
||||
}
|
||||
|
||||
static const char *namespace_from_kstrtabns(struct elf_info *info,
|
||||
Elf_Sym *kstrtabns)
|
||||
{
|
||||
char *value = info->ksymtab_strings + kstrtabns->st_value;
|
||||
return value[0] ? value : NULL;
|
||||
}
|
||||
|
||||
static void sym_update_namespace(const char *symname, const char *namespace)
|
||||
{
|
||||
struct symbol *s = find_symbol(symname);
|
||||
|
||||
/*
|
||||
* That symbol should have been created earlier and thus this is
|
||||
* actually an assertion.
|
||||
*/
|
||||
if (!s) {
|
||||
merror("Could not update namespace(%s) for symbol %s\n",
|
||||
namespace, symname);
|
||||
return;
|
||||
}
|
||||
|
||||
free(s->namespace);
|
||||
s->namespace =
|
||||
namespace && namespace[0] ? NOFAIL(strdup(namespace)) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an exported symbol - it may have already been added without a
|
||||
* CRC, in this case just update the CRC
|
||||
|
|
@ -327,10 +387,9 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod,
|
|||
s = new_symbol(name, mod, export);
|
||||
} else {
|
||||
if (!s->preloaded) {
|
||||
warn("%s: '%s' exported twice. Previous export "
|
||||
"was in %s%s\n", mod->name, name,
|
||||
s->module->name,
|
||||
is_vmlinux(s->module->name) ?"":".ko");
|
||||
warn("%s: '%s' exported twice. Previous export was in %s%s\n",
|
||||
mod->name, name, s->module->name,
|
||||
is_vmlinux(s->module->name) ? "" : ".ko");
|
||||
} else {
|
||||
/* In case Module.symvers was out of date */
|
||||
s->module = mod;
|
||||
|
|
@ -626,6 +685,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
|
|||
unsigned int crc;
|
||||
enum export export;
|
||||
bool is_crc = false;
|
||||
const char *name;
|
||||
|
||||
if ((!is_vmlinux(mod->name) || mod->is_dot_o) &&
|
||||
strstarts(symname, "__ksymtab"))
|
||||
|
|
@ -697,8 +757,8 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
|
|||
default:
|
||||
/* All exported symbols */
|
||||
if (strstarts(symname, "__ksymtab_")) {
|
||||
sym_add_exported(symname + strlen("__ksymtab_"), mod,
|
||||
export);
|
||||
name = symname + strlen("__ksymtab_");
|
||||
sym_add_exported(name, mod, export);
|
||||
}
|
||||
if (strcmp(symname, "init_module") == 0)
|
||||
mod->has_init = 1;
|
||||
|
|
@ -1949,6 +2009,7 @@ static void read_symbols(const char *modname)
|
|||
const char *symname;
|
||||
char *version;
|
||||
char *license;
|
||||
char *namespace;
|
||||
struct module *mod;
|
||||
struct elf_info info = { };
|
||||
Elf_Sym *sym;
|
||||
|
|
@ -1980,6 +2041,12 @@ static void read_symbols(const char *modname)
|
|||
license = get_next_modinfo(&info, "license", license);
|
||||
}
|
||||
|
||||
namespace = get_modinfo(&info, "import_ns");
|
||||
while (namespace) {
|
||||
add_namespace(&mod->imported_namespaces, namespace);
|
||||
namespace = get_next_modinfo(&info, "import_ns", namespace);
|
||||
}
|
||||
|
||||
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
|
|
@ -1987,6 +2054,16 @@ static void read_symbols(const char *modname)
|
|||
handle_moddevtable(mod, &info, sym, symname);
|
||||
}
|
||||
|
||||
/* Apply symbol namespaces from __kstrtabns_<symbol> entries. */
|
||||
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
if (strstarts(symname, "__kstrtabns_"))
|
||||
sym_update_namespace(symname + strlen("__kstrtabns_"),
|
||||
namespace_from_kstrtabns(&info,
|
||||
sym));
|
||||
}
|
||||
|
||||
// check for static EXPORT_SYMBOL_* functions && global vars
|
||||
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
|
||||
unsigned char bind = ELF_ST_BIND(sym->st_info);
|
||||
|
|
@ -2139,6 +2216,18 @@ static int check_exports(struct module *mod)
|
|||
basename++;
|
||||
else
|
||||
basename = mod->name;
|
||||
|
||||
if (exp->namespace) {
|
||||
add_namespace(&mod->required_namespaces,
|
||||
exp->namespace);
|
||||
|
||||
if (!write_namespace_deps &&
|
||||
!module_imports_namespace(mod, exp->namespace)) {
|
||||
warn("module %s uses symbol %s from namespace %s, but does not import it.\n",
|
||||
basename, exp->name, exp->namespace);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mod->gpl_compatible)
|
||||
check_for_gpl_usage(exp->export, basename, exp->name);
|
||||
check_for_unused(exp->export, basename, exp->name);
|
||||
|
|
@ -2358,7 +2447,7 @@ static void read_dump(const char *fname, unsigned int kernel)
|
|||
return;
|
||||
|
||||
while ((line = get_next_line(&pos, file, size))) {
|
||||
char *symname, *modname, *d, *export, *end;
|
||||
char *symname, *namespace, *modname, *d, *export, *end;
|
||||
unsigned int crc;
|
||||
struct module *mod;
|
||||
struct symbol *s;
|
||||
|
|
@ -2366,7 +2455,10 @@ static void read_dump(const char *fname, unsigned int kernel)
|
|||
if (!(symname = strchr(line, '\t')))
|
||||
goto fail;
|
||||
*symname++ = '\0';
|
||||
if (!(modname = strchr(symname, '\t')))
|
||||
if (!(namespace = strchr(symname, '\t')))
|
||||
goto fail;
|
||||
*namespace++ = '\0';
|
||||
if (!(modname = strchr(namespace, '\t')))
|
||||
goto fail;
|
||||
*modname++ = '\0';
|
||||
if ((export = strchr(modname, '\t')) != NULL)
|
||||
|
|
@ -2388,6 +2480,7 @@ static void read_dump(const char *fname, unsigned int kernel)
|
|||
s->preloaded = 1;
|
||||
s->is_static = 0;
|
||||
sym_update_crc(symname, mod, crc, export_no(export));
|
||||
sym_update_namespace(symname, namespace);
|
||||
}
|
||||
release_file(file, size);
|
||||
return;
|
||||
|
|
@ -2413,16 +2506,20 @@ static void write_dump(const char *fname)
|
|||
{
|
||||
struct buffer buf = { };
|
||||
struct symbol *symbol;
|
||||
const char *namespace;
|
||||
int n;
|
||||
|
||||
for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
|
||||
symbol = symbolhash[n];
|
||||
while (symbol) {
|
||||
if (dump_sym(symbol))
|
||||
buf_printf(&buf, "0x%08x\t%s\t%s\t%s\n",
|
||||
symbol->crc, symbol->name,
|
||||
symbol->module->name,
|
||||
export_str(symbol->export));
|
||||
if (dump_sym(symbol)) {
|
||||
namespace = symbol->namespace;
|
||||
buf_printf(&buf, "0x%08x\t%s\t%s\t%s\t%s\n",
|
||||
symbol->crc, symbol->name,
|
||||
namespace ? namespace : "",
|
||||
symbol->module->name,
|
||||
export_str(symbol->export));
|
||||
}
|
||||
symbol = symbol->next;
|
||||
}
|
||||
}
|
||||
|
|
@ -2430,6 +2527,31 @@ static void write_dump(const char *fname)
|
|||
free(buf.p);
|
||||
}
|
||||
|
||||
static void write_namespace_deps_files(void)
|
||||
{
|
||||
struct module *mod;
|
||||
struct namespace_list *ns;
|
||||
struct buffer ns_deps_buf = {};
|
||||
|
||||
for (mod = modules; mod; mod = mod->next) {
|
||||
char fname[PATH_MAX];
|
||||
|
||||
if (mod->skip)
|
||||
continue;
|
||||
|
||||
ns_deps_buf.pos = 0;
|
||||
|
||||
for (ns = mod->required_namespaces; ns; ns = ns->next)
|
||||
buf_printf(&ns_deps_buf, "%s\n", ns->namespace);
|
||||
|
||||
if (ns_deps_buf.pos == 0)
|
||||
continue;
|
||||
|
||||
sprintf(fname, "%s.ns_deps", mod->name);
|
||||
write_if_changed(&ns_deps_buf, fname);
|
||||
}
|
||||
}
|
||||
|
||||
struct ext_sym_list {
|
||||
struct ext_sym_list *next;
|
||||
const char *file;
|
||||
|
|
@ -2447,7 +2569,7 @@ int main(int argc, char **argv)
|
|||
struct ext_sym_list *extsym_iter;
|
||||
struct ext_sym_list *extsym_start = NULL;
|
||||
|
||||
while ((opt = getopt(argc, argv, "i:I:e:mnsT:o:awE")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "i:I:e:mnsT:o:awEd")) != -1) {
|
||||
switch (opt) {
|
||||
case 'i':
|
||||
kernel_read = optarg;
|
||||
|
|
@ -2488,6 +2610,9 @@ int main(int argc, char **argv)
|
|||
case 'E':
|
||||
sec_mismatch_fatal = 1;
|
||||
break;
|
||||
case 'd':
|
||||
write_namespace_deps = 1;
|
||||
break;
|
||||
default:
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -2522,6 +2647,9 @@ int main(int argc, char **argv)
|
|||
|
||||
err |= check_modname_len(mod);
|
||||
err |= check_exports(mod);
|
||||
if (write_namespace_deps)
|
||||
continue;
|
||||
|
||||
add_header(&buf, mod);
|
||||
add_intree_flag(&buf, !external_module);
|
||||
add_retpoline(&buf);
|
||||
|
|
@ -2534,6 +2662,12 @@ int main(int argc, char **argv)
|
|||
sprintf(fname, "%s.mod.c", mod->name);
|
||||
write_if_changed(&buf, fname);
|
||||
}
|
||||
|
||||
if (write_namespace_deps) {
|
||||
write_namespace_deps_files();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dump_write)
|
||||
write_dump(dump_write);
|
||||
if (sec_mismatch_count && sec_mismatch_fatal)
|
||||
|
|
|
|||
|
|
@ -109,6 +109,11 @@ buf_printf(struct buffer *buf, const char *fmt, ...);
|
|||
void
|
||||
buf_write(struct buffer *buf, const char *s, int len);
|
||||
|
||||
struct namespace_list {
|
||||
struct namespace_list *next;
|
||||
char namespace[0];
|
||||
};
|
||||
|
||||
struct module {
|
||||
struct module *next;
|
||||
const char *name;
|
||||
|
|
@ -121,6 +126,10 @@ struct module {
|
|||
struct buffer dev_table_buf;
|
||||
char srcversion[25];
|
||||
int is_dot_o;
|
||||
// Required namespace dependencies
|
||||
struct namespace_list *required_namespaces;
|
||||
// Actual imported namespaces
|
||||
struct namespace_list *imported_namespaces;
|
||||
};
|
||||
|
||||
struct elf_info {
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@ generate_deps() {
|
|||
local mod_file=`echo $@ | sed -e 's/\.ko/\.mod/'`
|
||||
local ns_deps_file=`echo $@ | sed -e 's/\.ko/\.ns_deps/'`
|
||||
if [ ! -f "$ns_deps_file" ]; then return; fi
|
||||
local mod_source_files=`cat $mod_file | sed -n 1p \
|
||||
local mod_source_files="`cat $mod_file | sed -n 1p \
|
||||
| sed -e 's/\.o/\.c/g' \
|
||||
| sed "s|[^ ]* *|${srctree}/&|g"`
|
||||
| sed "s|[^ ]* *|${srctree}/&|g"`"
|
||||
for ns in `cat $ns_deps_file`; do
|
||||
echo "Adding namespace $ns to module $mod_name (if needed)."
|
||||
generate_deps_for_ns $ns $mod_source_files
|
||||
generate_deps_for_ns $ns "$mod_source_files"
|
||||
# sort the imports
|
||||
for source_file in $mod_source_files; do
|
||||
sed '/MODULE_IMPORT_NS/Q' $source_file > ${source_file}.tmp
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
tmp_file=$(mktemp)
|
||||
trap "rm -f $tmp_file.o $tmp_file $tmp_file.bin" EXIT
|
||||
|
||||
cat << "END" | "$CC" -c -x c - -o $tmp_file.o >/dev/null 2>&1
|
||||
cat << "END" | $CC -c -x c - -o $tmp_file.o >/dev/null 2>&1
|
||||
void *p = &p;
|
||||
END
|
||||
"$LD" $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr -o $tmp_file
|
||||
$LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr -o $tmp_file
|
||||
|
||||
# Despite printing an error message, GNU nm still exits with exit code 0 if it
|
||||
# sees a relr section. So we need to check that nothing is printed to stderr.
|
||||
test -z "$("$NM" $tmp_file 2>&1 >/dev/null)"
|
||||
test -z "$($NM $tmp_file 2>&1 >/dev/null)"
|
||||
|
||||
"$OBJCOPY" -O binary $tmp_file $tmp_file.bin
|
||||
$OBJCOPY -O binary $tmp_file $tmp_file.bin
|
||||
|
|
|
|||
Loading…
Reference in a new issue