From patchwork Thu Feb 8 08:48:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 198228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp30433dyd; Thu, 8 Feb 2024 00:51:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXCkw+E4rNqG35OuBjXrZCxMpVedejiMpgZThz1Nnp3IFagias+/RU5PEshnmRxcG79HoGcV9sc/eE1Q0XrHpFlEQKQDA== X-Google-Smtp-Source: AGHT+IF1pquOjbCiQpVHU2tc+7NCjtRwWMD5sL5H4Dgw4J/Gi1ySU/VORFideynZG0SXJPNop2t0 X-Received: by 2002:a05:6a21:920b:b0:19c:6620:483c with SMTP id tl11-20020a056a21920b00b0019c6620483cmr3442977pzb.23.1707382270402; Thu, 08 Feb 2024 00:51:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707382270; cv=pass; d=google.com; s=arc-20160816; b=k8O5uLhZTZhbtG18m71tg3Y2Pm4EqBT7wz+2tVWHqHb1p8WdyTmUUHn9M45Ec3tqw7 8nGB7gWIr2St8I70mpipPvSncrjwUrMBIg6JP53ViGqks0ND6AIoMgCjLU5SMNrJL3Pw JdA7dcTum9KK0Wq4BxjJk7NkEbeRA0niVqG5WPG/yuCsQHllNUl2eV4P5TeZsN+t0n1Z SFBl0c6PpJFXT0iSTil5OQH+2FpCLm51BM/G1Kun7c8gL54eIpjq64KfVNNLlbSHDq+7 5KCVWW0ekmSqlnt/MwIA0DpBJJDkJT1/XfOWjFV/PfI4x2YO0m2zlh56U5JncWozAdk+ sROA== ARC-Message-Signature: i=2; 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; bh=IKH1KhUWqJKUs6qFUuiRtCy++XxtyFLICHDLmwUSt6g=; fh=tCv3yZE6WDIMy/jqJZmU3jcVFcEkpvXgBDw53ZfAPYU=; b=rmBB6Xb+rILkWhKoPgjSmL1NVp6xFsCbigfa0/F7GeWkOWSdC8+d5my4lzcFirzRaI vo2qq3qXA5lH1Dmgz+7svMxsFTBCbTrTpyi98pEIK9JzAQ3ltZIkvbJR/ZoWt/dezK8+ VMmCxQhhZu73bR1UCN5wUjTGHgtYc0O5IPGSsf2WFnjjKhpKJc8xfPJeffpvctUMFTr+ Zb2iEoPwQEkVMTB9No6e0+Ruk2OH2rEysMTB+2GBz9kIIyLheMqRLn1Bm3LZ9pkrfMuk HUVubtbhV38j964jkmyLr7k8XqkFzzwTSHFnwaCcJbJXlQzhh4oUrkVdbks4Zrm7sY28 1Dmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-57658-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57658-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCUw8HLzgJ10ef5nIfAgsGybXx0qRnwI7peVs96L52Bkxw5/HxZkltktxTqCB0+DQHouJQ1ZSm8nEPVBHynf990QeEredQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f24-20020a637558000000b005cf5895bfa6si3449091pgn.814.2024.02.08.00.51.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:51:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57658-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-57658-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57658-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3DA38281A70 for ; Thu, 8 Feb 2024 08:51:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A56426BB56; Thu, 8 Feb 2024 08:48:17 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15B03535DC; Thu, 8 Feb 2024 08:48:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707382096; cv=none; b=TkhG1FNAScBVz1u8Fku4phIJ4141RgWDDzfEPykNSrUAoSAdMgmMfnryh8LQN9gdBDCtI6DSTKTdLH8Xu4YlDHmwyFQI1QvPG2aQP0UVwhPxmRZ9He2a1tLXYC1GhmO7pf3+l3Bc1FgvnxusQuSlVKisO9xCwYF2ZkyaeX3rxcs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707382096; c=relaxed/simple; bh=6KDIdGnLvGPYx6pxiwel3ZAd2B57/3ZoEDOIO6r0yZk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=aQl3cv4PuJvKvMmF+snGP3kYMzNN8QEeM2A7NBSRgl0tgR8D+vEFyw8e1F+9dzX/IkWi0IDKagsf/BSUOKmpR+e/FfODK/WDfoVvbag64B6755l9O0bLeAdl1fCDZU8X63RsXZYiP1bX0LCTRvUchcas1OWfMDqf52xSAzUI8c0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 624F51FB; Thu, 8 Feb 2024 00:48:54 -0800 (PST) Received: from a077893.arm.com (unknown [10.163.44.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ECCCB3F762; Thu, 8 Feb 2024 00:48:09 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Andrew Morton , David Hildenbrand , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH] fs/proc/task_mmu: Add display flag for VM_MAYOVERLAY Date: Thu, 8 Feb 2024 14:18:05 +0530 Message-Id: <20240208084805.1252337-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790320071392187110 X-GMAIL-MSGID: 1790320071392187110 VM_UFFD_MISSING flag is mutually exclussive with VM_MAYOVERLAY flag as they both use the same bit position i.e 0x00000200 in the vm_flags. Let's update show_smap_vma_flags() to display the correct flags depending on CONFIG_MMU. Cc: Andrew Morton Cc: David Hildenbrand Cc: linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: David Hildenbrand --- This applies on v6.8-rc3 fs/proc/task_mmu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 3f78ebbb795f..1c4eb25cfc17 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -681,7 +681,11 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) [ilog2(VM_HUGEPAGE)] = "hg", [ilog2(VM_NOHUGEPAGE)] = "nh", [ilog2(VM_MERGEABLE)] = "mg", +#ifdef CONFIG_MMU [ilog2(VM_UFFD_MISSING)]= "um", +#else + [ilog2(VM_MAYOVERLAY)] = "ov", +#endif /* CONFIG_MMU */ [ilog2(VM_UFFD_WP)] = "uw", #ifdef CONFIG_ARM64_MTE [ilog2(VM_MTE)] = "mt",