All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-highmem-vm_bug_on-if-offset-len-page_size.patch removed from -mm tree
@ 2022-05-10  4:15 Andrew Morton
  2022-05-10  9:58 ` Fabio M. De Francesco
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2022-05-10  4:15 UTC (permalink / raw)
  To: mm-commits, willy, pcc, ira.weiny, catalin.marinas, akpm,
	fmdefrancesco, akpm


The quilt patch titled
     Subject: mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE
has been removed from the -mm tree.  Its filename was
     mm-highmem-vm_bug_on-if-offset-len-page_size.patch

This patch was dropped because it was merged into mm-stable

------------------------------------------------------
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Subject: mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE

Add VM_BUG_ON() bounds checking to make sure that, if "offset + len>
PAGE_SIZE", memset() does not corrupt data in adjacent pages.

Mainly to match all the similar functions in highmem.h.

Link: https://lkml.kernel.org/r/20220426193020.8710-1-fmdefrancesco@gmail.com
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Peter Collingbourne <pcc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/highmem.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/include/linux/highmem.h~mm-highmem-vm_bug_on-if-offset-len-page_size
+++ a/include/linux/highmem.h
@@ -358,6 +358,8 @@ static inline void memcpy_to_page(struct
 static inline void memzero_page(struct page *page, size_t offset, size_t len)
 {
 	char *addr = kmap_local_page(page);
+
+	VM_BUG_ON(offset + len > PAGE_SIZE);
 	memset(addr + offset, 0, len);
 	flush_dcache_page(page);
 	kunmap_local(addr);
_

Patches currently in -mm which might be from fmdefrancesco@gmail.com are



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [merged mm-stable] mm-highmem-vm_bug_on-if-offset-len-page_size.patch removed from -mm tree
  2022-05-10  4:15 [merged mm-stable] mm-highmem-vm_bug_on-if-offset-len-page_size.patch removed from -mm tree Andrew Morton
@ 2022-05-10  9:58 ` Fabio M. De Francesco
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio M. De Francesco @ 2022-05-10  9:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mm-commits

On martedì 10 maggio 2022 06:15:28 CEST Andrew Morton wrote:
> 
> The quilt patch titled
>      Subject: mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE
> has been removed from the -mm tree.  Its filename was
>      mm-highmem-vm_bug_on-if-offset-len-page_size.patch
> 
> This patch was dropped because it was merged into mm-stable
> 
> ------------------------------------------------------
> From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
> Subject: mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE
> 
> Add VM_BUG_ON() bounds checking to make sure that, if "offset + len>
> PAGE_SIZE", memset() does not corrupt data in adjacent pages.
> 
> Mainly to match all the similar functions in highmem.h.
> 
> Link: https://lkml.kernel.org/r/20220426193020.8710-1-fmdefrancesco@gmail.com
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Cc: Peter Collingbourne <pcc@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  include/linux/highmem.h |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/include/linux/highmem.h~mm-highmem-vm_bug_on-if-offset-len-
page_size
> +++ a/include/linux/highmem.h
> @@ -358,6 +358,8 @@ static inline void memcpy_to_page(struct
>  static inline void memzero_page(struct page *page, size_t offset, size_t 
len)
>  {
>  	char *addr = kmap_local_page(page);
> +
> +	VM_BUG_ON(offset + len > PAGE_SIZE);
>  	memset(addr + offset, 0, len);
>  	flush_dcache_page(page);
>  	kunmap_local(addr);
> _
> 
> Patches currently in -mm which might be from fmdefrancesco@gmail.com are
> 
> 
> 
Hello Andrew,

I still see that the list of my patches currently in -mm is empty.

On April 28th I sent v4 of a series.[1] It received two "Reviewed-by" tags,
respectively from Ira Weiny[2] and Sebastian Andrzej Siewior.[3]

Therefore, I assume that the v4 of the series can be considered final. Can
you please take a look at it and either apply to -mm or let me know if
there is anything which should still be improved?

Thank you very much,

Fabio M. De Francesco

[1] [PATCH v4 0/4] Extend and reorganize Highmem's documentation
https://lore.kernel.org/lkml/20220428212455.892-1-fmdefrancesco@gmail.com/
https://lore.kernel.org/lkml/20220428212455.892-2-fmdefrancesco@gmail.com/
https://lore.kernel.org/lkml/20220428212455.892-3-fmdefrancesco@gmail.com/
https://lore.kernel.org/lkml/20220428212455.892-4-fmdefrancesco@gmail.com/
https://lore.kernel.org/lkml/20220428212455.892-5-fmdefrancesco@gmail.com/

[2] Reviewed-by: Ira Weiny <ira.weiny@intel.com> (for the series)
https://lore.kernel.org/lkml/Ym4WSstEQI7yYU0n@iweiny-server/

[3] Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> (for the 
series)
[3] https://lore.kernel.org/lkml/YmuK79YPRAi0fHhH@linutronix.de/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-10  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10  4:15 [merged mm-stable] mm-highmem-vm_bug_on-if-offset-len-page_size.patch removed from -mm tree Andrew Morton
2022-05-10  9:58 ` Fabio M. De Francesco

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.