Skip to content

kmemcheck (review)

Vegard Nossum lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13x86: __show_registers() and __show_regs() API unificationarch/x86/kernel/process_32.c arch/x86/kernel/process_64.c arch/x86/kernel/traps_32.c +2 more+13 -100 replies
2/13x86: add save_stack_trace_bp() for tracing from a specific stack framearch/x86/kernel/stacktrace.c include/linux/stacktrace.h+8 -00 replies
3/13stacktrace: add forward-declaration struct task_structinclude/linux/stacktrace.h+2 -00 replies
4/13slab: move struct kmem_cache to headersinclude/linux/slab_def.h mm/slab.c+81 -810 replies
5/13tasklets: new tasklet scheduling functioninclude/linux/interrupt.h kernel/softirq.c+25 -00 replies
6/13kmemcheck: add Vegard and Pekka to MAINTAINERSMAINTAINERS+8 -00 replies
7/13kmemcheck: add the kmemcheck coreDocumentation/kmemcheck.txt arch/x86/mm/Makefile arch/x86/mm/kmemcheck/Makefile +19 more+1427 -23 replies
8/13x86: add hooks for kmemcheckarch/x86/kernel/traps_32.c arch/x86/mm/fault.c include/asm-x86/string_32.h+32 -30 replies
9/13x86: add hooks for kmemcheck on x86_64arch/x86/kernel/traps_64.c include/asm-x86/pgtable_64.h include/asm-x86/string_64.h+16 -00 replies
10/13kmemcheck: add mm functionsarch/x86/kernel/process.c include/linux/gfp.h include/linux/kmemcheck.h +4 more+164 -110 replies
11/13slub: add hooks for kmemcheckmm/slub.c+18 -20 replies
12/13slab: add hooks for kmemcheckmm/slab.c+18 -20 replies
13/13kmemcheck: enable in the x86 Kconfigarch/x86/Kconfig.debug+109 -00 replies

Reviews trailers per patch

1 of 13 patches has a Reviewed-by or Acked-by.

PatchVegard Nossum
1/13
2/13
3/13
4/13
5/13
6/13A-b
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/13] kmemcheck (review)

Hi,

I am sending out the current version of kmemcheck for review.

Let me first of all note that, yes, the SMP support is completely and utterly BROKEN, owing to, amongst other things, the fact that I forgot to use any memory barriers at all with the atomic ops. My only defence is that I've never worked with those before, and the reason the code is still there is that I'm hoping we might find a way to solve the problem. (This is all disregarding the fact that halting all CPUs in a system while processing any page fault is really an absolutely disgusting idea; still, it allows kmemcheck to be booted with SMP and let the user control the bad effects using CPU hotplug.)

(In other words: Comments, suggestions on how to fix this, and patches too, are all received in gratitude.)

Our changes since last full LKML posting:
- use set_memory_4k() where possible instead of disabling PSE at boot time
- SLAB support (courtesy of Pekka)
- better error reports:
- discard irrelevant stack frames using save_stack_trace_bp()
- reports using tasklet instead of timer
- include a dump of a small portion of the shadow map
- reorganized source code by splitting and moving to arch/x86/mm/kmemcheck/
- CodingStyle/checkpatch fix-ups
- a few other minor changes and fixes
- (SMP support, but BROKEN; see above.)

I believe there are many things which could be better, especially things like comments explaining how it works, but which are easy to forget when I'm working with it and have all the details in my head. So please ask, and I will try to adjust it accordingly.

Also, a small disclaimer; if you see anything that looks completely ridiculous, it's probably because I didn't know any better. I'll be very happy for any corrections. Review can only make the code better, right?

Oh, and before I forget: These patches are against v2.6.26 and are slightly different from what Ingo has in -tip. I've squashed bugfixes, et.c. as to make the series as easy as possible to review, whereas the branch in tip has these as separate commits. I've also removed some Signed-off-by lines that I felt were not up to date as I might have edited the patch later and thus invalidated the SOBs. I have not modified patches where the author was not me, and all authorship tags should therefore be preserved as well.

Vegard