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

Commit e8a944d5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes I2cc66423,Ie3044786,Iaf4d47ed,I038fd175 into msm-next

* changes:
  drivers: dma-contiguous: remove cma regions from kmemleak scan
  kmemleak : Make kmemleak_stack_scan optional using config
  defconfig: msm: Enable ARM64_STRICT_BREAK_BEFORE_MAKE flag.
  arm64: mm: allow enforcing of strict break-before-make for page tables
parents 90015ba6 bcb5df1c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -96,6 +96,9 @@ config ARM64_RELOC_TEST
	depends on m
	tristate "Relocation testing module"

config ARM64_STRICT_BREAK_BEFORE_MAKE
	bool "Enforce strict break-before-make on page table updates "

source "drivers/hwtracing/coresight/Kconfig"

endmenu
+1 −0
Original line number Diff line number Diff line
@@ -397,6 +397,7 @@ CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_MEMTEST=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_PID_IN_CONTEXTIDR=y
CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE=y
CONFIG_CORESIGHT=y
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
CONFIG_CORESIGHT_SOURCE_ETM4X=y
+29 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <asm/bug.h>
#include <asm/proc-fns.h>

#include <asm/bug.h>
#include <asm/memory.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable-prot.h>
@@ -185,6 +186,34 @@ static inline pmd_t pmd_mkcont(pmd_t pmd)

static inline void set_pte(pte_t *ptep, pte_t pte)
{
#ifdef CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE
	pteval_t old = pte_val(*ptep);
	pteval_t new = pte_val(pte);

	/* Only problematic if valid -> valid */
	if (!(old & new & PTE_VALID))
		goto pte_ok;

	/* Changing attributes should go via an invalid entry */
	if (WARN_ON((old & PTE_ATTRINDX_MASK) != (new & PTE_ATTRINDX_MASK)))
		goto pte_bad;

	/* Change of OA is only an issue if one mapping is writable */
	if (!(old & new & PTE_RDONLY) &&
	    WARN_ON(pte_pfn(*ptep) != pte_pfn(pte)))
		goto pte_bad;

	goto pte_ok;

pte_bad:
	*ptep = __pte(0);
	dsb(ishst);
	asm("tlbi	vmalle1is");
	dsb(ish);
	isb();
pte_ok:
#endif

	*ptep = pte;

	/*
+9 −0
Original line number Diff line number Diff line
@@ -1012,6 +1012,15 @@ config DEBUG_TIMEKEEPING

	  If unsure, say N.

config DEBUG_TASK_STACK_SCAN_OFF
	bool "Disable kmemleak task stack scan by default"
	depends on DEBUG_KMEMLEAK
	help
	  Say Y here to disable kmemleak task stack scan by default
	  at compile time. It can be enabled later if required by
	  writing to the debugfs entry :
	  echo "stack=on" > /sys/kernel/debug/kmemleak.

config DEBUG_PREEMPT
	bool "Debug preemptible kernel"
	depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
+4 −0
Original line number Diff line number Diff line
@@ -136,6 +136,10 @@ static int __init cma_activate_area(struct cma *cma)
	spin_lock_init(&cma->mem_head_lock);
#endif

	if (!PageHighMem(pfn_to_page(cma->base_pfn)))
		kmemleak_free_part(__va(cma->base_pfn << PAGE_SHIFT),
				cma->count << PAGE_SHIFT);

	return 0;

not_in_zone:
Loading