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

Unverified Commit 889eb1a4 authored by derfelot's avatar derfelot
Browse files

Merge Linux 4.4.247 kernel

Changes in 4.4.247: (24 commits)
        btrfs: tree-checker: Enhance chunk checker to validate chunk profile
        btrfs: inode: Verify inode mode to avoid NULL pointer dereference
        HID: cypress: Support Varmilo Keyboards' media hotkeys
        Input: i8042 - allow insmod to succeed on devices without an i8042 controller
        HID: hid-sensor-hub: Fix issue with devices with no report ID
        x86/xen: don't unbind uninitialized lock_kicker_irq
        proc: don't allow async path resolution of /proc/self components
        dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size
        scsi: libiscsi: Fix NOP race condition
        scsi: target: iscsi: Fix cmd abort fabric stop race
        scsi: ufs: Fix race between shutdown and runtime resume flow
        bnxt_en: fix error return code in bnxt_init_board()
        video: hyperv_fb: Fix the cache type when mapping the VRAM
        bnxt_en: Release PCI regions when DMA mask setup fails during probe.
        IB/mthca: fix return value of error branch in mthca_init_cq()
        nfc: s3fwrn5: use signed integer for parsing GPIO numbers
        efivarfs: revert "fix memory leak in efivarfs_create()"
        perf probe: Fix to die_entrypc() returns error correctly
        USB: core: Change %pK for __user pointers to %px
        x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
        USB: core: add endpoint-blacklist quirk
        USB: core: Fix regression in Hercules audio card
        btrfs: fix lockdep splat when reading qgroup config on mount
        Linux 4.4.247

Conflicts:
	drivers/scsi/ufs/ufshcd.c
parents 3a568fbe 0f586dba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 246
SUBLEVEL = 247
EXTRAVERSION =
NAME = Blurry Fish Butt

+2 −2
Original line number Diff line number Diff line
@@ -707,11 +707,13 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
	if (boot_cpu_has(X86_FEATURE_IBPB)) {
		setup_force_cpu_cap(X86_FEATURE_USE_IBPB);

		spectre_v2_user_ibpb = mode;
		switch (cmd) {
		case SPECTRE_V2_USER_CMD_FORCE:
		case SPECTRE_V2_USER_CMD_PRCTL_IBPB:
		case SPECTRE_V2_USER_CMD_SECCOMP_IBPB:
			static_branch_enable(&switch_mm_always_ibpb);
			spectre_v2_user_ibpb = SPECTRE_V2_USER_STRICT;
			break;
		case SPECTRE_V2_USER_CMD_PRCTL:
		case SPECTRE_V2_USER_CMD_AUTO:
@@ -725,8 +727,6 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
		pr_info("mitigation: Enabling %s Indirect Branch Prediction Barrier\n",
			static_key_enabled(&switch_mm_always_ibpb) ?
			"always-on" : "conditional");

		spectre_v2_user_ibpb = mode;
	}

	/*
+11 −1
Original line number Diff line number Diff line
@@ -301,10 +301,20 @@ void xen_init_lock_cpu(int cpu)

void xen_uninit_lock_cpu(int cpu)
{
	int irq;

	if (!xen_pvspin)
		return;

	unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL);
	/*
	 * When booting the kernel with 'mitigations=auto,nosmt', the secondary
	 * CPUs are not activated, and lock_kicker_irq is not initialized.
	 */
	irq = per_cpu(lock_kicker_irq, cpu);
	if (irq == -1)
		return;

	unbind_from_irqhandler(irq, NULL);
	per_cpu(lock_kicker_irq, cpu) = -1;
	kfree(per_cpu(irq_name, cpu));
	per_cpu(irq_name, cpu) = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -2634,7 +2634,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
	 * If burst size is smaller than bus width then make sure we only
	 * transfer one at a time to avoid a burst stradling an MFIFO entry.
	 */
	if (desc->rqcfg.brst_size * 8 < pl330->pcfg.data_bus_width)
	if (burst * 8 < pl330->pcfg.data_bus_width)
		desc->rqcfg.brst_len = 1;

	desc->bytes_requested = len;
+39 −5
Original line number Diff line number Diff line
@@ -26,19 +26,17 @@
#define CP_2WHEEL_MOUSE_HACK		0x02
#define CP_2WHEEL_MOUSE_HACK_ON		0x04

#define VA_INVAL_LOGICAL_BOUNDARY	0x08

/*
 * Some USB barcode readers from cypress have usage min and usage max in
 * the wrong order
 */
static __u8 *cp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
static __u8 *cp_rdesc_fixup(struct hid_device *hdev, __u8 *rdesc,
		unsigned int *rsize)
{
	unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);
	unsigned int i;

	if (!(quirks & CP_RDESC_SWAPPED_MIN_MAX))
		return rdesc;

	if (*rsize < 4)
		return rdesc;

@@ -51,6 +49,40 @@ static __u8 *cp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
	return rdesc;
}

static __u8 *va_logical_boundary_fixup(struct hid_device *hdev, __u8 *rdesc,
		unsigned int *rsize)
{
	/*
	 * Varmilo VA104M (with VID Cypress and device ID 07B1) incorrectly
	 * reports Logical Minimum of its Consumer Control device as 572
	 * (0x02 0x3c). Fix this by setting its Logical Minimum to zero.
	 */
	if (*rsize == 25 &&
			rdesc[0] == 0x05 && rdesc[1] == 0x0c &&
			rdesc[2] == 0x09 && rdesc[3] == 0x01 &&
			rdesc[6] == 0x19 && rdesc[7] == 0x00 &&
			rdesc[11] == 0x16 && rdesc[12] == 0x3c && rdesc[13] == 0x02) {
		hid_info(hdev,
			 "fixing up varmilo VA104M consumer control report descriptor\n");
		rdesc[12] = 0x00;
		rdesc[13] = 0x00;
	}
	return rdesc;
}

static __u8 *cp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
		unsigned int *rsize)
{
	unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);

	if (quirks & CP_RDESC_SWAPPED_MIN_MAX)
		rdesc = cp_rdesc_fixup(hdev, rdesc, rsize);
	if (quirks & VA_INVAL_LOGICAL_BOUNDARY)
		rdesc = va_logical_boundary_fixup(hdev, rdesc, rsize);

	return rdesc;
}

static int cp_input_mapped(struct hid_device *hdev, struct hid_input *hi,
		struct hid_field *field, struct hid_usage *usage,
		unsigned long **bit, int *max)
@@ -131,6 +163,8 @@ static const struct hid_device_id cp_devices[] = {
		.driver_data = CP_RDESC_SWAPPED_MIN_MAX },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE),
		.driver_data = CP_2WHEEL_MOUSE_HACK },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_VARMILO_VA104M_07B1),
		.driver_data = VA_INVAL_LOGICAL_BOUNDARY },
	{ }
};
MODULE_DEVICE_TABLE(hid, cp_devices);
Loading