Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp109362pxb; Fri, 16 Apr 2021 00:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj80QqSPcVKo7QXVLxGTXqYNyNBxa4DrpPrzxjvPaiAohPW9Uh0pZmgcWN5ZoGD47V5xsU X-Received: by 2002:aa7:c3ca:: with SMTP id l10mr151100edr.55.1618558442229; Fri, 16 Apr 2021 00:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618558442; cv=none; d=google.com; s=arc-20160816; b=dqO8YkzJJ2wJO0lf9LTy6SaE8VKmTvzBL7q+xn29nsfNVix0jp28hS1js0y5OW34rU nIa7YtPRm0P+O1fWt+RlX6AL9enQthXh8WTKcAJ8wn3rSSNExdqLVGyrdrpji0M6Bmf4 edyp4MsOcLTgL8unvMrmx2jBMozLmx/Z3gsfM81eZj7pDOrYT8507MiFNATrLpI5nd/P NItS8NErtjxzf9423/W1sILZQXfAXabXTfR8eQbBfV7kVzMYoyAoDyB64vpzQnStv9Mu TI+t+3v0Bg9hG41sWj1pJammNnSAJpOB6FoKYaBUBV6yW4ldhVcmUVjpjWYLL5oOzvGP y+KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=FsL378UfRD8m/5W1W04oBD6R7tDEThBT6UmIdWfTgpQ=; b=RfiwO+puxPRv3zLt34BkSQVILVP02Tc7xnUgjVSi8XpZGasMnOGfrRleRW23fzEGSC 7YRMn4obIB0Kc3c6ON3QJSjoHKMx91JolDVwwv3u2sMvHmLL7m7tqKW5cOUSa5I2LzJD 9CDPxWiTNnOfCVyxSWhYbHqcXczcmmU1CJecIpxOBAMXVuYFv9hshdlpLl/YvsR4neId dfSH5xhgodPKroGk9IyZ+fEM0QYFS9lHFKDk55XeNMADTXz1b2WrF4c0kNKFquKVzPbq c2hGrPfesAncvxsdED5viiYsRbxYG19cT1FaN8whZXoQOCyjn+oCVxw4MMSzczxywrkM i+WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb9si1806599ejb.304.2021.04.16.00.33.38; Fri, 16 Apr 2021 00:34:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239634AbhDPHdG convert rfc822-to-8bit (ORCPT + 99 others); Fri, 16 Apr 2021 03:33:06 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.85.151]:30859 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239317AbhDPHdE (ORCPT ); Fri, 16 Apr 2021 03:33:04 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-212-Pz1ohOP9MbWLWc7zHXrlbA-1; Fri, 16 Apr 2021 08:32:36 +0100 X-MC-Unique: Pz1ohOP9MbWLWc7zHXrlbA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 16 Apr 2021 08:32:35 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.012; Fri, 16 Apr 2021 08:32:35 +0100 From: David Laight To: 'Matthew Wilcox' CC: Jesper Dangaard Brouer , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "netdev@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mips@vger.kernel.org" , Ilias Apalodimas , Matteo Croce , Grygorii Strashko , Arnd Bergmann , "Christoph Hellwig" Subject: RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems Thread-Topic: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems Thread-Index: AQHXMXYmwdfrgigLI0exh4xFUSZq9Kq0jZ3ggAFYFFmAAC15oIAABLSAgACoXgA= Date: Fri, 16 Apr 2021 07:32:35 +0000 Message-ID: References: <20210411103318.GC2531743@casper.infradead.org> <20210412011532.GG2531743@casper.infradead.org> <20210414101044.19da09df@carbon> <20210414115052.GS2531743@casper.infradead.org> <20210414211322.3799afd4@carbon> <20210414213556.GY2531743@casper.infradead.org> <20210415200832.32796445@carbon> <20210415182155.GD2531743@casper.infradead.org> <5179a01a462f43d6951a65de2a299070@AcuMS.aculab.com> <20210415222211.GG2531743@casper.infradead.org> In-Reply-To: <20210415222211.GG2531743@casper.infradead.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox > Sent: 15 April 2021 23:22 > > On Thu, Apr 15, 2021 at 09:11:56PM +0000, David Laight wrote: > > Isn't it possible to move the field down one long? > > This might require an explicit zero - but this is not a common > > code path - the extra write will be noise. > > Then it overlaps page->mapping. See emails passim. The rules on overlaps make be wonder if every 'long' should be in its own union. The comments would need to say when each field is used. It would, at least, make these errors less common. That doesn't solve the 64bit dma_addr though. Actually rather that word-swapping dma_addr on 32bit BE could you swap over the two fields it overlays with. That might look messy in the .h, but it doesn't require an accessor function to do the swap - easily missed. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)