[PATCH] x86 - Enhance DEBUG_RODATA support - alternatives

Ingo Molnar mingo@elte.hu
Thu Mar 6 15:54:00 GMT 2008


* pageexec@freemail.hu <pageexec@freemail.hu> wrote:

> > +		vaddr = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL);
> > +		WARN_ON(!vaddr);
> > +		local_irq_save(flags);
> > +		memcpy(&vaddr[(unsigned long)addr & ~PAGE_MASK], opcode, len);
> > +		local_irq_restore(flags);
> 
> you probably want a BUG_ON instead (or some graceful recovery) else 
> the NULL deref will trigger with IRQs off...

agreed - i changed it to BUG_ON() for the time being.

	Ingo



More information about the Systemtap mailing list