Re: [PATCH v4 02/24] powerpc/pseries: Fix alignment of PLPKS structures and buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-01-26 at 17:31 +0000, David Laight wrote:
> Changing the size to kzalloc() doesn't help.
> The alignment depends on the allocator and is only required to have
> a relatively small alignment (ARCH_MINALIGN?) regardless of the size.
> 
> IIRC one of the allocators adds a small header to every item.
> It won't return 16 byte aligned items at all.

I'm relying on the behaviour described in Documentation/core-
api/memory-allocation.rst:

    The address of a chunk allocated with kmalloc is aligned to at
    least ARCH_KMALLOC_MINALIGN bytes. For sizes which are a power of
    two, the alignment is also guaranteed to be at least the respective
    size.

Is this wrong?


Andrew

-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd@xxxxxxxxxxxxx   IBM Australia Limited




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux