lkml.org 
[lkml]   [2020]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] xfs: Fix xfs_dir2_sf_entry_t size check
From
Date
Hi Darrick,

On 1/13/20 5:01 PM, Darrick J. Wong wrote:
> On Mon, Jan 13, 2020 at 03:06:50PM +0100, Arnd Bergmann wrote:
>> On Mon, Jan 13, 2020 at 2:58 PM Christoph Hellwig <hch@lst.de> wrote:
>>>
>>> On Mon, Jan 13, 2020 at 02:55:15PM +0100, Arnd Bergmann wrote:
>>>> With ARM OABI (which you get when EABI is disabled), structures are padded
>>>> to multiples of 32 bits. See commits 8353a649f577 ("xfs: kill
>>>> xfs_dir2_sf_off_t")
>>>> and aa2dd0ad4d6d ("xfs: remove __arch_pack"). Those could be partially
>>>> reverted to fix it again, but it doesn't seem worth it as there is
>>>> probably nobody
>>>> running XFS on OABI machines (actually with the build failure we can
>>>> be fairly sure there isn't ;-).
>>>
>>> Or just try adding a __packed to the xfs_dir2_sf_entry definition?
>>
>> Yes, that should be correct on all architectures, and I just noticed
>> that this is what we already have on xfs_dir2_sf_hdr_t directly
>> above it for the same reason.
>
> Yeah, that sounds like a reasonable way forward, short of cleaning out
> all the array[0] cr^Hode... ;)
>
> To the original submitter: can you add __packed to the structure
> definition and (assuming it passes oabi compilation) send that to the
> list, please?
>

I will test it tomorrow morning as first thing and will send a patch out.
Thank you all for your help!

> --D
>
>>
>> Arnd

--
Regards,
Vincenzo

\
 
 \ /
  Last update: 2020-01-13 18:25    [W:0.046 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site