Skip to content

Commit 19f173d

Browse files
committed
Merge branch 'lineage-20' of github.com:LineageOS/android_kernel_qcom_sm8350 into lineage-22.2
* 'lineage-20' of github.com:LineageOS/android_kernel_qcom_sm8350: power: supply: qti_battery_charger: Fix charging_enabled node disabled state ANDROID: Fix compilation error with huge_pmd_share() BACKPORT: mm/gup: Remove enfornced COW mechanism UPSTREAM: mm/userfaultfd: selftests: fix memory corruption with thp enabled UPSTREAM: mm/shmem: use page_mapping() to detect page cache for uffd continue UPSTREAM: mm/userfaultfd: fix memory corruption due to writeprotect UPSTREAM: mm: hugetlb: add missing cache flushing in hugetlb_unshare_all_pmds() BACKPORT: userfaultfd: wp: declare _UFFDIO_WRITEPROTECT conditionally BACKPORT: mm, mempolicy: fix up gup usage in lookup_node UPSTREAM: mm/mempolicy: Allow lookup_node() to handle fatal signal UPSTREAM: mm/gup: Let __get_user_pages_locked() return -EINTR for fatal signal UPSTREAM: mm/gup: fix fixup_user_fault() on multiple retries UPSTREAM: mm/gup: Mark lock taken only after a successful retake UPSTREAM: mm/userfaultfd: honor FAULT_FLAG_KILLABLE in fault path UPSTREAM: mm/gup: allow to react to fatal signals UPSTREAM: mm/gup: allow VM_FAULT_RETRY for multiple times UPSTREAM: mm: allow VM_FAULT_RETRY for multiple times UPSTREAM: mm: introduce FAULT_FLAG_INTERRUPTIBLE UPSTREAM: mm: introduce FAULT_FLAG_DEFAULT UPSTREAM: userfaultfd: don't retake mmap_sem to emulate NOPAGE UPSTREAM: mm: return faster for non-fatal signals in user mode faults UPSTREAM: sh/mm: use helper fault_signal_pending() UPSTREAM: powerpc/mm: use helper fault_signal_pending() UPSTREAM: arm64/mm: use helper fault_signal_pending() UPSTREAM: arc/mm: use helper fault_signal_pending() UPSTREAM: x86/mm: use helper fault_signal_pending() BACKPORT: mm: introduce fault_signal_pending() UPSTREAM: mm/gup: fix __get_user_pages() on fault retry of hugetlb UPSTREAM: mm/gup: rename "nonblocking" to "locked" where proper BACKPORT: FROMGIT: userfaultfd: fix UFFDIO_CONTINUE ioctl request definition FROMGIT: userfaultfd/selftests: exercise minor fault handling shmem support BACKPORT: FROMGIT: userfaultfd/selftests: reinitialize test context in each test FROMGIT: userfaultfd/selftests: create alias mappings in the shmem test FROMGIT: userfaultfd/selftests: use memfd_create for shmem test type BACKPORT: FROMGIT: userfaultfd/shmem: modify shmem_mfill_atomic_pte to use install_pte() BACKPORT: FROMGIT: userfaultfd/shmem: advertise shmem minor fault support BACKPORT: FROMGIT: userfaultfd/shmem: support UFFDIO_CONTINUE for shmem BACKPORT: FROMGIT: userfaultfd/shmem: support minor fault registration for shmem BACKPORT: FROMGIT: userfaultfd/shmem: combine shmem_{mcopy_atomic,mfill_zeropage}_pte BACKPORT: FROMGIT: userfaultfd/selftests: unify error handling BACKPORT: FROMGIT: userfaultfd/selftests: only dump counts if mode enabled BACKPORT: userfaultfd/selftests: add test exercising minor fault handling BACKPORT: userfaultfd: selftests: add write-protect test BACKPORT: userfaultfd: selftests: refactor statistics Revert "BACKPORT: FROMGIT: userfaultfd/selftests: add test exercising minor fault handling" Revert "BACKPORT: FROMGIT: userfaultfd: support minor fault handling for shmem" Revert "FROMGIT: userfaultfd/selftests: use memfd_create for shmem test type" Revert "FROMGIT: userfaultfd/selftests: create alias mappings in the shmem test" Revert "BACKPORT: FROMGIT: userfaultfd/selftests: reinitialize test context in each test" Revert "BACKPORT: FROMGIT: userfaultfd/selftests: exercise minor fault handling shmem support" Revert "FROMLIST: userfaultfd/shmem: fix minor fault page leak" BACKPORT: userfaultfd: wp: add helper for writeprotect check UPSTREAM: mm/mremap: don't account pages in vma_to_resize() BACKPORT: FROMLIST: Revert "mremap: don't allow MREMAP_DONTUNMAP on special_mappings and aio" FROMLIST: mm: Extend MREMAP_DONTUNMAP to non-anonymous mappings UPSTREAM: mremap: don't allow MREMAP_DONTUNMAP on special_mappings and aio BACKPORT: mm/mremap: for MREMAP_DONTUNMAP check security_vm_enough_memory_mm() UPSTREAM: tools headers UAPI: Sync linux/mman.h with the kernel UPSTREAM: userfaultfd: fix remap event with MREMAP_DONTUNMAP UPSTREAM: mm: Fix MREMAP_DONTUNMAP accounting on VMA merge UPSTREAM: mm/mremap: add MREMAP_DONTUNMAP to mremap() ANDROID: userfaultfd: Fix untag pointer in userfaultfd_continue() FROMLIST: userfaultfd/shmem: fix minor fault page leak BACKPORT: FROMLIST: userfaultfd/hugetlbfs: Fix minor fault page leak BACKPORT: FROMGIT: userfaultfd/selftests: drop VERIFY check in locking_thread FROMGIT: userfaultfd/selftests: remove the time() check on delayed uffd FROMGIT: userfaultfd/selftests: use user mode only BACKPORT: FROMGIT: userfaultfd/selftests: exercise minor fault handling shmem support BACKPORT: FROMGIT: userfaultfd/selftests: reinitialize test context in each test FROMGIT: userfaultfd/selftests: create alias mappings in the shmem test FROMGIT: userfaultfd/selftests: use memfd_create for shmem test type BACKPORT: FROMGIT: userfaultfd: support minor fault handling for shmem BACKPORT: FROMGIT: userfaultfd/selftests: add test exercising minor fault handling BACKPORT: FROMGIT: userfaultfd: update documentation to describe minor fault handling BACKPORT: FROMGIT: userfaultfd: add UFFDIO_CONTINUE ioctl BACKPORT: FROMGIT: userfaultfd: hugetlbfs: only compile UFFD helpers if config enabled FROMGIT: userfaultfd: disable huge PMD sharing for MINOR registered VMAs BACKPORT: FROMGIT: userfaultfd: add minor fault registration mode BACKPORT: FROMGIT: hugetlb/userfaultfd: unshare all pmds for hugetlbfs when register wp FROMGIT: mm/hugetlb: move flush_hugetlb_tlb_range() into hugetlb.h FROMGIT: mm/hugetlb: fix build with !ARCH_WANT_HUGE_PMD_SHARE BACKPORT: FROMGIT: hugetlb/userfaultfd: forbid huge pmd sharing when uffd enabled BACKPORT: FROMGIT: hugetlb: pass vma into huge_pte_alloc() and huge_pmd_share() UPSTREAM: selftests/vm/.gitignore: add mremap_dontunmap FROMLIST: selftests: Add a MREMAP_DONTUNMAP selftest for shmem UPSTREAM: selftests: add MREMAP_DONTUNMAP selftest qcedev: Fix excessive logging on DRM playback usb: dwc3: gadget: Fix break condition in gadget state Revert "usb: dwc3: Increase DWC3 controller halt timeout" Revert "Revert "Revert "8250: add support for ASIX devices with a FIFO bug""" arm64: dts: qcom: Fix missing thermal cooling device thermal-cpufreq-0 UPSTREAM: net_sched: Prevent creation of classes with TC_H_ROOT Linux 5.4.292 jfs: add index corruption check to DT_GETPAGE() jfs: fix slab-out-of-bounds read in ea_get() tracing: Fix use-after-free in print_graph_function_flags during tracer switching mmc: sdhci-pxav3: set NEED_RSP_BUSY capability ACPI: resource: Skip IRQ override on ASUS Vivobook 14 X1404VAP x86/mm: Fix flush_tlb_range() when used for zapping normal PMDs x86/tsc: Always save/restore TSC sched_clock() on suspend/resume ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk() can: flexcan: only change CAN state when link up in system PM arcnet: Add NULL check in com20020pci_probe() net: dsa: mv88e6xxx: propperly shutdown PPU re-enable timer on destroy ipv6: fix omitted netlink attributes when using RTEXT_FILTER_SKIP_STATS vsock: avoid timeout during connect() if the socket is closing net_sched: skbprio: Remove overly strict queue assertions netlabel: Fix NULL pointer exception caused by CALIPSO on IPv4 sockets ntb: intel: Fix using link status DB's ntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans spufs: fix a leak in spufs_create_context() spufs: fix a leak on spufs_new_file() failure hwmon: (nct6775-core) Fix out of bounds access for NCT679{8,9} can: statistics: use atomic access in hot path locking/semaphore: Use wake_q to wake up processes outside lock critical section sched/deadline: Use online cpus for validating runtime affs: don't write overlarge OFS data block size fields affs: generate OFS sequence numbers starting at 1 wifi: iwlwifi: fw: allocate chained SG tables for dump sched/smt: Always inline sched_smt_active() octeontx2-af: Fix mbox INTR handler when num VFs > 64 ring-buffer: Fix bytes_dropped calculation issue objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds() fs/procfs: fix the comment above proc_pid_wchan() perf python: Check if there is space to copy all the event perf python: Decrement the refcount of just created event on failure perf python: Fixup description of sample.id event member ocfs2: validate l_tree_depth to avoid out-of-bounds access kexec: initialize ELF lowest address to ULONG_MAX perf units: Fix insufficient array space iio: accel: mma8452: Ensure error return on failure to matching oversampling ratio coresight: catu: Fix number of pages while using 64k pages isofs: fix KMSAN uninit-value bug in do_isofs_readdir() x86/dumpstack: Fix inaccurate unwinding from exception stacks due to misplaced assignment mfd: sm501: Switch to BIT() to mitigate integer overflows RDMA/mlx5: Fix mlx5_poll_one() cur_qp update flow power: supply: max77693: Fix wrong conversion of charge input threshold value x86/entry: Fix ORC unwinder for PUSH_REGS with save_ret=1 clk: amlogic: g12a: fix mmc A peripheral clock clk: amlogic: gxbb: drop non existing 32k clock parent clk: amlogic: g12b: fix cluster A parent data IB/mad: Check available slots before posting receive WRs clk: rockchip: rk3328: fix wrong clk_ref_usb3otg parent pinctrl: renesas: rza2: Fix missing of_node_put() call lib: 842: Improve error handling in sw842_compress() bpf: Use preempt_count() directly in bpf_send_signal_common() clk: amlogic: gxbb: drop incorrect flag on 32k clock fbdev: sm501fb: Add some geometry checks. mdacon: rework dependency list fbdev: au1100fb: Move a variable assignment behind a null pointer check PCI: pciehp: Don't enable HPIE when resuming in poll mode PCI: Remove stray put_device() in pci_register_host_bridge() PCI/portdrv: Only disable pciehp interrupts early when needed PCI/ASPM: Fix link state exit during switch upstream function removal drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member ALSA: hda/realtek: Always honor no_shutup_pins perf/ring_buffer: Allow the EPOLLRDNORM flag for poll lockdep: Don't disable interrupts on RT in disable_irq_nosync_lockdep.*() PM: sleep: Fix handling devices with direct_complete set on errors thermal: int340x: Add NULL check for adev EDAC/ie31200: Fix the error path order of ie31200_init() EDAC/ie31200: Fix the DIMM size mask for several SoCs EDAC/ie31200: Fix the size of EDAC_MC_LAYER_CHIP_SELECT layer selinux: Chain up tool resolving errors in install_policy.sh x86/platform: Only allow CONFIG_EISA for 32-bit x86/fpu: Avoid copying dynamic FP state from init_task in arch_dup_task_struct() cpufreq: governor: Fix negative 'idle_time' handling in dbs_update() x86/mm/pat: cpa-test: fix length for CPA_ARRAY test serial: 8250_dma: terminate correct DMA in tx_dma_flush() memstick: rtsx_usb_ms: Fix slab-use-after-free in rtsx_usb_ms_drv_remove net: usb: usbnet: restore usb%d name exception for local mac addresses net: usb: qmi_wwan: add Telit Cinterion FE990B composition net: usb: qmi_wwan: add Telit Cinterion FN990B composition tty: serial: 8250: Add some more device IDs counter: stm32-lptimer-cnt: fix error handling when enabling netfilter: socket: Lookup orig tuple for IPv6 SNAT ARM: Remove address checking for MMUless devices ARM: 9351/1: fault: Add "cut here" line for prefetch aborts ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed() atm: Fix NULL pointer dereference HID: hid-plantronics: Add mic mute mapping and generalize quirks ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse() batman-adv: Ignore own maximum aggregation size during RX ARM: shmobile: smp: Enforce shmobile_smp_* alignment mmc: atmel-mci: Add missing clk_disable_unprepare() drm/v3d: Don't run jobs that have errors flagged in its fence i2c: omap: fix IRQ storms net/neighbor: add missing policy for NDTPA_QUEUE_LENBYTES net: atm: fix use after free in lec_send() ipv6: Set errno after ip_fib_metrics_init() in ip6_route_info_create(). ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw(). Bluetooth: Fix error code in chan_alloc_skb_cb() RDMA/hns: Fix wrong value of max_sge_rd RDMA/bnxt_re: Avoid clearing VLAN_ID mask in modify qp path xfrm_output: Force software GSO only in tunnel mode firmware: imx-scu: fix OF node leak in .probe() i2c: sis630: Fix an error handling path in sis630_probe() i2c: ali15x3: Fix an error handling path in ali15x3_probe() i2c: ali1535: Fix an error handling path in ali1535_probe() ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data() qlcnic: fix memory leak issues in qlcnic_sriov_common.c drm/amd/display: Assign normalized_pix_clk when color depth = 14 drm/atomic: Filter out redundant DPMS calls x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes USB: serial: option: match on interface class for Telit FN990B USB: serial: option: fix Telit Cinterion FE990A name USB: serial: option: add Telit Cinterion FE990B compositions USB: serial: ftdi_sio: add support for Altera USB Blaster 3 block: fix 'kmem_cache of name 'bio-108' already exists' drm/nouveau: Do not override forced connector status x86/irq: Define trace events conditionally fuse: don't truncate cached, mutated symlink nvme: only allow entering LIVE from CONNECTING state sctp: Fix undefined behavior in left shift operation nvmet-rdma: recheck queue state is LIVE in state lock in recv done ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime() s390/cio: Fix CHPID "configure" attribute caching HID: ignore non-functional sensor in HP 5MP Camera HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell ACPI: resource: IRQ override for Eluktronics MECH-17 scsi: qla1280: Fix kernel oops when debug level > 2 iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() powercap: call put_device() on an error path in powercap_register_control_type() hrtimers: Mark is_migration_base() with __always_inline nvme-fc: go straight to connecting state when initializing net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices netfilter: nft_exthdr: fix offset with ipv4_find_option() net_sched: Prevent creation of classes with TC_H_ROOT ipvs: prevent integer overflow in do_ip_vs_get_ctl() netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree() Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio() drivers/hv: Replace binary semaphore with mutex netpoll: hold rcu read lock in __netpoll_send_skb() netpoll: netpoll_send_skb() returns transmit status netpoll: move netpoll_send_skb() out of line netpoll: remove dev argument from netpoll_send_skb_on_dev() netpoll: Fix use correct return type for ndo_start_xmit() pinctrl: bcm281xx: Fix incorrect regmap max_registers value sctp: sysctl: auth_enable: avoid using current->nsproxy sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy Revert "sctp: sysctl: auth_enable: avoid using current->nsproxy" Revert "sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy" sched/isolation: Prevent boot crash when the boot CPU is nohz_full clockevents/drivers/i8253: Fix stop sequence for timer 0 vlan: fix memory leak in vlan_newlink() Revert "tasklet: Introduce new initialization API" Revert "net: usb: rtl8150: use new tasklet API" Revert "net: usb: rtl8150: enable basic endpoint checking" Revert "usb: xhci: Add timeout argument in address_device USB HCD callback" Revert "usb: xhci: Fix NULL pointer dereference on certain command aborts" Linux 5.4.291 eeprom: digsy_mtc: Make GPIO lookup table match the device slimbus: messaging: Free transaction ID in delayed interrupt scenario intel_th: pci: Add Panther Lake-P/U support intel_th: pci: Add Panther Lake-H support intel_th: pci: Add Arrow Lake support Squashfs: check the inode number is not the invalid value of zero xhci: pci: Fix indentation in the PCI device ID definitions usb: gadget: Check bmAttributes only if configuration is valid usb: gadget: Fix setting self-powered state on suspend usb: gadget: Set self-powered based on MaxPower and bmAttributes usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality usb: typec: ucsi: increase timeout for PPM reset operations usb: atm: cxacru: fix a flaw in existing endpoint checks usb: renesas_usbhs: Flush the notify_hotplug_work usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader usb: renesas_usbhs: Use devm_usb_get_phy() usb: renesas_usbhs: Call clk_put() Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection" gpio: rcar: Fix missing of_node_put() call net: ipv6: fix missing dst ref drop in ila lwtunnel net: ipv6: fix dst ref loop in ila lwtunnel net-timestamp: support TCP GSO case for a few missing flags vlan: enforce underlying device type ppp: Fix KMSAN uninit-value warning with bpf be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink drm/sched: Fix preprocessor guard hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe() llc: do not use skb_get() before dev_queue_xmit() hwmon: (ad7314) Validate leading zero bits and return error hwmon: (ntc_thermistor) Fix the ncpXXxh103 sensor table hwmon: (pmbus) Initialise page count in pmbus_identify() caif_virtio: fix wrong pointer check in cfv_probe() net: gso: fix ownership in __udp_gso_segment HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() HID: google: fix unused variable warning under !CONFIG_ACPI wifi: iwlwifi: limit printed string from FW file mm/page_alloc: fix uninitialized variable rapidio: fix an API misues when rio_add_net() fails rapidio: add check for rio_add_net() in rio_scan_alloc_net() wifi: nl80211: reject cooked mode if it is set along with other flags wifi: cfg80211: regulatory: improve invalid hints checking x86/cpu: Properly parse CPUID leaf 0x2 TLB descriptor 0x63 x86/cpu: Validate CPUID leaf 0x2 EDX output x86/cacheinfo: Validate CPUID leaf 0x2 EDX output platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M ALSA: hda/realtek: update ALC222 depop optimize ALSA: hda: intel: Add Dell ALC3271 to power_save denylist HID: appleir: Fix potential NULL dereference at raw event handle Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'" drm/amdgpu: disable BAR resize on Dell G5 SE drm/amdgpu: Check extended configuration space register when system uses large bar drm/amdgpu: skip BAR resizing if the bios already did it acct: perform last write from workqueue kernel/acct.c: use dedicated helper to access rlimit values kernel/acct.c: use #elif instead of #end and #elif drop_monitor: fix incorrect initialization order pfifo_tail_enqueue: Drop new packet when sch->limit == 0 sched/core: Prevent rescheduling when interrupts are disabled phy: exynos5-usbdrd: fix MPLL_MULTIPLIER and SSC_REFCLKSEL masks in refclk phy: tegra: xusb: reset VBUS & ID OVERRIDE usbnet: gl620a: fix endpoint checking in genelink_bind() perf/core: Fix low freq setting via IOC_PERIOD ftrace: Avoid potential division by zero in function_stat_show() x86/CPU: Fix warm boot hang regression on AMD SC1100 SoC systems net: mvpp2: cls: Fixed Non IP flow, with vlan tag flow defination. ipvs: Always clear ipvs_property flag in skb_scrub_packet() ASoC: es8328: fix route from DAC to output net: cadence: macb: Synchronize stats calculations net: loopback: Avoid sending IP packets without an Ethernet header sunrpc: suppress warnings for unused procfs functions batman-adv: Drop unmanaged ELP metric worker batman-adv: Ignore neighbor throughput metrics in error case acct: block access to kernel internal filesystems ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED nfp: bpf: Add check for nfp_app_ctrl_msg_alloc() tee: optee: Fix supplicant wait loop power: supply: da9150-fg: fix potential overflow flow_dissector: Fix port range key handling in BPF conversion flow_dissector: Fix handling of mixed port and port-range keys net: extract port range fields from fl_flow_key geneve: Suppress list corruption splat in geneve_destroy_tunnels(). gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). geneve: Fix use-after-free in geneve_find_dev(). powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC ALSA: hda/realtek: Fixup ALC225 depop procedure ALSA: hda/realtek - Add type for ALC287 powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline powerpc/64s/mm: Move __real_pte stubs into hash-4k.h USB: gadget: f_midi: f_midi_complete to call queue_work usb/gadget: f_midi: Replace tasklet with work usb/gadget: f_midi: convert tasklets to use new tasklet_setup() API usb: dwc3: Fix timeout issue during controller enter/exit from halt state usb: dwc3: Increase DWC3 controller halt timeout memcg: fix soft lockup in the OOM process mm: update mark_victim tracepoints fields crypto: testmgr - some more fixes to RSA test vectors crypto: testmgr - populate RSA CRT parameters in RSA test vectors crypto: testmgr - fix version number of RSA tests crypto: testmgr - Fix wrong test case of RSA crypto: testmgr - fix wrong key length for pkcs1pad driver core: bus: Fix double free in driver API bus_register() scsi: storvsc: Set correct data length for sending SCSI command without payload vlan: move dev_put into vlan_dev_uninit vlan: introduce vlan_dev_free_egress_priority ima: Fix use-after-free on a dentry's dname.name pps: Fix a use-after-free btrfs: avoid monopolizing a core when activating a swap file Revert "btrfs: avoid monopolizing a core when activating a swap file" x86/i8253: Disable PIT timer 0 when not in use parport_pc: add support for ASIX AX99100 serial: 8250_pci: add support for ASIX AX99100 can: ems_pci: move ASIX AX99100 ids to pci_ids.h nilfs2: protect access to buffers with no active references nilfs2: do not force clear folio if buffer is referenced nilfs2: do not output warnings when clearing dirty buffers alpha: replace hardcoded stack offsets with autogenerated ones ndisc: extend RCU protection in ndisc_send_skb() openvswitch: use RCU protection in ovs_vport_cmd_fill_info() arp: use RCU protection in arp_xmit() neighbour: use RCU protection in __neigh_notify() neighbour: delete redundant judgment statements ndisc: use RCU protection in ndisc_alloc_skb() ipv6: use RCU protection in ip6_default_advmss() ipv4: use RCU protection in inet_select_addr() ipv4: use RCU protection in rt_is_expired() net: add dev_net_rcu() helper net: treat possible_net_t net pointer as an RCU one and add read_pnet_rcu() regmap-irq: Add missing kfree() partitions: mac: fix handling of bogus partition table gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock alpha: align stack for page fault and user unaligned trap handlers serial: 8250: Fix fifo underflow on flush alpha: make stack 16-byte aligned (most cases) can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero can: c_can: fix unbalanced runtime PM disable in error path USB: serial: option: drop MeiG Smart defines USB: serial: option: fix Telit Cinterion FN990A name USB: serial: option: add Telit Cinterion FN990B compositions USB: serial: option: add MeiG Smart SLM828 usb: cdc-acm: Fix handling of oversized fragments usb: cdc-acm: Check control transfer buffer size before access USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk USB: hub: Ignore non-compliant devices with too many configs or interfaces usb: gadget: f_midi: fix MIDI Streaming descriptor lengths USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI usb: dwc2: gadget: remove of_node reference upon udc_stop usb: gadget: udc: renesas_usb3: Fix compiler warning usb: roles: set switch registered flag early on batman-adv: fix panic during interface removal ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V orangefs: fix a oob in orangefs_debug_write Grab mm lock before grabbing pt lock vfio/pci: Enable iowrite64 and ioread64 for vfio pci media: cxd2841er: fix 64-bit division on gcc-9 x86/xen: allow larger contiguous memory regions in PV guests xen: remove a confusing comment on auto-translated guest I/O gpio: bcm-kona: Add missing newline to dev_err format string gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0 arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array team: better TEAM_OPTION_TYPE_STRING validation vrf: use RCU protection in l3mdev_l3_out() ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu() HID: multitouch: Add NULL check in mt_input_configured ocfs2: check dir i_size in ocfs2_find_entry MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static ptp: Ensure info->enable callback is always set net/ncsi: wait for the last response to Deselect Package before configuring channel misc: fastrpc: Fix registered buffer page address mtd: onenand: Fix uninitialized retlen in do_otp_read() NFC: nci: Add bounds checking in nci_hci_create_pipe() nilfs2: fix possible int overflows in nilfs_fiemap() ocfs2: handle a symlink read error correctly ocfs2: fix incorrect CPU endianness conversion causing mount failure vfio/platform: check the bounds of read/write syscalls nvmem: core: improve range check for nvmem_cell_write() crypto: qce - unregister previously registered algos in error path crypto: qce - fix goto jump in error path media: uvcvideo: Remove redundant NULL assignment media: uvcvideo: Fix event flags in uvc_ctrl_send_events media: ov5640: fix get_light_freq on auto soc: qcom: smem_state: fix missing of_node_put in error path kbuild: Move -Wenum-enum-conversion to W=2 powerpc/pseries/eeh: Fix get PE state translation serial: sh-sci: Do not probe the serial port if its slot in sci_ports[] is in use serial: sh-sci: Drop __initdata macro for port_cfg soc: qcom: socinfo: Avoid out of bounds read of serial number usb: gadget: f_tcm: Don't prepare BOT write request twice usb: gadget: f_tcm: ep_autoconfig with fullspeed endpoint usb: gadget: f_tcm: Decrement command ref count on cleanup usb: gadget: f_tcm: Translate error to sense wifi: brcmfmac: fix NULL pointer dereference in brcmf_txfinalize() HID: hid-sensor-hub: don't use stale platform-data on remove of: reserved-memory: Fix using wrong number of cells to get property 'alignment' of: Fix of_find_node_opts_by_path() handling of alias+path+options of: Correct child specifier used as input of the 2nd nexus node perf bench: Fix undefined behavior in cmpworker() clk: qcom: clk-rpmh: prevent integer overflow in recalc_rate clk: qcom: clk-alpha-pll: fix alpha mode configuration Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc drm/komeda: Add check for komeda_get_layer_fourcc_list() KVM: s390: vsie: fix some corner-cases when grabbing vsie pages KVM: Explicitly verify target vCPU is online in kvm_get_vcpu() arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma binfmt_flat: Fix integer overflow bug on 32 bit systems m68k: vga: Fix I/O defines s390/futex: Fix FUTEX_OP_ANDN implementation leds: lp8860: Write full EEPROM, not only half of it cpufreq: s3c64xx: Fix compilation warning tun: revert fix group permission check netem: Update sch->q.qlen before qdisc_tree_reduce_backlog() net: rose: lock the socket in rose_bind() udp: gso: do not drop small packets when PMTU reduces tg3: Disable tg3 PCIe AER on system reboot gpu: drm_dp_cec: fix broken CEC adapter properties check firmware: iscsi_ibft: fix ISCSI_IBFT Kconfig entry nvme: handle connectivity loss in nvme_set_queue_count usb: xhci: Fix NULL pointer dereference on certain command aborts usb: xhci: Add timeout argument in address_device USB HCD callback net: usb: rtl8150: enable basic endpoint checking net: usb: rtl8150: use new tasklet API tasklet: Introduce new initialization API kbuild: userprogs: use correct lld when linking through clang sched: sch_cake: add bounds checks to host bulk flow fairness counts media: uvcvideo: Remove dangling pointers media: uvcvideo: Only save async fh if success nilfs2: handle errors that nilfs_prepare_chunk() may return nilfs2: eliminate staggered calls to kunmap in nilfs_rename nilfs2: move page release outside of nilfs_delete_entry and nilfs_set_link spi-mxs: Fix chipselect glitch x86/mm: Don't disable PCID when INVLPG has been fixed by microcode APEI: GHES: Have GHES honor the panic= setting HID: Wacom: Add PCI Wacom device support mfd: lpc_ich: Add another Gemini Lake ISA bridge PCI device-id tomoyo: don't emit warning in tomoyo_write_control() wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy() mmc: core: Respect quirk_max_rate for non-UHS SDIO card tun: fix group permission check printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX x86/amd_nb: Restrict init function to AMD-based systems sched: Don't try to catch up excess steal time. btrfs: convert BUG_ON in btrfs_reloc_cow_block() to proper error handling btrfs: fix use-after-free when attempting to join an aborted transaction btrfs: output the reason for open_ctree() failure usb: gadget: f_tcm: Don't free command immediately media: uvcvideo: Fix double free in error path HID: core: Fix assumption that Resolution Multipliers must be in Logical Collections usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE drivers/card_reader/rtsx_usb: Restore interrupt based detection ktest.pl: Check kernelrelease return in get_version NFSD: Reset cb_seq_status after NFS4ERR_DELAY hexagon: Fix unbalanced spinlock in die() hexagon: fix using plain integer as NULL pointer warning in cmpxchg genksyms: fix memory leak when the same symbol is read from *.symref file genksyms: fix memory leak when the same symbol is added from source net: sh_eth: Fix missing rtnl lock in suspend/resume path vsock: Allow retrying on connect() failure perf trace: Fix runtime error of index out of bounds net: davicom: fix UAF in dm9000_drv_remove net: rose: fix timer races against user threads PM: hibernate: Add error handling for syscore_suspend() ipmr: do not call mr_mfc_uses_dev() for unres entries net: fec: implement TSO descriptor cleanup ubifs: skip dumping tnc tree when zroot is null rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read dmaengine: ti: edma: fix OF node reference leaks in edma_driver module: Extend the preempt disabled section in dereference_symbol_descriptor(). ocfs2: mark dquot as inactive if failed to start trans while releasing dquot scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1 staging: media: imx: fix OF node leak in imx_media_add_of_subdevs() media: uvcvideo: Propagate buf->error to userspace media: camif-core: Add check for clk_enable() media: mipi-csis: Add check for clk_enable() PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy() media: lmedm04: Handle errors for lme2510_int_read media: lmedm04: Use GFP_KERNEL for URB allocation/submission. media: rc: iguanair: handle timeouts fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device() ARM: dts: mediatek: mt7623: fix IR nodename arm64: dts: mediatek: mt8173-evb: Fix MT6397 PMIC sub-node names arm64: dts: mediatek: mt8173-evb: Drop regulator-compatible property rdma/cxgb4: Prevent potential integer overflow on 32bit RDMA/mlx4: Avoid false error about access to uninitialized gids array bpf: Send signals asynchronously if !preemptible perf report: Fix misleading help message about --demangle perf top: Don't complain about lack of vmlinux when not resolving some kernel samples padata: fix sysfs store callback check ktest.pl: Remove unused declarations in run_bisect_test function perf header: Fix one memory leakage in process_bpf_prog_info() perf header: Fix one memory leakage in process_bpf_btf() ASoC: sun4i-spdif: Add clock multiplier settings tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind net: sched: Disallow replacing of child qdisc from one parent to another net/mlxfw: Drop hard coded max FW flash image size net: let net.core.dev_weight always be non-zero clk: analogbits: Fix incorrect calculation of vco rate delta selftests: harness: fix printing of mismatch values in __EXPECT() selftests/harness: Display signed values correctly wifi: wlcore: fix unbalanced pm_runtime calls regulator: of: Implement the unwind path of of_regulator_match() team: prevent adding a device which is already a team device lower cpupower: fix TSC MHz calculation wifi: rtlwifi: pci: wait for firmware loading before releasing memory wifi: rtlwifi: fix memory leaks and invalid access at probe error path wifi: rtlwifi: remove unused check_buddy_priv wifi: rtlwifi: remove unused dualmac control leftovers wifi: rtlwifi: remove unused timer and related code rtlwifi: replace usage of found with dedicated list iterator variable dt-bindings: mmc: controller: clarify the address-cells description wifi: rtlwifi: usb: fix workqueue leak when probe fails wifi: rtlwifi: rtl8192se: rise completion of firmware loading as last step rtlwifi: rtl8192se Rename RT_TRACE to rtl_dbg wifi: rtlwifi: do not complete firmware loading needlessly ipmi: ipmb: Add check devm_kasprintf() returned value drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table drm/etnaviv: Fix page property being used for non writecombine buffers partitions: ldm: remove the initial kernel-doc notation nbd: don't allow reconnect after disconnect afs: Fix directory format encoding struct overflow: Allow mixed type arguments overflow: Correct check_shl_overflow() comment overflow: Add __must_check attribute to check_*() helpers udf: Fix use of check_add_overflow() with mixed type arguments perf cs-etm: Add missing variable in cs_etm__process_queues() Change-Id: Idb78e73d0a58c75ddc8c83d972490208c0e6ce08
2 parents 2cb5a7a + 4a527b3 commit 19f173d

493 files changed

Lines changed: 5967 additions & 3245 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/admin-guide/mm/userfaultfd.rst

Lines changed: 81 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -63,50 +63,98 @@ the generic ioctl available.
6363

6464
The uffdio_api.features bitmask returned by the UFFDIO_API ioctl
6565
defines what memory types are supported by the userfaultfd and what
66-
events, except page fault notifications, may be generated.
67-
68-
If the kernel supports registering userfaultfd ranges on hugetlbfs
69-
virtual memory areas, UFFD_FEATURE_MISSING_HUGETLBFS will be set in
70-
uffdio_api.features. Similarly, UFFD_FEATURE_MISSING_SHMEM will be
71-
set if the kernel supports registering userfaultfd ranges on shared
72-
memory (covering all shmem APIs, i.e. tmpfs, IPCSHM, /dev/zero
73-
MAP_SHARED, memfd_create, etc).
74-
75-
The userland application that wants to use userfaultfd with hugetlbfs
76-
or shared memory need to set the corresponding flag in
77-
uffdio_api.features to enable those features.
78-
79-
If the userland desires to receive notifications for events other than
80-
page faults, it has to verify that uffdio_api.features has appropriate
81-
UFFD_FEATURE_EVENT_* bits set. These events are described in more
82-
detail below in "Non-cooperative userfaultfd" section.
83-
84-
Once the userfaultfd has been enabled the UFFDIO_REGISTER ioctl should
85-
be invoked (if present in the returned uffdio_api.ioctls bitmask) to
86-
register a memory range in the userfaultfd by setting the
66+
events, except page fault notifications, may be generated:
67+
68+
- The UFFD_FEATURE_EVENT_* flags indicate that various other events
69+
other than page faults are supported. These events are described in more
70+
detail below in the Non-cooperative userfaultfd section.
71+
72+
- UFFD_FEATURE_MISSING_HUGETLBFS and UFFD_FEATURE_MISSING_SHMEM
73+
indicate that the kernel supports UFFDIO_REGISTER_MODE_MISSING
74+
registrations for hugetlbfs and shared memory (covering all shmem APIs,
75+
i.e. tmpfs, IPCSHM, /dev/zero, MAP_SHARED, memfd_create,
76+
etc) virtual memory areas, respectively.
77+
78+
- UFFD_FEATURE_MINOR_HUGETLBFS indicates that the kernel supports
79+
UFFDIO_REGISTER_MODE_MINOR registration for hugetlbfs virtual memory
80+
areas. UFFD_FEATURE_MINOR_SHMEM is the analogous feature indicating
81+
support for shmem virtual memory areas.
82+
83+
The userland application should set the feature flags it intends to use
84+
when invoking the UFFDIO_API ioctl, to request that those features be
85+
enabled if supported.
86+
87+
Once the userfaultfd API has been enabled the UFFDIO_REGISTER
88+
ioctl should be invoked (if present in the returned uffdio_api.ioctls
89+
bitmask) to register a memory range in the userfaultfd by setting the
8790
uffdio_register structure accordingly. The uffdio_register.mode
8891
bitmask will specify to the kernel which kind of faults to track for
89-
the range (UFFDIO_REGISTER_MODE_MISSING would track missing
90-
pages). The UFFDIO_REGISTER ioctl will return the
92+
the range. The UFFDIO_REGISTER ioctl will return the
9193
uffdio_register.ioctls bitmask of ioctls that are suitable to resolve
9294
userfaults on the range registered. Not all ioctls will necessarily be
93-
supported for all memory types depending on the underlying virtual
94-
memory backend (anonymous memory vs tmpfs vs real filebacked
95-
mappings).
95+
supported for all memory types (e.g. anonymous memory vs. shmem vs.
96+
hugetlbfs), or all types of intercepted faults.
9697

9798
Userland can use the uffdio_register.ioctls to manage the virtual
9899
address space in the background (to add or potentially also remove
99100
memory from the userfaultfd registered range). This means a userfault
100101
could be triggering just before userland maps in the background the
101102
user-faulted page.
102103

103-
The primary ioctl to resolve userfaults is UFFDIO_COPY. That
104-
atomically copies a page into the userfault registered range and wakes
105-
up the blocked userfaults (unless uffdio_copy.mode &
106-
UFFDIO_COPY_MODE_DONTWAKE is set). Other ioctl works similarly to
107-
UFFDIO_COPY. They're atomic as in guaranteeing that nothing can see an
108-
half copied page since it'll keep userfaulting until the copy has
109-
finished.
104+
Resolving Userfaults
105+
--------------------
106+
107+
There are three basic ways to resolve userfaults:
108+
109+
- UFFDIO_COPY atomically copies some existing page contents from
110+
userspace.
111+
112+
- UFFDIO_ZEROPAGE atomically zeros the new page.
113+
114+
- UFFDIO_CONTINUE maps an existing, previously-populated page.
115+
116+
These operations are atomic in the sense that they guarantee nothing can
117+
see a half-populated page, since readers will keep userfaulting until the
118+
operation has finished.
119+
120+
By default, these wake up userfaults blocked on the range in question.
121+
They support a UFFDIO_*_MODE_DONTWAKE mode flag, which indicates
122+
that waking will be done separately at some later time.
123+
124+
Which ioctl to choose depends on the kind of page fault, and what we'd
125+
like to do to resolve it:
126+
127+
- For UFFDIO_REGISTER_MODE_MISSING faults, the fault needs to be
128+
resolved by either providing a new page (UFFDIO_COPY), or mapping
129+
the zero page (UFFDIO_ZEROPAGE). By default, the kernel would map
130+
the zero page for a missing fault. With userfaultfd, userspace can
131+
decide what content to provide before the faulting thread continues.
132+
133+
- For UFFDIO_REGISTER_MODE_MINOR faults, there is an existing page (in
134+
the page cache). Userspace has the option of modifying the page's
135+
contents before resolving the fault. Once the contents are correct
136+
(modified or not), userspace asks the kernel to map the page and let the
137+
faulting thread continue with UFFDIO_CONTINUE.
138+
139+
Notes:
140+
141+
- You can tell which kind of fault occurred by examining
142+
pagefault.flags within the uffd_msg, checking for the
143+
UFFD_PAGEFAULT_FLAG_* flags.
144+
145+
- None of the page-delivering ioctls default to the range that you
146+
registered with. You must fill in all fields for the appropriate
147+
ioctl struct including the range.
148+
149+
- You get the address of the access that triggered the missing page
150+
event out of a struct uffd_msg that you read in the thread from the
151+
uffd. You can supply as many pages as you want with these IOCTLs.
152+
Keep in mind that unless you used DONTWAKE then the first of any of
153+
those IOCTLs wakes up the faulting thread.
154+
155+
- Be sure to test for all errors including
156+
(pollfd[0].revents & POLLERR). This can happen, e.g. when ranges
157+
supplied were incorrect.
110158

111159
QEMU/KVM
112160
========

Documentation/timers/no_hz.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,8 @@ adaptive-tick CPUs: At least one non-adaptive-tick CPU must remain
129129
online to handle timekeeping tasks in order to ensure that system
130130
calls like gettimeofday() returns accurate values on adaptive-tick CPUs.
131131
(This is not an issue for CONFIG_NO_HZ_IDLE=y because there are no running
132-
user processes to observe slight drifts in clock rate.) Therefore, the
133-
boot CPU is prohibited from entering adaptive-ticks mode. Specifying a
134-
"nohz_full=" mask that includes the boot CPU will result in a boot-time
135-
error message, and the boot CPU will be removed from the mask. Note that
136-
this means that your system must have at least two CPUs in order for
132+
user processes to observe slight drifts in clock rate.) Note that this
133+
means that your system must have at least two CPUs in order for
137134
CONFIG_NO_HZ_FULL=y to do anything for you.
138135

139136
Finally, adaptive-ticks CPUs must have their RCU callbacks offloaded.

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 4
4-
SUBLEVEL = 290
4+
SUBLEVEL = 292
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

@@ -1138,6 +1138,11 @@ ifeq ($(CONFIG_RELR),y)
11381138
LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags
11391139
endif
11401140

1141+
# userspace programs are linked via the compiler, use the correct linker
1142+
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
1143+
KBUILD_USERLDFLAGS += $(call cc-option, --ld-path=$(LD))
1144+
endif
1145+
11411146
# make the checker run with the right architecture
11421147
CHECKFLAGS += --arch=$(ARCH)
11431148

arch/alpha/include/uapi/asm/ptrace.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ struct pt_regs {
4242
unsigned long trap_a0;
4343
unsigned long trap_a1;
4444
unsigned long trap_a2;
45+
/* This makes the stack 16-byte aligned as GCC expects */
46+
unsigned long __pad0;
4547
/* These are saved by PAL-code: */
4648
unsigned long ps;
4749
unsigned long pc;

arch/alpha/kernel/asm-offsets.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ void foo(void)
3232
DEFINE(CRED_EGID, offsetof(struct cred, egid));
3333
BLANK();
3434

35+
DEFINE(SP_OFF, offsetof(struct pt_regs, ps));
3536
DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
37+
DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack));
3638
DEFINE(PT_PTRACED, PT_PTRACED);
3739
DEFINE(CLONE_VM, CLONE_VM);
3840
DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);

arch/alpha/kernel/entry.S

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
.set noat
1616
.cfi_sections .debug_frame
1717

18-
/* Stack offsets. */
19-
#define SP_OFF 184
20-
#define SWITCH_STACK_SIZE 320
21-
2218
.macro CFI_START_OSF_FRAME func
2319
.align 4
2420
.globl \func
@@ -199,8 +195,8 @@ CFI_END_OSF_FRAME entArith
199195
CFI_START_OSF_FRAME entMM
200196
SAVE_ALL
201197
/* save $9 - $15 so the inline exception code can manipulate them. */
202-
subq $sp, 56, $sp
203-
.cfi_adjust_cfa_offset 56
198+
subq $sp, 64, $sp
199+
.cfi_adjust_cfa_offset 64
204200
stq $9, 0($sp)
205201
stq $10, 8($sp)
206202
stq $11, 16($sp)
@@ -215,7 +211,7 @@ CFI_START_OSF_FRAME entMM
215211
.cfi_rel_offset $13, 32
216212
.cfi_rel_offset $14, 40
217213
.cfi_rel_offset $15, 48
218-
addq $sp, 56, $19
214+
addq $sp, 64, $19
219215
/* handle the fault */
220216
lda $8, 0x3fff
221217
bic $sp, $8, $8
@@ -228,15 +224,15 @@ CFI_START_OSF_FRAME entMM
228224
ldq $13, 32($sp)
229225
ldq $14, 40($sp)
230226
ldq $15, 48($sp)
231-
addq $sp, 56, $sp
227+
addq $sp, 64, $sp
232228
.cfi_restore $9
233229
.cfi_restore $10
234230
.cfi_restore $11
235231
.cfi_restore $12
236232
.cfi_restore $13
237233
.cfi_restore $14
238234
.cfi_restore $15
239-
.cfi_adjust_cfa_offset -56
235+
.cfi_adjust_cfa_offset -64
240236
/* finish up the syscall as normal. */
241237
br ret_from_sys_call
242238
CFI_END_OSF_FRAME entMM
@@ -383,8 +379,8 @@ entUnaUser:
383379
.cfi_restore $0
384380
.cfi_adjust_cfa_offset -256
385381
SAVE_ALL /* setup normal kernel stack */
386-
lda $sp, -56($sp)
387-
.cfi_adjust_cfa_offset 56
382+
lda $sp, -64($sp)
383+
.cfi_adjust_cfa_offset 64
388384
stq $9, 0($sp)
389385
stq $10, 8($sp)
390386
stq $11, 16($sp)
@@ -400,7 +396,7 @@ entUnaUser:
400396
.cfi_rel_offset $14, 40
401397
.cfi_rel_offset $15, 48
402398
lda $8, 0x3fff
403-
addq $sp, 56, $19
399+
addq $sp, 64, $19
404400
bic $sp, $8, $8
405401
jsr $26, do_entUnaUser
406402
ldq $9, 0($sp)
@@ -410,15 +406,15 @@ entUnaUser:
410406
ldq $13, 32($sp)
411407
ldq $14, 40($sp)
412408
ldq $15, 48($sp)
413-
lda $sp, 56($sp)
409+
lda $sp, 64($sp)
414410
.cfi_restore $9
415411
.cfi_restore $10
416412
.cfi_restore $11
417413
.cfi_restore $12
418414
.cfi_restore $13
419415
.cfi_restore $14
420416
.cfi_restore $15
421-
.cfi_adjust_cfa_offset -56
417+
.cfi_adjust_cfa_offset -64
422418
br ret_from_sys_call
423419
CFI_END_OSF_FRAME entUna
424420

arch/alpha/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ s_reg_to_mem (unsigned long s_reg)
709709
static int unauser_reg_offsets[32] = {
710710
R(r0), R(r1), R(r2), R(r3), R(r4), R(r5), R(r6), R(r7), R(r8),
711711
/* r9 ... r15 are stored in front of regs. */
712-
-56, -48, -40, -32, -24, -16, -8,
712+
-64, -56, -48, -40, -32, -24, -16, /* padding at -8 */
713713
R(r16), R(r17), R(r18),
714714
R(r19), R(r20), R(r21), R(r22), R(r23), R(r24), R(r25), R(r26),
715715
R(r27), R(r28), R(gp),

arch/alpha/mm/fault.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ __load_new_mm_context(struct mm_struct *next_mm)
7777

7878
/* Macro for exception fixup code to access integer registers. */
7979
#define dpf_reg(r) \
80-
(((unsigned long *)regs)[(r) <= 8 ? (r) : (r) <= 15 ? (r)-16 : \
81-
(r) <= 18 ? (r)+10 : (r)-10])
80+
(((unsigned long *)regs)[(r) <= 8 ? (r) : (r) <= 15 ? (r)-17 : \
81+
(r) <= 18 ? (r)+11 : (r)-10])
8282

8383
asmlinkage void
8484
do_page_fault(unsigned long address, unsigned long mmcsr,
@@ -89,7 +89,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
8989
const struct exception_table_entry *fixup;
9090
int si_code = SEGV_MAPERR;
9191
vm_fault_t fault;
92-
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
92+
unsigned int flags = FAULT_FLAG_DEFAULT;
9393

9494
/* As of EV6, a load into $31/$f31 is a prefetch, and never faults
9595
(or is suppressed by the PALcode). Support that for older CPUs
@@ -150,7 +150,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
150150
the fault. */
151151
fault = handle_mm_fault(vma, address, flags);
152152

153-
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
153+
if (fault_signal_pending(fault, regs))
154154
return;
155155

156156
if (unlikely(fault & VM_FAULT_ERROR)) {
@@ -169,7 +169,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
169169
else
170170
current->min_flt++;
171171
if (fault & VM_FAULT_RETRY) {
172-
flags &= ~FAULT_FLAG_ALLOW_RETRY;
172+
flags |= FAULT_FLAG_TRIED;
173173

174174
/* No need to up_read(&mm->mmap_sem) as we would
175175
* have already released it in __lock_page_or_retry

arch/arc/mm/fault.c

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
9494
(regs->ecr_cause == ECR_C_PROTV_INST_FETCH))
9595
exec = 1;
9696

97-
flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
97+
flags = FAULT_FLAG_DEFAULT;
9898
if (user_mode(regs))
9999
flags |= FAULT_FLAG_USER;
100100
if (write)
@@ -127,29 +127,20 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
127127

128128
fault = handle_mm_fault(vma, address, flags);
129129

130+
/* Quick path to respond to signals */
131+
if (fault_signal_pending(fault, regs)) {
132+
if (!user_mode(regs))
133+
goto no_context;
134+
return;
135+
}
136+
130137
/*
131-
* Fault retry nuances
138+
* Fault retry nuances, mmap_sem already relinquished by core mm
132139
*/
133-
if (unlikely(fault & VM_FAULT_RETRY)) {
134-
135-
/*
136-
* If fault needs to be retried, handle any pending signals
137-
* first (by returning to user mode).
138-
* mmap_sem already relinquished by core mm for RETRY case
139-
*/
140-
if (fatal_signal_pending(current)) {
141-
if (!user_mode(regs))
142-
goto no_context;
143-
return;
144-
}
145-
/*
146-
* retry state machine
147-
*/
148-
if (flags & FAULT_FLAG_ALLOW_RETRY) {
149-
flags &= ~FAULT_FLAG_ALLOW_RETRY;
150-
flags |= FAULT_FLAG_TRIED;
151-
goto retry;
152-
}
140+
if (unlikely((fault & VM_FAULT_RETRY) &&
141+
(flags & FAULT_FLAG_ALLOW_RETRY))) {
142+
flags |= FAULT_FLAG_TRIED;
143+
goto retry;
153144
}
154145

155146
bad_area:

arch/arm/boot/dts/mt7623.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
clock-names = "spi", "wrap";
321321
};
322322

323-
cir: cir@10013000 {
323+
cir: ir-receiver@10013000 {
324324
compatible = "mediatek,mt7623-cir";
325325
reg = <0 0x10013000 0 0x1000>;
326326
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_LOW>;

0 commit comments

Comments
 (0)