mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Question about output of kmalloc()
@ 2020-01-14  7:20 xuesong Chen
  2020-01-14 10:36 ` David Laight
  0 siblings, 1 reply; 3+ messages in thread
From: xuesong Chen @ 2020-01-14  7:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: xuesong Chen

Hello,

Below code snippet in the .ko:

unsigned long *p = (unsigned long *)kmalloc(sizeof(*p), GFP_KERNEL);
printk("Addr of p = 0x%p\n", p);

The output is:
Addr of p = 0x0000000018606ce7

In my mind, during the early day, the p should be 0xfffff...., can
anybody give some tips why the output looks like it's a physical
address?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-14 11:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  7:20 Question about output of kmalloc() xuesong Chen
2020-01-14 10:36 ` David Laight
2020-01-14 11:50   ` xuesong Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®