Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2abce4ec authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 5.4.149 into android11-5.4-lts



Changes in 5.4.149
	PCI: pci-bridge-emul: Fix big-endian support
	PCI: aardvark: Indicate error in 'val' when config read fails
	PCI: pci-bridge-emul: Add PCIe Root Capabilities Register
	PCI: aardvark: Fix reporting CRS value
	PCI/ACPI: Add Ampere Altra SOC MCFG quirk
	KVM: remember position in kvm->vcpus array
	console: consume APC, DM, DCS
	s390/pci_mmio: fully validate the VMA before calling follow_pte()
	ARM: Qualify enabling of swiotlb_init()
	apparmor: remove duplicate macro list_entry_is_head()
	ARM: 9077/1: PLT: Move struct plt_entries definition to header
	ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link()
	ARM: 9079/1: ftrace: Add MODULE_PLTS support
	ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE
	sctp: validate chunk size in __rcv_asconf_lookup
	sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
	staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()
	um: virtio_uml: fix memory leak on init failures
	dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
	thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
	9p/trans_virtio: Remove sysfs file on probe failure
	prctl: allow to setup brk for et_dyn executables
	nilfs2: use refcount_dec_and_lock() to fix potential UAF
	profiling: fix shift-out-of-bounds bugs
	pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
	phy: avoid unnecessary link-up delay in polling mode
	net: stmmac: reset Tx desc base address before restarting Tx
	Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH
	thermal/core: Fix thermal_cooling_device_register() prototype
	drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION()
	parisc: Move pci_dev_is_behind_card_dino to where it is used
	dmaengine: sprd: Add missing MODULE_DEVICE_TABLE
	dmaengine: ioat: depends on !UML
	dmaengine: xilinx_dma: Set DMA mask for coherent APIs
	ceph: request Fw caps before updating the mtime in ceph_write_iter
	ceph: lockdep annotations for try_nonblocking_invalidate
	btrfs: fix lockdep warning while mounting sprout fs
	nilfs2: fix memory leak in nilfs_sysfs_create_device_group
	nilfs2: fix NULL pointer in nilfs_##name##_attr_release
	nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
	nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group
	nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
	nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
	pwm: img: Don't modify HW state in .remove() callback
	pwm: rockchip: Don't modify HW state in .remove() callback
	pwm: stm32-lp: Don't modify HW state in .remove() callback
	blk-throttle: fix UAF by deleteing timer in blk_throtl_exit()
	rtc: rx8010: select REGMAP_I2C
	drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
	Linux 5.4.149

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic55297fb43e33c9ff518898479a7313aafeb9375
parents 5785e536 e74e2950
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 148
SUBLEVEL = 149
EXTRAVERSION =
NAME = Kleptomaniac Octopus

+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@ extern void __gnu_mcount_nc(void);

#ifdef CONFIG_DYNAMIC_FTRACE
struct dyn_arch_ftrace {
#ifdef CONFIG_ARM_MODULE_PLTS
	struct module *mod;
#endif
};

static inline unsigned long ftrace_call_adjust(unsigned long addr)
+4 −4
Original line number Diff line number Diff line
@@ -13,18 +13,18 @@ arm_gen_nop(void)
}

unsigned long
__arm_gen_branch(unsigned long pc, unsigned long addr, bool link);
__arm_gen_branch(unsigned long pc, unsigned long addr, bool link, bool warn);

static inline unsigned long
arm_gen_branch(unsigned long pc, unsigned long addr)
{
	return __arm_gen_branch(pc, addr, false);
	return __arm_gen_branch(pc, addr, false, true);
}

static inline unsigned long
arm_gen_branch_link(unsigned long pc, unsigned long addr)
arm_gen_branch_link(unsigned long pc, unsigned long addr, bool warn)
{
	return __arm_gen_branch(pc, addr, true);
	return __arm_gen_branch(pc, addr, true, warn);
}

#endif
+10 −0
Original line number Diff line number Diff line
@@ -19,8 +19,18 @@ enum {
};
#endif

#define PLT_ENT_STRIDE		L1_CACHE_BYTES
#define PLT_ENT_COUNT		(PLT_ENT_STRIDE / sizeof(u32))
#define PLT_ENT_SIZE		(sizeof(struct plt_entries) / PLT_ENT_COUNT)

struct plt_entries {
	u32	ldr[PLT_ENT_COUNT];
	u32	lit[PLT_ENT_COUNT];
};

struct mod_plt_sec {
	struct elf32_shdr	*plt;
	struct plt_entries	*plt_ent;
	int			plt_count;
};

+38 −8
Original line number Diff line number Diff line
@@ -71,9 +71,10 @@ int ftrace_arch_code_modify_post_process(void)
	return 0;
}

static unsigned long ftrace_call_replace(unsigned long pc, unsigned long addr)
static unsigned long ftrace_call_replace(unsigned long pc, unsigned long addr,
					 bool warn)
{
	return arm_gen_branch_link(pc, addr);
	return arm_gen_branch_link(pc, addr, warn);
}

static int ftrace_modify_code(unsigned long pc, unsigned long old,
@@ -112,14 +113,14 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
	int ret;

	pc = (unsigned long)&ftrace_call;
	new = ftrace_call_replace(pc, (unsigned long)func);
	new = ftrace_call_replace(pc, (unsigned long)func, true);

	ret = ftrace_modify_code(pc, 0, new, false);

#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
	if (!ret) {
		pc = (unsigned long)&ftrace_regs_call;
		new = ftrace_call_replace(pc, (unsigned long)func);
		new = ftrace_call_replace(pc, (unsigned long)func, true);

		ret = ftrace_modify_code(pc, 0, new, false);
	}
@@ -132,10 +133,22 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
{
	unsigned long new, old;
	unsigned long ip = rec->ip;
	unsigned long aaddr = adjust_address(rec, addr);
	struct module *mod = NULL;

#ifdef CONFIG_ARM_MODULE_PLTS
	mod = rec->arch.mod;
#endif

	old = ftrace_nop_replace(rec);

	new = ftrace_call_replace(ip, adjust_address(rec, addr));
	new = ftrace_call_replace(ip, aaddr, !mod);
#ifdef CONFIG_ARM_MODULE_PLTS
	if (!new && mod) {
		aaddr = get_module_plt(mod, ip, aaddr);
		new = ftrace_call_replace(ip, aaddr, true);
	}
#endif

	return ftrace_modify_code(rec->ip, old, new, true);
}
@@ -148,9 +161,9 @@ int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
	unsigned long new, old;
	unsigned long ip = rec->ip;

	old = ftrace_call_replace(ip, adjust_address(rec, old_addr));
	old = ftrace_call_replace(ip, adjust_address(rec, old_addr), true);

	new = ftrace_call_replace(ip, adjust_address(rec, addr));
	new = ftrace_call_replace(ip, adjust_address(rec, addr), true);

	return ftrace_modify_code(rec->ip, old, new, true);
}
@@ -160,12 +173,29 @@ int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
int ftrace_make_nop(struct module *mod,
		    struct dyn_ftrace *rec, unsigned long addr)
{
	unsigned long aaddr = adjust_address(rec, addr);
	unsigned long ip = rec->ip;
	unsigned long old;
	unsigned long new;
	int ret;

	old = ftrace_call_replace(ip, adjust_address(rec, addr));
#ifdef CONFIG_ARM_MODULE_PLTS
	/* mod is only supplied during module loading */
	if (!mod)
		mod = rec->arch.mod;
	else
		rec->arch.mod = mod;
#endif

	old = ftrace_call_replace(ip, aaddr,
				  !IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || !mod);
#ifdef CONFIG_ARM_MODULE_PLTS
	if (!old && mod) {
		aaddr = get_module_plt(mod, ip, aaddr);
		old = ftrace_call_replace(ip, aaddr, true);
	}
#endif

	new = ftrace_nop_replace(rec);
	ret = ftrace_modify_code(ip, old, new, true);

Loading