From nobody Fri Dec 19 07:52:03 2025 Received: from baidu.com (mx24.baidu.com [111.206.215.185]) (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 219E2FC08; Sat, 7 Jun 2025 06:09:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.206.215.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749276567; cv=none; b=ldgPTGWmeHXj7TrN8ErrB+H038w42ZDdkB9U7lS4B6hgSivHWYyDgrw3NCGSPVa+U2sq4wRA3kEayyd5MbK1jBEj47UJ6fu1PDi4YrPYyAvcp72H09BZOzfo8PzHEiHN4VlceCVYlOSzebERuOkwR2RbzkbQS2J8RzgaMARHrIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749276567; c=relaxed/simple; bh=IBMfgv0TJDU47IZLyFfamPfNwFKl59FdPkCRNELR6ds=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=tBljx9knO3vDJk9qm16h/5iDVMosk/1D1wmZaxpAzIIPSnCr1ynzD739zBtedC62bMKBVzfp7MOl9IpxVs3kaU0556fboapXMCR2jIhGZh73YRHfAhcN5NZhM8w9Va1RKxT9VCdSiB6z+Qwr0tOx9ynmza8TKUzpIweMMQ1oSlg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com; spf=pass smtp.mailfrom=baidu.com; arc=none smtp.client-ip=111.206.215.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baidu.com From: wangfushuai To: , , , , , CC: , , wangfushuai Subject: [PATCH] fs/proc/task_mmu: add VM_SHADOW_STACK for arm64 when support GCS Date: Sat, 7 Jun 2025 14:07:41 +0800 Message-ID: <20250607060741.69902-1-wangfushuai@baidu.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: bjhj-exc8.internal.baidu.com (172.31.3.18) To bjkjy-mail-ex22.internal.baidu.com (172.31.50.16) X-FEAS-Client-IP: 172.31.50.16 X-FE-Policy-ID: 52:10:53:SYSTEM Content-Type: text/plain; charset="utf-8" The recent commit adding VM_SHADOW_STACK for arm64 GCS did not update the /proc/[pid]/smaps display logic to show the "ss" flag for GCS pages. This patch adds the necessary condition to display "ss" flag. Fixes: ae80e1629aea ("mm: Define VM_SHADOW_STACK for arm64 when we support = GCS") Signed-off-by: wangfushuai --- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 27972c0749e7..c4c942cc6e72 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -991,7 +991,7 @@ static void show_smap_vma_flags(struct seq_file *m, str= uct vm_area_struct *vma) #ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR [ilog2(VM_UFFD_MINOR)] =3D "ui", #endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */ -#ifdef CONFIG_ARCH_HAS_USER_SHADOW_STACK +#ifdef CONFIG_ARCH_HAS_USER_SHADOW_STACK || defined(CONFIG_ARM64_GCS) [ilog2(VM_SHADOW_STACK)] =3D "ss", #endif #if defined(CONFIG_64BIT) || defined(CONFIG_PPC32) --=20 2.36.1