Re: kmalloc - Address is not consecutive

2021-08-19 Thread Lloyd
Thanks a lot, it worked :) On Thu, Aug 19, 2021 at 7:00 PM ckim wrote: > Hi! this one is easy :) > For printing pointer in kernel space, you should use %px not %p as format > specifier. I heard this is for security reason(?). > Chan Kim > > 내 Galaxy에서 보냄 > > > 원본 이메일 > 발신: wuz

Re: kmalloc - Address is not consecutive

2021-08-19 Thread ckim
Hi! this one is easy :)For printing pointer in kernel space, you should use %px  not %p as format specifier. I heard this is for security reason(?).Chan Kim내 Galaxy에서 보냄 원본 이메일 발신: wuzhouhui 날짜: 21/8/19 오후 9:17 (GMT+09:00) 받은 사람: Lloyd , kernelnewbies@kernelnewbies.org 제목: R

Re: kmalloc - Address is not consecutive

2021-08-19 Thread wuzhouhui
On 8/19/21 6:54 PM, Lloyd wrote: Hi, I am trying to print the address of consecutive locations in a memory allocated using kmalloc. It prints non contiguous addresses! I tried with kmalloc_array, and  normal array on stack, I got the same  result. May I know the reason? The code fragment fo

kmalloc - Address is not consecutive

2021-08-19 Thread Lloyd
Hi, I am trying to print the address of consecutive locations in a memory allocated using kmalloc. It prints non contiguous addresses! I tried with kmalloc_array, and normal array on stack, I got the same result. May I know the reason? The code fragment for array and result are given below. uin