suppose I alloc memory with kmalloc which isn't guaranteed to be aligned, and then I align it with PAGE_ALIGN macro. Is it possible I'll encounter segmantation fault if I'll access the last allocated byte (for example)?
int *p;
p = (int*) kmalloc(1 << 16, GFP_KERNEL);
PAGE_ALIGN(p);
p[(1 << 16) - 1] = 1;
Thanks.
allocate pages
> suppose I alloc memory with kmalloc which isn't guaranteed to be aligned
__get_free_pages()
(btw, code and question seems odd)