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

Commit 355cae8b authored by Kyle Yan's avatar Kyle Yan
Browse files

Merge remote-tracking branch '4.9/tmp-da3493c0' into 4.9



* 4.9/tmp-da3493c0:
  Linux 4.9.32
  netfilter: nft_set_rbtree: handle element re-addition after deletion
  cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start()
  cpufreq: schedutil: move cached_raw_freq to struct sugov_policy
  drm/i915/vbt: split out defaults that are set when there is no VBT
  drm/i915/vbt: don't propagate errors from intel_bios_init()
  usercopy: Adjust tests to deal with SMAP/PAN
  ARM: 8637/1: Adjust memory boundaries after reservations
  ARM: 8636/1: Cleanup sanity_check_meminfo
  arm64: entry: improve data abort handling of tagged pointers
  arm64: hw_breakpoint: fix watchpoint matching for tagged pointers
  arm64: traps: fix userspace cache maintenance emulation on a tagged pointer
  serial: sh-sci: Fix panic when serial console and DMA are enabled
  drivers: char: mem: Fix wraparound check to allow mappings up to the end
  cpu/hotplug: Drop the device lock on error
  ASoC: Fix use-after-free at card unregistration
  ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT
  ALSA: timer: Fix race between read and ioctl
  drm/nouveau/tmr: fully separate alarm execution/pending lists
  drm/vmwgfx: Make sure backup_handle is always valid
  drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()
  drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()
  perf/core: Drop kernel samples even though :u is specified
  powerpc/kernel: Initialize load_tm on task creation
  powerpc/kernel: Fix FP and vector register restoration
  powerpc/hotplug-mem: Fix missing endian conversion of aa_index
  powerpc/numa: Fix percpu allocations to be NUMA aware
  powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function
  scsi: qla2xxx: Fix mailbox pointer error in fwdump capture
  scsi: qla2xxx: Set bit 15 for DIAG_ECHO_TEST MBC
  scsi: qla2xxx: Modify T262 FW dump template to specify same start/end to debug customer issues
  scsi: qla2xxx: don't disable a not previously enabled PCI device
  KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages
  btrfs: fix memory leak in update_space_info failure path
  btrfs: use correct types for page indices in btrfs_page_exists_in_range
  cxl: Avoid double free_irq() for psl,slice interrupts
  cxl: Fix error path on bad ioctl
  ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path
  ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments()
  ufs: set correct ->s_maxsize
  ufs: restore maintaining ->i_blocks
  fix ufs_isblockset()
  ufs: restore proper tail allocation
  fs: add i_blocksize()
  cpuset: consider dying css as offline
  Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled
  cgroup: Prevent kill_css() from being called more than once
  ahci: Acer SA5-271 SSD Not Detected Fix
  drm/msm: Expose our reservation object when exporting a dmabuf.
  target: Re-add check to reject control WRITEs with overflow data
  cpufreq: cpufreq_register_driver() should return -ENODEV if init fails
  mei: make sysfs modalias format similar as uevent modalias
  iio: proximity: as3935: fix iio_trigger_poll issue
  iio: proximity: as3935: fix AS3935_INT mask
  iio: light: ltr501 Fix interchanged als/ps register field
  iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's
  staging/lustre/lov: remove set_fs() call from lov_getstripe()
  usb: chipidea: debug: check before accessing ci_role
  usb: chipidea: udc: fix NULL pointer dereference if udc_start failed
  usb: gadget: f_mass_storage: Serialize wake and sleep execution
  drm: Fix oops + Xserver hang when unplugging USB drm devices
  ext4: fix fdatasync(2) after extent manipulation operations
  ext4: fix data corruption with EXT4_GET_BLOCKS_ZERO
  ext4: keep existing extra fields when inode expands
  ext4: fix SEEK_HOLE
  xen/privcmd: Support correctly 64KB page granularity when mapping memory
  cfq-iosched: fix the delay of cfq_group's vdisktime under iops mode
  dmaengine: mv_xor_v2: set DMA mask to 40 bits
  dmaengine: mv_xor_v2: remove interrupt coalescing
  dmaengine: mv_xor_v2: fix tx_submit() implementation
  dmaengine: mv_xor_v2: enable XOR engine after its configuration
  dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx
  dmaengine: mv_xor_v2: properly handle wrapping in the array of HW descriptors
  dmaengine: mv_xor_v2: handle mv_xor_v2_prep_sw_desc() error properly
  dmaengine: ep93xx: Don't drain the transfers in terminate_all()
  dmaengine: ep93xx: Always start from BASE0
  dmaengine: usb-dmac: Fix DMAOR AE bit definition
  KVM: arm/arm64: vgic-v2: Do not use Active+Pending state for a HW interrupt
  KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt
  KVM: async_pf: avoid async pf injection when in guest mode
  arm: KVM: Allow unaligned accesses at HYP
  arm64: KVM: Allow unaligned accesses at EL2
  arm64: KVM: Preserve RES1 bits in SCTLR_EL2
  KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation
  kvm: async_pf: fix rcu_irq_enter() with irqs enabled
  efi: Don't issue error message when booted under Xen
  nfsd: Fix up the "supattr_exclcreat" attributes
  nfsd4: fix null dereference on replay
  drm/amdgpu/ci: disable mclk switching for high refresh rates (v2)
  crypto: gcm - wait for crypto op not signal safe
  crypto: drbg - wait for crypto op not signal safe
  KEYS: encrypted: avoid encrypting/decrypting stack buffers
  KEYS: fix freeing uninitialized memory in key_update()
  KEYS: fix dereferencing NULL payload with nonzero length
  crypto: asymmetric_keys - handle EBUSY due to backlog correctly
  ptrace: Properly initialize ptracer_cred on fork
  serial: ifx6x60: fix use-after-free on module unload
  arch/sparc: support NR_CPUS = 4096
  sparc64: delete old wrap code
  sparc64: new context wrap
  sparc64: add per-cpu mm of secondary contexts
  sparc64: redefine first version
  sparc64: combine activate_mm and switch_mm
  sparc64: reset mm cpumask after wrap
  sparc: Machine description indices can vary
  sparc64: mm: fix copy_tsb to correctly copy huge page TSBs
  sparc64: Add __multi3 for gcc 7.x and later.
  net: bridge: start hello timer only if device is up
  net: stmmac: fix completely hung TX when using TSO
  net: ethoc: enable NAPI before poll may be scheduled
  net/ipv6: Fix CALIPSO causing GPF with datagram support
  net: ping: do not abuse udp_poll()
  ipv6: Fix leak in ipv6_gso_segment().
  vxlan: fix use-after-free on deletion
  tcp: disallow cwnd undo when switching congestion control
  cxgb4: avoid enabling napi twice to the same queue
  ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
  vxlan: eliminate cached dst leak
  bnx2x: Fix Multi-Cos
  UPSTREAM: drm/msm/mdp5: use __drm_atomic_helper_plane_duplicate_state()
  ANDROID: sdcardfs: d_splice_alias can return error values

Conflicts:
	kernel/sched/cpufreq_schedutil.c

Change-Id: I6e03b1d21fe48d7f2b767f46addf417d17404dcc
Signed-off-by: default avatarKyle Yan <kyan@codeaurora.org>
parents ffd90498 da3493c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 31
SUBLEVEL = 32
EXTRAVERSION =
NAME = Roaring Lionus

+8 −2
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ __setup("fpe=", fpe_setup);
extern void init_default_cache_policy(unsigned long);
extern void paging_init(const struct machine_desc *desc);
extern void early_paging_init(const struct machine_desc *);
extern void sanity_check_meminfo(void);
extern void adjust_lowmem_bounds(void);
extern enum reboot_mode reboot_mode;
extern void setup_dma_zone(const struct machine_desc *desc);

@@ -1104,8 +1104,14 @@ void __init setup_arch(char **cmdline_p)
	setup_dma_zone(mdesc);
	xen_early_init();
	efi_init();
	sanity_check_meminfo();
	/*
	 * Make sure the calculation for lowmem/highmem is set appropriately
	 * before reserving/allocating any mmeory
	 */
	adjust_lowmem_bounds();
	arm_memblock_init(mdesc);
	/* Memory may have been removed so recalculate the bounds. */
	adjust_lowmem_bounds();

	early_ioremap_reset();

+2 −3
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ __do_hyp_init:
	@  - Write permission implies XN: disabled
	@  - Instruction cache: enabled
	@  - Data/Unified cache: enabled
	@  - Memory alignment checks: enabled
	@  - MMU: enabled (this code must be run from an identity mapping)
	mrc	p15, 4, r0, c1, c0, 0	@ HSCR
	ldr	r2, =HSCTLR_MASK
@@ -103,8 +102,8 @@ __do_hyp_init:
	mrc	p15, 0, r1, c1, c0, 0	@ SCTLR
	ldr	r2, =(HSCTLR_EE | HSCTLR_FI | HSCTLR_I | HSCTLR_C)
	and	r1, r1, r2
 ARM(	ldr	r2, =(HSCTLR_M | HSCTLR_A)			)
 THUMB(	ldr	r2, =(HSCTLR_M | HSCTLR_A | HSCTLR_TE)		)
 ARM(	ldr	r2, =(HSCTLR_M)					)
 THUMB(	ldr	r2, =(HSCTLR_M | HSCTLR_TE)			)
	orr	r1, r1, r2
	orr	r0, r0, r1
	mcr	p15, 4, r0, c1, c0, 0	@ HSCR
+3 −0
Original line number Diff line number Diff line
@@ -872,6 +872,9 @@ static pmd_t *stage2_get_pmd(struct kvm *kvm, struct kvm_mmu_memory_cache *cache
	pmd_t *pmd;

	pud = stage2_get_pud(kvm, cache, addr);
	if (!pud)
		return NULL;

	if (stage2_pud_none(*pud)) {
		if (!cache)
			return NULL;
+27 −42
Original line number Diff line number Diff line
@@ -1152,13 +1152,12 @@ early_param("vmalloc", early_vmalloc);

phys_addr_t arm_lowmem_limit __initdata = 0;

void __init sanity_check_meminfo(void)
void __init adjust_lowmem_bounds(void)
{
	phys_addr_t memblock_limit = 0;
	int highmem = 0;
	u64 vmalloc_limit;
	struct memblock_region *reg;
	bool should_use_highmem = false;
	phys_addr_t lowmem_limit = 0;

	/*
	 * Let's use our own (unoptimized) equivalent of __pa() that is
@@ -1172,43 +1171,18 @@ void __init sanity_check_meminfo(void)
	for_each_memblock(memory, reg) {
		phys_addr_t block_start = reg->base;
		phys_addr_t block_end = reg->base + reg->size;
		phys_addr_t size_limit = reg->size;

		if (reg->base >= vmalloc_limit)
			highmem = 1;
		else
			size_limit = vmalloc_limit - reg->base;


		if (!IS_ENABLED(CONFIG_HIGHMEM) || cache_is_vipt_aliasing()) {

			if (highmem) {
				pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n",
					  &block_start, &block_end);
				memblock_remove(reg->base, reg->size);
				should_use_highmem = true;
				continue;
			}

			if (reg->size > size_limit) {
				phys_addr_t overlap_size = reg->size - size_limit;

				pr_notice("Truncating RAM at %pa-%pa",
					  &block_start, &block_end);
				block_end = vmalloc_limit;
				pr_cont(" to -%pa", &block_end);
				memblock_remove(vmalloc_limit, overlap_size);
				should_use_highmem = true;
			}
		}

		if (!highmem) {
			if (block_end > arm_lowmem_limit) {
				if (reg->size > size_limit)
					arm_lowmem_limit = vmalloc_limit;
				else
					arm_lowmem_limit = block_end;
			}
		if (reg->base < vmalloc_limit) {
			if (block_end > lowmem_limit)
				/*
				 * Compare as u64 to ensure vmalloc_limit does
				 * not get truncated. block_end should always
				 * fit in phys_addr_t so there should be no
				 * issue with assignment.
				 */
				lowmem_limit = min_t(u64,
							 vmalloc_limit,
							 block_end);

			/*
			 * Find the first non-pmd-aligned page, and point
@@ -1227,14 +1201,13 @@ void __init sanity_check_meminfo(void)
				if (!IS_ALIGNED(block_start, PMD_SIZE))
					memblock_limit = block_start;
				else if (!IS_ALIGNED(block_end, PMD_SIZE))
					memblock_limit = arm_lowmem_limit;
					memblock_limit = lowmem_limit;
			}

		}
	}

	if (should_use_highmem)
		pr_notice("Consider using a HIGHMEM enabled kernel.\n");
	arm_lowmem_limit = lowmem_limit;

	high_memory = __va(arm_lowmem_limit - 1) + 1;

@@ -1248,6 +1221,18 @@ void __init sanity_check_meminfo(void)
	if (!memblock_limit)
		memblock_limit = arm_lowmem_limit;

	if (!IS_ENABLED(CONFIG_HIGHMEM) || cache_is_vipt_aliasing()) {
		if (memblock_end_of_DRAM() > arm_lowmem_limit) {
			phys_addr_t end = memblock_end_of_DRAM();

			pr_notice("Ignoring RAM at %pa-%pa\n",
				  &memblock_limit, &end);
			pr_notice("Consider using a HIGHMEM enabled kernel.\n");

			memblock_remove(memblock_limit, end - memblock_limit);
		}
	}

	memblock_set_current_limit(memblock_limit);
}

Loading