[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22e494d8f2c7448dbf75a70a949d1280@AcuMS.aculab.com>
Date: Tue, 14 Jan 2020 10:36:55 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'xuesong Chen' <xuesong1977@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: Question about output of kmalloc()
From: xuesong Chen
> Sent: 14 January 2020 07:21
> 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?
The printed value is hashed to avoid leaking info.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists