
Changes in 5.10.121 binfmt_flat: do not stop relocating GOT entries prematurely on riscv parisc/stifb: Implement fb_is_primary_device() riscv: Initialize thread pointer before calling C functions riscv: Fix irq_work when SMP is disabled ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS ALSA: usb-audio: Cancel pending work at closing a MIDI substream USB: serial: option: add Quectel BG95 modem USB: new quirk for Dell Gen 2 devices usb: dwc3: gadget: Move null pinter check to proper place usb: core: hcd: Add support for deferring roothub registration cifs: when extending a file with falloc we should make files not-sparse xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI Fonts: Make font size unsigned in font_desc parisc/stifb: Keep track of hardware path of graphics card x86/MCE/AMD: Fix memory leak when threshold_create_bank() fails perf/x86/intel: Fix event constraints for ICL ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP ptrace: Reimplement PTRACE_KILL by always sending SIGKILL btrfs: add "0x" prefix for unsupported optional features btrfs: repair super block num_devices automatically iommu/vt-d: Add RPLS to quirk list to skip TE disabling drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue b43legacy: Fix assigning negative value to unsigned variable b43: Fix assigning negative value to unsigned variable ipw2x00: Fix potential NULL dereference in libipw_xmit() ipv6: fix locking issues with loops over idev->addr_list fbcon: Consistently protect deferred_takeover with console_lock() x86/platform/uv: Update TSC sync state for UV5 ACPICA: Avoid cache flush inside virtual machines drm/komeda: return early if drm_universal_plane_init() fails. rcu-tasks: Fix race in schedule and flush work rcu: Make TASKS_RUDE_RCU select IRQ_WORK sfc: ef10: Fix assigning negative value to unsigned variable ALSA: jack: Access input_dev under mutex spi: spi-rspi: Remove setting {src,dst}_{addr,addr_width} based on DMA direction tools/power turbostat: fix ICX DRAM power numbers drm/amd/pm: fix double free in si_parse_power_table() ath9k: fix QCA9561 PA bias level media: venus: hfi: avoid null dereference in deinit media: pci: cx23885: Fix the error handling in cx23885_initdev() media: cx25821: Fix the warning when removing the module md/bitmap: don't set sb values if can't pass sanity check mmc: jz4740: Apply DMA engine limits to maximum segment size drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit scsi: megaraid: Fix error check return value of register_chrdev() scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp() ath11k: disable spectral scan during spectral deinit ASoC: Intel: bytcr_rt5640: Add quirk for the HP Pro Tablet 408 drm/plane: Move range check for format_count earlier drm/amd/pm: fix the compile warning ath10k: skip ath10k_halt during suspend for driver state RESTARTING arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall drm: msm: fix error check return value of irq_of_parse_and_map() ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL net/mlx5: fs, delete the FTE when there are no rules attached to it ASoC: dapm: Don't fold register value changes into notifications mlxsw: spectrum_dcb: Do not warn about priority changes mlxsw: Treat LLDP packets as control drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo HID: bigben: fix slab-out-of-bounds Write in bigben_probe ASoC: tscs454: Add endianness flag in snd_soc_component_driver net: remove two BUG() from skb_checksum_help() s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES perf/amd/ibs: Cascade pmu init functions' return value spi: stm32-qspi: Fix wait_cmd timeout in APM mode dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default ipmi:ssif: Check for NULL msg when handling events and messages ipmi: Fix pr_fmt to avoid compilation issues rtlwifi: Use pr_warn instead of WARN_ONCE media: rga: fix possible memory leak in rga_probe media: coda: limit frame interval enumeration to supported encoder frame sizes media: imon: reorganize serialization media: cec-adap.c: fix is_configuring state openrisc: start CPU timer early in boot nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags ASoC: rt5645: Fix errorenous cleanup order nbd: Fix hung on disconnect request if socket is closed before net: phy: micrel: Allow probing without .driver_data media: exynos4-is: Fix compile warning ASoC: max98357a: remove dependency on GPIOLIB ASoC: rt1015p: remove dependency on GPIOLIB can: mcp251xfd: silence clang's -Wunaligned-access warning x86/microcode: Add explicit CPU vendor dependency m68k: atari: Make Atari ROM port I/O write macros return void rxrpc: Return an error to sendmsg if call failed rxrpc, afs: Fix selection of abort codes eth: tg3: silence the GCC 12 array-bounds warning selftests/bpf: fix btf_dump/btf_dump due to recent clang change gfs2: use i_lock spin_lock for inode qadata IB/rdmavt: add missing locks in rvt_ruc_loopback ARM: dts: ox820: align interrupt controller node name with dtschema ARM: dts: s5pv210: align DMA channels with dtschema arm64: dts: qcom: msm8994: Fix BLSP[12]_DMA channels count PM / devfreq: rk3399_dmc: Disable edev on remove() crypto: ccree - use fine grained DMA mapping dir soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc fs: jfs: fix possible NULL pointer dereference in dbFree() ARM: OMAP1: clock: Fix UART rate reporting algorithm powerpc/fadump: Fix fadump to work with a different endian capture kernel fat: add ratelimit to fat*_ent_bread() pinctrl: renesas: rzn1: Fix possible null-ptr-deref in sh_pfc_map_resources() ARM: versatile: Add missing of_node_put in dcscb_init ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM ARM: hisi: Add missing of_node_put after of_find_compatible_node PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store() tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr powerpc/xics: fix refcount leak in icp_opal_init() powerpc/powernv: fix missing of_node_put in uv_init() macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled powerpc/iommu: Add missing of_node_put in iommu_init_early_dart RDMA/hfi1: Prevent panic when SDMA is disabled drm: fix EDID struct for old ARM OABI format dt-bindings: display: sitronix, st7735r: Fix backlight in example ath11k: acquire ab->base_lock in unassign when finding the peer by addr ath9k: fix ar9003_get_eepmisc drm/edid: fix invalid EDID extension block filtering drm/bridge: adv7511: clean up CEC adapter when probe fails spi: qcom-qspi: Add minItems to interconnect-names ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe x86/delay: Fix the wrong asm constraint in delay_loop() drm/ingenic: Reset pixclock rate when parent clock rate changes drm/mediatek: Fix mtk_cec_mask() drm/vc4: hvs: Reset muxes at probe time drm/vc4: txp: Don't set TXP_VSTART_AT_EOF drm/vc4: txp: Force alpha to be 0xff if it's disabled libbpf: Don't error out on CO-RE relos for overriden weak subprogs bpf: Fix excessive memory allocation in stack_map_alloc() nl80211: show SSID for P2P_GO interfaces drm/komeda: Fix an undefined behavior bug in komeda_plane_add() drm: mali-dp: potential dereference of null pointer spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout scftorture: Fix distribution of short handler delays net: dsa: mt7530: 1G can also support 1000BASE-X link mode NFC: NULL out the dev->rfkill to prevent UAF efi: Add missing prototype for efi_capsule_setup_info target: remove an incorrect unmap zeroes data deduction drbd: fix duplicate array initializer EDAC/dmc520: Don't print an error for each unconfigured interrupt line mtd: rawnand: denali: Use managed device resources HID: hid-led: fix maximum brightness for Dream Cheeky HID: elan: Fix potential double free in elan_input_configured drm/bridge: Fix error handling in analogix_dp_probe sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq spi: img-spfi: Fix pm_runtime_get_sync() error checking cpufreq: Fix possible race in cpufreq online error path ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix media: hantro: Empty encoder capture buffers by default drm/panel: simple: Add missing bus flags for Innolux G070Y2-L01 ALSA: pcm: Check for null pointer of pointer substream before dereferencing it inotify: show inotify mask flags in proc fdinfo fsnotify: fix wrong lockdep annotations of: overlay: do not break notify on NOTIFY_{OK|STOP} drm/msm/dpu: adjust display_v_end for eDP and DP scsi: ufs: qcom: Fix ufs_qcom_resume() scsi: ufs: core: Exclude UECxx from SFR dump list selftests/resctrl: Fix null pointer dereference on open failed libbpf: Fix logic for finding matching program for CO-RE relocation mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check() x86/pm: Fix false positive kmemleak report in msr_build_context() mtd: rawnand: cadence: fix possible null-ptr-deref in cadence_nand_dt_probe() x86/speculation: Add missing prototype for unpriv_ebpf_notify() ASoC: rk3328: fix disabling mclk on pclk probe failure perf tools: Add missing headers needed by util/data.h drm/msm/disp/dpu1: set vbif hw config to NULL to avoid use after memory free during pm runtime resume drm/msm/dp: stop event kernel thread when DP unbind drm/msm/dp: fix error check return value of irq_of_parse_and_map() drm/msm/dsi: fix error checks and return values for DSI xmit functions drm/msm/hdmi: check return value after calling platform_get_resource_byname() drm/msm/hdmi: fix error check return value of irq_of_parse_and_map() drm/msm: add missing include to msm_drv.c drm/panel: panel-simple: Fix proper bpc for AM-1280800N3TZQW-T00H drm/rockchip: vop: fix possible null-ptr-deref in vop_bind() perf tools: Use Python devtools for version autodetection rather than runtime virtio_blk: fix the discard_granularity and discard_alignment queue limits x86: Fix return value of __setup handlers irqchip/exiu: Fix acknowledgment of edge triggered interrupts irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value x86/mm: Cleanup the control_va_addr_alignment() __setup handler arm64: fix types in copy_highpage() regulator: core: Fix enable_count imbalance with EXCLUSIVE_GET drm/msm/dp: fix event thread stuck in wait_event after kthread_stop() drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected drm/msm/mdp5: Return error code in mdp5_mixer_release when deadlock is detected drm/msm: return an error pointer in msm_gem_prime_get_sg_table() media: uvcvideo: Fix missing check to determine if element is found in list iomap: iomap_write_failed fix spi: spi-fsl-qspi: check return value after calling platform_get_resource_byname() Revert "cpufreq: Fix possible race in cpufreq online error path" regulator: qcom_smd: Fix up PM8950 regulator configuration perf/amd/ibs: Use interrupt regs ip for stack unwinding ath11k: Don't check arvif->is_started before sending management frames ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt ASoC: samsung: Use dev_err_probe() helper ASoC: samsung: Fix refcount leak in aries_audio_probe kselftest/cgroup: fix test_stress.sh to use OUTPUT dir scripts/faddr2line: Fix overlapping text section failures media: aspeed: Fix an error handling path in aspeed_video_probe() media: exynos4-is: Fix PM disable depth imbalance in fimc_is_probe media: st-delta: Fix PM disable depth imbalance in delta_probe media: exynos4-is: Change clk_disable to clk_disable_unprepare media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init media: vsp1: Fix offset calculation for plane cropping Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout Bluetooth: Interleave with allowlist scan Bluetooth: L2CAP: Rudimentary typo fixes Bluetooth: LL privacy allow RPA Bluetooth: use inclusive language in HCI role comments Bluetooth: use inclusive language when filtering devices Bluetooth: use hdev lock for accept_list and reject_list in conn req nvme: set dma alignment to dword m68k: math-emu: Fix dependencies of math emulation support lsm,selinux: pass flowi_common instead of flowi to the LSM hooks sctp: read sk->sk_bound_dev_if once in sctp_rcv() net: hinic: add missing destroy_workqueue in hinic_pf_to_mgmt_init ASoC: ti: j721e-evm: Fix refcount leak in j721e_soc_probe_* media: ov7670: remove ov7670_power_off from ov7670_remove media: staging: media: rkvdec: Make use of the helper function devm_platform_ioremap_resource() media: rkvdec: h264: Fix dpb_valid implementation media: rkvdec: h264: Fix bit depth wrap in pps packet ext4: reject the 'commit' option on ext2 filesystems drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init drm: msm: fix possible memory leak in mdp5_crtc_cursor_set() x86/sev: Annotate stack change in the #VC handler drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path drm/i915: Fix CFI violation with show_dynamic_id() thermal/drivers/bcm2711: Don't clamp temperature at zero thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe thermal/drivers/core: Use a char pointer for the cooling device name thermal/core: Fix memory leak in __thermal_cooling_device_register() thermal/drivers/imx_sc_thermal: Fix refcount leak in imx_sc_thermal_probe ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition() NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv() net: stmmac: selftests: Use kcalloc() instead of kzalloc() net: stmmac: fix out-of-bounds access in a selftest hv_netvsc: Fix potential dereference of NULL pointer rxrpc: Fix listen() setting the bar too high for the prealloc rings rxrpc: Don't try to resend the request if we're receiving the reply rxrpc: Fix overlapping ACK accounting rxrpc: Don't let ack.previousPacket regress rxrpc: Fix decision on when to generate an IDLE ACK net: huawei: hinic: Use devm_kcalloc() instead of devm_kzalloc() hinic: Avoid some over memory allocation net/smc: postpone sk_refcnt increment in connect() arm64: dts: rockchip: Move drive-impedance-ohm to emmc phy on rk3399 memory: samsung: exynos5422-dmc: Avoid some over memory allocation ARM: dts: suniv: F1C100: fix watchdog compatible soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc PCI: cadence: Fix find_first_zero_bit() limit PCI: rockchip: Fix find_first_zero_bit() limit PCI: dwc: Fix setting error return on MSI DMA mapping failure ARM: dts: ci4x10: Adapt to changes in imx6qdl.dtsi regarding fec clocks soc: qcom: llcc: Add MODULE_DEVICE_TABLE() KVM: nVMX: Leave most VM-Exit info fields unmodified on failed VM-Entry KVM: nVMX: Clear IDT vectoring on nested VM-Exit for double/triple fault platform/chrome: cros_ec: fix error handling in cros_ec_register() ARM: dts: imx6dl-colibri: Fix I2C pinmuxing platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls can: xilinx_can: mark bit timing constants as const ARM: dts: stm32: Fix PHY post-reset delay on Avenger96 ARM: dts: bcm2835-rpi-zero-w: Fix GPIO line name for Wifi/BT ARM: dts: bcm2837-rpi-cm3-io3: Fix GPIO line names for SMPS I2C ARM: dts: bcm2837-rpi-3-b-plus: Fix GPIO line name of power LED ARM: dts: bcm2835-rpi-b: Fix GPIO line names misc: ocxl: fix possible double free in ocxl_file_register_afu crypto: marvell/cesa - ECB does not IV gpiolib: of: Introduce hook for missing gpio-ranges pinctrl: bcm2835: implement hook for missing gpio-ranges arm: mediatek: select arch timer for mt7629 powerpc/fadump: fix PT_LOAD segment for boot memory area mfd: ipaq-micro: Fix error check return value of platform_get_irq() scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() firmware: arm_scmi: Fix list protocols enumeration in the base protocol nvdimm: Fix firmware activation deadlock scenarios nvdimm: Allow overwrite in the presence of disabled dimms pinctrl: mvebu: Fix irq_of_parse_and_map() return value drivers/base/node.c: fix compaction sysfs file leak dax: fix cache flush on PMD-mapped pages drivers/base/memory: fix an unlikely reference counting issue in __add_memory_block() powerpc/8xx: export 'cpm_setbrg' for modules pinctrl: renesas: core: Fix possible null-ptr-deref in sh_pfc_map_resources() powerpc/idle: Fix return value of __setup() handler powerpc/4xx/cpm: Fix return value of __setup() handler ASoC: atmel-pdmic: Remove endianness flag on pdmic component ASoC: atmel-classd: Remove endianness flag on class d component proc: fix dentry/inode overinstantiating under /proc/${pid}/net ipc/mqueue: use get_tree_nodev() in mqueue_get_tree() PCI: imx6: Fix PERST# start-up sequence tty: fix deadlock caused by calling printk() under tty_port->lock crypto: sun8i-ss - rework handling of IV crypto: sun8i-ss - handle zero sized sg crypto: cryptd - Protect per-CPU resource by disabling BH. Input: sparcspkr - fix refcount leak in bbc_beep_probe PCI/AER: Clear MULTI_ERR_COR/UNCOR_RCV bits hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume() powerpc/64: Only WARN if __pa()/__va() called with bad addresses powerpc/perf: Fix the threshold compare group constraint for power9 macintosh: via-pmu and via-cuda need RTC_LIB powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup mfd: davinci_voicecodec: Fix possible null-ptr-deref davinci_vc_probe() mailbox: forward the hrtimer if not queued and under a lock RDMA/hfi1: Prevent use of lock before it is initialized Input: stmfts - do not leave device disabled in stmfts_input_open OPP: call of_node_put() on error path in _bandwidth_supported() f2fs: fix dereference of stale list iterator after loop body iommu/mediatek: Add list_del in mtk_iommu_remove i2c: at91: use dma safe buffers cpufreq: mediatek: add missing platform_driver_unregister() on error in mtk_cpufreq_driver_init cpufreq: mediatek: Use module_init and add module_exit cpufreq: mediatek: Unregister platform device on exit MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon i2c: at91: Initialize dma_buf in at91_twi_xfer() dmaengine: idxd: Fix the error handling path in idxd_cdev_register() NFS: Do not report EINTR/ERESTARTSYS as mapping errors NFS: fsync() should report filesystem errors over EINTR/ERESTARTSYS NFS: Do not report flush errors in nfs_write_end() NFS: Don't report errors from nfs_pageio_complete() more than once NFSv4/pNFS: Do not fail I/O when we fail to allocate the pNFS layout video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup dmaengine: stm32-mdma: remove GISR1 register dmaengine: stm32-mdma: rework interrupt handler dmaengine: stm32-mdma: fix chan initialization in stm32_mdma_irq_handler() iommu/amd: Increase timeout waiting for GA log enablement i2c: npcm: Fix timeout calculation i2c: npcm: Correct register access width i2c: npcm: Handle spurious interrupts i2c: rcar: fix PM ref counts in probe error paths perf c2c: Use stdio interface if slang is not supported perf jevents: Fix event syntax error caused by ExtSel f2fs: fix to avoid f2fs_bug_on() in dec_valid_node_count() f2fs: fix to do sanity check on block address in f2fs_do_zero_range() f2fs: fix to clear dirty inode in f2fs_evict_inode() f2fs: fix deadloop in foreground GC f2fs: don't need inode lock for system hidden quota f2fs: fix to do sanity check on total_data_blocks f2fs: fix fallocate to use file_modified to update permissions consistently f2fs: fix to do sanity check for inline inode wifi: mac80211: fix use-after-free in chanctx code iwlwifi: mvm: fix assert 1F04 upon reconfig fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages efi: Do not import certificates from UEFI Secure Boot for T2 Macs bfq: Split shared queues on move between cgroups bfq: Update cgroup information before merging bio bfq: Track whether bfq_group is still online ext4: fix use-after-free in ext4_rename_dir_prepare ext4: fix warning in ext4_handle_inode_extension ext4: fix bug_on in ext4_writepages ext4: filter out EXT4_FC_REPLAY from on-disk superblock field s_state ext4: fix bug_on in __es_tree_search ext4: verify dir block before splitting it ext4: avoid cycles in directory h-tree ACPI: property: Release subnode properties with data nodes tracing: Fix potential double free in create_var_ref() PCI/PM: Fix bridge_d3_blacklist[] Elo i2 overwrite of Gigabyte X299 PCI: qcom: Fix runtime PM imbalance on probe errors PCI: qcom: Fix unbalanced PHY init on probe errors mm, compaction: fast_find_migrateblock() should return pfn in the target zone s390/perf: obtain sie_block from the right address dlm: fix plock invalid read dlm: fix missing lkb refcount handling ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock scsi: dc395x: Fix a missing check on list iterator scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled drm/amdgpu/cs: make commands with 0 chunks illegal behaviour. drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem drm/nouveau/clk: Fix an incorrect NULL check on list iterator drm/nouveau/kms/nv50-: atom: fix an incorrect NULL check on list iterator drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX drm/i915/dsi: fix VBT send packet port selection for ICL+ md: fix an incorrect NULL check in does_sb_need_changing md: fix an incorrect NULL check in md_reload_sb mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N media: coda: Fix reported H264 profile media: coda: Add more H264 levels for CODA960 ima: remove the IMA_TEMPLATE Kconfig option Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug RDMA/hfi1: Fix potential integer multiplication overflow errors csky: patch_text: Fixup last cpu should be master irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x irqchip: irq-xtensa-mx: fix initial IRQ affinity cfg80211: declare MODULE_FIRMWARE for regulatory.db mac80211: upgrade passive scan to active scan on DFS channels after beacon rx um: chan_user: Fix winch_tramp() return value um: Fix out-of-bounds read in LDT setup kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] ftrace: Clean up hash direct_functions on register failures iommu/msm: Fix an incorrect NULL check on list iterator nodemask.h: fix compilation error with GCC12 hugetlb: fix huge_pmd_unshare address update xtensa/simdisk: fix proc_read_simdisk() rtl818x: Prevent using not initialized queues ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control carl9170: tx: fix an incorrect use of list iterator stm: ltdc: fix two incorrect NULL checks on list iterator bcache: improve multithreaded bch_btree_check() bcache: improve multithreaded bch_sectors_dirty_init() bcache: remove incremental dirty sector counting for bch_sectors_dirty_init() bcache: avoid journal no-space deadlock by reserving 1 journal bucket serial: pch: don't overwrite xmit->buf[0] by x_char tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator gma500: fix an incorrect NULL check on list iterator arm64: dts: qcom: ipq8074: fix the sleep clock frequency phy: qcom-qmp: fix struct clk leak on probe errors ARM: dts: s5pv210: Remove spi-cs-high on panel in Aries ARM: pxa: maybe fix gpio lookup tables SMB3: EBADF/EIO errors in rename/open caused by race condition in smb2_compound_op docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0 dt-bindings: gpio: altera: correct interrupt-cells vdpasim: allow to enable a vq repeatedly blk-iolatency: Fix inflight count imbalances and IO hangs on offline coresight: core: Fix coresight device probe failure issue phy: qcom-qmp: fix reset-controller leak on probe errors net: ipa: fix page free in ipa_endpoint_trans_release() net: ipa: fix page free in ipa_endpoint_replenish_one() xfs: set inode size after creating symlink xfs: sync lazy sb accounting on quiesce of read-only mounts xfs: fix chown leaking delalloc quota blocks when fssetxattr fails xfs: fix incorrect root dquot corruption error when switching group/project quota types xfs: restore shutdown check in mapped write fault path xfs: force log and push AIL to clear pinned inodes when aborting mount xfs: consider shutdown in bmapbt cursor delete assert xfs: assert in xfs_btree_del_cursor should take into account error kseltest/cgroup: Make test_stress.sh work if run interactively thermal/core: fix a UAF bug in __thermal_cooling_device_register() thermal/core: Fix memory leak in the error path bfq: Avoid merging queues with different parents bfq: Drop pointless unlock-lock pair bfq: Remove pointless bfq_init_rq() calls bfq: Get rid of __bio_blkcg() usage bfq: Make sure bfqg for which we are queueing requests is online block: fix bio_clone_blkg_association() to associate with proper blkcg_gq Revert "random: use static branch for crng_ready()" RDMA/rxe: Generate a completion for unsupported/invalid opcode MIPS: IP27: Remove incorrect `cpu_has_fpu' override MIPS: IP30: Remove incorrect `cpu_has_fpu' override ext4: only allow test_dummy_encryption when supported md: bcache: check the return value of kzalloc() in detached_dev_do_request() Linux 5.10.121 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I52dd11dc43acfa0ebddd2b6e277c823b96b07327
398 lines
20 KiB
C
398 lines
20 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
* Linux Security Module Hook declarations.
|
|
*
|
|
* Copyright (C) 2001 WireX Communications, Inc <chris@wirex.com>
|
|
* Copyright (C) 2001 Greg Kroah-Hartman <greg@kroah.com>
|
|
* Copyright (C) 2001 Networks Associates Technology, Inc <ssmalley@nai.com>
|
|
* Copyright (C) 2001 James Morris <jmorris@intercode.com.au>
|
|
* Copyright (C) 2001 Silicon Graphics, Inc. (Trust Technology Group)
|
|
* Copyright (C) 2015 Intel Corporation.
|
|
* Copyright (C) 2015 Casey Schaufler <casey@schaufler-ca.com>
|
|
* Copyright (C) 2016 Mellanox Techonologies
|
|
* Copyright (C) 2020 Google LLC.
|
|
*/
|
|
|
|
/*
|
|
* The macro LSM_HOOK is used to define the data structures required by
|
|
* the LSM framework using the pattern:
|
|
*
|
|
* LSM_HOOK(<return_type>, <default_value>, <hook_name>, args...)
|
|
*
|
|
* struct security_hook_heads {
|
|
* #define LSM_HOOK(RET, DEFAULT, NAME, ...) struct hlist_head NAME;
|
|
* #include <linux/lsm_hook_defs.h>
|
|
* #undef LSM_HOOK
|
|
* };
|
|
*/
|
|
LSM_HOOK(int, 0, binder_set_context_mgr, const struct cred *mgr)
|
|
LSM_HOOK(int, 0, binder_transaction, const struct cred *from,
|
|
const struct cred *to)
|
|
LSM_HOOK(int, 0, binder_transfer_binder, const struct cred *from,
|
|
const struct cred *to)
|
|
LSM_HOOK(int, 0, binder_transfer_file, const struct cred *from,
|
|
const struct cred *to, struct file *file)
|
|
LSM_HOOK(int, 0, ptrace_access_check, struct task_struct *child,
|
|
unsigned int mode)
|
|
LSM_HOOK(int, 0, ptrace_traceme, struct task_struct *parent)
|
|
LSM_HOOK(int, 0, capget, struct task_struct *target, kernel_cap_t *effective,
|
|
kernel_cap_t *inheritable, kernel_cap_t *permitted)
|
|
LSM_HOOK(int, 0, capset, struct cred *new, const struct cred *old,
|
|
const kernel_cap_t *effective, const kernel_cap_t *inheritable,
|
|
const kernel_cap_t *permitted)
|
|
LSM_HOOK(int, 0, capable, const struct cred *cred, struct user_namespace *ns,
|
|
int cap, unsigned int opts)
|
|
LSM_HOOK(int, 0, quotactl, int cmds, int type, int id, struct super_block *sb)
|
|
LSM_HOOK(int, 0, quota_on, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, syslog, int type)
|
|
LSM_HOOK(int, 0, settime, const struct timespec64 *ts,
|
|
const struct timezone *tz)
|
|
LSM_HOOK(int, 0, vm_enough_memory, struct mm_struct *mm, long pages)
|
|
LSM_HOOK(int, 0, bprm_creds_for_exec, struct linux_binprm *bprm)
|
|
LSM_HOOK(int, 0, bprm_creds_from_file, struct linux_binprm *bprm, struct file *file)
|
|
LSM_HOOK(int, 0, bprm_check_security, struct linux_binprm *bprm)
|
|
LSM_HOOK(void, LSM_RET_VOID, bprm_committing_creds, struct linux_binprm *bprm)
|
|
LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm)
|
|
LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc,
|
|
struct fs_context *src_sc)
|
|
LSM_HOOK(int, -ENOPARAM, fs_context_parse_param, struct fs_context *fc,
|
|
struct fs_parameter *param)
|
|
LSM_HOOK(int, 0, sb_alloc_security, struct super_block *sb)
|
|
LSM_HOOK(void, LSM_RET_VOID, sb_free_security, struct super_block *sb)
|
|
LSM_HOOK(void, LSM_RET_VOID, sb_free_mnt_opts, void *mnt_opts)
|
|
LSM_HOOK(int, 0, sb_eat_lsm_opts, char *orig, void **mnt_opts)
|
|
LSM_HOOK(int, 0, sb_remount, struct super_block *sb, void *mnt_opts)
|
|
LSM_HOOK(int, 0, sb_kern_mount, struct super_block *sb)
|
|
LSM_HOOK(int, 0, sb_show_options, struct seq_file *m, struct super_block *sb)
|
|
LSM_HOOK(int, 0, sb_statfs, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, sb_mount, const char *dev_name, const struct path *path,
|
|
const char *type, unsigned long flags, void *data)
|
|
LSM_HOOK(int, 0, sb_umount, struct vfsmount *mnt, int flags)
|
|
LSM_HOOK(int, 0, sb_pivotroot, const struct path *old_path,
|
|
const struct path *new_path)
|
|
LSM_HOOK(int, 0, sb_set_mnt_opts, struct super_block *sb, void *mnt_opts,
|
|
unsigned long kern_flags, unsigned long *set_kern_flags)
|
|
LSM_HOOK(int, 0, sb_clone_mnt_opts, const struct super_block *oldsb,
|
|
struct super_block *newsb, unsigned long kern_flags,
|
|
unsigned long *set_kern_flags)
|
|
LSM_HOOK(int, 0, sb_add_mnt_opt, const char *option, const char *val,
|
|
int len, void **mnt_opts)
|
|
LSM_HOOK(int, 0, move_mount, const struct path *from_path,
|
|
const struct path *to_path)
|
|
LSM_HOOK(int, 0, dentry_init_security, struct dentry *dentry,
|
|
int mode, const struct qstr *name, void **ctx, u32 *ctxlen)
|
|
LSM_HOOK(int, 0, dentry_create_files_as, struct dentry *dentry, int mode,
|
|
struct qstr *name, const struct cred *old, struct cred *new)
|
|
|
|
#ifdef CONFIG_SECURITY_PATH
|
|
LSM_HOOK(int, 0, path_unlink, const struct path *dir, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, path_mkdir, const struct path *dir, struct dentry *dentry,
|
|
umode_t mode)
|
|
LSM_HOOK(int, 0, path_rmdir, const struct path *dir, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, path_mknod, const struct path *dir, struct dentry *dentry,
|
|
umode_t mode, unsigned int dev)
|
|
LSM_HOOK(int, 0, path_truncate, const struct path *path)
|
|
LSM_HOOK(int, 0, path_symlink, const struct path *dir, struct dentry *dentry,
|
|
const char *old_name)
|
|
LSM_HOOK(int, 0, path_link, struct dentry *old_dentry,
|
|
const struct path *new_dir, struct dentry *new_dentry)
|
|
LSM_HOOK(int, 0, path_rename, const struct path *old_dir,
|
|
struct dentry *old_dentry, const struct path *new_dir,
|
|
struct dentry *new_dentry)
|
|
LSM_HOOK(int, 0, path_chmod, const struct path *path, umode_t mode)
|
|
LSM_HOOK(int, 0, path_chown, const struct path *path, kuid_t uid, kgid_t gid)
|
|
LSM_HOOK(int, 0, path_chroot, const struct path *path)
|
|
#endif /* CONFIG_SECURITY_PATH */
|
|
|
|
/* Needed for inode based security check */
|
|
LSM_HOOK(int, 0, path_notify, const struct path *path, u64 mask,
|
|
unsigned int obj_type)
|
|
LSM_HOOK(int, 0, inode_alloc_security, struct inode *inode)
|
|
LSM_HOOK(void, LSM_RET_VOID, inode_free_security, struct inode *inode)
|
|
LSM_HOOK(int, 0, inode_init_security, struct inode *inode,
|
|
struct inode *dir, const struct qstr *qstr, const char **name,
|
|
void **value, size_t *len)
|
|
LSM_HOOK(int, 0, inode_init_security_anon, struct inode *inode,
|
|
const struct qstr *name, const struct inode *context_inode)
|
|
LSM_HOOK(int, 0, inode_create, struct inode *dir, struct dentry *dentry,
|
|
umode_t mode)
|
|
LSM_HOOK(int, 0, inode_link, struct dentry *old_dentry, struct inode *dir,
|
|
struct dentry *new_dentry)
|
|
LSM_HOOK(int, 0, inode_unlink, struct inode *dir, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, inode_symlink, struct inode *dir, struct dentry *dentry,
|
|
const char *old_name)
|
|
LSM_HOOK(int, 0, inode_mkdir, struct inode *dir, struct dentry *dentry,
|
|
umode_t mode)
|
|
LSM_HOOK(int, 0, inode_rmdir, struct inode *dir, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, inode_mknod, struct inode *dir, struct dentry *dentry,
|
|
umode_t mode, dev_t dev)
|
|
LSM_HOOK(int, 0, inode_rename, struct inode *old_dir, struct dentry *old_dentry,
|
|
struct inode *new_dir, struct dentry *new_dentry)
|
|
LSM_HOOK(int, 0, inode_readlink, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, inode_follow_link, struct dentry *dentry, struct inode *inode,
|
|
bool rcu)
|
|
LSM_HOOK(int, 0, inode_permission, struct inode *inode, int mask)
|
|
LSM_HOOK(int, 0, inode_setattr, struct dentry *dentry, struct iattr *attr)
|
|
LSM_HOOK(int, 0, inode_getattr, const struct path *path)
|
|
LSM_HOOK(int, 0, inode_setxattr, struct dentry *dentry, const char *name,
|
|
const void *value, size_t size, int flags)
|
|
LSM_HOOK(void, LSM_RET_VOID, inode_post_setxattr, struct dentry *dentry,
|
|
const char *name, const void *value, size_t size, int flags)
|
|
LSM_HOOK(int, 0, inode_getxattr, struct dentry *dentry, const char *name)
|
|
LSM_HOOK(int, 0, inode_listxattr, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, inode_removexattr, struct dentry *dentry, const char *name)
|
|
LSM_HOOK(int, 0, inode_need_killpriv, struct dentry *dentry)
|
|
LSM_HOOK(int, 0, inode_killpriv, struct dentry *dentry)
|
|
LSM_HOOK(int, -EOPNOTSUPP, inode_getsecurity, struct inode *inode,
|
|
const char *name, void **buffer, bool alloc)
|
|
LSM_HOOK(int, -EOPNOTSUPP, inode_setsecurity, struct inode *inode,
|
|
const char *name, const void *value, size_t size, int flags)
|
|
LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char *buffer,
|
|
size_t buffer_size)
|
|
LSM_HOOK(void, LSM_RET_VOID, inode_getsecid, struct inode *inode, u32 *secid)
|
|
LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new)
|
|
LSM_HOOK(int, -EOPNOTSUPP, inode_copy_up_xattr, const char *name)
|
|
LSM_HOOK(int, 0, kernfs_init_security, struct kernfs_node *kn_dir,
|
|
struct kernfs_node *kn)
|
|
LSM_HOOK(int, 0, file_permission, struct file *file, int mask)
|
|
LSM_HOOK(int, 0, file_alloc_security, struct file *file)
|
|
LSM_HOOK(void, LSM_RET_VOID, file_free_security, struct file *file)
|
|
LSM_HOOK(int, 0, file_ioctl, struct file *file, unsigned int cmd,
|
|
unsigned long arg)
|
|
LSM_HOOK(int, 0, mmap_addr, unsigned long addr)
|
|
LSM_HOOK(int, 0, mmap_file, struct file *file, unsigned long reqprot,
|
|
unsigned long prot, unsigned long flags)
|
|
LSM_HOOK(int, 0, file_mprotect, struct vm_area_struct *vma,
|
|
unsigned long reqprot, unsigned long prot)
|
|
LSM_HOOK(int, 0, file_lock, struct file *file, unsigned int cmd)
|
|
LSM_HOOK(int, 0, file_fcntl, struct file *file, unsigned int cmd,
|
|
unsigned long arg)
|
|
LSM_HOOK(void, LSM_RET_VOID, file_set_fowner, struct file *file)
|
|
LSM_HOOK(int, 0, file_send_sigiotask, struct task_struct *tsk,
|
|
struct fown_struct *fown, int sig)
|
|
LSM_HOOK(int, 0, file_receive, struct file *file)
|
|
LSM_HOOK(int, 0, file_open, struct file *file)
|
|
LSM_HOOK(int, 0, task_alloc, struct task_struct *task,
|
|
unsigned long clone_flags)
|
|
LSM_HOOK(void, LSM_RET_VOID, task_free, struct task_struct *task)
|
|
LSM_HOOK(int, 0, cred_alloc_blank, struct cred *cred, gfp_t gfp)
|
|
LSM_HOOK(void, LSM_RET_VOID, cred_free, struct cred *cred)
|
|
LSM_HOOK(int, 0, cred_prepare, struct cred *new, const struct cred *old,
|
|
gfp_t gfp)
|
|
LSM_HOOK(void, LSM_RET_VOID, cred_transfer, struct cred *new,
|
|
const struct cred *old)
|
|
LSM_HOOK(void, LSM_RET_VOID, cred_getsecid, const struct cred *c, u32 *secid)
|
|
LSM_HOOK(int, 0, kernel_act_as, struct cred *new, u32 secid)
|
|
LSM_HOOK(int, 0, kernel_create_files_as, struct cred *new, struct inode *inode)
|
|
LSM_HOOK(int, 0, kernel_module_request, char *kmod_name)
|
|
LSM_HOOK(int, 0, kernel_load_data, enum kernel_load_data_id id, bool contents)
|
|
LSM_HOOK(int, 0, kernel_post_load_data, char *buf, loff_t size,
|
|
enum kernel_load_data_id id, char *description)
|
|
LSM_HOOK(int, 0, kernel_read_file, struct file *file,
|
|
enum kernel_read_file_id id, bool contents)
|
|
LSM_HOOK(int, 0, kernel_post_read_file, struct file *file, char *buf,
|
|
loff_t size, enum kernel_read_file_id id)
|
|
LSM_HOOK(int, 0, task_fix_setuid, struct cred *new, const struct cred *old,
|
|
int flags)
|
|
LSM_HOOK(int, 0, task_fix_setgid, struct cred *new, const struct cred * old,
|
|
int flags)
|
|
LSM_HOOK(int, 0, task_setpgid, struct task_struct *p, pid_t pgid)
|
|
LSM_HOOK(int, 0, task_getpgid, struct task_struct *p)
|
|
LSM_HOOK(int, 0, task_getsid, struct task_struct *p)
|
|
LSM_HOOK(void, LSM_RET_VOID, task_getsecid, struct task_struct *p, u32 *secid)
|
|
LSM_HOOK(int, 0, task_setnice, struct task_struct *p, int nice)
|
|
LSM_HOOK(int, 0, task_setioprio, struct task_struct *p, int ioprio)
|
|
LSM_HOOK(int, 0, task_getioprio, struct task_struct *p)
|
|
LSM_HOOK(int, 0, task_prlimit, const struct cred *cred,
|
|
const struct cred *tcred, unsigned int flags)
|
|
LSM_HOOK(int, 0, task_setrlimit, struct task_struct *p, unsigned int resource,
|
|
struct rlimit *new_rlim)
|
|
LSM_HOOK(int, 0, task_setscheduler, struct task_struct *p)
|
|
LSM_HOOK(int, 0, task_getscheduler, struct task_struct *p)
|
|
LSM_HOOK(int, 0, task_movememory, struct task_struct *p)
|
|
LSM_HOOK(int, 0, task_kill, struct task_struct *p, struct kernel_siginfo *info,
|
|
int sig, const struct cred *cred)
|
|
LSM_HOOK(int, -ENOSYS, task_prctl, int option, unsigned long arg2,
|
|
unsigned long arg3, unsigned long arg4, unsigned long arg5)
|
|
LSM_HOOK(void, LSM_RET_VOID, task_to_inode, struct task_struct *p,
|
|
struct inode *inode)
|
|
LSM_HOOK(int, 0, ipc_permission, struct kern_ipc_perm *ipcp, short flag)
|
|
LSM_HOOK(void, LSM_RET_VOID, ipc_getsecid, struct kern_ipc_perm *ipcp,
|
|
u32 *secid)
|
|
LSM_HOOK(int, 0, msg_msg_alloc_security, struct msg_msg *msg)
|
|
LSM_HOOK(void, LSM_RET_VOID, msg_msg_free_security, struct msg_msg *msg)
|
|
LSM_HOOK(int, 0, msg_queue_alloc_security, struct kern_ipc_perm *perm)
|
|
LSM_HOOK(void, LSM_RET_VOID, msg_queue_free_security,
|
|
struct kern_ipc_perm *perm)
|
|
LSM_HOOK(int, 0, msg_queue_associate, struct kern_ipc_perm *perm, int msqflg)
|
|
LSM_HOOK(int, 0, msg_queue_msgctl, struct kern_ipc_perm *perm, int cmd)
|
|
LSM_HOOK(int, 0, msg_queue_msgsnd, struct kern_ipc_perm *perm,
|
|
struct msg_msg *msg, int msqflg)
|
|
LSM_HOOK(int, 0, msg_queue_msgrcv, struct kern_ipc_perm *perm,
|
|
struct msg_msg *msg, struct task_struct *target, long type, int mode)
|
|
LSM_HOOK(int, 0, shm_alloc_security, struct kern_ipc_perm *perm)
|
|
LSM_HOOK(void, LSM_RET_VOID, shm_free_security, struct kern_ipc_perm *perm)
|
|
LSM_HOOK(int, 0, shm_associate, struct kern_ipc_perm *perm, int shmflg)
|
|
LSM_HOOK(int, 0, shm_shmctl, struct kern_ipc_perm *perm, int cmd)
|
|
LSM_HOOK(int, 0, shm_shmat, struct kern_ipc_perm *perm, char __user *shmaddr,
|
|
int shmflg)
|
|
LSM_HOOK(int, 0, sem_alloc_security, struct kern_ipc_perm *perm)
|
|
LSM_HOOK(void, LSM_RET_VOID, sem_free_security, struct kern_ipc_perm *perm)
|
|
LSM_HOOK(int, 0, sem_associate, struct kern_ipc_perm *perm, int semflg)
|
|
LSM_HOOK(int, 0, sem_semctl, struct kern_ipc_perm *perm, int cmd)
|
|
LSM_HOOK(int, 0, sem_semop, struct kern_ipc_perm *perm, struct sembuf *sops,
|
|
unsigned nsops, int alter)
|
|
LSM_HOOK(int, 0, netlink_send, struct sock *sk, struct sk_buff *skb)
|
|
LSM_HOOK(void, LSM_RET_VOID, d_instantiate, struct dentry *dentry,
|
|
struct inode *inode)
|
|
LSM_HOOK(int, -EINVAL, getprocattr, struct task_struct *p, char *name,
|
|
char **value)
|
|
LSM_HOOK(int, -EINVAL, setprocattr, const char *name, void *value, size_t size)
|
|
LSM_HOOK(int, 0, ismaclabel, const char *name)
|
|
LSM_HOOK(int, -EOPNOTSUPP, secid_to_secctx, u32 secid, char **secdata,
|
|
u32 *seclen)
|
|
LSM_HOOK(int, 0, secctx_to_secid, const char *secdata, u32 seclen, u32 *secid)
|
|
LSM_HOOK(void, LSM_RET_VOID, release_secctx, char *secdata, u32 seclen)
|
|
LSM_HOOK(void, LSM_RET_VOID, inode_invalidate_secctx, struct inode *inode)
|
|
LSM_HOOK(int, 0, inode_notifysecctx, struct inode *inode, void *ctx, u32 ctxlen)
|
|
LSM_HOOK(int, 0, inode_setsecctx, struct dentry *dentry, void *ctx, u32 ctxlen)
|
|
LSM_HOOK(int, 0, inode_getsecctx, struct inode *inode, void **ctx,
|
|
u32 *ctxlen)
|
|
|
|
#if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE)
|
|
LSM_HOOK(int, 0, post_notification, const struct cred *w_cred,
|
|
const struct cred *cred, struct watch_notification *n)
|
|
#endif /* CONFIG_SECURITY && CONFIG_WATCH_QUEUE */
|
|
|
|
#if defined(CONFIG_SECURITY) && defined(CONFIG_KEY_NOTIFICATIONS)
|
|
LSM_HOOK(int, 0, watch_key, struct key *key)
|
|
#endif /* CONFIG_SECURITY && CONFIG_KEY_NOTIFICATIONS */
|
|
|
|
#ifdef CONFIG_SECURITY_NETWORK
|
|
LSM_HOOK(int, 0, unix_stream_connect, struct sock *sock, struct sock *other,
|
|
struct sock *newsk)
|
|
LSM_HOOK(int, 0, unix_may_send, struct socket *sock, struct socket *other)
|
|
LSM_HOOK(int, 0, socket_create, int family, int type, int protocol, int kern)
|
|
LSM_HOOK(int, 0, socket_post_create, struct socket *sock, int family, int type,
|
|
int protocol, int kern)
|
|
LSM_HOOK(int, 0, socket_socketpair, struct socket *socka, struct socket *sockb)
|
|
LSM_HOOK(int, 0, socket_bind, struct socket *sock, struct sockaddr *address,
|
|
int addrlen)
|
|
LSM_HOOK(int, 0, socket_connect, struct socket *sock, struct sockaddr *address,
|
|
int addrlen)
|
|
LSM_HOOK(int, 0, socket_listen, struct socket *sock, int backlog)
|
|
LSM_HOOK(int, 0, socket_accept, struct socket *sock, struct socket *newsock)
|
|
LSM_HOOK(int, 0, socket_sendmsg, struct socket *sock, struct msghdr *msg,
|
|
int size)
|
|
LSM_HOOK(int, 0, socket_recvmsg, struct socket *sock, struct msghdr *msg,
|
|
int size, int flags)
|
|
LSM_HOOK(int, 0, socket_getsockname, struct socket *sock)
|
|
LSM_HOOK(int, 0, socket_getpeername, struct socket *sock)
|
|
LSM_HOOK(int, 0, socket_getsockopt, struct socket *sock, int level, int optname)
|
|
LSM_HOOK(int, 0, socket_setsockopt, struct socket *sock, int level, int optname)
|
|
LSM_HOOK(int, 0, socket_shutdown, struct socket *sock, int how)
|
|
LSM_HOOK(int, 0, socket_sock_rcv_skb, struct sock *sk, struct sk_buff *skb)
|
|
LSM_HOOK(int, 0, socket_getpeersec_stream, struct socket *sock,
|
|
char __user *optval, int __user *optlen, unsigned len)
|
|
LSM_HOOK(int, 0, socket_getpeersec_dgram, struct socket *sock,
|
|
struct sk_buff *skb, u32 *secid)
|
|
LSM_HOOK(int, 0, sk_alloc_security, struct sock *sk, int family, gfp_t priority)
|
|
LSM_HOOK(void, LSM_RET_VOID, sk_free_security, struct sock *sk)
|
|
LSM_HOOK(void, LSM_RET_VOID, sk_clone_security, const struct sock *sk,
|
|
struct sock *newsk)
|
|
LSM_HOOK(void, LSM_RET_VOID, sk_getsecid, struct sock *sk, u32 *secid)
|
|
LSM_HOOK(void, LSM_RET_VOID, sock_graft, struct sock *sk, struct socket *parent)
|
|
LSM_HOOK(int, 0, inet_conn_request, struct sock *sk, struct sk_buff *skb,
|
|
struct request_sock *req)
|
|
LSM_HOOK(void, LSM_RET_VOID, inet_csk_clone, struct sock *newsk,
|
|
const struct request_sock *req)
|
|
LSM_HOOK(void, LSM_RET_VOID, inet_conn_established, struct sock *sk,
|
|
struct sk_buff *skb)
|
|
LSM_HOOK(int, 0, secmark_relabel_packet, u32 secid)
|
|
LSM_HOOK(void, LSM_RET_VOID, secmark_refcount_inc, void)
|
|
LSM_HOOK(void, LSM_RET_VOID, secmark_refcount_dec, void)
|
|
LSM_HOOK(void, LSM_RET_VOID, req_classify_flow, const struct request_sock *req,
|
|
struct flowi_common *flic)
|
|
LSM_HOOK(int, 0, tun_dev_alloc_security, void **security)
|
|
LSM_HOOK(void, LSM_RET_VOID, tun_dev_free_security, void *security)
|
|
LSM_HOOK(int, 0, tun_dev_create, void)
|
|
LSM_HOOK(int, 0, tun_dev_attach_queue, void *security)
|
|
LSM_HOOK(int, 0, tun_dev_attach, struct sock *sk, void *security)
|
|
LSM_HOOK(int, 0, tun_dev_open, void *security)
|
|
LSM_HOOK(int, 0, sctp_assoc_request, struct sctp_endpoint *ep,
|
|
struct sk_buff *skb)
|
|
LSM_HOOK(int, 0, sctp_bind_connect, struct sock *sk, int optname,
|
|
struct sockaddr *address, int addrlen)
|
|
LSM_HOOK(void, LSM_RET_VOID, sctp_sk_clone, struct sctp_endpoint *ep,
|
|
struct sock *sk, struct sock *newsk)
|
|
#endif /* CONFIG_SECURITY_NETWORK */
|
|
|
|
#ifdef CONFIG_SECURITY_INFINIBAND
|
|
LSM_HOOK(int, 0, ib_pkey_access, void *sec, u64 subnet_prefix, u16 pkey)
|
|
LSM_HOOK(int, 0, ib_endport_manage_subnet, void *sec, const char *dev_name,
|
|
u8 port_num)
|
|
LSM_HOOK(int, 0, ib_alloc_security, void **sec)
|
|
LSM_HOOK(void, LSM_RET_VOID, ib_free_security, void *sec)
|
|
#endif /* CONFIG_SECURITY_INFINIBAND */
|
|
|
|
#ifdef CONFIG_SECURITY_NETWORK_XFRM
|
|
LSM_HOOK(int, 0, xfrm_policy_alloc_security, struct xfrm_sec_ctx **ctxp,
|
|
struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp)
|
|
LSM_HOOK(int, 0, xfrm_policy_clone_security, struct xfrm_sec_ctx *old_ctx,
|
|
struct xfrm_sec_ctx **new_ctx)
|
|
LSM_HOOK(void, LSM_RET_VOID, xfrm_policy_free_security,
|
|
struct xfrm_sec_ctx *ctx)
|
|
LSM_HOOK(int, 0, xfrm_policy_delete_security, struct xfrm_sec_ctx *ctx)
|
|
LSM_HOOK(int, 0, xfrm_state_alloc, struct xfrm_state *x,
|
|
struct xfrm_user_sec_ctx *sec_ctx)
|
|
LSM_HOOK(int, 0, xfrm_state_alloc_acquire, struct xfrm_state *x,
|
|
struct xfrm_sec_ctx *polsec, u32 secid)
|
|
LSM_HOOK(void, LSM_RET_VOID, xfrm_state_free_security, struct xfrm_state *x)
|
|
LSM_HOOK(int, 0, xfrm_state_delete_security, struct xfrm_state *x)
|
|
LSM_HOOK(int, 0, xfrm_policy_lookup, struct xfrm_sec_ctx *ctx, u32 fl_secid,
|
|
u8 dir)
|
|
LSM_HOOK(int, 1, xfrm_state_pol_flow_match, struct xfrm_state *x,
|
|
struct xfrm_policy *xp, const struct flowi_common *flic)
|
|
LSM_HOOK(int, 0, xfrm_decode_session, struct sk_buff *skb, u32 *secid,
|
|
int ckall)
|
|
#endif /* CONFIG_SECURITY_NETWORK_XFRM */
|
|
|
|
/* key management security hooks */
|
|
#ifdef CONFIG_KEYS
|
|
LSM_HOOK(int, 0, key_alloc, struct key *key, const struct cred *cred,
|
|
unsigned long flags)
|
|
LSM_HOOK(void, LSM_RET_VOID, key_free, struct key *key)
|
|
LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
|
|
enum key_need_perm need_perm)
|
|
LSM_HOOK(int, 0, key_getsecurity, struct key *key, char **_buffer)
|
|
#endif /* CONFIG_KEYS */
|
|
|
|
#ifdef CONFIG_AUDIT
|
|
LSM_HOOK(int, 0, audit_rule_init, u32 field, u32 op, char *rulestr,
|
|
void **lsmrule)
|
|
LSM_HOOK(int, 0, audit_rule_known, struct audit_krule *krule)
|
|
LSM_HOOK(int, 0, audit_rule_match, u32 secid, u32 field, u32 op, void *lsmrule)
|
|
LSM_HOOK(void, LSM_RET_VOID, audit_rule_free, void *lsmrule)
|
|
#endif /* CONFIG_AUDIT */
|
|
|
|
#ifdef CONFIG_BPF_SYSCALL
|
|
LSM_HOOK(int, 0, bpf, int cmd, union bpf_attr *attr, unsigned int size)
|
|
LSM_HOOK(int, 0, bpf_map, struct bpf_map *map, fmode_t fmode)
|
|
LSM_HOOK(int, 0, bpf_prog, struct bpf_prog *prog)
|
|
LSM_HOOK(int, 0, bpf_map_alloc_security, struct bpf_map *map)
|
|
LSM_HOOK(void, LSM_RET_VOID, bpf_map_free_security, struct bpf_map *map)
|
|
LSM_HOOK(int, 0, bpf_prog_alloc_security, struct bpf_prog_aux *aux)
|
|
LSM_HOOK(void, LSM_RET_VOID, bpf_prog_free_security, struct bpf_prog_aux *aux)
|
|
#endif /* CONFIG_BPF_SYSCALL */
|
|
|
|
LSM_HOOK(int, 0, locked_down, enum lockdown_reason what)
|
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
|
LSM_HOOK(int, 0, perf_event_open, struct perf_event_attr *attr, int type)
|
|
LSM_HOOK(int, 0, perf_event_alloc, struct perf_event *event)
|
|
LSM_HOOK(void, LSM_RET_VOID, perf_event_free, struct perf_event *event)
|
|
LSM_HOOK(int, 0, perf_event_read, struct perf_event *event)
|
|
LSM_HOOK(int, 0, perf_event_write, struct perf_event *event)
|
|
#endif /* CONFIG_PERF_EVENTS */
|