1. 15 Dec, 2022 8 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8fa590bf
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "ARM64:
      
         - Enable the per-vcpu dirty-ring tracking mechanism, together with an
           option to keep the good old dirty log around for pages that are
           dirtied by something other than a vcpu.
      
         - Switch to the relaxed parallel fault handling, using RCU to delay
           page table reclaim and giving better performance under load.
      
         - Relax the MTE ABI, allowing a VMM to use the MAP_SHARED mapping
           option, which multi-process VMMs such as crosvm rely on (see merge
           commit 382b5b87: "Fix a number of issues with MTE, such as
           races on the tags being initialised vs the PG_mte_tagged flag as
           well as the lack of support for VM_SHARED when KVM is involved.
           Patches from Catalin Marinas and Peter Collingbourne").
      
         - Merge the pKVM shadow vcpu state tracking that allows the
           hypervisor to have its own view of a vcpu, keeping that state
           private.
      
         - Add support for the PMUv3p5 architecture revision, bringing support
           for 64bit counters on systems that support it, and fix the
           no-quite-compliant CHAIN-ed counter support for the machines that
           actually exist out there.
      
         - Fix a handful of minor issues around 52bit VA/PA support (64kB
           pages only) as a prefix of the oncoming support for 4kB and 16kB
           pages.
      
         - Pick a small set of documentation and spelling fixes, because no
           good merge window would be complete without those.
      
        s390:
      
         - Second batch of the lazy destroy patches
      
         - First batch of KVM changes for kernel virtual != physical address
           support
      
         - Removal of a unused function
      
        x86:
      
         - Allow compiling out SMM support
      
         - Cleanup and documentation of SMM state save area format
      
         - Preserve interrupt shadow in SMM state save area
      
         - Respond to generic signals during slow page faults
      
         - Fixes and optimizations for the non-executable huge page errata
           fix.
      
         - Reprogram all performance counters on PMU filter change
      
         - Cleanups to Hyper-V emulation and tests
      
         - Process Hyper-V TLB flushes from a nested guest (i.e. from a L2
           guest running on top of a L1 Hyper-V hypervisor)
      
         - Advertise several new Intel features
      
         - x86 Xen-for-KVM:
      
            - Allow the Xen runstate information to cross a page boundary
      
            - Allow XEN_RUNSTATE_UPDATE flag behaviour to be configured
      
            - Add support for 32-bit guests in SCHEDOP_poll
      
         - Notable x86 fixes and cleanups:
      
            - One-off fixes for various emulation flows (SGX, VMXON, NRIPS=0).
      
            - Reinstate IBPB on emulated VM-Exit that was incorrectly dropped
              a few years back when eliminating unnecessary barriers when
              switching between vmcs01 and vmcs02.
      
            - Clean up vmread_error_trampoline() to make it more obvious that
              params must be passed on the stack, even for x86-64.
      
            - Let userspace set all supported bits in MSR_IA32_FEAT_CTL
              irrespective of the current guest CPUID.
      
            - Fudge around a race with TSC refinement that results in KVM
              incorrectly thinking a guest needs TSC scaling when running on a
              CPU with a constant TSC, but no hardware-enumerated TSC
              frequency.
      
            - Advertise (on AMD) that the SMM_CTL MSR is not supported
      
            - Remove unnecessary exports
      
        Generic:
      
         - Support for responding to signals during page faults; introduces
           new FOLL_INTERRUPTIBLE flag that was reviewed by mm folks
      
        Selftests:
      
         - Fix an inverted check in the access tracking perf test, and restore
           support for asserting that there aren't too many idle pages when
           running on bare metal.
      
         - Fix build errors that occur in certain setups (unsure exactly what
           is unique about the problematic setup) due to glibc overriding
           static_assert() to a variant that requires a custom message.
      
         - Introduce actual atomics for clear/set_bit() in selftests
      
         - Add support for pinning vCPUs in dirty_log_perf_test.
      
         - Rename the so called "perf_util" framework to "memstress".
      
         - Add a lightweight psuedo RNG for guest use, and use it to randomize
           the access pattern and write vs. read percentage in the memstress
           tests.
      
         - Add a common ucall implementation; code dedup and pre-work for
           running SEV (and beyond) guests in selftests.
      
         - Provide a common constructor and arch hook, which will eventually
           be used by x86 to automatically select the right hypercall (AMD vs.
           Intel).
      
         - A bunch of added/enabled/fixed selftests for ARM64, covering
           memslots, breakpoints, stage-2 faults and access tracking.
      
         - x86-specific selftest changes:
      
            - Clean up x86's page table management.
      
            - Clean up and enhance the "smaller maxphyaddr" test, and add a
              related test to cover generic emulation failure.
      
            - Clean up the nEPT support checks.
      
            - Add X86_PROPERTY_* framework to retrieve multi-bit CPUID values.
      
            - Fix an ordering issue in the AMX test introduced by recent
              conversions to use kvm_cpu_has(), and harden the code to guard
              against similar bugs in the future. Anything that tiggers
              caching of KVM's supported CPUID, kvm_cpu_has() in this case,
              effectively hides opt-in XSAVE features if the caching occurs
              before the test opts in via prctl().
      
        Documentation:
      
         - Remove deleted ioctls from documentation
      
         - Clean up the docs for the x86 MSR filter.
      
         - Various fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (361 commits)
        KVM: x86: Add proper ReST tables for userspace MSR exits/flags
        KVM: selftests: Allocate ucall pool from MEM_REGION_DATA
        KVM: arm64: selftests: Align VA space allocator with TTBR0
        KVM: arm64: Fix benign bug with incorrect use of VA_BITS
        KVM: arm64: PMU: Fix period computation for 64bit counters with 32bit overflow
        KVM: x86: Advertise that the SMM_CTL MSR is not supported
        KVM: x86: remove unnecessary exports
        KVM: selftests: Fix spelling mistake "probabalistic" -> "probabilistic"
        tools: KVM: selftests: Convert clear/set_bit() to actual atomics
        tools: Drop "atomic_" prefix from atomic test_and_set_bit()
        tools: Drop conflicting non-atomic test_and_{clear,set}_bit() helpers
        KVM: selftests: Use non-atomic clear/set bit helpers in KVM tests
        perf tools: Use dedicated non-atomic clear/set bit helpers
        tools: Take @bit as an "unsigned long" in {clear,set}_bit() helpers
        KVM: arm64: selftests: Enable single-step without a "full" ucall()
        KVM: x86: fix APICv/x2AVIC disabled when vm reboot by itself
        KVM: Remove stale comment about KVM_REQ_UNHALT
        KVM: Add missing arch for KVM_CREATE_DEVICE and KVM_{SET,GET}_DEVICE_ATTR
        KVM: Reference to kvm_userspace_memory_region in doc and comments
        KVM: Delete all references to removed KVM_SET_MEMORY_ALIAS ioctl
        ...
      8fa590bf
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 057b40f4
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These fix an AML byte code execution issue in ACPICA and two issues in
        the ACPI EC driver which requires rearranging ACPICA code.
      
        Specifics:
      
         - Avoid trying to resolve operands in AML when there are none
           (Amadeusz Sławiński)
      
         - Fix indentation in include/acpi/acpixf.h to help applying patches
           from the upstream ACPICA git (Hans de Goede)
      
         - Make it possible to install an address space handler without
           evaluating _REG for Operation Regions in the given address space
           (Hans de Goede)
      
         - Defer the evaluation of _REG for ECDT described ECs till the
           matching EC device in the DSDT gets parsed and acpi_ec_add() gets
           called for it (Hans de Goede)
      
         - Fix EC address space handler unregistration (Hans de Goede)"
      
      * tag 'acpi-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: EC: Fix ECDT probe ordering issues
        ACPI: EC: Fix EC address space handler unregistration
        ACPICA: Allow address_space_handler Install and _REG execution as 2 separate steps
        ACPICA: include/acpi/acpixf.h: Fix indentation
        ACPICA: Fix operand resolution
      057b40f4
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 601c1aa8
      Linus Torvalds authored
      Pull more thermal control updates from Rafael Wysocki:
       "These are updates of assorted thermal drivers, mostly for ARM
        platforms, generally isolated and fairly straightforward, and the
        recent Intel HFI driver fix for systems without HFI support.
      
        Specifics:
      
         - Avoid clearing the HFI status bit on systems without HFI support
           which triggers unchecked MSR access errors (Srinivas Pandruvada)
      
         - Add sm8450 and sm8550 QCom compatible string to DT bindings (Luca
           Weiss, Neil Armstrong)
      
         - Use devm_platform_get_and_ioremap_resource on the ST platform to
           group two calls into a single one (Minghao Chi)
      
         - Use GENMASK instead of bitmaps and validate the temperature after
           reading it in the imx8mm_thermal driver (Marcus Folkesson)
      
         - Convert generic-adc-thermal to DT schema (Rob Herring)
      
         - Fix debug print message with inverted logic in the k3_j72xx_bandgap
           driver (Keerthy)
      
         - Fix memory leak on thermal_of_zone_register() failure (Ido
           Schimmel)
      
         - Add support for IPQ8074 in the tsens thermal driver along with the
           DT bindings (Robert Marko)
      
         - Fix and rework the debugfs code in the tsens driver (Christian
           Marangi)
      
         - Add calibration and DT documentation for the imx8mm driver (Marek
           Vasut)
      
         - Add DT bindings and compatible for the Mediatek SoCs mt7981 and
           mt7983 (Daniel Golle)
      
         - Don't show an error message if it happens at probe time while it
           will be deferred on the QCom SPMI ADC driver (Johan Hovold)
      
         - Add HWMon support for the imx8mm board (Alexander Stein)
      
         - Remove pointless include from the power allocator governor
           (Christophe JAILLET)
      
         - Add interrupt DT bindings for QCom SoCs SC8280XP, SM6350 and SM8450
           (Krzysztof Kozlowski)
      
         - Fix inaccurate warning message for the QCom tsens gen2 (Luca Weiss)
      
         - Demote error log of thermal zone register to debug in the tsens
           QCom driver (Manivannan Sadhasivam)
      
         - Consolidate the the efuse values and the errata handling in the TI
           Bandgap driver (Bryan Brattlof)
      
         - Document Renesas RZ/Five as compatible with RZ/G2UL in the DT
           bindings (Lad Prabhakar)
      
         - Fix the irq handler return value in the LMh driver (Bjorn
           Andersson)
      
         - Delete empty platform remove callback from imx_sc_thermal (Uwe
           Kleine-König)"
      
      * tag 'thermal-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (35 commits)
        thermal/drivers/imx_sc_thermal: Drop empty platform remove function
        thermal/drivers/qcom/lmh: Fix irq handler return value
        dt-bindings: thermal: qcom-tsens: Add compatible for sm8550
        thermal/drivers/st: Use devm_platform_get_and_ioremap_resource()
        dt-bindings: thermal: rzg2l-thermal: Document RZ/Five SoC
        dt-bindings: thermal: k3-j72xx: conditionally require efuse reg range
        dt-bindings: thermal: k3-j72xx: elaborate on binding description
        thermal/drivers/k3_j72xx_bandgap: Map fuse_base only for erratum workaround
        thermal/drivers/k3_j72xx_bandgap: Remove fuse_base from structure
        thermal/drivers/k3_j72xx_bandgap: Use bool for i2128 erratum flag
        thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function
        thermal/drivers/qcom: Demote error log of thermal zone register to debug
        thermal/drivers/qcom/temp-alarm: Fix inaccurate warning for gen2
        dt-bindings: thermal: qcom-tsens: narrow interrupts for SC8280XP, SM6350 and SM8450
        thermal/core/power allocator: Remove a useless include
        thermal/drivers/imx8mm: Add hwmon support
        thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
        dt-bindings: thermal: mediatek: add compatible string for MT7986 and MT7981 SoC
        thermal: ti-soc-thermal: Drop comma after SoC match table sentinel
        thermal/drivers/imx: Add support for loading calibration data from OCOTP
        ...
      601c1aa8
    • Linus Torvalds's avatar
      Merge tag 'gpio-updates-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · c0f234ff
      Linus Torvalds authored
      Pull gpio updates from Bartosz Golaszewski:
       "We have a new GPIO multiplexer driver, bunch of driver updates and
        refactoring in the core GPIO library.
      
        GPIO core:
         - teach gpiolib to work with software nodes for HW description
         - remove ARCH_NR_GPIOS treewide as we no longer impose any limit on
           the number of GPIOS since the allocation became entirely dynamic
         - add support for HW quirks for Cirrus CS42L56 codec, Marvell NFC
           controller, Freescale PCIe and Ethernet controller, Himax LCDs and
           Mediatek mt2701
         - refactor OF quirk code
         - some general refactoring of the OF and ACPI code, adding new
           helpers, minor tweaks and fixes, making fwnode usage consistent
           etc.
      
        GPIO uAPI:
         - fix an issue where the user-space can trigger a NULL-pointer
           dereference in the kernel by opening a device file, forcing a
           driver unbind and then calling one of the syscalls on the
           associated file descriptor
      
        New drivers:
         - add gpio-latch: a new GPIO multiplexer based on latches connected
           to other GPIOs
      
        Driver updates:
         - convert i2c GPIO expanders to using .probe_new()
         - drop the gpio-sta2x11 driver
         - factor out common code for the ACCES IDIO-16 family of controllers
           and use this new library wherever applicable in drivers
         - add DT support to gpio-hisi
         - allow building gpio-davinci as a module and increase its maxItems
           property
         - add support for a new model to gpio-pca9570
         - other minor changes to various drivers"
      
      * tag 'gpio-updates-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (66 commits)
        gpio: sim: set a limit on the number of GPIOs
        gpiolib: protect the GPIO device against being dropped while in use by user-space
        gpiolib: cdev: fix NULL-pointer dereferences
        gpiolib: Provide to_gpio_device() helper
        gpiolib: Unify access to the device properties
        gpio: Do not include <linux/kernel.h> when not really needed.
        gpio: pcf857x: Convert to i2c's .probe_new()
        gpio: pca953x: Convert to i2c's .probe_new()
        gpio: max732x: Convert to i2c's .probe_new()
        dt-bindings: gpio: gpio-davinci: Increase maxItems in gpio-line-names
        gpiolib: ensure that fwnode is properly set
        gpio: sl28cpld: Replace irqchip mask_invert with unmask_base
        gpiolib: of: Use correct fwnode for DT-probed chips
        gpiolib: of: Drop redundant check in of_mm_gpiochip_remove()
        gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode
        gpiolib: add support for software nodes
        gpiolib: consolidate GPIO lookups
        gpiolib: acpi: avoid leaking ACPI details into upper gpiolib layers
        gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes
        gpiolib: acpi: change acpi_find_gpio() to accept firmware node
        ...
      c0f234ff
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-ec' · 3d03140c
      Rafael J. Wysocki authored
      Merge additional ACPI EC driver fixes for 6.2-rc1:
      
       - Fix EC address space handler unregistration (Hans de Goede).
      
       - Defer the evaluation of _REG for ECDT described ECs till the matching
         EC device in the DSDT gets parsed and acpi_ec_add() gets called for
         it (Hans de Goede).
      
      * acpi-ec:
        ACPI: EC: Fix ECDT probe ordering issues
        ACPI: EC: Fix EC address space handler unregistration
      3d03140c
    • Linus Torvalds's avatar
      Merge tag 'fbdev-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev · 9fa4abc9
      Linus Torvalds authored
      Pull fbdev updates from Helge Deller:
       "The most relevant change are the patches from Dmitry Torokhov to
        switch omapfb to the gpiod API.
      
        The other patches are small and fix e.g. UML build issues, improve the
        error paths and cleanup code"
      
      * tag 'fbdev-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (32 commits)
        fbdev: fbcon: release buffer when fbcon_do_set_font() failed
        fbdev: sh_mobile_lcdcfb: use sysfs_emit() to instead of scnprintf()
        fbdev: uvesafb: use sysfs_emit() to instead of scnprintf()
        fbdev: uvesafb: Simplify uvesafb_remove()
        fbdev: uvesafb: Fixes an error handling path in uvesafb_probe()
        fbdev: uvesafb: don't build on UML
        fbdev: geode: don't build on UML
        fbdev: ep93xx-fb: Add missing clk_disable_unprepare in ep93xxfb_probe()
        fbdev: matroxfb: Convert to i2c's .probe_new()
        fbdev: da8xx-fb: add missing regulator_disable() in fb_probe
        fbdev: controlfb: fix spelling mistake "paramaters"->"parameters"
        fbdev: vermilion: decrease reference count in error path
        fbdev: smscufx: fix error handling code in ufx_usb_probe
        fbdev: via: Fix error in via_core_init()
        fbdev: pm2fb: fix missing pci_disable_device()
        fbdev: pxafb: Remove unnecessary print function dev_err()
        fbdev: omapfb: panel-sharp-ls037v7dw01: fix included headers
        fbdev: omapfb: panel-tpo-td028ttec1: stop including gpio.h
        fbdev: omapfb: panel-lgphilips-lb035q02: remove backlight GPIO handling
        fbdev: omapfb: encoder-opa362: fix included headers
        ...
      9fa4abc9
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · f7eae09b
      Rafael J. Wysocki authored
      Merge additional ACPICA changes for 6.2-rc1:
      
       - Avoid trying to resolve operands in AML when there are none (Amadeusz
         Sławiński).
      
       - Fix indentation in include/acpi/acpixf.h to help applying patches
         from the upstream ACPICA git (Hans de Goede).
      
       - Make it possible to install an address space handler without
         evaluating _REG for Operation Regions in the given address space (Hans
         de Goede).
      
      * acpica:
        ACPICA: Allow address_space_handler Install and _REG execution as 2 separate steps
        ACPICA: include/acpi/acpixf.h: Fix indentation
        ACPICA: Fix operand resolution
      f7eae09b
    • Linus Torvalds's avatar
      Merge tag '6.2-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd · 504a73d4
      Linus Torvalds authored
      Pull ksmbd updates from Steve French:
       "Six ksmbd server fixes"
      
      * tag '6.2-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: Convert to use sysfs_emit()/sysfs_emit_at() APIs
        ksmbd: Fix resource leak in smb2_lock()
        ksmbd: Fix resource leak in ksmbd_session_rpc_open()
        ksmbd: replace one-element arrays with flexible-array members
        ksmbd: use F_SETLK when unlocking a file
        ksmbd: set SMB2_SESSION_FLAG_ENCRYPT_DATA when enforcing data encryption for this share
      504a73d4
  2. 14 Dec, 2022 32 commits
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 041fae9c
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this round, we've added two features: F2FS_IOC_START_ATOMIC_REPLACE
        and a per-block age-based extent cache.
      
        F2FS_IOC_START_ATOMIC_REPLACE is a variant of the previous atomic
        write feature which guarantees a per-file atomicity. It would be more
        efficient than AtomicFile implementation in Android framework.
      
        The per-block age-based extent cache implements another type of extent
        cache in memory which keeps the per-block age in a file, so that block
        allocator could split the hot and cold data blocks more accurately.
      
        Enhancements:
         - introduce F2FS_IOC_START_ATOMIC_REPLACE
         - refactor extent_cache to add a new per-block-age-based extent cache support
         - introduce discard_urgent_util, gc_mode, max_ordered_discard sysfs knobs
         - add proc entry to show discard_plist info
         - optimize iteration over sparse directories
         - add barrier mount option
      
        Bug fixes:
         - avoid victim selection from previous victim section
         - fix to enable compress for newly created file if extension matches
         - set zstd compress level correctly
         - initialize locks early in f2fs_fill_super() to fix bugs reported by syzbot
         - correct i_size change for atomic writes
         - allow to read node block after shutdown
         - allow to set compression for inlined file
         - fix gc mode when gc_urgent_high_remaining is 1
         - should put a page when checking the summary info
      
        Minor fixes and various clean-ups in GC, discard, debugfs, sysfs, and
        doc"
      
      * tag 'f2fs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (63 commits)
        f2fs: reset wait_ms to default if any of the victims have been selected
        f2fs: fix some format WARNING in debug.c and sysfs.c
        f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super()
        f2fs: fix iostat parameter for discard
        f2fs: Fix spelling mistake in label: free_bio_enrty_cache -> free_bio_entry_cache
        f2fs: add block_age-based extent cache
        f2fs: allocate the extent_cache by default
        f2fs: refactor extent_cache to support for read and more
        f2fs: remove unnecessary __init_extent_tree
        f2fs: move internal functions into extent_cache.c
        f2fs: specify extent cache for read explicitly
        f2fs: introduce f2fs_is_readonly() for readability
        f2fs: remove F2FS_SET_FEATURE() and F2FS_CLEAR_FEATURE() macro
        f2fs: do some cleanup for f2fs module init
        MAINTAINERS: Add f2fs bug tracker link
        f2fs: remove the unused flush argument to change_curseg
        f2fs: open code allocate_segment_by_default
        f2fs: remove struct segment_allocation default_salloc_ops
        f2fs: introduce discard_urgent_util sysfs node
        f2fs: define MIN_DISCARD_GRANULARITY macro
        ...
      041fae9c
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.2-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · eb67d239
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
      
       - Support for the T-Head PMU via the perf subsystem
      
       - ftrace support for rv32
      
       - Support for non-volatile memory devices
      
       - Various fixes and cleanups
      
      * tag 'riscv-for-linus-6.2-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (52 commits)
        Documentation: RISC-V: patch-acceptance: s/implementor/implementer
        Documentation: RISC-V: Mention the UEFI Standards
        Documentation: RISC-V: Allow patches for non-standard behavior
        Documentation: RISC-V: Fix a typo in patch-acceptance
        riscv: Fixup compile error with !MMU
        riscv: Fix P4D_SHIFT definition for 3-level page table mode
        riscv: Apply a static assert to riscv_isa_ext_id
        RISC-V: Add some comments about the shadow and overflow stacks
        RISC-V: Align the shadow stack
        RISC-V: Ensure Zicbom has a valid block size
        RISC-V: Introduce riscv_isa_extension_check
        RISC-V: Improve use of isa2hwcap[]
        riscv: Don't duplicate _ALTERNATIVE_CFG* macros
        riscv: alternatives: Drop the underscores from the assembly macro names
        riscv: alternatives: Don't name unused macro parameters
        riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2
        riscv: mm: call best_map_size many times during linear-mapping
        riscv: Move cast inside kernel_mapping_[pv]a_to_[vp]a
        riscv: Fix crash during early errata patching
        riscv: boot: add zstd support
        ...
      eb67d239
    • Linus Torvalds's avatar
      Merge tag 'x86_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 94a85511
      Linus Torvalds authored
      Pull x86 core updates from Borislav Petkov:
      
       - Add the call depth tracking mitigation for Retbleed which has been
         long in the making. It is a lighterweight software-only fix for
         Skylake-based cores where enabling IBRS is a big hammer and causes a
         significant performance impact.
      
         What it basically does is, it aligns all kernel functions to 16 bytes
         boundary and adds a 16-byte padding before the function, objtool
         collects all functions' locations and when the mitigation gets
         applied, it patches a call accounting thunk which is used to track
         the call depth of the stack at any time.
      
         When that call depth reaches a magical, microarchitecture-specific
         value for the Return Stack Buffer, the code stuffs that RSB and
         avoids its underflow which could otherwise lead to the Intel variant
         of Retbleed.
      
         This software-only solution brings a lot of the lost performance
         back, as benchmarks suggest:
      
             https://lore.kernel.org/all/20220915111039.092790446@infradead.org/
      
         That page above also contains a lot more detailed explanation of the
         whole mechanism
      
       - Implement a new control flow integrity scheme called FineIBT which is
         based on the software kCFI implementation and uses hardware IBT
         support where present to annotate and track indirect branches using a
         hash to validate them
      
       - Other misc fixes and cleanups
      
      * tag 'x86_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (80 commits)
        x86/paravirt: Use common macro for creating simple asm paravirt functions
        x86/paravirt: Remove clobber bitmask from .parainstructions
        x86/debug: Include percpu.h in debugreg.h to get DECLARE_PER_CPU() et al
        x86/cpufeatures: Move X86_FEATURE_CALL_DEPTH from bit 18 to bit 19 of word 11, to leave space for WIP X86_FEATURE_SGX_EDECCSSA bit
        x86/Kconfig: Enable kernel IBT by default
        x86,pm: Force out-of-line memcpy()
        objtool: Fix weak hole vs prefix symbol
        objtool: Optimize elf_dirty_reloc_sym()
        x86/cfi: Add boot time hash randomization
        x86/cfi: Boot time selection of CFI scheme
        x86/ibt: Implement FineIBT
        objtool: Add --cfi to generate the .cfi_sites section
        x86: Add prefix symbols for function padding
        objtool: Add option to generate prefix symbols
        objtool: Avoid O(bloody terrible) behaviour -- an ode to libelf
        objtool: Slice up elf_create_section_symbol()
        kallsyms: Revert "Take callthunks into account"
        x86: Unconfuse CONFIG_ and X86_FEATURE_ namespaces
        x86/retpoline: Fix crash printing warning
        x86/paravirt: Fix a !PARAVIRT build warning
        ...
      94a85511
    • Linus Torvalds's avatar
      Merge tag 'apparmor-pr-2022-12-14' of... · 93761c93
      Linus Torvalds authored
      Merge tag 'apparmor-pr-2022-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
      
      Pull apparmor updates from John Johansen:
       "Features:
         - switch to zstd compression for profile raw data
      
        Cleanups:
         - simplify obtaining the newest label on a cred
         - remove useless static inline functions
         - compute permission conversion on policy unpack
         - refactor code to share common permissins
         - refactor unpack to group policy backwards compatiblity code
         - add __init annotation to aa_{setup/teardown}_dfa_engine()
      
        Bug Fixes:
         - fix a memleak in
             - multi_transaction_new()
             - free_ruleset()
             - unpack_profile()
             - alloc_ns()
         - fix lockdep warning when removing a namespace
         - fix regression in stacking due to label flags
         - fix loading of child before parent
         - fix kernel-doc comments that differ from fns
         - fix spelling errors in comments
         - store return value of unpack_perms_table() to signed variable"
      
      * tag 'apparmor-pr-2022-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: (64 commits)
        apparmor: Fix uninitialized symbol 'array_size' in policy_unpack_test.c
        apparmor: Add __init annotation to aa_{setup/teardown}_dfa_engine()
        apparmor: Fix memleak in alloc_ns()
        apparmor: Fix memleak issue in unpack_profile()
        apparmor: fix a memleak in free_ruleset()
        apparmor: Fix spelling of function name in comment block
        apparmor: Use pointer to struct aa_label for lbs_cred
        AppArmor: Fix kernel-doc
        LSM: Fix kernel-doc
        AppArmor: Fix kernel-doc
        apparmor: Fix loading of child before parent
        apparmor: refactor code that alloc null profiles
        apparmor: fix obsoleted comments for aa_getprocattr() and audit_resource()
        apparmor: remove useless static inline functions
        apparmor: Fix unpack_profile() warn: passing zero to 'ERR_PTR'
        apparmor: fix uninitialize table variable in error in unpack_trans_table
        apparmor: store return value of unpack_perms_table() to signed variable
        apparmor: Fix kunit test for out of bounds array
        apparmor: Fix decompression of rawdata for read back to userspace
        apparmor: Fix undefined references to zstd_ symbols
        ...
      93761c93
    • Linus Torvalds's avatar
      Merge tag 'v6.2-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 64e7003c
      Linus Torvalds authored
      Pull crypto updates from Herbert Xu:
       "API:
         - Optimise away self-test overhead when they are disabled
         - Support symmetric encryption via keyring keys in af_alg
         - Flip hwrng default_quality, the default is now maximum entropy
      
        Algorithms:
         - Add library version of aesgcm
         - CFI fixes for assembly code
         - Add arm/arm64 accelerated versions of sm3/sm4
      
        Drivers:
         - Remove assumption on arm64 that kmalloc is DMA-aligned
         - Fix selftest failures in rockchip
         - Add support for RK3328/RK3399 in rockchip
         - Add deflate support in qat
         - Merge ux500 into stm32
         - Add support for TEE for PCI ID 0x14CA in ccp
         - Add mt7986 support in mtk
         - Add MaxLinear platform support in inside-secure
         - Add NPCM8XX support in npcm"
      
      * tag 'v6.2-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (184 commits)
        crypto: ux500/cryp - delete driver
        crypto: stm32/cryp - enable for use with Ux500
        crypto: stm32 - enable drivers to be used on Ux500
        dt-bindings: crypto: Let STM32 define Ux500 CRYP
        hwrng: geode - Fix PCI device refcount leak
        hwrng: amd - Fix PCI device refcount leak
        crypto: qce - Set DMA alignment explicitly
        crypto: octeontx2 - Set DMA alignment explicitly
        crypto: octeontx - Set DMA alignment explicitly
        crypto: keembay - Set DMA alignment explicitly
        crypto: safexcel - Set DMA alignment explicitly
        crypto: hisilicon/hpre - Set DMA alignment explicitly
        crypto: chelsio - Set DMA alignment explicitly
        crypto: ccree - Set DMA alignment explicitly
        crypto: ccp - Set DMA alignment explicitly
        crypto: cavium - Set DMA alignment explicitly
        crypto: img-hash - Fix variable dereferenced before check 'hdev->req'
        crypto: arm64/ghash-ce - use frame_push/pop macros consistently
        crypto: arm64/crct10dif - use frame_push/pop macros consistently
        crypto: arm64/aes-modes - use frame_push/pop macros consistently
        ...
      64e7003c
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 48ea09cd
      Linus Torvalds authored
      Pull kernel hardening updates from Kees Cook:
      
       - Convert flexible array members, fix -Wstringop-overflow warnings, and
         fix KCFI function type mismatches that went ignored by maintainers
         (Gustavo A. R. Silva, Nathan Chancellor, Kees Cook)
      
       - Remove the remaining side-effect users of ksize() by converting
         dma-buf, btrfs, and coredump to using kmalloc_size_roundup(), add
         more __alloc_size attributes, and introduce full testing of all
         allocator functions. Finally remove the ksize() side-effect so that
         each allocation-aware checker can finally behave without exceptions
      
       - Introduce oops_limit (default 10,000) and warn_limit (default off) to
         provide greater granularity of control for panic_on_oops and
         panic_on_warn (Jann Horn, Kees Cook)
      
       - Introduce overflows_type() and castable_to_type() helpers for cleaner
         overflow checking
      
       - Improve code generation for strscpy() and update str*() kern-doc
      
       - Convert strscpy and sigphash tests to KUnit, and expand memcpy tests
      
       - Always use a non-NULL argument for prepare_kernel_cred()
      
       - Disable structleak plugin in FORTIFY KUnit test (Anders Roxell)
      
       - Adjust orphan linker section checking to respect CONFIG_WERROR (Xin
         Li)
      
       - Make sure siginfo is cleared for forced SIGKILL (haifeng.xu)
      
       - Fix um vs FORTIFY warnings for always-NULL arguments
      
      * tag 'hardening-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (31 commits)
        ksmbd: replace one-element arrays with flexible-array members
        hpet: Replace one-element array with flexible-array member
        um: virt-pci: Avoid GCC non-NULL warning
        signal: Initialize the info in ksignal
        lib: fortify_kunit: build without structleak plugin
        panic: Expose "warn_count" to sysfs
        panic: Introduce warn_limit
        panic: Consolidate open-coded panic_on_warn checks
        exit: Allow oops_limit to be disabled
        exit: Expose "oops_count" to sysfs
        exit: Put an upper limit on how often we can oops
        panic: Separate sysctl logic from CONFIG_SMP
        mm/pgtable: Fix multiple -Wstringop-overflow warnings
        mm: Make ksize() a reporting-only function
        kunit/fortify: Validate __alloc_size attribute results
        drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()
        drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid()
        driver core: Add __alloc_size hint to devm allocators
        overflow: Introduce overflows_type() and castable_to_type()
        coredump: Proactively round up to kmalloc bucket size
        ...
      48ea09cd
    • Linus Torvalds's avatar
      Merge tag 'memblock-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock · ad76bf1f
      Linus Torvalds authored
      Pull memblock updates from Mike Rapoport:
       "Extend test coverage:
      
         - add tests that trigger reallocation of memblock structures from
           memblock itself via memblock_double_array()
      
         - add tests for memblock_alloc_exact_nid_raw() that verify that
           requested node and memory range constraints are respected"
      
      * tag 'memblock-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
        memblock tests: remove completed TODO item
        memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_raw
        memblock tests: add bottom-up NUMA tests for memblock_alloc_exact_nid_raw
        memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_raw
        memblock tests: introduce range tests for memblock_alloc_exact_nid_raw
        memblock test: Update TODO list
        memblock test: Add test to memblock_reserve() 129th region
        memblock test: Add test to memblock_add() 129th region
      ad76bf1f
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.2-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · 6f1f5cae
      Linus Torvalds authored
      Pull orangefs updates from Mike Marshall:
      
       - fix problems with memory leaks on exit in sysfs and debufs (Zhang)
      
       - remove an unused variable and an unneeded assignment (Colin)
      
      * tag 'for-linus-6.2-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: Fix kmemleak in orangefs_{kernel,client}_debug_init()
        orangefs: Fix kmemleak in orangefs_sysfs_init()
        orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string()
        orangefs: Fix sysfs not cleanup when dev init failed
        orangefs: remove redundant assignment to variable buffer_index
        orangefs: remove variable i
      6f1f5cae
    • Tetsuo Handa's avatar
      fbdev: fbcon: release buffer when fbcon_do_set_font() failed · 3c3bfb85
      Tetsuo Handa authored
      syzbot is reporting memory leak at fbcon_do_set_font() [1], for
      commit a5a92303 ("fbdev: fbcon: Properly revert changes when
      vc_resize() failed") missed that the buffer might be newly allocated
      by fbcon_set_font().
      
      Link: https://syzkaller.appspot.com/bug?extid=25bdb7b1703639abd498 [1]
      Reported-by: default avatarsyzbot <syzbot+25bdb7b1703639abd498@syzkaller.appspotmail.com>
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Tested-by: default avatarsyzbot <syzbot+25bdb7b1703639abd498@syzkaller.appspotmail.com>
      Fixes: a5a92303 ("fbdev: fbcon: Properly revert changes when vc_resize() failed")
      CC: stable@vger.kernel.org # 5.15+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      3c3bfb85
    • ye xingchen's avatar
      fbdev: sh_mobile_lcdcfb: use sysfs_emit() to instead of scnprintf() · b20a558d
      ye xingchen authored
      Follow the advice of the Documentation/filesystems/sysfs.rst and show()
      should only use sysfs_emit() or sysfs_emit_at() when formatting the
      value to be returned to user space.
      Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      b20a558d
    • ye xingchen's avatar
      fbdev: uvesafb: use sysfs_emit() to instead of scnprintf() · 522d5226
      ye xingchen authored
      Follow the advice of the Documentation/filesystems/sysfs.rst and show()
      should only use sysfs_emit() or sysfs_emit_at() when formatting the
      value to be returned to user space.
      Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      522d5226
    • Christophe JAILLET's avatar
      fbdev: uvesafb: Simplify uvesafb_remove() · f2ff0c43
      Christophe JAILLET authored
      When the remove() function is called, we know that the probe() function has
      successfully been executed. So 'info' is known to be not NULL.
      
      Simplify the code accordingly.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      f2ff0c43
    • Christophe JAILLET's avatar
      fbdev: uvesafb: Fixes an error handling path in uvesafb_probe() · a9437104
      Christophe JAILLET authored
      If an error occurs after a successful uvesafb_init_mtrr() call, it must be
      undone by a corresponding arch_phys_wc_del() call, as already done in the
      remove function.
      
      This has been added in the remove function in commit 63e28a7a
      ("uvesafb: Clean up MTRR code")
      
      Fixes: 8bdb3a2d ("uvesafb: the driver core")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      a9437104
    • Randy Dunlap's avatar
      fbdev: uvesafb: don't build on UML · 35b4f4d4
      Randy Dunlap authored
      The uvesafb fbdev driver uses memory management information that is not
      available on ARCH=um, so don't allow this driver to be built on UML.
      
      Prevents these build errors:
      
      ../drivers/video/fbdev/uvesafb.c: In function ‘uvesafb_vbe_init’:
      ../drivers/video/fbdev/uvesafb.c:807:21: error: ‘__supported_pte_mask’ undeclared (first use in this function)
        807 |                 if (__supported_pte_mask & _PAGE_NX) {
      ../drivers/video/fbdev/uvesafb.c:807:44: error: ‘_PAGE_NX’ undeclared (first use in this function)
        807 |                 if (__supported_pte_mask & _PAGE_NX) {
      
      Fixes: 68f5d3f3 ("um: add PCI over virtio emulation driver")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: linux-um@lists.infradead.org
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: Michal Januszewski <spock@gentoo.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      35b4f4d4
    • Randy Dunlap's avatar
      fbdev: geode: don't build on UML · 71c53e19
      Randy Dunlap authored
      The geode fbdev driver uses struct cpuinfo fields that are not present
      on ARCH=um, so don't allow this driver to be built on UML.
      
      Prevents these build errors:
      
      In file included from ../arch/x86/include/asm/olpc.h:7:0,
                       from ../drivers/mfd/cs5535-mfd.c:17:
      ../arch/x86/include/asm/geode.h: In function ‘is_geode_gx’:
      ../arch/x86/include/asm/geode.h:16:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
        return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
      ../arch/x86/include/asm/geode.h:16:39: error: ‘X86_VENDOR_NSC’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
        return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
      ../arch/x86/include/asm/geode.h:17:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’
         (boot_cpu_data.x86 == 5) &&
      ../arch/x86/include/asm/geode.h:18:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
         (boot_cpu_data.x86_model == 5));
      ../arch/x86/include/asm/geode.h: In function ‘is_geode_lx’:
      ../arch/x86/include/asm/geode.h:23:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
        return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
      ../arch/x86/include/asm/geode.h:23:39: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
        return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
      ../arch/x86/include/asm/geode.h:24:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’
         (boot_cpu_data.x86 == 5) &&
      ../arch/x86/include/asm/geode.h:25:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
         (boot_cpu_data.x86_model == 10));
      
      Fixes: 68f5d3f3 ("um: add PCI over virtio emulation driver")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: linux-um@lists.infradead.org
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: Andres Salomon <dilinger@queued.net>
      Cc: linux-geode@lists.infradead.org
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      71c53e19
    • Gaosheng Cui's avatar
      fbdev: ep93xx-fb: Add missing clk_disable_unprepare in ep93xxfb_probe() · c84bf485
      Gaosheng Cui authored
      The clk_disable_unprepare() should be called in the error handling
      of register_framebuffer(), fix it.
      
      Fixes: 0937a7b3 ("video: ep93xx: Prepare clock before using it")
      Signed-off-by: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      c84bf485
    • Uwe Kleine-König's avatar
      fbdev: matroxfb: Convert to i2c's .probe_new() · 30747423
      Uwe Kleine-König authored
      The probe function doesn't make use of the i2c_device_id * parameter so it
      can be trivially converted.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      30747423
    • Dongliang Mu's avatar
      fbdev: da8xx-fb: add missing regulator_disable() in fb_probe · cd53860e
      Dongliang Mu authored
      The error handling code in fb_probe misses regulator_disable if
      regulator_enable is called successfully. The previous commit only
      adds regulator_disable in the .remove(), forgetting the error
      handling code in the .probe.
      
      Fix this by adding a new error label to call regulator_disable.
      
      Fixes: 611097d5("fbdev: da8xx: add support for a regulator")
      Signed-off-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      cd53860e
    • Yu Zhe's avatar
      fbdev: controlfb: fix spelling mistake "paramaters"->"parameters" · ff61582e
      Yu Zhe authored
      There is a spelling mistake in comment. Fix it.
      Signed-off-by: default avatarYu Zhe <yuzhe@nfschina.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ff61582e
    • Xiongfeng Wang's avatar
      fbdev: vermilion: decrease reference count in error path · 001f2cdb
      Xiongfeng Wang authored
      pci_get_device() will increase the reference count for the returned
      pci_dev. For the error path, we need to use pci_dev_put() to decrease
      the reference count.
      
      Fixes: dbe7e429 ("vmlfb: framebuffer driver for Intel Vermilion Range")
      Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      001f2cdb
    • Dongliang Mu's avatar
      fbdev: smscufx: fix error handling code in ufx_usb_probe · b76449ee
      Dongliang Mu authored
      The current error handling code in ufx_usb_probe have many unmatching
      issues, e.g., missing ufx_free_usb_list, destroy_modedb label should
      only include framebuffer_release, fb_dealloc_cmap only matches
      fb_alloc_cmap.
      
      My local syzkaller reports a memory leak bug:
      
      memory leak in ufx_usb_probe
      
      BUG: memory leak
      unreferenced object 0xffff88802f879580 (size 128):
        comm "kworker/0:7", pid 17416, jiffies 4295067474 (age 46.710s)
        hex dump (first 32 bytes):
          80 21 7c 2e 80 88 ff ff 18 d0 d0 0c 80 88 ff ff  .!|.............
          00 d0 d0 0c 80 88 ff ff e0 ff ff ff 0f 00 00 00  ................
        backtrace:
          [<ffffffff814c99a0>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045
          [<ffffffff824d219c>] kmalloc include/linux/slab.h:553 [inline]
          [<ffffffff824d219c>] kzalloc include/linux/slab.h:689 [inline]
          [<ffffffff824d219c>] ufx_alloc_urb_list drivers/video/fbdev/smscufx.c:1873 [inline]
          [<ffffffff824d219c>] ufx_usb_probe+0x11c/0x15a0 drivers/video/fbdev/smscufx.c:1655
          [<ffffffff82d17927>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
          [<ffffffff82712f0d>] call_driver_probe drivers/base/dd.c:560 [inline]
          [<ffffffff82712f0d>] really_probe+0x12d/0x390 drivers/base/dd.c:639
          [<ffffffff8271322f>] __driver_probe_device+0xbf/0x140 drivers/base/dd.c:778
          [<ffffffff827132da>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:808
          [<ffffffff82713c27>] __device_attach_driver+0xf7/0x150 drivers/base/dd.c:936
          [<ffffffff82710137>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427
          [<ffffffff827136b5>] __device_attach+0x105/0x2d0 drivers/base/dd.c:1008
          [<ffffffff82711d36>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487
          [<ffffffff8270e242>] device_add+0x642/0xdc0 drivers/base/core.c:3517
          [<ffffffff82d14d5f>] usb_set_configuration+0x8ef/0xb80 drivers/usb/core/message.c:2170
          [<ffffffff82d2576c>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238
          [<ffffffff82d16ffc>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293
          [<ffffffff82712f0d>] call_driver_probe drivers/base/dd.c:560 [inline]
          [<ffffffff82712f0d>] really_probe+0x12d/0x390 drivers/base/dd.c:639
          [<ffffffff8271322f>] __driver_probe_device+0xbf/0x140 drivers/base/dd.c:778
      
      Fix this bug by rewriting the error handling code in ufx_usb_probe.
      Reported-by: default avatarsyzkaller <syzkaller@googlegroups.com>
      Tested-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
      Signed-off-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      b76449ee
    • Shang XiaoJing's avatar
      fbdev: via: Fix error in via_core_init() · 5886b130
      Shang XiaoJing authored
      via_core_init() won't exit the driver when pci_register_driver() failed.
      Exit the viafb-i2c and the viafb-gpio in failed path to prevent error.
      
      VIA Graphics Integration Chipset framebuffer 2.4 initializing
      Error: Driver 'viafb-i2c' is already registered, aborting...
      Error: Driver 'viafb-gpio' is already registered, aborting...
      
      Fixes: 7582eb9b ("viafb: Turn GPIO and i2c into proper platform devices")
      Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      5886b130
    • Yang Yingliang's avatar
      fbdev: pm2fb: fix missing pci_disable_device() · ed359a46
      Yang Yingliang authored
      Add missing pci_disable_device() in error path of probe() and remove() path.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ed359a46
    • wangkailong@jari.cn's avatar
      fbdev: pxafb: Remove unnecessary print function dev_err() · eceadc92
      wangkailong@jari.cn authored
      Eliminate the follow coccicheck warning:
      
      ./drivers/video/fbdev/pxafb.c:2330:2-9: line 2330 is redundant because
      platform_get_irq() already prints an error
      Signed-off-by: default avatarKaiLong Wang <wangkailong@jari.cn>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      eceadc92
    • Dmitry Torokhov's avatar
      fbdev: omapfb: panel-sharp-ls037v7dw01: fix included headers · 23910a20
      Dmitry Torokhov authored
      The driver is using gpiod API so it should include gpio/consumer.h and
      not gpio.gh or of_gpio.h.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      23910a20
    • Dmitry Torokhov's avatar
      fbdev: omapfb: panel-tpo-td028ttec1: stop including gpio.h · 275a8558
      Dmitry Torokhov authored
      The driver does not use gpios, so there is no need to include gpio.h.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      275a8558
    • Dmitry Torokhov's avatar
      fbdev: omapfb: panel-lgphilips-lb035q02: remove backlight GPIO handling · a6828b1e
      Dmitry Torokhov authored
      With f048e8c1 ("omapfb: panel-lgphilips-lb035q02: Remove legacy boot
      support") it is no longer possible to specify GPIO to control the
      backlight. Remove code trying to request and toggle it.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      a6828b1e
    • Dmitry Torokhov's avatar
      fbdev: omapfb: encoder-opa362: fix included headers · 891bbadf
      Dmitry Torokhov authored
      The driver has been switched to gpiod API, so it should include
      gpio/consumer.h instead of gpio.h and of_gpio.h.
      
      With of_gpio.h no longer included we need mod_devicetable.h for
      of_device_id definition.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      891bbadf
    • Dmitry Torokhov's avatar
      fbdev: omapfb: connector-analog-tv: remove support for platform data · 90a687d6
      Dmitry Torokhov authored
      There are no users of connector_atv_platform_data in the mainline
      kernel so support for it can be removed from the panel driver.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      90a687d6
    • Dmitry Torokhov's avatar
      fbdev: omapfb: panel-dpi: remove support for platform data · b7ec002c
      Dmitry Torokhov authored
      There are no users of panel_dpi_platform_data in the mainline
      kernel so support for it can be removed from the panel driver.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      b7ec002c
    • Dmitry Torokhov's avatar
      fbdev: omapfb: panel-nec-nl8048hl11: switch to using gpiod API · 39630e0f
      Dmitry Torokhov authored
      Switch the driver from legacy gpio API that is deprecated to the newer
      gpiod API that respects line polarities described in ACPI/DT.
      
      Note that because existing DTSes specify incorrect polarity of reset
      lines (active high) and GPU drivers have adopted to this, we follow
      the suit and use inverted values when controlling reset lines.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      39630e0f
    • Dmitry Torokhov's avatar
      fbdev: omapfb: panel-tpo-td043mtea1: switch to using gpiod API · 836bfb56
      Dmitry Torokhov authored
      Switch the driver from legacy gpio API that is deprecated to the newer
      gpiod API that respects line polarities described in ACPI/DT.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      836bfb56