]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
4 years agoMerge remote-tracking branch 'ti-k3/ti-k3-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:31 +0000 (09:41 +1000)]
Merge remote-tracking branch 'ti-k3/ti-k3-next'

4 years agoMerge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:27 +0000 (09:41 +1000)]
Merge remote-tracking branch 'tegra/for-next'

4 years agoMerge remote-tracking branch 'sunxi/sunxi/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:26 +0000 (09:41 +1000)]
Merge remote-tracking branch 'sunxi/sunxi/for-next'

4 years agoMerge remote-tracking branch 'scmi/for-linux-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:24 +0000 (09:41 +1000)]
Merge remote-tracking branch 'scmi/for-linux-next'

4 years agoMerge remote-tracking branch 'samsung-krzk/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:22 +0000 (09:41 +1000)]
Merge remote-tracking branch 'samsung-krzk/for-next'

4 years agoMerge remote-tracking branch 'rockchip/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:21 +0000 (09:41 +1000)]
Merge remote-tracking branch 'rockchip/for-next'

4 years agoMerge remote-tracking branch 'reset/reset/next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:21 +0000 (09:41 +1000)]
Merge remote-tracking branch 'reset/reset/next'

4 years agoMerge remote-tracking branch 'renesas/next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:19 +0000 (09:41 +1000)]
Merge remote-tracking branch 'renesas/next'

4 years agoMerge remote-tracking branch 'realtek/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:19 +0000 (09:41 +1000)]
Merge remote-tracking branch 'realtek/for-next'

4 years agoMerge remote-tracking branch 'raspberrypi/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:18 +0000 (09:41 +1000)]
Merge remote-tracking branch 'raspberrypi/for-next'

# Conflicts:
# arch/arm/boot/dts/bcm2711.dtsi

4 years agoMerge remote-tracking branch 'qcom/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:13 +0000 (09:41 +1000)]
Merge remote-tracking branch 'qcom/for-next'

4 years agoMerge remote-tracking branch 'omap/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:08 +0000 (09:41 +1000)]
Merge remote-tracking branch 'omap/for-next'

4 years agoMerge remote-tracking branch 'mvebu/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:07 +0000 (09:41 +1000)]
Merge remote-tracking branch 'mvebu/for-next'

4 years agoMerge remote-tracking branch 'mediatek/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:06 +0000 (09:41 +1000)]
Merge remote-tracking branch 'mediatek/for-next'

4 years agoMerge remote-tracking branch 'keystone/next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:05 +0000 (09:41 +1000)]
Merge remote-tracking branch 'keystone/next'

4 years agoMerge remote-tracking branch 'imx-mxs/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:41:00 +0000 (09:41 +1000)]
Merge remote-tracking branch 'imx-mxs/for-next'

4 years agoMerge remote-tracking branch 'drivers-memory/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:40:59 +0000 (09:40 +1000)]
Merge remote-tracking branch 'drivers-memory/for-next'

4 years agoMerge remote-tracking branch 'at91/at91-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:40:56 +0000 (09:40 +1000)]
Merge remote-tracking branch 'at91/at91-next'

4 years agoMerge remote-tracking branch 'aspeed/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:40:55 +0000 (09:40 +1000)]
Merge remote-tracking branch 'aspeed/for-next'

4 years agoMerge remote-tracking branch 'amlogic/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:40:54 +0000 (09:40 +1000)]
Merge remote-tracking branch 'amlogic/for-next'

4 years agoMerge remote-tracking branch 'actions/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:40:53 +0000 (09:40 +1000)]
Merge remote-tracking branch 'actions/for-next'

4 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:27:41 +0000 (09:27 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

4 years agoMerge remote-tracking branch 'arm64/for-next/core'
Stephen Rothwell [Tue, 13 Apr 2021 23:14:34 +0000 (09:14 +1000)]
Merge remote-tracking branch 'arm64/for-next/core'

# Conflicts:
# arch/arm64/include/asm/cpucaps.h

4 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:11:45 +0000 (09:11 +1000)]
Merge remote-tracking branch 'arm/for-next'

4 years agoMerge remote-tracking branch 'asm-generic/master'
Stephen Rothwell [Tue, 13 Apr 2021 23:11:44 +0000 (09:11 +1000)]
Merge remote-tracking branch 'asm-generic/master'

4 years agoMerge remote-tracking branch 'dma-mapping/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 23:02:06 +0000 (09:02 +1000)]
Merge remote-tracking branch 'dma-mapping/for-next'

4 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Tue, 13 Apr 2021 22:57:57 +0000 (08:57 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

4 years agoMerge remote-tracking branch 'pinctrl-intel-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:58 +0000 (08:54 +1000)]
Merge remote-tracking branch 'pinctrl-intel-fixes/fixes'

4 years agoMerge remote-tracking branch 'gpio-brgl-fixes/gpio/for-current'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:58 +0000 (08:54 +1000)]
Merge remote-tracking branch 'gpio-brgl-fixes/gpio/for-current'

4 years agoMerge remote-tracking branch 'pidfd-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:57 +0000 (08:54 +1000)]
Merge remote-tracking branch 'pidfd-fixes/fixes'

4 years agoMerge remote-tracking branch 'risc-v-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:57 +0000 (08:54 +1000)]
Merge remote-tracking branch 'risc-v-fixes/fixes'

4 years agoMerge remote-tracking branch 'rtc-fixes/rtc-fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:56 +0000 (08:54 +1000)]
Merge remote-tracking branch 'rtc-fixes/rtc-fixes'

4 years agoMerge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:56 +0000 (08:54 +1000)]
Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'

4 years agoMerge remote-tracking branch 'scsi-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:55 +0000 (08:54 +1000)]
Merge remote-tracking branch 'scsi-fixes/fixes'

4 years agoMerge remote-tracking branch 'btrfs-fixes/next-fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:54 +0000 (08:54 +1000)]
Merge remote-tracking branch 'btrfs-fixes/next-fixes'

4 years agoMerge remote-tracking branch 'nvdimm-fixes/libnvdimm-fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:53 +0000 (08:54 +1000)]
Merge remote-tracking branch 'nvdimm-fixes/libnvdimm-fixes'

4 years agoMerge remote-tracking branch 'kvm-fixes/master'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:53 +0000 (08:54 +1000)]
Merge remote-tracking branch 'kvm-fixes/master'

4 years agoMerge remote-tracking branch 'v4l-dvb-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:52 +0000 (08:54 +1000)]
Merge remote-tracking branch 'v4l-dvb-fixes/fixes'

4 years agoMerge remote-tracking branch 'dmaengine-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:51 +0000 (08:54 +1000)]
Merge remote-tracking branch 'dmaengine-fixes/fixes'

4 years agoMerge remote-tracking branch 'vfio-fixes/for-linus'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:51 +0000 (08:54 +1000)]
Merge remote-tracking branch 'vfio-fixes/for-linus'

4 years agoMerge remote-tracking branch 'ide/master'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:44 +0000 (08:54 +1000)]
Merge remote-tracking branch 'ide/master'

4 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:43 +0000 (08:54 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

4 years agoMerge remote-tracking branch 'soundwire-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:42 +0000 (08:54 +1000)]
Merge remote-tracking branch 'soundwire-fixes/fixes'

4 years agoMerge remote-tracking branch 'phy/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:42 +0000 (08:54 +1000)]
Merge remote-tracking branch 'phy/fixes'

4 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:41 +0000 (08:54 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

4 years agoMerge remote-tracking branch 'spi-fixes/for-linus'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:40 +0000 (08:54 +1000)]
Merge remote-tracking branch 'spi-fixes/for-linus'

4 years agoMerge remote-tracking branch 'regulator-fixes/for-linus'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:40 +0000 (08:54 +1000)]
Merge remote-tracking branch 'regulator-fixes/for-linus'

4 years agoMerge remote-tracking branch 'regmap-fixes/for-linus'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:40 +0000 (08:54 +1000)]
Merge remote-tracking branch 'regmap-fixes/for-linus'

4 years agoMerge remote-tracking branch 'sound-asoc-fixes/for-linus'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:39 +0000 (08:54 +1000)]
Merge remote-tracking branch 'sound-asoc-fixes/for-linus'

4 years agoMerge remote-tracking branch 'bpf/master'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:39 +0000 (08:54 +1000)]
Merge remote-tracking branch 'bpf/master'

4 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:38 +0000 (08:54 +1000)]
Merge remote-tracking branch 'net/master'

4 years agoMerge remote-tracking branch 's390-fixes/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:37 +0000 (08:54 +1000)]
Merge remote-tracking branch 's390-fixes/fixes'

4 years agoMerge remote-tracking branch 'arm-soc-fixes/arm/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:35 +0000 (08:54 +1000)]
Merge remote-tracking branch 'arm-soc-fixes/arm/fixes'

4 years agoMerge remote-tracking branch 'arm64-fixes/for-next/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:35 +0000 (08:54 +1000)]
Merge remote-tracking branch 'arm64-fixes/for-next/fixes'

4 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:34 +0000 (08:54 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

4 years agoMerge remote-tracking branch 'arc-current/for-curr'
Stephen Rothwell [Tue, 13 Apr 2021 22:54:34 +0000 (08:54 +1000)]
Merge remote-tracking branch 'arc-current/for-curr'

4 years agoxen-netback: Check for hotplug-status existence before watching
Michael Brown [Tue, 13 Apr 2021 15:25:12 +0000 (16:25 +0100)]
xen-netback: Check for hotplug-status existence before watching

The logic in connect() is currently written with the assumption that
xenbus_watch_pathfmt() will return an error for a node that does not
exist.  This assumption is incorrect: xenstore does allow a watch to
be registered for a nonexistent node (and will send notifications
should the node be subsequently created).

As of commit 1f2565780 ("xen-netback: remove 'hotplug-status' once it
has served its purpose"), this leads to a failure when a domU
transitions into XenbusStateConnected more than once.  On the first
domU transition into Connected state, the "hotplug-status" node will
be deleted by the hotplug_status_changed() callback in dom0.  On the
second or subsequent domU transition into Connected state, the
hotplug_status_changed() callback will therefore never be invoked, and
so the backend will remain stuck in InitWait.

This failure prevents scenarios such as reloading the xen-netfront
module within a domU, or booting a domU via iPXE.  There is
unfortunately no way for the domU to work around this dom0 bug.

Fix by explicitly checking for existence of the "hotplug-status" node,
thereby creating the behaviour that was previously assumed to exist.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoKVM: VMX: Don't use vcpu->run->internal.ndata as an array index
Reiji Watanabe [Tue, 13 Apr 2021 15:47:40 +0000 (15:47 +0000)]
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index

__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access.  Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set it to outside the
bounds of the array).
So, it is not safe that __vmx_handle_exit() uses the 'ndata' that way.

Fixes: 1aa561b1a4c0 ("kvm: x86: Add "last CPU" to some KVM_EXIT information")
Signed-off-by: Reiji Watanabe <reijiw@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Message-Id: <20210413154739.490299-1-reijiw@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agogro: ensure frag0 meets IP header alignment
Eric Dumazet [Tue, 13 Apr 2021 12:41:35 +0000 (05:41 -0700)]
gro: ensure frag0 meets IP header alignment

After commit 0f6925b3e8da ("virtio_net: Do not pull payload in skb->head")
Guenter Roeck reported one failure in his tests using sh architecture.

After much debugging, we have been able to spot silent unaligned accesses
in inet_gro_receive()

The issue at hand is that upper networking stacks assume their header
is word-aligned. Low level drivers are supposed to reserve NET_IP_ALIGN
bytes before the Ethernet header to make that happen.

This patch hardens skb_gro_reset_offset() to not allow frag0 fast-path
if the fragment is not properly aligned.

Some arches like x86, arm64 and powerpc do not care and define NET_IP_ALIGN
as 0, this extra check will be a NOP for them.

Note that if frag0 is not used, GRO will call pskb_may_pull()
as many times as needed to pull network and transport headers.

Fixes: 0f6925b3e8da ("virtio_net: Do not pull payload in skb->head")
Fixes: 78a478d0efd9 ("gro: Inline skb_gro_header and cache frag0 virtual address")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet/sctp: fix race condition in sctp_destroy_sock
Or Cohen [Tue, 13 Apr 2021 18:10:31 +0000 (21:10 +0300)]
net/sctp: fix race condition in sctp_destroy_sock

If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.

This can happen in the following functions:
1. In sctp_accept, if sctp_sock_migrate fails.
2. In inet_create or inet6_create, if there is a bpf program
   attached to BPF_CGROUP_INET_SOCK_CREATE which denies
   creation of the sctp socket.

The bug is fixed by acquiring addr_wq_lock in sctp_destroy_sock
instead of sctp_close.

This addresses CVE-2021-23133.

Reported-by: Or Cohen <orcohen@paloaltonetworks.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Fixes: 610236587600 ("bpf: Add new cgroup attach type to enable sock modifications")
Signed-off-by: Or Cohen <orcohen@paloaltonetworks.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoibmvnic: correctly use dev_consume/free_skb_irq
Lijun Pan [Tue, 13 Apr 2021 08:33:25 +0000 (03:33 -0500)]
ibmvnic: correctly use dev_consume/free_skb_irq

It is more correct to use dev_kfree_skb_irq when packets are dropped,
and to use dev_consume_skb_irq when packets are consumed.

Fixes: 0d973388185d ("ibmvnic: Introduce xmit_more support using batched subCRQ hcalls")
Suggested-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: Lijun Pan <lijunp213@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: Make tcp_allowed_congestion_control readonly in non-init netns
Jonathon Reinhart [Tue, 13 Apr 2021 07:08:48 +0000 (03:08 -0400)]
net: Make tcp_allowed_congestion_control readonly in non-init netns

Currently, tcp_allowed_congestion_control is global and writable;
writing to it in any net namespace will leak into all other net
namespaces.

tcp_available_congestion_control and tcp_allowed_congestion_control are
the only sysctls in ipv4_net_table (the per-netns sysctl table) with a
NULL data pointer; their handlers (proc_tcp_available_congestion_control
and proc_allowed_congestion_control) have no other way of referencing a
struct net. Thus, they operate globally.

Because ipv4_net_table does not use designated initializers, there is no
easy way to fix up this one "bad" table entry. However, the data pointer
updating logic shouldn't be applied to NULL pointers anyway, so we
instead force these entries to be read-only.

These sysctls used to exist in ipv4_table (init-net only), but they were
moved to the per-net ipv4_net_table, presumably without realizing that
tcp_allowed_congestion_control was writable and thus introduced a leak.

Because the intent of that commit was only to know (i.e. read) "which
congestion algorithms are available or allowed", this read-only solution
should be sufficient.

The logic added in recent commit
31c4d2f160eb: ("net: Ensure net namespace isolation of sysctls")
does not and cannot check for NULL data pointers, because
other table entries (e.g. /proc/sys/net/netfilter/nf_log/) have
.data=NULL but use other methods (.extra2) to access the struct net.

Fixes: 9cb8e048e5d9 ("net/ipv4/sysctl: show tcp_{allowed, available}_congestion_control in non-initial netns")
Signed-off-by: Jonathon Reinhart <jonathon.reinhart@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge branch 'catch-all-devices'
David S. Miller [Tue, 13 Apr 2021 21:31:52 +0000 (14:31 -0700)]
Merge branch 'catch-all-devices'

Hristo Venev says:

====================
net: Fix two use-after-free bugs

The two patches fix two use-after-free bugs related to cleaning up
network namespaces, one in sit and one in ip6_tunnel. They are easy to
trigger if the user has the ability to create network namespaces.

The bugs can be used to trigger null pointer dereferences. I am not
sure if they can be exploited further, but I would guess that they
can. I am not sending them to the mailing list without confirmation
that doing so would be OK.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: ip6_tunnel: Unregister catch-all devices
Hristo Venev [Mon, 12 Apr 2021 17:41:17 +0000 (20:41 +0300)]
net: ip6_tunnel: Unregister catch-all devices

Similarly to the sit case, we need to remove the tunnels with no
addresses that have been moved to another network namespace.

Fixes: 0bd8762824e73 ("ip6tnl: add x-netns support")
Signed-off-by: Hristo Venev <hristo@venev.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: sit: Unregister catch-all devices
Hristo Venev [Mon, 12 Apr 2021 17:41:16 +0000 (20:41 +0300)]
net: sit: Unregister catch-all devices

A sit interface created without a local or a remote address is linked
into the `sit_net::tunnels_wc` list of its original namespace. When
deleting a network namespace, delete the devices that have been moved.

The following script triggers a null pointer dereference if devices
linked in a deleted `sit_net` remain:

    for i in `seq 1 30`; do
        ip netns add ns-test
        ip netns exec ns-test ip link add dev veth0 type veth peer veth1
        ip netns exec ns-test ip link add dev sit$i type sit dev veth0
        ip netns exec ns-test ip link set dev sit$i netns $$
        ip netns del ns-test
    done
    for i in `seq 1 30`; do
        ip link del dev sit$i
    done

Fixes: 5e6700b3bf98f ("sit: add support of x-netns")
Signed-off-by: Hristo Venev <hristo@venev.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge tag 'fixes-for-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd...
Linus Torvalds [Tue, 13 Apr 2021 21:01:34 +0000 (14:01 -0700)]
Merge tag 'fixes-for-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull MTD fix from Richard Weinberger:
 "Fix WAITRDY break condition and timeout in mtk nand driver"

* tag 'fixes-for-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: rawnand: mtk: Fix WAITRDY break condition and timeout

4 years agoMerge branch 'mem-ctrl-next' into for-next
Krzysztof Kozlowski [Tue, 13 Apr 2021 15:01:13 +0000 (17:01 +0200)]
Merge branch 'mem-ctrl-next' into for-next

4 years agomemory: mtk-smi: Add device-link between smi-larb and smi-common
Yong Wu [Sat, 10 Apr 2021 09:11:16 +0000 (17:11 +0800)]
memory: mtk-smi: Add device-link between smi-larb and smi-common

Normally, If the smi-larb HW need work, we should enable the smi-common
HW power and clock firstly.
This patch adds device-link between the smi-larb dev and the smi-common
dev. then If pm_runtime_get_sync(smi-larb-dev), the pm_runtime_get_sync
(smi-common-dev) will be called automatically.

Also, Add DL_FLAG_STATELESS to avoid the smi-common clocks be gated when
probe.

CC: Matthias Brugger <matthias.bgg@gmail.com>
Suggested-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210410091128.31823-5-yong.wu@mediatek.com
4 years agomemory: samsung: exynos5422-dmc: handle clk_set_parent() failure
Krzysztof Kozlowski [Wed, 7 Apr 2021 15:45:35 +0000 (17:45 +0200)]
memory: samsung: exynos5422-dmc: handle clk_set_parent() failure

clk_set_parent() can fail and ignoring such case could lead to invalid
clock setup for given frequency.

Addresses-Coverity: Unchecked return value
Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20210407154535.70756-1-krzysztof.kozlowski@canonical.com
4 years agomemory: renesas-rpc-if: fix possible NULL pointer dereference of resource
Krzysztof Kozlowski [Wed, 7 Apr 2021 15:43:57 +0000 (17:43 +0200)]
memory: renesas-rpc-if: fix possible NULL pointer dereference of resource

The platform_get_resource_byname() can return NULL which would be
immediately dereferenced by resource_size().  Instead dereference it
after validating the resource.

Addresses-Coverity: Dereference null return value
Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210407154357.70200-1-krzysztof.kozlowski@canonical.com
4 years agoMerge remote-tracking branch 'asoc/for-5.12' into asoc-linus
Mark Brown [Tue, 13 Apr 2021 14:33:15 +0000 (15:33 +0100)]
Merge remote-tracking branch 'asoc/for-5.12' into asoc-linus

4 years agovfio/pci: Add missing range check in vfio_pci_mmap
Christian A. Ehrhardt [Mon, 12 Apr 2021 21:41:24 +0000 (23:41 +0200)]
vfio/pci: Add missing range check in vfio_pci_mmap

When mmaping an extra device region verify that the region index
derived from the mmap offset is valid.

Fixes: a15b1883fee1 ("vfio_pci: Allow mapping extra regions")
Cc: stable@vger.kernel.org
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Message-Id: <20210412214124.GA241759@lisa.in-ulm.de>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
4 years agoASoC: meson: axg-frddr: fix fifo depth on g12 and sm1
Jerome Brunet [Mon, 12 Apr 2021 13:22:56 +0000 (15:22 +0200)]
ASoC: meson: axg-frddr: fix fifo depth on g12 and sm1

Previous fifo depth patch was only tested on axg, not g12 or sm1.
Of course, while adding hw_params dai callback for the axg, I forgot to do
the same for g12 and sm1, leaving the depth unset and breaking playback on
these SoCs.

Add hw_params callback to the g12 dai_ops to fix the problem.

Fixes: 6f68accaa864 ("ASoC: meson: axg-frddr: set fifo depth according to the period")
Reported-by: Christian Hewitt <christianshewitt@gmail.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20210412132256.89920-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agopinctrl: lewisburg: Update number of pins in community
Yuanyuan Zhong [Mon, 12 Apr 2021 23:17:59 +0000 (17:17 -0600)]
pinctrl: lewisburg: Update number of pins in community

When updating pin names for Intel Lewisburg, the numbers of pins were
left behind. Update them accordingly.

Fixes: e66ff71fd0db ("pinctrl: lewisburg: Update pin list according to v1.1v6")
Signed-off-by: Yuanyuan Zhong <yzhong@purestorage.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agosoc: document merges
Arnd Bergmann [Tue, 13 Apr 2021 09:24:05 +0000 (11:24 +0200)]
soc: document merges

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge branch 'arm/dt' into for-next
Arnd Bergmann [Tue, 13 Apr 2021 09:22:17 +0000 (11:22 +0200)]
Merge branch 'arm/dt' into for-next

* arm/dt: (27 commits)
  ARM: dts: at91: sama5d2/trivial: fix letter case for etm hex address
  arm64: dts: rockchip: move mmc aliases to board dts on rk3399
  arm64: dts: rockchip: move mmc aliases to board dts on rk3368
  arm64: dts: rockchip: move mmc aliases to board dts on rk3328
  arm64: dts: rockchip: move mmc aliases to board dts on rk3308
  arm64: dts: rockchip: move mmc aliases to board dts on px30
  ARM: dts: rockchip: move rv1108 mmcx aliases to board dts files
  ARM: dts: rockchip: move rk322x mmcx aliases to board dts files
  ARM: dts: rockchip: remove clock-names property from watchdog node in rv1108.dtsi
  ARM: dts: rockchip: add new watchdog compatible to rk322x.dtsi
  ARM: dts: rockchip: add new watchdog compatible to rv1108.dtsi
  arm64: dts: rockchip: add new watchdog compatible to rk3399.dtsi
  arm64: dts: rockchip: add new watchdog compatible to rk3328.dtsi
  arm64: dts: rockchip: add new watchdog compatible to rk3308.dtsi
  arm64: dts: rockchip: add new watchdog compatible to px30.dtsi
  arm64: dts: rockchip: enable dwc3 usb for A95X Z2
  arm64: dts: rockchip: add rk3328 dwc3 usb controller node
  rockchip: rk3399: Add support for FriendlyARM NanoPi R4S
  dt-bindings: Add doc for FriendlyARM NanoPi R4S
  arm64: dts: rockchip: add phandle to timer0 on rk3368
  ...

4 years agoMerge branch 'arm/drivers' into for-next
Arnd Bergmann [Tue, 13 Apr 2021 09:22:12 +0000 (11:22 +0200)]
Merge branch 'arm/drivers' into for-next

* arm/drivers:
  soc: fsl: enable acpi support in RCPM driver
  Revert "soc: fsl: qe: introduce qe_io{read,write}* wrappers"
  tty: serial: ucc_uart: replace qe_io{read,write}* wrappers by generic io{read,write}*
  soc: fsl: qe: replace qe_io{read,write}* wrappers by generic io{read,write}*
  soc: fsl: guts: fix comment syntax in file
  soc: fsl: guts: remove unneeded semicolon
  soc: fsl: qe: Use DEFINE_SPINLOCK() for spinlock
  soc: fsl: qbman: Delete useless kfree code
  soc: fsl: qbman: Ensure device cleanup is run for kexec
  firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
  firmware: xilinx: Fix dereferencing freed memory

4 years agoMerge tag 'soc-fsl-next-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/leo...
Arnd Bergmann [Tue, 13 Apr 2021 09:06:03 +0000 (11:06 +0200)]
Merge tag 'soc-fsl-next-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.13

- Add ACPI support for RCPM driver
- Use generic io{read,write} for QE drivers after performance optimized
  for PowerPC
- Fix QBMAN probe to cleanup HW states correctly for kexec
- Various cleanup and style fix for QBMAN/QE/GUTS drivers

* tag 'soc-fsl-next-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  soc: fsl: enable acpi support in RCPM driver
  Revert "soc: fsl: qe: introduce qe_io{read,write}* wrappers"
  tty: serial: ucc_uart: replace qe_io{read,write}* wrappers by generic io{read,write}*
  soc: fsl: qe: replace qe_io{read,write}* wrappers by generic io{read,write}*
  soc: fsl: guts: fix comment syntax in file
  soc: fsl: guts: remove unneeded semicolon
  soc: fsl: qe: Use DEFINE_SPINLOCK() for spinlock
  soc: fsl: qbman: Delete useless kfree code
  soc: fsl: qbman: Ensure device cleanup is run for kexec

Link: https://lore.kernel.org/r/20210409205719.27927-1-leoyang.li@nxp.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'zynqmp-soc-for-v5.13' of https://github.com/Xilinx/linux-xlnx into arm...
Arnd Bergmann [Tue, 13 Apr 2021 08:59:45 +0000 (10:59 +0200)]
Merge tag 'zynqmp-soc-for-v5.13' of https://github.com/Xilinx/linux-xlnx into arm/drivers

arm64: soc: ZynqMP SoC changes for v5.13

- Fix firmware removal path
- Cleanup eemi doc and *ops()

* tag 'zynqmp-soc-for-v5.13' of https://github.com/Xilinx/linux-xlnx:
  firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
  firmware: xilinx: Fix dereferencing freed memory

Link: https://lore.kernel.org/r/a44f8e9f-cea7-57ef-c3bc-10f5f5e064fc@monstr.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'zynqmp-dt-for-v5.13' of https://github.com/Xilinx/linux-xlnx into arm/dt
Arnd Bergmann [Tue, 13 Apr 2021 08:56:58 +0000 (10:56 +0200)]
Merge tag 'zynqmp-dt-for-v5.13' of https://github.com/Xilinx/linux-xlnx into arm/dt

arm64: dts: ZynqMP DT changes for v5.13

- Add power-domains for DP
- Remove si5328 node without compatible string

* tag 'zynqmp-dt-for-v5.13' of https://github.com/Xilinx/linux-xlnx:
  arm64: dts: zynqmp: Remove si5328 device nodes
  arm64: dts: zynqmp: Add power domain for the DisplayPort DMA controller

Link: https://lore.kernel.org/r/e422fa9c-3e58-28b4-f6f0-65aa44254131@xilinx.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'v5.13-rockchip-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 13 Apr 2021 08:55:19 +0000 (10:55 +0200)]
Merge tag 'v5.13-rockchip-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

New board the NanoPi R4S, OPP adjustments on rk3399 (sync with vendor
and using ranged values to allow better compatibility with regulator
steps), gpu opps on px30, infrared receiver on rockpro64,
USB3 support on rk3328, MMC alias fixups, dt-compatible fixes.

* tag 'v5.13-rockchip-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: move mmc aliases to board dts on rk3399
  arm64: dts: rockchip: move mmc aliases to board dts on rk3368
  arm64: dts: rockchip: move mmc aliases to board dts on rk3328
  arm64: dts: rockchip: move mmc aliases to board dts on rk3308
  arm64: dts: rockchip: move mmc aliases to board dts on px30
  arm64: dts: rockchip: add new watchdog compatible to rk3399.dtsi
  arm64: dts: rockchip: add new watchdog compatible to rk3328.dtsi
  arm64: dts: rockchip: add new watchdog compatible to rk3308.dtsi
  arm64: dts: rockchip: add new watchdog compatible to px30.dtsi
  arm64: dts: rockchip: enable dwc3 usb for A95X Z2
  arm64: dts: rockchip: add rk3328 dwc3 usb controller node
  rockchip: rk3399: Add support for FriendlyARM NanoPi R4S
  dt-bindings: Add doc for FriendlyARM NanoPi R4S
  arm64: dts: rockchip: add phandle to timer0 on rk3368
  arm64: dts: rockchip: add infrared receiver node to rockpro64
  arm64: dts: rockchip: drop separate opp table on rk3399-puma
  arm64: dts: rockchip: used range'd gpu opps on rk3399
  arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel
  arm64: dts: rockchip: Add gpu opp nodes to px30 dtsi

Link: https://lore.kernel.org/r/2191862.ElGaqSPkdT@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'v5.13-rockchip-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 13 Apr 2021 08:54:16 +0000 (10:54 +0200)]
Merge tag 'v5.13-rockchip-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

MMC aliases fixups and some property/compatible cleanups.

* tag 'v5.13-rockchip-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: move rv1108 mmcx aliases to board dts files
  ARM: dts: rockchip: move rk322x mmcx aliases to board dts files
  ARM: dts: rockchip: remove clock-names property from watchdog node in rv1108.dtsi
  ARM: dts: rockchip: add new watchdog compatible to rk322x.dtsi
  ARM: dts: rockchip: add new watchdog compatible to rv1108.dtsi

Link: https://lore.kernel.org/r/4638723.31r3eYUQgx@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoarm64: kprobes: Restore local irqflag if kprobes is cancelled
Jisheng Zhang [Mon, 12 Apr 2021 09:41:01 +0000 (17:41 +0800)]
arm64: kprobes: Restore local irqflag if kprobes is cancelled

If instruction being single stepped caused a page fault, the kprobes
is cancelled to let the page fault handler continue as a normal page
fault. But the local irqflags are disabled so cpu will restore pstate
with DAIF masked. After pagefault is serviced, the kprobes is
triggerred again, we overwrite the saved_irqflag by calling
kprobes_save_local_irqflag(). NOTE, DAIF is masked in this new saved
irqflag. After kprobes is serviced, the cpu pstate is retored with
DAIF masked.

This patch is inspired by one patch for riscv from Liao Chang.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20210412174101.6bfb0594@xhacker.debian
Signed-off-by: Will Deacon <will@kernel.org>
4 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
David S. Miller [Mon, 12 Apr 2021 23:17:50 +0000 (16:17 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains Netfilter fixes for net:

1) Fix NAT IPv6 offload in the flowtable.

2) icmpv6 is printed as unknown in /proc/net/nf_conntrack.

3) Use div64_u64() in nft_limit, from Eric Dumazet.

4) Use pre_exit to unregister ebtables and arptables hooks,
   from Florian Westphal.

5) Fix out-of-bound memset in x_tables compat match/target,
   also from Florian.

6) Clone set elements expression to ensure proper initialization.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonetfilter: nftables: clone set element expression template
Pablo Neira Ayuso [Sat, 10 Apr 2021 19:29:38 +0000 (21:29 +0200)]
netfilter: nftables: clone set element expression template

memcpy() breaks when using connlimit in set elements. Use
nft_expr_clone() to initialize the connlimit expression list, otherwise
connlimit garbage collector crashes when walking on the list head copy.

[  493.064656] Workqueue: events_power_efficient nft_rhash_gc [nf_tables]
[  493.064685] RIP: 0010:find_or_evict+0x5a/0x90 [nf_conncount]
[  493.064694] Code: 2b 43 40 83 f8 01 77 0d 48 c7 c0 f5 ff ff ff 44 39 63 3c 75 df 83 6d 18 01 48 8b 43 08 48 89 de 48 8b 13 48 8b 3d ee 2f 00 00 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 48 89 03 48 83
[  493.064699] RSP: 0018:ffffc90000417dc0 EFLAGS: 00010297
[  493.064704] RAX: 0000000000000000 RBX: ffff888134f38410 RCX: 0000000000000000
[  493.064708] RDX: 0000000000000000 RSI: ffff888134f38410 RDI: ffff888100060cc0
[  493.064711] RBP: ffff88812ce594a8 R08: ffff888134f38438 R09: 00000000ebb9025c
[  493.064714] R10: ffffffff8219f838 R11: 0000000000000017 R12: 0000000000000001
[  493.064718] R13: ffffffff82146740 R14: ffff888134f38410 R15: 0000000000000000
[  493.064721] FS:  0000000000000000(0000) GS:ffff88840e440000(0000) knlGS:0000000000000000
[  493.064725] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  493.064729] CR2: 0000000000000008 CR3: 00000001330aa002 CR4: 00000000001706e0
[  493.064733] Call Trace:
[  493.064737]  nf_conncount_gc_list+0x8f/0x150 [nf_conncount]
[  493.064746]  nft_rhash_gc+0x106/0x390 [nf_tables]

Reported-by: Laura Garcia Liebana <nevola@gmail.com>
Fixes: 409444522976 ("netfilter: nf_tables: add elements with stateful expressions")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
4 years agonetfilter: x_tables: fix compat match/target pad out-of-bound write
Florian Westphal [Wed, 7 Apr 2021 19:38:57 +0000 (21:38 +0200)]
netfilter: x_tables: fix compat match/target pad out-of-bound write

xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.

Remove this code and zero the entire blob beforehand.

Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appspotmail.com
Reported-by: Andy Nguyen <theflow@google.com>
Fixes: 9fa492cdc160c ("[NETFILTER]: x_tables: simplify compat API")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
4 years agoethtool: fix kdoc attr name
Jakub Kicinski [Mon, 12 Apr 2021 18:47:07 +0000 (11:47 -0700)]
ethtool: fix kdoc attr name

Add missing 't' in attrtype.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: phy: marvell: fix detection of PHY on Topaz switches
Pali Rohár [Mon, 12 Apr 2021 16:57:39 +0000 (18:57 +0200)]
net: phy: marvell: fix detection of PHY on Topaz switches

Since commit fee2d546414d ("net: phy: marvell: mv88e6390 temperature
sensor reading"), Linux reports the temperature of Topaz hwmon as
constant -75°C.

This is because switches from the Topaz family (88E6141 / 88E6341) have
the address of the temperature sensor register different from Peridot.

This address is instead compatible with 88E1510 PHYs, as was used for
Topaz before the above mentioned commit.

Create a new mapping table between switch family and PHY ID for families
which don't have a model number. And define PHY IDs for Topaz and Peridot
families.

Create a new PHY ID and a new PHY driver for Topaz's internal PHY.
The only difference from Peridot's PHY driver is the HWMON probing
method.

Prior this change Topaz's internal PHY is detected by kernel as:

  PHY [...] driver [Marvell 88E6390] (irq=63)

And afterwards as:

  PHY [...] driver [Marvell 88E6341 Family] (irq=63)

Signed-off-by: Pali Rohár <pali@kernel.org>
BugLink: https://github.com/globalscaletechnologies/linux/issues/1
Fixes: fee2d546414d ("net: phy: marvell: mv88e6390 temperature sensor reading")
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge remote-tracking branch 'spi/for-5.12' into spi-linus
Mark Brown [Mon, 12 Apr 2021 18:57:48 +0000 (19:57 +0100)]
Merge remote-tracking branch 'spi/for-5.12' into spi-linus

4 years agodmaengine: idxd: fix wq cleanup of WQCFG registers
Dave Jiang [Mon, 12 Apr 2021 16:02:36 +0000 (09:02 -0700)]
dmaengine: idxd: fix wq cleanup of WQCFG registers

A pre-release silicon erratum workaround where wq reset does not clear
WQCFG registers was leaked into upstream code. Use wq reset command
instead of blasting the MMIO region. This also address an issue where
we clobber registers in future devices.

Fixes: da32b28c95a7 ("dmaengine: idxd: cleanup workqueue config after disabling")
Reported-by: Shreenivaas Devarajan <shreenivaas.devarajan@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161824330020.881560.16375921906426627033.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
4 years agodmaengine: idxd: clear MSIX permission entry on shutdown
Dave Jiang [Mon, 12 Apr 2021 16:23:27 +0000 (09:23 -0700)]
dmaengine: idxd: clear MSIX permission entry on shutdown

Add disabling/clearing of MSIX permission entries on device shutdown to
mirror the enabling of the MSIX entries on probe. Current code left the
MSIX enabled and the pasid entries still programmed at device shutdown.

Fixes: 8e50d392652f ("dmaengine: idxd: Add shared workqueue support")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161824457969.882533.6020239898682672311.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
4 years agoMerge branch 'for-next/mte-async-kernel-mode' into for-next/core
Catalin Marinas [Mon, 12 Apr 2021 16:35:50 +0000 (17:35 +0100)]
Merge branch 'for-next/mte-async-kernel-mode' into for-next/core

* for-next/mte-async-kernel-mode:
  : Add MTE asynchronous kernel mode support
  kasan, arm64: tests supports for HW_TAGS async mode
  arm64: mte: Report async tag faults before suspend
  arm64: mte: Enable async tag check fault
  arm64: mte: Conditionally compile mte_enable_kernel_*()
  arm64: mte: Enable TCO in functions that can read beyond buffer limits
  kasan: Add report for async mode
  arm64: mte: Drop arch_enable_tagging()
  kasan: Add KASAN mode kernel parameter
  arm64: mte: Add asynchronous mode support

4 years agoMerge tag 'm68knommu-for-v5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 12 Apr 2021 16:03:49 +0000 (09:03 -0700)]
Merge tag 'm68knommu-for-v5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

Pull m68knommu fix from Greg Ungerer:
 "Some m68k platforms with a non-zero memory base fail to boot with the
  recent flatmem changes.

  This is a single regression fix to the pfn offset for that case"

* tag 'm68knommu-for-v5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68k: fix flatmem memory model setup

4 years agoARM: dts: at91: sama5d2/trivial: fix letter case for etm hex address
Nicolas Ferre [Thu, 8 Apr 2021 16:44:43 +0000 (18:44 +0200)]
ARM: dts: at91: sama5d2/trivial: fix letter case for etm hex address

Fix the etm node hex address to lower case for matching regexp
specification and removing the additional warning that looks like:

arch/arm/boot/dts/at91-sama5d2_ptc_ek.dt.yaml: /: 'etm@73C000' does not
match any of the regexes: '@(0|[1-9a-f][0-9a-f]*)$', '^[^@]+$',
'pinctrl-[0-9]+'

Reported-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoarm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically
Catalin Marinas [Fri, 9 Apr 2021 17:37:10 +0000 (18:37 +0100)]
arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically

The entry from EL0 code checks the TFSRE0_EL1 register for any
asynchronous tag check faults in user space and sets the
TIF_MTE_ASYNC_FAULT flag. This is not done atomically, potentially
racing with another CPU calling set_tsk_thread_flag().

Replace the non-atomic ORR+STR with an STSET instruction. While STSET
requires ARMv8.1 and an assembler that understands LSE atomics, the MTE
feature is part of ARMv8.5 and already requires an updated assembler.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Fixes: 637ec831ea4f ("arm64: mte: Handle synchronous and asynchronous tag check faults")
Cc: <stable@vger.kernel.org> # 5.10.x
Reported-by: Will Deacon <will@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210409173710.18582-1-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
4 years agodrm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel
Hans de Goede [Thu, 25 Mar 2021 11:48:22 +0000 (12:48 +0100)]
drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel

After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down
displays gracefully on reboot"), the DSI panel on a Cherry Trail based
Predia Basic tablet would no longer properly light up after reboot.

I've managed to reproduce this without rebooting by doing:
chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
echo 0 > /sys/class/graphics/fb0/blank

Which rapidly turns the panel off and back on again.

The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
used for panel on/off, since starting with MIPI-sequences version >= 3 the
delays are already included inside the MIPI-sequences.

The problems exposed by the "Shut down displays gracefully on reboot"
change, show that using this helper for the panel_pwr_cycle_delay is
not the right thing to do. This has not been noticed until now because
normally the panel never is cycled off and directly on again in quick
succession.

Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
call to avoid the panel staying black after a quick off + on cycle.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210325114823.44922-1-hdegoede@redhat.com
(cherry picked from commit 2878b29fc25a0dac0e1c6c94177f07c7f94240f0)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
4 years agodrm/i915: Don't zero out the Y plane's watermarks
Ville Syrjälä [Sat, 27 Mar 2021 00:59:45 +0000 (02:59 +0200)]
drm/i915: Don't zero out the Y plane's watermarks

Don't zero out the watermarks for the Y plane since we've already
computed them when computing the UV plane's watermarks (since the
UV plane always appears before ethe Y plane when iterating through
the planes).

This leads to allocating no DDB for the Y plane since .min_ddb_alloc
also gets zeroed. And that of course leads to underruns when scanning
out planar formats.

Cc: stable@vger.kernel.org
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Fixes: dbf71381d733 ("drm/i915: Nuke intel_atomic_crtc_state_for_each_plane_state() from skl+ wm code")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210327005945.4929-1-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
(cherry picked from commit f99b805fb9413ff007ca0b6add871737664117dd)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
4 years agodrm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT
Lyude Paul [Thu, 18 Mar 2021 17:02:02 +0000 (13:02 -0400)]
drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT

Looks like that there actually are another subset of laptops on the market
that don't support the Intel HDR backlight interface, but do advertise
support for the VESA DPCD backlight interface despite the fact it doesn't
seem to work.

Note though I'm not entirely clear on this - on one of the machines where
this issue was observed, I also noticed that we appeared to be rejecting
the VBT defined backlight frequency in
intel_dp_aux_vesa_calc_max_backlight(). It's noted in this function that:

/* Use highest possible value of Pn for more granularity of brightness
 * adjustment while satifying the conditions below.
 * ...
 * - FxP is within 25% of desired value.
 *   Note: 25% is arbitrary value and may need some tweak.
 */

So it's possible that this value might just need to be tweaked, but for now
let's just disable the VESA backlight interface unless it's specified in
the VBT just to be safe. We might be able to try enabling this again by
default in the future.

Fixes: 2227816e647a ("drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight")
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/3169
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210318170204.513000-1-lyude@redhat.com
(cherry picked from commit 9e2eb6d5380e9dadcd2baecb51f238e5eba94bee)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
4 years agoMerge branches 'for-next/misc', 'for-next/kselftest', 'for-next/xntable', 'for-next...
Catalin Marinas [Mon, 12 Apr 2021 10:56:09 +0000 (11:56 +0100)]
Merge branches 'for-next/misc', 'for-next/kselftest', 'for-next/xntable', 'for-next/vdso', 'for-next/fiq', 'for-next/epan', 'for-next/kasan-vmalloc', 'for-next/fgt-boot-init', 'for-next/vhe-only' and 'for-next/neon-softirqs-disabled', remote-tracking branch 'arm64/for-next/perf' into for-next/core

* for-next/misc:
  : Miscellaneous patches
  arm64: mte: Remove unused mte_assign_mem_tag_range()
  arm64: Add __init section marker to some functions
  arm64/sve: Rework SVE access trap to convert state in registers
  docs: arm64: Fix a grammar error
  arm64: smp: Add missing prototype for some smp.c functions
  arm64: setup: name `tcr` register
  arm64: setup: name `mair` register
  arm64: stacktrace: Move start_backtrace() out of the header
  arm64: barrier: Remove spec_bar() macro
  arm64: entry: remove test_irqs_unmasked macro
  ARM64: enable GENERIC_FIND_FIRST_BIT
  arm64: defconfig: Use DEBUG_INFO_REDUCED

* for-next/kselftest:
  : Various kselftests for arm64
  kselftest: arm64: Add BTI tests
  kselftest/arm64: mte: Report filename on failing temp file creation
  kselftest/arm64: mte: Fix clang warning
  kselftest/arm64: mte: Makefile: Fix clang compilation
  kselftest/arm64: mte: Output warning about failing compiler
  kselftest/arm64: mte: Use cross-compiler if specified
  kselftest/arm64: mte: Fix MTE feature detection
  kselftest/arm64: mte: common: Fix write() warnings
  kselftest/arm64: mte: user_mem: Fix write() warning
  kselftest/arm64: mte: ksm_options: Fix fscanf warning
  kselftest/arm64: mte: Fix pthread linking
  kselftest/arm64: mte: Fix compilation with native compiler

* for-next/xntable:
  : Add hierarchical XN permissions for all page tables
  arm64: mm: use XN table mapping attributes for user/kernel mappings
  arm64: mm: use XN table mapping attributes for the linear region
  arm64: mm: add missing P4D definitions and use them consistently

* for-next/vdso:
  : Minor improvements to the compat vdso and sigpage
  arm64: compat: Poison the compat sigpage
  arm64: vdso: Avoid ISB after reading from cntvct_el0
  arm64: compat: Allow signal page to be remapped
  arm64: vdso: Remove redundant calls to flush_dcache_page()
  arm64: vdso: Use GFP_KERNEL for allocating compat vdso and signal pages

* for-next/fiq:
  : Support arm64 FIQ controller registration
  arm64: irq: allow FIQs to be handled
  arm64: Always keep DAIF.[IF] in sync
  arm64: entry: factor irq triage logic into macros
  arm64: irq: rework root IRQ handler registration
  arm64: don't use GENERIC_IRQ_MULTI_HANDLER
  genirq: Allow architectures to override set_handle_irq() fallback

* for-next/epan:
  : Support for Enhanced PAN (execute-only permissions)
  arm64: Support execute-only permissions with Enhanced PAN

* for-next/kasan-vmalloc:
  : Support CONFIG_KASAN_VMALLOC on arm64
  arm64: Kconfig: select KASAN_VMALLOC if KANSAN_GENERIC is enabled
  arm64: kaslr: support randomized module area with KASAN_VMALLOC
  arm64: Kconfig: support CONFIG_KASAN_VMALLOC
  arm64: kasan: abstract _text and _end to KERNEL_START/END
  arm64: kasan: don't populate vmalloc area for CONFIG_KASAN_VMALLOC

* for-next/fgt-boot-init:
  : Booting clarifications and fine grained traps setup
  arm64: Require that system registers at all visible ELs be initialized
  arm64: Disable fine grained traps on boot
  arm64: Document requirements for fine grained traps at boot

* for-next/vhe-only:
  : Dealing with VHE-only CPUs (a.k.a. M1)
  arm64: Get rid of CONFIG_ARM64_VHE
  arm64: Cope with CPUs stuck in VHE mode
  arm64: cpufeature: Allow early filtering of feature override

* arm64/for-next/perf:
  arm64: perf: Remove redundant initialization in perf_event.c
  perf/arm_pmu_platform: Clean up with dev_printk
  perf/arm_pmu_platform: Fix error handling
  perf/arm_pmu_platform: Use dev_err_probe() for IRQ errors
  docs: perf: Address some html build warnings
  docs: perf: Add new description on HiSilicon uncore PMU v2
  drivers/perf: hisi: Add support for HiSilicon PA PMU driver
  drivers/perf: hisi: Add support for HiSilicon SLLC PMU driver
  drivers/perf: hisi: Update DDRC PMU for programmable counter
  drivers/perf: hisi: Add new functions for HHA PMU
  drivers/perf: hisi: Add new functions for L3C PMU
  drivers/perf: hisi: Add PMU version for uncore PMU drivers.
  drivers/perf: hisi: Refactor code for more uncore PMUs
  drivers/perf: hisi: Remove unnecessary check of counter index
  drivers/perf: Simplify the SMMUv3 PMU event attributes
  drivers/perf: convert sysfs sprintf family to sysfs_emit
  drivers/perf: convert sysfs scnprintf family to sysfs_emit_at() and sysfs_emit()
  drivers/perf: convert sysfs snprintf family to sysfs_emit

* for-next/neon-softirqs-disabled:
  : Run kernel mode SIMD with softirqs disabled
  arm64: fpsimd: run kernel mode NEON with softirqs disabled
  arm64: assembler: introduce wxN aliases for wN registers
  arm64: assembler: remove conditional NEON yield macros

4 years agoarm64: fpsimd: run kernel mode NEON with softirqs disabled
Ard Biesheuvel [Tue, 2 Mar 2021 09:01:12 +0000 (10:01 +0100)]
arm64: fpsimd: run kernel mode NEON with softirqs disabled

Kernel mode NEON can be used in task or softirq context, but only in
a non-nesting manner, i.e., softirq context is only permitted if the
interrupt was not taken at a point where the kernel was using the NEON
in task context.

This means all users of kernel mode NEON have to be aware of this
limitation, and either need to provide scalar fallbacks that may be much
slower (up to 20x for AES instructions) and potentially less safe, or
use an asynchronous interface that defers processing to a later time
when the NEON is guaranteed to be available.

Given that grabbing and releasing the NEON is cheap, we can relax this
restriction, by increasing the granularity of kernel mode NEON code, and
always disabling softirq processing while the NEON is being used in task
context.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210302090118.30666-4-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>