[PATCH] s390: allow reschedule on syscall restart

2021-01-21 Thread Sven Schnelle
Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone within idle loop") from next-20210121 causes a warning because s390 doesn't call sched_resched_local_allow() when restarting a syscall. Signed-off-by: Sven Schnelle --- arch/s390/kernel/syscall.c | 1 + 1 file

Warning with next-20210121 on s390

2021-01-21 Thread Sven Schnelle
there's a warning with linux-next on s390: [ 33.893818] systemd-xdg-autostart-generator[544]: Not generating service for XDG autostart app-at\x2dspi\x2ddbus\x2dbus-autostart.service, startup phases are not supported. [ 54.613344] [ cut here ] [ 54.613702] Late

Re: [PATCH] printk: fix buffer overflow potential for print_text()

2021-01-23 Thread Sven Schnelle
Sven Schnelle writes: > John Ogness writes: > >> On 2021-01-22, Sven Schnelle wrote: > I was able to reproduce it in a virtual machine where i have a few more > ways to debug. What i got was: > > 01: -> 001B8814" MVI 92001000 >> 016

Re: [PATCH] printk: fix buffer overflow potential for print_text()

2021-01-23 Thread Sven Schnelle
John Ogness writes: > On 2021-01-22, Sven Schnelle wrote: >> >> So somehow the pointer for console_drivers changes. >> >> I can't provide the normal kernel crash output as printk is no longer >> working, > > I don't understand what you mean here. The

Re: [PATCH] printk: fix buffer overflow potential for print_text()

2021-01-24 Thread Sven Schnelle
John Ogness writes: > Hi Sven, > > Thanks for the outstanding analysis! > > On 2021-01-23, Sven Schnelle wrote: >>> 1401if (buf_size > 0) >>> 1402text[len] = 0; >> >> I don't think i have really understoo

Re: [PATCH] s390/idle: Fix suspicious RCU usage

2020-10-07 Thread Sven Schnelle
Hi Peter, pet...@infradead.org writes: > After commit eb1f00237aca ("lockdep,trace: Expose tracepoints") the > lock tracepoints are visible to lockdep and RCU-lockdep is finding a > bunch more RCU violations that were previously hidden. > > Switch the idle->seqcount over to using raw_write_*()

Re: [PATCH 2/2] s390: convert to GENERIC_VDSO

2020-08-04 Thread Sven Schnelle
Hi, Thomas Gleixner writes: > Heiko Carstens writes: > >> On Mon, Aug 03, 2020 at 06:05:24PM +0200, Thomas Gleixner wrote: >>> +/** >>> + * vdso_update_begin - Start of a VDSO update section >>> + * >>> + * Allows architecture code to safely update the architecture specific VDSO >>> + * data.

[PATCH 1/3] vdso: allow to add architecture-specific vdso data

2020-08-04 Thread Sven Schnelle
arch_vdso_data'. This structure will be embedded in the generic vDSO data. Signed-off-by: Sven Schnelle --- arch/Kconfig| 3 +++ include/vdso/datapage.h | 7 +++ 2 files changed, 10 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 8cc35dc556c7..e1017ce979e2 100644

[PATCH RFC v2] s390: convert to GENERIC_VDSO

2020-08-04 Thread Sven Schnelle
as discussed here's the second version of the generic vdso patch for s390. Changes in v2: - added patch from Thomas that adds vdso_update_begin()/vdso_update_end() - changed the s390 code to use the vdso update functions - changed the name of the architecture specific data to 'arch_data'

[PATCH 2/3] timekeeping/vsyscall: Provide vdso_update_begin/end()

2020-08-04 Thread Sven Schnelle
to signal data consistency and drops the timekeeper lock. Signed-off-by: Thomas Gleixner Signed-off-by: Sven Schnelle --- include/vdso/vsyscall.h| 3 +++ kernel/time/timekeeping.c | 2 +- kernel/time/timekeeping_internal.h | 11 +++--- kernel/time/vsyscall.c

[PATCH 3/3] s390: convert to GENERIC_VDSO

2020-08-04 Thread Sven Schnelle
a bit slower but still much faster than syscalls. Signed-off-by: Sven Schnelle --- arch/s390/Kconfig | 3 + arch/s390/include/asm/clocksource.h | 7 + arch/s390/include/asm/vdso.h| 25 +-- arch/s390/include/asm/vdso/clocksource.h| 8

Re: [PATCH 1/3] vdso: allow to add architecture-specific vdso data

2020-08-04 Thread Sven Schnelle
Hi, Sven Schnelle writes: > Add the possibility to add architecture specific vDSO > data to struct vdso_data. This is useful if the arch specific > user space VDSO code needs additional data during execution. > If CONFIG_ARCH_HAS_VDSO_DATA is defined, the generic code will > i

[PATCH RFC v3] s390: convert to GENERIC_VDSO

2020-08-04 Thread Sven Schnelle
here's the third version of the generic vdso patchset for s390. Changes in v3; - update the architecture specific data patch to the correct one. Changes in v2: - added patch from Thomas that adds vdso_update_begin()/vdso_update_end() - changed the s390 code to use the vdso update functions -

[PATCH v3 2/3] timekeeping/vsyscall: Provide vdso_update_begin/end()

2020-08-04 Thread Sven Schnelle
to signal data consistency and drops the timekeeper lock. Signed-off-by: Thomas Gleixner Signed-off-by: Sven Schnelle --- include/vdso/vsyscall.h| 3 +++ kernel/time/timekeeping.c | 2 +- kernel/time/timekeeping_internal.h | 11 +++--- kernel/time/vsyscall.c

[PATCH v3 1/3] vdso: allow to add architecture-specific vdso data

2020-08-04 Thread Sven Schnelle
arch_vdso_data'. This structure will be embedded in the generic vDSO data. Signed-off-by: Sven Schnelle --- arch/Kconfig| 3 +++ include/vdso/datapage.h | 9 + 2 files changed, 12 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 8cc35dc556c7..e1017ce979e2 100644

[PATCH v3 3/3] s390: convert to GENERIC_VDSO

2020-08-04 Thread Sven Schnelle
a bit slower but still much faster than syscalls. Signed-off-by: Sven Schnelle --- arch/s390/Kconfig | 3 + arch/s390/include/asm/clocksource.h | 7 + arch/s390/include/asm/vdso.h| 25 +-- arch/s390/include/asm/vdso/clocksource.h| 8

Re: [PATCH v3 3/3] s390: convert to GENERIC_VDSO

2020-08-05 Thread Sven Schnelle
Hi Thomas, Thomas Gleixner writes: > Sven Schnelle writes: >> --- /dev/null >> +++ b/arch/s390/include/asm/vdso/data.h >> @@ -0,0 +1,13 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +#ifndef __S390_ASM_VDSO_DATA_H >> +#define __S390_ASM_VDSO_DATA_H

Re: autofs crash with latest linux-next

2020-10-15 Thread Sven Schnelle
Kees Cook writes: > On Wed, Oct 14, 2020 at 09:15:47AM +0200, Krzysztof Kozlowski wrote: >> I hit this since few days as well. Although the bisect points to the >> merge, the issue looks like a result of mentioned commit 4d03e3cc5982 >> ("fs: don't allow kernel reads and writes without iter

Re: [PATCH] s390/idle: Fix suspicious RCU usage

2020-10-08 Thread Sven Schnelle
Hi Peter, Peter Zijlstra writes: > On Wed, Oct 07, 2020 at 12:05:51PM +0200, Peter Zijlstra wrote: >> On Wed, Oct 07, 2020 at 09:53:25AM +0200, Sven Schnelle wrote: >> > Hi Peter, >> > >> > pet...@infradead.org writes: >> > >> > > Afte

autofs crash with latest linux-next

2020-10-12 Thread Sven Schnelle
Hi, on s390 i see the following crash with linux-next: [ 4525.432605] Unable to handle kernel pointer dereference in virtual kernel address space [ 4525.432612] Failing address: TEID: 0483 [ 4525.432613] Fault in home space mode while using kernel ASCE. [

[PATCH 2/2] s390: convert to GENERIC_VDSO

2020-08-02 Thread Sven Schnelle
a bit slower but still much faster than syscalls. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens --- arch/s390/Kconfig | 3 + arch/s390/include/asm/clocksource.h | 7 + arch/s390/include/asm/vdso.h| 25 +-- arch/s390/include/asm

[PATCH RFC] s390: convert to GENERIC_VDSO

2020-08-02 Thread Sven Schnelle
these two patches convert the s390 architecture to generic VDSO. The first patch adds an option to add architecture specific information to struct vdso_data. We need that information because the old s390 assembly code had a steering capability, which steered the clock slowly. To emulate that

[PATCH 1/2] vdso: allow to add architecture-specific vdso data

2020-08-02 Thread Sven Schnelle
arch_vdso_data'. This structure will be embedded in the generic vDSO data. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens --- arch/Kconfig| 3 +++ include/vdso/datapage.h | 7 +++ 2 files changed, 10 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 8cc35dc556c7

Re: [PATCH] perf: add psw_idle and psw_idle_exit to list of idle symbols

2020-08-03 Thread Sven Schnelle
Sven Schnelle writes: > Add the s390 idle functions so they don't show up in top when > using software sampling. > > Signed-off-by: Sven Schnelle > --- > tools/perf/util/symbol.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/perf/util/symbol.c

Re: [PATCH 1/2] vdso: allow to add architecture-specific vdso data

2020-08-03 Thread Sven Schnelle
Thomas Gleixner writes: > just a few nits. > > Can you please spare that #ifdef and do: > > #ifdef CONFIG_ARCH_HAS_VDSO_DATA > #include > #else > struct arch_vdso_data {}; > #endif Ok. > Please keep the tabular alignment of the struct members and add kernel > doc in the comment above the

Re: [PATCH 2/2] s390: convert to GENERIC_VDSO

2020-08-03 Thread Sven Schnelle
Thomas Gleixner writes: > Sven Schnelle writes: > >> - CPUCLOCK_VIRT is now handled with a syscall fallback, which might >> be slower/less accurate than the old implementation. > > I can understand the slower, but why does it become less accurate? Because we sav

Re: [GIT pull] locking/urgent for v5.10-rc6

2020-11-30 Thread Sven Schnelle
Hi Peter, Peter Zijlstra writes: > On Sun, Nov 29, 2020 at 11:31:41AM -0800, Linus Torvalds wrote: >> On Sun, Nov 29, 2020 at 5:38 AM Thomas Gleixner wrote: >> > >> > Yet two more places which invoke tracing from RCU disabled regions in the >> > idle path. Similar to the entry path the low

Re: [GIT pull] locking/urgent for v5.10-rc6

2020-11-30 Thread Sven Schnelle
Hi, Sven Schnelle writes: > Hi Peter, > > Peter Zijlstra writes: > >> On Sun, Nov 29, 2020 at 11:31:41AM -0800, Linus Torvalds wrote: >>> On Sun, Nov 29, 2020 at 5:38 AM Thomas Gleixner wrote: >>> > >>> > Yet two more places which invoke

Re: [GIT pull] locking/urgent for v5.10-rc6

2020-11-30 Thread Sven Schnelle
Hi Peter, Peter Zijlstra writes: > On Mon, Nov 30, 2020 at 01:52:11PM +0100, Peter Zijlstra wrote: >> On Mon, Nov 30, 2020 at 01:31:33PM +0100, Sven Schnelle wrote: >> > [0.670280] [ cut here ] >> > [0.670288] WARNING: CPU: 1 PID:

split up lockdep and syscall related functionailty in generic entry code

2020-12-01 Thread Sven Schnelle
i'm currently working on converting s390 to use the generic entry functionality. So far things are straigt-forward, there's only one slight problem. There is a syscall_enter_from_user_mode() which sets lockdep state and other initial stuff + does the entry work at the same time. This is a problem

[PATCH] entry: split lockdep and syscall work functions

2020-12-01 Thread Sven Schnelle
exit_to_user_mode(). Signed-off-by: Sven Schnelle --- include/linux/entry-common.h | 4 +++- kernel/entry/common.c| 35 +++ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index 474f29638d2c

Re: [PATCH 1/2] sched/idle: Fix arch_cpu_idle() vs tracing

2020-12-01 Thread Sven Schnelle
Peter Zijlstra writes: > On Mon, Nov 30, 2020 at 01:00:03PM -0800, Guenter Roeck wrote: >> On Fri, Nov 20, 2020 at 12:41:46PM +0100, Peter Zijlstra wrote: >> > We call arch_cpu_idle() with RCU disabled, but then use >> > local_irq_{en,dis}able(), which invokes tracing, which relies on RCU. >> >

Re: [PATCH 1/2] sched/idle: Fix arch_cpu_idle() vs tracing

2020-12-01 Thread Sven Schnelle
Hi Peter, Peter Zijlstra writes: > On Mon, Nov 30, 2020 at 01:00:03PM -0800, Guenter Roeck wrote: >> On Fri, Nov 20, 2020 at 12:41:46PM +0100, Peter Zijlstra wrote: >> > We call arch_cpu_idle() with RCU disabled, but then use >> > local_irq_{en,dis}able(), which invokes tracing, which relies on

[PATCH v2] split up lockdep and syscall related functionality in generic entry code

2020-12-01 Thread Sven Schnelle
this is v2 of the patch. I've split it up the to multiple ones, and added documentation. The first patch was basically a hack to demonstrate what i need, sorry for not sending a more cleaned up version. As additional explanation here's the content of the v1 cover letter: i'm currently working on

[PATCH v2 1/5] entry: rename enter_from_user_mode()

2020-12-01 Thread Sven Schnelle
In order to make this function publicly available rename it so it can still be inlined. An addtional enter_from_user_mode() function will be added with a later commit. Signed-off-by: Sven Schnelle --- kernel/entry/common.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH v2 5/5] entry: add syscall_exit_to_user_mode_work()

2020-12-01 Thread Sven Schnelle
This is the same as syscall_exit_to_user_mode() but without calling exit_to_user_mode(). This is useful if a syscall has to be restarted without leaving to user space. Signed-off-by: Sven Schnelle --- include/linux/entry-common.h | 9 + kernel/entry/common.c| 14

[PATCH v2 3/5] entry: add enter_from_user_mode() wrapper

2020-12-01 Thread Sven Schnelle
Can be called from architecture dependent code, and simply calls __enter_from_user_mode(). This way __enter_from_user_mode can still be inlined because it is declared static. Signed-off-by: Sven Schnelle --- include/linux/entry-common.h | 11 +++ kernel/entry/common.c| 15

[PATCH v2 2/5] entry: rename exit_from_user_mode()

2020-12-01 Thread Sven Schnelle
In order to make this function publicly available rename it so it can still be inlined. An additional exit_from_user_mode() function will be added with a later commit. Signed-off-by: Sven Schnelle --- kernel/entry/common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH v2 4/5] entry: add exit_to_user_mode() wrapper

2020-12-01 Thread Sven Schnelle
Can be called from architecture dependent code, and simply calls __exit_to_user_mode(). This way __exit_to_user_mode() can still be inlined because it is declared static. Signed-off-by: Sven Schnelle --- include/linux/entry-common.h | 15 +++ kernel/entry/common.c| 17

Re: [PATCH v2 2/5] entry: rename exit_from_user_mode()

2020-12-01 Thread Sven Schnelle
Sven Schnelle writes: > In order to make this function publicly available rename > it so it can still be inlined. An additional exit_from_user_mode() > function will be added with a later commit. That should of course be exit_to_user_mode() in the commit description... > Signed-

Re: [PATCH 0/2] More RCU vs idle fixes

2020-11-24 Thread Sven Schnelle
Peter Zijlstra writes: > Both arm64 and s390 are tripping over arch_cpu_idle() RCU,tracing,lockdep > interaction. While looking at that I also found fail in inte_idle. > > Please consider for this cycle. Is anyone taking this patchset? For s390, we also need to change the local_irq_safe/restore

Re: [PATCH v9 00/21] Generic page walk and ptdump

2019-07-31 Thread Sven Schnelle
Hi Steven, On Mon, Jul 29, 2019 at 12:32:25PM +0100, Steven Price wrote: > > parisc is more interesting and I'm not sure if this is necessarily > correct. I originally proposed a patch with the line "For parisc, we > don't support large pages, so add stubs returning 0" which got Acked by > Helge

Re: [PATCH] kprobes/parisc: remove arch_kprobe_on_func_entry()

2019-08-21 Thread Sven Schnelle
On Wed, Aug 21, 2019 at 09:56:40AM +, Jisheng Zhang wrote: > The common kprobes provides a weak implementation of > arch_kprobe_on_func_entry(). The parisc version is the same as the > common version, so remove it. > > Signed-off-by: Jisheng Zhang Acked-by: Sven Schnelle

Re: [PATCH] s390: add support for TIF_NOTIFY_SIGNAL

2020-11-03 Thread Sven Schnelle
Jens Axboe writes: > On 11/2/20 9:59 AM, Qian Cai wrote: >> On Sun, 2020-11-01 at 17:31 +, Heiko Carstens wrote: >>> On Thu, Oct 29, 2020 at 10:21:11AM -0600, Jens Axboe wrote: Wire up TIF_NOTIFY_SIGNAL handling for s390. Cc: linux-s...@vger.kernel.org Signed-off-by: Jens

Re: [PATCH] s390: add support for TIF_NOTIFY_SIGNAL

2020-11-03 Thread Sven Schnelle
Hi Jens, Heiko Carstens writes: > On Thu, Oct 29, 2020 at 10:21:11AM -0600, Jens Axboe wrote: >> Wire up TIF_NOTIFY_SIGNAL handling for s390. >> >> Cc: linux-s...@vger.kernel.org >> Signed-off-by: Jens Axboe >> --- >> >> 5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting >>

Re: [PATCH] s390: add support for TIF_NOTIFY_SIGNAL

2020-11-03 Thread Sven Schnelle
Hi Jens, Jens Axboe writes: > On 11/3/20 4:00 AM, Sven Schnelle wrote: >> Hi Jens, >> >> Heiko Carstens writes: >> >>> On Thu, Oct 29, 2020 at 10:21:11AM -0600, Jens Axboe wrote: >>>> Wire up TIF_NOTIFY_SIGNAL handling for s390. >>

Re: [PATCH] s390: allow reschedule on syscall restart

2021-01-26 Thread Sven Schnelle
Christian Borntraeger writes: > On 21.01.21 15:39, Sven Schnelle wrote: >> Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone >> within idle loop") from next-20210121 causes a warning because s390 >> doesn't call sched_resched_local_al

kprobes string reading broken on s390

2020-06-05 Thread Sven Schnelle
ically wrong. Regards, Sven commit 81408eab8fcc79dc0871a95462b13176d3446f5e Author: Sven Schnelle Date: Fri Jun 5 13:01:24 2020 +0200 kprobes: use strncpy_from_kernel_nofault() in fetch_store_string() Signed-off-by: Sven Schnelle diff --git a/kernel/trace/trace_kprobe.c b/kernel/trac

Re: kprobes string reading broken on s390

2020-06-05 Thread Sven Schnelle
t; > > > On Fri, Jun 05, 2020 at 01:05:34PM +0200, Sven Schnelle wrote: > > > Hi Christoph, > > > > > > with the latest linux-next i noticed that some tests in the > > > ftrace test suites are failing on s390, namely: > > > >

[PATCH] kprobes: use strncpy_from_kernel_nofault() in fetch_store_string()

2020-06-06 Thread Sven Schnelle
ser space fetch_store_string() -> read string from kernel space(?) but in the end both are using strncpy_from_user_nofault(), but fetch_store_string() should use strncpy_from_kernel_nofault(). Signed-off-by: Sven Schnelle Acked-by: Masami Hiramatsu Acked-by: Christoph Hellwig --- kernel/trace/tr

Re: net: tulip: de2104x: Checking a kmemdup() call in de21041_get_srom_info()

2019-10-12 Thread Sven Schnelle
On Sat, Oct 12, 2019 at 07:03:09PM +0200, Markus Elfring wrote: > Hello, > > I tried another script for the semantic patch language out. > This source code analysis approach points out that the implementation > of the function “de21041_get_srom_info” contains still an unchecked call > of the

Re: allow larger than require DMA masks

2019-09-23 Thread Sven Schnelle
Hi, On Fri, Feb 15, 2019 at 03:45:54PM +0100, Christoph Hellwig wrote: > Hi all, > > this series finishes off converting our dma mask model to split between > device capabilities (dev->dma_mask and dev->coherent_dma_mask) and system > limitations (dev->bus_dma_mask). We already accept larger

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-05-05 Thread Sven Schnelle
Hi, On Mon, May 04, 2020 at 08:40:44PM +0200, Christian Borntraeger wrote: > > > On 04.05.20 18:47, Oleg Nesterov wrote: > > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > > some architectures

Re: [PATCH -next] s390: Remove two unused inline functions

2020-05-11 Thread Sven Schnelle
long old_addr, > unsigned long addr) > { > -- > 2.17.1 Thanks for noticing, looks like i missed them. Acked-by: Sven Schnelle Sven

Re: [tracing] 06e0a548ba: WARNING:at_kernel/trace/ring_buffer.c:#ring_buffer_iter_peek

2020-05-13 Thread Sven Schnelle
Hi Steve, On Wed, May 13, 2020 at 09:29:22AM -0400, Steven Rostedt wrote: > On Wed, 13 May 2020 11:19:06 +0200 > Sven Schnelle wrote: > > > Did you had a chance to look into this? I can easily reproduce this both on > > x86 > > and s390 by doing: > > > &

Re: [tracing] 06e0a548ba: WARNING:at_kernel/trace/ring_buffer.c:#ring_buffer_iter_peek

2020-05-14 Thread Sven Schnelle
Hi Steve, On Wed, May 13, 2020 at 03:30:33PM -0400, Steven Rostedt wrote: > On Wed, 13 May 2020 18:15:57 +0200 > Sven Schnelle wrote: > > > Thanks for looking into this. I've attached my /proc/config.gz to this Mail. > > The x86 system is my Laptop which is a Thinkpad X280

Re: [PATCH -next] s390: Remove two unused inline functions

2020-05-12 Thread Sven Schnelle
Hi Joe, On Mon, May 11, 2020 at 01:38:57PM -0700, Joe Perches wrote: > Awhile back, I posted a list of apparently unused static inline > functions in .h files treewide found by a script: > > https://lore.kernel.org/lkml/4603e761a5f39f4d97375e1e08d20d720c526341.ca...@perches.com/ > > Here are

Re: [tracing] 06e0a548ba: WARNING:at_kernel/trace/ring_buffer.c:#ring_buffer_iter_peek

2020-05-13 Thread Sven Schnelle
Hi Steve, On Wed, Apr 29, 2020 at 05:05:09PM +0800, kernel test robot wrote: > > kern :warn : [ 886.763510] WARNING: CPU: 70 PID: 22584 at > kernel/trace/ring_buffer.c:4067 ring_buffer_iter_peek+0x13c/0x1d0 > kern :warn : [ 886.776216] Modules linked in: test_firmware intel_rapl_msr >

[PATCH] perf: add psw_idle and psw_idle_exit to list of idle symbols

2020-07-07 Thread Sven Schnelle
Add the s390 idle functions so they don't show up in top when using software sampling. Signed-off-by: Sven Schnelle --- tools/perf/util/symbol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 5ddf84dcbae7..d33d24c61d24 100644

[PATCH] kprobes: fix compilation when KPROBE_EVENTS is enabled without kretpobes

2019-04-06 Thread Sven Schnelle
on kretprobes i think they should be moved out of the #ifdef CONFIG_KRETPROBES block. Signed-off-by: Sven Schnelle Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Masami Hiramatsu --- kernel/kprobes.c | 39 --- 1 file ch

Re: [PATCH] kprobes: fix compilation when KPROBE_EVENTS is enabled without kretpobes

2019-04-06 Thread Sven Schnelle
Hi Naveen, On Sat, Apr 06, 2019 at 10:52:47PM +0530, Naveen N. Rao wrote: > Sven Schnelle wrote: > > While implementing kprobes on PA-RISC (without kretprobes) compilation > > fails when CONFIG_KPROBE_EVENTS is enabled: > > Thanks for working on that! Is there a speci

[PATCH] uprobes: add missing get_uprobe() in __find_uprobe()

2021-02-09 Thread Sven Schnelle
commit c6bc9bd06dff49fa4c("rbtree, uprobes: Use rbtree helpers") from next-20210208 accidentally removed the refcount increase. Add it again. Signed-off-by: Sven Schnelle --- kernel/events/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/u

Re: [PATCH] printk: fix buffer overflow potential for print_text()

2021-01-22 Thread Sven Schnelle
John Ogness writes: > Before commit b6cf8b3f3312 ("printk: add lockless ringbuffer"), > msg_print_text() would only write up to size-1 bytes into the > provided buffer. Some callers expect this behavior and append > a terminator to returned string. In particular: > >

Re: Is s390's new generic-using syscall code actually correct?

2021-03-30 Thread Sven Schnelle
y kentry patchset, and I encountered: >> > >> > commit 56e62a73702836017564eaacd5212e4d0fa1c01d >> > Author: Sven Schnelle >> > Date: Sat Nov 21 11:14:56 2020 +0100 >> > >> > s390: convert to generic entry >> > >> > As part of this work, I was

Re: Is s390's new generic-using syscall code actually correct?

2021-03-30 Thread Sven Schnelle
Sven Schnelle writes: > Hi Andy, > > Andy Lutomirski writes: > >> On Wed, Mar 24, 2021 at 10:39 AM Vasily Gorbik wrote: >>> >>> Hi Andy, >>> >>> On Sat, Mar 20, 2021 at 08:48:34PM -0700, Andy Lutomirski wrote: >>> > Hi all

Re: Is s390's new generic-using syscall code actually correct?

2021-03-29 Thread Sven Schnelle
Hi Andy, sorry for the late reply, i was away from kernel development for a few weeks. Andy Lutomirski writes: > Hi all- > > I'm working on my kentry patchset, and I encountered: > > commit 56e62a73702836017564eaacd5212e4d0fa1c01d > Author: Sven Schnelle > Date: Sat

Re: [PATCH v3 08/11] entry: Make CONFIG_DEBUG_ENTRY available outside x86

2021-03-29 Thread Sven Schnelle
Mark Rutland writes: > On Thu, Mar 04, 2021 at 11:06:01AM -0800, Andy Lutomirski wrote: >> In principle, the generic entry code is generic, and the goal is to use it >> in many architectures once it settles down more. Move CONFIG_DEBUG_ENTRY >> to the generic config so that it can be used in

Re: [RESEND][PATCH] tracing/synthetic: Fix order of struct trace_dynamic_info

2023-09-10 Thread Sven Schnelle
ef CONFIG_CPU_BIG_ENDIAN > - u16 offset; > u16 len; > + u16 offset; > #else > - u16 len; > u16 offset; > + u16 len; > #endif > -}; > +} __packed; > > /* > * The trace entry - the most basic unit of tracing. This is what This issue was also present on BE, but as you noted "covered" by the broken test case. With this patch everything works as expected. So: Tested-by: Sven Schnelle

Re: [PATCH v4 4/9] fprobe: rethook: Use ftrace_regs in fprobe exit handler and rethook

2023-09-11 Thread Sven Schnelle
Masami Hiramatsu (Google) writes: >> > IOW, it is ftrace save regs/restore regs code issue. I need to check how >> > the >> > function_graph implements it. >> >> gpr2-gpr14 are always saved in ftrace_caller/ftrace_regs_caller(), >> regardless of the FTRACE_WITH_REGS flags. The only difference

Re: [PATCH 4/5] kbuild: unify vdso_install rules

2023-10-10 Thread Sven Schnelle
ch/arm64/Makefile. > > vdso-install-$(CONFIG_COMPAT_VDSO) += > arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so > > This will rename vdso.so.dbg to vdso32.so during installation. If such > architectures change their implementation so that the file names match, > this workaround will go away. > > Signed-off-by: Masahiro Yamada > --- Acked-by: Sven Schnelle # s390

Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

2024-02-06 Thread Sven Schnelle
Hi Steven, Steven Rostedt writes: > On Tue, 06 Feb 2024 09:48:16 +0100 > Sven Schnelle wrote: > >> I added some logging, and the test is not triggering this issue. So i >> assume the default of 128 cmdline entries is just to small. Sorry for >> the noise. L

[PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

2024-02-04 Thread Sven Schnelle
fails in the 'test for function traceon/off triggers' test from the ftrace testsuite when the system is under load. Signed-off-by: Sven Schnelle --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index

Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

2024-02-05 Thread Sven Schnelle
Hi Steven, Steven Rostedt writes: > On Mon, 5 Feb 2024 07:53:40 +0100 > Sven Schnelle wrote: > >> tracer_tracing_is_on() checks whether record_disabled is not zero. This >> checks both the record_disabled counter and the RB_BUFFER_OFF flag. >> Reading the source

Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

2024-02-07 Thread Sven Schnelle
Steven Rostedt writes: > On Wed, 7 Feb 2024 13:07:36 +0100 > Mete Durlu wrote: > >> wouldn't the following scenario explain the behavior we are seeing. >> When using event triggers, trace uses lockless ringbuffer control paths. >> If cmdline update and trace output reading is happening on

Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

2024-02-05 Thread Sven Schnelle
Hi Steven, Steven Rostedt writes: > On Mon, 05 Feb 2024 14:16:30 +0100 > Sven Schnelle wrote: >> >> Another issue i'm hitting sometimes is this part: >> >> csum1=`md5sum trace` >> sleep $SLEEP_TIME >> csum2=`md5sum trace` >> >> if [

Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

2024-02-05 Thread Sven Schnelle
Steven Rostedt writes: > On Mon, 05 Feb 2024 14:16:30 +0100 > Sven Schnelle wrote: >> >> Another issue i'm hitting sometimes is this part: >> >> csum1=`md5sum trace` >> sleep $SLEEP_TIME >> csum2=`md5sum trace` >> >> if [ "$csum1"

Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on()

2024-02-06 Thread Sven Schnelle
Sven Schnelle writes: > Looking at trace_save_cmdline(): > > tpid = tsk->pid & (PID_MAX_DEFAULT - 1); where PID_MAX_DEFAULT = 0x8000 > > so this is basically > > tpid = tsk->pid & 0x7fff; > > further on: > > // might clash with other pid

[tip: core/entry] entry: Rename enter_from_user_mode()

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: e2391bd55155ca98293b1bbaa44aa2815d3d054f Gitweb: https://git.kernel.org/tip/e2391bd55155ca98293b1bbaa44aa2815d3d054f Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:51 +01:00

[tip: core/entry] entry: Add exit_to_user_mode() wrapper

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: 7918e4b844d1481c2200445f758bb2d1cd14346c Gitweb: https://git.kernel.org/tip/7918e4b844d1481c2200445f758bb2d1cd14346c Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:54 +01:00

[tip: core/entry] entry_Add_enter_from_user_mode_wrapper

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: 6546601d7e7c8da38f5d87204aa01f7b394f4fb3 Gitweb: https://git.kernel.org/tip/6546601d7e7c8da38f5d87204aa01f7b394f4fb3 Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:53 +01:00

[tip: core/entry] entry: Add syscall_exit_to_user_mode_work()

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: 1568b5540b3e6ff3fe43a2cf889cb777cf8149fc Gitweb: https://git.kernel.org/tip/1568b5540b3e6ff3fe43a2cf889cb777cf8149fc Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:55 +01:00

[tip: core/entry] entry: Rename exit_to_user_mode()

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: f052615ca0112378c3571fc9662bbbcd18cf6b8d Gitweb: https://git.kernel.org/tip/f052615ca0112378c3571fc9662bbbcd18cf6b8d Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:52 +01:00

[tip: core/entry] entry: Add syscall_exit_to_user_mode_work()

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: c6156e1da633f241e132eaea3b676d674376d770 Gitweb: https://git.kernel.org/tip/c6156e1da633f241e132eaea3b676d674376d770 Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:55 +01:00

[tip: core/entry] entry: Rename exit_to_user_mode()

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: bb793562f0da7317adf6c456316bca651ff46f5d Gitweb: https://git.kernel.org/tip/bb793562f0da7317adf6c456316bca651ff46f5d Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:52 +01:00

[tip: core/entry] entry_Add_enter_from_user_mode_wrapper

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: 96e2fbccd0fc806364a964fdf072bfc858a66109 Gitweb: https://git.kernel.org/tip/96e2fbccd0fc806364a964fdf072bfc858a66109 Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:53 +01:00

[tip: core/entry] entry: Rename enter_from_user_mode()

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: bb714fb3bc7b2e8be72b9c92f2d8a89ea2dc Gitweb: https://git.kernel.org/tip/bb714fb3bc7b2e8be72b9c92f2d8a89ea2dc Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:51 +01:00

[tip: core/entry] entry: Add exit_to_user_mode() wrapper

2020-12-02 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the core/entry branch of tip: Commit-ID: 310de1a678b2184c078c593dae343cb79c807f8d Gitweb: https://git.kernel.org/tip/310de1a678b2184c078c593dae343cb79c807f8d Author:Sven Schnelle AuthorDate:Tue, 01 Dec 2020 15:27:54 +01:00

[tip: timers/urgent] lib/vdso: Allow to add architecture-specific vdso data

2020-08-06 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the timers/urgent branch of tip: Commit-ID: d60d7de3e16d7cea998bad17d87366a359625894 Gitweb: https://git.kernel.org/tip/d60d7de3e16d7cea998bad17d87366a359625894 Author:Sven Schnelle AuthorDate:Tue, 04 Aug 2020 17:01:22 +02:00

[tip: locking/core] s390: Use arch_local_irq_{save,restore}() in early boot code

2021-02-10 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the locking/core branch of tip: Commit-ID: b38085ba60246fccc2f49d2ac162528dedbc4e71 Gitweb: https://git.kernel.org/tip/b38085ba60246fccc2f49d2ac162528dedbc4e71 Author:Sven Schnelle AuthorDate:Wed, 10 Feb 2021 14:24:16 +01:00

[tip: sched/core] uprobes: (Re)add missing get_uprobe() in __find_uprobe()

2021-02-10 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the sched/core branch of tip: Commit-ID: 2c3496a02cb06ffe957854d8488a5799d7bfb252 Gitweb: https://git.kernel.org/tip/2c3496a02cb06ffe957854d8488a5799d7bfb252 Author:Sven Schnelle AuthorDate:Tue, 09 Feb 2021 16:07:11 +01:00

[tip: sched/core] uprobes: (Re)add missing get_uprobe() in __find_uprobe()

2021-02-17 Thread tip-bot2 for Sven Schnelle
The following commit has been merged into the sched/core branch of tip: Commit-ID: b0d6d4789677d128b1933af023083054f0973574 Gitweb: https://git.kernel.org/tip/b0d6d4789677d128b1933af023083054f0973574 Author:Sven Schnelle AuthorDate:Tue, 09 Feb 2021 16:07:11 +01:00