linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Harshvardhan Jha <harshvardhan.j.jha@oracle.com>
To: akpm@linux-foundation.org
Cc: harshvardhan.j.jha@oracle.com, linux-mm@kvack.org,
	stable@vger.kernel.org
Subject: [PATCH 5.4.y 2/4] mm: fix ambiguous comments for better code readability
Date: Thu, 14 Nov 2024 07:34:41 -0800	[thread overview]
Message-ID: <20241114153443.505015-3-harshvardhan.j.jha@oracle.com> (raw)
In-Reply-To: <20241114153443.505015-1-harshvardhan.j.jha@oracle.com>

From: chenqiwu <chenqiwu@xiaomi.com>

commit 552657b7b3343851916fde7e4fd6bfb6516d2bcb upstream

The parameter of remap_pfn_range() @pfn passed from the caller is actually
a page-frame number converted by corresponding physical address of kernel
memory, the original comment is ambiguous that may mislead the users.

Meanwhile, there is an ambiguous typo "VMM" in the comment of
vm_area_struct.  So fixing them will make the code more readable.

Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1583026921-15279-1-git-send-email-qiwuchen55@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 552657b7b3343851916fde7e4fd6bfb6516d2bcb)
Signed-off-by: Harshvardhan Jha <harshvardhan.j.jha@oracle.com>
---
 include/linux/mm_types.h | 4 ++--
 mm/memory.c              | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 2b3b2fc1cb33f..afbe3056a8d7c 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -284,8 +284,8 @@ struct vm_userfaultfd_ctx {};
 #endif /* CONFIG_USERFAULTFD */
 
 /*
- * This struct defines a memory VMM memory area. There is one of these
- * per VM-area/task.  A VM area is any part of the process virtual memory
+ * This struct describes a virtual memory area. There is one of these
+ * per VM-area/task. A VM area is any part of the process virtual memory
  * space that has a special rule for the page-fault handlers (ie a shared
  * library, the executable area etc).
  */
diff --git a/mm/memory.c b/mm/memory.c
index 238064ef73ae8..50503743724cc 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1922,7 +1922,7 @@ static inline int remap_p4d_range(struct mm_struct *mm, pgd_t *pgd,
  * @vma: user vma to map to
  * @addr: target user address to start at
  * @pfn: page frame number of kernel physical memory address
- * @size: size of map area
+ * @size: size of mapping area
  * @prot: page protection flags for this mapping
  *
  * Note: this is only safe if the mm semaphore is held when called.
-- 
2.46.0



  parent reply	other threads:[~2024-11-14 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 15:34 [PATCH 5.4.y 0/4] Backport fix of CVE-2024-47674 to 5.10 Harshvardhan Jha
2024-11-14 15:34 ` [PATCH 5.4.y 1/4] mm: clarify a confusing comment for remap_pfn_range() Harshvardhan Jha
2024-11-14 15:34 ` Harshvardhan Jha [this message]
2024-11-14 15:34 ` [PATCH 5.4.y 3/4] mm/memory.c: make remap_pfn_range() reject unaligned addr Harshvardhan Jha
2024-11-14 15:34 ` [PATCH 5.4.y 4/4] mm: add remap_pfn_range_notrack Harshvardhan Jha
2024-11-14 15:51 ` [PATCH 5.4.y 0/4] Backport fix of CVE-2024-47674 to 5.10 Harshvardhan Jha
2024-11-15  5:27   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241114153443.505015-3-harshvardhan.j.jha@oracle.com \
    --to=harshvardhan.j.jha@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox