Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
7761dbf
locking/rwsem: Prevent decrement of reader count before increment
Waiman-Long Apr 28, 2019
393ca9e
x86/speculation/mds: Revert CPU buffer clear on double fault exit
amluto May 14, 2019
b185029
x86/speculation/mds: Improve CPU buffer clear documentation
amluto May 14, 2019
7b72ca6
objtool: Fix function fallthrough detection
jpoimboe May 13, 2019
8cf1bbc
arm64: dts: rockchip: Disable DCMDs on RK3399's eMMC controller.
cmuellner Mar 22, 2019
abea1fb
ARM: dts: exynos: Fix interrupt for shared EINTs on Exynos5260
Feb 19, 2019
e2c436d
ARM: dts: exynos: Fix audio (microphone) routing on Odroid XU3
Mar 20, 2019
6eaeee1
mmc: sdhci-of-arasan: Add DTS property to disable DCMDs.
cmuellner Mar 22, 2019
921bc15
ARM: exynos: Fix a leaked reference by adding missing of_node_put
taskset Mar 5, 2019
26eb5e7
power: supply: axp288_charger: Fix unchecked return value
GustavoARSilva Mar 18, 2019
592127e
power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to th…
jwrdegoede Apr 22, 2019
222abad
arm64: mmap: Ensure file offset is treated as unsigned
milk163 Apr 29, 2019
6d696ce
arm64: arch_timer: Ensure counter register reads occur with seqlock held
wildea01 Apr 29, 2019
26e7d2a
arm64: compat: Reduce address limit
fvincenzo Apr 1, 2019
f273cd1
arm64: Clear OSDLR_EL1 on CPU boot
Apr 8, 2019
d8d751e
arm64: Save and restore OSDLR_EL1 across suspend/resume
Apr 8, 2019
2ea1a37
sched/x86: Save [ER]FLAGS on context switch
Feb 14, 2019
c1ec6be
crypto: crypto4xx - fix ctr-aes missing output IV
chunkeey Apr 22, 2019
7a32ad3
crypto: crypto4xx - fix cfb and ofb "overran dst buffer" issues
chunkeey Apr 22, 2019
3b5ddd5
crypto: salsa20 - don't access already-freed walk.iv
ebiggers Apr 10, 2019
fe632ee
crypto: chacha20poly1305 - set cra_name correctly
ebiggers Mar 31, 2019
07d677a
crypto: ccp - Do not free psp_master when PLATFORM_INIT fails
codomania Apr 8, 2019
66f5de6
crypto: vmx - fix copy-paste error in CTR mode
daxtens Mar 15, 2019
aabf86f
crypto: skcipher - don't WARN on unprocessed data after slow walk step
ebiggers Mar 31, 2019
7a19a4b
crypto: crct10dif-generic - fix use via crypto_shash_digest()
ebiggers Mar 31, 2019
e7fd8a2
crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest()
ebiggers Mar 31, 2019
63efe31
crypto: arm64/gcm-aes-ce - fix no-NEON fallback code
ebiggers Mar 13, 2019
9a61ab6
crypto: gcm - fix incompatibility between "gcm" and "gcm_base"
ebiggers Apr 18, 2019
b7d2adf
crypto: rockchip - update IV buffer to contain the next IV
ElonZhang0328 Apr 12, 2019
69b9d32
crypto: arm/aes-neonbs - don't access already-freed walk.iv
ebiggers Apr 10, 2019
d42d342
crypto: arm64/aes-neonbs - don't access already-freed walk.iv
ebiggers Apr 10, 2019
003cf67
mmc: core: Fix tag set memory leak
May 2, 2019
741e3ef
ALSA: line6: toneport: Fix broken usage of timer for delayed execution
tiwai May 8, 2019
30dda27
ALSA: usb-audio: Fix a memory leak bug
Apr 27, 2019
8c827cd
ALSA: hda/hdmi - Read the pin sense from register when repolling
jason77-wang May 6, 2019
4ac6316
ALSA: hda/hdmi - Consider eld_valid when reporting jack event
jason77-wang May 6, 2019
d33f606
ALSA: hda/realtek - EAPD turn on later
KailangYang Apr 26, 2019
e13bac4
ALSA: hdea/realtek - Headset fixup for System76 Gazelle (gaze14)
jackpot51 May 7, 2019
7295359
ASoC: max98090: Fix restore of DAPM Muxes
jonhunter May 1, 2019
df9f111
ASoC: RT5677-SPI: Disable 16Bit SPI Transfers
cujomalainey May 3, 2019
975ef5c
ASoC: fsl_esai: Fix missing break in switch statement
TE-N-ShengjiuWang Apr 28, 2019
f371425
ASoC: codec: hdac_hdmi add device_link to card device
libinyang Apr 13, 2019
1bfceb3
bpf, arm64: remove prefetch insn in xadd mapping
borkmann Apr 26, 2019
642de1c
crypto: ccree - remove special handling of chained sg
Apr 18, 2019
7560c0a
crypto: ccree - fix mem leak on error path
Apr 18, 2019
766121a
crypto: ccree - don't map MAC key on stack
Apr 18, 2019
ca687cd
crypto: ccree - use correct internal state sizes for export
Apr 18, 2019
120ab82
crypto: ccree - don't map AEAD key and IV on stack
Apr 18, 2019
1a4fc3d
crypto: ccree - pm resume first enable the source clk
ofirdrang Apr 18, 2019
65f5c14
crypto: ccree - HOST_POWER_DOWN_EN should be the last CC access durin…
ofirdrang Apr 18, 2019
4fb3d87
crypto: ccree - add function to handle cryptocell tee fips error
ofirdrang Apr 18, 2019
681f369
crypto: ccree - handle tee fips error during power management resume
ofirdrang Apr 18, 2019
f580a54
mm/mincore.c: make mincore() more conservative
May 14, 2019
58db381
mm/huge_memory: fix vmf_insert_pfn_{pmd, pud}() crash, handle unalign…
djbw May 14, 2019
0b16b09
mm/hugetlb.c: don't put_page in lock of hugetlb_lock
May 14, 2019
a3ccc15
hugetlb: use same fault hash key for shared and private mappings
mjkravetz May 14, 2019
3574bc9
ocfs2: fix ocfs2 read inode data panic in ocfs2_iget
May 14, 2019
8bae439
userfaultfd: use RCU to free the task struct when fork fails
aagit May 14, 2019
770e46b
ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle
May 13, 2019
5185672
mfd: da9063: Fix OTP control register names to match datasheets for D…
Apr 26, 2019
dc6d69b
mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values
digetx May 5, 2019
6a01793
mtd: spi-nor: intel-spi: Avoid crossing 4K address boundary on read/w…
asverdlin Mar 19, 2019
d90824e
tty: vt.c: Fix TIOCL_BLANKSCREEN console blanking if blankinterval == 0
biergaizi Mar 4, 2019
0fd2df6
tty/vt: fix write/write race in ioctl(KDSKBSENT) handler
Mar 10, 2019
001fe0d
jbd2: check superblock mapped prior to committing
Apr 6, 2019
71478ef
ext4: make sanity check in mballoc more strict
jankara Apr 6, 2019
f0f805f
ext4: ignore e_value_offs for xattrs with value-in-ea-inode
tytso Apr 10, 2019
b12a8d8
ext4: avoid drop reference to iloc.bh twice
SinkFinder Apr 25, 2019
2a18c9c
ext4: fix use-after-free race with debug_want_extra_isize
Apr 25, 2019
f795247
ext4: actually request zeroing of inode table after grow
Apr 25, 2019
45123ae
ext4: fix ext4_show_options for file systems w/o journal
dbavatar May 1, 2019
d8925a1
btrfs: Check the first key and level for cached extent buffer
adam900710 Mar 12, 2019
87dcf0c
btrfs: Correctly free extent buffer in case btree_read_extent_buffer_…
lorddoskias Mar 14, 2019
8b13bb9
btrfs: Honour FITRIM range constraints during free space trim
lorddoskias Mar 25, 2019
74ca0a7
Btrfs: send, flush dellaloc in order to avoid data loss
fdmanana Apr 15, 2019
0388d45
Btrfs: do not start a transaction during fiemap
fdmanana Apr 15, 2019
8a8f671
Btrfs: do not start a transaction at iterate_extent_inodes()
fdmanana Apr 17, 2019
ecfc882
bcache: fix a race between cache register and cacheset unregister
LiangChen77 Apr 24, 2019
8868164
bcache: never set KEY_PTRS of journal key to 0 in journal_reclaim()
Apr 24, 2019
f6de0a3
ipmi:ssif: compare block number correctly for multi-part return messages
kamlakantp Apr 24, 2019
a80da82
crypto: ccm - fix incompatibility between "ccm" and "ccm_base"
ebiggers Apr 18, 2019
986d345
fs/writeback.c: use rcu_barrier() to wait for inflight wb switches go…
May 17, 2019
c907ce3
tty: Don't force RISCV SBI console as preferred console
avpatel Apr 25, 2019
25d010f
ext4: zero out the unused memory region in the extent tree block
rsriramr May 10, 2019
0db2412
ext4: fix data corruption caused by overlapping unaligned and aligned IO
May 11, 2019
c19db36
ext4: fix use-after-free in dx_release()
May 11, 2019
316063b
ext4: avoid panic during forced reboot due to aborted journal
jankara May 17, 2019
ae31551
ALSA: hda/realtek - Corrected fixup for System76 Gazelle (gaze14)
jackpot51 May 10, 2019
e0e1dc6
ALSA: hda/realtek - Fixup headphone noise via runtime suspend
KailangYang May 10, 2019
95482af
ALSA: hda/realtek - Fix for Lenovo B50-70 inverted internal microphon…
Michal-Wadowski May 14, 2019
5b85676
jbd2: fix potential double free
May 11, 2019
3b5ea2d
KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes
Apr 2, 2019
38f1148
KVM: lapic: Busy wait for timer to expire when using hv_timer
Apr 16, 2019
98bdd33
kbuild: turn auto.conf.cmd into a mandatory include file
masahir0y May 12, 2019
756eda9
xen/pvh: set xen_domain_type to HVM in xen_pvh_init
royger Apr 23, 2019
866f011
libnvdimm/namespace: Fix label tracking error
djbw May 1, 2019
627bb2d
iov_iter: optimize page_copy_sane()
edumazet Feb 26, 2019
f4bf101
pstore: Centralize init/exit routines
kees Oct 18, 2018
fea8b84
pstore: Allocate compression during late_initcall()
joelagnel Oct 17, 2018
953e826
pstore: Refactor compression initialization
kees Oct 17, 2018
6172ae5
ext4: fix compile error when using BUFFER_TRACE
zhangyi089 Feb 21, 2019
e8816d3
ext4: don't update s_rev_level if not required
adilger Feb 14, 2019
c3a0725
Linux 4.19.45
gregkh May 22, 2019
d92c7a5
Merge tag 'v4.19.45' into 4.19.x+fslc
schnitzeltony May 23, 2019
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
44 changes: 6 additions & 38 deletions Documentation/x86/mds.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,45 +142,13 @@ Mitigation points
mds_user_clear.

The mitigation is invoked in prepare_exit_to_usermode() which covers
most of the kernel to user space transitions. There are a few exceptions
which are not invoking prepare_exit_to_usermode() on return to user
space. These exceptions use the paranoid exit code.
all but one of the kernel to user space transitions. The exception
is when we return from a Non Maskable Interrupt (NMI), which is
handled directly in do_nmi().

- Non Maskable Interrupt (NMI):

Access to sensible data like keys, credentials in the NMI context is
mostly theoretical: The CPU can do prefetching or execute a
misspeculated code path and thereby fetching data which might end up
leaking through a buffer.

But for mounting other attacks the kernel stack address of the task is
already valuable information. So in full mitigation mode, the NMI is
mitigated on the return from do_nmi() to provide almost complete
coverage.

- Double fault (#DF):

A double fault is usually fatal, but the ESPFIX workaround, which can
be triggered from user space through modify_ldt(2) is a recoverable
double fault. #DF uses the paranoid exit path, so explicit mitigation
in the double fault handler is required.

- Machine Check Exception (#MC):

Another corner case is a #MC which hits between the CPU buffer clear
invocation and the actual return to user. As this still is in kernel
space it takes the paranoid exit path which does not clear the CPU
buffers. So the #MC handler repopulates the buffers to some
extent. Machine checks are not reliably controllable and the window is
extremly small so mitigation would just tick a checkbox that this
theoretical corner case is covered. To keep the amount of special
cases small, ignore #MC.

- Debug Exception (#DB):

This takes the paranoid exit path only when the INT1 breakpoint is in
kernel space. #DB on a user space address takes the regular exit path,
so no extra mitigation required.
(The reason that NMI is special is that prepare_exit_to_usermode() can
enable IRQs. In NMI context, NMIs are blocked, and we don't want to
enable IRQs with NMIs blocked.)


2. C-State transition
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 44
SUBLEVEL = 45
EXTRAVERSION =
NAME = "People's Front"

Expand Down Expand Up @@ -623,7 +623,7 @@ ifeq ($(may-sync-config),1)
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
# because some architectures define CROSS_COMPILE there.
-include include/config/auto.conf.cmd
include include/config/auto.conf.cmd

# To avoid any implicit rule to kick in, define an empty command
$(KCONFIG_CONFIG): ;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/exynos5260.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
wakeup-interrupt-controller {
compatible = "samsung,exynos4210-wakeup-eint";
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
};
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Headphone Jack", "HPL",
"Headphone Jack", "HPR",
"Headphone Jack", "MICBIAS",
"IN1", "Headphone Jack",
"IN12", "Headphone Jack",
"Speakers", "SPKL",
"Speakers", "SPKR";

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/crypto/aes-neonbs-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ static int __xts_crypt(struct skcipher_request *req,
int err;

err = skcipher_walk_virt(&walk, req, true);
if (err)
return err;

crypto_cipher_encrypt_one(ctx->tweak_tfm, walk.iv, walk.iv);

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-exynos/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ void __init exynos_firmware_init(void)
return;

addr = of_get_address(nd, 0, NULL, NULL);
of_node_put(nd);
if (!addr) {
pr_err("%s: No address specified.\n", __func__);
return;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-exynos/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,10 @@ void __init exynos_pm_init(void)

if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
of_node_put(np);
return;
}
of_node_put(np);

pm_data = (const struct exynos_pm_data *) match->data;

Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/rockchip/rk3399.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@
phys = <&emmc_phy>;
phy-names = "phy_arasan";
power-domains = <&power RK3399_PD_EMMC>;
disable-cqe-dcmd;
status = "disabled";
};

Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/crypto/aes-neonbs-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ static int __xts_crypt(struct skcipher_request *req,
int err;

err = skcipher_walk_virt(&walk, req, false);
if (err)
return err;

kernel_neon_begin();
neon_aes_ecb_encrypt(walk.iv, walk.iv, ctx->twkey, ctx->key.rounds, 1);
Expand Down
10 changes: 6 additions & 4 deletions arch/arm64/crypto/ghash-ce-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,11 @@ static int gcm_encrypt(struct aead_request *req)
put_unaligned_be32(2, iv + GCM_IV_SIZE);

while (walk.nbytes >= (2 * AES_BLOCK_SIZE)) {
int blocks = walk.nbytes / AES_BLOCK_SIZE;
const int blocks =
walk.nbytes / (2 * AES_BLOCK_SIZE) * 2;
u8 *dst = walk.dst.virt.addr;
u8 *src = walk.src.virt.addr;
int remaining = blocks;

do {
__aes_arm64_encrypt(ctx->aes_key.key_enc,
Expand All @@ -430,9 +432,9 @@ static int gcm_encrypt(struct aead_request *req)

dst += AES_BLOCK_SIZE;
src += AES_BLOCK_SIZE;
} while (--blocks > 0);
} while (--remaining > 0);

ghash_do_update(walk.nbytes / AES_BLOCK_SIZE, dg,
ghash_do_update(blocks, dg,
walk.dst.virt.addr, &ctx->ghash_key,
NULL);

Expand Down Expand Up @@ -553,7 +555,7 @@ static int gcm_decrypt(struct aead_request *req)
put_unaligned_be32(2, iv + GCM_IV_SIZE);

while (walk.nbytes >= (2 * AES_BLOCK_SIZE)) {
int blocks = walk.nbytes / AES_BLOCK_SIZE;
int blocks = walk.nbytes / (2 * AES_BLOCK_SIZE) * 2;
u8 *dst = walk.dst.virt.addr;
u8 *src = walk.src.virt.addr;

Expand Down
33 changes: 31 additions & 2 deletions arch/arm64/include/asm/arch_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,47 @@ static inline void arch_timer_set_cntkctl(u32 cntkctl)
isb();
}

/*
* Ensure that reads of the counter are treated the same as memory reads
* for the purposes of ordering by subsequent memory barriers.
*
* This insanity brought to you by speculative system register reads,
* out-of-order memory accesses, sequence locks and Thomas Gleixner.
*
* http://lists.infradead.org/pipermail/linux-arm-kernel/2019-February/631195.html
*/
#define arch_counter_enforce_ordering(val) do { \
u64 tmp, _val = (val); \
\
asm volatile( \
" eor %0, %1, %1\n" \
" add %0, sp, %0\n" \
" ldr xzr, [%0]" \
: "=r" (tmp) : "r" (_val)); \
} while (0)

static inline u64 arch_counter_get_cntpct(void)
{
u64 cnt;

isb();
return arch_timer_reg_read_stable(cntpct_el0);
cnt = arch_timer_reg_read_stable(cntpct_el0);
arch_counter_enforce_ordering(cnt);
return cnt;
}

static inline u64 arch_counter_get_cntvct(void)
{
u64 cnt;

isb();
return arch_timer_reg_read_stable(cntvct_el0);
cnt = arch_timer_reg_read_stable(cntvct_el0);
arch_counter_enforce_ordering(cnt);
return cnt;
}

#undef arch_counter_enforce_ordering

static inline int arch_timer_arch_init(void)
{
return 0;
Expand Down
8 changes: 8 additions & 0 deletions arch/arm64/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@
* TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area.
*/
#ifdef CONFIG_COMPAT
#ifdef CONFIG_ARM64_64K_PAGES
/*
* With CONFIG_ARM64_64K_PAGES enabled, the last page is occupied
* by the compat vectors page.
*/
#define TASK_SIZE_32 UL(0x100000000)
#else
#define TASK_SIZE_32 (UL(0x100000000) - PAGE_SIZE)
#endif /* CONFIG_ARM64_64K_PAGES */
#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \
TASK_SIZE_32 : TASK_SIZE_64)
#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kernel/debug-monitors.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ NOKPROBE_SYMBOL(disable_debug_monitors);
*/
static int clear_os_lock(unsigned int cpu)
{
write_sysreg(0, osdlr_el1);
write_sysreg(0, oslar_el1);
isb();
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags,
unsigned long, fd, off_t, off)
unsigned long, fd, unsigned long, off)
{
if (offset_in_page(off) != 0)
return -EINVAL;
Expand Down
15 changes: 11 additions & 4 deletions arch/arm64/kernel/vdso/gettimeofday.S
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ x_tmp .req x8
movn x_tmp, #0xff00, lsl #48
and \res, x_tmp, \res
mul \res, \res, \mult
/*
* Fake address dependency from the value computed from the counter
* register to subsequent data page accesses so that the sequence
* locking also orders the read of the counter.
*/
and x_tmp, \res, xzr
add vdso_data, vdso_data, x_tmp
.endm

/*
Expand Down Expand Up @@ -147,12 +154,12 @@ ENTRY(__kernel_gettimeofday)
/* w11 = cs_mono_mult, w12 = cs_shift */
ldp w11, w12, [vdso_data, #VDSO_CS_MONO_MULT]
ldp x13, x14, [vdso_data, #VDSO_XTIME_CLK_SEC]
seqcnt_check fail=1b

get_nsec_per_sec res=x9
lsl x9, x9, x12

get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
seqcnt_check fail=1b
get_ts_realtime res_sec=x10, res_nsec=x11, \
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9

Expand Down Expand Up @@ -211,13 +218,13 @@ realtime:
/* w11 = cs_mono_mult, w12 = cs_shift */
ldp w11, w12, [vdso_data, #VDSO_CS_MONO_MULT]
ldp x13, x14, [vdso_data, #VDSO_XTIME_CLK_SEC]
seqcnt_check fail=realtime

/* All computations are done with left-shifted nsecs. */
get_nsec_per_sec res=x9
lsl x9, x9, x12

get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
seqcnt_check fail=realtime
get_ts_realtime res_sec=x10, res_nsec=x11, \
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9
clock_gettime_return, shift=1
Expand All @@ -231,14 +238,14 @@ monotonic:
ldp w11, w12, [vdso_data, #VDSO_CS_MONO_MULT]
ldp x13, x14, [vdso_data, #VDSO_XTIME_CLK_SEC]
ldp x3, x4, [vdso_data, #VDSO_WTM_CLK_SEC]
seqcnt_check fail=monotonic

/* All computations are done with left-shifted nsecs. */
lsl x4, x4, x12
get_nsec_per_sec res=x9
lsl x9, x9, x12

get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
seqcnt_check fail=monotonic
get_ts_realtime res_sec=x10, res_nsec=x11, \
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9

Expand All @@ -253,13 +260,13 @@ monotonic_raw:
/* w11 = cs_raw_mult, w12 = cs_shift */
ldp w12, w11, [vdso_data, #VDSO_CS_SHIFT]
ldp x13, x14, [vdso_data, #VDSO_RAW_TIME_SEC]
seqcnt_check fail=monotonic_raw

/* All computations are done with left-shifted nsecs. */
get_nsec_per_sec res=x9
lsl x9, x9, x12

get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
seqcnt_check fail=monotonic_raw
get_ts_clock_raw res_sec=x10, res_nsec=x11, \
clock_nsec=x15, nsec_to_sec=x9

Expand Down
34 changes: 18 additions & 16 deletions arch/arm64/mm/proc.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,25 @@ ENTRY(cpu_do_suspend)
mrs x2, tpidr_el0
mrs x3, tpidrro_el0
mrs x4, contextidr_el1
mrs x5, cpacr_el1
mrs x6, tcr_el1
mrs x7, vbar_el1
mrs x8, mdscr_el1
mrs x9, oslsr_el1
mrs x10, sctlr_el1
mrs x5, osdlr_el1
mrs x6, cpacr_el1
mrs x7, tcr_el1
mrs x8, vbar_el1
mrs x9, mdscr_el1
mrs x10, oslsr_el1
mrs x11, sctlr_el1
alternative_if_not ARM64_HAS_VIRT_HOST_EXTN
mrs x11, tpidr_el1
mrs x12, tpidr_el1
alternative_else
mrs x11, tpidr_el2
mrs x12, tpidr_el2
alternative_endif
mrs x12, sp_el0
mrs x13, sp_el0
stp x2, x3, [x0]
stp x4, xzr, [x0, #16]
stp x5, x6, [x0, #32]
stp x7, x8, [x0, #48]
stp x9, x10, [x0, #64]
stp x11, x12, [x0, #80]
stp x4, x5, [x0, #16]
stp x6, x7, [x0, #32]
stp x8, x9, [x0, #48]
stp x10, x11, [x0, #64]
stp x12, x13, [x0, #80]
ret
ENDPROC(cpu_do_suspend)

Expand All @@ -110,8 +111,8 @@ ENTRY(cpu_do_resume)
msr cpacr_el1, x6

/* Don't change t0sz here, mask those bits when restoring */
mrs x5, tcr_el1
bfi x8, x5, TCR_T0SZ_OFFSET, TCR_TxSZ_WIDTH
mrs x7, tcr_el1
bfi x8, x7, TCR_T0SZ_OFFSET, TCR_TxSZ_WIDTH

msr tcr_el1, x8
msr vbar_el1, x9
Expand All @@ -135,6 +136,7 @@ alternative_endif
/*
* Restore oslsr_el1 by writing oslar_el1
*/
msr osdlr_el1, x5
ubfx x11, x11, #1, #1
msr oslar_el1, x11
reset_pmuserenr_el0 x0 // Disable PMU access from EL0
Expand Down
6 changes: 0 additions & 6 deletions arch/arm64/net/bpf_jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@
#define A64_STXR(sf, Rt, Rn, Rs) \
A64_LSX(sf, Rt, Rn, Rs, STORE_EX)

/* Prefetch */
#define A64_PRFM(Rn, type, target, policy) \
aarch64_insn_gen_prefetch(Rn, AARCH64_INSN_PRFM_TYPE_##type, \
AARCH64_INSN_PRFM_TARGET_##target, \
AARCH64_INSN_PRFM_POLICY_##policy)

/* Add/subtract (immediate) */
#define A64_ADDSUB_IMM(sf, Rd, Rn, imm12, type) \
aarch64_insn_gen_add_sub_imm(Rd, Rn, imm12, \
Expand Down
Loading