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

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

Merge 4.9.133 into android-4.9



Changes in 4.9.133
	mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly
	fbdev/omapfb: fix omapfb_memory_read infoleak
	xen-netback: fix input validation in xenvif_set_hash_mapping()
	x86/vdso: Fix asm constraints on vDSO syscall fallbacks
	x86/vdso: Fix vDSO syscall fallback asm constraint regression
	PCI: Reprogram bridge prefetch registers on resume
	mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys
	PM / core: Clear the direct_complete flag on errors
	dm cache metadata: ignore hints array being too small during resize
	dm cache: fix resize crash if user doesn't reload cache table
	xhci: Add missing CAS workaround for Intel Sunrise Point xHCI
	usb: xhci-mtk: resume USB3 roothub first
	USB: serial: simple: add Motorola Tetra MTP6550 id
	tty: Drop tty->count on tty_reopen() failure
	of: unittest: Disable interrupt node tests for old world MAC systems
	ext4: add corruption check in ext4_xattr_set_entry()
	ext4: always verify the magic number in xattr blocks
	cgroup: Fix deadlock in cpu hotplug path
	ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait
	ath10k: fix kernel panic issue during pci probe
	powerpc/fadump: Return error when fadump registration fails
	ARC: clone syscall to setp r25 as thread pointer
	x86/mm: Expand static page table for fixmap space
	f2fs: fix invalid memory access
	ucma: fix a use-after-free in ucma_resolve_ip()
	ubifs: Check for name being NULL while mounting
	ath10k: fix scan crash due to incorrect length calculation
	ebtables: arpreply: Add the standard target sanity check
	x86/fpu: Remove use_eager_fpu()
	x86/fpu: Remove struct fpu::counter
	Revert "perf: sync up x86/.../cpufeatures.h"
	x86/fpu: Finish excising 'eagerfpu'
	Linux 4.9.133

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents 38f2b4a8 deb3303f
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -1090,12 +1090,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
	nopku		[X86] Disable Memory Protection Keys CPU feature found
			in some Intel CPUs.

	eagerfpu=	[X86]
			on	enable eager fpu restore
			off	disable eager fpu restore
			auto	selects the default scheme, which automatically
				enables eagerfpu restore for xsaveopt.

	module.async_probe [KNL]
			Enable asynchronous probe on this module.

+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 132
SUBLEVEL = 133
EXTRAVERSION =
NAME = Roaring Lionus

+20 −0
Original line number Diff line number Diff line
@@ -213,6 +213,26 @@ int copy_thread(unsigned long clone_flags,
		task_thread_info(current)->thr_ptr;
	}


	/*
	 * setup usermode thread pointer #1:
	 * when child is picked by scheduler, __switch_to() uses @c_callee to
	 * populate usermode callee regs: this works (despite being in a kernel
	 * function) since special return path for child @ret_from_fork()
	 * ensures those regs are not clobbered all the way to RTIE to usermode
	 */
	c_callee->r25 = task_thread_info(p)->thr_ptr;

#ifdef CONFIG_ARC_CURR_IN_REG
	/*
	 * setup usermode thread pointer #2:
	 * however for this special use of r25 in kernel, __switch_to() sets
	 * r25 for kernel needs and only in the final return path is usermode
	 * r25 setup, from pt_regs->user_r25. So set that up as well
	 */
	c_regs->user_r25 = c_callee->r25;
#endif

	return 0;
}

+15 −8
Original line number Diff line number Diff line
@@ -365,9 +365,9 @@ static int __init early_fadump_reserve_mem(char *p)
}
early_param("fadump_reserve_mem", early_fadump_reserve_mem);

static void register_fw_dump(struct fadump_mem_struct *fdm)
static int register_fw_dump(struct fadump_mem_struct *fdm)
{
	int rc;
	int rc, err;
	unsigned int wait_time;

	pr_debug("Registering for firmware-assisted kernel dump...\n");
@@ -384,7 +384,11 @@ static void register_fw_dump(struct fadump_mem_struct *fdm)

	} while (wait_time);

	err = -EIO;
	switch (rc) {
	default:
		pr_err("Failed to register. Unknown Error(%d).\n", rc);
		break;
	case -1:
		printk(KERN_ERR "Failed to register firmware-assisted kernel"
			" dump. Hardware Error(%d).\n", rc);
@@ -392,18 +396,22 @@ static void register_fw_dump(struct fadump_mem_struct *fdm)
	case -3:
		printk(KERN_ERR "Failed to register firmware-assisted kernel"
			" dump. Parameter Error(%d).\n", rc);
		err = -EINVAL;
		break;
	case -9:
		printk(KERN_ERR "firmware-assisted kernel dump is already "
			" registered.");
		fw_dump.dump_registered = 1;
		err = -EEXIST;
		break;
	case 0:
		printk(KERN_INFO "firmware-assisted kernel dump registration"
			" is successful\n");
		fw_dump.dump_registered = 1;
		err = 0;
		break;
	}
	return err;
}

void crash_fadump(struct pt_regs *regs, const char *str)
@@ -1006,7 +1014,7 @@ static unsigned long init_fadump_header(unsigned long addr)
	return addr;
}

static void register_fadump(void)
static int register_fadump(void)
{
	unsigned long addr;
	void *vaddr;
@@ -1017,7 +1025,7 @@ static void register_fadump(void)
	 * assisted dump.
	 */
	if (!fw_dump.reserve_dump_area_size)
		return;
		return -ENODEV;

	ret = fadump_setup_crash_memory_ranges();
	if (ret)
@@ -1032,7 +1040,7 @@ static void register_fadump(void)
	fadump_create_elfcore_headers(vaddr);

	/* register the future kernel dump with firmware. */
	register_fw_dump(&fdm);
	return register_fw_dump(&fdm);
}

static int fadump_unregister_dump(struct fadump_mem_struct *fdm)
@@ -1218,7 +1226,6 @@ static ssize_t fadump_register_store(struct kobject *kobj,
	switch (buf[0]) {
	case '0':
		if (fw_dump.dump_registered == 0) {
			ret = -EINVAL;
			goto unlock_out;
		}
		/* Un-register Firmware-assisted dump */
@@ -1226,11 +1233,11 @@ static ssize_t fadump_register_store(struct kobject *kobj,
		break;
	case '1':
		if (fw_dump.dump_registered == 1) {
			ret = -EINVAL;
			ret = -EEXIST;
			goto unlock_out;
		}
		/* Register Firmware-assisted dump */
		register_fadump();
		ret = register_fadump();
		break;
	default:
		ret = -EINVAL;
+4 −13
Original line number Diff line number Diff line
@@ -48,21 +48,13 @@
#ifdef CONFIG_X86_64
/*
 * use carryless multiply version of crc32c when buffer
 * size is >= 512 (when eager fpu is enabled) or
 * >= 1024 (when eager fpu is disabled) to account
 * size is >= 512 to account
 * for fpu state save/restore overhead.
 */
#define CRC32C_PCL_BREAKEVEN_EAGERFPU	512
#define CRC32C_PCL_BREAKEVEN_NOEAGERFPU	1024
#define CRC32C_PCL_BREAKEVEN	512

asmlinkage unsigned int crc_pcl(const u8 *buffer, int len,
				unsigned int crc_init);
static int crc32c_pcl_breakeven = CRC32C_PCL_BREAKEVEN_EAGERFPU;
#define set_pcl_breakeven_point()					\
do {									\
	if (!use_eager_fpu())						\
		crc32c_pcl_breakeven = CRC32C_PCL_BREAKEVEN_NOEAGERFPU;	\
} while (0)
#endif /* CONFIG_X86_64 */

static u32 crc32c_intel_le_hw_byte(u32 crc, unsigned char const *data, size_t length)
@@ -185,7 +177,7 @@ static int crc32c_pcl_intel_update(struct shash_desc *desc, const u8 *data,
	 * use faster PCL version if datasize is large enough to
	 * overcome kernel fpu state save/restore overhead
	 */
	if (len >= crc32c_pcl_breakeven && irq_fpu_usable()) {
	if (len >= CRC32C_PCL_BREAKEVEN && irq_fpu_usable()) {
		kernel_fpu_begin();
		*crcp = crc_pcl(data, len, *crcp);
		kernel_fpu_end();
@@ -197,7 +189,7 @@ static int crc32c_pcl_intel_update(struct shash_desc *desc, const u8 *data,
static int __crc32c_pcl_intel_finup(u32 *crcp, const u8 *data, unsigned int len,
				u8 *out)
{
	if (len >= crc32c_pcl_breakeven && irq_fpu_usable()) {
	if (len >= CRC32C_PCL_BREAKEVEN && irq_fpu_usable()) {
		kernel_fpu_begin();
		*(__le32 *)out = ~cpu_to_le32(crc_pcl(data, len, *crcp));
		kernel_fpu_end();
@@ -257,7 +249,6 @@ static int __init crc32c_intel_mod_init(void)
		alg.update = crc32c_pcl_intel_update;
		alg.finup = crc32c_pcl_intel_finup;
		alg.digest = crc32c_pcl_intel_digest;
		set_pcl_breakeven_point();
	}
#endif
	return crypto_register_shash(&alg);
Loading