On 02/12/2015 11:33 AM, Boris Ostrovsky wrote:
Also, for %*ph format, if we just go with falling through to plain
format and not marking somehow that we are printing a bad pointer:
unsigned badval = 0xab;
unsigned *badptr = &badval;
printk("badptr = %*ph\n", 1, badptr);
console:
badptr = ab
We don't know here whether badptr was pointing to 0xab or it itself
was 0xab.
Ugh, bad example. Here is what I meant:
unsigned badval = 0xab;
unsigned *badptr = &badval;
unsigned *badvalptr = (void *)0xab;
printk("badvalptr = %*ph badptr = %*ph\n", 1, badvalptr, 1, badptr);
console:
badvalptr = ab badptr = ab
Sorry.
-boris
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel