Re: [PATCH] x86-64 kprobes: handle %RIP-relative addressing mode

From: Andi Kleen
Date: Sun Mar 13 2005 - 11:47:08 EST

Roland McGrath <roland@xxxxxxxxxx> writes:

> The existing x86-64 kprobes implementation doesn't cope with the
> %RIP-relative addressing mode. Kprobes work by single-stepping a copy of

Thanks for fixing that long standing bug.

> + static const unsigned char onebyte_has_modrm[256] = {

Can you turn these two arrays into a bitmap please?

> + * This basically replicates __vmalloc, except that it uses a

This shouldn't be opencoded here. Instead make a utility function
like vmalloc_range() that takes a start and end address and
make the module allocation use it too.

Also you should fix up asm-x86_64/page.h and Documentation/x86_64/mm.txt
with the new fixed allocation.

> + * range of addresses starting a MODULE_END. This also
> + * allocates a single page of address space with no following
> + * guard page (__get_vm_area always adds PAGE_SIZE to the size,
> + * so by passing zero we get the one page). We set up all the

I think Andrea has just changed that and the patch went into
mainline. Be careful with merging.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at