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

Commit a5ed1e96 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc fixes from Michael Ellerman:
 "One fix for a boot failure on 32-bit, introduced during the merge
  window.

  A fix for our handling of CLOCK_MONOTONIC in the 64-bit VDSO. Changing
  the wall clock across the Y2038 boundary could cause CLOCK_MONOTONIC
  to jump forward and backward.

  Our spectre_v2 reporting was a bit confusing due to a bug I
  introduced. On some systems it was reporting that the count cache was
  disabled and also that we were flushing the count cache on context
  switch. Only the former is true, and given that the count cache is
  disabled it doesn't make any sense to flush it. No one reported it, so
  presumably the presence of any mitigation is all people check for.

  Finally a small build fix for zsmalloc on 32-bit.

  Thanks to: Ben Hutchings, Christophe Leroy, Diana Craciun, Guenter
  Roeck, Michael Neuling"

* tag 'powerpc-5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/security: Fix spectre_v2 reporting
  powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations
  powerpc/6xx: fix setup and use of SPRN_SPRG_PGDIR for hash32
  powerpc/vdso64: Fix CLOCK_MONOTONIC inconsistencies across Y2038
parents 070c95d4 92edf8df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ static inline bool strict_kernel_rwx_enabled(void)
#if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME) &&	\
	defined (CONFIG_PPC_64K_PAGES)
#define MAX_PHYSMEM_BITS        51
#else
#elif defined(CONFIG_SPARSEMEM)
#define MAX_PHYSMEM_BITS        46
#endif

+4 −4
Original line number Diff line number Diff line
@@ -82,10 +82,10 @@ struct vdso_data {
	__u32 icache_block_size;		/* L1 i-cache block size     */
	__u32 dcache_log_block_size;		/* L1 d-cache log block size */
	__u32 icache_log_block_size;		/* L1 i-cache log block size */
	__s32 wtom_clock_sec;			/* Wall to monotonic clock */
	__s32 wtom_clock_nsec;
	struct timespec stamp_xtime;	/* xtime as at tb_orig_stamp */
	__u32 stamp_sec_fraction;		/* fractional seconds of stamp_xtime */
	__s32 wtom_clock_nsec;			/* Wall to monotonic clock nsec */
	__s64 wtom_clock_sec;			/* Wall to monotonic clock sec */
	struct timespec stamp_xtime;		/* xtime as at tb_orig_stamp */
   	__u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls  */
   	__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
};
+0 −3
Original line number Diff line number Diff line
@@ -24,9 +24,6 @@ BEGIN_MMU_FTR_SECTION
	li	r10,0
	mtspr	SPRN_SPRG_603_LRU,r10		/* init SW LRU tracking */
END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
	lis	r10, (swapper_pg_dir - PAGE_OFFSET)@h
	ori	r10, r10, (swapper_pg_dir - PAGE_OFFSET)@l
	mtspr	SPRN_SPRG_PGDIR, r10

BEGIN_FTR_SECTION
	bl	__init_fpu_registers
+6 −0
Original line number Diff line number Diff line
@@ -855,6 +855,9 @@ __secondary_start:
	li	r3,0
	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
#endif
	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
	mtspr	SPRN_SPRG_PGDIR, r4

	/* enable MMU and jump to start_secondary */
	li	r4,MSR_KERNEL
@@ -942,6 +945,9 @@ start_here:
	li	r3,0
	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
#endif
	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
	mtspr	SPRN_SPRG_PGDIR, r4

	/* stack */
	lis	r1,init_thread_union@ha
+8 −15
Original line number Diff line number Diff line
@@ -190,26 +190,19 @@ ssize_t cpu_show_spectre_v2(struct device *dev, struct device_attribute *attr, c
	bcs = security_ftr_enabled(SEC_FTR_BCCTRL_SERIALISED);
	ccd = security_ftr_enabled(SEC_FTR_COUNT_CACHE_DISABLED);

	if (bcs || ccd || count_cache_flush_type != COUNT_CACHE_FLUSH_NONE) {
		bool comma = false;
	if (bcs || ccd) {
		seq_buf_printf(&s, "Mitigation: ");

		if (bcs) {
		if (bcs)
			seq_buf_printf(&s, "Indirect branch serialisation (kernel only)");
			comma = true;
		}

		if (ccd) {
			if (comma)
				seq_buf_printf(&s, ", ");
			seq_buf_printf(&s, "Indirect branch cache disabled");
			comma = true;
		}

		if (comma)
		if (bcs && ccd)
			seq_buf_printf(&s, ", ");

		seq_buf_printf(&s, "Software count cache flush");
		if (ccd)
			seq_buf_printf(&s, "Indirect branch cache disabled");
	} else if (count_cache_flush_type != COUNT_CACHE_FLUSH_NONE) {
		seq_buf_printf(&s, "Mitigation: Software count cache flush");

		if (count_cache_flush_type == COUNT_CACHE_FLUSH_HW)
			seq_buf_printf(&s, " (hardware accelerated)");
Loading