[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0810130740360.3288@nehalem.linux-foundation.org>
Date: Mon, 13 Oct 2008 07:45:19 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jiri Slaby <jirislaby@...il.com>
cc: Alan Cox <alan@...rguk.ukuu.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: GIT head no longer boots on x86-64
On Mon, 13 Oct 2008, Jiri Slaby wrote:
> + sprint_symbol(buf, (unsigned long)__builtin_return_address(0));
> + if (!is_vmalloc_addr(vmalloc_addr) && !is_module_address(addr))
> + printk("BUG? %s (from %s): %p\n", __func__, buf, vmalloc_addr);
Just use
printk("BUG? %s (from %pS): %p\n",
__func__,
__builtin_return_address(0),
vmalloc_addr);
and don't ever sprint_symbol() any more.
The rules:
- %pS for symbolic names of real pointers off the stack etc (ie something
that is approximately type "void *" and points directly to the function
code)
- %pF for symbolic names of a C function pointer (ie of type (*fn)(...)
and actually has a real C function pointer type)
where the difference doesn't matter for x86 (or most sane architectures),
but does matter for architectures that use function descriptors rather
than direct pointers (ia64, hppa, ppc64, maybe others).
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists