Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752543AbdFMLE1 (ORCPT ); Tue, 13 Jun 2017 07:04:27 -0400 Received: from mail-bn3nam01on0061.outbound.protection.outlook.com ([104.47.33.61]:13319 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752033AbdFMLEY (ORCPT ); Tue, 13 Jun 2017 07:04:24 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Date: Tue, 13 Jun 2017 14:04:11 +0300 From: Yury Norov To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Andrew Pinski , Heiko Carstens , Chris Metcalf , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , agraf@suse.de, szabolcs.nagy@arm.com, geert@linux-m68k.org, Adam Borowski , manuel.montezelo@gmail.com, Chris Metcalf , Andrew Pinski , linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, Bamvor Zhangjian , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com Subject: Re: [PATCH 02/20] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Message-ID: <20170613110411.rijis4m2z5cdfdo4@yury-thinkpad> References: <20170604120009.342-1-ynorov@caviumnetworks.com> <20170604120009.342-3-ynorov@caviumnetworks.com> <20170608150950.iqq4xgxu6zsa7m52@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170608150950.iqq4xgxu6zsa7m52@localhost> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [176.59.11.75] X-ClientProxiedBy: DB6PR02CA0005.eurprd02.prod.outlook.com (10.170.218.146) To BLUPR0701MB1860.namprd07.prod.outlook.com (10.162.88.146) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0701MB1860: X-MS-Office365-Filtering-Correlation-Id: 03c234b0-67ff-4c7c-59cd-08d4b24bf0b5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BLUPR0701MB1860; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1860;3:9JczyNHpu08FLnIcINywQ36+U0NM+oW+6IeupEHzmNfwH+wCG5H4kpbaBfBSGGyJstpbEAy1uY3w5oUgrf4MM0LsHoIf3KxaF/S8Fx+zwVC6CQzqQhta+NFBhplUuN5lFMLEAJhlYmRlCgV9gfZDDdtmI44flEeSEl87GCRMPvFUYqeCz9Mc6pcxcHlu40g0AnkbLvEC2vTBHN5eiOAWqya1Q0wjfQH0CLDb+506EHGfEPqdHCTQnhOLGSy9qpG6bdcv14Hk6aXEW7mm/7o1SM+z9uGV7ho6nwiKzdBuWhVGExDVIdIwefLdshkbuvGqucgZoKo2XtPtpPvdUHP55A==;25:qpFA0/51y8TqKnxtMiZGtjT4L4ssdqdcB8ThOwkGlqkqs7aLjqD3nTqIDK+9HwDvdocrLRNFg9E7I+WxIN7l91XlUVHCDZAkpVr3Db5h5Qim7qVWnJTVI+Ch4qZ8oVjIJDcM53FnUG4rYGUOaEtUv6bDG5+floh6/tcSNqa0JnVdPEFagWOTIOs2KBEGOuUhM66iuvuwxUQxXCkEF7f+IlK3Grs3B5/vFC3oUbhucJIIPxIgi9XTbTi9mgRXriKwmrj2I4fNiQxVuKEXwrbJZQdEeL92q6WPReBkHdph5MocTg+AADOOif9+IRYESkwZM2VQRHG2jYkG/YvVLlIECEa15GCNDdi/HOl9sD7F5jauIhe+wZbTv+ftrx/zHxkMdjxtbro6DHN7BvgTPTQGkbCWFFDcfLndZToTc6qrPoW8eNKQWL6Bj9jS2Bns36tvSTr81PhGI+8Xkokn0gzvEDDlTQNDTNJlXIvk+izz9D4= X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1860;31:4+x4KFNAuU+6gTzU9HZm0ZkNAGmrQoNU+KZc9ld0cPZ37S400NUJ+vM0sFKvfLWqlgKs/Zk8v3xKiWt8JPk3MipvaeVna0mZ/93pE9V/EHNtrb4jPB7hy1XlbYPfHL9c1jQdq2NQbiU/FIzl2C6cCbu+fVg1+gXoTQlGnltSbSguo+nS026gd9Uh3oKQIQwQLCVds12VHFpk/EP+fAYaTs5X/PtTibp3AyX9JdJ4PKM=;20:6I4xQNGhfHrwy2m9XXBsy61ettBo7VDcl+q9U3XOKvSOs+sSxnMl1hiiby2bVe2JPeitwssUXmsmf2eBidtuRdUS5yaoRfC5ihC+MSpwfmE8ucI0DDYTC+O3WjziGq3NFHJ+xYE3EGZK6NtJYXNpgYduaTIhabYTWn4NxBsXXw4sPGpvO263KrE7Pd/DpKS5zBl+ED4UmFJHMiJoX7YlP0iziYXN7bznZUhKsxCf3xjdWsZ+wRTtHZl6ADD0KPUTbUSspzOBfhX5kiMLDCPLaFWv5KmOfGH+ymbCVQfUiBxfmtk9Hw7c/DAEMwgtWR3Vyge/x7LTWknTBljxDCnWvvg0Sf3fOc74P0hsIIlKWk1Z7kNQBXfxYsTg+o5EFSdIiFp/aCgxGnmHqJ1oyUGbTKu8f3JAnm2osx13ZnfiawE0Q7jaVinAQ4VG6C5C3qmfPVmx9GOdhnXPcC1DOpytOtd4z6TWPdHSerHQ/S65lcnVCi4lH9ljE4h88/S+WOdCuTq3lDF9Nd5TRW41HGw8uxw+z5SEj8OmhlITyopYpoIPcisfIIPwHQMjR4l28OgKfw5jsDKSDOUZGEArk40aA1lWSel+8algPOpoqrSAoPk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123564025)(20161123562025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BLUPR0701MB1860;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BLUPR0701MB1860; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0701MB1860;4:t5shyTAkM5VBqx5DdXrtN9oSiKYJo6knVPMo+d1m?= =?us-ascii?Q?O5EEstq6Ca3nQmxsM0htMIX4TP/LqVi/40oer8tBd10+b95B0d59IquKe+v2?= =?us-ascii?Q?FP1BtINpJZczcfCPeqDRxWqnUagJQnrhHzrWpJwKhYOpGoQ50VBYZor9zQYe?= =?us-ascii?Q?NyFquZIE1ounFeGeawwAtsBNOcGG0IeCXv1xRgRrAEhrOCN6q6HQsNgypEKR?= =?us-ascii?Q?UJDMan8Iq4vWErQzSpn9DAvXjvlm7KbB+0ZOxBkk0gkLDCxK9zY+TBxhgVOw?= =?us-ascii?Q?m+3JIOtudZIl46FEVYf2YQAYyrufms5sD8GvGKGjb8DrzE8Eeu6iDZgCiHyR?= =?us-ascii?Q?uhjnvY+XjC4UYAWGoCRkNWRxcbJBJoKLbi8/N4HuiP42qZiJkQD0Zp76qmlc?= =?us-ascii?Q?LyJPqiHQrQjrW6tSIonDnGRprdaKeuEC6HtAhZcEzVV3HciqMBUKGFdZdsXB?= =?us-ascii?Q?sIaq2BpMz17XzZlkh6ZRuredH9TNyCqNjQniOdfYbqDiyog745c/hQdfKZuK?= =?us-ascii?Q?Kb3972imJl442ntcoh/woFhqbURdTfwxPnQfOsC1BG0L2nVZpXQX7wAFnF90?= =?us-ascii?Q?YsMz7niQ/7oOMwHwRGp3Kk7pqRHUJ3RAOivAoWS8Y1awfVJ3j83K8aLXYcfD?= =?us-ascii?Q?0NXXaoq4t6qxAyuONP+lmew0SrjVBqN5LfLg8aSE7GKyfpJkVo+mLuUwZAll?= =?us-ascii?Q?7lyJxiq9F/Un/LxOASK6hBspY7rJw1uttnFGXhEhJc4Oh1MFzftZREzd4mg7?= =?us-ascii?Q?3NGHmrSsGdu5S89KzF6zj573Wut7FHAmTmZk/t9Y6NWYafZz3S9KQuRyTRwR?= =?us-ascii?Q?2gExvXkcKal1Cb7277eJOQvRe/pboJ99TSsfXVDCoBIgQuW3xJYMQManpm/X?= =?us-ascii?Q?OAUoWnqGLUow+fnpdb4+75pdRURj6RoXi2IOu0Sjd+frEl2ZpWQ+FWFhWFR8?= =?us-ascii?Q?w5S25k+g9+LZNwxIDMxCuZ/q32GtMUUotT4V9aCxdH6CcoCgTaT+dC+5E8G2?= =?us-ascii?Q?64budpmUn/psJVK2iSCU32WUHTCTmfJYw2jK1Yv6oWcclB2rdSrJzf5gXrEG?= =?us-ascii?Q?Vc2jE/AGOARMx7GvkSR9Cz60ROyYpUZcfPiLmFbCMY4lYFkFdosplPYDR/L8?= =?us-ascii?Q?54KIzxn5Kfo=3D?= X-Forefront-PRVS: 0337AFFE9A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(39450400003)(39840400002)(39400400002)(39850400002)(39410400002)(189002)(199003)(24454002)(7736002)(76506005)(83506001)(54906002)(50466002)(42186005)(9686003)(38730400002)(72206003)(110136004)(68736007)(53936002)(4326008)(6496005)(6916009)(2906002)(2950100002)(33716001)(97736004)(6246003)(6116002)(3846002)(8676002)(81156014)(25786009)(81166006)(106356001)(33646002)(47776003)(478600001)(4001350100001)(6666003)(50986999)(305945005)(42882006)(229853002)(6486002)(5660300001)(66066001)(105586002)(54356999)(189998001)(101416001)(1076002)(76176999)(7416002)(23726003)(15760500002);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0701MB1860;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0701MB1860;23:QgGWwIAXRtTkhdLINtzyuJ9I/zDWa7g7evnskmJ?= =?us-ascii?Q?j4uhj4CDB9t/QV3EFEW6/TYP3JDY1lQXSm+yvjw/V294g4GUI2KQhmfFHVvo?= =?us-ascii?Q?zMDgI6Deuf2yWefgh7rQ138qO9bhXdjw8dQBDTw20cbLCVTnGflkwo0wzGCg?= =?us-ascii?Q?6F9VH2EJeiyX4KirPj22sBgenqYWdJ0WmyteFmxusIXkV7dXIFBBHvAaD1gb?= =?us-ascii?Q?J+t6vGu7eCgKbItxkv//fyjezAnDT2YtZIlXE1Ky4aTzpq5gUapdN9hY1RQ6?= =?us-ascii?Q?l0dP5xAEl0EXUbh2kKEqzK5ma7femRYLXNX9wCNqPYD9nqG7CH3rYtqGnN6s?= =?us-ascii?Q?clQ7XW1lRB+xxyYNXeCcr++kG+XAJeJfBgmkjunXz7u7oHDXO2aL0K/chd9F?= =?us-ascii?Q?Wr1x1550UTQebBk/bDEuG9FYJNJeVc2Clz88P0XNI/ME/uHFXyGISWzKZKQx?= =?us-ascii?Q?bQ9wJ1WWQ0duWJQZbUiOQ2iyqq/qhwgAmCDgpE9ra6ZlbQhklItX1aFTMfb2?= =?us-ascii?Q?NImByN8htS6aS1zgEKGVOA6SIwu87csfGwgXX1KFqlHB2c3lDVK3ey8iy0Uv?= =?us-ascii?Q?32OwZ2I4z3N0ZXlHjdxKLZGgtbjgaleTvPPrepnK4C9oyA1/veX/G5hi2ac9?= =?us-ascii?Q?bGCDOyE7/xecI/SBvlNZT2B9+Lj405xtt1LR+ygFZH/jSQmChZRt7+b4HIDh?= =?us-ascii?Q?S5vNlgOYhXq6qPOCnuO/D332OA14vcSdGFNjmQtu/lbwEC/4qOX9lvuVxCum?= =?us-ascii?Q?0XUrKI7ZjTVAkNHrhaJb0s+9oats1101cUEzmQbPxwoRaZm2O6ox5ir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sRM8MfGar8yPoF0zRLa8tmRLiSP2HQOJ2PkpujFCWGOIK2eL/9triyyFxQ/qozMryHXtuaJufFntj+9ON/BIGQ2mSgccM7A7wGrSopyF1osdKsNPaoMX6HmgWfccLOxxJws4CA54He8VarB+cPx5q90ZmeFJSDD3amHjbO4qcLK+uFhl6Y5cp62KmkWAgj/yqRIVqaG7p1SQexn+d8offImXniCvjii++JklhX2ZK56eUb2xpamNz8KUKzwvkHd4DYn8BgfWw3d0+eYWjYgcH/MHsptxTCA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2017 11:04:19.2997 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1860 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2246 Lines: 48 On Thu, Jun 08, 2017 at 04:09:50PM +0100, Catalin Marinas wrote: > On Sun, Jun 04, 2017 at 02:59:51PM +0300, Yury Norov wrote: > > All new 32-bit architectures should have 64-bit off_t type, but existing > > architectures has 32-bit ones. > > > > To handle it, new config option is added to arch/Kconfig that defaults > > ARCH_32BIT_OFF_T to be disabled for non-64 bit architectures. All existing > > 32-bit architectures enable it explicitly here. > > > > New option affects force_o_largefile() behaviour. Namely, if off_t is > > 64-bits long, we have no reason to reject user to open big files. > > > > Note that even if architectures has only 64-bit off_t in the kernel > > (arc, c6x, h8300, hexagon, metag, nios2, openrisc, tile32 and unicore32), > > a libc may use 32-bit off_t, and therefore want to limit the file size > > to 4GB unless specified differently in the open flags. > > > > Signed-off-by: Yury Norov > > Acked-by: Arnd Bergmann > [...] > > diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h > > index 1b48d9c9a561..297993c92490 100644 > > --- a/include/linux/fcntl.h > > +++ b/include/linux/fcntl.h > > @@ -11,7 +11,7 @@ > > O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE) > > > > #ifndef force_o_largefile > > -#define force_o_largefile() (BITS_PER_LONG != 32) > > +#define force_o_largefile() (!IS_ENABLED(CONFIG_ARCH_32BIT_OFF_T)) > > #endif > > I may have confused myself with which off_t is 64-bit here for new > 32-bit architectures. Are we referring to the glibc definition, the > kernel one or simply that force_o_largefile() is true by default. > Because the type off_t for 32-bit kernel builds is still, well, 32-bit. > > Otherwise it seems that the first paragraph in the description above > should read "all new 32-bit ABIs on a 64-bit kernel..." but then > AArch64/ILP32 is no longer the same as a new, pure 32-bit architecture. This is all about userspace off_t types, like Arnd told in the comment to patch 13. I'll underline it in the comment to the patch. If it's not enough, I can also rename the config option to CONFIG_ARCH_32BIT_USER_OFF_T or similar. For me it's too much, but if you find it reasonable, I'll do it. Just let me know. Yury