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

Commit 9655b5b3 authored by Kyle Yan's avatar Kyle Yan
Browse files

Merge remote-tracking branch '4.9/tmp-3f353c3e' into 4.9



* 4.9/tmp-3f353c3e:
  Linux 4.9.38
  saa7134: fix warm Medion 7134 EEPROM read
  x86/mm/pat: Don't report PAT on CPUs that don't support it
  ext4: check return value of kstrtoull correctly in reserved_clusters_store
  crypto: rsa-pkcs1pad - use constant time memory comparison for MACs
  crypto: caam - fix gfp allocation flags (part I)
  staging: comedi: fix clean-up of comedi_class in comedi_init()
  staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.
  locking/rwsem-spinlock: Fix EINTR branch in __down_write_common()
  md: fix super_offset endianness in super_1_rdev_size_change
  md: fix incorrect use of lexx_to_cpu in does_sb_need_changing
  perf probe: Add error checks to offline probe post-processing
  perf probe: Fix to probe on gcc generated symbols for offline kernel
  perf scripting perl: Fix compile error with some perl5 versions
  perf header: Fix handling of PERF_EVENT_UPDATE__SCALE
  perf bench numa: Avoid possible truncation when using snprintf()
  perf tests: Avoid possible truncation with dirent->d_name + snprintf
  perf intel-pt: Use __fallthrough
  perf thread_map: Correctly size buffer used with dirent->dt_name
  perf top: Use __fallthrough
  tools strfilter: Use __fallthrough
  tools string: Use __fallthrough in perf_atoll()
  tools include: Add a __fallthrough statement
  tpm: Issue a TPM2_Shutdown for TPM2 devices.
  Add "shutdown" to "struct class".
  mqueue: fix a use-after-free in sys_mq_notify()
  FROMLIST: binder: remove global binder lock
  FROMLIST: binder: fix death race conditions
  FROMLIST: binder: protect against stale pointers in print_binder_transaction
  FROMLIST: binder: protect binder_ref with outer lock
  FROMLIST: binder: use inner lock to protect thread accounting
  FROMLIST: binder: protect transaction_stack with inner lock.
  FROMLIST: binder: protect proc->threads with inner_lock
  FROMLIST: binder: protect proc->nodes with inner lock
  FROMLIST: binder: add spinlock to protect binder_node
  FROMLIST: binder: add spinlocks to protect todo lists
  FROMLIST: binder: use inner lock to sync work dq and node counts
  FROMLIST: binder: introduce locking helper functions
  FROMLIST: binder: use node->tmp_refs to ensure node safety
  FROMLIST: binder: refactor binder ref inc/dec for thread safety
  FROMLIST: binder: make sure accesses to proc/thread are safe
  FROMLIST: binder: make sure target_node has strong ref
  FROMLIST: binder: guarantee txn complete / errors delivered in-order
  FROMLIST: binder: refactor binder_pop_transaction
  FROMLIST: binder: use atomic for transaction_log index
  FROMLIST: binder: add more debug info when allocation fails.
  FROMLIST: binder: protect against two threads freeing buffer
  FROMLIST: binder: remove dead code in binder_get_ref_for_node
  FROMLIST: binder: don't modify thread->looper from other threads
  FROMLIST: binder: avoid race conditions when enqueuing txn
  FROMLIST: binder: refactor queue management in binder_thread_read
  FROMLIST: binder: add log information for binder transaction failures
  FROMLIST: binder: make binder_last_id an atomic
  FROMLIST: binder: change binder_stats to atomics
  FROMLIST: binder: add protection for non-perf cases
  FROMLIST: binder: remove binder_debug_no_lock mechanism
  FROMLIST: binder: move binder_alloc to separate file
  FROMLIST: binder: separate out binder_alloc functions
  FROMLIST: binder: remove unneeded cleanup code
  FROMLIST: binder: separate binder allocator structure from binder proc
  FROMLIST: binder: Use wake up hint for synchronous transactions.
  Revert "android: binder: Sanity check at binder ioctl"

Change-Id: Iffe1e882cf726feaabb0c2ff04e22b932d326c5b
Signed-off-by: default avatarKyle Yan <kyan@codeaurora.org>
parents bbdb928c 3f353c3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 37
SUBLEVEL = 38
EXTRAVERSION =
NAME = Roaring Lionus

+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
bool pat_enabled(void);
void pat_disable(const char *reason);
extern void pat_init(void);
extern void init_cache_modes(void);

extern int reserve_memtype(u64 start, u64 end,
		enum page_cache_mode req_pcm, enum page_cache_mode *ret_pcm);
+7 −0
Original line number Diff line number Diff line
@@ -1053,6 +1053,13 @@ void __init setup_arch(char **cmdline_p)

	max_possible_pfn = max_pfn;

	/*
	 * This call is required when the CPU does not support PAT. If
	 * mtrr_bp_init() invoked it already via pat_init() the call has no
	 * effect.
	 */
	init_cache_modes();

	/*
	 * Define random base addresses for memory sections after max_pfn is
	 * defined and before each memory section base is used.
+12 −16
Original line number Diff line number Diff line
@@ -36,14 +36,14 @@
#undef pr_fmt
#define pr_fmt(fmt) "" fmt

static bool boot_cpu_done;

static int __read_mostly __pat_enabled = IS_ENABLED(CONFIG_X86_PAT);
static void init_cache_modes(void);
static bool __read_mostly boot_cpu_done;
static bool __read_mostly pat_disabled = !IS_ENABLED(CONFIG_X86_PAT);
static bool __read_mostly pat_initialized;
static bool __read_mostly init_cm_done;

void pat_disable(const char *reason)
{
	if (!__pat_enabled)
	if (pat_disabled)
		return;

	if (boot_cpu_done) {
@@ -51,10 +51,8 @@ void pat_disable(const char *reason)
		return;
	}

	__pat_enabled = 0;
	pat_disabled = true;
	pr_info("x86/PAT: %s\n", reason);

	init_cache_modes();
}

static int __init nopat(char *str)
@@ -66,7 +64,7 @@ early_param("nopat", nopat);

bool pat_enabled(void)
{
	return !!__pat_enabled;
	return pat_initialized;
}
EXPORT_SYMBOL_GPL(pat_enabled);

@@ -204,6 +202,8 @@ static void __init_cache_modes(u64 pat)
		update_cache_mode_entry(i, cache);
	}
	pr_info("x86/PAT: Configuration [0-7]: %s\n", pat_msg);

	init_cm_done = true;
}

#define PAT(x, y)	((u64)PAT_ ## y << ((x)*8))
@@ -224,6 +224,7 @@ static void pat_bsp_init(u64 pat)
	}

	wrmsrl(MSR_IA32_CR_PAT, pat);
	pat_initialized = true;

	__init_cache_modes(pat);
}
@@ -241,10 +242,9 @@ static void pat_ap_init(u64 pat)
	wrmsrl(MSR_IA32_CR_PAT, pat);
}

static void init_cache_modes(void)
void init_cache_modes(void)
{
	u64 pat = 0;
	static int init_cm_done;

	if (init_cm_done)
		return;
@@ -286,8 +286,6 @@ static void init_cache_modes(void)
	}

	__init_cache_modes(pat);

	init_cm_done = 1;
}

/**
@@ -305,10 +303,8 @@ void pat_init(void)
	u64 pat;
	struct cpuinfo_x86 *c = &boot_cpu_data;

	if (!pat_enabled()) {
		init_cache_modes();
	if (pat_disabled)
		return;
	}

	if ((c->x86_vendor == X86_VENDOR_INTEL) &&
	    (((c->x86 == 0x6) && (c->x86_model <= 0xd)) ||
+1 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ static int pkcs1pad_verify_complete(struct akcipher_request *req, int err)
		goto done;
	pos++;

	if (memcmp(out_buf + pos, digest_info->data, digest_info->size))
	if (crypto_memneq(out_buf + pos, digest_info->data, digest_info->size))
		goto done;

	pos += digest_info->size;
Loading