linux-2.6-block.git
3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/abelvesa/linux.git

3 years agoMerge branch 'clk-next' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'clk-next' of git://git./linux/kernel/git/clk/linux.git

3 years agoMerge branch 'for-next' of git://github.com/Xilinx/linux-xlnx.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://github.com/Xilinx/linux-xlnx.git

3 years agoMerge branch 'ti-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'ti-next' of git://git./linux/kernel/git/ti/linux.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/tegra/linux.git

3 years agoMerge branch 'next' of https://git.linaro.org/people/jens.wiklander/linux-tee.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'next' of https://git.linaro.org/people/jens.wiklander/linux-tee.git

3 years agoMerge branch 'sunxi/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'sunxi/for-next' of git://git./linux/kernel/git/sunxi/linux.git

3 years agoMerge branch 'stm32-next' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'stm32-next' of git://git./linux/kernel/git/atorgue/stm32.git

3 years agoMerge branch 'for-linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:37 +0000 (09:43 +1100)]
Merge branch 'for-linux-next' of git://git./linux/kernel/git/sudeep.holla/linux.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:37 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/krzk/linux.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:37 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/mmind/linux-rockchip.git

3 years agoMerge branch 'reset/next' of https://git.pengutronix.de/git/pza/linux
Stephen Rothwell [Wed, 16 Feb 2022 22:43:36 +0000 (09:43 +1100)]
Merge branch 'reset/next' of https://git.pengutronix.de/git/pza/linux

3 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:36 +0000 (09:43 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/geert/renesas-devel.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nsaenz/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:36 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/nsaenz/linux-rpi.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:35 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/qcom/linux.git

# Conflicts:
# arch/arm64/configs/defconfig

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:35 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/tmlind/linux-omap.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:34 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/gclement/mvebu.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:34 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/matthias.bgg/linux.git

3 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:34 +0000 (09:43 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/ssantosh/linux-keystone.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:33 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/shawnguo/linux.git

3 years agoMerge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:33 +0000 (09:43 +1100)]
Merge branch 'for-next' of https://git./linux/kernel/git/krzk/linux-mem-ctrl.git

3 years agoMerge branch 'at91-next' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:31 +0000 (09:43 +1100)]
Merge branch 'at91-next' of git://git./linux/kernel/git/at91/linux.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:31 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/joel/bmc.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:31 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/amlogic/linux.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:30 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/mani/linux-actions.git

3 years agoMerge branch 'for-next/core' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
Stephen Rothwell [Wed, 16 Feb 2022 22:43:30 +0000 (09:43 +1100)]
Merge branch 'for-next/core' of git://git./linux/kernel/git/arm64/linux

3 years agoMerge branch 'for-next' of git://git.armlinux.org.uk/~rmk/linux-arm.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:30 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git.armlinux.org.uk/~rmk/linux-arm.git

# Conflicts:
# arch/arm/Kconfig

3 years agoMerge branch 'for-next' of git://git.infradead.org/users/hch/dma-mapping.git
Stephen Rothwell [Wed, 16 Feb 2022 22:41:24 +0000 (09:41 +1100)]
Merge branch 'for-next' of git://git.infradead.org/users/hch/dma-mapping.git

3 years agoMerge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:40:13 +0000 (09:40 +1100)]
Merge branch 'perf/core' of git://git./linux/kernel/git/acme/linux.git

3 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Stephen Rothwell [Wed, 16 Feb 2022 22:39:01 +0000 (09:39 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/masahiroy/linux-kbuild.git

3 years agoMerge branch 'for-next/kspp' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavo...
Stephen Rothwell [Wed, 16 Feb 2022 22:33:55 +0000 (09:33 +1100)]
Merge branch 'for-next/kspp' of git://git./linux/kernel/git/gustavoars/linux.git

3 years agoMerge branch 'for-next/kspp' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
Stephen Rothwell [Wed, 16 Feb 2022 22:17:43 +0000 (09:17 +1100)]
Merge branch 'for-next/kspp' of git://git./linux/kernel/git/kees/linux.git

3 years agoMerge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc
Stephen Rothwell [Wed, 16 Feb 2022 22:04:49 +0000 (09:04 +1100)]
Merge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc

3 years agoMerge branch 'zstd-linus' of https://github.com/terrelln/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:49 +0000 (09:04 +1100)]
Merge branch 'zstd-linus' of https://github.com/terrelln/linux.git

3 years agoMerge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:48 +0000 (09:04 +1100)]
Merge branch 'perf/urgent' of git://git./linux/kernel/git/acme/linux.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:48 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/rw/ubifs.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:47 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/pinctrl/intel.git

3 years agoMerge branch 'gpio/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:47 +0000 (09:04 +1100)]
Merge branch 'gpio/for-current' of git://git./linux/kernel/git/brgl/linux.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:47 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/riscv/linux.git

3 years agoMerge branch 'rtc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:46 +0000 (09:04 +1100)]
Merge branch 'rtc-fixes' of git://git./linux/kernel/git/abelloni/linux.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:46 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/ulfh/mmc.git

3 years agoMerge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm-intel
Stephen Rothwell [Wed, 16 Feb 2022 22:04:46 +0000 (09:04 +1100)]
Merge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm-intel

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:45 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/mkp/scsi.git

3 years agoMerge branch 'dt/linus' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:45 +0000 (09:04 +1100)]
Merge branch 'dt/linus' of git://git./linux/kernel/git/robh/linux.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:45 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/pdx86/platform-drivers-x86.git

3 years agoMerge branch 'next-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:44 +0000 (09:04 +1100)]
Merge branch 'next-fixes' of git://git./linux/kernel/git/kdave/linux.git

3 years agoMerge branch 'hwmon' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:44 +0000 (09:04 +1100)]
Merge branch 'hwmon' of git://git./linux/kernel/git/groeck/linux-staging.git

3 years agoMerge branch 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:44 +0000 (09:04 +1100)]
Merge branch 'at91-fixes' of git://git./linux/kernel/git/at91/linux.git

3 years agoMerge branch 'mips-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:43 +0000 (09:04 +1100)]
Merge branch 'mips-fixes' of git://git./linux/kernel/git/mips/linux.git

3 years agoMerge branch 'fixes' of git://linuxtv.org/mchehab/media-next.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:43 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://linuxtv.org/mchehab/media-next.git

3 years agoMerge branch 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:43 +0000 (09:04 +1100)]
Merge branch 'mtd/fixes' of git://git./linux/kernel/git/mtd/linux.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:42 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/vkoul/dmaengine.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:42 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/shuah/linux-kselftest.git

3 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:42 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input.git

3 years agoMerge branch 'fixes-togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:41 +0000 (09:04 +1100)]
Merge branch 'fixes-togreg' of git://git./linux/kernel/git/jic23/iio.git

3 years agoMerge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:41 +0000 (09:04 +1100)]
Merge branch 'staging-linus' of git://git./linux/kernel/git/gregkh/staging.git

3 years agoMerge branch 'for-usb-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/peter...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:41 +0000 (09:04 +1100)]
Merge branch 'for-usb-fixes' of git://git./linux/kernel/git/peter.chen/usb.git

# Conflicts:
# drivers/usb/chipidea/ci_hdrc_imx.c

3 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:40 +0000 (09:04 +1100)]
Merge branch 'usb-linus' of git://git./linux/kernel/git/gregkh/usb.git

3 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:40 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/helgaas/pci.git

3 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/spi.git

3 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regulator.git

3 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/sound.git

3 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound.git

3 years agoMerge branch 'main' of git git://git.kernel.org/pub/scm/linux/kernel/git/wireless...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:38 +0000 (09:04 +1100)]
Merge branch 'main' of git git://git./linux/kernel/git/wireless/wireless.git

3 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:38 +0000 (09:04 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/klassert/ipsec.git

3 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:38 +0000 (09:04 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/bpf/bpf.git

3 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:37 +0000 (09:04 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/netdev/net.git

3 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:37 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/powerpc/linux.git

3 years agoMerge branch 'fixes' of https://git.linaro.org/people/jens.wiklander/linux-tee.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:37 +0000 (09:04 +1100)]
Merge branch 'fixes' of https://git.linaro.org/people/jens.wiklander/linux-tee.git

3 years agoMerge branch 'for-next/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
Stephen Rothwell [Wed, 16 Feb 2022 22:04:36 +0000 (09:04 +1100)]
Merge branch 'for-next/fixes' of git://git./linux/kernel/git/arm64/linux

3 years agoMerge branch 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:36 +0000 (09:04 +1100)]
Merge branch 'for-curr' of git://git./linux/kernel/git/vgupta/arc.git

3 years agobpf: Fix crash due to out of bounds access into reg2btf_ids.
Kumar Kartikeya Dwivedi [Wed, 16 Feb 2022 20:19:43 +0000 (01:49 +0530)]
bpf: Fix crash due to out of bounds access into reg2btf_ids.

When commit e6ac2450d6de ("bpf: Support bpf program calling kernel function") added
kfunc support, it defined reg2btf_ids as a cheap way to translate the verifier
reg type to the appropriate btf_vmlinux BTF ID, however
commit c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL")
moved the __BPF_REG_TYPE_MAX from the last member of bpf_reg_type enum to after
the base register types, and defined other variants using type flag
composition. However, now, the direct usage of reg->type to index into
reg2btf_ids may no longer fall into __BPF_REG_TYPE_MAX range, and hence lead to
out of bounds access and kernel crash on dereference of bad pointer.

Fixes: c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220216201943.624869-1-memxor@gmail.com
3 years agoMerge branch 'for-next/kspp-fam0' into for-next/kspp
Gustavo A. R. Silva [Wed, 16 Feb 2022 20:25:50 +0000 (14:25 -0600)]
Merge branch 'for-next/kspp-fam0' into for-next/kspp

3 years agotreewide: Replace zero-length arrays with flexible-array members
Gustavo A. R. Silva [Tue, 15 Feb 2022 01:11:44 +0000 (19:11 -0600)]
treewide: Replace zero-length arrays with flexible-array members

There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].

This code was transformed with the help of Coccinelle:
(next-20220214$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch)

@@
identifier S, member, array;
type T1, T2;
@@

struct S {
  ...
  T1 member;
  T2 array[
- 0
  ];
};

UAPI and wireless changes were intentionally excluded from this patch
and will be sent out separately.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
3 years agoMIPS: smp: fill in sibling and core maps earlier
Alexander Lobakin [Sat, 12 Feb 2022 22:21:11 +0000 (22:21 +0000)]
MIPS: smp: fill in sibling and core maps earlier

After enabling CONFIG_SCHED_CORE (landed during 5.14 cycle),
2-core 2-thread-per-core interAptiv (CPS-driven) started emitting
the following:

[    0.025698] CPU1 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.048183] ------------[ cut here ]------------
[    0.048187] WARNING: CPU: 1 PID: 0 at kernel/sched/core.c:6025 sched_core_cpu_starting+0x198/0x240
[    0.048220] Modules linked in:
[    0.048233] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.17.0-rc3+ #35 b7b319f24073fd9a3c2aa7ad15fb7993eec0b26f
[    0.048247] Stack : 817f0000 00000004 327804c8 810eb050 00000000 00000004 00000000 c314fdd1
[    0.048278]         830cbd64 819c0000 81800000 817f0000 83070bf4 00000001 830cbd08 00000000
[    0.048307]         00000000 00000000 815fcbc4 00000000 00000000 00000000 00000000 00000000
[    0.048334]         00000000 00000000 00000000 00000000 817f0000 00000000 00000000 817f6f34
[    0.048361]         817f0000 818a3c00 817f0000 00000004 00000000 00000000 4dc33260 0018c933
[    0.048389]         ...
[    0.048396] Call Trace:
[    0.048399] [<8105a7bc>] show_stack+0x3c/0x140
[    0.048424] [<8131c2a0>] dump_stack_lvl+0x60/0x80
[    0.048440] [<8108b5c0>] __warn+0xc0/0xf4
[    0.048454] [<8108b658>] warn_slowpath_fmt+0x64/0x10c
[    0.048467] [<810bd418>] sched_core_cpu_starting+0x198/0x240
[    0.048483] [<810c6514>] sched_cpu_starting+0x14/0x80
[    0.048497] [<8108c0f8>] cpuhp_invoke_callback_range+0x78/0x140
[    0.048510] [<8108d914>] notify_cpu_starting+0x94/0x140
[    0.048523] [<8106593c>] start_secondary+0xbc/0x280
[    0.048539]
[    0.048543] ---[ end trace 0000000000000000 ]---
[    0.048636] Synchronize counters for CPU 1: done.

...for each but CPU 0/boot.
Basic debug printks right before the mentioned line say:

[    0.048170] CPU: 1, smt_mask:

So smt_mask, which is sibling mask obviously, is empty when entering
the function.
This is critical, as sched_core_cpu_starting() calculates
core-scheduling parameters only once per CPU start, and it's crucial
to have all the parameters filled in at that moment (at least it
uses cpu_smt_mask() which in fact is `&cpu_sibling_map[cpu]` on
MIPS).

A bit of debugging led me to that set_cpu_sibling_map() performing
the actual map calculation, was being invocated after
notify_cpu_start(), and exactly the latter function starts CPU HP
callback round (sched_core_cpu_starting() is basically a CPU HP
callback).
While the flow is same on ARM64 (maps after the notifier, although
before calling set_cpu_online()), x86 started calculating sibling
maps earlier than starting the CPU HP callbacks in Linux 4.14 (see
[0] for the reference). Neither me nor my brief tests couldn't find
any potential caveats in calculating the maps right after performing
delay calibration, but the WARN splat is now gone.
The very same debug prints now yield exactly what I expected from
them:

[    0.048433] CPU: 1, smt_mask: 0-1

[0] https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=76ce7cfe35ef

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
3 years agoMIPS: ralink: mt7621: do memory detection on KSEG1
Chuanhong Guo [Fri, 11 Feb 2022 00:13:44 +0000 (08:13 +0800)]
MIPS: ralink: mt7621: do memory detection on KSEG1

It's reported that current memory detection code occasionally detects
larger memory under some bootloaders.
Current memory detection code tests whether address space wraps around
on KSEG0, which is unreliable because it's cached.

Rewrite memory size detection to perform the same test on KSEG1 instead.
While at it, this patch also does the following two things:
1. use a fixed pattern instead of a random function pointer as the magic
   value.
2. add an additional memory write and a second comparison as part of the
   test to prevent possible smaller memory detection result due to
   leftover values in memory.

Fixes: 139c949f7f0a MIPS: ("ralink: mt7621: add memory detection support")
Reported-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Tested-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
3 years agotty: n_tty: do not look ahead for EOL character past the end of the buffer
Linus Torvalds [Tue, 15 Feb 2022 23:28:00 +0000 (15:28 -0800)]
tty: n_tty: do not look ahead for EOL character past the end of the buffer

Daniel Gibson reports that the n_tty code gets line termination wrong in
very specific cases:

 "If you feed a line with exactly 64 chars + terminating newline, and
  directly afterwards (without reading) another line into a pseudo
  terminal, the the first read() on the other side will return the 64
  char line *without* terminating newline, and the next read() will
  return the missing terminating newline AND the complete next line (if
  it fits in the buffer)"

and bisected the behavior to commit 3b830a9c34d5 ("tty: convert
tty_ldisc_ops 'read()' function to take a kernel pointer").

Now, digging deeper, it turns out that the behavior isn't exactly new:
what changed in commit 3b830a9c34d5 was that the tty line discipline
.read() function is now passed an intermediate kernel buffer rather than
the final user space buffer.

And that intermediate kernel buffer is 64 bytes in size - thus that
special case with exactly 64 bytes plus terminating newline.

The same problem did exist before, but historically the boundary was not
the 64-byte chunk, but the user-supplied buffer size, which is obviously
generally bigger (and potentially bigger than N_TTY_BUF_SIZE, which
would hide the issue entirely).

The reason is that the n_tty canon_copy_from_read_buf() code would look
ahead for the EOL character one byte further than it would actually
copy.  It would then decide that it had found the terminator, and unmark
it as an EOL character - which in turn explains why the next read
wouldn't then be terminated by it.

Now, the reason it did all this in the first place is related to some
historical and pretty obscure EOF behavior, see commit ac8f3bf8832a
("n_tty: Fix poll() after buffer-limited eof push read") and commit
40d5e0905a03 ("n_tty: Fix EOF push handling").

And the reason for the EOL confusion is that we treat EOF as a special
EOL condition, with the EOL character being NUL (aka "__DISABLED_CHAR"
in the kernel sources).

So that EOF look-ahead also affects the normal EOL handling.

This patch just removes the look-ahead that causes problems, because EOL
is much more critical than the historical "EOF in the middle of a line
that coincides with the end of the buffer" handling ever was.

Now, it is possible that we should indeed re-introduce the "look at next
character to see if it's a EOF" behavior, but if so, that should be done
not at the kernel buffer chunk boundary in canon_copy_from_read_buf(),
but at a higher level, when we run out of the user buffer.

In particular, the place to do that would be at the top of
'n_tty_read()', where we check if it's a continuation of a previously
started read, and there is no more buffer space left, we could decide to
just eat the __DISABLED_CHAR at that point.

But that would be a separate patch, because I suspect nobody actually
cares, and I'd like to get a report about it before bothering.

Fixes: 3b830a9c34d5 ("tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer")
Fixes: ac8f3bf8832a ("n_tty: Fix  poll() after buffer-limited eof push read")
Fixes: 40d5e0905a03 ("n_tty: Fix EOF push handling")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215611
Reported-and-tested-by: Daniel Gibson <metalcaedes@gmail.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 years agoMerge remote-tracking branch 'spi/for-5.16' into spi-linus
Mark Brown [Wed, 16 Feb 2022 18:01:41 +0000 (18:01 +0000)]
Merge remote-tracking branch 'spi/for-5.16' into spi-linus

3 years agoMerge branch 'ti-k3-dts-next' into ti-next
Nishanth Menon [Wed, 16 Feb 2022 16:37:03 +0000 (10:37 -0600)]
Merge branch 'ti-k3-dts-next' into ti-next

Signed-off-by: Nishanth Menon <nm@ti.com>
3 years agoASoC: cs4265: Fix the duplicated control name
Fabio Estevam [Tue, 15 Feb 2022 12:05:14 +0000 (09:05 -0300)]
ASoC: cs4265: Fix the duplicated control name

Currently, the following error messages are seen during boot:

asoc-simple-card sound: control 2:0:0:SPDIF Switch:0 is already present
cs4265 1-004f: ASoC: failed to add widget SPDIF dapm kcontrol SPDIF Switch: -16

Quoting Mark Brown:

"The driver is just plain buggy, it defines both a regular SPIDF Switch
control and a SND_SOC_DAPM_SWITCH() called SPDIF both of which will
create an identically named control, it can never have loaded without
error.  One or both of those has to be renamed or they need to be
merged into one thing."

Fix the duplicated control name by combining the two SPDIF controls here
and move the register bits onto the DAPM widget and have DAPM control them.

Fixes: f853d6b3ba34 ("ASoC: cs4265: Add a S/PDIF enable switch")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220215120514.1760628-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ops: Shift tested values in snd_soc_put_volsw() by +min
Marek Vasut [Tue, 15 Feb 2022 13:06:45 +0000 (14:06 +0100)]
ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min

While the $val/$val2 values passed in from userspace are always >= 0
integers, the limits of the control can be signed integers and the $min
can be non-zero and less than zero. To correctly validate $val/$val2
against platform_max, add the $min offset to val first.

Fixes: 817f7c9335ec0 ("ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220215130645.164025-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoarm64: dts: ti: k3-am64: Add ESM0 to device memory map
Hari Nagalla [Thu, 10 Feb 2022 17:22:46 +0000 (11:22 -0600)]
arm64: dts: ti: k3-am64: Add ESM0 to device memory map

AM64x SoCs have two ESM modules, with one in MAIN voltage domain and the
other in MCU voltage domain. The error output from Main ESM module can
be routed to the MCU ESM module. The error output of MCU ESM can be
configured to reset the device. The MCU ESM configuration address space
is already opened and this patch opens the MAIN ESM configuration
address space.

For ESM details please refer technical reference manual at
https://www.ti.com/lit/pdf/spruim2

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Link: https://lore.kernel.org/r/20220210172246.27871-1-hnagalla@ti.com
3 years agoarm64: dts: ti: k3-am65*: Remove #address-cells/#size-cells from flash nodes
Matthias Schiffer [Thu, 3 Feb 2022 14:02:40 +0000 (15:02 +0100)]
arm64: dts: ti: k3-am65*: Remove #address-cells/#size-cells from flash nodes

Specifying partitions directly in the flash node is deprecated, a
fixed-partitions node should be used instead. Therefore, it doesn't
make sense to have these properties in the flash nodes.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Link: https://lore.kernel.org/r/20220203140240.973690-2-matthias.schiffer@ew.tq-group.com
3 years agoMerge branch for-5.18/arm64/defconfig into for-next
Thierry Reding [Wed, 16 Feb 2022 15:51:07 +0000 (16:51 +0100)]
Merge branch for-5.18/arm64/defconfig into for-next

3 years agoMerge branch for-5.18/arm64/dt into for-next
Thierry Reding [Wed, 16 Feb 2022 15:51:07 +0000 (16:51 +0100)]
Merge branch for-5.18/arm64/dt into for-next

3 years agoMerge branch for-5.18/dt-bindings into for-next
Thierry Reding [Wed, 16 Feb 2022 15:51:07 +0000 (16:51 +0100)]
Merge branch for-5.18/dt-bindings into for-next

3 years agoMerge branch for-5.18/soc into for-next
Thierry Reding [Wed, 16 Feb 2022 15:51:07 +0000 (16:51 +0100)]
Merge branch for-5.18/soc into for-next

3 years agoMerge branch for-5.18/memory into for-next
Thierry Reding [Wed, 16 Feb 2022 15:51:07 +0000 (16:51 +0100)]
Merge branch for-5.18/memory into for-next

3 years agoMerge branch for-5.17/soc into for-next
Thierry Reding [Wed, 16 Feb 2022 15:51:06 +0000 (16:51 +0100)]
Merge branch for-5.17/soc into for-next

3 years agoarm64: tegra: Add Tegra234 IOMMUs
Thierry Reding [Mon, 8 Nov 2021 12:35:23 +0000 (13:35 +0100)]
arm64: tegra: Add Tegra234 IOMMUs

The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by
isochronous memory clients and two dual-instance ARM SMMUs used by non-
isochronous memory clients.

Add the corresponding device tree nodes and hook up existing memory
clients (SDHCI and BPMP).

Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agoarm64: tegra: Enable gpio-keys on Jetson AGX Orin Developer Kit
Thierry Reding [Mon, 8 Nov 2021 12:22:00 +0000 (13:22 +0100)]
arm64: tegra: Enable gpio-keys on Jetson AGX Orin Developer Kit

Expose power, force-recovery and sleep buttons via a gpio-keys device so
that userspace can receive events from them.

Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agoarm64: defconfig: tegra: Enable GPCDMA
Akhil R [Mon, 7 Feb 2022 15:01:33 +0000 (20:31 +0530)]
arm64: defconfig: tegra: Enable GPCDMA

Enable TEGRA_GPC_DMA in defconfig for Tegra186 and Tegra196 gpc
dma controller driver

Signed-off-by: Rajesh Gumasta <rgumasta@nvidia.com>
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agoarm64: tegra: Add GPCDMA node for tegra186 and tegra194
Akhil R [Mon, 7 Feb 2022 15:01:34 +0000 (20:31 +0530)]
arm64: tegra: Add GPCDMA node for tegra186 and tegra194

Add device tree node for GPCDMA controller on Tegra186 target
and Tegra194 target.

Signed-off-by: Rajesh Gumasta <rgumasta@nvidia.com>
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agogpio: rockchip: Reset int_bothedge when changing trigger
Samuel Holland [Sat, 12 Feb 2022 20:50:48 +0000 (14:50 -0600)]
gpio: rockchip: Reset int_bothedge when changing trigger

With v2 hardware, an IRQ can be configured to trigger on both edges via
a bit in the int_bothedge register. Currently, the driver sets this bit
when changing the trigger type to IRQ_TYPE_EDGE_BOTH, but fails to reset
this bit if the trigger type is later changed to something else. This
causes spurious IRQs, and when using gpio-keys with wakeup-event-action
set to EV_ACT_(DE)ASSERTED, those IRQs translate into spurious wakeups.

Fixes: 3bcbd1a85b68 ("gpio/rockchip: support next version gpio controller")
Reported-by: Guillaume Savaton <guillaume@baierouge.fr>
Tested-by: Guillaume Savaton <guillaume@baierouge.fr>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
3 years agomac80211: fix forwarded mesh frames AC & queue selection
Nicolas Escande [Mon, 14 Feb 2022 17:32:14 +0000 (18:32 +0100)]
mac80211: fix forwarded mesh frames AC & queue selection

There are two problems with the current code that have been highlighted
with the AQL feature that is now enbaled by default.

First problem is in ieee80211_rx_h_mesh_fwding(),
ieee80211_select_queue_80211() is used on received packets to choose
the sending AC queue of the forwarding packet although this function
should only be called on TX packet (it uses ieee80211_tx_info).
This ends with forwarded mesh packets been sent on unrelated random AC
queue. To fix that, AC queue can directly be infered from skb->priority
which has been extracted from QOS info (see ieee80211_parse_qos()).

Second problem is the value of queue_mapping set on forwarded mesh
frames via skb_set_queue_mapping() is not the AC of the packet but a
hardware queue index. This may or may not work depending on AC to HW
queue mapping which is driver specific.

Both of these issues lead to improper AC selection while forwarding
mesh packets but more importantly due to improper airtime accounting
(which is done on a per STA, per AC basis) caused traffic stall with
the introduction of AQL.

Fixes: cf44012810cc ("mac80211: fix unnecessary frame drops in mesh fwding")
Fixes: d3c1597b8d1b ("mac80211: fix forwarded mesh frame queue mapping")
Co-developed-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
Link: https://lore.kernel.org/r/20220214173214.368862-1-nico.escande@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agomac80211: refuse aggregations sessions before authorized
Johannes Berg [Thu, 3 Feb 2022 19:15:29 +0000 (20:15 +0100)]
mac80211: refuse aggregations sessions before authorized

If an MFP station isn't authorized, the receiver will (or
at least should) drop the action frame since it's a robust
management frame, but if we're not authorized we haven't
installed keys yet. Refuse attempts to start a session as
they'd just time out.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20220203201528.ff4d5679dce9.I34bb1f2bc341e161af2d6faf74f91b332ba11285@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agomac80211: fix EAPoL rekey fail in 802.3 rx path
Deren Wu [Sat, 12 Feb 2022 16:20:15 +0000 (00:20 +0800)]
mac80211: fix EAPoL rekey fail in 802.3 rx path

mac80211 set capability NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211
to upper layer by default. That means we should pass EAPoL packets through
nl80211 path only, and should not send the EAPoL skb to netdevice diretly.
At the meanwhile, wpa_supplicant would not register sock to listen EAPoL
skb on the netdevice.

However, there is no control_port_protocol handler in mac80211 for 802.3 RX
packets, mac80211 driver would pass up the EAPoL rekey frame to netdevice
and wpa_supplicant would be never interactive with this kind of packets,
if SUPPORTS_RX_DECAP_OFFLOAD is enabled. This causes STA always rekey fail
if EAPoL frame go through 802.3 path.

To avoid this problem, align the same process as 802.11 type to handle
this frame before put it into network stack.

This also addresses a potential security issue in 802.3 RX mode that was
previously fixed in commit a8c4d76a8dd4 ("mac80211: do not accept/forward
invalid EAPOL frames").

Cc: stable@vger.kernel.org # 5.12+
Fixes: 80a915ec4427 ("mac80211: add rx decapsulation offload support")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Link: https://lore.kernel.org/r/6889c9fced5859ebb088564035f84fd0fa792a49.1644680751.git.deren.wu@mediatek.com
[fix typos, update comment and add note about security issue]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agomemory: tegra: Add Tegra234 support
Thierry Reding [Mon, 13 Dec 2021 16:21:48 +0000 (17:21 +0100)]
memory: tegra: Add Tegra234 support

The memory controller and external memory controller found on Tegra234
is similar to the version found on earlier SoCs but supports a number of
new memory clients.

Add initial memory client definitions for the Tegra234 so that the SMMU
stream ID override registers can be properly programmed at boot time.

Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agodrm/atomic: Don't pollute crtc_state->mode_blob with error pointers
Ville Syrjälä [Wed, 9 Feb 2022 09:19:27 +0000 (11:19 +0200)]
drm/atomic: Don't pollute crtc_state->mode_blob with error pointers

Make sure we don't assign an error pointer to crtc_state->mode_blob
as that will break all kinds of places that assume either NULL or a
valid pointer (eg. drm_property_blob_put()).

Cc: stable@vger.kernel.org
Reported-by: fuyufan <fuyufan@huawei.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220209091928.14766-1-ville.syrjala@linux.intel.com
Acked-by: Maxime Ripard <maxime@cerno.tech>
3 years agoMerge branch 'tee_shm_for_v5.18' into next
Jens Wiklander [Wed, 16 Feb 2022 06:51:34 +0000 (07:51 +0100)]
Merge branch 'tee_shm_for_v5.18' into next