From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 764FDC433EF for ; Thu, 20 Jan 2022 14:58:17 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jflxg4kT3z3cNQ for ; Fri, 21 Jan 2022 01:58:15 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=arndb.de (client-ip=217.72.192.73; helo=mout.kundenserver.de; envelope-from=arnd@arndb.de; receiver=) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JflxB3hgRz2yZt for ; Fri, 21 Jan 2022 01:57:49 +1100 (AEDT) Received: from mail-oi1-f177.google.com ([209.85.167.177]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1M7KG2-1nDq8j34H6-007ksd for ; Thu, 20 Jan 2022 15:57:45 +0100 Received: by mail-oi1-f177.google.com with SMTP id x193so9333464oix.0 for ; Thu, 20 Jan 2022 06:57:44 -0800 (PST) X-Gm-Message-State: AOAM5306zZug6V7+ksoRHEn/FHENQzE/v29YB/ziVxk0y2rr+1gbEZOS K18JNL0gabQGUbkygWxRO/XrqbiauvJhhQAt9MI= X-Google-Smtp-Source: ABdhPJwjtLdN6iyHNeRuxhdvl9Y6OeJzbUgAsOZS1tuaBlnRH/pfBDfrQe9jdzUZRHtHuLOgUQesyOgPAeGaNPDH+P4= X-Received: by 2002:a05:6808:9a:: with SMTP id s26mr7926312oic.108.1642690663723; Thu, 20 Jan 2022 06:57:43 -0800 (PST) MIME-Version: 1.0 References: <20220120073911.99857-8-guoren@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Thu, 20 Jan 2022 15:57:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V3 07/17] riscv: compat: Re-implement TASK_SIZE for COMPAT_32BIT To: Guo Ren Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:eKTNCbutx/xV3TxiKiDzs9ZilL3zDgRk6CnJJyB/q1HgmTstKLv xPPlofxN7s5Kun4TthK9Z4AOa+cae2E/4RgDrmI5DIc65e4f+LbSnXBvFBtpL5iY5td7XBo oxWfL6y22BPOBKK9HQBuz8hRodkwokslZ2ui8YfMx1qhPOFAkAzrSUCkClUCeCkc6M6GsMm nXUnCau/K2wysA8Nisofg== X-UI-Out-Filterresults: notjunk:1;V03:K0:+YrgyFcz9pY=:ZKZZ7aR0mUrZMiAB7yaW80 DJiv/qRqBufU/hnMmqXrUzKYfaMH7LbKy5mX8F3BS8SZnqRyd2LJfwVRC6ac1egn7/V5nfD8e 8XfRLsJJCFhjLnEASiabekJIA+rT+lGnRIwIHdTtu+X6ZXYiI1rSNJYDdMbOF+/Ouo44IAQw4 l8PKT7nyowpdw2/x/fhqy2PLRENSP8q6GmF2+gk0X+6IGH7t7szg7Hcv+RFUua9BgtushABVx H3uisBMphWTPmW+ZcYYaGSgo43qYkDu58jCA7oluigaYEBLx1KRwwBw6U/ihN0eT0pc+wNXrI pGn5biHxfpl43/JbEHWaELZsIuvMFsv6eFG9F/KUynWwuiw6fOiwiZRmXnObt1lVNqU05Qc8j hw5Q1FWnzUrAX2jsQh0AZDSqKrPTHLxVLTBk/P4Kxbf/r6/joePiU6ejz6MBiYSxSoyAfD5+N 93COu+B8L0SA+x5qXLkIIS7deoXep5U6yPcxE00yAtMt6O2Nhy8utzwNh5lZ4bIms1HNGKrfe FOYCHL1ejgA9kEED5OW4hEbfWP5M7MWhZ6TLIgr4OeAwE7VA6dY/Rvk3bhzRwsN0c7desD7df w44yqL2u34tVt+ZHl3AFrwMw5+AtEKkEOR5dajkLW3hlud218CWSSsVAub+KZTJvm+fspeRc3 cCtAEr7l/oGroKqPPR0lHs0dAIdvSJTI48emDEXZqRFmkK3w9QTtNIMXfV5R6M6dQF5ipQCNw UUvmDdu94oDaEfdsuK5SeNnhNX2y1zrtvEEtE3YyNjn2Bd6RB7XqC+1fFutkGKp3tTNUsqERH eqZkR2He5ExPpz4UrDF65mVpJLkSvfLsX+5cOu0ivuoGhTo7XI= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guo Ren , "open list:BROADCOM NVRAM DRIVER" , sparclinux , linux-riscv , "inux-parisc@vger.kernel.org" , linux-s390 , Anup Patel , the arch/x86 maintainers , "linux-csky@vger.kernel.org" , Christoph Hellwig , Christoph Hellwig , Arnd Bergmann , Linux ARM , Drew Fustini , gregkh , Wang Junqiang , Linux Kernel Mailing List , David Laight , Palmer Dabbelt , liush , linuxppc-dev , Wei Fu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Jan 20, 2022 at 2:27 PM Guo Ren wrote: > On Thu, Jan 20, 2022 at 8:53 PM David Laight wrote: > > I think the x86-64 32bit compat code even puts the boundary at 4GB. > Yes, we could give rv32 compat for 4GB with some effort. But it's unnecessary. > > There are no history issues for rv32, we use compat mode to reduce > memory footprint. eg: only 64MB memory available. > > At end compat for 4GB is another topic, let's give the initial compat > for 2GB support to riscv. I think it's fine either way. Having the entire 4GB space available is nice when you are trying to build 32-bit software natively rather then using a cross-compiler, as you can just do it on a larger machine that supports both. One example of software that runs into virtual memory size limitations is the gnu linker when building large applications, but it's unlikely that you'll actually need to run applications that run into this, while also needing to build them natively. Using the same limit as on native 32-bit machines can help with compatibility of certain software, but again this is rarely a problem and I have not seen any reports of issues with the 4GB TASK_SIZE_32 on arm64. On x86, there is an option to use the native 3GB TASK_SIZE for compat tasks. This was introduced to work around buggy applications a long time ago, but is probably not used any more in practice. Arnd