Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 5.4-1.0.0-imx to v5.4.44 from stable #80

Merged
merged 141 commits into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
d9ce4b6
ax25: fix setsockopt(SO_BINDTODEVICE)
May 20, 2020
40a904b
dpaa_eth: fix usage as DSA master, try 3
vladimiroltean May 24, 2020
b853a13
net: don't return invalid table id error when we fall back to PF_UNSPEC
qsn May 20, 2020
557045f
net: dsa: mt7530: fix roaming from DSA user ports
LGA1150 May 13, 2020
53cf25d
net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend
grygoriyS May 22, 2020
b51eb49
__netif_receive_skb_core: pass skb by reference
May 19, 2020
4d827ed
net: inet_csk: Fix so_reuseport bind-address cache in tb->fast*
iamkafai May 19, 2020
a9595d1
net: ipip: fix wrong address family in init error path
vvfedorenko May 20, 2020
212bcf1
net/mlx5: Add command entry handling completion
Dec 27, 2019
84e9131
net: mvpp2: fix RX hashing for non-10G ports
May 20, 2020
7e0e066
net: nlmsg_cancel() if put fails for nhmsg
sworleys May 20, 2020
83588bf
net: qrtr: Fix passing invalid reference to qrtr_local_enqueue()
Mani-Sadhasivam May 19, 2020
f123981
net: revert "net: get rid of an signed integer overflow in ip_idents_…
yuqijin16 May 16, 2020
587e134
net sched: fix reporting the first-time use timestamp
May 17, 2020
cf4cc95
net/tls: fix race condition causing kernel panic
vinaychelsio May 22, 2020
983fa2e
nexthop: Fix attribute checking for groups
dsahern May 17, 2020
3403676
r8152: support additional Microsoft Surface Ethernet Adapter variant
May 19, 2020
70989e5
sctp: Don't add the shutdown timer if its already been added
nhorman May 19, 2020
5398c7f
sctp: Start shutdown on association restart if in SHUTDOWN-SENT state…
JereLeppanen May 20, 2020
8c9df6c
tipc: block BH before using dst_cache
May 21, 2020
f9e2700
net/mlx5e: kTLS, Destroy key object after destroying the TIS
Apr 27, 2020
e23f88f
net/mlx5e: Fix inner tirs handling
roidayan Apr 30, 2020
02c97e8
net/mlx5: Fix memory leak in mlx5_events_init
Apr 29, 2020
9fe88c9
net/mlx5e: Update netdev txq on completions during closure
Apr 7, 2020
f493398
net/mlx5: Fix error flow in case of function_setup failure
shayshd May 6, 2020
3f4f034
net/mlx5: Annotate mutex destroy for root ns
roidayan May 14, 2020
cff9e73
net/tls: fix encryption error checking
vvfedorenko May 20, 2020
d12fc81
net/tls: free record only on encryption error
vvfedorenko May 20, 2020
fcb4d58
net: sun: fix missing release regions in cas_init_one().
QiushiWu May 22, 2020
9aeacb8
net/mlx4_core: fix a memory leak bug.
QiushiWu May 22, 2020
c5b2233
mlxsw: spectrum: Fix use-after-free of split/unsplit/type_set in case…
jpirko May 21, 2020
203a45e
ARM: dts: rockchip: fix phy nodename for rk3228-evb
Apr 16, 2020
dd35a80
ARM: dts: rockchip: fix phy nodename for rk3229-xms6
Apr 16, 2020
9dc2e51
arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts
Apr 25, 2020
96e88e6
arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node
Apr 25, 2020
881dc2e
ARM: dts: rockchip: swap clock-names of gpu nodes
Apr 25, 2020
6ff411a
ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi
Apr 24, 2020
3e4e413
gpio: tegra: mask GPIO IRQs during IRQ shutdown
nvswarren Apr 27, 2020
2578135
ALSA: usb-audio: add mapping for ASRock TRX40 Creator
adoakley May 3, 2020
02a76cd
net: microchip: encx24j600: add missed kthread_stop
WillLester May 7, 2020
fd5516e
gfs2: move privileged user check to gfs2_quota_lock_check
AstralBob May 5, 2020
4938844
gfs2: Grab glock reference sooner in gfs2_add_revoke
May 5, 2020
4552f27
drm/amdgpu: drop unnecessary cancel_delayed_work_sync on PG ungate
Apr 30, 2020
2dd33d3
drm/amd/powerplay: perform PG ungate prior to CG ungate
Apr 30, 2020
336292c
drm/amdgpu: Use GEM obj reference for KFD BOs
fxkamd May 5, 2020
e1dfa98
cachefiles: Fix race between read_waiter and read_copier involving op…
carmark May 7, 2020
e02fe52
usb: dwc3: pci: Enable extcon driver for Intel Merrifield
andy-shev May 4, 2020
e8a03e7
usb: phy: twl6030-usb: Fix a resource leak in an error handling path …
tititiou36 Apr 27, 2020
74037ef
usb: gadget: legacy: fix redundant initialization warnings
masahir0y Apr 3, 2020
706fee6
net: freescale: select CONFIG_FIXED_PHY where needed
arndb May 9, 2020
b84952e
IB/i40iw: Remove bogus call to netdev_master_upper_dev_get()
Apr 28, 2020
6b8c281
riscv: stacktrace: Fix undefined reference to `walk_stackframe'
May 11, 2020
e104bd8
clk: ti: am33xx: fix RTC clock parent
Apr 24, 2020
f3f23f4
csky: Fixup msa highest 3 bits mask
Apr 21, 2020
99bd434
csky: Fixup perf callchain unwind
MaoHan002 Apr 20, 2020
68d7232
csky: Fixup remove duplicate irq_disable
May 13, 2020
ce1ef28
hwmon: (nct7904) Fix incorrect range of temperature limit registers
ChiaYuShih May 12, 2020
2fa8032
cifs: Fix null pointer check in cifs_read
May 13, 2020
70bf0fd
csky: Fixup raw_copy_from_user()
Apr 7, 2020
dfe417b
samples: bpf: Fix build error
teknoraver May 11, 2020
b66de2d
drivers: net: hamradio: Fix suspicious RCU usage warning in bpqether.c
May 14, 2020
5a273fa
Input: usbtouchscreen - add support for BonXeon TP
jameshilliard Apr 19, 2020
9abf040
Input: evdev - call input_flush_device() on release(), not flush()
mrpippy Apr 22, 2020
d9d50cb
Input: xpad - add custom init packet for Xbox One S controllers
luk1337 Apr 22, 2020
a63a679
Input: dlink-dir685-touchkeys - fix a typo in driver name
tititiou36 Apr 22, 2020
7016d24
Input: i8042 - add ThinkPad S230u to i8042 reset list
kevinoid Apr 28, 2020
176dbb9
Input: synaptics-rmi4 - really fix attn_data use-after-free
Apr 28, 2020
4aa75ce
Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
Apr 28, 2020
f175897
ARM: 8970/1: decompressor: increase tag size
Apr 27, 2020
96e2df4
ARM: uaccess: consolidate uaccess asm to asm/uaccess-asm.h
May 3, 2020
d9c318f
ARM: uaccess: integrate uaccess_save and uaccess_restore
May 3, 2020
5242e38
ARM: uaccess: fix DACR mismatch with nested exceptions
May 3, 2020
750f47a
gpio: exar: Fix bad handling for ida_simple_get error path
tiwai Apr 29, 2020
56e7873
arm64: dts: mt8173: fix vcodec-enc clock
hsinyi527 May 4, 2020
707f507
soc: mediatek: cmdq: return send msg error code
Mar 8, 2020
820be34
gpu/drm: Ingenic: Fix opaque pointer casted to wrong type
pcercuei May 16, 2020
a38a75c
IB/qib: Call kobject_put() when kobject_init_and_add() fails
kwan-intc May 12, 2020
485bd94
ARM: dts/imx6q-bx50v3: Set display interface clock parents
BobBeckett May 14, 2020
f8b161c
ARM: dts: bcm2835-rpi-zero-w: Fix led polarity
vstehle Apr 18, 2020
2de6df8
ARM: dts: bcm: HR2: Fix PPI interrupt types
May 20, 2020
a971f71
mmc: block: Fix use-after-free issue for rpmb
May 22, 2020
d6d0708
gpio: pxa: Fix return value of pxa_gpio_probe()
May 22, 2020
b191e3e
gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()
May 22, 2020
a003e1f
RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()
QiushiWu May 23, 2020
84b0a4f
ALSA: hwdep: fix a left shifting 1 by 31 UB bug
Lawliar May 26, 2020
8c71b0b
ALSA: hda/realtek - Add a model for Thinkpad T570 without DAC workaround
tiwai May 26, 2020
4adcf88
ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC
May 26, 2020
68fe063
exec: Always set cap_ambient in cap_bprm_set_creds
ebiederm May 25, 2020
8fc8674
clk: qcom: gcc: Fix parent for gpll0_out_even
vinodkoul May 21, 2020
c33bf20
ALSA: usb-audio: Quirks for Gigabyte TRX40 Aorus Master onboard audio
tiwai May 26, 2020
d162b9e
ALSA: hda/realtek - Add new codec supported for ALC287
KailangYang May 27, 2020
4d145e4
libceph: ignore pool overlay and cache logic on redirects
swinds24 May 18, 2020
6b292d7
ceph: flush release queue when handling caps for unknown inode
jtlayton May 20, 2020
b5d326a
RDMA/core: Fix double destruction of uobject
jgunthorpe May 27, 2020
5a1bd17
drm/amd/display: drop cursor position check in atomic test
emersion May 23, 2020
21358b3
IB/ipoib: Fix double free of skb in case of multicast traffic in CM mode
May 27, 2020
a7ba9f2
mm,thp: stop leaking unreleased file pages
May 28, 2020
de482c4
mm: remove VM_BUG_ON(PageSlab()) from page_mapcount()
koct9i May 28, 2020
a02c130
fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()
ramosian-glider May 28, 2020
31f0b78
include/asm-generic/topology.h: guard cpumask_of_node() macro argument
arndb May 28, 2020
bba91cd
Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and …
axboe May 28, 2020
b298c31
gpio: fix locking open drain IRQ lines
linusw May 27, 2020
ca788fd
iommu: Fix reference count leak in iommu_group_alloc.
QiushiWu May 27, 2020
f9cd0c8
parisc: Fix kernel panic in mem_init()
hdeller May 28, 2020
8c1bfa7
cfg80211: fix debugfs rename crash
jmberg-intel May 25, 2020
2f08516
x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigne…
amluto May 9, 2020
e980f9c
mac80211: mesh: fix discovery timer re-arming issue / crash
T-X May 22, 2020
94690ca
x86/dma: Fix max PFN arithmetic overflow on 32 bit systems
LeSpocky May 26, 2020
47dc81c
copy_xstate_to_kernel(): don't leave parts of destination uninitialized
May 26, 2020
14a1c1d
xfrm: allow to accept packets with ipv6 NEXTHDR_HOP in xfrm_input
lxin Apr 10, 2020
cd7031e
xfrm: do pskb_pull properly in __xfrm_transport_prep
lxin Apr 10, 2020
edd79cf
xfrm: remove the xfrm_state_put call becofe going to out_reset
lxin Apr 10, 2020
de4a187
xfrm: call xfrm_output_gso when inner_protocol is set in xfrm_output
lxin Apr 20, 2020
d9710d6
xfrm interface: fix oops when deleting a x-netns interface
NicolasDichtel Apr 22, 2020
2561358
xfrm: fix a warning in xfrm_policy_insert_list
lxin May 25, 2020
f5dc87e
xfrm: fix a NULL-ptr deref in xfrm_local_error
lxin May 26, 2020
0de9bed
xfrm: fix error in comment
antonyantony Apr 15, 2020
26e28c1
ip_vti: receive ipip packet by calling ip_tunnel_rcv
lxin Apr 21, 2020
25f629a
netfilter: nft_reject_bridge: enable reject with bridge vlan
michael-dev May 6, 2020
17021d1
netfilter: ipset: Fix subcounter update skip
May 14, 2020
7140b62
netfilter: conntrack: make conntrack userspace helpers work again
ummakynes May 24, 2020
b16287f
netfilter: nfnetlink_cthelper: unbreak userspace helper support
ummakynes May 24, 2020
9f57771
netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code
ummakynes May 14, 2020
dda9d0e
esp6: get the right proto for transport mode in esp6_gso_encap
lxin Apr 10, 2020
2e91cd1
bnxt_en: Fix accumulation of bp->net_stats_prev.
May 25, 2020
73c0554
ieee80211: Fix incorrect mask for default PE duration
May 6, 2020
1c38cfc
xsk: Add overflow check for u64 division, stored into u32
May 25, 2020
a369e83
qlcnic: fix missing release in qlcnic_83xx_interrupt_test.
QiushiWu May 25, 2020
2b043af
crypto: chelsio/chtls: properly set tp->lsndtime
May 27, 2020
8398275
nexthops: Move code from remove_nexthop_from_groups to remove_nh_grp_…
dsahern May 26, 2020
88e81db
nexthops: don't modify published nexthop groups
May 26, 2020
568c159
nexthop: Expand nexthop_is_multipath in a few places
dsahern May 26, 2020
35c0a6e
ipv4: nexthop version of fib_info_nh_uses_dev
dsahern May 26, 2020
b668b39
net: dsa: declare lockless TX feature for slave ports
vladimiroltean May 27, 2020
a4547f6
bonding: Fix reference count leak in bond_sysfs_slave_add.
QiushiWu May 28, 2020
987de40
netfilter: conntrack: comparison of unsigned in cthelper confirmation
ummakynes May 27, 2020
7a07539
netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update
nathanchance May 27, 2020
3f57fa8
netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build
ummakynes May 27, 2020
f2a9b00
perf: Make perf able to build with latest libbfd
changbindu Jan 28, 2020
55852b3
Linux 5.4.44
gregkh Jun 3, 2020
9dafc68
Merge tag 'v5.4.44' into 5.4-1.0.0-imx
zandrey Jun 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 43
SUBLEVEL = 44
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/compressed/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SECTIONS
}
.table : ALIGN(4) {
_table_start = .;
LONG(ZIMAGE_MAGIC(2))
LONG(ZIMAGE_MAGIC(4))
LONG(ZIMAGE_MAGIC(0x5a534c4b))
LONG(ZIMAGE_MAGIC(__piggy_size_addr - _start))
LONG(ZIMAGE_MAGIC(_kernel_bss_size))
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/boot/dts/bcm-hr2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@
timer@20200 {
compatible = "arm,cortex-a9-global-timer";
reg = <0x20200 0x100>;
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
clocks = <&periph_clk>;
};

twd-timer@20600 {
compatible = "arm,cortex-a9-twd-timer";
reg = <0x20600 0x20>;
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) |
IRQ_TYPE_LEVEL_HIGH)>;
IRQ_TYPE_EDGE_RISING)>;
clocks = <&periph_clk>;
};

twd-watchdog@20620 {
compatible = "arm,cortex-a9-twd-wdt";
reg = <0x20620 0x20>;
interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) |
IRQ_TYPE_LEVEL_HIGH)>;
IRQ_TYPE_EDGE_RISING)>;
clocks = <&periph_clk>;
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

leds {
act {
gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
};
};

Expand Down
7 changes: 0 additions & 7 deletions arch/arm/boot/dts/imx6q-b450v3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@
};
};

&clks {
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
<&clks IMX6QDL_CLK_LDB_DI1_SEL>;
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
<&clks IMX6QDL_CLK_PLL3_USB_OTG>;
};

&ldb {
status = "okay";

Expand Down
7 changes: 0 additions & 7 deletions arch/arm/boot/dts/imx6q-b650v3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@
};
};

&clks {
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
<&clks IMX6QDL_CLK_LDB_DI1_SEL>;
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
<&clks IMX6QDL_CLK_PLL3_USB_OTG>;
};

&ldb {
status = "okay";

Expand Down
11 changes: 0 additions & 11 deletions arch/arm/boot/dts/imx6q-b850v3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@
};
};

&clks {
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
<&clks IMX6QDL_CLK_LDB_DI1_SEL>,
<&clks IMX6QDL_CLK_IPU1_DI0_PRE_SEL>,
<&clks IMX6QDL_CLK_IPU2_DI0_PRE_SEL>;
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
<&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
<&clks IMX6QDL_CLK_PLL2_PFD2_396M>,
<&clks IMX6QDL_CLK_PLL2_PFD2_396M>;
};

&ldb {
fsl,dual-channel;
status = "okay";
Expand Down
15 changes: 15 additions & 0 deletions arch/arm/boot/dts/imx6q-bx50v3.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -377,3 +377,18 @@
#interrupt-cells = <1>;
};
};

&clks {
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
<&clks IMX6QDL_CLK_LDB_DI1_SEL>,
<&clks IMX6QDL_CLK_IPU1_DI0_PRE_SEL>,
<&clks IMX6QDL_CLK_IPU1_DI1_PRE_SEL>,
<&clks IMX6QDL_CLK_IPU2_DI0_PRE_SEL>,
<&clks IMX6QDL_CLK_IPU2_DI1_PRE_SEL>;
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
<&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>,
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>,
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>,
<&clks IMX6QDL_CLK_PLL2_PFD0_352M>;
};
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/rk3036.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
assigned-clocks = <&cru SCLK_GPU>;
assigned-clock-rates = <100000000>;
clocks = <&cru SCLK_GPU>, <&cru SCLK_GPU>;
clock-names = "core", "bus";
clock-names = "bus", "core";
resets = <&cru SRST_GPU>;
status = "disabled";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/rk3228-evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#address-cells = <1>;
#size-cells = <0>;

phy: phy@0 {
phy: ethernet-phy@0 {
compatible = "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22";
reg = <0>;
clocks = <&cru SCLK_MAC_PHY>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/rk3229-xms6.dts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
#address-cells = <1>;
#size-cells = <0>;

phy: phy@0 {
phy: ethernet-phy@0 {
compatible = "ethernet-phy-id1234.d400",
"ethernet-phy-ieee802.3-c22";
reg = <0>;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/boot/dts/rk322x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@
"pp1",
"ppmmu1";
clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>;
clock-names = "core", "bus";
clock-names = "bus", "core";
resets = <&cru SRST_GPU_A>;
status = "disabled";
};
Expand Down Expand Up @@ -1033,7 +1033,7 @@
};
};

spi-0 {
spi0 {
spi0_clk: spi0-clk {
rockchip,pins = <0 RK_PB1 2 &pcfg_pull_up>;
};
Expand All @@ -1051,7 +1051,7 @@
};
};

spi-1 {
spi1 {
spi1_clk: spi1-clk {
rockchip,pins = <0 RK_PC7 2 &pcfg_pull_up>;
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/rk3xxx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
compatible = "arm,mali-400";
reg = <0x10090000 0x10000>;
clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>;
clock-names = "core", "bus";
clock-names = "bus", "core";
assigned-clocks = <&cru ACLK_GPU>;
assigned-clock-rates = <100000000>;
resets = <&cru SRST_GPU>;
Expand Down
75 changes: 1 addition & 74 deletions arch/arm/include/asm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
#endif

#include <asm/ptrace.h>
#include <asm/domain.h>
#include <asm/opcodes-virt.h>
#include <asm/asm-offsets.h>
#include <asm/page.h>
#include <asm/thread_info.h>
#include <asm/uaccess-asm.h>

#define IOMEM(x) (x)

Expand Down Expand Up @@ -446,79 +446,6 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
.size \name , . - \name
.endm

.macro csdb
#ifdef CONFIG_THUMB2_KERNEL
.inst.w 0xf3af8014
#else
.inst 0xe320f014
#endif
.endm

.macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req
#ifndef CONFIG_CPU_USE_DOMAINS
adds \tmp, \addr, #\size - 1
sbcscc \tmp, \tmp, \limit
bcs \bad
#ifdef CONFIG_CPU_SPECTRE
movcs \addr, #0
csdb
#endif
#endif
.endm

.macro uaccess_mask_range_ptr, addr:req, size:req, limit:req, tmp:req
#ifdef CONFIG_CPU_SPECTRE
sub \tmp, \limit, #1
subs \tmp, \tmp, \addr @ tmp = limit - 1 - addr
addhs \tmp, \tmp, #1 @ if (tmp >= 0) {
subshs \tmp, \tmp, \size @ tmp = limit - (addr + size) }
movlo \addr, #0 @ if (tmp < 0) addr = NULL
csdb
#endif
.endm

.macro uaccess_disable, tmp, isb=1
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
/*
* Whenever we re-enter userspace, the domains should always be
* set appropriately.
*/
mov \tmp, #DACR_UACCESS_DISABLE
mcr p15, 0, \tmp, c3, c0, 0 @ Set domain register
.if \isb
instr_sync
.endif
#endif
.endm

.macro uaccess_enable, tmp, isb=1
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
/*
* Whenever we re-enter userspace, the domains should always be
* set appropriately.
*/
mov \tmp, #DACR_UACCESS_ENABLE
mcr p15, 0, \tmp, c3, c0, 0
.if \isb
instr_sync
.endif
#endif
.endm

.macro uaccess_save, tmp
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
mrc p15, 0, \tmp, c3, c0, 0
str \tmp, [sp, #SVC_DACR]
#endif
.endm

.macro uaccess_restore
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
ldr r0, [sp, #SVC_DACR]
mcr p15, 0, r0, c3, c0, 0
#endif
.endm

.irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
.macro ret\c, reg
#if __LINUX_ARM_ARCH__ < 6
Expand Down
117 changes: 117 additions & 0 deletions arch/arm/include/asm/uaccess-asm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef __ASM_UACCESS_ASM_H__
#define __ASM_UACCESS_ASM_H__

#include <asm/asm-offsets.h>
#include <asm/domain.h>
#include <asm/memory.h>
#include <asm/thread_info.h>

.macro csdb
#ifdef CONFIG_THUMB2_KERNEL
.inst.w 0xf3af8014
#else
.inst 0xe320f014
#endif
.endm

.macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req
#ifndef CONFIG_CPU_USE_DOMAINS
adds \tmp, \addr, #\size - 1
sbcscc \tmp, \tmp, \limit
bcs \bad
#ifdef CONFIG_CPU_SPECTRE
movcs \addr, #0
csdb
#endif
#endif
.endm

.macro uaccess_mask_range_ptr, addr:req, size:req, limit:req, tmp:req
#ifdef CONFIG_CPU_SPECTRE
sub \tmp, \limit, #1
subs \tmp, \tmp, \addr @ tmp = limit - 1 - addr
addhs \tmp, \tmp, #1 @ if (tmp >= 0) {
subshs \tmp, \tmp, \size @ tmp = limit - (addr + size) }
movlo \addr, #0 @ if (tmp < 0) addr = NULL
csdb
#endif
.endm

.macro uaccess_disable, tmp, isb=1
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
/*
* Whenever we re-enter userspace, the domains should always be
* set appropriately.
*/
mov \tmp, #DACR_UACCESS_DISABLE
mcr p15, 0, \tmp, c3, c0, 0 @ Set domain register
.if \isb
instr_sync
.endif
#endif
.endm

.macro uaccess_enable, tmp, isb=1
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
/*
* Whenever we re-enter userspace, the domains should always be
* set appropriately.
*/
mov \tmp, #DACR_UACCESS_ENABLE
mcr p15, 0, \tmp, c3, c0, 0
.if \isb
instr_sync
.endif
#endif
.endm

#if defined(CONFIG_CPU_SW_DOMAIN_PAN) || defined(CONFIG_CPU_USE_DOMAINS)
#define DACR(x...) x
#else
#define DACR(x...)
#endif

/*
* Save the address limit on entry to a privileged exception.
*
* If we are using the DACR for kernel access by the user accessors
* (CONFIG_CPU_USE_DOMAINS=y), always reset the DACR kernel domain
* back to client mode, whether or not \disable is set.
*
* If we are using SW PAN, set the DACR user domain to no access
* if \disable is set.
*/
.macro uaccess_entry, tsk, tmp0, tmp1, tmp2, disable
ldr \tmp1, [\tsk, #TI_ADDR_LIMIT]
mov \tmp2, #TASK_SIZE
str \tmp2, [\tsk, #TI_ADDR_LIMIT]
DACR( mrc p15, 0, \tmp0, c3, c0, 0)
DACR( str \tmp0, [sp, #SVC_DACR])
str \tmp1, [sp, #SVC_ADDR_LIMIT]
.if \disable && IS_ENABLED(CONFIG_CPU_SW_DOMAIN_PAN)
/* kernel=client, user=no access */
mov \tmp2, #DACR_UACCESS_DISABLE
mcr p15, 0, \tmp2, c3, c0, 0
instr_sync
.elseif IS_ENABLED(CONFIG_CPU_USE_DOMAINS)
/* kernel=client */
bic \tmp2, \tmp0, #domain_mask(DOMAIN_KERNEL)
orr \tmp2, \tmp2, #domain_val(DOMAIN_KERNEL, DOMAIN_CLIENT)
mcr p15, 0, \tmp2, c3, c0, 0
instr_sync
.endif
.endm

/* Restore the user access state previously saved by uaccess_entry */
.macro uaccess_exit, tsk, tmp0, tmp1
ldr \tmp1, [sp, #SVC_ADDR_LIMIT]
DACR( ldr \tmp0, [sp, #SVC_DACR])
str \tmp1, [\tsk, #TI_ADDR_LIMIT]
DACR( mcr p15, 0, \tmp0, c3, c0, 0)
.endm

#undef DACR

#endif /* __ASM_UACCESS_ASM_H__ */
Loading