Re: Failure to build librseq on ppc

2020-07-08 Thread Mathieu Desnoyers
- On Jul 8, 2020, at 8:33 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 7, 2020, at 8:59 PM, Segher Boessenkool > seg...@kernel.crashing.org > wrote: [...] >> >> So perhaps you have code like >> >> int *p; >> int x

Re: Failure to build librseq on ppc

2020-07-08 Thread Mathieu Desnoyers
- On Jul 7, 2020, at 8:59 PM, Segher Boessenkool seg...@kernel.crashing.org wrote: > Hi! > > On Tue, Jul 07, 2020 at 03:17:10PM -0400, Mathieu Desnoyers wrote: >> I'm trying to build librseq at: >> >> https://git.kernel.org/pub/scm/libs/librseq/librseq.git &

[tip: sched/urgent] sched: Fix unreliable rseq cpu_id for new tasks

2020-07-08 Thread tip-bot2 for Mathieu Desnoyers
The following commit has been merged into the sched/urgent branch of tip: Commit-ID: ce3614daabea8a2d01c1dd17ae41d1ec5e5ae7db Gitweb: https://git.kernel.org/tip/ce3614daabea8a2d01c1dd17ae41d1ec5e5ae7db Author:Mathieu Desnoyers AuthorDate:Mon, 06 Jul 2020 16:49:10 -04:00

[PATCH for 5.8] sched: Fix unreliable rseq cpu_id for new tasks

2020-07-07 Thread Mathieu Desnoyers
ions requires it to be accurate. If it is not accurate, it can cause corruption in the per-cpu data targeted by rseq critical sections in user-space. Link: https://sourceware.org/pipermail/libc-alpha/2020-July/115816.html Signed-off-by: Mathieu Desnoyers Tested-By: Florian Weimer Cc: Peter Zijl

Failure to build librseq on ppc

2020-07-07 Thread Mathieu Desnoyers
ry operand addressed by just a base register." I suspect that lwz and stw don't expect some kind of immediate offset which can be kept with "m", and "Q" fixes this. Is that the right fix ? And should we change all operands passed to lwz and stw to a "Q"

Re: [RFC PATCH for 5.8 3/4] rseq: Introduce RSEQ_FLAG_RELIABLE_CPU_ID

2020-07-07 Thread Mathieu Desnoyers
- On Jul 7, 2020, at 2:53 PM, Carlos O'Donell car...@redhat.com wrote: > On 7/7/20 8:06 AM, Mathieu Desnoyers wrote: >> - On Jul 7, 2020, at 7:32 AM, Florian Weimer f...@deneb.enyo.de wrote: >> >>> * Mathieu Desnoyers: >>> >>>> Those are ve

Re: [RFC PATCH for 5.8 3/4] rseq: Introduce RSEQ_FLAG_RELIABLE_CPU_ID

2020-07-07 Thread Mathieu Desnoyers
- On Jul 7, 2020, at 7:32 AM, Florian Weimer f...@deneb.enyo.de wrote: > * Mathieu Desnoyers: > >> Those are very good points. One possibility we have would be to let >> glibc do the rseq registration without the RSEQ_FLAG_RELIABLE_CPU_ID >> flag. On kernels with the

Re: [PATCH] powerpc: select ARCH_HAS_MEMBARRIER_SYNC_CORE

2020-07-07 Thread Mathieu Desnoyers
ing case. I thought it was okay (because > the IPI would cause a hard interrupt which does do the rfi) but that > should at least be written. Yes. > The context synchronisation happens before > the Linux IPI function is called, but for the purpose of membarrier I > think that is okay

Re: [RFC PATCH for 5.8 1/4] sched: Fix unreliable rseq cpu_id for new tasks

2020-07-07 Thread Mathieu Desnoyers
- On Jul 7, 2020, at 3:30 AM, Florian Weimer f...@deneb.enyo.de wrote: > * Mathieu Desnoyers: > >> While integrating rseq into glibc and replacing glibc's sched_getcpu >> implementation with rseq, glibc's tests discovered an issue with >> incorrect __rseq_abi.cpu_id

Re: [RFC PATCH for 5.8 3/4] rseq: Introduce RSEQ_FLAG_RELIABLE_CPU_ID

2020-07-07 Thread Mathieu Desnoyers
- On Jul 7, 2020, at 3:29 AM, Florian Weimer f...@deneb.enyo.de wrote: > * Mathieu Desnoyers: > >> commit 93b585c08d16 ("Fix: sched: unreliable rseq cpu_id for new tasks") >> addresses an issue with cpu_id field of newly created processes. Expose >> a fl

Re: [PATCH 2/3] Linux: Use rseq in sched_getcpu if available (v9)

2020-07-06 Thread Mathieu Desnoyers
- On Jul 6, 2020, at 2:11 PM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> - On Jul 6, 2020, at 1:50 PM, Florian Weimer fwei...@redhat.com wrote: >> >>> * Mathieu Desnoyers: >>> >>>> Now we need to discuss how we

[RFC PATCH for 5.8 2/4] rseq: Introduce RSEQ_FLAG_REGISTER

2020-07-06 Thread Mathieu Desnoyers
ystem call needs to be performed for each new thread in glibc, minimize the amount of overhead required. This is needed for introducing a new RSEQ_FLAG_RELIABLE_CPU_ID flag in a later change. Signed-off-by: Mathieu Desnoyers Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Florian Weimer Cc: &

[RFC PATCH for 5.8 3/4] rseq: Introduce RSEQ_FLAG_RELIABLE_CPU_ID

2020-07-06 Thread Mathieu Desnoyers
user-space per-cpu data updated with rseq, it is recommended that user-space detects availability of this fix by using the RSEQ_FLAG_RELIABLE_CPU_ID flag either combined with registration or on its own before using rseq. Signed-off-by: Mathieu Desnoyers Cc: Peter Zijlstra (Intel) Cc: Thomas Gl

[RFC PATCH for 5.8 0/4] rseq cpu_id ABI fix

2020-07-06 Thread Mathieu Desnoyers
aiming for quick inclusion into the Linux kernel, unless we prefer reverting the entire rseq glibc integration and try again in 6 months. Their upcoming release is on August 3rd, so we need to take a decision on this matter quickly. Thanks, Mathieu Mathieu Desnoyers (4): sched: Fix unreliable

[RFC PATCH for 5.8 4/4] rseq: selftests: Expect reliable cpu_id field

2020-07-06 Thread Mathieu Desnoyers
The rseq selftests should discover whether the kernel implements the RSEQ_FLAG_RELIABLE_CPU_ID flag, which indicates that the __rseq_abi.cpu_id field is reliable. Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Florian Weimer Cc: "P

[RFC PATCH for 5.8 1/4] sched: Fix unreliable rseq cpu_id for new tasks

2020-07-06 Thread Mathieu Desnoyers
ions requires it to be accurate. If it is not accurate, it can cause corruption in the per-cpu data targeted by rseq critical sections in user-space. Link: https://sourceware.org/pipermail/libc-alpha/2020-July/115816.html Signed-off-by: Mathieu Desnoyers Cc: Peter Zijlstra (Intel) Cc: Thomas Glei

Re: [PATCH 2/3] Linux: Use rseq in sched_getcpu if available (v9)

2020-07-06 Thread Mathieu Desnoyers
- On Jul 6, 2020, at 1:50 PM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> Now we need to discuss how we introduce that fix in a way that will >> allow user-space to trust the __rseq_abi.cpu_id field's content. > > I don't think that's ne

Re: [PATCH 2/3] Linux: Use rseq in sched_getcpu if available (v9)

2020-07-06 Thread Mathieu Desnoyers
- On Jul 6, 2020, at 10:49 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 6, 2020, at 9:59 AM, Florian Weimer fwei...@redhat.com wrote: > >> * Mathieu Desnoyers: >> >>> When available, use the cpu_id field from __rseq_abi on Linux to

Re: [PATCH 2/3] Linux: Use rseq in sched_getcpu if available (v9)

2020-07-06 Thread Mathieu Desnoyers
- On Jul 6, 2020, at 9:59 AM, Florian Weimer fwei...@redhat.com wrote: > * 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. > > I'

Re: [lttng-dev] 回复:回复: 回复: some tracepoints not exist in metadata?

2020-07-02 Thread Mathieu Desnoyers via lttng-dev
fork, clone or daemon, then helper libraries need to be preloaded with the daemon following instructions in the man-page lttng-ust(3) under section "Using LTTng-UST with daemons". Failure to preload those libraries in daemons would trigger the observed scenario: the application hangs up t

Re: [regression] TCP_MD5SIG on established sockets

2020-07-01 Thread Mathieu Desnoyers
return 0; >} > > @@ -1132,7 +1136,7 @@ int tcp_md5_do_add(struct sock *sk, const union > tcp_md5_addr *addr, > rcu_assign_pointer(tp->md5sig_info, md5sig); >} > > - key = sock_kmalloc(sk, sizeof(*key), gfp); > + key = sock_kmalloc(sk, sizeof(*key), gfp | __GFP_ZERO); >if (!key) >return -ENOMEM; > if (!tcp_alloc_md5sig_pool()) { -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [lttng-dev] 回复: 回复: some tracepoints not exist in metadata?

2020-07-01 Thread Mathieu Desnoyers via lttng-dev
some >> reasons I can't update it. So, is this a known bug? If yes, It will be very >> appreciated if you can give me any advice about the bug info(I can cherry >> pick >> the correspond fix). Otherwise, maybe I have to give up my favoriate >> Lttng >> Thank you in advan

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Mathieu Desnoyers
tcp_md5_do_add(struct sock *sk, const union > tcp_md5_addr *addr, >if (key) { >/* Pre-existing entry - just update that one. */ >memcpy(key->key, newkey, newkeylen); > + > + smp_wmb(); /* pairs with smp_rmb() in tcp_md5_hash_key() */ > + >key->keylen = newkeylen; >return 0; > } -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Mathieu Desnoyers
u cases is do determine the behavior > of all these stacks vs : > SACK option > TCP TS option. I will ask my customer's networking team to investigate these behaviors, which will allow me to prepare a thorough reply to the questions raised by Eric and David. I expect to have an answer within 2-3 weeks at most. Thank you! Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Mathieu Desnoyers
ing a customer increase their contributions and feedback to upstream. As we can see, they have accumulated some backlog over time. Clearly reverting a security fix is not acceptable here. Coming up with a proper ABI-compatible fix should not be out of our reach though. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Mathieu Desnoyers
vailable space. I welcome advice on what should be the end goal here. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp

2020-06-29 Thread Mathieu Desnoyers
- On Jun 29, 2020, at 8:21 PM, rostedt rost...@goodmis.org wrote: > On Thu, 25 Jun 2020 15:35:02 -0400 (EDT) > Mathieu Desnoyers wrote: > >> >> So the reservation is not "just" an add instruction, it's actually an >> >> xadd on x86. Is that

Re: [regression] TCP_MD5SIG on established sockets

2020-06-29 Thread Mathieu Desnoyers
- On May 13, 2020, at 3:56 PM, Eric Dumazet eduma...@google.com wrote: > On Wed, May 13, 2020 at 12:49 PM Eric Dumazet wrote: >> >> >> On Wed, May 13, 2020 at 12:38 PM Mathieu Desnoyers >> wrote: >> > >> > Hi, >> > >> > I am

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

2020-06-29 Thread Mathieu Desnoyers
q.2 system call man page. Changes since v21: - Update manual following feedback from Florian. - Remove static assert and alignof from sys/rseq.h to align with current Linux UAPI header, based on feedback from Florian. Signed-off-by: Mathieu Desnoyers CC: Carlos O'Donell CC: Florian Weimer CC:

[PATCH 2/3] Linux: Use rseq in sched_getcpu if available (v9)

2020-06-29 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

Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp

2020-06-26 Thread Mathieu Desnoyers
alse; > > *ret = rb_time_val(top, bottom); > return true; > } If __rb_time_read or rb_time_cmpxchg are used in an interrupt over rb_time_set (between setting top and bottom), those will never succeed. How is this case handled ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC PATCH v2] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-26 Thread Mathieu Desnoyers
- On Jun 26, 2020, at 12:00 PM, Peter Zijlstra pet...@infradead.org wrote: > On Thu, Jun 25, 2020 at 10:56:35AM -0400, Mathieu Desnoyers wrote: >> - On Jun 24, 2020, at 3:50 PM, Peter Zijlstra pet...@infradead.org wrote: > > I'll try and read the earlier bit later, I ca

Re: [RFC PATCH v2] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-26 Thread Mathieu Desnoyers
- On Jun 26, 2020, at 11:16 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jun 25, 2020, at 12:34 PM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > >> - On Jun 25, 2020, at 10:56 AM, Mathieu Desnoyers >> mathieu.desnoy.

Re: [RFC PATCH v2] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-26 Thread Mathieu Desnoyers
- On Jun 25, 2020, at 12:34 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jun 25, 2020, at 10:56 AM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > >> - On Jun 24, 2020, at 3:50 PM, Peter Zijlstra pet...@infradead.org wrote: >>

Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp

2020-06-25 Thread Mathieu Desnoyers
- On Jun 25, 2020, at 3:09 PM, rostedt rost...@goodmis.org wrote: > On Thu, 25 Jun 2020 13:55:07 -0400 (EDT) > Mathieu Desnoyers wrote: > >> What are the types used for before_stamp and write_stamp ? If those >> are 64-bit integers, how does sharing them between ne

Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp

2020-06-25 Thread Mathieu Desnoyers
- On Jun 25, 2020, at 3:04 PM, rostedt rost...@goodmis.org wrote: > On Thu, 25 Jun 2020 13:55:07 -0400 (EDT) > Mathieu Desnoyers wrote: > > >> What worries me about this "optimization" is what happens in a multi-nesting >> scenario. >> If we j

Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp

2020-06-25 Thread Mathieu Desnoyers
- On Jun 25, 2020, at 2:35 PM, rostedt rost...@goodmis.org wrote: > On Thu, 25 Jun 2020 13:55:07 -0400 (EDT) > Mathieu Desnoyers wrote > >> > Here's the design of this solution: >> > >> > All this is per cpu, and only needs to worry about nes

Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp

2020-06-25 Thread Mathieu Desnoyers
* Well, there's no use to try to know what the time > stamp >* is for the previous event. Just set delta to zero and >* be the same time as that event that preempted us > before >* the reservation of the buffer. */ > > delta = 0; If this is a rare case, why not just use a full timestamp instead ? Thanks, Mathieu > } > /* No need to use full timestamps here */ > abs = 0; > } > -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [RFC PATCH v2] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-25 Thread Mathieu Desnoyers
- On Jun 25, 2020, at 10:56 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jun 24, 2020, at 3:50 PM, Peter Zijlstra pet...@infradead.org wrote: > >> On Wed, Jun 24, 2020 at 02:31:33PM -0400, Mathieu Desnoyers wrote: >> > [...] >> The

Re: [RFC PATCH v2] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-25 Thread Mathieu Desnoyers
- On Jun 24, 2020, at 3:50 PM, Peter Zijlstra pet...@infradead.org wrote: > On Wed, Jun 24, 2020 at 02:31:33PM -0400, Mathieu Desnoyers wrote: > [...] > >> >> + /* >> >> + * Consume CPU time as long as an associated task is running on another >>

Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp

2020-06-25 Thread Mathieu Desnoyers
several failed attempts, I finally have a solution > to solve this puzzle. Out of curiosity, considering that LTTng has solved this problem 10+ years ago with a simpler concurrency-friendly time-stamping model, why not simply use it rather than add complexity to the current ftrace timestamp scheme

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

2020-06-24 Thread Mathieu Desnoyers
- On Jun 24, 2020, at 3:24 PM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >>> I think we should keep things simple on the glibc side for now and do >>> this changes to the kernel headers first. >> >> Just to be sure I understand

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

2020-06-24 Thread Mathieu Desnoyers
- On Jun 24, 2020, at 3:11 PM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >>> I'm still worried that __rseq_static_assert and __rseq_alignof will show >>> up in the UAPI with textually different definitions. (This does not >>> apply to

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

2020-06-24 Thread Mathieu Desnoyers
- On Jun 24, 2020, at 10:20 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> diff --git a/manual/threads.texi b/manual/threads.texi >> index bb7a42c655..d5069d5581 100644 >> --- a/manual/threads.texi >> +++ b/manual/threads.texi &

Re: [RFC PATCH v2] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-24 Thread Mathieu Desnoyers
- On Jun 24, 2020, at 8:11 AM, Peter Zijlstra pet...@infradead.org wrote: > On Fri, Jun 19, 2020 at 04:25:16PM -0400, Mathieu Desnoyers wrote: > >> @@ -660,6 +685,13 @@ struct task_struct { >> #ifdef CONFIG_THREAD_INFO_IN_TASK >> /* Current CPU:

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

2020-06-22 Thread Mathieu Desnoyers
nual to remove uptr field, which is removed from sys/rseq.h. - Rebase on current master branch. Changes since v20: - Rebase on current glibc master. - Update TLS_STATIC_SURPLUS value. - Use attribute __aligned__ to have same approach as Linux UAPI header. - Update manual to include link to librseq rse

[PATCH 2/3] Linux: Use rseq in sched_getcpu if available (v9)

2020-06-22 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

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

2020-06-22 Thread Mathieu Desnoyers
- On Jun 11, 2020, at 4:26 PM, Joseph Myers jos...@codesourcery.com wrote: > On Thu, 11 Jun 2020, Mathieu Desnoyers wrote: > >> I managed to get a repository up and running for librseq, and have integrated >> the rseq.2 man page with comments from Michael Kerrisk

[RFC PATCH v2] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-19 Thread Mathieu Desnoyers
ret = rseq_addv(v, count, percpu_current_cpu()); sched_pair_cpu_clear(); goto check; } return 0; } Signed-off-by: Mathieu Desnoyers CC: Thomas Gleixner CC: Peter Zijlstra CC: Joel Fernandes CC: "H . Peter Anvin" CC: Paul Turner

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

2020-06-18 Thread Mathieu Desnoyers
- On Jun 18, 2020, at 8:22 AM, Szabolcs Nagy szabolcs.n...@arm.com wrote: > The 06/11/2020 20:26, Joseph Myers wrote: >> On Thu, 11 Jun 2020, Mathieu Desnoyers wrote: >> > I managed to get a repository up and running for librseq, and have >> > integrat

[RFC PATCH] sched_pair_cpu: Introduce scheduler task pairing system call

2020-06-15 Thread Mathieu Desnoyers
ount, int cpu) { int ret; ret = rseq_addv(v, count, cpu); check: if (rseq_unlikely(ret)) { sched_pair_cpu_set(cpu); ret = rseq_addv(v, count, percpu_current_cpu()); sched_pair_cpu_clear(); goto check;

rseq.2 Restartable Sequences man page updated

2020-06-11 Thread Mathieu Desnoyers
, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

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

2020-06-11 Thread Mathieu Desnoyers
- On Jun 4, 2020, at 1:46 PM, Joseph Myers jos...@codesourcery.com wrote: > On Thu, 4 Jun 2020, Mathieu Desnoyers via Libc-alpha wrote: > >> That external piece of documentation would be part of the Linux man-pages >> project, maintained by Michael Kerrisk. I have submitt

[lttng-dev] [RELEASE] Common Trace Format (CTF) 1.8.3

2020-06-10 Thread Mathieu Desnoyers via lttng-dev
Hi, This is an announcement of a patch level 1.8.3 update for the Common Trace Format. It clarifies a few unspecified areas of CTF 1.8.2. You can find the specification at: https://diamon.org/ctf/ Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [lttng-dev] Userspace RCU data alignment

2020-06-05 Thread Mathieu Desnoyers via lttng-dev
n "readers" elements rather than bytes. By doing so, struct registry_chunk will adapt to have the proper alignment. Thanks, Mathieu > > Dmitry > > ___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/list

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

2020-06-04 Thread Mathieu Desnoyers
rmal" home: https://github.com/compudj/librseq Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

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

2020-06-03 Thread Mathieu Desnoyers
- On Jun 3, 2020, at 8:31 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> - On Jun 3, 2020, at 8:05 AM, Florian Weimer fwei...@redhat.com wrote: >> >>> * Mathieu Desnoyers: >>> >>>> +#ifdef __cplusplus &g

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

2020-06-03 Thread Mathieu Desnoyers
- On Jun 3, 2020, at 8:05 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> +#ifdef __cplusplus >> +# if __cplusplus >= 201103L >> +# define __rseq_static_assert(expr, diagnostic) static_assert (expr, >> diagnostic)

[RELEASE] LTTng-modules 2.12.1 and 2.11.4 (Linux kernel tracer)

2020-06-03 Thread Mathieu Desnoyers
ck on how we can improve LTTng to make it acceptable for integration into Linux. Thanks, Mathieu [1] https://lwn.net/Articles/817988/ [2] https://lore.kernel.org/r/20200302192811.n6o5645rsib44vco@localhost [3] https://lore.kernel.org/r/20200409193543.18115-1-mathieu.desnoy...@efficios.com --

[lttng-dev] [RELEASE] LTTng-modules 2.12.1 and 2.11.4 (Linux kernel tracer)

2020-06-03 Thread Mathieu Desnoyers via lttng-dev
ck on how we can improve LTTng to make it acceptable for integration into Linux. Thanks, Mathieu [1] https://lwn.net/Articles/817988/ [2] https://lore.kernel.org/r/20200302192811.n6o5645rsib44vco@localhost [3] https://lore.kernel.org/r/20200409193543.18115-1-mathieu.desnoy...@efficios.com --

[lttng-dev] [PATCH lttng-tools] tests: introduce --with-babeltrace-test-bin

2020-05-29 Thread Mathieu Desnoyers via lttng-dev
and --with-babeltrace-bin. If any of those are not set, respectively use "babeltrace2" and "babeltrace". Ensure all shell scripts and python tests use the BABELTRACE_BIN environment variable. Fixes #1270 Signed-off-by: Mathieu Desnoyers Co-developed-by: Jonatha

Re: [lttng-dev] lttng_lib_ring_buffer: section 24 reloc 0 sym '': relocation 42 out of range

2020-05-28 Thread Mathieu Desnoyers via lttng-dev
t regards, > Lukasz > ___ > 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

[PATCH glibc 2/3] Linux: Use rseq in sched_getcpu if available (v9)

2020-05-27 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 (v20)

2020-05-27 Thread Mathieu Desnoyers
ch is unexpected. - Abort libc in rseq_register_current_thread () on all errno except EPERM (seccomp), EACCES (seccomp), and ENOSYS (not implemented). Changes since v19: - Take care of feedback from Florian. - Update manual to remove uptr field, which is removed from sys/rseq.h. - Rebase on c

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

2020-05-26 Thread Mathieu Desnoyers
- On May 26, 2020, at 10:57 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >>> Like the attribute, it needs to come right after the struct keyword, I >>> think. (Trailing attributes can be ambiguous, but not in this case.) >> >>

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

2020-05-26 Thread Mathieu Desnoyers
- On May 26, 2020, at 10:38 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> AFAIU, the only gain here would be to make sure we don't emit useless >> ";" in the "/* nothing */" case. But does it matter ? > >

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

2020-05-26 Thread Mathieu Desnoyers
- On May 26, 2020, at 8:41 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> Something like this ? >> >> #ifdef __cplusplus >> # if __cplusplus >= 201103L >> # define rseq_static_assert (expr, diagnostic) static_as

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

2020-05-25 Thread Mathieu Desnoyers
- On May 25, 2020, at 11:20 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers: > >> The larger question here is: considering that we re-implement the entire >> uapi header within glibc (which includes the uptr addition), do we still >> care about u

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

2020-05-25 Thread Mathieu Desnoyers
- On May 20, 2020, at 7:40 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers via Libc-alpha: > >> diff --git a/NEWS b/NEWS >> index 141078c319..c4e0370fc4 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -23,6 +23,16 @@ Major new features: >>

Re: [lttng-dev] process/thread-specific UST tracing

2020-05-15 Thread Mathieu Desnoyers via lttng-dev
__ > 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: [patch V4 part 1 27/36] arm64: Prepare arch_nmi_enter() for recursion

2020-05-15 Thread Mathieu Desnoyers
- On May 15, 2020, at 11:45 AM, Will Deacon w...@kernel.org wrote: > On Fri, May 15, 2020 at 04:04:39PM +0200, Frederic Weisbecker wrote: >> On Wed, May 13, 2020 at 07:28:34PM -0400, Mathieu Desnoyers wrote: >> > - On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@l

Re: [PATCH 1/2] rbtree_latch: quit searching when reaching to maximum depth

2020-05-15 Thread Mathieu Desnoyers
- On May 15, 2020, at 8:47 AM, Lai Jiangshan la...@linux.alibaba.com wrote: [...] > So the serarch should stop when diving down up to > 2*BITS_PER_LONG depth. serarch -> search Thanks, Mathieu -- 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-15 Thread Mathieu Desnoyers
- On May 15, 2020, at 5:34 AM, Thomas Gleixner t...@linutronix.de wrote: [...] > > Can you please trim your replies? Sorry, will do, Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 4 15/24] x86/db: Split out dr6/7 handling

2020-05-14 Thread Mathieu Desnoyers
- On May 14, 2020, at 1:28 PM, Thomas Gleixner t...@linutronix.de wrote: > Mathieu Desnoyers writes: >> - On May 5, 2020, at 9:49 AM, Thomas Gleixner t...@linutronix.de wrote: >>> + >>> +static __always_inline void debug_exit(unsigned long dr7) >>

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

2020-05-14 Thread Mathieu Desnoyers
- On May 14, 2020, at 1:38 PM, Thomas Gleixner t...@linutronix.de wrote: > Mathieu Desnoyers writes: >> - On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: >> >>> From: Peter Zijlstra >>> >> >> Patch title: singa

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

2020-05-14 Thread Mathieu Desnoyers
- On May 14, 2020, at 12:39 PM, Borislav Petkov b...@alien8.de wrote: > On Thu, May 14, 2020 at 12:03:30PM -0400, Mathieu Desnoyers wrote: >> - #MC triggered, queuing task work, >> - unrelated signal happens to be delivered to task, >> - exit to usermode loop ha

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

2020-05-14 Thread Mathieu Desnoyers
ibly other relevant information for siginfo_t) triggering the exception in a scenario where we have: - #MC triggered, queuing task work, - unrelated signal happens to be delivered to task, - exit to usermode loop handles do_signal first, - then it runs task work. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 3 09/29] x86/entry/32: Provide macro to emit IDT entry stubs

2020-05-14 Thread Mathieu Desnoyers
- Thomas Gleixner wrote: > Mathieu Desnoyers writes: > > - On May 14, 2020, at 12:31 AM, Andy Lutomirski l...@kernel.org wrote: > >> On Wed, May 13, 2020 at 6:44 PM Mathieu Desnoyers > >> wrote: > >> They're needed for all entries except SYSCALL, bu

Re: [patch V4 part 3 09/29] x86/entry/32: Provide macro to emit IDT entry stubs

2020-05-14 Thread Mathieu Desnoyers
- On May 14, 2020, at 12:31 AM, Andy Lutomirski l...@kernel.org wrote: > On Wed, May 13, 2020 at 6:44 PM Mathieu Desnoyers > wrote: >> >> - On May 5, 2020, at 9:44 AM, Thomas Gleixner t...@linutronix.de wrote: >> >> [...] >> >> > +.macro id

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 8:12 PM, Thomas Gleixner t...@linutronix.de wrote: [...] > >>> Mathieu Desnoyers wrote: > >>> Also, color me confused: is "do_signal()" actually running any user-space, >>> or just setting up the user-space stack for event

Re: [patch V4 part 4 15/24] x86/db: Split out dr6/7 handling

2020-05-13 Thread Mathieu Desnoyers
/* >* The SDM says "The processor clears the BTF flag when it > @@ -777,7 +800,7 @@ dotraplinkage void do_debug(struct pt_re > #endif > > if (notify_die(DIE_DEBUG, "debug", regs, (long), error_code, > -

Re: [patch V4 part 3 09/29] x86/entry/32: Provide macro to emit IDT entry stubs

2020-05-13 Thread Mathieu Desnoyers
86, I notice a lack of consistency in use of the following instruction sequence at the asm entry point: - ASM_CLAC, - cld (clear direction flag). Are they always needed, or only for interrupt handlers ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 3 12/29] x86/entry/common: Provide idtentry_enter/exit()

2020-05-13 Thread Mathieu Desnoyers
* idtentry_enter() invoked rcu_irq_enter(). This > + * needs to undone before scheduling. Nit: "to undone" -> "to be undone". Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [patch V4 part 3 11/29] rcu: Provide rcu_irq_exit_preempt()

2020-05-13 Thread Mathieu Desnoyers
- On May 5, 2020, at 9:44 AM, Thomas Gleixner t...@linutronix.de wrote: [...] > > +/** > + * rcu_irq_exit_preempt - Inform RCU that current CPU is exiting irq > + * towards in kernel preemption Not sure what "towards in" means. Thanks, Mathieu

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

2020-05-13 Thread Mathieu Desnoyers
bled 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
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
sing). 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
p_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
ure 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
scall_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
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
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/rfc2385

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

2020-05-12 Thread Mathieu Desnoyers via lttng-dev
call(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 libc. Thanks, Math

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

2020-05-07 Thread Mathieu Desnoyers
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
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

<    4   5   6   7   8   9   10   11   12   13   >