summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-31x86/debug: Fix stack recursion caused by wrongly ordered DR7 accessesJoerg Roedel
In kernels compiled with CONFIG_PARAVIRT=n, the compiler re-orders the DR7 read in exc_nmi() to happen before the call to sev_es_ist_enter(). This is problematic when running as an SEV-ES guest because in this environment the DR7 read might cause a #VC exception, and taking #VC exceptions is not safe in exc_nmi() before sev_es_ist_enter() has run. The result is stack recursion if the NMI was caused on the #VC IST stack, because a subsequent #VC exception in the NMI handler will overwrite the stack frame of the interrupted #VC handler. As there are no compiler barriers affecting the ordering of DR7 reads/writes, make the accesses to this register volatile, forbidding the compiler to re-order them. [ bp: Massage text, make them volatile too, to make sure some aggressive compiler optimization pass doesn't discard them. ] Fixes: 315562c9af3d ("x86/sev-es: Adjust #VC IST Stack on entering NMI handler") Reported-by: Alexey Kardashevskiy <aik@amd.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230127035616.508966-1-aik@amd.com
2023-01-31arm64: dts: mt8192: Change idle states names to reflect actual functionAngeloGioacchino Del Regno
The names of the idle states are misleading being this a single cluster SoC, a cluster-sleep idle state is impossible! After some research in ATF, it emerged that the cpu-sleep state is in reality putting CPUs in retention state, while the cluster-sleep one is turning off the CPUs. Summarizing renaming: - cpu-sleep -> cpu-retention - cluster-sleep -> cpu-off Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230126103526.417039-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8186: Change idle states names to reflect actual functionAngeloGioacchino Del Regno
The names of the idle states are misleading being this a single cluster SoC, a cluster-off idle state is impossible! After some research in ATF, it emerged that the cpu-off state is in reality putting CPUs in retention state, while the cluster-off one is turning off the CPUs. Summarizing renaming: - cpu-off -> cpu-retention - cluster-off -> cpu-off Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230126103526.417039-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8195: Change idle states names to reflect actual functionAngeloGioacchino Del Regno
The names of the idle states are misleading being this a single cluster SoC, a cluster-off idle state is impossible! After some research in ATF, it emerged that the cpu-off state is in reality putting CPUs in retention state, while the cluster-off one is turning off the CPUs. Summarizing renaming: - cpu-off -> cpu-retention - cluster-off -> cpu-off Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230126103526.417039-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8186: Fix CPU map for single-cluster SoCAngeloGioacchino Del Regno
MT8186 features the ARM DynamIQ technology and combines both two Cortex-A76 (big) and six Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Fixes: 2e78620b1350 ("arm64: dts: Add MediaTek MT8186 dts and evaluation board and Makefile") Link: https://lore.kernel.org/r/20230126103526.417039-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8192: Fix CPU map for single-cluster SoCAngeloGioacchino Del Regno
MT8192 features the ARM DynamIQ technology and combines both four Cortex-A76 (big) and four Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Fixes: 48489980e27e ("arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile") Link: https://lore.kernel.org/r/20230126103526.417039-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: dts: mt8195: Fix CPU map for single-cluster SoCAngeloGioacchino Del Regno
MT8195 features the ARM DynamIQ technology and combines both four Cortex-A78 (big) and four Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Fixes: 37f2582883be ("arm64: dts: Add mediatek SoC mt8195 and evaluation board") Link: https://lore.kernel.org/r/20230126103526.417039-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: defconfig: Enable DMA_RESTRICTED_POOLNícolas F. R. A. Prado
Enable support for restricted DMA pools which provide a level of DMA memory protection on systems with limited hardware protection capabilities, such as those lacking an IOMMU. For instance, mt8192-asurada-spherion makes use of this to provide a restricted DMA region for WiFi since its MT7921E WiFi card is connected through PCIe, and the MT8192 SoC doesn't have an IOMMU context for the PCIe controller. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20230130200820.82084-2-nfraprado@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31arm64: defconfig: Enable missing configs for mt8192-asuradaNícolas F. R. A. Prado
Enable missing configs in the arm64 defconfig to get all devices probing on mt8192-asurada based machines. The devices enabled are: MediaTek Bluetooth USB controller, MediaTek PCIe Gen3 MAC controller, MT7921E wireless adapter, Elan I2C Trackpad, MediaTek SPI NOR flash controller, Mediatek SPMI Controller, ChromeOS EC regulators, MT6315 PMIC, MediaTek Video Codec, MT8192 sound cards, ChromeOS EC rpmsg communication, all MT8192 clocks. REGULATOR_CROS_EC is enabled as builtin since it powers the MMC controller for the SD card, making it required for booting on some setups. The MT8192 clocks are enabled as builtin for now since their Kconfigs are bool, and will be changed to modules after those Kconfigs are reworked. Restricted DMA pool support is also required to get working WiFi, but it is enabled in a separate commit since it alters behavior of other platforms and devices. By enabling the support for all of this platform's devices on the defconfig we make it effortless to test the relevant hardware both by developers as well as CI systems like KernelCI. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20230130200820.82084-1-nfraprado@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2023-01-31powerpc/64s/radix: Fix RWX mapping with relocated kernelMichael Ellerman
If a relocatable kernel is loaded at a non-zero address and told not to relocate to zero (kdump or RELOCATABLE_TEST), the mapping of the interrupt code at zero is left with RWX permissions. That is a security weakness, and leads to a warning at boot if CONFIG_DEBUG_WX is enabled: powerpc/mm: Found insecure W+X mapping at address 00000000056435bc/0xc000000000000000 WARNING: CPU: 1 PID: 1 at arch/powerpc/mm/ptdump/ptdump.c:193 note_page+0x484/0x4c0 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc1-00001-g8ae8e98aea82-dirty #175 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,git-dd0dca hv:linux,kvm pSeries NIP: c0000000004a1c34 LR: c0000000004a1c30 CTR: 0000000000000000 REGS: c000000003503770 TRAP: 0700 Not tainted (6.2.0-rc1-00001-g8ae8e98aea82-dirty) MSR: 8000000002029033 <SF,VEC,EE,ME,IR,DR,RI,LE> CR: 24000220 XER: 00000000 CFAR: c000000000545a58 IRQMASK: 0 ... NIP note_page+0x484/0x4c0 LR note_page+0x480/0x4c0 Call Trace: note_page+0x480/0x4c0 (unreliable) ptdump_pmd_entry+0xc8/0x100 walk_pgd_range+0x618/0xab0 walk_page_range_novma+0x74/0xc0 ptdump_walk_pgd+0x98/0x170 ptdump_check_wx+0x94/0x100 mark_rodata_ro+0x30/0x70 kernel_init+0x78/0x1a0 ret_from_kernel_thread+0x5c/0x64 The fix has two parts. Firstly the pages from zero up to the end of interrupts need to be marked read-only, so that they are left with R-X permissions. Secondly the mapping logic needs to be taught to ensure there is a page boundary at the end of the interrupt region, so that the permission change only applies to the interrupt text, and not the region following it. Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Reported-by: Sachin Sant <sachinp@linux.ibm.com> Tested-by: Sachin Sant <sachinp@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230110124753.1325426-2-mpe@ellerman.id.au
2023-01-31powerpc/64s/radix: Fix crash with unaligned relocated kernelMichael Ellerman
If a relocatable kernel is loaded at an address that is not 2MB aligned and told not to relocate to zero, the kernel can crash due to mark_rodata_ro() incorrectly changing some read-write data to read-only. Scenarios where the misalignment can occur are when the kernel is loaded by kdump or using the RELOCATABLE_TEST config option. Example crash with the kernel loaded at 5MB: Run /sbin/init as init process BUG: Unable to handle kernel data access on write at 0xc000000000452000 Faulting instruction address: 0xc0000000005b6730 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries CPU: 1 PID: 1 Comm: init Not tainted 6.2.0-rc1-00011-g349188be4841 #166 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,git-5b4c5a hv:linux,kvm pSeries NIP: c0000000005b6730 LR: c000000000ae9ab8 CTR: 0000000000000380 REGS: c000000004503250 TRAP: 0300 Not tainted (6.2.0-rc1-00011-g349188be4841) MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 44288480 XER: 00000000 CFAR: c0000000005b66ec DAR: c000000000452000 DSISR: 0a000000 IRQMASK: 0 ... NIP memset+0x68/0x104 LR zero_user_segments.constprop.0+0xa8/0xf0 Call Trace: ext4_mpage_readpages+0x7f8/0x830 ext4_readahead+0x48/0x60 read_pages+0xb8/0x380 page_cache_ra_unbounded+0x19c/0x250 filemap_fault+0x58c/0xae0 __do_fault+0x60/0x100 __handle_mm_fault+0x1230/0x1a40 handle_mm_fault+0x120/0x300 ___do_page_fault+0x20c/0xa80 do_page_fault+0x30/0xc0 data_access_common_virt+0x210/0x220 This happens because mark_rodata_ro() tries to change permissions on the range _stext..__end_rodata, but _stext sits in the middle of the 2MB page from 4MB to 6MB: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000002400000 with 2.00 MiB pages (exec) The logic that changes the permissions assumes the linear mapping was split correctly at boot, so it marks the entire 2MB page read-only. That leads to the write fault above. To fix it, the boot time mapping logic needs to consider that if the kernel is running at a non-zero address then _stext is a boundary where it must split the mapping. That leads to the mapping being split correctly, allowing the rodata permission change to take happen correctly, with no spillover: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000000500000 with 64.0 KiB pages radix-mmu: Mapped 0x0000000000500000-0x0000000000600000 with 64.0 KiB pages (exec) radix-mmu: Mapped 0x0000000000600000-0x0000000002400000 with 2.00 MiB pages (exec) If the kernel is loaded at a 2MB aligned address, the mapping continues to use 2MB pages as before: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000002c00000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000002c00000-0x0000000100000000 with 2.00 MiB pages Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230110124753.1325426-1-mpe@ellerman.id.au
2023-01-31powerpc/kexec_file: Fix division by zero in extra size estimationMichael Ellerman
In kexec_extra_fdt_size_ppc64() there's logic to estimate how much extra space will be needed in the device tree for some memory related properties. That logic uses the size of RAM divided by drmem_lmb_size() to do the estimation. However drmem_lmb_size() can be zero if the machine has no hotpluggable memory configured, which is the case when booting with qemu and no maxmem=x parameter is passed (the default). The division by zero is reported by UBSAN, and can also lead to an overflow and a warning from kvmalloc, and kdump kernel loading fails: WARNING: CPU: 0 PID: 133 at mm/util.c:596 kvmalloc_node+0x15c/0x160 Modules linked in: CPU: 0 PID: 133 Comm: kexec Not tainted 6.2.0-rc5-03455-g07358bd97810 #223 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1200 0xf000005 of:SLOF,git-dd0dca pSeries NIP: c00000000041ff4c LR: c00000000041fe58 CTR: 0000000000000000 REGS: c0000000096ef750 TRAP: 0700 Not tainted (6.2.0-rc5-03455-g07358bd97810) MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 24248242 XER: 2004011e CFAR: c00000000041fed0 IRQMASK: 0 ... NIP kvmalloc_node+0x15c/0x160 LR kvmalloc_node+0x68/0x160 Call Trace: kvmalloc_node+0x68/0x160 (unreliable) of_kexec_alloc_and_setup_fdt+0xb8/0x7d0 elf64_load+0x25c/0x4a0 kexec_image_load_default+0x58/0x80 sys_kexec_file_load+0x5c0/0x920 system_call_exception+0x128/0x330 system_call_vectored_common+0x15c/0x2ec To fix it, skip the calculation if drmem_lmb_size() is zero. Fixes: 2377c92e37fe ("powerpc/kexec_file: fix FDT size estimation for kdump kernel") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230130014707.541110-1-mpe@ellerman.id.au
2023-01-31hrtimer: Ignore slack time for RT tasks in schedule_hrtimeout_range()Davidlohr Bueso
While in theory the timer can be triggered before expires + delta, for the cases of RT tasks they really have no business giving any lenience for extra slack time, so override any passed value by the user and always use zero for schedule_hrtimeout_range() calls. Furthermore, this is similar to what the nanosleep(2) family already does with current->timer_slack_ns. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230123173206.6764-3-dave@stgolabs.net
2023-01-31hrtimer: Rely on rt_task() for DL tasks tooDavidlohr Bueso
Checking dl_task() is redundant as rt_task() returns true for deadline tasks too. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230123173206.6764-2-dave@stgolabs.net
2023-01-31serial: 8250_dma: Fix DMA Rx rearm raceIlpo Järvinen
As DMA Rx can be completed from two places, it is possible that DMA Rx completes before DMA completion callback had a chance to complete it. Once the previous DMA Rx has been completed, a new one can be started on the next UART interrupt. The following race is possible (uart_unlock_and_check_sysrq_irqrestore() replaced with spin_unlock_irqrestore() for simplicity/clarity): CPU0 CPU1 dma_rx_complete() serial8250_handle_irq() spin_lock_irqsave(&port->lock) handle_rx_dma() serial8250_rx_dma_flush() __dma_rx_complete() dma->rx_running = 0 // Complete DMA Rx spin_unlock_irqrestore(&port->lock) serial8250_handle_irq() spin_lock_irqsave(&port->lock) handle_rx_dma() serial8250_rx_dma() dma->rx_running = 1 // Setup a new DMA Rx spin_unlock_irqrestore(&port->lock) spin_lock_irqsave(&port->lock) // sees dma->rx_running = 1 __dma_rx_complete() dma->rx_running = 0 // Incorrectly complete // running DMA Rx This race seems somewhat theoretical to occur for real but handle it correctly regardless. Check what is the DMA status before complething anything in __dma_rx_complete(). Reported-by: Gilles BULOZ <gilles.buloz@kontron.com> Tested-by: Gilles BULOZ <gilles.buloz@kontron.com> Fixes: 9ee4b83e51f7 ("serial: 8250: Add support for dmaengine") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230130114841.25749-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-31serial: 8250_dma: Fix DMA Rx completion raceIlpo Järvinen
__dma_rx_complete() is called from two places: - Through the DMA completion callback dma_rx_complete() - From serial8250_rx_dma_flush() after IIR_RLSI or IIR_RX_TIMEOUT The former does not hold port's lock during __dma_rx_complete() which allows these two to race and potentially insert the same data twice. Extend port's lock coverage in dma_rx_complete() to prevent the race and check if the DMA Rx is still pending completion before calling into __dma_rx_complete(). Reported-by: Gilles BULOZ <gilles.buloz@kontron.com> Tested-by: Gilles BULOZ <gilles.buloz@kontron.com> Fixes: 9ee4b83e51f7 ("serial: 8250: Add support for dmaengine") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230130114841.25749-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-31serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handlerMarek Vasut
Requesting an interrupt with IRQF_ONESHOT will run the primary handler in the hard-IRQ context even in the force-threaded mode. The force-threaded mode is used by PREEMPT_RT in order to avoid acquiring sleeping locks (spinlock_t) in hard-IRQ context. This combination makes it impossible and leads to "sleeping while atomic" warnings. Use one interrupt handler for both handlers (primary and secondary) and drop the IRQF_ONESHOT flag which is not needed. Fixes: e359b4411c283 ("serial: stm32: fix threaded interrupt handling") Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Valentin Caron <valentin.caron@foss.st.com> # V3 Signed-off-by: Marek Vasut <marex@denx.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230120160332.57930-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-31Merge tag 'iio-fixes-for-6.2a' of ↵Greg Kroah-Hartman
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: "1st set of IIO fixes for the 6.2 cycle. The usual mixed bag - with a bunch of issues found by Carlos Song in the fxos8700 IMU driver dominating. hid-accel,gyro - Fix wrong returned value when read succeeds. marvell,berlin-adc - Missing of_node_put() in an error path. nxp,fxos8700 (freescale) - Wrong channel type match. - Swapped channel read back. - Incomplete channel read back (not enough bytes). - Missing shift of acceleration data. - Range selection didn't work (datasheet bug) - Wrong ODR mode read back due to wrong field offset. - Drop unused, but wrong define. - Fix issue with magnetometer scale an units. nxp,imx8qxp - Fix an irq flood due to not reading data early enough. st,lsm6dsx - Add CONFIG_IIO_TRIGGERED_BUFFER select. st,stm32-adc - Fix missing MODULE_DEVICE_TABLE() needed for module aliases. ti,twl6030 - Fix missing enable of some channels. - Fix a typo in previous patch that meant one channel still wasn't enabled. xilinx,xadc - Carrying on incorrectly after allocation error." * tag 'iio-fixes-for-6.2a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: imu: fxos8700: fix MAGN sensor scale and unit iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN iio: imu: fxos8700: fix failed initialization ODR mode assignment iio: imu: fxos8700: fix incorrect ODR mode readback iio: light: cm32181: Fix PM support on system with 2 I2C resources iio: hid: fix the retval in gyro_3d_capture_sample iio: hid: fix the retval in accel_3d_capture_sample iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m iio:adc:twl6030: Enable measurement of VAC iio: imu: fxos8700: fix ACCEL measurement range selection iio: imu: fxos8700: fix IMU data bits returned to user space iio: imu: fxos8700: fix incomplete ACCEL and MAGN channels readback iio: imu: fxos8700: fix swapped ACCEL and MAGN channels readback iio: imu: fxos8700: fix map label of channel type to MAGN sensor iio:adc:twl6030: Enable measurements of VUSB, VBAT and others iio: imx8qxp-adc: fix irq flood when call imx8qxp_adc_read_raw() iio: adc: xilinx-ams: fix devm_krealloc() return value check iio: adc: berlin2-adc: Add missing of_node_put() in error path iio: adc: stm32-dfsdm: fill module aliases
2023-01-31net: sched: sch: Bounds check priorityKees Cook
Nothing was explicitly bounds checking the priority index used to access clpriop[]. WARN and bail out early if it's pathological. Seen with GCC 13: ../net/sched/sch_htb.c: In function 'htb_activate_prios': ../net/sched/sch_htb.c:437:44: warning: array subscript [0, 31] is outside array bounds of 'struct htb_prio[8]' [-Warray-bounds=] 437 | if (p->inner.clprio[prio].feed.rb_node) | ~~~~~~~~~~~~~~~^~~~~~ ../net/sched/sch_htb.c:131:41: note: while referencing 'clprio' 131 | struct htb_prio clprio[TC_HTB_NUMPRIO]; | ^~~~~~ Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Jiri Pirko <jiri@resnulli.us> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Cong Wang <cong.wang@bytedance.com> Link: https://lore.kernel.org/r/20230127224036.never.561-kees@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-01-31net: ethernet: mtk_eth_soc: Avoid truncating allocationKees Cook
There doesn't appear to be a reason to truncate the allocation used for flow_info, so do a full allocation and remove the unused empty struct. GCC does not like having a reference to an object that has been partially allocated, as bounds checking may become impossible when such an object is passed to other code. Seen with GCC 13: ../drivers/net/ethernet/mediatek/mtk_ppe.c: In function 'mtk_foe_entry_commit_subflow': ../drivers/net/ethernet/mediatek/mtk_ppe.c:623:18: warning: array subscript 'struct mtk_flow_entry[0]' is partly outside array bounds of 'unsigned char[48]' [-Warray-bounds=] 623 | flow_info->l2_data.base_flow = entry; | ^~ Cc: Felix Fietkau <nbd@nbd.name> Cc: John Crispin <john@phrozen.org> Cc: Sean Wang <sean.wang@mediatek.com> Cc: Mark Lee <Mark-MC.Lee@mediatek.com> Cc: Lorenzo Bianconi <lorenzo@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230127223853.never.014-kees@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-01-31kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URIJan Luebbe
When CONFIG_MODULE_SIG_KEY is PKCS#11 URI (pkcs11:*), signing of modules fails: scripts/sign-file sha256 /.../linux/pkcs11:token=foo;object=bar;pin-value=1111 certs/signing_key.x509 /.../kernel/crypto/tcrypt.ko Usage: scripts/sign-file [-dp] <hash algo> <key> <x509> <module> [<dest>] scripts/sign-file -s <raw sig> <hash algo> <x509> <module> [<dest>] First, we need to avoid adding the $(srctree)/ prefix to the URL. Second, since the kconfig string values no longer include quotes, we need to add them again when passing a PKCS#11 URI to sign-file. This avoids splitting by the shell if the URI contains semicolons. Fixes: 4db9c2e3d055 ("kbuild: stop using config_filename in scripts/Makefile.modsign") Fixes: 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf") Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2023-01-31certs: Fix build error when PKCS#11 URI contains semicolonJan Luebbe
When CONFIG_MODULE_SIG_KEY is PKCS#11 URI (pkcs11:*) and contains a semicolon, signing_key.x509 fails to build: certs/extract-cert pkcs11:token=foo;object=bar;pin-value=1111 certs/signing_key.x509 Usage: extract-cert <source> <dest> Add quotes to the extract-cert argument to avoid splitting by the shell. This approach was suggested by Masahiro Yamada <masahiroy@kernel.org>. Fixes: 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf") Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2023-01-31ALSA: firewire-motu: fix unreleased lock warning in hwdep deviceTakashi Sakamoto
Smatch static analysis tool detects that acquired lock is not released in hwdep device when condition branch is passed due to no event. It is unlikely to occur, while fulfilling is preferable for better coding. Reported-by: Dan Carpenter <error27@gmail.com> Fixes: 634ec0b2906e ("ALSA: firewire-motu: notify event for parameter change in register DSP model") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20230130141540.102854-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-01-31Merge tag 'imx-soc-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 6.3: - Call ida_simple_remove() to free up ID allocated by ida_simple_get() for MMDC driver. - Add i.MX6ULZ compatible string to match table. * tag 'imx-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: mach-imx6ul: add imx6ulz support ARM: imx: Call ida_simple_remove() for ida_simple_get Link: https://lore.kernel.org/r/20230130023947.11780-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'samsung-soc-6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v6.3 1. Correct s3c64xx_set_timer_source() prototype. 2. Re-work MIPI and DP phys as children of Exynos PMU system controller. This both better reflects actual device hierarchy and allows to remove later few warnings from dtc W=1 and dtbs_check. * tag 'samsung-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: soc: samsung: exynos-pmu: allow phys as child ARM: s3c: fix s3c64xx_set_timer_source prototype Link: https://lore.kernel.org/r/20230129143944.5104-3-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux into ↵Arnd Bergmann
arm/soc This pull request contains Broadcom ARM SoCs machine updates for 6.3, please pull the following: - Dario removes an useless goto in the BCM63xx SMP bring up code * tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux: ARM: BCM63xx: remove useless goto statement Link: https://lore.kernel.org/r/20230128193849.1628945-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'imx-defconfig-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig i.MX defconfig change for 6.3: - Drop PROVE_LOCKING option from imx_v6_v7_defconfig. - Enable i.MX ICC and DEVFREQ driver as they are required by i.MX8MP boot. * tag 'imx-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Don't enable PROVE_LOCKING arm64: defconfig: select i.MX ICC and DEVFREQ Link: https://lore.kernel.org/r/20230130023947.11780-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'arm-soc/for-6.3/defconfig' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into soc/defconfig This pull request contains Broadcom ARM SoCs defconfig updates for 6.3, please pull the following: - Stefan enables the necessary configuration options to make use of the framebuffer on Raspberry Pi devices * tag 'arm-soc/for-6.3/defconfig' of https://github.com/Broadcom/stblinux: ARM: bcm2835_defconfig: Switch to SimpleDRM ARM: bcm2835_defconfig: Enable the framebuffer Link: https://lore.kernel.org/r/20230128193823.1628716-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31Merge tag 'sunxi-config-for-6.3-1' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/defconfig - Enable Allwinner D1 platform and drivers * tag 'sunxi-config-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: riscv: defconfig: Enable the Allwinner D1 platform and drivers Link: https://lore.kernel.org/r/Y9Ra7dxkfMI9Xp3F@jernej-laptop Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'ieee802154-for-net-2023-01-30' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== ieee802154 for net 2023-01-30 Only one fix this time around. Miquel Raynal fixed a potential double free spotted by Dan Carpenter. * tag 'ieee802154-for-net-2023-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan: mac802154: Fix possible double free upon parsing error ==================== Link: https://lore.kernel.org/r/20230130095646.301448-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30net/tls: tls_is_tx_ready() checked list_entryPietro Borrello
tls_is_tx_ready() checks that list_first_entry() does not return NULL. This condition can never happen. For empty lists, list_first_entry() returns the list_entry() of the head, which is a type confusion. Use list_first_entry_or_null() which returns NULL in case of empty lists. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it> Link: https://lore.kernel.org/r/20230128-list-entry-null-check-tls-v1-1-525bbfe6f0d0@diag.uniroma1.it Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30Merge branch '100GbE' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-01-27 (ice) This series contains updates to ice driver only. Dave prevents modifying channels when RDMA is active as this will break RDMA traffic. Michal fixes a broken URL. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix broken link in ice NAPI doc ice: Prevent set_channel from changing queues while RDMA active ==================== Link: https://lore.kernel.org/r/20230127225333.1534783-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31dt-bindings: opp: v2-qcom-level: Let qcom,opp-fuse-level be a 2-long arrayKonrad Dybcio
In some instances (particularly with CPRh) we might want to specifiy more than one qcom,opp-fuse-level, as the same OPP subnodes may be used by different "CPR threads". We need to make sure that n = num_threads entries is legal and so far nobody seems to use more than two, so let's allow that. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-01-31powerpc/imc-pmu: Revert nest_init_lock to being a mutexMichael Ellerman
The recent commit 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") fixed warnings (and possible deadlocks) in the IMC PMU driver by converting the locking to use spinlocks. It also converted the init-time nest_init_lock to a spinlock, even though it's not used at runtime in IRQ disabled sections or while holding other spinlocks. This leads to warnings such as: BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 preempt_count: 1, expected: 0 CPU: 7 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc2-14719-gf12cd06109f4-dirty #1 Hardware name: Mambo,Simulated-System POWER9 0x4e1203 opal:v6.6.6 PowerNV Call Trace: dump_stack_lvl+0x74/0xa8 (unreliable) __might_resched+0x178/0x1a0 __cpuhp_setup_state+0x64/0x1e0 init_imc_pmu+0xe48/0x1250 opal_imc_counters_probe+0x30c/0x6a0 platform_probe+0x78/0x110 really_probe+0x104/0x420 __driver_probe_device+0xb0/0x170 driver_probe_device+0x58/0x180 __driver_attach+0xd8/0x250 bus_for_each_dev+0xb4/0x140 driver_attach+0x34/0x50 bus_add_driver+0x1e8/0x2d0 driver_register+0xb4/0x1c0 __platform_driver_register+0x38/0x50 opal_imc_driver_init+0x2c/0x40 do_one_initcall+0x80/0x360 kernel_init_freeable+0x310/0x3b8 kernel_init+0x30/0x1a0 ret_from_kernel_thread+0x5c/0x64 Fix it by converting nest_init_lock back to a mutex, so that we can call sleeping functions while holding it. There is no interaction between nest_init_lock and the runtime spinlocks used by the actual PMU routines. Fixes: 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") Tested-by: Kajol Jain<kjain@linux.ibm.com> Reviewed-by: Kajol Jain<kjain@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20230130014401.540543-1-mpe@ellerman.id.au
2023-01-30drm/nouveau/acr/gm20b: regression fixesBen Skeggs
Missed some Tegra-specific quirks when reworking ACR to support Ampere. Fixes: 2541626cfb79 ("drm/nouveau/acr: use common falcon HS FW code for ACR FWs") Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt> Tested-by: Nicolas Chauvet <kwizart@gmail.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-3-bskeggs@redhat.com
2023-01-30drm/nouveau/fb/tu102-: fix register used to determine scrub statusBen Skeggs
Turing apparently needs to use the same register we use on Ampere. Not executing the scrubber ucode when required would result in large areas of VRAM being inaccessible to the driver. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-2-bskeggs@redhat.com
2023-01-30drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETEDBen Skeggs
Starting from Turing, the driver is no longer responsible for initiating DEVINIT when required as the GPU started loading a FW image from ROM and executing DEVINIT itself after power-on. However - we apparently still need to wait for it to complete. This should correct some issues with runpm on some systems, where we get control of the HW before it's been fully reinitialised after resume from suspend. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-1-bskeggs@redhat.com
2023-01-30pinctrl: aspeed: Revert "Force to disable the function's signal"Joel Stanley
This reverts commit cf517fef601b9dde151f0afc27164d13bf1fd907. The commit cf517fef601b ("pinctrl: aspeed: Force to disable the function's signal") exposed a problem with fetching the regmap for reading the GFX register. The Romulus machine the device tree contains a gpio hog for GPIO S7. With the patch applied: Muxing pin 151 for GPIO Disabling signal VPOB9 for VPO aspeed-g5-pinctrl 1e6e2080.pinctrl: Failed to acquire regmap for IP block 1 aspeed-g5-pinctrl 1e6e2080.pinctrl: request() failed for pin 151 The code path is aspeed-gpio -> pinmux-g5 -> regmap -> clk, and the of_clock code returns an error as it doesn't have a valid struct clk_hw pointer. The regmap call happens because pinmux wants to check the GFX node (IP block 1) to query bits there. For reference, before the offending patch: Muxing pin 151 for GPIO Disabling signal VPOB9 for VPO Want SCU8C[0x00000080]=0x1, got 0x0 from 0x00000000 Disabling signal VPOB9 for VPOOFF1 Want SCU8C[0x00000080]=0x1, got 0x0 from 0x00000000 Disabling signal VPOB9 for VPOOFF2 Want SCU8C[0x00000080]=0x1, got 0x0 from 0x00000000 Enabling signal GPIOS7 for GPIOS7 Muxed pin 151 as GPIOS7 gpio-943 (seq_cont): hogged as output/low We can't skip the clock check to allow pinmux to proceed, because the write to disable VPOB9 will try to set a bit in the GFX register space which will not stick when the IP is in reset. However, we do not want to enable the IP just so pinmux can do a disable-enable dance for the pin. For now, revert the offending patch while a correct solution is found. Fixes: cf517fef601b ("pinctrl: aspeed: Force to disable the function's signal") Link: https://github.com/openbmc/linux/issues/218 Signed-off-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20230130220845.917985-1-joel@jms.id.au Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-01-30Merge tag 'amlogic-arm-dt-for-v6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM mach-meson changes for v6.3: - align OPP table names with DT schema - meson8/8b: Add more L2 (PL310) cache properties - align LED node names with dtschema * tag 'amlogic-arm-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: meson8: align OPP table names with DT schema ARM: dts: meson8b: Add more L2 (PL310) cache properties ARM: dts: meson8: Add more L2 (PL310) cache properties ARM: dts: meson: align LED node names with dtschema Link: https://lore.kernel.org/r/61700737-c226-1c07-fba7-6dca896fdab4@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'amlogic-arm64-dt-for-v6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM64 DT changes for v6.3: - Merge of immutable bindings branch with Reset & power domain binding - New boards: - Odroid-N2L (Smaller version of Odroid-N2+) - BananaPi M2-Pro (Variant of BPI=M5 with on-board wifi) - Radxa Zero2 (New version of Radza Zero with A311D SoC) - Add DT node for the VIPNano-QI on the A311D - DT bindings fixups covering all SoC families - MAC address nodes - ethernet PHY node name - scpi & child node names - SD/SDIO node name - USB supply name - invalid clock-names - rng node name - rtc node name - ETH phy mux node name - button & adc keys node name - leds node names - RK818 pmic properties - remove CPU opps below 1GHz for G12A boards, like it was done for G12B/SM1 - Fix WiFi/Bt definition around P212 & Khadas VIM1 - Add audio node to P212 - Fix FAN trip definition to Odroid-HC4 - Fix gpio-fan gpios definition - Permit Radxa Zero OTG on USB1 - Fix VDDIO_C enable gpio by using OPEN DRAIN flag * tag 'amlogic-arm64-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: (43 commits) arm64: dts: meson: add support for Radxa Zero2 dt-bindings: arm: amlogic: add support for Radxa Zero2 arm64: dts: meson: add support for BananaPi M2-Pro dt-bindings: arm: amlogic: add support for BananaPi M2-Pro arm64: dts: meson: bananapi-m5: convert dts to dtsi arm64: dts: meson: bananapi-m5: remove redundant status from sound node arm64: dts: meson: bananapi-m5: switch VDDIO_C pin to OPEN_DRAIN arm64: dts: meson: radxa-zero: allow usb otg mode arm64: dts: meson-gxm-khadas-vim2: use gpio-fan matrix instead of an array arm64: dts: meson-g12b-odroid: Add initial support for Hardkernel ODROID-N2L arm64: dts: meson-g12b: move common node into new odroid.dtsi dt-bindings: arm: amlogic: document Odroid-N2L arm64: dts: amlogic: meson-sm1-odroid-hc4: fix active fan thermal trip arm64: dts: meson: add audio playback to S905X-P212 dts arm64: dts: meson: remove WiFi/BT nodes from Khadas VIM1 arm64: dts: meson: move pwm_ef node in P212 dtsi arm64: dts: meson: add Broadcom WiFi to P212 dtsi arm64: dts: amlogic: meson-g12b-odroid-go-ultra: fix rk818 pmic properties arm64: dts: amlogic: meson-gxbb-kii-pro: fix led node name arm64: dts: amlogic: meson-gxl-s905d-phicomm-n1: fix led node name ... Link: https://lore.kernel.org/r/c1641ffd-71c9-9ac9-89d9-c22da4acea10@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'imx-dt64-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree change for 6.3: - New board support: i.MX8MP Beacon Kit, Debix Model A Board, Verdin Yavia boards. - Add Flexcan and ADC support for i.MX93. - A series from Krzysztof Kozlowski to align LED node names with dtschema and use generic node name for rave-sp. - Move PCIe controller clock setup from board dts to SoC dtsi. - Add clock-cells to i.MX8MP hsio-blk-ctrl device. - Add TMU phandle to calibration data in OCOTP for i.MX8M. - Improve bluetooth UART on DH electronics i.MX8M Plus DHCOM. - Drop sd-vsel-gpios from i.MX8M Verdin SoM and DHCOM SoM. - A series from Peng Fan to improve iomuxc-gpr device for i.MX8M. - Declare IOMMU cache-coherent page table walk feature for LS1028A and LS1088A. - A few small corrections and random updates. * tag 'imx-dt64-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (50 commits) arm64: ls1046ardb: Use in-band-status for SFP module arm64: dts: imx8mp-verdin: Add yavia carrier board arm64: dts: imx8mm-verdin: Add yavia carrier board arm64: dts: imx8q: use generic node name for rave-sp arm64: dts: imx8mp-verdin-dev: Do not include dahlia dtsi arm64: dts: imx8mm-verdin-dev: Do not include dahlia dtsi arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus DHCOM SoM arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus Verdin SoM arm64: dts: imx8mm: Drop sd-vsel-gpios from i.MX8M Mini Verdin SoM arm64: dts: imx8mp: Improve bluetooth UART on DH electronics i.MX8M Plus DHCOM arm64: dts: freescale: Introduce imx8mp-beacon-kit arm64: dts: imx8mm-evk: use correct gpio-expander compatible arm64: dts: imx93: add ADC support arm64: dts: imx8mp: Reorder clock to match fsl,imx6q-pcie.yaml arm64: dts: imx8mq: Deduplicate PCIe clock-names property arm64: dts: imx8mm: Deduplicate PCIe clock-names property arm64: dts: verdin-imx8mp: unify gpio-key node name arm64: dts: ls1028a: sl28: get MAC addresses from VPD arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL arm64: dts: imx8mp: Add LCDIF2 & LDB nodes ... Link: https://lore.kernel.org/r/20230130023947.11780-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'imx-dt-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm device tree change for 6.3: - New board support: SK-iMX53, DHCOM i.MX6ULL based boards. - Increase MMC maximum frequency for i.MXRT1050. - A series from Krzysztof Kozlowski to align LED node names with dtschema, and use use generic node name for rave-sp device. - Use new media bus type macros for i.MX device trees. - A series from Marcel Ziswiler to improve gpio-key for Colibri and Apalis device trees. - A series from Marek Vasut to drop interrupt-names from dma-apb device. - A series from Philippe Schenker to disable USB over-current for Colibri and Apalis boards. - A few other small corrections and random changes. * tag 'imx-dt-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (29 commits) ARM: dts: imx6ull-dhcom: Add DHSOM based DRC02 board ARM: dts: imx6ull-dhcom: Add DHCOM based PicoITX board ARM: dts: imx6ull-dhcom: Add DH electronics DHCOM i.MX6ULL SoM and PDK2 board ARM: dts: imx7s: correct iomuxc gpr mux controller cells ARM: dts: imx: use generic node name for rave-sp ARM: dts: ls1021a: Disable CAN nodes by default ARM: dts: apalis/colibri-imx6/6ull/7: proper gpio-key node names ARM: dts: colibri-imx6ull: improve wake-up with gpio key ARM: dts: colibri-imx6: improve wake-up with gpio key ARM: dts: imx: e70k02: Add touchscreen ARM: dts: vfxxx: Swap SAI DMA order ARM: dts: freescale: Use new media bus type macros ARM: dts: tqma6ul + mba6ulx: Fix temperature sensor compatible ARM: dts: imx: Add support for SK-iMX53 board ARM: dts: imx7s: Drop dma-apb interrupt-names ARM: dts: imx6ul: Drop dma-apb interrupt-names ARM: dts: imx6sx: Drop dma-apb interrupt-names ARM: dts: imx6qdl: Drop dma-apb interrupt-names ARM: dts: mxs: Drop dma-apb interrupt-names ARM: dts: imx6qdl: use MAC-address from nvmem ... Link: https://lore.kernel.org/r/20230130023947.11780-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'imx-bindings-6.3' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings for 6.3: - New board compatibles: Beacon EmbeddedWorks i.MX8M Plus kit, DHCOM PDK2, PicoITX and DRC02, Enumerate Debix, Starterkit SK-iMX53, verdin yavia carrier-board. - Add vendor prefix for Polyhex Technology Co. - A series from Krzysztof Kozlowski to fix up fsl,imx-gpc bindings. - Add clock cells for imx8mp-hsio-blk-ctrl bindings. - A series from Marek Vasut to shuffle i.MX8MM board entries. - A couple changes from Stefan Wahren to update compatibles for i.MX28 based boards. * tag 'imx-bindings-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add verdin yavia carrier-board dt-bindings: arm: fsl: Add PDK2, PicoITX and DRC02 boards for the DHCOM i.MX6ULL SoM dt-bindings: arm: Document the rest of i.MX28 based boards dt-bindings: arm: fsl: Fix bindings for APF28Dev board dt-bindings: power: fsl,imx-gpc: document interrupt-controller dt-bindings: power: fsl,imx-gpc: correct compatibles dt-bindings: power: fsl,imx-gpc: document fsl,imx6ul-gpc compatible dt-bindings: arm: Add Beacon EmbeddedWorks i.MX8M Plus kit dt-bindings: arm: Move i.MX8MM Cloos PHG Board to TQM entry dt-bindings: arm: Split i.MX8M Plus DHCOM based boards dt-bindings: arm: Split i.MX8M Mini NITROGEN SoM based boards dt-bindings: arm: Move MX8Menlo board to i.MX8M Mini Toradex Verdin SoM entry dt-bindings: soc: imx: add IOMUXC GPR support dt-bindings: arm: fsl: Add the Starterkit SK-iMX53 board dt-bindings: vendor-prefixes: add Startkit dt-bindings: soc: imx8mp-hsio-blk-ctrl: add clock cells dt-bindings: arm: fsl: Enumerate Debix Model A Board dt-bindings: vendor-prefixes: Add Polyhex Technology Co. Link: https://lore.kernel.org/r/20230130023947.11780-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'dt-cleanup-6.3-2' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM DTS for v6.3, part two Align UART node names and OPP table names with bindings (alpine, arm boards, axm55xx, berlin, cx92755, dm814x, moxart, mstar, stih418). * tag 'dt-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: berlin: align UART node name with bindings ARM: dts: stih418: align OPP table names with DT schema ARM: dts: dm814x: align UART node name with bindings ARM: dts: moxart: align UART node name with bindings ARM: dts: axm55xx: align UART node name with bindings ARM: dts: alpine: align UART node name with bindings ARM: dts: arm: align UART node name with bindings ARM: dts: cx92755: align UART node name with bindings ARM: dts: mstar: align UART node name with bindings Link: https://lore.kernel.org/r/20230129144525.5802-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'dt64-cleanup-6.3-2' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM64 DTS for v6.3, part two 1. Drop deprecated "device_type" property from serial nodes (apm, amazon). 2. Align UART node names and OPP table names with bindings (hisilicon, realtek, synaptics). 3. Use "okay" for status, as expected by Devicetree specification and dtschema. * tag 'dt64-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: dts: amd: use "okay" for status arm64: dts: apm: use "okay" for status arm64: dts: microchip: use "okay" for status arm64: dts: synaptics: align UART node name with bindings arm64: dts: hisilicon: align UART node name with bindings arm64: dts: realtek: align UART node name with bindings arm64: dts: amazon: drop deprecated serial device_type arm64: dts: apm: drop deprecated serial device_type Link: https://lore.kernel.org/r/20230129144525.5802-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'samsung-dt64-6.3-2' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v6.3, part two Big cleanup and rework towards achieving zero-warning of dtbs_check and dtc W=1: - drop or correct incorrect properties in several boards, - add dummy regulator supplies when necessary to fullfil bindings requirements, - use lowercase hex, - move non-MMIO exynos-bus nodes out of soc node, - add unit address to USB DWC3 nodes. * tag 'samsung-dt64-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos7 arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos5433 arm64: dts: exynos: move exynos-bus nodes out of soc in Exynos5433 arm64: dts: exynos: use lowercase hex addresses arm64: dts: exynos: correct wlf,micd-dbtime on TM2 arm64: dts: exynos: add interrupt-controller to WM5110 on TM2 arm64: dts: exynos: add VPH_PWR regulator on TM2 arm64: dts: exynos: correct Bluetooth LED triger on E850-96 arm64: dts: exynos: add ADC supply on Exynos7 Espresso arm64: dts: exynos: disable non-working GPU on Exynos7 Espresso arm64: dts: exynos: drop unsupported UFS properties in ExynosAutov9 SADK Link: https://lore.kernel.org/r/20230129143944.5104-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'samsung-dt-6.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v6.3 1. Big cleanup and rework towards achieving zero-warning of dtbs_check and dtc W=1: - align node names with the bindings, - drop or correct incorrect properties in several boards, - correct HDMI bridge ports nodes on Exynos4412 Midas, - add dummy regulator supplies when necessary to fullfil bindings requirements, - use lowercase hex, - move non-MMIO exynos-bus nodes out of soc node, - add unit address to USB DWC3 nodes. 2. Correct Exynos5420 MIPI DSI and phy compatibles. 3. Correct Exynos4210 and Exynos4412 HDMI phy compatibles. 4. Add Samsung Galaxy S5 (SM-G900H) board. * tag 'samsung-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (27 commits) ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos54xx ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos5250 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4412 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4210 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos3250 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos5420 ARM: dts: exynos: use lowercase hex addresses ARM: dts: exynos: use generic node names for phy ARM: dts: exynos: correct HDMI phy compatible in Exynos4 ARM: dts: exynos: Add Samsung Galaxy S5 (SM-G900H) board dt-bindings: arm: samsung: Add compatible for Samsung Galaxy S5 (SM-G900H) ARM: dts: exynos: Use Exynos5422 compatible for the DSI controller ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy ARM: dts: exynos: correct HSI2C properties in Exynos5410 Odroid XU ARM: dts: exynos: correct HS200 property in Exynos5260 ARM: dts: exynos: correct SATA clocks in Exynos5250 ARM: dts: exynos: align HSOTG/USB node names ARM: dts: exynos: add backlight supply in P4 Note ARM: dts: exynos: add panel supply in Tiny4412 ARM: dts: exynos: add ports in HDMI bridge in Exynos4412 Midas ... Link: https://lore.kernel.org/r/20230129143944.5104-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'arm-soc/for-6.3/devicetree-arm64' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64 SoCs Device Tree updates for 6.3, please pull the following: - Krzysztof aligns the SMMMU Device Tree nodes to use the desired regular expression matched by the dtschema and he also removes the deprecated "device_type" property for serial node(s) * tag 'arm-soc/for-6.3/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: drop deprecated serial device_type arm64: dts: broadcom: align SMMU node names with DT schema Link: https://lore.kernel.org/r/20230128193834.1628831-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Merge tag 'arm-soc/for-6.3/devicetree' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM SoCs Device Tree updates for 6.3, please pull the following: - Krzysztof aligns the various Broadcom SoCs DTS UART nodes with the binding convention to use "serial" * tag 'arm-soc/for-6.3/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: broadcom: align UART node name with bindings Link: https://lore.kernel.org/r/20230128193829.1628773-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30kunit: fix bug in KUNIT_EXPECT_MEMEQRae Moar
In KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ, add check if one of the inputs is NULL and fail if this is the case. Currently, the kernel crashes if one of the inputs is NULL. Instead, fail the test and add an appropriate error message. Fixes: b8a926bea8b1 ("kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros") This was found by the kernel test robot: https://lore.kernel.org/all/202212191448.D6EDPdOh-lkp@intel.com/ Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Rae Moar <rmoar@google.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>