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

Commit 110cce4a authored by Kyle Yan's avatar Kyle Yan
Browse files

Merge remote-tracking branch '4.9/tmp-82ab0744' into 4.9



* 4.9/tmp-82ab0744:
  Linux 4.9.17
  crypto: powerpc - Fix initialisation of crc32c context
  locking/rwsem: Fix down_write_killable() for CONFIG_RWSEM_GENERIC_SPINLOCK=y
  futex: Add missing error handling to FUTEX_REQUEUE_PI
  futex: Fix potential use-after-free in FUTEX_REQUEUE_PI
  x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm
  x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y
  x86/tsc: Fix ART for TSC_KNOWN_FREQ
  irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065
  arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs
  drm/vc4: Fix ->clock_select setting for the VEC encoder
  drm/vc4: Fix race between page flip completion event and clean-up
  clk: bcm2835: Fix ->fixed_divider of pllh_aux
  powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y
  usb: gadget: udc: atmel: remove memory leak
  serial: 8250_pci: Detach low-level driver during PCI error recovery
  ACPI / blacklist: Make Dell Latitude 3350 ethernet work
  ACPI / blacklist: add _REV quirks for Dell Precision 5520 and 3520
  slub: move synchronize_sched out of slab_mutex on shrink
  uvcvideo: uvc_scan_fallback() for webcams with broken chain
  s390/zcrypt: Introduce CEX6 toleration
  block: allow WRITE_SAME commands with the SG_IO ioctl
  drm/nouveau/disp/nv50-: specify ctrl/user separately when constructing classes
  drm/nouveau/disp/nv50-: split chid into chid.ctrl and chid.user
  drm/nouveau/disp/gp102: fix cursor/overlay immediate channel indices
  vfio/spapr: Postpone default window creation
  vfio/spapr: Add a helper to create default DMA window
  powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown
  vfio/spapr: Reference mm in tce_container
  powerpc/iommu: Stop using @current in mm_iommu_xxx
  powerpc/iommu: Pass mm_struct to init/cleanup helpers
  vfio/spapr: Postpone allocation of userspace version of TCE table
  Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw() (v2)
  ibmveth: calculate gso_segs for large packets
  PCI: Do any VF BAR updates before enabling the BARs
  PCI: Ignore BAR updates on virtual functions
  PCI: Update BARs using property bits appropriate for type
  PCI: Don't update VF BARs while VF memory space is enabled
  PCI: Decouple IORESOURCE_ROM_ENABLE and PCI_ROM_ADDRESS_ENABLE
  PCI: Add comments about ROM BAR updating
  PCI: Remove pci_resource_bar() and pci_iov_resource_bar()
  PCI: Separate VF BAR updates from standard BAR updates
  x86/hyperv: Handle unknown NMIs on one CPU when unknown_nmi_panic
  scsi: ibmvscsis: Synchronize cmds at remove time
  scsi: ibmvscsis: Synchronize cmds at tpg_enable_store time
  scsi: ibmvscsis: Rearrange functions for future patches
  scsi: ibmvscsis: Clean up properly if target_submit_cmd/tmr fails
  scsi: ibmvscsis: Return correct partition name/# to client
  scsi: ibmvscsis: Issues from Dan Carpenter/Smatch
  igb: add i211 to i210 PHY workaround
  igb: Workaround for igb i210 firmware issue
  xen: do not re-use pirq number cached in pci device msi msg data
  dmaengine: iota: ioat_alloc_chan_resources should not perform sleeping allocations.
  bpf: fix mark_reg_unknown_value for spilled regs on map value marking
  bpf: fix regression on verifier pruning wrt map lookups
  bpf: fix state equivalence
  bpf: Detect identical PTR_TO_MAP_VALUE_OR_NULL registers
  dccp: fix memory leak during tear-down of unsuccessful connection request
  tun: fix premature POLLOUT notification on tun devices
  dccp/tcp: fix routing redirect race
  bridge: drop netfilter fake rtable unconditionally
  ipv6: avoid write to a possibly cloned skb
  ipv6: make ECMP route replacement less greedy
  mpls: Do not decrement alive counter for unregister events
  mpls: Send route delete notifications when router module is unloaded
  act_connmark: avoid crashing on malformed nlattrs with null parms
  uapi: fix linux/packet_diag.h userspace compilation error
  net/tunnel: set inner protocol in network gro hooks
  vrf: Fix use-after-free in vrf_xmit
  dccp: fix use-after-free in dccp_feat_activate_values
  net/sched: act_skbmod: remove unneeded rcu_read_unlock in tcf_skbmod_dump
  net: fix socket refcounting in skb_complete_tx_timestamp()
  net: fix socket refcounting in skb_complete_wifi_ack()
  tcp: fix various issues for sockets morphing to listen state
  strparser: destroy workqueue on module exit
  dccp: Unlock sock before calling sk_free()
  ipv6: orphan skbs in reassembly unit
  net: net_enable_timestamp() can be called from irq contexts
  net: don't call strlen() on the user buffer in packet_bind_spkt()
  net: bridge: allow IPv6 when multicast flood is disabled
  tcp/dccp: block BH for SYN processing
  mlxsw: spectrum_router: Avoid potential packets loss
  geneve: lock RCU on TX path
  vxlan: lock RCU on TX path
  net: phy: Avoid deadlock during phy_error()
  l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv
  net sched actions: decrement module reference count after table flush.
  ipv4: mask tos for input route
  vxlan: don't allow overwrite of config src addr
  vti6: return GRE_KEY for vti6
  vxlan: correctly validate VXLAN ID against VXLAN_N_VID
  net/mlx5e: Fix wrong CQE decompression
  net/mlx5e: Do not reduce LRO WQE size when not using build_skb
  net/mlx5e: Register/unregister vport representors on interface attach/detach
  ANDROID: mmc: core: export emmc revision
  ANDROID: sdcardfs: Fix gid issue
  ANDROID: sdcardfs: Remove uninformative prints
  ANDROID: sdcardfs: move path_put outside of spinlock
  ANDROID: sdcardfs: Use case insensitive hash function
  ANDROID: sdcardfs: declare MODULE_ALIAS_FS
  ANDROID: sdcardfs: Get the blocksize from the lower fs
  ANDROID: sdcardfs: Use d_invalidate instead of drop_recurisve
  ANDROID: sdcardfs: Switch to internal case insensitive compare
  ANDROID: sdcardfs: Use spin_lock_nested
  ANDROID: sdcardfs: Replace get/put with d_lock
  ANDROID: sdcardfs: rate limit warning print
  ANDROID: sdcardfs: Fix case insensitive lookup
  ANDROID: sdcardfs: support direct-IO (DIO) operations
  ANDROID: sdcardfs: implement vm_ops->page_mkwrite
  ANDROID: sdcardfs: Don't bother deleting freelist
  ANDROID: sdcardfs: Add missing path_put
  ANDROID: sdcardfs: Fix incorrect hash
  ANDROID: export security_path_chown
  ANDROID: sdcardfs: Switch strcasecmp for internal call
  ANDROID: sdcardfs: switch to full_name_hash and qstr
  ANDROID: sdcardfs: Add GID Derivation to sdcardfs
  ANDROID: sdcardfs: Remove redundant operation
  ANDROID: sdcardfs: add support for user permission isolation
  ANDROID: sdcardfs: Refactor configfs interface
  ANDROID: sdcardfs: Allow non-owners to touch
  ANDROID: binder: add padding to binder_fd_array_object.
  ANDROID: binder: use group leader instead of open thread
  BACKPORT: mmc: core: Export device lifetime information through sysfs
  ANDROID: android-verity: do not compile as independent module

Change-Id: I7d409ec3e84eaa7f499c951d38f4cba2614415f7
Signed-off-by: default avatarKyle Yan <kyan@codeaurora.org>
parents 8672e9c8 82ab0744
Loading
Loading
Loading
Loading
+23 −21
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ will be updated when new workarounds are committed and backported to
stable kernels.

| Implementor    | Component       | Erratum ID      | Kconfig                     |
+----------------+-----------------+-----------------+-------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| ARM            | Cortex-A53      | #826319         | ARM64_ERRATUM_826319        |
| ARM            | Cortex-A53      | #827319         | ARM64_ERRATUM_827319        |
| ARM            | Cortex-A53      | #824069         | ARM64_ERRATUM_824069        |
@@ -63,3 +63,5 @@ stable kernels.
| Cavium         | ThunderX SMMUv2 | #27704          | N/A                         |
|                |                 |                 |                             |
| Freescale/NXP  | LS2080A/LS1043A | A-008585        | FSL_ERRATUM_A008585         |
|                |                 |                 |                             |
| Qualcomm Tech. | QDF2400 ITS     | E0065           | QCOM_QDF2400_ERRATUM_0065   |
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 16
SUBLEVEL = 17
EXTRAVERSION =
NAME = Roaring Lionus

+10 −0
Original line number Diff line number Diff line
@@ -478,6 +478,16 @@ config CAVIUM_ERRATUM_27456

	  If unsure, say Y.

config QCOM_QDF2400_ERRATUM_0065
	bool "QDF2400 E0065: Incorrect GITS_TYPER.ITT_Entry_size"
	default y
	help
	  On Qualcomm Datacenter Technologies QDF2400 SoC, ITS hardware reports
	  ITE size incorrectly. The GITS_TYPER.ITT_Entry_size field should have
	  been indicated as 16Bytes (0xf), not 8Bytes (0x7).

	  If unsure, say Y.

endmenu


+55 −9
Original line number Diff line number Diff line
@@ -17,14 +17,62 @@

#include <asm/kvm_hyp.h>

static void __hyp_text __tlb_switch_to_guest_vhe(struct kvm *kvm)
{
	u64 val;

	/*
	 * With VHE enabled, we have HCR_EL2.{E2H,TGE} = {1,1}, and
	 * most TLB operations target EL2/EL0. In order to affect the
	 * guest TLBs (EL1/EL0), we need to change one of these two
	 * bits. Changing E2H is impossible (goodbye TTBR1_EL2), so
	 * let's flip TGE before executing the TLB operation.
	 */
	write_sysreg(kvm->arch.vttbr, vttbr_el2);
	val = read_sysreg(hcr_el2);
	val &= ~HCR_TGE;
	write_sysreg(val, hcr_el2);
	isb();
}

static void __hyp_text __tlb_switch_to_guest_nvhe(struct kvm *kvm)
{
	write_sysreg(kvm->arch.vttbr, vttbr_el2);
	isb();
}

static hyp_alternate_select(__tlb_switch_to_guest,
			    __tlb_switch_to_guest_nvhe,
			    __tlb_switch_to_guest_vhe,
			    ARM64_HAS_VIRT_HOST_EXTN);

static void __hyp_text __tlb_switch_to_host_vhe(struct kvm *kvm)
{
	/*
	 * We're done with the TLB operation, let's restore the host's
	 * view of HCR_EL2.
	 */
	write_sysreg(0, vttbr_el2);
	write_sysreg(HCR_HOST_VHE_FLAGS, hcr_el2);
}

static void __hyp_text __tlb_switch_to_host_nvhe(struct kvm *kvm)
{
	write_sysreg(0, vttbr_el2);
}

static hyp_alternate_select(__tlb_switch_to_host,
			    __tlb_switch_to_host_nvhe,
			    __tlb_switch_to_host_vhe,
			    ARM64_HAS_VIRT_HOST_EXTN);

void __hyp_text __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
{
	dsb(ishst);

	/* Switch to requested VMID */
	kvm = kern_hyp_va(kvm);
	write_sysreg(kvm->arch.vttbr, vttbr_el2);
	isb();
	__tlb_switch_to_guest()(kvm);

	/*
	 * We could do so much better if we had the VA as well.
@@ -45,7 +93,7 @@ void __hyp_text __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
	dsb(ish);
	isb();

	write_sysreg(0, vttbr_el2);
	__tlb_switch_to_host()(kvm);
}

void __hyp_text __kvm_tlb_flush_vmid(struct kvm *kvm)
@@ -54,14 +102,13 @@ void __hyp_text __kvm_tlb_flush_vmid(struct kvm *kvm)

	/* Switch to requested VMID */
	kvm = kern_hyp_va(kvm);
	write_sysreg(kvm->arch.vttbr, vttbr_el2);
	isb();
	__tlb_switch_to_guest()(kvm);

	asm volatile("tlbi vmalls12e1is" : : );
	dsb(ish);
	isb();

	write_sysreg(0, vttbr_el2);
	__tlb_switch_to_host()(kvm);
}

void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu)
@@ -69,14 +116,13 @@ void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu)
	struct kvm *kvm = kern_hyp_va(kern_hyp_va(vcpu)->kvm);

	/* Switch to requested VMID */
	write_sysreg(kvm->arch.vttbr, vttbr_el2);
	isb();
	__tlb_switch_to_guest()(kvm);

	asm volatile("tlbi vmalle1" : : );
	dsb(nsh);
	isb();

	write_sysreg(0, vttbr_el2);
	__tlb_switch_to_host()(kvm);
}

void __hyp_text __kvm_flush_vm_context(void)
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static int crc32c_vpmsum_cra_init(struct crypto_tfm *tfm)
{
	u32 *key = crypto_tfm_ctx(tfm);

	*key = 0;
	*key = ~0;

	return 0;
}
Loading