Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Anshuman Khandual
On 06/10/2019 10:27 AM, Dave Hansen wrote: > On 6/9/19 9:34 PM, Anshuman Khandual wrote: >>> Do you really think this is easier to read? >>> >>> Why not just move the x86 version to include/linux/kprobes.h, and replace >>> the int with bool? >> Will just return bool directly without an additiona

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Dave Hansen
On 6/9/19 9:34 PM, Anshuman Khandual wrote: >> Do you really think this is easier to read? >> >> Why not just move the x86 version to include/linux/kprobes.h, and replace >> the int with bool? > Will just return bool directly without an additional variable here as > suggested > before. But for the

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-09 Thread Anshuman Khandual
On 06/08/2019 01:42 AM, Matthew Wilcox wrote: > Before: > >> @@ -46,23 +46,6 @@ kmmio_fault(struct pt_regs *regs, unsigned long addr) >> return 0; >> } >> >> -static nokprobe_inline int kprobes_fault(struct pt_regs *regs) >> -{ >> -if (!kprobes_built_in()) >> -return 0;

[PATCH 4.4 071/241] perf bench numa: Add define for RUSAGE_THREAD if not present

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit bf561d3c13423fc54daa19b5d49dc15fafdb7acc ] While cross building perf to the ARC architecture on a fedora 30 host, we were failing with: CC /tmp/build/perf/bench/numa.o bench/numa.c: In function ‘worker_thread’: bench/numa.c:1261:12: error: ‘RUSAGE_THREAD’ undecla

[PATCH 1/2] linux/bits.h: make BIT(), GENMASK(), and friends available in assembly

2019-06-09 Thread Masahiro Yamada
BIT(), GENMASK(), etc. are useful to define register bits of hardware. However, low-level code is often written in assembly, where they are not available due to the hard-coded 1UL, 0UL. In fact, in-kernel headers such as arch/arm64/include/asm/sysreg.h use _BITUL() instead of BIT() so that the reg

[PATCH 2/2] arch: replace _BITUL() in kernel-space headers with BIT()

2019-06-09 Thread Masahiro Yamada
Now that BIT() can be used from assembly code, we can safely replace _BITUL() with equivalent BIT(). UAPI headers are still required to use _BITUL(), but there is no more reason to use it in kernel headers. BIT() is shorter. Signed-off-by: Masahiro Yamada --- arch/arc/include/asm/pgtable.h