Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3310196imj; Tue, 19 Feb 2019 00:57:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IYSy5y+rvy9P6NT7Ic1fBm5pM08Q506awIy5r6iYdLe7Q+owbYIOdWlFOcVqRJGnsVgT3XG X-Received: by 2002:a62:1e82:: with SMTP id e124mr19040022pfe.258.1550566631004; Tue, 19 Feb 2019 00:57:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550566630; cv=none; d=google.com; s=arc-20160816; b=wh0FZw5Vw8ottkURE/DAa4VT1lVij4eaVJOC6HvLJy+gSyam8LKhf69LdGPZavnst+ 1faRBoRBb3JGtSgjbj2w/S5TOroWKUL2NbXtdjD1cGi6hFejZz6IDbSGP6eSMncrX5qs UBYxxz8ddblhTS0MgTJj+e9DQhYTs99bzaFbMiCQtAk7DsUBBaV5iTL3qcDI9Qp62Vly SdXzjy92NSkULAQvF4qptzFAC8FPsDmjDCXsDJUccTO/LQ8ZfQXmoB36WcoCr/6PTTon igvf08z7MqDf+O4xb0lxHGYl682MSOpXvLzAGE4u9hCfh8O0qyhKpF7PkSDXsMr+zVS1 MiFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=/Z96Mit5A0RP1D3yPXOdSSsquopD04jVi68cG2LIdIw=; b=OuXxAGAZ7qGFN1cKQSpEDjQeH2mMSb0h1EVhiij9zF6O7Bm/LddzSzv65oTJSOAj6J xI2UrZXPPHp0/Whwu0n1I1N02YaQmdNWH3JUVv8HEh+8mBcdGhAONZC1rgl/4KQllyu2 cKfyOyReVuJE2nGGpbs5YolSSeBQipFB/cbWNp05UD5pOYcL6+ploQK1uJsZS2wh8O5W Ff0+5EuhiKhb24L6Su/en2EnDYfEYd18lwCzuaC8Lq/Fxk+vjGM97zoSTLjDSV4m08hk cniEiperS+3mYbcSZms56DRzPIGYyXEwzneGyxLTf3aiqFqRGKE4ZLPLEYLgv+BnqubZ ZX9g== 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 c142si15687776pfb.33.2019.02.19.00.56.55; Tue, 19 Feb 2019 00:57:10 -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 S1727766AbfBSI4e (ORCPT + 99 others); Tue, 19 Feb 2019 03:56:34 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:42279 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfBSI4e (ORCPT ); Tue, 19 Feb 2019 03:56:34 -0500 Received: by mail-vs1-f66.google.com with SMTP id b20so11237261vsl.9; Tue, 19 Feb 2019 00:56:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/Z96Mit5A0RP1D3yPXOdSSsquopD04jVi68cG2LIdIw=; b=I8FPUwRKDj+ozMbiIE5QYGRa6AF8g0BQ4SElOj7bx/LRr+JWa4uMHXfOPxEjpN0rxY lTtPqUghIovbC4QtCDkTJFaYE8MwynESbNyuaoYosGqjHS1OpCt/pojtbi1p8aaRpByi Qec0uKGsVk8VIo4WPYbyUo4abbkyGUdWf2ySmC0jdGJ6xEh5xdey+TQ4FqhikTbZOYye HYrSB05RWBhi/D2hV7myEUgl0wYrZqLfsYdaq7yjW+SecFx7CZnBRMxCPs/QqspKtdmK hqxSWxRB03UzAHDyX8tqMOPRdjTM8sR+PC4urW+Z1tXABLsk7YHcek8cnskpfkmPlGsQ TaHA== X-Gm-Message-State: AHQUAuYSUnRWGuKvUByuOJnKbd3kXugUdwWjxRT9Dv78EqC7AIKaoDoU gZC+Ef8zNoNRziwiGa87wX92vJdIeDPTMKUL1nBywBMz X-Received: by 2002:a67:ead0:: with SMTP id s16mr10597233vso.63.1550566592527; Tue, 19 Feb 2019 00:56:32 -0800 (PST) MIME-Version: 1.0 References: <20190218210712.3503891-1-arnd@arndb.de> <20190218210712.3503891-3-arnd@arndb.de> In-Reply-To: <20190218210712.3503891-3-arnd@arndb.de> From: Geert Uytterhoeven Date: Tue, 19 Feb 2019 09:56:19 +0100 Message-ID: Subject: Re: [PATCH 2/8] 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option To: Arnd Bergmann , Yury Norov Cc: y2038 Mailman List , Thomas Gleixner , Linux-Arch , Linux API , Linux Kernel Mailing List , Linux ARM , "open list:QUALCOMM HEXAGON..." , "moderated list:H8/300 ARCHITECTURE" , Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , linux-riscv@lists.infradead.org, Guan Xuetao , Yury Norov , Yury Norov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Yuri, On Tue, Feb 19, 2019 at 3:35 AM Arnd Bergmann wrote: > From: Yury Norov > > All new 32-bit architectures should have 64-bit userspace off_t type, but > existing architectures has 32-bit ones. > > To enforce the rule, new config option is added to arch/Kconfig that defaults > ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing > 32-bit architectures enable it explicitly. > > New option affects force_o_largefile() behaviour. Namely, if userspace > 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, nios2, openrisc, 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 > Signed-off-by: Yury Norov > Signed-off-by: Arnd Bergmann > arch/m68k/Kconfig | 1 + For m68k: Acked-by: Geert Uytterhoeven > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -276,6 +276,21 @@ config ARCH_THREAD_STACK_ALLOCATOR > config ARCH_WANTS_DYNAMIC_TASK_STRUCT > bool > > +config ARCH_32BIT_OFF_T > + bool > + depends on !64BIT > + help > + All new 32-bit architectures should have 64-bit off_t type on > + userspace side which corresponds to the loff_t kernel type. This > + is the requirement for modern ABIs. Some existing architectures > + already have 32-bit off_t. This option is enabled for all such s/already/still/ > + architectures explicitly. Namely: arc, arm, blackfin, cris, frv, > + h8300, hexagon, m32r, m68k, metag, microblaze, mips32, mn10300, > + nios2, openrisc, parisc32, powerpc32, score, sh, sparc, tile32, > + unicore32, x86_32 and xtensa. This is the complete list. Any Do we really need this list here? It's intended to shrink only. It includes removed architectures (blackfin, cris, frv, m32r, metag, mn10300, score, tile32), but lacks several new ones affected by this patch (c6x, csky, nds32, riscv). > + new 32-bit architecture should declare 64-bit off_t type on user > + side and so should not enable this option. > + > config HAVE_REGS_AND_STACK_ACCESS_API > bool > help Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds