aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-02-22drm/msm: Fix possible uninitialized access in fbdevThomas Zimmermann1-2/+2
Do not run drm_fb_helper_unprepare() if fbdev allocation fails. Avoids access to an uninitialized pointer. Original bug report is at [1]. Reported-by: kernel test robot <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()") Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ # 1 Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-02-22arm64/fpsimd: Remove warning for SME without SVEMark Brown1-3/+0
Support for SME without SVE is architecturally valid and has now been tested well enough so let's remove the warning message that is displayed at boot. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
2023-02-22arm64: Reset KASAN tag in copy_highpage with HW tags onlyPeter Collingbourne1-1/+2
During page migration, the copy_highpage function is used to copy the page data to the target page. If the source page is a userspace page with MTE tags, the KASAN tag of the target page must have the match-all tag in order to avoid tag check faults during subsequent accesses to the page by the kernel. However, the target page may have been allocated in a number of ways, some of which will use the KASAN allocator and will therefore end up setting the KASAN tag to a non-match-all tag. Therefore, update the target page's KASAN tag to match the source page. We ended up unintentionally fixing this issue as a result of a bad merge conflict resolution between commit e059853d14ca ("arm64: mte: Fix/clarify the PG_mte_tagged semantics") and commit 20794545c146 ("arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags""), which preserved a tag reset for PG_mte_tagged pages which was considered to be unnecessary at the time. Because SW tags KASAN uses separate tag storage, update the code to only reset the tags when HW tags KASAN is enabled. Signed-off-by: Peter Collingbourne <[email protected]> Link: https://linux-review.googlesource.com/id/If303d8a709438d3ff5af5fd85706505830f52e0c Reported-by: "Kuan-Ying Lee (李冠穎)" <[email protected]> Cc: <[email protected]> # 6.1 Fixes: 20794545c146 ("arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags"") Reviewed-by: Andrey Konovalov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
2023-02-22RISC-V: add a spin_shadow_stack declarationConor Dooley1-0/+1
The patchwork automation reported a sparse complaint that spin_shadow_stack was not declared and should be static: ../arch/riscv/kernel/traps.c:335:15: warning: symbol 'spin_shadow_stack' was not declared. Should it be static? However, this is used in entry.S and therefore shouldn't be static. The same applies to the shadow_stack that this pseudo spinlock is trying to protect, so do like its charge and add a declaration to thread_info.h Signed-off-by: Conor Dooley <[email protected]> Fixes: 7e1864332fbc ("riscv: fix race when vmap stack overflow") Reviewed-by: Guo Ren <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
2023-02-22swiotlb: mark swiotlb_memblock_alloc() as __initRandy Dunlap1-1/+2
swiotlb_memblock_alloc() calls memblock_alloc(), which calls (__init) memblock_alloc_try_nid(). However, swiotlb_membloc_alloc() can be marked as __init since it is only called by swiotlb_init_remap(), which is already marked as __init. This prevents a modpost build warning/error: WARNING: modpost: vmlinux.o: section mismatch in reference: swiotlb_memblock_alloc (section: .text) -> memblock_alloc_try_nid (section: .init.text) WARNING: modpost: vmlinux.o: section mismatch in reference: swiotlb_memblock_alloc (section: .text) -> memblock_alloc_try_nid (section: .init.text) This fixes the build warning/error seen on ARM64, PPC64, S390, i386, and x86_64. Fixes: 8d58aa484920 ("swiotlb: reduce the swiotlb buffer size on allocation failure") Signed-off-by: Randy Dunlap <[email protected]> Cc: Alexey Kardashevskiy <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: [email protected] Cc: Mike Rapoport <[email protected]> Cc: [email protected] Signed-off-by: Christoph Hellwig <[email protected]>
2023-02-22clk: qcom: Revert sync_state based clk_disable_unusedBjorn Andersson8-53/+11
Revert the postponement of clk_disable_unused() for clock providers that implement sync_state, and the change to drivers implementing this, until agreement on the implementation has been reached. This reverts: 29e31415e14e ("clk: qcom: Remove need for clk_ignore_unused on sc8280xp") 99c0f7d35c4b ("clk: qcom: sdm845: Use generic clk_sync_state_disable_unused callback") 26b36df75166 ("clk: Add generic sync_state callback for disabling unused clocks") Requested-by: Stephen Boyd <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]>
2023-02-22rtc: pcf85363: add support for the quartz-load-femtofarads propertyJavier Carrasco1-1/+36
The quartz oscillator load capacitance of the PCF85263 and PCF85363 can be adjusted to 6 pF, 7 pF (default) and 12.5 pF with the CL[1:0] bits in the oscillator control register (address 25h). Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-22dt-bindings: rtc: nxp,pcf8563: move pcf85263/pcf85363 to a dedicated bindingJavier Carrasco2-2/+60
These Real Time Clocks are managed by the rtc-pcf85363 device driver, which now supports the quartz-load-femtofarads property. Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-22dt-bindings: mfd: qcom,tcsr: Add compatible for IPQ5332Kathiravan T1-0/+1
Document the qcom,tcsr-ipq5332 compatible. Signed-off-by: Kathiravan T <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22dt-bindings: mfd: Add NXP BBNSMJacky Bai1-0/+101
Add binding for NXP BBNSM(Battery-Backed Non-Secure Module). Signed-off-by: Jacky Bai <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22mfd: ntxec: Add version number for EC in Tolino VisionAndreas Kemnade2-1/+2
The EC firmware has a different version number than anything defined until now. Signed-off-by: Andreas Kemnade <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22dt-bindings: mfd: syscon: Add mt8365-syscfgBernhard Rosenkränzer1-0/+1
Document Mediatek mt8365-syscfg Signed-off-by: Bernhard Rosenkränzer <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22mfd: Remove toshiba tmio driversArnd Bergmann12-3164/+0
Four separate mfd drivers are in the "tmio" family, and all of them were used in now-removed PXA machines (eseries, tosa, and hx4700), so the mfd drivers and all its children can be removed as well. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22rtc: allow rtc_read_alarm without read_alarm callbackAlexandre Belloni1-1/+1
.read_alarm is not necessary to read the current alarm because it is recorded in the aie_timer and so rtc_read_alarm() will never call rtc_read_alarm_internal() which is the only function calling the callback. Reported-by: Zhipeng Wang <[email protected]> Reported-by: Marcel Ziswiler <[email protected]> Fixes: 7ae41220ef58 ("rtc: introduce features bitfield") Tested-by: Philippe Schenker <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-22rtc: rv3032: add ACPI supportAlexandre Belloni1-0/+7
The RV-3032 has been assigned the MCRY3032 ACPI ID. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-22rtc: rv3028: add ACPI supportAlexandre Belloni1-0/+7
The RV-3028 has been assigned the MCRY3028 ACPI ID. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-22rtc: bbnsm: Add the bbnsm rtc supportJacky Bai3-0/+239
The BBNSM module includes a real time counter with alarm. Add a RTC driver for this function. Signed-off-by: Jacky Bai <[email protected]> Reviewed-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-22gfs2: Convert gfs2_page_add_databufs to foliosAndreas Gruenbacher3-8/+8
Convert gfs2_page_add_databufs() to folios and rename it to gfs2_trans_add_databufs(). Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
2023-02-22gfs2: jdata writepage fixAndreas Gruenbacher1-2/+1
The ->writepage() and ->writepages() operations are supposed to write entire pages. However, on filesystems with a block size smaller than PAGE_SIZE, __gfs2_jdata_writepage() only adds the first block to the current transaction instead of adding the entire page. Fix that. Fixes: 18ec7d5c3f43 ("[GFS2] Make journaled data files identical to normal files on disk") Signed-off-by: Andreas Gruenbacher <[email protected]>
2023-02-22backlight: ktz8866: Convert to i2c's .probe_new()Uwe Kleine-König1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: ktz8866: Add support for Kinetic KTZ8866 backlightJianhua Lu4-0/+224
Add support for Kinetic KTZ8866 backlight, which is used in Xiaomi tablet, Mi Pad 5 series. This driver lightly based on downstream implementation [1]. [1] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/video/backlight/ktz8866.c Signed-off-by: Jianhua Lu <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22dt-bindings: leds: backlight: Add Kinetic KTZ8866 backlightJianhua Lu1-0/+76
Add Kinetic KTZ8866 backlight binding documentation. Signed-off-by: Jianhua Lu <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: pwm_bl: Don't rely on a disabled PWM emiting inactive stateUwe Kleine-König1-8/+22
Most but not all PWMs drive the PWM pin to its inactive state when disabled. However if there is no enable_gpio and no regulator the PWM must drive the inactive state to actually disable the backlight. So keep the PWM on in this case. Note that to determine if there is a regulator some effort is required because it might happen that there isn't actually one but the regulator core gave us a dummy. (A nice side effect is that this makes the regulator actually optional even on fully constrained systems.) This fixes backlight disabling e.g. on i.MX6 when an inverted PWM is used. Hint for the future: If this change results in a regression, the bug is in the lowlevel PWM driver. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: pwm_bl: Configure pwm only once per backlight toggleUwe Kleine-König1-18/+10
When the function pwm_backlight_update_status() was called with brightness > 0, pwm_get_state() was called twice (once directly and once in compute_duty_cycle). Also pwm_apply_state() was called twice (once in pwm_backlight_power_on() and once directly). Optimize this to do both calls only once. Note that with this affects the order of regulator and PWM setup. It's not expected to have a relevant effect on hardware. The rationale for this is that the regulator (and the GPIO) are reasonable to switch in pwm_backlight_power_on()/pwm_backlight_power_off() but the PWM has nothing to do with power. (The post_pwm_on_delay and pwm_off_delay are still there though.) Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: Remove pxa tosa supportArnd Bergmann5-480/+0
The PXA tosa machine was removed, so this backlight driver is no longer needed. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: aat2870: Use backlight helperStephen Kitt1-6/+1
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: ipaq_micro: Use backlight helperStephen Kitt1-6/+1
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: arcxcnn: Use backlight helperStephen Kitt1-4/+1
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: sky81452: Fix sky81452_bl_platform_data kernel-docRandy Dunlap1-1/+1
Correct the struct name and add a short struct description to fix the kernel-doc notation. Prevents this kernel-doc warning: drivers/video/backlight/sky81452-backlight.c:64: warning: expecting prototype for struct sky81452_platform_data. Prototype was for struct sky81452_bl_platform_data instead Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: pwm_bl: Drop support for legacy PWM probingUwe Kleine-König2-13/+0
There is no in-tree user left which relies on legacy probing. So drop support for it which removes another user of the deprecated pwm_request() function. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22dt-bindings: backlight: qcom-wled: Add PMI8950 compatibleLuca Weiss1-0/+1
Document the compatible for the wled block found in PMI8950. Signed-off-by: Luca Weiss <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: ktd253: Switch to use dev_err_probe() helperYang Yingliang1-6/+3
In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. It's more simple in error path. Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22backlight: backlight: Fix doc for backlight_device_get_by_nameMiaoqian Lin1-1/+1
backlight_put() has been dropped, we should call put_device() to drop the reference taken by backlight_device_get_by_name(). Fixes: 0f6a3256fd81 ("backlight: backlight: Drop backlight_put()") Signed-off-by: Miaoqian Lin <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22wifi: ath11k: allow system suspend to survive ath11kLen Brown1-1/+1
When ath11k runs into internal errors upon suspend, it returns an error code to pci_pm_suspend, which aborts the entire system suspend. The driver should not abort system suspend, but should keep its internal errors to itself, and allow the system to suspend. Otherwise, a user can suspend a laptop by closing the lid and sealing it into a case, assuming that is will suspend, rather than heating up and draining the battery when in transit. In practice, the ath11k device seems to have plenty of transient errors, and subsequent suspend cycles after this failure often succeed. https://bugzilla.kernel.org/show_bug.cgi?id=216968 Fixes: d1b0c33850d29 ("ath11k: implement suspend for QCA6390 PCI devices") Signed-off-by: Len Brown <[email protected]> Cc: [email protected] Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22Merge branch 'for-6.3/hid-bpf' into for-linusBenjamin Tissoires46-29/+5213
Initial support of HID-BPF (Benjamin Tissoires) The history is a little long for this series, as it was intended to be sent for v6.2. However some last minute issues forced us to postpone it to v6.3. Conflicts: * drivers/hid/i2c-hid/Kconfig: commit bf7660dab30d ("HID: stop drivers from selecting CONFIG_HID") conflicts with commit 2afac81dd165 ("HID: fix I2C_HID not selected when I2C_HID_OF_ELAN is") the resolution is simple enough: just drop the "default" and "select" lines as the new commit from Arnd is doing
2023-02-22Merge branch 'for-6.3/uclogic' into for-linusBenjamin Tissoires10-27/+339
UClogic assorted fixes and new devices support (José Expósito)
2023-02-22Merge branch 'for-6.3/steam' into for-linusBenjamin Tissoires3-28/+368
Add Steam Deck support (Vicki Pfau)
2023-02-22Merge branch 'for-6.3/sony' into for-linusBenjamin Tissoires2-1000/+62
- enforce DS4 controllers to use hid-playstation (Roderick Colenbrander) - various hid-playstation gyro fixes (Roderick Colenbrander)
2023-02-22Merge branch 'for-6.3/multitouch' into for-linusBenjamin Tissoires6-7/+86
Allow to pass quirks from i2c-hid to hid-multitouch (Allen Ballway & Dmitry Torokhov)
2023-02-22Merge branch 'for-6.3/mcp2221' into for-linusBenjamin Tissoires1-0/+3
prevent UAF in delayed work (Benjamin Tissoires)
2023-02-22Merge branch 'for-6.3/logitech' into for-linusBenjamin Tissoires3-61/+99
- HID++ fixes for scroll wheel, protocol and debug (Bastien Nocera) - add support of Logitech G923 Xbox Edition steering wheel (Walt Holman)
2023-02-22Merge branch 'for-6.3/i2c-hid' into for-linusBenjamin Tissoires4-103/+43
- dev_dbg cleanup (Thomas Weißschuh) - cleanup i2c-hid-acpi (Andy Shevchenko) - goodix: revert/fixes for an actual production device compared to the manufacturer sample (Douglas Anderson)
2023-02-22Merge branch 'for-6.3/hid-sensor' into for-linusBenjamin Tissoires4-100/+207
Allow more custom IIO sensors through HID (Philipp Jungkamp)
2023-02-22Merge branch 'for-6.3/evision' into for-linusBenjamin Tissoires4-0/+64
New hid-evision driver for EVision keyboards (Philippe Valembois)
2023-02-22Merge branch 'for-6.3/bigben' into for-linusBenjamin Tissoires1-12/+63
UAF protection in work struct (Pietro Borrello)
2023-02-22Merge branch 'for-6.3/asus' into for-linusBenjamin Tissoires1-5/+32
UAF protection in work struct (Pietro Borrello)
2023-02-22Merge branch 'for-6.3/hid-core' into for-linusBenjamin Tissoires21-56/+157
- constify hid_ll_driver (Thomas Weißschuh) - map standard Battery System Charging to upower (José Expósito) - couple of assorted fixes and new handling of HID usages (Jingyuan Liang & Ronald Tschalär)
2023-02-22netfilter: x_tables: fix percpu counter block leak on error path when ↵Pavel Tikhomirov3-0/+12
creating new netns Here is the stack where we allocate percpu counter block: +-< __alloc_percpu +-< xt_percpu_counter_alloc +-< find_check_entry # {arp,ip,ip6}_tables.c +-< translate_table And it can be leaked on this code path: +-> ip6t_register_table +-> translate_table # allocates percpu counter block +-> xt_register_table # fails there is no freeing of the counter block on xt_register_table fail. Note: xt_percpu_counter_free should be called to free it like we do in do_replace through cleanup_entry helper (or in __ip6t_unregister_table). Probability of hitting this error path is low AFAICS (xt_register_table can only return ENOMEM here, as it is not replacing anything, as we are creating new netns, and it is hard to imagine that all previous allocations succeeded and after that one in xt_register_table failed). But it's worth fixing even the rare leak. Fixes: 71ae0dff02d7 ("netfilter: xtables: use percpu rule counters") Signed-off-by: Pavel Tikhomirov <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2023-02-22mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leakLiang He1-1/+1
In arizona_clk32k_enable(), we should use pm_runtime_resume_and_get() as pm_runtime_get_sync() will increase the refcnt even when it returns an error. Signed-off-by: Liang He <[email protected]> Acked-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-22mfd: syscon: Allow reset control for syscon devicesJeremy Kerr1-6/+21
Simple syscon devices may require deassertion of a reset signal in order to access their register set. Rather than requiring a custom driver to implement this, we can use the generic "resets" specifiers to link a reset line to the syscon. This change adds an optional reset line to the syscon device description, and deasserts the reset if detected. Signed-off-by: Jeremy Kerr <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]