Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4195309ybl; Mon, 13 Jan 2020 09:25:28 -0800 (PST) X-Google-Smtp-Source: APXvYqwOojkUN5LdC6WmM/uzioGBjJ1ZmeBVWWKJb/kGimwJtV+oZaQLmIsuqw9s1tnWnefZyFb4 X-Received: by 2002:aca:b7c5:: with SMTP id h188mr13574103oif.100.1578936328345; Mon, 13 Jan 2020 09:25:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578936328; cv=none; d=google.com; s=arc-20160816; b=zgY4F/eBR4y+q7Z/XVCuHuteSvhIkWKWYgO+4tdKzE7NtTWsqLodjjN0wf4zx5+0+E KlPAJrF55l38kVoJAvIQliTdA7ibxASqr2f81jMoR3osinOwH5pCiGRTCd5KNcnPMX3P 2h69cN2/DsQ0k9cuhICXLW0wVyeQXttOZx2lQfVoGA14Nvp2pdxBGnd6i1lT7oPxEA0H tEEKDz39kJvz4ECKKB8UDeKq3mfmtlTE+yzKlnsrhkK0538uZ9KytZd2aY6ZOefAMGET HIumzeY7lhVVade00o5X72DLaIXOso4wGhXPTPR+b/M2E9dDmIyo93aOSTHekXHogbHK MwBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=4/nKbdhnYZBxGXSCu/9+Rcp9Ih6rj9FY4McKkrRsE0E=; b=mYcapQo9aLxJK6KlDpgJZNFWBuBVXJ0Aig8Cw1hARrz44VX5eZCqZwHojQp0xg2u/W ACbL1MZL7PNS34TlGPpPjRZ/EVcQvw+yUevzbuJ+IRiPolB6eUZgdszWBm6oJ9DB2Qe/ g9RZRVJ/NtdtnhKlXEYGdm5qMIPEn0gTY2GM6OK6ISpRrPti1+my623thxEu3oKJ2TpA J4PbH4THExzUVYeIdZzkD2jAA+n2yzVkfcIPhIVArTxvyZM33Wxal1jpSquDA5158gME g2GewhOongX/15tZPLMby92XwK7pqeZ+bnr9H8SgD2lhVEBjIYDWFjS94G6FS6AnO7mx Vhfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si6152240oib.252.2020.01.13.09.25.16; Mon, 13 Jan 2020 09:25:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729016AbgAMRX5 (ORCPT + 99 others); Mon, 13 Jan 2020 12:23:57 -0500 Received: from foss.arm.com ([217.140.110.172]:42310 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729009AbgAMRXz (ORCPT ); Mon, 13 Jan 2020 12:23:55 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B7DFA11B3; Mon, 13 Jan 2020 09:23:54 -0800 (PST) Received: from [10.37.12.172] (unknown [10.37.12.172]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D94313F534; Mon, 13 Jan 2020 09:23:51 -0800 (PST) Subject: Re: [PATCH] xfs: Fix xfs_dir2_sf_entry_t size check To: "Darrick J. Wong" , Arnd Bergmann Cc: Christoph Hellwig , Eric Sandeen , linux-xfs , "linux-kernel@vger.kernel.org" References: <20200109141459.21808-1-vincenzo.frascino@arm.com> <1a540ee4-6597-c79e-1bce-6592cb2f3eae@arm.com> <20200109165048.GB8247@magnolia> <435bcb71-9126-b1f1-3803-4977754b36ff@arm.com> <20200113135800.GA8635@lst.de> <20200113170105.GF8247@magnolia> From: Vincenzo Frascino Message-ID: <8e2d0812-c76d-b0fd-3f4f-129c46ae60c5@arm.com> Date: Mon, 13 Jan 2020 17:26:49 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200113170105.GF8247@magnolia> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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