Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp239197rdb; Thu, 21 Dec 2023 07:55:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDpEBdYDmg+N1fYxbME9QceKedIWw+4+HJF9G0DyXRY1SiDWBFFaq5L06d19UK7w3vaJsJ X-Received: by 2002:a17:906:f899:b0:a26:9d95:a355 with SMTP id lg25-20020a170906f89900b00a269d95a355mr1153048ejb.31.1703174156183; Thu, 21 Dec 2023 07:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703174156; cv=none; d=google.com; s=arc-20160816; b=byIgSVNxxsoaj9MtY89PgOm0rv7NVl8OVGEVKtqADwCXWOkZH7jEG6xSLAmIxD6WgM YEQuYtxxYPwXaYCPfkoxnto6b0upmkq8EvPrDFAq4+23s3oLh+kDsH/bcl6emfO9nd1c bNKAW2ysyz2YqIDfEgGQoi6uK/9fl9O5Ew1nA+Hbaximit+iu/L2mBmCb35w5t1KStIx 1iAvaSz2VbDpAuxDNxECNoIotfNa6nRMwC8R7LBHjpIVQ6D4pStOs2XaL7PITfjggf9X p+3cW+igVzAMAeuCUOO65RnvIa3f5LbSZPTfNDvLiR1d1vevhSez1F9B9UFkaaxJSZ0w bxFQ== 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=IX4TR1Z6kInRWdz2aZTFQN8+TeKHPfxTnj5uDvmUZaI=; fh=+2B64yVuborNRhR0hRJ4G06jDIODc2br0dk92JgFIMw=; b=FfE1wN4ccmAFlDVhJE48MO5IXuBHii6NUL4G7JN+zABaE4sHdtVcwVlxgFS0kN5NMX pXELE9Ar4ZuW6L0Qa6tG+A5jCjgDO3nZZNdaYPsp8XLdotFoOQBPBUPp7Xs28hIxlg2U JcMWaHfP97IEOcnp7TbiFJ42uG7/+6l52pjfYU5bHCFpSslY27YZgRiN6sgPjuHfckrR k5K7F70BrD5VLyme4bl/5rkJytc/K4JFedIO3jn/tNWohwGLR77N8l2fFYfxdtaxO3TG h1e3cQDjgHi3f2pVO2uP4sCt9dXq7/pP1I+K3NRHr7GdSgQ8O08yToxefuEX0983mpTX 6k0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VrvCX2NR; spf=pass (google.com: domain of linux-kernel+bounces-8702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8702-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. [147.75.80.249]) by mx.google.com with ESMTPS id gw15-20020a170906f14f00b00a234da380a1si906181ejb.652.2023.12.21.07.55.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 07:55:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VrvCX2NR; spf=pass (google.com: domain of linux-kernel+bounces-8702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8702-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 AA8091F29212 for ; Thu, 21 Dec 2023 15:47:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C12E153A08; Thu, 21 Dec 2023 15:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VrvCX2NR" 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 08192539FB for ; Thu, 21 Dec 2023 15:47:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51CF0C433C8; Thu, 21 Dec 2023 15:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703173630; bh=kiqcXfXL35XMTeW6LgSFV5UBR45DHKjf0aHb7WV1Q6o=; h=From:To:Cc:Subject:Date:From; b=VrvCX2NRzdN56Vj6vo6B2owEq0363n04aNvjwwnCDzGzAwP8C+WlYYEAG/YbPxFYc X9q0XurKsMmHBVFyXRtadePJJoRivLqTBgfiZGPCkiM1ByqZbFYi84FbeUlIBdd5ya pIBVPuyfrZKqxUTH61mHbux0ojhnBR3oowvTfilT9EUNm6EEG7JrWrMNTYGsRXydOS KJb+/QUX1wz04E5XjTEOB7bRQ9wowlmjjzxpiuFnvvTUadPEsFeXTsdXyiZVxuftOx 2KZry1dmY59wIrVGh1jY5rRbi1Dl8fVj+ES2RmLwjP5TXwxa/+LRRZ3EOxFIubJiLE DSz5aN2+eY0Gg== 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 V2 0/4] riscv: mm: Fixup & Optimize COMPAT code Date: Thu, 21 Dec 2023 10:46:57 -0500 Message-Id: <20231221154702.2267684-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: v2: - 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 | 9 ++++----- arch/riscv/include/asm/processor.h | 6 ++---- 2 files changed, 6 insertions(+), 9 deletions(-) -- 2.40.1