Re: [patch V4 part 3 01/29] x86/traps: Mark fixup_bad_iret() noinstr

2020-05-13 Thread Mathieu Desnoyers
preemption enabled or not in fixup_bad_iret() ? And of course that change should be documented in the commit message. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 35/36] x86: Replace ist_enter() with nmi_enter()

2020-05-13 Thread Mathieu Desnoyers
ands). > > So replace ist_enter() with nmi_enter(). Also observe that any nmi_enter() > caller must be both notrace and NOKPROBE, or in the noinstr text section. Are there similar issues with non-x86 architectures, or is this exception-behaves-like-an-interrupt issue specific to x86 ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 29/36] x86/mce: Send #MC singal from task work

2020-05-13 Thread Mathieu Desnoyers
ssing). If it's the case, I think it should be clearly stated as the intent of the earlier patch. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 30/36] lockdep: Always inline lockdep_{off,on}()

2020-05-13 Thread Mathieu Desnoyers
current->lockdep_recursion += LOCKDEP_OFF; > -} > -EXPORT_SYMBOL(lockdep_off); > - > -void lockdep_on(void) > -{ > - current->lockdep_recursion -= LOCKDEP_OFF; > -} > -EXPORT_SYMBOL(lockdep_on); > - > static inline void lockdep_recursion_finish(void) > { > if (WARN_ON_ONCE(--current->lockdep_recursion)) -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 27/36] arm64: Prepare arch_nmi_enter() for recursion

2020-05-13 Thread Mathieu Desnoyers
_hcr, hcr_el2); \ And not here ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 23/36] bug: Annotate WARN/BUG/stackfail as noinstr safe

2020-05-13 Thread Mathieu Desnoyers
feature is used, and > * gcc detects corruption of the on-stack canary value > */ > -__visible void __stack_chk_fail(void) > +__visible noinstr void __stack_chk_fail(void) > { > + instr_begin(); > panic("stack-protector: Kernel stack is corrupted in: %pB", > __builtin_return_address(0)); > + instr_end(); > } > EXPORT_SYMBOL(__stack_chk_fail); -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 19/36] x86/entry: Exclude low level entry code from sanitizing

2020-05-13 Thread Mathieu Desnoyers
_REMOVE_syscall_32.o = $(CC_FLAGS_FTRACE) -fstack-protector >> -fstack-protector-strong >> +CFLAGS_REMOVE_syscall_64.o = $(CC_FLAGS_FTRACE) -fstack-protector >> -fstack-protector-strong >> + >> OBJECT_FILES_NON_STANDARD_entry_64_compat.o := y >> >> CFLAGS_syscall_64.o+= $(call cc-option,-Wno-override-init,) -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 14/36] x86/entry: Get rid of ist_begin/end_non_atomic()

2020-05-13 Thread Mathieu Desnoyers
tion in an IST exception > - * > - * Ends a non-atomic section started with ist_begin_non_atomic(). > - */ > -void ist_end_non_atomic(void) > -{ > - preempt_disable(); > -} > - > int is_valid_bugaddr(unsigned long addr) > { > unsigned short ud; -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 1 05/36] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling

2020-05-13 Thread Mathieu Desnoyers
- On May 13, 2020, at 5:10 PM, rostedt rost...@goodmis.org wrote: > On Wed, 13 May 2020 16:56:41 -0400 (EDT) > Mathieu Desnoyers wrote: > >> - On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: >> >> > Make sure task_work runs before

Re: [patch V4 part 1 05/36] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling

2020-05-13 Thread Mathieu Desnoyers
ignal delivery */ > + if (cached_flags & _TIF_SIGPENDING) > + do_signal(regs); > + > if (cached_flags & _TIF_USER_RETURN_NOTIFY) > fire_user_return_notifiers(); -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

[regression] TC_MD5SIG on established sockets

2020-05-13 Thread Mathieu Desnoyers
as the resulting combination of options does not exceed the available header space. Can we please fix this KASAN report in a way that does not break user-space applications expectations about Linux' implementation of RFC2385 ? Thanks, Mathieu [1] RFC2385: https://tools.ietf.org/html/rfc2

[regression] TC_MD5SIG on established sockets

2020-05-13 Thread Mathieu Desnoyers
as the resulting combination of options does not exceed the available header space. Can we please fix this KASAN report in a way that does not break user-space applications expectations about Linux' implementation of RFC2385 ? Thanks, Mathieu [1] RFC2385: https://tools.ietf.org/html/rfc2

Re: [lttng-dev] Correctly using callstack-user context

2020-05-12 Thread Mathieu Desnoyers via lttng-dev
syscall() (see syscall(2) man page), or does it call into libc ? Is your entire libc compiled with -fno-omit-frame-pointer ? As soon as one library in the chain to the system call is compiled without frame pointers, this is where the stack walk stops. This is usually li

Re: [patch V4 part 1 35/36] x86: Replace ist_enter() with nmi_enter()

2020-05-07 Thread Mathieu Desnoyers
soon after the NMI, rather than from NMI context. AFAIK this is how this is done today by perf, ftrace, ebpf, and lttng. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [PATCH v4 14/18] static_call: Add static_cond_call()

2020-05-06 Thread Mathieu Desnoyers
- On May 6, 2020, at 9:55 AM, Peter Zijlstra pet...@infradead.org wrote: > On Tue, May 05, 2020 at 04:27:44PM -0400, Mathieu Desnoyers wrote: >> Actually, if the goal is to do code patching of the call, I wonder >> what makes it OK to "guess" all the call patterns

Re: [PATCH v4 14/18] static_call: Add static_cond_call()

2020-05-05 Thread Mathieu Desnoyers
- On May 5, 2020, at 3:57 PM, ndesaulniers ndesaulni...@google.com wrote: > On Tue, May 5, 2020 at 12:00 PM Mathieu Desnoyers > wrote: >> >> - On May 5, 2020, at 2:48 PM, Linus Torvalds >> torva...@linux-foundation.org >> wrote: >> [...] >> &g

Re: [PATCH v4 14/18] static_call: Add static_cond_call()

2020-05-05 Thread Mathieu Desnoyers
ld be semantically changed to just invoking an empty function which effectively does nothing. This would remove the need to do a pointer check in the first place. But maybe I'm missing something subtle about why it has not been done in this context. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

[lttng-dev] [PATCH lttng-modules] Unbreak LTTng for kernel 5.7

2020-05-05 Thread Mathieu Desnoyers via lttng-dev
://lore.kernel.org/r/20200302192811.n6o5645rsib44vco@localhost [1] Link: https://lore.kernel.org/r/20200409193543.18115-1-mathieu.desnoy...@efficios.com [2] Link: https://lwn.net/Articles/817988/ Signed-off-by: Mathieu Desnoyers CC: Thomas Gleixner CC: Will Deacon CC: a...@linux-foundation.org CC

[PATCH lttng-modules] Unbreak LTTng for kernel 5.7

2020-05-05 Thread Mathieu Desnoyers
://lore.kernel.org/r/20200302192811.n6o5645rsib44vco@localhost [1] Link: https://lore.kernel.org/r/20200409193543.18115-1-mathieu.desnoy...@efficios.com [2] Link: https://lwn.net/Articles/817988/ Signed-off-by: Mathieu Desnoyers CC: Thomas Gleixner CC: Will Deacon CC: a...@linux-foundation.org CC

Re: [PATCH] percpu: Sync vmalloc mappings in pcpu_alloc() and free_percpu()

2020-05-04 Thread Mathieu Desnoyers
- On May 4, 2020, at 11:31 AM, Joerg Roedel jroe...@suse.de wrote: > On Mon, May 04, 2020 at 11:28:46AM -0400, Mathieu Desnoyers wrote: >> - On May 4, 2020, at 11:12 AM, Joerg Roedel jroe...@suse.de wrote: >> Placing this here is inefficient. It syncs mappings

Re: [PATCH] percpu: Sync vmalloc mappings in pcpu_alloc() and free_percpu()

2020-05-04 Thread Mathieu Desnoyers
nds up being needed, it should be moved to: static void pcpu_mem_free(void *ptr) { /* Add comments here... */ if (is_vmalloc_addr(ptr)) vmalloc_sync_unmappings(); kvfree(ptr); } So it is only called before the underlying vmalloc'd chunk is freed, rather than at each and every percpu free. Thanks, Mathieu > + > spin_unlock_irqrestore(&pcpu_lock, flags); > > if (need_balance) > -- > 2.12.3 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-05-01 Thread Mathieu Desnoyers
- On Apr 30, 2020, at 10:39 PM, rostedt rost...@goodmis.org wrote: > On Thu, 30 Apr 2020 22:26:55 -0400 (EDT) > Mathieu Desnoyers wrote: > >> - On Apr 30, 2020, at 9:13 PM, rostedt rost...@goodmis.org wrote: >> >> > [ Joerg, sending again this time not jus

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-05-01 Thread Mathieu Desnoyers
- On May 1, 2020, at 12:20 AM, rostedt rost...@goodmis.org wrote: > On Thu, 30 Apr 2020 22:26:55 -0400 (EDT) > Mathieu Desnoyers wrote: > >> The tracers just have to make sure they perform their vmalloc'd memory >> allocation before registering the tracepoint whi

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-04-30 Thread Mathieu Desnoyers
observable by instrumentation. This approach is not new: register_die_notifier() does exactly that today. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

[PATCH glibc 2/3] glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v7)

2020-04-30 Thread Mathieu Desnoyers
When available, use the cpu_id field from __rseq_abi on Linux to implement sched_getcpu(). Fall-back on the vgetcpu vDSO if unavailable. Benchmarks: x86-64: Intel E5-2630 v3@2.40GHz, 16-core, hyperthreading glibc sched_getcpu(): 13.7 ns (baseline) glibc sched_getcpu() using

[PATCH glibc 1/3] glibc: Perform rseq registration at C startup and thread creation (v19)

2020-04-30 Thread Mathieu Desnoyers
ad (), which is unexpected. - Abort libc in rseq_register_current_thread () on all errno except EPERM (seccomp), EACCES (seccomp), and ENOSYS (not implemented). Signed-off-by: Mathieu Desnoyers CC: Carlos O'Donell CC: Florian Weimer CC: Joseph Myers CC: Szabolcs Nagy CC: Thomas Gleixn

Re: [RFC PATCH glibc 1/3] glibc: Perform rseq(2) registration at C startup and thread creation (v18)

2020-04-30 Thread Mathieu Desnoyers
fatal ("glibc fatal error: " "rseq already initialized for this thread\n"); ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC PATCH glibc 1/3] glibc: Perform rseq(2) registration at C startup and thread creation (v18)

2020-04-30 Thread Mathieu Desnoyers
- On Apr 30, 2020, at 12:36 PM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > [...] > >>>> + if (__rseq_abi.cpu_id == RSEQ_CPU_ID_REGISTRATION_FAILED) >>>> +return; >>>> + ret = INTERNAL_SYSCALL

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-04-30 Thread Mathieu Desnoyers
- On Apr 30, 2020, at 12:30 PM, rostedt rost...@goodmis.org wrote: > On Thu, 30 Apr 2020 12:18:22 -0400 (EDT) > Mathieu Desnoyers wrote: > >> - On Apr 30, 2020, at 12:16 PM, rostedt rost...@goodmis.org wrote: >> >> > On Thu, 30 Apr 2020 11:20:15 -040

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-04-30 Thread Mathieu Desnoyers
- On Apr 30, 2020, at 12:16 PM, rostedt rost...@goodmis.org wrote: > On Thu, 30 Apr 2020 11:20:15 -0400 (EDT) > Mathieu Desnoyers wrote: > >> > The right fix is to call vmalloc_sync_mappings() right after allocating >> > tracing or perf buffers via v[zm]alloc()

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-04-30 Thread Mathieu Desnoyers
em page tables. > > tl;dr; It's not an issue with the vmalloc, it's an issue with per_cpu > allocations! Did I mention that alloc_percpu uses: static void *pcpu_mem_zalloc(size_t size, gfp_t gfp) { if (WARN_ON_ONCE(!slab_is_available())) return NULL; if (size <= PAGE_SIZE) return kzalloc(size, gfp); else return __vmalloc(size, gfp | __GFP_ZERO, PAGE_KERNEL); } So yeah, it's vmalloc'd memory when size > PAGE_SIZE. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC PATCH glibc 1/3] glibc: Perform rseq(2) registration at C startup and thread creation (v18)

2020-04-30 Thread Mathieu Desnoyers
- On Apr 30, 2020, at 8:20 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> diff --git a/NEWS b/NEWS >> index 0e627b3405..0b85a02c12 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -18,6 +18,16 @@ Major new features: >> * The GNU C

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-04-30 Thread Mathieu Desnoyers
ILE_FL_TRIGGER_COND)) { if (eflags & EVENT_FILE_FL_TRIGGER_MODE) event_triggers_call(file, NULL, NULL); if (eflags & EVENT_FILE_FL_SOFT_DISABLED) return true; if (eflags & EVENT_FILE_FL_PID_FILTER) return trace_event_ignore_this_pid(file); } return false; } Thanks, Mathieu > > Regards, > > Joerg -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-04-30 Thread Mathieu Desnoyers
where *between* allocation and publishing the pointer for instrumentation, it's fine. I'll let Steven decide on which approach works best for him. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before text_poke()

2020-04-29 Thread Mathieu Desnoyers
t context switch, next->pid is checked against this bitmask, and > if it is set, it means we should allow this process to be traced. > > This mask should only be accessed at sched_switch time, not at other times. > And it may read any possible page in that mask depending on the proces

Re: [lttng-dev] [RFC PATCH CTF 1/3] Clarify that unlisted enum values are implementation-defined

2020-04-29 Thread Mathieu Desnoyers via lttng-dev
- On Apr 28, 2020, at 2:51 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Apr 28, 2020, at 2:40 PM, Philippe Proulx ppro...@efficios.com wrote: > >> - Original Message - >>> From: "Mathieu Desnoyers" >>>

[lttng-dev] [RFC PATCH CTF 4/4] Use the formulation "less than or equal to" rather than "below or equal"

2020-04-28 Thread Mathieu Desnoyers via lttng-dev
Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common-trace-format-specification.md b/common-trace-format-specification.md index 5732e92..8a3a745 100644 --- a/common-trace-format

[lttng-dev] [RFC PATCH CTF 1/4] Clarify that unlisted enumeration values are allowed

2020-04-28 Thread Mathieu Desnoyers via lttng-dev
Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common-trace-format-specification.md b/common-trace-format-specification.md index fd49e59..d6d196c 100644 --- a/common-trace-format-specification.md +++ b/common

[lttng-dev] [RFC PATCH CTF 3/4] Clarify that timestamp begin/end need to be complete clock values

2020-04-28 Thread Mathieu Desnoyers via lttng-dev
Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.md | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/common-trace-format-specification.md b/common-trace-format-specification.md index 55d0601..5732e92 100644 --- a/common-trace-format

[lttng-dev] [RFC PATCH CTF 2/4] Clarify monotonicity requirement on timestamp begin

2020-04-28 Thread Mathieu Desnoyers via lttng-dev
Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.md | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common-trace-format-specification.md b/common-trace-format-specification.md index d6d196c..55d0601 100644 --- a/common-trace-format

Re: [lttng-dev] [RFC PATCH CTF 2/3] Clarify monotonicity requirement on timestamp begin

2020-04-28 Thread Mathieu Desnoyers via lttng-dev
- On Apr 28, 2020, at 2:42 PM, Philippe Proulx ppro...@efficios.com wrote: > - Original Message - >> From: "Mathieu Desnoyers" >> To: "gbastien+lttng" , "Matthew Khouzam" >> , >> diamon-disc...@linuxfoundation.org, ppro..

Re: [lttng-dev] [RFC PATCH CTF 1/3] Clarify that unlisted enum values are implementation-defined

2020-04-28 Thread Mathieu Desnoyers via lttng-dev
- On Apr 28, 2020, at 2:40 PM, Philippe Proulx ppro...@efficios.com wrote: > - Original Message - >> From: "Mathieu Desnoyers" >> To: "gbastien+lttng" , "Matthew Khouzam" >> , >> diamon-disc...@linuxfoundation.org, ppro..

[RFC PATCH glibc 2/3] glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v7)

2020-04-28 Thread Mathieu Desnoyers
When available, use the cpu_id field from __rseq_abi on Linux to implement sched_getcpu(). Fall-back on the vgetcpu vDSO if unavailable. Benchmarks: x86-64: Intel E5-2630 v3@2.40GHz, 16-core, hyperthreading glibc sched_getcpu(): 13.7 ns (baseline) glibc sched_getcpu() using r

[RFC PATCH glibc 1/3] glibc: Perform rseq(2) registration at C startup and thread creation (v18)

2020-04-28 Thread Mathieu Desnoyers
rns void. - Coding style fixes. - sys/rseq.h: use "32" for alignment. - Change http:// for https:// in comments. - Add const struct rseq_cs * field to rseq_cs union. Signed-off-by: Mathieu Desnoyers CC: Carlos O'Donell CC: Florian Weimer CC: Joseph Myers CC: Szabolcs Nagy

Re: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17)

2020-04-28 Thread Mathieu Desnoyers
- On Apr 28, 2020, at 8:54 AM, Florian Weimer f...@deneb.enyo.de wrote: > * Mathieu Desnoyers: > >> - On Apr 28, 2020, at 8:35 AM, Florian Weimer f...@deneb.enyo.de wrote: >> >>> * Mathieu Desnoyers: >>> >>>> One issue I'm currentl

Re: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17)

2020-04-28 Thread Mathieu Desnoyers
- On Apr 28, 2020, at 8:33 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Apr 28, 2020, at 8:02 AM, Florian Weimer f...@deneb.enyo.de wrote: > [...] >> >>> x32 should not be an issue as explained above, so I'm very open to >>>

Re: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17)

2020-04-28 Thread Mathieu Desnoyers
- On Apr 28, 2020, at 8:35 AM, Florian Weimer f...@deneb.enyo.de wrote: > * Mathieu Desnoyers: > >> One issue I'm currently facing when running "make check": because >> nptl/tst-rseq-nptl.c uses pthread_cancel(), I run into an Abort >> with: &g

Re: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17)

2020-04-28 Thread Mathieu Desnoyers
- On Apr 28, 2020, at 8:02 AM, Florian Weimer f...@deneb.enyo.de wrote: > * Mathieu Desnoyers: > >>>>>> +/* struct rseq is aligned on 4 * 8 bytes to ensure it is always >>>>>> + contained within a single cache-line. >>>>>

Re: [lttng-dev] [RFC PATCH CTF 1/3] Clarify that unlisted enum values are implementation-defined

2020-04-24 Thread Mathieu Desnoyers via lttng-dev
- On Apr 23, 2020, at 6:51 PM, Jeremie Galarneau jeremie.galarn...@efficios.com wrote: > On Thu, 23 Apr 2020 at 16:52, Mathieu Desnoyers > wrote: >> >> From: Geneviève Bastien >> >> Signed-off-by: Geneviève Bastien >> Signed-off-by: Mathieu Desno

[lttng-dev] [RFC PATCH CTF 2/3] Clarify monotonicity requirement on timestamp begin

2020-04-23 Thread Mathieu Desnoyers via lttng-dev
Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.md | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common-trace-format-specification.md b/common-trace-format-specification.md index f5fea51..53b70f4 100644 --- a/common-trace-format

[lttng-dev] [RFC PATCH CTF 0/3] Common Trace Format Updates (upcoming 1.8.3)

2020-04-23 Thread Mathieu Desnoyers via lttng-dev
implementation-defined Mathieu Desnoyers (2): Clarify monotonicity requirement on timestamp begin Clarify that timestamp begin/end need to be complete clock values common-trace-format-specification.md | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) -- 2.11.0

[lttng-dev] [RFC PATCH CTF 1/3] Clarify that unlisted enum values are implementation-defined

2020-04-23 Thread Mathieu Desnoyers via lttng-dev
From: Geneviève Bastien Signed-off-by: Geneviève Bastien Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common-trace-format-specification.md b/common-trace-format-specification.md index fd49e59..f5fea51 100644

[lttng-dev] [RFC PATCH CTF 3/3] Clarify that timestamp begin/end need to be complete clock values

2020-04-23 Thread Mathieu Desnoyers via lttng-dev
Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.md | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common-trace-format-specification.md b/common-trace-format-specification.md index 53b70f4..7681ce5 100644 --- a/common-trace-format

Re: [lttng-dev] Have live session and rotation together

2020-04-22 Thread Mathieu Desnoyers via lttng-dev
been a priority to fix this issue so far. Thanks, Mathieu > -- > Regards, > Sergei Dyshel > > On Wed, Apr 22, 2020 at 2:15 AM Mathieu Desnoyers > wrote: >> >> - On Apr 21, 2020, at 5:37 PM, Sergei Dyshel qyron.priv...@gmail.com >> wrote: >> >>

[lttng-dev] [RELEASE] Userspace RCU 0.12.1, 0.11.2, 0.10.3, 0.9.7

2020-04-22 Thread Mathieu Desnoyers via lttng-dev
is possible. liburcu-cds provides efficient data structures based on RCU and lock-free algorithms. Those structures include hash tables, queues, stacks, and doubly-linked lists. Project website: http://liburcu.org Git repository: git://git.liburcu.org/urcu.git Enjoy! Mathieu -- Mathieu

Re: [lttng-dev] Have live session and rotation together

2020-04-21 Thread Mathieu Desnoyers via lttng-dev
quot; and "tracefile size". It was implemented at the same time as the live mode for exactly the purpose you describe. See https://lttng.org/docs/#doc-tracefile-rotation for more information. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] Have live session and rotation together

2020-04-21 Thread Mathieu Desnoyers via lttng-dev
ntation much more complex and require a very significant testing effort. Considering that there are few compelling use-cases for using both features together, and no customer have expressed interest in this, it is not part of our roadmap. Thanks, Mathieu -- Mathieu Des

[lttng-dev] [RELEASE] Userspace RCU 0.12.0

2020-04-09 Thread Mathieu Desnoyers via lttng-dev
://liburcu.org Git repository: git://git.liburcu.org/urcu.git -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[lttng-dev] [RELEASE] LTTng-modules 2.10.5 and 2.11.3 (Linux kernel tracer)

2020-04-08 Thread Mathieu Desnoyers via lttng-dev
://lttng.org/docs Download link: https://lttng.org/download -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[lttng-dev] [RELEASE] LTTng-UST 2.11.2 (Linux user-space tracer)

2020-04-08 Thread Mathieu Desnoyers via lttng-dev
Tng filter interpreter when dealing with floating point numbers loaded from lttng contexts. Thanks, Mathieu Project website: https://lttng.org Documentation: https://lttng.org/docs Download link: https://lttng.org/download -- Mathieu Desnoyers EfficiOS Inc. http://www.ef

[lttng-dev] [RELEASE] LTTng-modules and LTTng-UST 2.12.0-rc3 (International Stay At Home Month)

2020-03-27 Thread Mathieu Desnoyers via lttng-dev
well use this time to download and try the latest LTTng 2.12 release candidates. Feedback is welcome! Thanks, and please stay home, Mathieu Project website: https://lttng.org Documentation: https://lttng.org/docs Download link: https://lttng.org/download [1] https://bugs.lttng.org/issues/1245

Re: [lttng-dev] LTTng user-space callstacks

2020-03-27 Thread Mathieu Desnoyers via lttng-dev
Wolff < [ > mailto:milian.wo...@kdab.com | > milian.wo...@kdab.com ] > wrote: >> On Donnerstag, 26. März 2020 20:41:17 CET Mathieu Desnoyers via lttng-dev >> wrote: >>> - On Mar 26, 2020, at 1:39 PM, lttng-dev < [ >> > mailto:lttng-dev@lists.lttng.org

Re: [lttng-dev] LTTng user-space callstacks

2020-03-26 Thread Mathieu Desnoyers via lttng-dev
customers showing interest in getting this done. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] [PATCH lttng-modules] Add UDP and ICMP packet header information to the tracepoint:

2020-03-17 Thread Mathieu Desnoyers via lttng-dev
case TH_ICMP: { > + ctf_align(uint32_t) > + ctf_array_type(uint8_t, > icmp_hdr(skb), > + sizeof(struct > icmphdr)) > +

Re: [lttng-dev] [PATCH lttng-modules] Add UDP and ICMP packet header information to the tracepoint:

2020-03-16 Thread Mathieu Desnoyers via lttng-dev
sizeof(struct > icmphdr)) > + break; > + } > + default: > + /* > + * For any other transport > header type, > + * there is nothing to do. > + */ > + break; > } > - /* > - * For any other transport header type, > - * there is nothing to do. > - */ > } > ) > ) > -- > 2.17.1 > > ___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] [babeltrace][PATCH] fs.c: initialize the other_entry variable

2020-03-11 Thread Mathieu Desnoyers
= NULL; > > /* Find the spot where to insert this index entry. */ > for (i = 0; i < index->entries->len; i++) { > -- > 2.7.4 > > _______ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listin

Re: [lttng-dev] [PATCH lttng-modules] Add UDP and ICMP packet header information to the tracepoint:

2020-03-09 Thread Mathieu Desnoyers
break; > } > - /* > - * For any other transport header type, > - * there is nothing to do. > - */ > } > ) > ) -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[lttng-dev] [RELEASE] LTTng-UST 2.10.7, 2.11.1, 2.12.0-rc2 (Linux user-space tracer)

2020-03-04 Thread Mathieu Desnoyers
g with -fno-common is enforced to prepare for the upcoming default behavior change in gcc 10. Please try it out, and as usual, feedback is welcome! Thanks, Mathieu Project website: https://lttng.org Documentation: https://lttng.org/docs Download link: https://lttng.org/download -- Mathie

Re: [lttng-dev] [PATCH v4 lttng-ust 1/2] Introduce vtracef

2020-03-04 Thread Mathieu Desnoyers
racef.c > +++ b/liblttng-ust/tracef.c > @@ -29,20 +29,32 @@ > #define TRACEPOINT_DEFINE > #include "lttng-ust-tracef-provider.h" > > -void _lttng_ust_tracef(const char *fmt, ...) > +static inline __attribute__((always_inline)) > +void __

Re: [lttng-dev] [PATCH v3 lttng-ust 1/2] Introduce vtracef

2020-03-03 Thread Mathieu Desnoyers
- On Feb 26, 2020, at 4:14 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Feb 24, 2020, at 12:34 PM, Maxime Roussin-Belanger > maxime.roussinbelan...@gmail.com wrote: > [...] >> diff --git a/liblttng-ust/tracef.c b/liblttng-ust/tracef.c >> ind

Re: [lttng-dev] [PATCH v3 lttng-ust 2/2] Introduce vtracelog

2020-02-26 Thread Mathieu Desnoyers
CE_EMERG) > TRACELOG_CB(TRACE_ALERT) > -- > 2.20.1 > > ___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] [PATCH v3 lttng-ust 1/2] Introduce vtracef

2020-02-26 Thread Mathieu Desnoyers
end: > + return; > +} > + > +void _lttng_ust_tracef(const char *fmt, ...) > +{ > + va_list ap; > + > + va_start(ap, fmt); > + _lttng_ust_vtracef(fmt, ap); > + > va_end(ap); > } > -- > 2.20.1 > > _______

Re: [lttng-dev] [PATCH v3 lttng-ust 1/2] Introduce vtracef

2020-02-26 Thread Mathieu Desnoyers
; 2 as well. > + delay = atoi(argv[1]); > + > + fprintf(stderr, "Demo program starting.\n"); > + > + sleep(delay); > + > + fprintf(stderr, "Tracing... "); > + > + for (i = 0; i < 5; i++) { > +

Re: [lttng-dev] [PATCH v3 lttng-ust 1/2] Introduce vtracef

2020-02-26 Thread Mathieu Desnoyers
an you check the result of the generated binary (compiled with -O2) to see if there is an additional call added for _lttng_ust_trace() compared to the prior generated code ? I would hate to add an extra call indirection there. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.

[lttng-dev] [RELEASE] LTTng-modules 2.12.0-rc2, 2.11.2, 2.10.14 (Linux kernel tracer)

2020-02-26 Thread Mathieu Desnoyers
, Mathieu Project website: https://lttng.org Documentation: https://lttng.org/docs Download link: https://lttng.org/download -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng

Re: [lttng-dev] [PATCH lttng-ust] Fix: generation of man pages with multiple refnames

2020-02-17 Thread Mathieu Desnoyers
; -# configure XML man page header > -ifdef::doctype-manpage[] > -ifdef::backend-docbook[] > -[header] > -template::[header-declarations] > - > - > -{mantitle} > -{manvolnum} > -LTTng > -{lttng_version} > -LTTng Manual > - &g

Re: [lttng-dev] [PATCH v2 lttng-ust] Introduce vtracef

2020-02-06 Thread Mathieu Desnoyers
t; +++ b/liblttng-ust/tracef.c > @@ -29,20 +29,26 @@ > #define TRACEPOINT_DEFINE > #include "lttng-ust-tracef-provider.h" > > -void _lttng_ust_tracef(const char *fmt, ...) > +void _lttng_ust_vtracef(const char *fmt, va_list ap) > { > - va_list ap; > char *msg; > - int len; > - > - va_start(ap, fmt); > - len = vasprintf(&msg, fmt, ap); > + const int len = vasprintf(&msg, fmt, ap); > /* len does not include the final \0 */ > if (len < 0) > goto end; > __tracepoint_cb_lttng_ust_tracef___event(msg, len, > LTTNG_UST_CALLER_IP()); > free(msg); > end: > + return; > +} > + > +void _lttng_ust_tracef(const char *fmt, ...) > +{ > + va_list ap; > + > + va_start(ap, fmt); > + _lttng_ust_vtracef(fmt, ap); > + > va_end(ap); > } > -- > 2.20.1 > > ___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] [PATCH v4] Use _umtx_op for futex on FreeBSD

2020-01-30 Thread Mathieu Desnoyers
umtx_op, (uint32_t)val, umtx_uaddr, umtx_uaddr2); > +} > + > +static inline int futex_noasync(int32_t *uaddr, int op, int32_t val, > + const struct timespec *timeout, int32_t *uaddr2, int32_t val3) > +{ > + return futex_async(uaddr, op, val, timeout, uaddr2, val3); > +} >

Re: [lttng-dev] [PATCH v2 1/2] Add FreeBSD, DragonFly to syscall-compat.h

2020-01-30 Thread Mathieu Desnoyers
; #error "Add platform support to urcu/syscall-compat.h" > -- > 2.25.0 > > ___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___

[lttng-dev] [RELEASE] LTTng-modules 2.10.13 and 2.11.1 (Linux kernel tracer)

2020-01-29 Thread Mathieu Desnoyers
. Thanks, Mathieu Project website: https://lttng.org Documentation: https://lttng.org/docs Download link: https://lttng.org/download -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https

Re: [lttng-dev] call_rcu seems inefficient without futex

2020-01-28 Thread Mathieu Desnoyers
- On Jan 27, 2020, at 10:45 PM, paulmck paul...@kernel.org wrote: > On Mon, Jan 27, 2020 at 10:38:05AM -0500, Mathieu Desnoyers wrote: >> - On Jan 23, 2020, at 7:19 PM, lttng-dev lttng-dev@lists.lttng.org wrote: >> >> > Hi, >> > >> > I re

Re: [lttng-dev] [PATCH 2/2] Use _umtx_op for futex on FreeBSD

2020-01-27 Thread Mathieu Desnoyers
> 2.25.0 > > _______ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] call_rcu seems inefficient without futex

2020-01-27 Thread Mathieu Desnoyers
and signal backends and all completed successfully. > > I think that the other two usages of futex_async are also a little > suspicious, but I didn't look too closely. > > Thanks, > Alex. > _______ > lttng-dev mail

Re: [lttng-dev] [PATCH] doc: Fix bind address example for lttng-relayd

2020-01-07 Thread Mathieu Desnoyers
- On Jan 6, 2020, at 8:58 PM, Benjamin Poirier benjamin.poir...@gmail.com wrote: > On 2020/01/06 09:39, Mathieu Desnoyers wrote: >> - On Jan 6, 2020, at 12:19 AM, Benjamin Poirier >> benjamin.poir...@gmail.com >> wrote: >> >> > INADDR_ANY is 0.0.0

Re: [lttng-dev] [PATCH] doc: Fix bind address example for lttng-relayd

2020-01-06 Thread Mathieu Desnoyers
ompletely, the trace can be processed by > any tool that can process an LTTng trace located on the local > -- > 2.25.0.rc0 > > ___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://list

[lttng-dev] LTTng-UST: Bump LTTNG_UST_ABI_MINOR_VERSION to 1

2019-12-20 Thread Mathieu Desnoyers
FYI, a similar approach should be taken for lttng-ust 2.12, as pushed into the master branch: commit 677423ebf26cc17916bddd0334b1a9f7614035c9 Author: Mathieu Desnoyers Date: Fri Dec 20 10:49:20 2019 -0500 Bump LTTNG_UST_ABI_MINOR_VERSION to 1 Increment the minor version of lttng

Re: [lttng-dev] [RFC Patch] Bump LTTNG_MODULES_ABI_MINOR_VERSION to 5

2019-12-20 Thread Mathieu Desnoyers
gt; #define LTTNG_MODULES_ABI_MAJOR_VERSION 2 > -#define LTTNG_MODULES_ABI_MINOR_VERSION 4 > +#define LTTNG_MODULES_ABI_MINOR_VERSION 5 > > #define LTTNG_KERNEL_SYM_NAME_LEN 256 > #define LTTNG_KERNEL_SESSION_NA

Re: [lttng-dev] [PATCH lttng-modules] fix: use user ns wrapper code in new id trackers

2019-12-17 Thread Mathieu Desnoyers
rcu_dereference(__session->vgid_tracker.p); \ > if (__lf && likely(!lttng_id_tracker_lookup(__lf, \ > - from_kgid(current_user_ns(), current_gid()\ > + lttng_current_vgid(

Re: [lttng-dev] [PATCH lttng-modules] fix: function prototype in wrapper/mm.h

2019-12-17 Thread Mathieu Desnoyers
apper/mm.h > index 672855b..405248a 100644 > --- a/wrapper/mm.h > +++ b/wrapper/mm.h > @@ -62,7 +62,7 @@ void wrapper_set_current_oom_origin(void) > } > > static inline > -void wrapper_clear_current_oom_origin() > +void wrapper_clear_current_oom_origin(void) > { >

Re: [lttng-dev] Fwd: [PATCH lttng-modules] Add UDP and ICMP packet header information to the tracepoint:

2019-12-17 Thread Mathieu Desnoyers
_enum_desc transport_header_type = { > @@ -510,15 +633,32 @@ LTTNG_TRACEPOINT_EVENT_CLASS(net_dev_template, > ctf_integer_type(unsigned char, th_type) > /* Copy the transport header. */ > - if (th_type == TH_TCP) { > + switch (th_type) { > + case TH_TCP: { > ctf_align(uint32_t) > ctf_array_type(uint8_t, tcp_hdr(skb), > sizeof(struct tcphdr)) > + break; > + } > + case TH_UDP: { > + ctf_align(uint32_t) > + ctf_array_type(uint8_t, udp_hdr(skb), > + sizeof(struct udphdr)) > + break; > + } > + case TH_ICMP: { > + ctf_align(uint32_t) > + ctf_array_type(uint8_t, icmp_hdr(skb), > + sizeof(struct udphdr)) > + break; > + } > + default: > + /* > + * For any other transport header type, > + * there is nothing to do. > + */ > + break; > } > - /* > - * For any other transport header type, > - * there is nothing to do. > - */ > } > ) > ) > -- > 2.17.1 > ___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] [PATCH] Fix: SUNRPC: Fix oops when trace sunrpc_task events in nfs client

2019-12-12 Thread Mathieu Desnoyers
Merged into lttng-modules master, 2.11, 2.10 branches, thanks! I added the following commits on top, taking care of another OOPS that was missed by this patch, and adapting the type of the field to a signed integer: commit b6903d57e4c3234ec5b1c7f72e232023cdee0fab Author: Mathieu Desnoyers Date

Re: [lttng-dev] [PATCH lttng-modules stable-2.10] fix: missing 'lttng_fs_info_fsid' wrapper in btrfs backport

2019-12-11 Thread Mathieu Desnoyers
nters, we need to >pass it down the callchain. > >Signed-off-by: Michael Jeanson >Signed-off-by: Mathieu Desnoyers > > Signed-off-by: Michael Jeanson > --- > instrumentation/events/lttng-module/btrfs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [lttng-dev] [PATCH lttng-modules] Update .gitignore from upstream

2019-12-10 Thread Mathieu Desnoyers
ted/ > > # stgit generated dirs > patches-* > @@ -76,8 +117,35 @@ GRTAGS > GSYMS > GTAGS > > +# id-utils files > +ID > + > *.orig > *~ > \#*# > > +# > +# Leavings from module signing > +# > +extra_certificates > +signing_key.pem > +signing_key.

Re: [lttng-dev] RCU consistency guarantees

2019-12-06 Thread Mathieu Desnoyers
- On Dec 6, 2019, at 3:51 PM, Yuxin Ren wrote: > On Fri, Dec 6, 2019 at 5:49 AM Mathieu Desnoyers < [ > mailto:mathieu.desnoy...@efficios.com | mathieu.desnoy...@efficios.com ] > > wrote: >> - On Dec 5, 2019, at 8:17 PM, Yuxin Ren < [ mailto:r...@gwmail.gwu.edu

Re: [lttng-dev] RCU consistency guarantees

2019-12-06 Thread Mathieu Desnoyers
_ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[lttng-dev] [PATCH babeltrace-1.5 6/6] Fix: lttng-live format: do not error out on empty streams hang up

2019-12-04 Thread Mathieu Desnoyers
Attaching to a stream hung up before providing any trace packet causes ctf_open_mmap_stream_read() to return an error. This kind of scenario can happen with the upcoming "lttng clear" feature. Signed-off-by: Mathieu Desnoyers --- formats/ctf/ctf.c | 7 ++- 1 file changed, 6

[lttng-dev] [PATCH babeltrace-1.5 5/6] Fix: lttng-live: ctf_live_packet_seek stream hang up handling

2019-12-04 Thread Mathieu Desnoyers
When get_next_index sets the index position to EOF, ctf_live_packet_seek() should in turn set the stream position to EOF to propagate the hung up state. Signed-off-by: Mathieu Desnoyers --- formats/lttng-live/lttng-live-comm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[lttng-dev] [PATCH babeltrace-1.5 4/6] Fix: lib/iterator.c: unbalanced ctx put (leak)

2019-12-04 Thread Mathieu Desnoyers
Missing context put in iterator init error path. Signed-off-by: Mathieu Desnoyers --- lib/iterator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/iterator.c b/lib/iterator.c index 639a2d29..77093217 100644 --- a/lib/iterator.c +++ b/lib/iterator.c @@ -778,6 +778,8 @@ int

[lttng-dev] [PATCH babeltrace-1.5 2/6] Fix: trace-collection: trace clock use after free

2019-12-04 Thread Mathieu Desnoyers
The trace collection should copy the trace clock object rather than take a reference to the first trace's trace clock, because it may be freed when the trace is removed (e.g. application going away in per-pid live tracing). Signed-off-by: Mathieu Desnoyers --- lib/trace-collection.c

[lttng-dev] [PATCH babeltrace-1.5 1/6] Fix: lttng-live: use-after-free in get_next_index()

2019-12-04 Thread Mathieu Desnoyers
Running babeltrace under valgrind with a test-cases doing per-pid lttng tracing in live mode triggers this use-after-free in get_next_index() when stream is hung up. Signed-off-by: Mathieu Desnoyers --- formats/lttng-live/lttng-live-comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

<    6   7   8   9   10   11   12   13   14   15   >