[PATCH] staging: wlan-ng: fix checkpatch.pl code style warnings

2017-03-11 Thread Andrii
Fixed code style warnings reported by checkpatch.pl script. Signed-off-by: Andrii Vladyka diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 6134eba..d7d2d13 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng

[PATCHv2] staging: wlan-ng: fix avoid multiple line dereference warning reported by checkpatch.pl

2017-03-12 Thread Andrii
Fixed three code style warnings (multiple line dereference) reported by checkpatch.pl script. Signed-off-by: Andrii Vladyka diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 6134eba..a050748 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b

Re: [PATCHv2] staging: wlan-ng: fix avoid multiple line dereference warning reported by checkpatch.pl

2017-03-12 Thread Andrii
On Sun, 12 Mar 2017 16:42:07 +0100 Greg KH wrote: > On Sun, Mar 12, 2017 at 05:30:09PM +0200, Andrii wrote: > > Fixed three code style warnings (multiple line dereference) reported > > by checkpatch.pl script. > > > > Signed-off-by: Andrii Vladyka > > >

[PATCH] staging: rtl8188eu: fix unnecessary parentheses, multiple blank lines, spaces around '&' reported by checkpatch.pl

2017-03-12 Thread Andrii
Signed-off-by: Andrii Vladyka diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 255c30e..b324429 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -30,7 +30,6 @@ void init_mlme_ap_info(struct

[PATCH] staging: rtl8188eu: fix multiple blank lines coding style problem

2017-03-12 Thread Andrii
Signed-off-by: Andrii Vladyka diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 255c30e..3fa6af2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -30,7 +30,6 @@ void init_mlme_ap_info(struct

[PATCH] staging: rtl8188eu: removed blank lines coding style problem

2017-03-13 Thread Andrii
Fix 'multiple blank lines' coding style problem reported by checkpatch.pl. Signed-off-by: Andrii Vladyka diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 255c30e..3fa6af2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drive

[PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()

2017-12-06 Thread Andrii
Change 0 to NULL in lov_object_fiemap() in order to fix warning produced by sparse Signed-off-by: Andrii Vladyka Signed-off-by: Andreas Dilger diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index 105b707..897cf2c 100644 --- a

Re: [PATCH] net: dccp: Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv()

2017-08-30 Thread Andrii
I'll fix and re-send. Thanks. On 8/31/2017 8:16 AM, David Miller wrote: From: Andrii Vladyka Date: Wed, 30 Aug 2017 09:04:35 +0300 + if (opt_skb) Trailing whitespace. @@ -653,6 +647,36 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff

[PATCH] net: dccp: Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv()

2017-08-30 Thread Andrii
Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv() in net/dccp/ipv6.c, similar to the handling in net/ipv6/tcp_ipv6.c Signed-off-by: Andrii Vladyka --- diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 1b58eac..35c2edb 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -16,6 +16,7

Re: [PATCH] staging: irda: annotate irlan_seq_start() and irlan_seq_stop() for sparse

2017-11-28 Thread Andrii
On 11/28/2017 3:05 PM, Greg KH wrote: On Tue, Nov 28, 2017 at 02:45:25PM +0200, Andrii Vladyka wrote: Annotate rcu_read_lock in irlan_seq_start() and rcu_read_unlock in irlan_seq_stop() for sparse Signed-off-by: Andrii Vladyka https://e.mail.ru/compose?To=tu...@mail.ru>> Something went

[PATCH v1 0/2] PM / AVS: interrupt handling fixes

2013-07-12 Thread Andrii Tseglytskyi
Hi Kevin, Could you please take a look to the following patch series. It consists of two patches, which are needed for proper SmartReflex Interrupt handling. Based on Linux v3.10. Verified on OMAP4430. Thank you in advance. Regards, Andrii Nishanth Menon (2): PM / AVS: SmartReflex: fix

[PATCH v1 1/2] PM / AVS: SmartReflex: fix interrupt disable sequence

2013-07-12 Thread Andrii Tseglytskyi
Reflex AVS block. Reported-by: Honda Kenji Reported-by: Maki Tanaka Signed-off-by: Nishanth Menon Signed-off-by: Andrii Tseglytskyi --- drivers/power/avs/smartreflex.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/power/avs/smartreflex.c b/drivers

[PATCH v1 2/2] PM / AVS: SmartReflex: disable spamming interrupts

2013-07-12 Thread Andrii Tseglytskyi
condition applies when a notifier does not exist OR is unable to handle the interrupt as well. Signed-off-by: Nishanth Menon Signed-off-by: Andrii Tseglytskyi --- drivers/power/avs/smartreflex.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH v2 2/2] PM / AVS: SmartReflex/class3: Fix order of initialization of SR class and SR driver

2013-06-12 Thread Andrii Tseglytskyi
On 06/12/2013 04:32 PM, Tony Lindgren wrote: * Kevin Hilman [130610 10:58]: Andrii Tseglytskyi writes: SmartReflex consists of three entities: SR device, SR class and SR driver. SmartReflex driver depends on SmartReflex class, but order of their initialization is not clear. They both use

[PATCH v2 0/2] PM / AVS: SmartReflex: optimization series

2013-06-04 Thread Andrii Tseglytskyi
#define removed from "PM / AVS: SmartReflex: use devm_* API to initialize SmartReflex" - rebased to v3.10-rc4 Andrii Tseglytskyi (2): PM / AVS: SmartReflex: use devm_* API to initialize SmartReflex PM / AVS: SmartReflex/class3: Fix order of initialization of SR class and SR driver

[PATCH v2 1/2] PM / AVS: SmartReflex: use devm_* API to initialize SmartReflex

2013-06-04 Thread Andrii Tseglytskyi
Use of of devm_* API for resource allocation provides benefits such as auto handling of resource free. This reduces possibility have memory leaks in case of wrong error handling. All direct release calls should be removed to avoid races. Reported-by: Grygorii Strashko Signed-off-by: Andrii

[PATCH v2 2/2] PM / AVS: SmartReflex/class3: Fix order of initialization of SR class and SR driver

2013-06-04 Thread Andrii Tseglytskyi
(), and removes redundant call of sr_late_init(). This provides predictable order of SmartReflex initcalls: 1. device_initcall() -> SmartReflex class init 2. late_initcall() -> SmartReflex driver init Signed-off-by: Andrii Tseglytskyi --- arch/arm/mach-omap2/smartreflex-class3.c

Re: [PATCH v1 1/3] PM / AVS: SmartReflex: disable errgen before vpbound disable

2013-05-29 Thread Andrii Tseglytskyi
On 05/29/2013 12:58 PM, Andrii Tseglytskyi wrote: Hi Kevin, Thanks a lot for your comments. On 05/28/2013 09:45 PM, Kevin Hilman wrote: Andrii Tseglytskyi writes: From: Nishanth Menon vpboundsintr_en is available inside the IP block as an re-sycned version and one which is not. Due to

[PATCH v2 0/3] PM / AVS: SmartReflex: driver misc fixes

2013-05-30 Thread Andrii Tseglytskyi
-rc3 - minor comment update in "disable errgen before vpbound disable" patch Andrii Tseglytskyi (2): PM / AVS: SmartReflex: disable runtime PM on driver remove PM / AVS: SmartReflex: fix driver name Nishanth Menon (1): PM / AVS: SmartReflex: disable errgen before vpbound disable

[PATCH v2 3/3] PM / AVS: SmartReflex: fix driver name

2013-05-30 Thread Andrii Tseglytskyi
DRIVER_NAME was undefined for SmartReflex. Now it is defined with valid value "smartreflex". It is needed to define proper value for: MODULE_ALIAS("platform:" DRIVER_NAME); Signed-off-by: Andrii Tseglytskyi Acked-by: Nishanth Menon --- drivers/power/avs/smartreflex.c |3

[PATCH v2 1/3] PM / AVS: SmartReflex: disable errgen before vpbound disable

2013-05-30 Thread Andrii Tseglytskyi
From: Nishanth Menon vpboundsintr_en is available inside the IP block as an re-sycned version and one which is not. Due to this, there is an 1 sysclk cycle window where the SR_SInterruptz signal could be asserted low. IF, intr_en is cleared on the exact same cycle as the irqclr, an additional pul

[PATCH v2 2/3] PM / AVS: SmartReflex: disable runtime PM on driver remove

2013-05-30 Thread Andrii Tseglytskyi
Runtime PM should be disabled for device on driver remove, otherwise runtime PM will be not balanced, and this will cause an error message, on next driver probe. Signed-off-by: Andrii Tseglytskyi Acked-by: Nishanth Menon --- drivers/power/avs/smartreflex.c |1 + 1 file changed, 1 insertion

[PATCH v1 0/2] PM / AVS: SmartReflex: optimization series

2013-05-30 Thread Andrii Tseglytskyi
Available on GitHub: https://github.com/andriit/linux-omap-k3.8/commits/avs_sr_driver_optimization_v02 Andrii Tseglytskyi (2): PM / AVS: SmartReflex: use devm_* API to initialize SmartReflex PM / AVS: SmartReflex/class3: Fix order of initialization of SR class and SR driver arch/arm/mach

[PATCH v1 1/2] PM / AVS: SmartReflex: use devm_* API to initialize SmartReflex

2013-05-30 Thread Andrii Tseglytskyi
Use of of devm_* API for resource allocation provides benefits such as auto handling of resource free. This reduces possibility have memory leaks in case of wrong error handling. All direct release calls should be removed to avoid races. Reported-by: Grygorii Strashko Signed-off-by: Andrii

[PATCH v1 2/2] PM / AVS: SmartReflex/class3: Fix order of initialization of SR class and SR driver

2013-05-30 Thread Andrii Tseglytskyi
(), and removes redundant call of sr_late_init(). This provides predictable order of SmartReflex initcalls: 1. device_initcall() -> SmartReflex class init 2. late_initcall() -> SmartReflex driver init Signed-off-by: Andrii Tseglytskyi --- arch/arm/mach-omap2/smartreflex-class3.c

Re: [RFC v1] regulator: core: introduce regulator chain locking scheme

2013-04-15 Thread Andrii Tseglytskyi
|-->set_voltage(smps123) Where smps123 is a regulator, connected ot i2c bus. In this particular case "regulator chain" guarantees proper order of calls of voltage scaling sequence. Regards, Andrii -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&q

[PATCH v1 0/3] PM / AVS: SmartReflex: driver misc fixes

2013-05-27 Thread Andrii Tseglytskyi
://github.com/andriit/linux-omap-k3.8/commits/avs_sr_driver_misc_fixes_v01 Andrii Tseglytskyi (2): PM / AVS: SmartReflex: disable runtime PM on driver remove PM / AVS: SmartReflex: fix driver name Nishanth Menon (1): PM / AVS: SmartReflex: disable errgen before vpbound disable drivers/power/avs

[PATCH v1 1/3] PM / AVS: SmartReflex: disable errgen before vpbound disable

2013-05-27 Thread Andrii Tseglytskyi
From: Nishanth Menon vpboundsintr_en is available inside the IP block as an re-sycned version and one which is not. Due to this, there is an 1 sysclk cycle window where interruptz could be asserted low for 1 cycle. IF, intr_en is cleared on the exact same cycle as the irqclr, an additional pulse

[PATCH v1 3/3] PM / AVS: SmartReflex: fix driver name

2013-05-27 Thread Andrii Tseglytskyi
DRIVER_NAME was undefined for SmartReflex. Now it is defined with valid value "smartreflex". It is needed to define proper value for: MODULE_ALIAS("platform:" DRIVER_NAME); Signed-off-by: Andrii Tseglytskyi Acked-by: Nishanth Menon --- drivers/power/avs/smartreflex.c |3

[PATCH v1 2/3] PM / AVS: SmartReflex: disable runtime PM on driver remove

2013-05-27 Thread Andrii Tseglytskyi
Runtime PM should be disabled for device on driver remove, otherwise runtime PM will be not balanced, and this will cause an error message, on next driver probe. Signed-off-by: Andrii Tseglytskyi Acked-by: Nishanth Menon --- drivers/power/avs/smartreflex.c |1 + 1 file changed, 1 insertion

[PATCH v1 0/3] PM / AVS: SmartReflex: use omap_sr * for class interfaces

2013-05-27 Thread Andrii Tseglytskyi
GitHub: https://github.com/andriit/linux-omap-k3.8/commits/avs_sr_driver_std_class_interfaces_v01 Andrii Tseglytskyi (3): PM / AVS: SmartReflex: use omap_sr * for errgen interfaces PM / AVS: SmartReflex: use omap_sr * for minmax interfaces PM / AVS: SmartReflex: use omap_sr * for enable/disable

[PATCH v1 2/3] PM / AVS: SmartReflex: use omap_sr * for minmax interfaces

2013-05-27 Thread Andrii Tseglytskyi
omap_sr* as input parameter. Signed-off-by: Andrii Tseglytskyi Acked-by: Nishanth Menon --- drivers/power/avs/smartreflex.c | 14 +++--- include/linux/power/smartreflex.h |2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/power/avs/smartreflex.c b

[PATCH v1 3/3] PM / AVS: SmartReflex: use omap_sr * for enable/disable interface

2013-05-27 Thread Andrii Tseglytskyi
struct omap_sr* as input parameter. Signed-off-by: Andrii Tseglytskyi Acked-by: Nishanth Menon --- arch/arm/mach-omap2/smartreflex-class3.c |4 ++-- drivers/power/avs/smartreflex.c | 23 +++ include/linux/power/smartreflex.h|4 ++-- 3 files changed, 15

[PATCH v1 1/3] PM / AVS: SmartReflex: use omap_sr * for errgen interfaces

2013-05-27 Thread Andrii Tseglytskyi
SmartReflex enable/disable sequence. Now they take struct omap_sr* as input parameter. Signed-off-by: Andrii Tseglytskyi Acked-by: Nishanth Menon --- arch/arm/mach-omap2/smartreflex-class3.c |4 ++-- drivers/power/avs/smartreflex.c | 26 +- include/linux/power

Re: [PATCH v1 1/3] PM / AVS: SmartReflex: disable errgen before vpbound disable

2013-05-29 Thread Andrii Tseglytskyi
Hi Kevin, Thanks a lot for your comments. On 05/28/2013 09:45 PM, Kevin Hilman wrote: Andrii Tseglytskyi writes: From: Nishanth Menon vpboundsintr_en is available inside the IP block as an re-sycned version and one which is not. Due to this, there is an 1 sysclk cycle window where

Re: [PATCH v1 0/3] PM / AVS: SmartReflex: driver misc fixes

2013-05-29 Thread Andrii Tseglytskyi
On 05/29/2013 12:03 AM, Kevin Hilman wrote: Andrii Tseglytskyi writes: The following patch series contain several misc fixes to SmartReflex driver: 1. disable errgen before vpbound disable. Critical fix, needed for proper work of AVS-VP communicaton protocol. 2. disable runtime PM on driver

net: core: fix module type in sock_diag_bind

2018-01-08 Thread Andrii Vladyka
Use AF_INET6 instead of AF_INET in IPv6-related code path\ Signed-off-by: Andrii Vladyka --- net/core/sock_diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c index 217f4e3..146b50e 100644 --- a/net/core/sock_diag.c +++ b/net

[PATCH] net: core: fix module type in sock_diag_bind

2018-01-08 Thread Andrii Vladyka
Use AF_INET6 instead of AF_INET in IPv6-related code path Signed-off-by: Andrii Vladyka --- net/core/sock_diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c index 217f4e3..146b50e 100644 --- a/net/core/sock_diag.c +++ b/net

[PATCH bpf-next 0/3] uprobes: two common case speed ups

2024-03-12 Thread Andrii Nakryiko
on. Thanks. Andrii Nakryiko (3): uprobes: encapsulate preparation of uprobe args buffer uprobes: prepare uprobe args buffer lazily uprobes: add speculative lockless system-wide uprobe filter check kernel/trace/trace_uprobe.c | 103 ++-- 1 file changed, 63 inserti

[PATCH bpf-next 1/3] uprobes: encapsulate preparation of uprobe args buffer

2024-03-12 Thread Andrii Nakryiko
duplicated across uprobe_dispatcher and uretprobe_dispatcher, and now will be centralized. All this is also in preparation to make this uprobe_cpu_buffer handling logic optional in the next patch. Signed-off-by: Andrii Nakryiko --- kernel/trace/trace_uprobe.c | 75

[PATCH bpf-next 2/3] uprobes: prepare uprobe args buffer lazily

2024-03-12 Thread Andrii Nakryiko
ger.c Signed-off-by: Andrii Nakryiko --- kernel/trace/trace_uprobe.c | 56 ++--- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index a0f60bb10158..f2875349d124 100644 --- a/kernel/

[PATCH bpf-next 3/3] uprobes: add speculative lockless system-wide uprobe filter check

2024-03-12 Thread Andrii Nakryiko
kernel without any of the changes in this patch set. As can be seen, we get about 4% - 10% speed up, in total, with both lazy uprobe buffer and speculative filter check optimizations. Signed-off-by: Andrii Nakryiko --- kernel/trace/trace_uprobe.c | 4 1 file changed, 4 insertions(+) diff --

Re: [PATCH bpf-next 1/3] uprobes: encapsulate preparation of uprobe args buffer

2024-03-13 Thread Andrii Nakryiko
On Wed, Mar 13, 2024 at 8:16 AM Oleg Nesterov wrote: > > LGTM, one nit below. > > On 03/12, Andrii Nakryiko wrote: > > > > +static struct uprobe_cpu_buffer *prepare_uprobe_buffer(struct trace_uprobe > > *tu, > > +

Re: [PATCH bpf-next 2/3] uprobes: prepare uprobe args buffer lazily

2024-03-13 Thread Andrii Nakryiko
On Wed, Mar 13, 2024 at 8:48 AM Oleg Nesterov wrote: > > Again, looks good to me, but I have a minor nit. Feel free to ignore. > > On 03/12, Andrii Nakryiko wrote: > > > > static void __uprobe_trace_func(struct trace_uprobe *tu, > >

Re: [PATCH bpf-next 3/3] uprobes: add speculative lockless system-wide uprobe filter check

2024-03-13 Thread Andrii Nakryiko
independent from all this). > > On 03/12, Andrii Nakryiko wrote: > > > > This patch adds a speculative check before grabbing that rwlock. If > > nr_systemwide is non-zero, lock is skipped and event is passed through. > > From examining existing logic it looks correct

Re: [PATCH bpf-next 0/3] uprobes: two common case speed ups

2024-03-13 Thread Andrii Nakryiko
On Wed, Mar 13, 2024 at 2:41 AM Jiri Olsa wrote: > > On Tue, Mar 12, 2024 at 02:02:30PM -0700, Andrii Nakryiko wrote: > > This patch set implements two speed ups for uprobe/uretprobe runtime > > execution > > path for some common scenarios: BPF-only uprobes (patches #

[PATCH v2 0/3] uprobes: two common case speed ups

2024-03-18 Thread Andrii Nakryiko
of tracing tree, hopefully I guessed right; - simplified user_cpu_buffer usage further (Oleg Nesterov); - simplified patch #3, just moved speculative check outside of lock (Oleg); - added Reviewed-by from Jiri Olsa. Andrii Nakryiko (3): uprobes: encapsulate preparation of uprobe args buf

[PATCH v2 1/3] uprobes: encapsulate preparation of uprobe args buffer

2024-03-18 Thread Andrii Nakryiko
duplicated across uprobe_dispatcher and uretprobe_dispatcher, and now will be centralized. All this is also in preparation to make this uprobe_cpu_buffer handling logic optional in the next patch. Reviewed-by: Jiri Olsa Signed-off-by: Andrii Nakryiko --- kernel/trace/trace_uprobe.c | 78

[PATCH v2 2/3] uprobes: prepare uprobe args buffer lazily

2024-03-18 Thread Andrii Nakryiko
ger.c Reviewed-by: Jiri Olsa Signed-off-by: Andrii Nakryiko --- kernel/trace/trace_uprobe.c | 49 + 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 9bffaab448a6..b5da95240a31 100644

[PATCH v2 3/3] uprobes: add speculative lockless system-wide uprobe filter check

2024-03-18 Thread Andrii Nakryiko
ilter check optimizations. [0] https://lore.kernel.org/bpf/20240313131926.ga19...@redhat.com/ Reviewed-by: Jiri Olsa Signed-off-by: Andrii Nakryiko --- kernel/trace/trace_uprobe.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/

Re: [PATCH v2 0/3] uprobes: two common case speed ups

2024-03-19 Thread Andrii Nakryiko
On Mon, Mar 18, 2024 at 9:21 PM Masami Hiramatsu wrote: > > Hi, > > On Mon, 18 Mar 2024 11:17:25 -0700 > Andrii Nakryiko wrote: > > > This patch set implements two speed ups for uprobe/uretprobe runtime > > execution > > path for some common scenarios: BPF-

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-03-21 Thread Andrii Nakryiko
, I think we'll want to backport this ASAP to some of the old kernels we have. Thanks! Acked-by: Andrii Nakryiko > > This change has been tested against production workloads that exhibit > significant contention on the spinlock and an almost order of magnitude > reduction for

Re: raw_tp+cookie is buggy. Was: [syzbot] [bpf?] [trace?] KASAN: slab-use-after-free Read in bpf_trace_run1

2024-03-25 Thread Andrii Nakryiko
On Sun, Mar 24, 2024 at 5:07 PM Alexei Starovoitov wrote: > > Hi Andrii, > > syzbot found UAF in raw_tp cookie series in bpf-next. > Reverting the whole merge > 2e244a72cd48 ("Merge branch 'bpf-raw-tracepoint-support-for-bpf-cookie'") > > fixes the is

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-03-25 Thread Andrii Nakryiko
On Mon, Mar 25, 2024 at 12:12 PM Jonthan Haslam wrote: > > Hi Ingo, > > > > This change has been tested against production workloads that exhibit > > > significant contention on the spinlock and an almost order of magnitude > > > reduction for mean uprobe execution time is observed (28 -> 3.5 > >

Re: raw_tp+cookie is buggy. Was: [syzbot] [bpf?] [trace?] KASAN: slab-use-after-free Read in bpf_trace_run1

2024-03-25 Thread Andrii Nakryiko
On Mon, Mar 25, 2024 at 10:27 AM Andrii Nakryiko wrote: > > On Sun, Mar 24, 2024 at 5:07 PM Alexei Starovoitov > wrote: > > > > Hi Andrii, > > > > syzbot found UAF in raw_tp cookie series in bpf-next. > > Reverting the whole merge > > 2e244a72cd48 (

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-03-26 Thread Andrii Nakryiko
On Sun, Mar 24, 2024 at 8:03 PM Masami Hiramatsu wrote: > > On Thu, 21 Mar 2024 07:57:35 -0700 > Jonathan Haslam wrote: > > > Active uprobes are stored in an RB tree and accesses to this tree are > > dominated by read operations. Currently these accesses are serialized by > > a spinlock but this

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-03-27 Thread Andrii Nakryiko
On Wed, Mar 27, 2024 at 5:18 PM Masami Hiramatsu wrote: > > On Wed, 27 Mar 2024 17:06:01 + > Jonthan Haslam wrote: > > > > > Masami, > > > > > > > > Given the discussion around per-cpu rw semaphore and need for > > > > (internal) batched attachment API for uprobes, do you think you can > > >

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-03-29 Thread Andrii Nakryiko
On Wed, Mar 27, 2024 at 5:45 PM Andrii Nakryiko wrote: > > On Wed, Mar 27, 2024 at 5:18 PM Masami Hiramatsu wrote: > > > > On Wed, 27 Mar 2024 17:06:01 + > > Jonthan Haslam wrote: > > > > > > > Masami, > > > > > > > &

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-03-29 Thread Andrii Nakryiko
On Fri, Mar 29, 2024 at 5:36 PM Masami Hiramatsu wrote: > > On Fri, 29 Mar 2024 10:33:57 -0700 > Andrii Nakryiko wrote: > > > On Wed, Mar 27, 2024 at 5:45 PM Andrii Nakryiko > > wrote: > > > > > > On Wed, Mar 27, 2024 at 5:18 PM Masami Hiramatsu &

Re: [PATCHv2 1/3] uprobe: Add uretprobe syscall to speed up return probe

2024-04-03 Thread Andrii Nakryiko
On Wed, Apr 3, 2024 at 7:09 AM Masami Hiramatsu wrote: > > On Wed, 3 Apr 2024 11:47:41 +0200 > Jiri Olsa wrote: > > > On Wed, Apr 03, 2024 at 10:07:08AM +0900, Masami Hiramatsu wrote: > > > Hi Jiri, > > > > > > On Tue, 2 Apr 2024 11:33:00 +0200 > > > Jiri Olsa wrote: > > > > > > > Adding uretpr

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-04-03 Thread Andrii Nakryiko
On Wed, Apr 3, 2024 at 4:05 AM Jonthan Haslam wrote: > > > > > > Given the discussion around per-cpu rw semaphore and need for > > > > > (internal) batched attachment API for uprobes, do you think you can > > > > > apply this patch as is for now? We can then gain initial improvements > > > > > in

Re: [PATCHv2 1/3] uprobe: Add uretprobe syscall to speed up return probe

2024-04-03 Thread Andrii Nakryiko
On Wed, Apr 3, 2024 at 5:58 PM Masami Hiramatsu wrote: > > On Wed, 3 Apr 2024 09:58:12 -0700 > Andrii Nakryiko wrote: > > > On Wed, Apr 3, 2024 at 7:09 AM Masami Hiramatsu wrote: > > > > > > On Wed, 3 Apr 2024 11:47:41 +0200 > > > Jiri Olsa wrote

Re: [PATCHv2 1/3] uprobe: Add uretprobe syscall to speed up return probe

2024-04-18 Thread Andrii Nakryiko
On Mon, Apr 15, 2024 at 1:25 AM Jiri Olsa wrote: > > On Tue, Apr 02, 2024 at 11:33:00AM +0200, Jiri Olsa wrote: > > SNIP > > > #include > > #include > > @@ -308,6 +309,88 @@ static int uprobe_init_insn(struct arch_uprobe > > *auprobe, struct insn *insn, bool > > } > > > > #ifdef CONFIG_X86_

Re: [PATCH v9 29/36] bpf: Enable kprobe_multi feature if CONFIG_FPROBE is enabled

2024-04-25 Thread Andrii Nakryiko
On Mon, Apr 15, 2024 at 6:22 AM Masami Hiramatsu (Google) wrote: > > From: Masami Hiramatsu (Google) > > Enable kprobe_multi feature if CONFIG_FPROBE is enabled. The pt_regs is > converted from ftrace_regs by ftrace_partial_regs(), thus some registers > may always returns 0. But it should be enou

Re: [PATCH v9 36/36] fgraph: Skip recording calltime/rettime if it is not nneeded

2024-04-25 Thread Andrii Nakryiko
On Mon, Apr 15, 2024 at 6:25 AM Masami Hiramatsu (Google) wrote: > > From: Masami Hiramatsu (Google) > > Skip recording calltime and rettime if the fgraph_ops does not need it. > This is a kind of performance optimization for fprobe. Since the fprobe > user does not use these entries, recording t

Re: [PATCH v9 00/36] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2024-04-25 Thread Andrii Nakryiko
On Mon, Apr 15, 2024 at 5:49 AM Masami Hiramatsu (Google) wrote: > > Hi, > > Here is the 9th version of the series to re-implement the fprobe on > function-graph tracer. The previous version is; > > https://lore.kernel.org/all/170887410337.564249.6360118840946697039.stgit@devnote2/ > > This versio

Re: [PATCHv3 bpf-next 1/7] uprobe: Wire up uretprobe system call

2024-04-26 Thread Andrii Nakryiko
4 files changed, 9 insertions(+), 1 deletion(-) > LGTM Acked-by: Andrii Nakryiko > diff --git a/arch/x86/entry/syscalls/syscall_64.tbl > b/arch/x86/entry/syscalls/syscall_64.tbl > index 7e8d46f4147f..af0a33ab06ee 100644 > --- a/arch/x86/entry/syscalls/syscall_64.tbl > +++ b/arch

Re: [PATCHv3 bpf-next 2/7] uprobe: Add uretprobe syscall to speed up return probe

2024-04-26 Thread Andrii Nakryiko
ults above. > > The uprobe (and uretprobe) kind is determined by which instruction > is being patched with breakpoint instruction. That's also important > for uretprobes, because uprobe is installed for each uretprobe. > > The performance test is part of bpf selftests: > tools/

Re: [PATCHv3 bpf-next 5/7] selftests/bpf: Add uretprobe syscall call from user space test

2024-04-26 Thread Andrii Nakryiko
See nits below, but overall LGTM Acked-by: Andrii Nakryiko [...] > @@ -219,6 +301,11 @@ static void test_uretprobe_regs_change(void) > { > test__skip(); > } > + > +static void test_uretprobe_syscall_call(void) > +{ > + test__skip(); > +} >

Re: [PATCHv3 bpf-next 6/7] selftests/bpf: Add uretprobe compat test

2024-04-26 Thread Andrii Nakryiko
On Sun, Apr 21, 2024 at 12:43 PM Jiri Olsa wrote: > > Adding test that adds return uprobe inside 32 bit task > and verify the return uprobe and attached bpf programs > get properly executed. > > Signed-off-by: Jiri Olsa > --- > tools/testing/selftests/bpf/.gitignore| 1 + > tools/testin

Re: [PATCHv3 bpf-next 5/7] selftests/bpf: Add uretprobe syscall call from user space test

2024-04-29 Thread Andrii Nakryiko
On Mon, Apr 29, 2024 at 12:33 AM Jiri Olsa wrote: > > On Fri, Apr 26, 2024 at 11:03:29AM -0700, Andrii Nakryiko wrote: > > On Sun, Apr 21, 2024 at 12:43 PM Jiri Olsa wrote: > > > > > > Adding test to verify that when called from outside of the > > > tramp

Re: [PATCHv3 bpf-next 6/7] selftests/bpf: Add uretprobe compat test

2024-04-29 Thread Andrii Nakryiko
On Mon, Apr 29, 2024 at 12:39 AM Jiri Olsa wrote: > > On Fri, Apr 26, 2024 at 11:06:53AM -0700, Andrii Nakryiko wrote: > > On Sun, Apr 21, 2024 at 12:43 PM Jiri Olsa wrote: > > > > > > Adding test that adds return uprobe inside 32 bit task > > > and ve

Re: [PATCH v9 00/36] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2024-04-29 Thread Andrii Nakryiko
On Mon, Apr 29, 2024 at 6:51 AM Masami Hiramatsu wrote: > > Hi Andrii, > > On Thu, 25 Apr 2024 13:31:53 -0700 > Andrii Nakryiko wrote: > > > Hey Masami, > > > > I can't really review most of that code as I'm completely unfamiliar > > with all

Re: [PATCH v9 00/36] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2024-04-29 Thread Andrii Nakryiko
On Sun, Apr 28, 2024 at 4:25 PM Steven Rostedt wrote: > > On Thu, 25 Apr 2024 13:31:53 -0700 > Andrii Nakryiko wrote: > > I'm just coming back from Japan (work and then a vacation), and > catching up on my email during the 6 hour layover in Detroit. > > > He

Re: [PATCH v9 00/36] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2024-04-30 Thread Andrii Nakryiko
On Tue, Apr 30, 2024 at 6:32 AM Masami Hiramatsu wrote: > > On Mon, 29 Apr 2024 13:25:04 -0700 > Andrii Nakryiko wrote: > > > On Mon, Apr 29, 2024 at 6:51 AM Masami Hiramatsu > > wrote: > > > > > > Hi Andrii, > > > > > > On

Re: [PATCHv4 bpf-next 5/7] selftests/bpf: Add uretprobe syscall call from user space test

2024-05-02 Thread Andrii Nakryiko
all(void) > +{ > + LIBBPF_OPTS(bpf_uprobe_multi_opts, opts, > + .retprobe = true, > + ); > + struct uprobe_syscall_executed *skel; > + int pid, status, err, go[2], c; > + > + if (pipe(go)) > + return; very unlikely to fail, but still, ASSERT_OK() would be in order here But regardless: Acked-by: Andrii Nakryiko [...]

Re: [PATCHv4 bpf-next 6/7] selftests/bpf: Add uretprobe compat test

2024-05-02 Thread Andrii Nakryiko
_opts, opts, > + .retprobe = true, > + ); > + struct uprobe_syscall_executed *skel; > + int err, go[2], pid, c, status; > + > + if (pipe(go)) > + return; ASSERT_OK() missing, like in the previous patch Thanks for switching to pipe() + global variable instead of using trace_pipe. Acked-by: Andrii Nakryiko > + > + skel = uprobe_syscall_executed__open_and_load(); > + if (!ASSERT_OK_PTR(skel, "uprobe_syscall_executed__open_and_load")) > + goto cleanup; > + [...]

Re: [PATCHv4 bpf-next 0/7] uprobe: uretprobe speed up

2024-05-02 Thread Andrii Nakryiko
be is installed > and depends on specific HW type, please check patch 1 for details. > > Patches 1-6 are based on bpf-next/master, but path 1 and 2 are > apply-able on linux-trace.git tree probes/for-next branch. > Patch 7 is based on man-pages master. > > v4 changes: > - a

Re: [PATCHv4 bpf-next 0/7] uprobe: uretprobe speed up

2024-05-03 Thread Andrii Nakryiko
On Thu, May 2, 2024 at 1:04 PM Jiri Olsa wrote: > > On Thu, May 02, 2024 at 09:43:02AM -0700, Andrii Nakryiko wrote: > > On Thu, May 2, 2024 at 5:23 AM Jiri Olsa wrote: > > > > > > hi, > > > as part of the effort on speeding up the uprobes [0] coming w

Re: [PATCHv5 bpf-next 5/8] selftests/bpf: Add uretprobe syscall call from user space test

2024-05-07 Thread Andrii Nakryiko
44 > tools/testing/selftests/bpf/progs/uprobe_syscall_executed.c > Acked-by: Andrii Nakryiko > diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c > b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c > index 1a50cd35205d..3ef324c2db50 100644 > --- a/tools/testing/selfte

Re: [PATCH v9 00/36] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2024-05-07 Thread Andrii Nakryiko
On Wed, May 1, 2024 at 7:06 PM Masami Hiramatsu wrote: > > On Tue, 30 Apr 2024 09:29:40 -0700 > Andrii Nakryiko wrote: > > > On Tue, Apr 30, 2024 at 6:32 AM Masami Hiramatsu > > wrote: > > > > > > On Mon, 29 Apr 2024 13:25:04 -0700 > > > A

Re: [syzbot] [bpf?] [trace?] general protection fault in bpf_get_attach_cookie_tracing

2024-05-07 Thread Andrii Nakryiko
On Sun, May 5, 2024 at 9:13 AM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:a9e7715ce8b3 libbpf: Avoid casts from pointers to enums in.. > git tree: bpf-next > console+strace: https://syzkaller.appspot.com/x/log.txt?x=153c1dc498 > kernel config:

Re: [RFC PATCH] tracing: change syscall number type in struct syscall_trace_*

2023-10-03 Thread Andrii Nakryiko
On Mon, Oct 2, 2023 at 6:53 AM Artem Savkov wrote: > > linux-rt-devel tree contains a patch that adds an extra member to struct can you please point to the patch itself that makes that change? > trace_entry. This causes the offset of args field in struct > trace_event_raw_sys_enter be different

Re: [RFC PATCH bpf-next] bpf: change syscall_nr type to int in struct syscall_tp_t

2023-10-12 Thread Andrii Nakryiko
On Thu, Oct 12, 2023 at 6:43 AM Steven Rostedt wrote: > > On Thu, 12 Oct 2023 13:45:50 +0200 > Artem Savkov wrote: > > > linux-rt-devel tree contains a patch (b1773eac3f29c ("sched: Add support > > for lazy preemption")) that adds an extra member to struct trace_entry. > > This causes the offset

Re: [RFC PATCH bpf-next] bpf: change syscall_nr type to int in struct syscall_tp_t

2023-10-13 Thread Andrii Nakryiko
On Fri, Oct 13, 2023 at 7:00 AM Steven Rostedt wrote: > > On Fri, 13 Oct 2023 08:01:34 +0200 > Artem Savkov wrote: > > > > But looking at [0] and briefly reading some of the discussions you, > > > Steven, had. I'm just wondering if it would be best to avoid > > > increasing struct trace_entry alt

Re: [PATCH for-next] tracing/kprobes: Add symbol counting check when module loads

2023-10-31 Thread Andrii Nakryiko
- > kernel/trace/trace_kprobe.c | 112 > ++- > 1 file changed, 68 insertions(+), 44 deletions(-) > LGTM. Acked-by: Andrii Nakryiko > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c > index e834f149695b..90cf2219adb4 100644 > --- a/kernel/trace/trace_kpro

Re: [PATCHv7 bpf-next 0/9] uprobe: uretprobe speed up

2024-05-31 Thread Andrii Nakryiko
On Thu, May 23, 2024 at 5:11 AM Jiri Olsa wrote: > > hi, > as part of the effort on speeding up the uprobes [0] coming with > return uprobe optimization by using syscall instead of the trap > on the uretprobe trampoline. > > The speed up depends on instruction type that uprobe is installed > and d

Re: [PATCHv7 bpf-next 0/9] uprobe: uretprobe speed up

2024-06-05 Thread Andrii Nakryiko
On Fri, May 31, 2024 at 10:52 AM Andrii Nakryiko wrote: > > On Thu, May 23, 2024 at 5:11 AM Jiri Olsa wrote: > > > > hi, > > as part of the effort on speeding up the uprobes [0] coming with > > return uprobe optimization by using syscall instead of the trap &

Re: [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer

2024-06-05 Thread Andrii Nakryiko
On Tue, Jun 4, 2024 at 1:02 PM Jiri Olsa wrote: > > Adding new set of callbacks that are triggered on entry and return > uprobe execution for the attached function. > > The session means that those callbacks are 'connected' in a way > that allows to: > - control execution of return callback from

Re: [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer

2024-06-05 Thread Andrii Nakryiko
On Wed, Jun 5, 2024 at 10:57 AM Oleg Nesterov wrote: > > On 06/05, Andrii Nakryiko wrote: > > > > so any such > > limitations will cause problems, issue reports, investigation, etc. > > Agreed... > > > As one possible solution, what

Re: [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer

2024-06-06 Thread Andrii Nakryiko
On Thu, Jun 6, 2024 at 9:46 AM Jiri Olsa wrote: > > On Wed, Jun 05, 2024 at 10:50:11PM +0200, Jiri Olsa wrote: > > On Wed, Jun 05, 2024 at 07:56:19PM +0200, Oleg Nesterov wrote: > > > On 06/05, Andrii Nakryiko wrote: > > > > > > > > so any such &

Re: [PATCHv7 bpf-next 0/9] uprobe: uretprobe speed up

2024-06-11 Thread Andrii Nakryiko
On Mon, Jun 10, 2024 at 10:46 PM Masami Hiramatsu wrote: > > On Wed, 5 Jun 2024 09:42:45 -0700 > Andrii Nakryiko wrote: > > > On Fri, May 31, 2024 at 10:52 AM Andrii Nakryiko > > wrote: > > > > > > On Thu, May 23, 2024 at 5:11 AM Jiri Olsa wrote:

Re: [PATCHv8 bpf-next 0/9] uprobe: uretprobe speed up

2024-06-12 Thread Andrii Nakryiko
On Tue, Jun 11, 2024 at 3:52 PM Masami Hiramatsu wrote: > > On Tue, 11 Jun 2024 13:21:49 +0200 > Jiri Olsa wrote: > > > hi, > > as part of the effort on speeding up the uprobes [0] coming with > > return uprobe optimization by using syscall instead of the trap > > on the uretprobe trampoline. > >

Re: [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer

2024-06-17 Thread Andrii Nakryiko
On Mon, Jun 10, 2024 at 4:06 AM Jiri Olsa wrote: > > On Thu, Jun 06, 2024 at 09:52:39AM -0700, Andrii Nakryiko wrote: > > On Thu, Jun 6, 2024 at 9:46 AM Jiri Olsa wrote: > > > > > > On Wed, Jun 05, 2024 at 10:50:11PM +0200, Jiri Olsa wrote: > > > > On W

Re: [PATCH] uprobe: Do not use UPROBE_SWBP_INSN as static initializer

2024-06-20 Thread Andrii Nakryiko
On Tue, Jun 18, 2024 at 12:43 PM Jiri Olsa wrote: > > Nathan reported compilation fail for loongarch arch: > > kernel/events/uprobes.c: In function 'arch_uprobe_trampoline': > arch/loongarch/include/asm/uprobes.h:12:33: error: initializer element is > not constant > 12 | #define UPROBE_S

Re: [PATCH] uprobe: Do not use UPROBE_SWBP_INSN as static initializer

2024-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2024 at 12:40 PM Oleg Nesterov wrote: > > On 06/20, Andrii Nakryiko wrote: > > > > Can we instead ask loongarch folks to rewrite it to be a constant? > > Having this as a function call is both an inconvenience and potential > > performance problem (a

Re: [PATCH] LoongArch: uprobes: make UPROBE_SWBP_INSN/UPROBE_XOLBP_INSN constant

2024-06-27 Thread Andrii Nakryiko
robe") > Reported-by: Nathan Chancellor > Closes: https://lore.kernel.org/all/20240614174822.GA1185149@thelio-3990X/ > Suggested-by: Andrii Nakryiko > Signed-off-by: Oleg Nesterov > --- > arch/loongarch/include/asm/uprobes.h | 6 -- > arch/loongarch/kernel/upro

Re: [PATCH] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-02 Thread Andrii Nakryiko
On Tue, Jul 2, 2024 at 2:50 AM Peter Zijlstra wrote: > > > +Josj +LKML > ack, will add for next revision > On Mon, Jul 01, 2024 at 04:10:27PM -0700, Andrii Nakryiko wrote: > > When tracing user functions with uprobe functionality, it's common to > > install th

[PATCH v2] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-02 Thread Andrii Nakryiko
that this is the entry to the function. In that case, return address is still pointed to by %rsp/%esp, so we fetch it and add to stack trace before proceeding to unwind the rest using frame pointer-based logic. Signed-off-by: Andrii Nakryiko --- v1->v2: - use native unsigned long for ret_addr

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-02 Thread Andrii Nakryiko
On Tue, Jul 2, 2024 at 4:54 AM Peter Zijlstra wrote: > > > +LKML > > On Tue, Jul 02, 2024 at 12:23:53PM +0200, Peter Zijlstra wrote: > > On Mon, Jul 01, 2024 at 03:39:23PM -0700, Andrii Nakryiko wrote: > > > This patch set, ultimately, switches global uprobes_tr

  1   2   3   4   5   6   7   8   9   >