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

Commit e5f5ad18 authored by Kyle Yan's avatar Kyle Yan
Browse files

Merge remote-tracking branch '4.9/tmp-f7d2974f' into msm-4.9



* 4.9/tmp-f7d2974f:
  Linux 4.9.50
  xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present
  NFS: Sync the correct byte range during synchronous writes
  NFS: Fix 2 use after free issues in the I/O code
  ARM: 8692/1: mm: abort uaccess retries upon fatal signal
  ARM64: dts: marvell: armada-37xx: Fix GIC maintenance interrupt
  Bluetooth: Properly check L2CAP config option output buffer length
  ALSA: msnd: Optimize / harden DSP and MIDI loops
  locktorture: Fix potential memory leak with rw lock test
  mm/memory.c: fix mem_cgroup_oom_disable() call missing
  selftests/x86/fsgsbase: Test selectors 1, 2, and 3
  btrfs: resume qgroup rescan on rw remount
  nvme-fabrics: generate spec-compliant UUID NQNs
  mtd: nand: qcom: fix config error for BCH
  mtd: nand: qcom: fix read failure without complete bootchain
  mtd: nand: mxc: Fix mxc_v1 ooblayout
  ANDROID: commoncap: Begin to warn users of implicit PARANOID_NETWORK capability grants
  Linux 4.9.49
  drm/bridge: adv7511: Switch to using drm_kms_helper_hotplug_event()
  drm/bridge: adv7511: Use work_struct to defer hotplug handing to out of irq context
  scsi: sg: recheck MMAP_IO request length with lock held
  scsi: sg: protect against races between mmap() and SG_SET_RESERVED_SIZE
  cs5536: add support for IDE controller variant
  workqueue: Fix flag collision
  drm/nouveau/pci/msi: disable MSI on big-endian platforms by default
  s390/mm: avoid empty zero pages for KVM guests to avoid postcopy hangs
  MCB: add support for SC31 to mcb-lpc
  mwifiex: correct channel stat buffer overflows
  dlm: avoid double-free on error path in dlm_device_{register,unregister}
  iwlwifi: pci: add new PCI ID for 7265D
  Bluetooth: Add support of 13d3:3494 RTL8723BE device
  rtlwifi: rtl_pci_probe: Fix fail path of _rtl_pci_find_adapter
  Input: trackpoint - assume 3 buttons when buttons detection fails
  ath10k: fix memory leak in rx ring buffer allocation
  intel_th: pci: Add Cannon Lake PCH-LP support
  intel_th: pci: Add Cannon Lake PCH-H support
  driver core: bus: Fix a potential double free
  iio: adc: ti-ads1015: add adequate wait time to get correct conversion
  iio: adc: ti-ads1015: don't return invalid value from buffer setup callbacks
  iio: adc: ti-ads1015: avoid getting stale result after runtime resume
  iio: adc: ti-ads1015: enable conversion when CONFIG_PM is not set
  iio: adc: ti-ads1015: fix scale information for ADS1115
  iio: adc: ti-ads1015: fix incorrect data rate setting update
  staging/rts5208: fix incorrect shift to extract upper nybble
  USB: core: Avoid race of async_completed() w/ usbdev_release()
  USB: musb: fix external abort on suspend
  usb:xhci:Fix regression when ATI chipsets detected
  usb: Add device quirk for Logitech HD Pro Webcam C920-C
  USB: serial: option: add support for D-Link DWM-157 C1
  usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard
  ANDROID: sdcardfs: Add missing break
  ANDROID: Sdcardfs: Move gid derivation under flag
  ANDROID: mnt: Fix freeing of mount data
  ANDROID: configs: require SYNC_FILE

Change-Id: I67da9ef4d1637a9fddbf7b96f6f59037faee9015
Signed-off-by: default avatarKyle Yan <kyan@codeaurora.org>
parents d03727f9 f7d2974f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 48
SUBLEVEL = 50
EXTRAVERSION =
NAME = Roaring Lionus

+4 −1
Original line number Diff line number Diff line
@@ -314,8 +314,11 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
	 * signal first. We do not need to release the mmap_sem because
	 * it would already be released in __lock_page_or_retry in
	 * mm/filemap.c. */
	if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
	if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) {
		if (!user_mode(regs))
			goto no_context;
		return 0;
	}

	/*
	 * Major/minor page fault accounting is only done on the
+1 −0
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@
				interrupt-controller;
				reg = <0x1d00000 0x10000>, /* GICD */
				      <0x1d40000 0x40000>; /* GICR */
				interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
			};
		};

+1 −1
Original line number Diff line number Diff line
@@ -480,7 +480,7 @@ static inline int mm_alloc_pgste(struct mm_struct *mm)
 * In the case that a guest uses storage keys
 * faults should no longer be backed by zero pages
 */
#define mm_forbids_zeropage mm_use_skey
#define mm_forbids_zeropage mm_has_pgste
static inline int mm_use_skey(struct mm_struct *mm)
{
#ifdef CONFIG_PGSTE
+32 −7
Original line number Diff line number Diff line
@@ -2124,6 +2124,37 @@ static inline void thp_split_mm(struct mm_struct *mm)
#endif
}

/*
 * Remove all empty zero pages from the mapping for lazy refaulting
 * - This must be called after mm->context.has_pgste is set, to avoid
 *   future creation of zero pages
 * - This must be called after THP was enabled
 */
static int __zap_zero_pages(pmd_t *pmd, unsigned long start,
			   unsigned long end, struct mm_walk *walk)
{
	unsigned long addr;

	for (addr = start; addr != end; addr += PAGE_SIZE) {
		pte_t *ptep;
		spinlock_t *ptl;

		ptep = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
		if (is_zero_pfn(pte_pfn(*ptep)))
			ptep_xchg_direct(walk->mm, addr, ptep, __pte(_PAGE_INVALID));
		pte_unmap_unlock(ptep, ptl);
	}
	return 0;
}

static inline void zap_zero_pages(struct mm_struct *mm)
{
	struct mm_walk walk = { .pmd_entry = __zap_zero_pages };

	walk.mm = mm;
	walk_page_range(0, TASK_SIZE, &walk);
}

/*
 * switch on pgstes for its userspace process (for kvm)
 */
@@ -2141,6 +2172,7 @@ int s390_enable_sie(void)
	mm->context.has_pgste = 1;
	/* split thp mappings and disable thp for future mappings */
	thp_split_mm(mm);
	zap_zero_pages(mm);
	up_write(&mm->mmap_sem);
	return 0;
}
@@ -2153,13 +2185,6 @@ EXPORT_SYMBOL_GPL(s390_enable_sie);
static int __s390_enable_skey(pte_t *pte, unsigned long addr,
			      unsigned long next, struct mm_walk *walk)
{
	/*
	 * Remove all zero page mappings,
	 * after establishing a policy to forbid zero page mappings
	 * following faults for that page will get fresh anonymous pages
	 */
	if (is_zero_pfn(pte_pfn(*pte)))
		ptep_xchg_direct(walk->mm, addr, pte, __pte(_PAGE_INVALID));
	/* Clear storage key */
	ptep_zap_key(walk->mm, addr, pte);
	return 0;
Loading