Merge branch 'android11-5.4' into 'android11-5.4-lts'

Sync up with android11-5.4 for the following commits:

4417145c4f UPSTREAM: arm64: vdso: Avoid ISB after reading from cntvct_el0
d09f0a4e23 ANDROID: GKI: Disable X86_MCE drivers
aa64559e55 ANDROID: GKI: Add FCNT KMI symbol list
498eb6780a ANDROID: fuse: Allocate zeroed memory for canonical path

Change-Id: I2305f9baae11c994ac52ae7d6a2879dd08798f26
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2021-08-12 13:59:08 +02:00
7 changed files with 94 additions and 28 deletions

View File

@@ -0,0 +1,71 @@
[abi_symbol_list]
# required by appnv.ko
__lock_page
sync_blockdev
read_cache_page
blkdev_put
blkdev_get_by_dev
# required by pt.ko
input_mt_sync_frame
mod_timer_pending
# required by pt_device_access.ko
device_remove_bin_file
request_firmware_direct
# required by msm_drm.ko
mipi_dsi_dcs_write_buffer
# required by earphonedrv.ko
gpiod_put
iio_read_channel_raw
# required by drv260x.ko
devm_led_classdev_unregister
regmap_multi_reg_write
# required by leds-gpio.ko
gpiod_set_consumer_name
# required by qpnp-smb5-main.ko
param_get_uint
round_jiffies_relative
emergency_restart
# required by fj_watchdog.ko
del_timer
panic
param_get_uint
param_set_int
platform_device_register
# required by sleep_time_log.ko
register_pm_notifier
rtc_time64_to_tm
unregister_pm_notifier
# required by aw_haptic.ko
devm_gpio_free
# required by fs18xx_dlkm.ko
snd_pcm_format_physical_width
snd_pcm_hw_constraint_mask64
# required by camera.ko
i2c_unregister_device
i2c_smbus_write_byte_data
i2c_smbus_read_byte_data
# required by semi_touch_driver.ko
vfs_llseek
# required by cdfingerfp.ko
wakeup_source_remove
wakeup_source_add
# required by drv2624-ram.ko
devm_led_classdev_unregister
# required by chipone-ts.ko
input_mt_sync_frame

View File

@@ -165,25 +165,6 @@ 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 __always_inline u64 __arch_counter_get_cntpct_stable(void)
{
u64 cnt;
@@ -224,8 +205,6 @@ static __always_inline u64 __arch_counter_get_cntvct(void)
return cnt;
}
#undef arch_counter_enforce_ordering
static inline int arch_timer_arch_init(void)
{
return 0;

View File

@@ -57,6 +57,25 @@ static inline unsigned long array_index_mask_nospec(unsigned long idx,
return mask;
}
/*
* 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)
#define __smp_mb() dmb(ish)
#define __smp_rmb() dmb(ishld)
#define __smp_wmb() dmb(ishst)

View File

@@ -86,11 +86,7 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)
*/
isb();
asm volatile("mrs %0, cntvct_el0" : "=r" (res) :: "memory");
/*
* This isb() is required to prevent that the seq lock is
* speculated.#
*/
isb();
arch_counter_enforce_ordering(res);
return res;
}

View File

@@ -53,6 +53,7 @@ CONFIG_X86_X2APIC=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
CONFIG_NR_CPUS=32
# CONFIG_X86_MCE is not set
CONFIG_EFI=y
CONFIG_PM_WAKELOCKS=y
CONFIG_PM_WAKELOCKS_LIMIT=0
@@ -304,7 +305,6 @@ CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
CONFIG_CPU_THERMAL=y
CONFIG_DEVFREQ_THERMAL=y
CONFIG_THERMAL_EMULATION=y
# CONFIG_X86_PKG_TEMP_THERMAL is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
CONFIG_MFD_SYSCON=y

View File

@@ -9,6 +9,7 @@ android/abi_gki_aarch64_cuttlefish
android/abi_gki_aarch64_db845c
android/abi_gki_aarch64_exynos
android/abi_gki_aarch64_exynosauto
android/abi_gki_aarch64_fcnt
android/abi_gki_aarch64_galaxy
android/abi_gki_aarch64_goldfish
android/abi_gki_aarch64_hikey960

View File

@@ -311,7 +311,7 @@ static void fuse_dentry_canonical_path(const struct path *path, struct path *can
char *path_name;
int err;
path_name = (char*)__get_free_page(GFP_KERNEL);
path_name = (char *)get_zeroed_page(GFP_KERNEL);
if (!path_name)
goto default_path;