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: 13549435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43AE6C4828F for ; Thu, 8 Feb 2024 08:48:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9D8266B0071; Thu, 8 Feb 2024 03:48:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 988AC6B0074; Thu, 8 Feb 2024 03:48:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 876D36B0075; Thu, 8 Feb 2024 03:48:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7A0B26B0071 for ; Thu, 8 Feb 2024 03:48:15 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EA31216098F for ; Thu, 8 Feb 2024 08:48:14 +0000 (UTC) X-FDA: 81768009708.13.99886F9 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf01.hostedemail.com (Postfix) with ESMTP id 4CA5F40012 for ; Thu, 8 Feb 2024 08:48:13 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf01.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707382093; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=IKH1KhUWqJKUs6qFUuiRtCy++XxtyFLICHDLmwUSt6g=; b=Slhor+eCAhSmxmlo7aTyOACXdHp/mjmbSMMwAGoskfNdsczfBy2+funYaan4CQaD7ahsyI 5sTD9iejM5PP9wzI65SJLpsZjKWfMi3N6rHK+VbUJHBx/ni9Fkep2yOOXQvI3jqAWTBEYH jSl61nqzM00s+Cem8YhM9ueybnDPVac= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf01.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707382093; a=rsa-sha256; cv=none; b=0wiuGyAmESacElHFcQ4yBbqwwPe3gr7v6Z7/gsm2FSoVvD/WkHEqVgzSbaqWjrPoJSMifw FVWYRib68iElpwKmNaC8uEV9keEkcLKNsfYJOXe8KENa5xGFpsp69HVJ6CWKJXgU4UaBQt kd9FMfdmWaRKRNeFH0GCfWUEGv4qYvk= 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 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4CA5F40012 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: g3dfuzef88uod4h4adnffinudeb1oan6 X-HE-Tag: 1707382093-484848 X-HE-Meta: U2FsdGVkX1+F5Mufy/QJZ+mR075YsIy01sWtGgmcQHClJ3YTXIMEx3qs99uiIwDSv/Z3kLFJuu2jDvfJgQzMmc+unCihyr3dp087GRG7Y/eIo5e+kFgAUqm/EtiQCWV3DNF0bi7papz+12+JZawEFoqCu7yEuhSmDLL4WpbuFSRnm9xA1iG8McrVpw0mqfXdHb/HXImq49eYegNBFD0tauVn8Sor3VEOJRlR6wdkm2xp0XWgrZ03rNmOrIM1iHr9d0bqrzHA3HGWsGn5X20F7bL3MTNoZWmyvZJLy5Z1UOBoyzj0CcU5icHvRPVD5Cce0oswOnlJKgYJdjIFarqfYHEs1Kqtr6ZOqDwDlnaRT0jm02wxpzJ2k0swdYIaF56KTgJvsvFhdpjUYMxopVQCVpmug0FBfKaMa/GfALaIlCK7wZWW5H2OOvUCPt++pTqqzqoNNIXHr6CDkWa1WxeS+uk7rnp9ZHM6ZIm50eytGtGM+6PSg6CElCkZWi6yxLrWKusjdXJ7xmVpbHCKM0akzavMbiubSUBH3OEH0FsjyQtGy5Hu7ELopWu+7fBQ3tOPeSFTblrBumlECd7Bj4BXwXlwXua/IUZ409CWjbmmaUPxLscfMFtXWbElmuDPeQo6sGmmsd5QiIeWrC9aMCkAuMzwDDlYN4XydcxFXwcJw4VnLFCdCDTrmuQgmZoielxWCCWRaN/jKDuGnORU3uDxOUh1M3UaLcDmAM5YLViXHypGd4Re2fLByXAXCiB+l3uVZpbuBrYt0gpYJ6qXCeTBivEXMryDRQernvGSAcSy5EnXDQs5G15zTZHANuaozPtHded3QlaXp0A4MnWZbGbP5Y80wTQhswndVdLKB6WUUKg48HgAEbkCzu1J/4dfblw7roqX1hYOqrIXdKgKta4gw2quSS5pVfg+unIH0RJsY4eNcSK8nKOdq1bb1wC8Nzf+MrPY2MqLCyj5OptqPhT kr64g8RQ blQU+/GhAR3uYwkimAhrHioPTdV/yQbd7it25JqsDFXhJCXzrv7dUT9UWz9Vs7J55GzASS9dlQX4Qq0lMJMGy/7j9elv6hkUhirzPsu7R2mQFwewKz7eIhQzLT3kthd3butyLM4jCoqVTDpIXLxNZ3XDvdgBsXCFAx1i2OSRi6ZCc2CofNFATugHAjq7+M6xD4XNQ8HVXhGMfecRMfdRSAYo9dRaLs98JRvHlIRhpbfPtvQnHqKo31Rwv/ApC47qHXXFB51mtFHra1ewM4Kgofg4xnVHDYIrfqNgNOaI5QofEcJYKG9C/Q0i6UvMIAIVN9GOmSclCOEMz8Dn4uo7wis3Lrg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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",