Define aarch64 specific registers for building bpf samples correctly.
Signed-off-by: Yang Shi <yang@linaro.org>
---
samples/bpf/bpf_helpers.h | 12
1 file changed, 12 insertions(+)
diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h
index 3a44d3a..af44e56
aarch64 doesn't have native support for XADD instruction, implement it by
the below instruction sequence:
Load (dst + off) to a register
Add src to it
Store it back to (dst + off)
Signed-off-by: Yang Shi <yang@linaro.org>
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wang <xi
are applied after my BPF JIT stack fix [1].
[1] https://patches.linaro.org/56268/
Yang Shi (2):
arm64: bpf: add 'store immediate' instruction
arm64: bpf: add BPF XADD instruction
arch/arm64/net/bpf_jit_comp.c | 39 ++-
1 file changed, 34 insertions(+), 5
aarch64 doesn't have native store immediate instruction, such operation
has to be implemented by the below instruction sequence:
Load immediate to register
Store register
Signed-off-by: Yang Shi <yang@linaro.org>
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wang <xi.w...@gmail
According to the discussion on the mailing list, this version adds a new patch
to force select FRAME_POINTER for ARM64.
Change v2 --> v1:
1. Adds a new patch to force select FRAME_POINTER
2. Notes that this change adds a dependency on DEBUG_KERNEL for building with
frame pointers
Yang Shi
ARM64 depends on frame pointer to get correct stack backtrace and need
FRAME_POINTER kconfig option enabled all the time.
However, currect implementation makes it could be disabled, so force it
to be selected by ARM64.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/Kconfig |
FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine
it in arch/arm64/Kconfig.debug. Actually, the one defined in arm64 directory
is never used.
This adds a dependency on DEBUG_KERNEL for building with frame pointers.
Signed-off-by: Yang Shi <yang@linaro.org>
---
backtrace and need
FRAME_POINTER kconfig option enabled all the time.
However, currect implementation makes it could be disabled, so force it
to be selected by ARM64.
Signed-off-by: Yang Shi <yang@linaro.org>
---
change v3 --> v2:
squash two patches into one.
arch/arm64/Kconfig |
FRAME_POINTER is set by default if ARCH_WANT_FRAME_POINTERS and DEBUG_KERNEL
are selcted, this is the standard way to include FRAME_POINTER used by all
of other architectures.
And, set DEBUG_KERNEL=y in defconfigs otherwise FRAME_POINTER won't be enabled
at all.
Signed-off-by: Yang Shi <y
FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine
it in arch/m32r/Kconfig.debug. Actually, the one defined in arch directory
is never used.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/m32r/Kconfig.debug | 8
1 file changed, 8 deletions(-)
When I cleanup FRME_POINTER use for arm64 arch, I found some other
architectures need the similar cleanup. So, I came up with the patch series
for them.
Yang Shi (4):
m32r: remove redundant FRAME_POINTER kconfig option
hexagon: select ARCH_WANT_FRAME_POINTERS instead of defining
FRAME_POINTER is set by default if ARCH_WANT_FRAME_POINTERS is selcted,
this is the standard way to include FRAME_POINTER used by all of other
architectures.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/hexagon/Kconfig | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
h8300 has FRAME_POINTER selected by default, but it depends on DEBUG_KERNEL,
so set DEBUG_KERNEL in defconfigs.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/h8300/configs/edosk2674_defconfig | 1 +
arch/h8300/configs/h8300h-sim_defconfig | 1 +
arch/h8300/configs/h8s-sim_def
Changelog in V2:
Split to two patches according to the suggestion from Zi Shen Lim
Show A64_FP in stack layout diagram
Correct "+64" to "-64"
Yang Shi (2):
arm64: bpf: fix JIT frame pointer setup
arm64: bpf: make BPF prologue and epilogue align with ARM64 AA
BPF fp should point to the top of the BPF prog stack. The original
implementation made it point to the bottom incorrectly.
Move A64_SP to fp before reserve BPF prog stack space.
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wang <xi.w...@gmail.com>
Signed-off-by: Yang Shi <yang
all stack
| |
+-+
low
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wang <xi.w...@gmail.com>
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/net/bpf_jit_comp.c | 34 +-
1 file changed, 29 insertions(+), 5 deletions(
e sysreg.h is useless for BPF samples, just exclude it from Makefile via
defining __ASM_SYSREG_H.
Signed-off-by: Yang Shi <yang@linaro.org>
---
samples/bpf/Makefile | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index
|| m_dirty <= dirty_freerun_ceiling(m_thresh, m_bg_thresh)
If mdtc is null, dirty_freerun_ceiling will not be called at all, so the
initialization will not change any behavior other than just ceasing the compile
warning.
Signed-off-by: Yang Shi <yang@linaro.org>
---
mm/page-writeback.c | 2 +-
n call stack
| |
+-+
low
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wang <xi.w...@gmail.com>
Signed-off-by: Yang Shi <yang@linaro.org>
---
V3 --> V2:
* Make FP point to FP'
* Fix a
n call stack
| |
+-+
low
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wang <xi.w...@gmail.com>
Signed-off-by: Yang Shi <yang@linaro.org>
---
V4 --> V3:
* Save/restore x25 and x26
V3 --> V2:
* Make FP point to FP'
* Fix a compile warning
8083
7560: 008751e0 8000 0001 124e2d1d 00107b77
Convert hashtab lock to raw lock to avoid such warning.
Signed-off-by: Yang Shi <yang@linaro.org>
---
This patch is applicable to mainline kernel too.
kernel/bpf/hashtab.
When running "mod X" operation, if X is 0 the filter has to be halt.
Add new test cases to cover A = A mod X if X is 0, and A = A mod 1.
CC: Xi Wang <xi.w...@gmail.com>
CC: Zi Shen Lim <zlim@gmail.com>
Signed-off-by: Yang Shi <yang@linaro.org&
A64_SP => +-+
| |
| ... | Function call stack
| |
+-+
low
Signed-off-by: Yang Shi <yang@linaro.org>
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wa
A64_SP => +-+
| |
| ... | Function call stack
| |
+-+
low
Signed-off-by: Yang Shi <yang@linaro.org>
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wa
aarch64 and s390x support eBPF JIT too, correct document to reflect this and
avoid any confusion.
Signed-off-by: Yang Shi <yang@linaro.org>
---
Documentation/networking/filter.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/networking/filter.
FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine
it in arch/arm64/Kconfig.debug.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/Kconfig.debug | 4
1 file changed, 4 deletions(-)
diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
commit d1ec4c34c7a9f328e43ea87522119258194f28f8
("rcu: Drop RCU_USER_QS in favor of NO_HZ_FULL") has removed RCU_USER_QS
from Kconfig file, so remove it from some documents to avoid any confusion.
Signed-off-by: Yang Shi <yang@linaro.org>
---
tools/testing/selftest
and PREEMPT_OFF_HIST is selected, otherwise just
trace_preemptirqsoff_hist is defined as a preprocessor macro.
Added rcuidle version macro when the condition is false, and added rcuidle
version macro for trace_hrtimer_interrupt_rcuidle even though it is not called
by anyone.
Signed-off-by: Yang Shi
It is not invoked by anyone now, just remove it.
Signed-off-by: Yang Shi <yang@linaro.org>
---
include/linux/rcupdate.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 581abf8..56355bc 100644
--- a/include/linux/rcupdate.h
/0xc8
Convert patch_lock to raw lock to avoid this issue.
Although the problem is found on rt kernel, the fix should be applicable to
mainline kernel too.
Signed-off-by: Yang Shi <yang@linaro.org>
Acked-by: Steven Rostedt <rost...@goodmis.org>
---
v1 -> v2:
Add Steven's Acked-
don't bother reporting bogomips in /proc/cpuinfo"), but with
some tweak due to context change.
[1] https://lkml.org/lkml/2015/1/4/132
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/kernel/cpuinfo.c | 5 +
arch/arm64/kernel/smp.c | 7 ++-
2 files changed, 11
don't bother reporting bogomips in /proc/cpuinfo"), but with
some tweak due to context change.
[1] https://lkml.org/lkml/2015/1/4/132
Acked-by: Will Deacon <will.dea...@arm.com>
Cc: <sta...@vger.kernel.org> #3.12+
Signed-off-by: Yang Shi <yang@linaro.org>
---
V2 --&g
ch64, arm, mips, ppc and ppc64.
Signed-off-by: Yang Shi <yang@linaro.org>
---
tools/perf/builtin-record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 142eeb3..e54aa4c 100644
--- a/tools/perf/builtin-record.
/0xc8
Convert patch_lock to raw loc kto avoid this issue.
Although the problem is found on rt kernel, the fix should be applicable to
mainline kernel too.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/kernel/insn.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/kernel/debug-monitors.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/debug-monitors.c
b/arch/arm64/kernel/debug-monitors.c
index cebf786..eb520d0 100644
--- a/arch/arm64/kernel/debug-moni
u lock and replace relevant list operations to rcu
version.
Signed-off-by: Yang Shi <yang@linaro.org>
---
v1-> v2
Replace list operations to rcu version.
arch/arm64/kernel/debug-monitors.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/kernel/debu
eplace relevant list operations to rcu
version and call synchronize_rcu() in unregister_break_hook().
And, replace write lock to spinlock in {un}register_break_hook.
Signed-off-by: Yang Shi <yang@linaro.org>
---
v2 -> v3
Add synchronize_rcu() in ungister_break_hook()
Replace write l
all variants
will call it finally to do real work.
Although __get_user_pages_fast doesn't call handle_mm_fault, it might be useful
to have it to distinguish between slow and fast version.
Yang Shi (7):
trace/events: Add gup trace events
mm/gup: add gup trace points
x86: mm/gup: add
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Cc: x...@kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/x86/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git
page-faults events record the invoke to handle_mm_fault, but the invoke
may come from do_page_fault or gup. In some use cases, the finer event count
mey be needed, so add trace events support for:
__get_user_pages
__get_user_pages_fast
fixup_user_fault
Signed-off-by: Yang Shi <y
Cc: linux...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sh/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c
index e7af6a6..d4c9a6e 100644
--- a/arch/sh/mm/gup.c
+++ b/arch/sh/mm/gup.c
@@ -14,6 +14,9 @@
#i
Cc: "David S. Miller" <da...@davemloft.net>
Cc: sparcli...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sparc/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c
index 2e5c4fc..d364cc6 1006
Cc: linux-m...@linux-mips.org
Acked-by: Ralf Baechle <r...@linux-mips.org>
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/mips/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index 349995d..2107499 100644
--- a/arch/m
For slow version, just add trace point for raw __get_user_pages since all
slow variants call it to do the real work finally.
Signed-off-by: Yang Shi <yang@linaro.org>
---
mm/gup.c | 8
1 file changed, 8 insertions(+)
diff --git a/mm/gup.c b/mm/gup.c
index deafa2c..44f05c9
Cc: Martin Schwidefsky <schwidef...@de.ibm.com>
Cc: Heiko Carstens <heiko.carst...@de.ibm.com>
Cc: linux-s...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/s390/mm/gup.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/s390/mm/gup.c b/
page-faults events record the invoke to handle_mm_fault, but the invoke
may come from do_page_fault or gup. In some use cases, the finer event count
mey be needed, so add trace events support for:
__get_user_pages
__get_user_pages_fast
fixup_user_fault
Signed-off-by: Yang Shi <y
and fast version.
Yang Shi (7):
trace/events: Add gup trace events
mm/gup: add gup trace points
x86: mm/gup: add gup trace points
mips: mm/gup: add gup trace points
s390: mm/gup: add gup trace points
sh: mm/gup: add gup trace points
sparc64: mm/gup: add
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Cc: x...@kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/x86/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git
For slow version, just add trace point for raw __get_user_pages since all
slow variants call it to do the real work finally.
Signed-off-by: Yang Shi <yang@linaro.org>
---
mm/gup.c | 8
1 file changed, 8 insertions(+)
diff --git a/mm/gup.c b/mm/gup.c
index deafa2c..72de7af
Cc: Martin Schwidefsky <schwidef...@de.ibm.com>
Cc: Heiko Carstens <heiko.carst...@de.ibm.com>
Cc: linux-s...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/s390/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/s390/mm/gup.c b/
Cc: linux...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sh/mm/gup.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c
index e7af6a6..6df3e97 100644
--- a/arch/sh/mm/gup.c
+++ b/arch/sh/mm/gup.c
@@ -12,6 +12,10 @@
#i
Cc: "David S. Miller" <da...@davemloft.net>
Cc: sparcli...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
The context depends on the below patch:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1028752.html
arch/sparc/mm/gup.c | 8 +
Cc: Ralf Baechle <r...@linux-mips.org>
Cc: linux-m...@linux-mips.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/mips/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index 349995d..3c5b8c8 100644
--- a/arch/mips/mm
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Cc: x...@kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/x86/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git
Cc: Martin Schwidefsky <schwidef...@de.ibm.com>
Cc: Heiko Carstens <heiko.carst...@de.ibm.com>
Cc: linux-s...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/s390/mm/gup.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/s390/mm/gup.c b/
Cc: linux-m...@linux-mips.org
Acked-by: Ralf Baechle <r...@linux-mips.org>
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/mips/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index 349995d..e0d8838 100644
--- a/arch/m
Cc: "David S. Miller" <da...@davemloft.net>
Cc: sparcli...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sparc/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c
index 2e5c4fc..d9f573c 1006
For slow version, just add trace point for raw __get_user_pages since all
slow variants call it to do the real work finally.
Signed-off-by: Yang Shi <yang@linaro.org>
---
mm/gup.c | 8
1 file changed, 8 insertions(+)
diff --git a/mm/gup.c b/mm/gup.c
index deafa2c..10245a4
page-faults events record the invoke to handle_mm_fault, but the invoke
may come from do_page_fault or gup. In some use cases, the finer event count
mey be needed, so add trace events support for:
__get_user_pages
__get_user_pages_fast
fixup_user_fault
Signed-off-by: Yang Shi <y
might be useful
to have it to distinguish between slow and fast version.
Yang Shi (7):
trace/events: Add gup trace events
mm/gup: add gup trace points
x86: mm/gup: add gup trace points
mips: mm/gup: add gup trace points
s390: mm/gup: add gup trace points
sh: mm/gup: a
Cc: linux...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sh/mm/gup.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c
index e7af6a6..6df3e97 100644
--- a/arch/sh/mm/gup.c
+++ b/arch/sh/mm/gup.c
@@ -12,6 +12,10 @@
#i
Cc: Martin Schwidefsky <schwidef...@de.ibm.com>
Cc: Heiko Carstens <heiko.carst...@de.ibm.com>
Cc: linux-s...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/s390/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/s390/mm/gup.c b/
Cc: "David S. Miller" <da...@davemloft.net>
Cc: sparcli...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
The context depends on the below patch:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1028752.html
arch/sparc/mm/gup.c | 8 +
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Cc: x...@kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/x86/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git
Cc: linux-m...@linux-mips.org
Acked-by: Ralf Baechle <r...@linux-mips.org>
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/mips/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index 349995d..3c5b8c8 100644
--- a/arch/m
Cc: "David S. Miller" <da...@davemloft.net>
Cc: sparcli...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sparc/mm/gup.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c
index 2e5c4fc..5a06c34 1006
Cc: linux-m...@linux-mips.org
Acked-by: Ralf Baechle <r...@linux-mips.org>
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/mips/mm/gup.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index 349995d..7d90883 100644
--- a/arch/m
v5:
* Fixed a typo introduced by v4 rebase
* Removed redundant "#define CREATE_TRACE_POINTS" from architecture specifc
gup.c
v4:
* Adopted Steven's suggestion to use "unsigned int" for nr_pages to save
space in ring buffer since it is unlikely to have more than 0x
pages are touched
Cc: Martin Schwidefsky <schwidef...@de.ibm.com>
Cc: Heiko Carstens <heiko.carst...@de.ibm.com>
Cc: linux-s...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/s390/mm/gup.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/s390/mm/gup.c b/arch/s
Cc: linux...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sh/mm/gup.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c
index e7af6a6..dc80480 100644
--- a/arch/sh/mm/gup.c
+++ b/arch/sh/mm/gup.c
@@ -14,6 +14,8 @@
#i
For slow version, just add trace point for raw __get_user_pages since all
slow variants call it to do the real work finally.
Signed-off-by: Yang Shi <yang@linaro.org>
---
mm/gup.c | 8
1 file changed, 8 insertions(+)
diff --git a/mm/gup.c b/mm/gup.c
index deafa2c..00a3cff
page-faults events record the invoke to handle_mm_fault, but the invoke
may come from do_page_fault or gup. In some use cases, the finer event count
mey be needed, so add trace events support for:
__get_user_pages
__get_user_pages_fast
fixup_user_fault
Signed-off-by: Yang Shi <y
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Cc: x...@kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/x86/mm/gup.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arc
PPC64 machines.
Signed-off-by: Yang Shi <yang@linaro.org>
---
Following the instruction in Documentation/timers/NO_HZ.txt, I tested full nohz
on my FSL T2080 target, the below trace log shows it works well.
user_loop-574 [001] d..1 137.044892: tick_stop: success=y
[] do_force_sig_info+0x2a/0xc0
[] force_sig_info+0xd/0x10
[] send_sigtrap+0x6f/0x80
[] do_debug+0x161/0x1a0
[] debug_stack_correct+0x2e/0x35
Signal send delay is just available for x86-64, x86-32 needs it too.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/x86/include/asm/si
nter which disables preemption uncondiontionally for both x86-64 and
x86-32. However, x86-32 does not have an IST and the stack still belongs to
the current task and there is no problem in scheduling out the task.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/x86/kernel/traps.c | 8
The kernel just send out a SIGTRAP signal when handling ptrace breakpoint in
debug exception, so it sounds safe to have interrupt enabled if it is not
disabled by the parent process.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/kernel/debug-monitors.c | 10 ++
o distinguish between slow and fast version.
Yang Shi (7):
trace/events: Add gup trace events
mm/gup: add gup trace points
x86: mm/gup: add gup trace points
mips: mm/gup: add gup trace points
s390: mm/gup: add gup trace points
sh: mm/gup: add gup trace points
sp
Cc: linux...@vger.kernel.org
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sh/mm/gup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c
index e7af6a6..fa72aac 100644
--- a/arch/sh/mm/gup.c
+++ b/arch/sh/mm/gup.c
@@ -14,6 +14,9 @@
#i
page-faults events record the invoke to handle_mm_fault, but the invoke
may come from do_page_fault or gup. In some use cases, the finer event count
mey be needed, so add trace events support for:
__get_user_pages
__get_user_pages_fast
fixup_user_fault
Signed-off-by: Yang Shi <y
For slow version, just add trace point for raw __get_user_pages since all
slow variants call it to do the real work finally.
Signed-off-by: Yang Shi <yang@linaro.org>
---
mm/gup.c | 8
1 file changed, 8 insertions(+)
diff --git a/mm/gup.c b/mm/gup.c
index deafa2c..00a3cff
Check if user address is accessible in atomic version __get_user_pages_fast()
before walking the page table.
And, check if end > start in get_user_pages_fast(), otherwise fallback to slow
path.
Signed-off-by: Yang Shi <yang@linaro.org>
---
Just found slow_irqon label is not defin
Check if user address is accessible in atomic version __get_user_pages_fast()
before walking the page table.
And, check if end > start in get_user_pages_fast(), otherwise fallback to slow
path.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/sparc/mm/gup.c | 5 +
1 file c
aarch64 doesn't have native store immediate instruction, such operation
has to be implemented by the below instruction sequence:
Load immediate to register
Store register
Signed-off-by: Yang Shi <yang@linaro.org>
CC: Zi Shen Lim <zlim@gmail.com>
CC: Xi Wang <xi.w...@gmai
e assembly implementation to __arch_copy_to/from_user.
Tested by test_kasan module.
Acked-by: Andrey Ryabinin <aryabi...@virtuozzo.com>
Reviewed-by: Mark Rutland <mark.rutl...@arm.com>
Tested-by: Mark Rutland <mark.rutl...@arm.com>
Signed-off-by: Yang Shi <yang@linaro.
h
a better approach.
[1]
http://lkml.kernel.org/r/caamzw4oumypwqjvd7qufc6w1aic__tyauh80mlrznmxky0-...@mail.gmail.com
CC: Joonsoo Kim <iamjoonsoo@lge.com>
Signed-off-by: Yang Shi <yang@linaro.org>
---
init/main.c | 3 +--
mm/page_ext.c | 4 +++-
2 files changed, 4 insertions(+)
() by
early_pfn_to_nid().
Signed-off-by: Yang Shi <yang@linaro.org>
---
mm/memory_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index caf2a14..b8ee080 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -300,7 +300,7 @
The upstream commit 1771c6e1a567ea0ba20a4ffe68a1419fd8ef
("x86/kasan: instrument user memory access API") added KASAN instrument to
x86 user memory access API, so added such instrument to ARM64 too.
Tested by test_kasan module.
Signed-off-by: Yang Shi <yang@linaro.org>
e assembly implementation to __arch_copy_to/from_user.
Tested by test_kasan module.
Signed-off-by: Yang Shi <yang@linaro.org>
---
v2:
Adopted the comment from Andrey and Mark to add kasan_check_read/write into
__copy_to/from_user.
arch/arm64/include/asm/uaccess.h | 25 +++
00 00 00 00 00 00 00 00
ffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Since the shadow byte pointed by the report is 0, so it may mean it is just hit
oob in non-current task. So, disable the instrumentation to silence these
warnings.
Signed-off-by: Yang Shi <yang@lina
ck
trace. It may touch the stack red zones to cause the warning. So, just disable
the instrumentation to silence the warning.
Signed-off-by: Yang Shi <yang@linaro.org>
---
kernel/trace/trace_stack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_
00 00 00 00 00 00 00 00
ffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Since the shadow byte pointed by the report is 0, so it may mean it is just hit
oob in non-current task. So, disable the instrumentation here.
Signed-off-by: Yang Shi <yang@linaro.org>
---
a
When building non-preempt kernel (PREEMPT_NONE), PREEMPT_COUNT is still enabled
if DEBUG_ATOMIC_SLEEP is enabled. But, it sounds not make sense to have
PREEMPT_COUNT set in non-preempt kernel.
So, make PREEMPT_COUNT depend on PREEMPT here.
Signed-off-by: Yang Shi <yang@linaro.org>
--
preempt.h has been included by sched.h, so it is not necessary to include
both, just keep sched.h.
Signed-off-by: Yang Shi <yang@linaro.org>
---
Happened to find this when checking preempt.h include for another patch review.
Build test is passed with and without CONFIG_PREEMPT enabled.
There are some "#ifdef PCMCIA" in the driver code, but all of them missed
CONFIG_ prefix. Correct PCMCIA to CONFIG_PCMCIA.
Signed-off-by: Yang Shi <yang@linaro.org>
---
I happened to find this problem when I was tracking down another problem,
however this driver looks ve
[] show_stack+0x24/0x30
[] sched_show_task+0x16c/0x280
[] watchdog+0x560/0x708
[] kthread+0x1b0/0x1d0
[] ret_from_fork+0x10/0x40
Replace it to raw version to prevent from the race condition.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/kernel/traps.c | 2 +-
1 file chan
Switching between stacks is only valid if we are tracing ourselves while on the
irq_stack, so it is only valid when in current and non-preemptible context,
otherwise is is just zeroed off.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/kernel/stacktrace.c | 13 ++---
When enabling UBSAN_SANITIZE_ALL, the kernel image size gets increased
significantly (~3x). So, it sounds better to have some note in Kconfig.
And, fixed a typo.
Signed-off-by: Yang Shi <yang@linaro.org>
---
lib/Kconfig.ubsan | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
To enable UBSAN on arm64, ARCH_HAS_UBSAN_SANITIZE_ALL need to be selected.
Basic kernel bootup test is passed on arm64 with CONFIG_UBSAN_SANITIZE_ALL
enabled.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch
gdbts boot test silent hang issue on 4.4 -rt kernel.
Signed-off-by: Yang Shi <yang@linaro.org>
---
arch/arm64/kernel/debug-monitors.c | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/kernel/debug-monitors.c
b/arch/arm64/kernel/debug-
1 - 100 of 1968 matches
Mail list logo