From nobody Sun Feb 8 20:18:32 2026 Received: from baidu.com (mx22.baidu.com [220.181.50.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 B806611187; Sat, 7 Jun 2025 13:17:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.181.50.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749302243; cv=none; b=O4zk5101geuSkdjfv5bR+VAeHWlZgqA/G/lglPT7emvcgkbKThIAdBlm32Y1pj3CCb/gntabFRxudQ8GegDVG4nW+r1bDpMDqZhn6TqPof6bNt+gqlw/4tkcCV1m2yaevUXt9TZMD53uvTjBryk4CvlH9EffjFBgwn8StpfMQlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749302243; c=relaxed/simple; bh=D6/ffpYWsm1WAnxu88V/6bgCFhb8CHWYC8FUk5z0G4w=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=GXJubulb3jvwr/2Ef1UpEwmhQapiCZdNrcBCENTUYK21fSe0KNiCPfsC6WjKVsXPs+kd2qFKPr1kt13dVCbPyC0BoaMGrTZjDuELU+c+tp4rz46iYCp4owbeuva3jmjpcgyI8XG6x78slP+tSKWQqkNs/lxnMnJauEYbbwVFsiE= 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=220.181.50.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 v2] fs/proc/task_mmu: add VM_SHADOW_STACK for arm64 when support GCS Date: Sat, 7 Jun 2025 21:15:25 +0800 Message-ID: <20250607131525.76746-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: bjkjy-exc5.internal.baidu.com (172.31.50.49) 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 27972c0749e7..2c2ee893a797 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -994,6 +994,9 @@ static void show_smap_vma_flags(struct seq_file *m, str= uct vm_area_struct *vma) #ifdef CONFIG_ARCH_HAS_USER_SHADOW_STACK [ilog2(VM_SHADOW_STACK)] =3D "ss", #endif +#if defined(CONFIG_ARM64_GCS) + [ilog2(VM_SHADOW_STACK)] =3D "ss", +#endif #if defined(CONFIG_64BIT) || defined(CONFIG_PPC32) [ilog2(VM_DROPPABLE)] =3D "dp", #endif --=20 2.36.1