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

2023-01-27 Thread Michael Ellerman
Andrew Donnellan writes: > On Thu, 2023-01-26 at 17:31 +, 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

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

2023-01-27 Thread Michael Ellerman
Segher Boessenkool writes: > On Thu, Jan 26, 2023 at 12:09:53AM +1100, Michael Ellerman wrote: >> Andrew Donnellan writes: >> > A number of structures and buffers passed to PKS hcalls have alignment >> > requirements, which could on occasion cause problems: >> > >> > - Authorisation structures

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

2023-01-27 Thread David Laight
From: Andrew Donnellan > Sent: 27 January 2023 03:21 > > On Thu, 2023-01-26 at 17:31 +, 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

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

2023-01-26 Thread Andrew Donnellan
On Thu, 2023-01-26 at 17:31 +, 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

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

2023-01-26 Thread David Laight
From: Segher Boessenkool > Sent: 26 January 2023 17:19 > > On Thu, Jan 26, 2023 at 12:09:53AM +1100, Michael Ellerman wrote: > > Andrew Donnellan writes: > > > A number of structures and buffers passed to PKS hcalls have alignment > > > requirements, which could on occasion cause problems: > > >

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

2023-01-26 Thread Segher Boessenkool
On Thu, Jan 26, 2023 at 12:09:53AM +1100, Michael Ellerman wrote: > Andrew Donnellan writes: > > A number of structures and buffers passed to PKS hcalls have alignment > > requirements, which could on occasion cause problems: > > > > - Authorisation structures must be 16-byte aligned and must not

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

2023-01-25 Thread Michael Ellerman
Andrew Donnellan writes: > A number of structures and buffers passed to PKS hcalls have alignment > requirements, which could on occasion cause problems: > > - Authorisation structures must be 16-byte aligned and must not cross a > page boundary > > - Label structures must not cross page