All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] kcov: PREEMPT_RT fixup + misc
@ 2021-08-30 17:26 Sebastian Andrzej Siewior
  2021-08-30 17:26 ` [PATCH 1/5] Documentation/kcov: Include types.h in the example Sebastian Andrzej Siewior
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-08-30 17:26 UTC (permalink / raw)
  To: kasan-dev, linux-kernel
  Cc: Dmitry Vyukov, Andrey Konovalov, Thomas Gleixner, Steven Rostedt,
	Marco Elver, Clark Williams

The last patch in series is follow-up to address the PREEMPT_RT issue
within in kcov reported by Clark [0].
Patches 1-3 are smaller things that I noticed while staring at it.
Patch 4 is small change which makes replacement in #5 simpler / more
obvious.
I tested this with the three examples in the documentation folder and I
didn't notice higher latency with kcov enabled. Debug or not, I don't
see a reason to make the lock a raw_spin_lock_t annd it would complicate
memory allocation as mentioned in #5.

One thing I noticed and have no idea if this is right or not:
The code seems to mix long and uint64_t for the reported instruction
pointer / position in the buffer. For instance
__sanitizer_cov_trace_pc() refers to a 64bit pointer (in the comment)
while the area pointer itself is (long *). The problematic part is that
a 32bit application on a 64bit pointer will expect a four byte pointer
while kernel uses an eight byte pointer.

[0] https://lkml.kernel.org/r/20210809155909.333073de@theseus.lan

Sebastian



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-09-20  9:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 17:26 [PATCH 0/5] kcov: PREEMPT_RT fixup + misc Sebastian Andrzej Siewior
2021-08-30 17:26 ` [PATCH 1/5] Documentation/kcov: Include types.h in the example Sebastian Andrzej Siewior
2021-09-17 14:34   ` Dmitry Vyukov
2021-08-30 17:26 ` [PATCH 2/5] Documentation/kcov: Define `ip' " Sebastian Andrzej Siewior
2021-09-17 14:37   ` Dmitry Vyukov
2021-08-30 17:26 ` [PATCH 3/5] kcov: Allocate per-CPU memory on the relevant node Sebastian Andrzej Siewior
2021-09-17 14:38   ` Dmitry Vyukov
2021-08-30 17:26 ` [PATCH 4/5] kcov: Avoid enable+disable interrupts if !in_task() Sebastian Andrzej Siewior
2021-09-17 14:50   ` Dmitry Vyukov
2021-08-30 17:26 ` [PATCH 5/5] kcov: Replace local_irq_save() with a local_lock_t Sebastian Andrzej Siewior
2021-09-17 14:58   ` Dmitry Vyukov
2021-09-06 16:13 ` [PATCH 0/5] kcov: PREEMPT_RT fixup + misc Marco Elver
2021-09-06 16:28   ` Sebastian Andrzej Siewior
2021-09-20  9:26     ` Marco Elver
2021-09-20  9:50       ` Sebastian Andrzej Siewior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.