Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp743272rdb; Fri, 22 Dec 2023 03:57:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfF2b4TbuYO09ua0lzu3W+BNdth3brYSsZjsM2KfpOLc4P5Sb6iGXnYbTdg2AGDlms87lh X-Received: by 2002:a50:955c:0:b0:553:367e:6ada with SMTP id v28-20020a50955c000000b00553367e6adamr648261eda.5.1703246238724; Fri, 22 Dec 2023 03:57:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703246238; cv=none; d=google.com; s=arc-20160816; b=ROc2+Z40urAVaQ0cuVxA1GbN9d1XkiwaO1nubR/2DCqdLLR65JBRILooAA+5RFZe/C 9QAvUBhtbxsJSiF6lKzbwHQAZaYDTD+STWFu3xrvzUGaJDdOKDRQ9qt2wgllOzx+V5iI AJE/bmGSNgwKKKyA/pNEOdBjJ3e6ygTbCJc8ywF7kNuigiq5S2VYLkZiQz0odQvI5ZjU SpMHG4ddWXDAJfsnADrl3al3hX2sYAzo/eqzg4Azds9Zr0z0fwvBAcv3yucqqpCXbnlW s4O6GYqEB0jdd8mgEA22Ps3M5u/yZqWcqLVd+R/pSdiwoeTEgyGVTgC70OfzGn173WyX jcYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=x4NgPLPu9qnBzOH3Ly5VnGs0ir7hNN0GQQwy6mDqrOw=; fh=+2B64yVuborNRhR0hRJ4G06jDIODc2br0dk92JgFIMw=; b=yEmiTQ/ZRSDJLAgp8gyW0WEXxVVa9cy9esV+qeTl/z2he2UiIjR9vzvRiRKxKy+WqS irf3N7mtgYX7QnRMArsNg9zLM3cvbtcZTCBgbgUesdgs7U1tgNcqhr3ngsRtGcDHDJaK pfZMXBsana8KhrbNva0nepAF9vuJUaOPCAJwjWmp9a8k4qUnSRIQ230Pu+Z5whU9Mm4j tpJxXrJv1dK+cp25BbJ2J45NNqKo+FJbt/tL9e5sw+l3U6oBVux48Lsx+vpu83HRxLL/ KErBLFN0QvgWtcPlgZZdNRhIylXivAyrAiV8nEbsyOhAPXTbrnMidwwRQ03WURgJcqun 0g8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hgCgP9Hk; spf=pass (google.com: domain of linux-kernel+bounces-9678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v14-20020a50d58e000000b0054b71b1dd94si1763322edi.599.2023.12.22.03.57.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 03:57:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hgCgP9Hk; spf=pass (google.com: domain of linux-kernel+bounces-9678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 47E6A1F244EF for ; Fri, 22 Dec 2023 11:57:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D4B517995; Fri, 22 Dec 2023 11:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hgCgP9Hk" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B776C17983 for ; Fri, 22 Dec 2023 11:57:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D50EEC433C8; Fri, 22 Dec 2023 11:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703246230; bh=5kuuzvzsTLj+b569PmL/dnbV7dULNml61yAjeVKDzIQ=; h=From:To:Cc:Subject:Date:From; b=hgCgP9HkXEwZHkP1Pup6spJ03f0E19AJjTl5UpglvdkcM6BudaR5a++14mPhrrPab bk6qY6HzJK8JOg5GwVC06aXwEs2fZ25n95/SGPU1unTT7pmrV55NsPiJKHu+P3Nxrs bqgyvBQw0nB8YE2jBMRJhowZsHX81LYW8b+wFt6ekZZk1f+YAlJ+XftF73RydTD3zc FcOGamCgjiFglkfTQkT/NopwYvyv2iw0ixFlejMTDAD8uo9KuJgbNegmBVlxQuwIIT ne/rCC5KPrwdcaQR3junEXDD41vUxKRJXMHUGWZzHVNe5mmHN37P5jT3MJlZN9j59d 0DbttuZ/gAIqw== From: guoren@kernel.org To: linux-kernel@vger.kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, alexghiti@rivosinc.com, charlie@rivosinc.com, xiao.w.wang@intel.com, guoren@kernel.org, david@redhat.com, panqinglin2020@iscas.ac.cn, rick.p.edgecombe@intel.com, willy@infradead.org, bjorn@rivosinc.com, conor.dooley@microchip.com, cleger@rivosinc.com, leobras@redhat.com Cc: linux-riscv@lists.infradead.org, Guo Ren Subject: [PATCH V3 0/4] riscv: mm: Fixup & Optimize COMPAT code Date: Fri, 22 Dec 2023 06:56:59 -0500 Message-Id: <20231222115703.2404036-1-guoren@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Guo Ren When the task is in COMPAT mode, the TASK_SIZE should be 2GB, so STACK_TOP_MAX and arch_get_mmap_end must be limited to 2 GB. This series fixes the problem made by commit: add2cc6b6515 ("RISC-V: mm: Restrict address space for sv39,sv48,sv57") and optimizes the related coding convention of TASK_SIZE. Changelog: v3: - Remove wrong modification of arch_get_mmap_end - Remove is_compat_task optimization - Update comment log v2: https://lore.kernel.org/linux-riscv/20231221154702.2267684-1-guoren@kernel.org/ - Separate rename from fixup - Add STACK_TOP_MAX fixup for compat - Add Cleanup & rename patches v1: https://lore.kernel.org/linux-riscv/20231219111701.1886903-1-guoren@kernel.org/ Guo Ren (4): riscv: mm: Fixup compat mode boot failure riscv: mm: Fixup compat arch_get_mmap_end riscv: mm: Remove unused TASK_SIZE_MIN riscv: mm: Optimize TASK_SIZE definition arch/riscv/include/asm/pgtable.h | 7 +++---- arch/riscv/include/asm/processor.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) -- 2.40.1