All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 18:35 ` Kees Cook
  0 siblings, 0 replies; 14+ messages in thread
From: Kees Cook @ 2022-03-31 18:35 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Kees Cook, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

Hi Linus,

Please pull these hardening fixes for v5.18-rc1. This addresses an
-Warray-bounds warning found under a few ARM defconfigs, and disables
long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.

Thanks!

-Kees

The following changes since commit afcf5441b9ff22ac57244cd45ff102ebc2e32d1a:

  arm64: Add gcc Shadow Call Stack support (2022-03-10 09:22:09 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-v5.18-rc1-fix1

for you to fetch changes up to 229a08a4f4e4f9949801cc39b6480ddc9c487183:

  ARM/dma-mapping: Remove CMA code when not built with CMA (2022-03-31 11:19:25 -0700)

----------------------------------------------------------------
hardening updates for v5.18-rc1-fix1

- Disable CONFIG_HARDENED_USERCOPY_PAGESPAN

- DMA: remove CMA code when not buiding CMA

----------------------------------------------------------------
Kees Cook (2):
      usercopy: Disable CONFIG_HARDENED_USERCOPY_PAGESPAN
      ARM/dma-mapping: Remove CMA code when not built with CMA

 arch/arm/mm/dma-mapping.c | 2 ++
 arch/arm/mm/mm.h          | 4 ++++
 include/linux/cma.h       | 4 ----
 security/Kconfig          | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 18:35 ` Kees Cook
  0 siblings, 0 replies; 14+ messages in thread
From: Kees Cook @ 2022-03-31 18:35 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Kees Cook, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

Hi Linus,

Please pull these hardening fixes for v5.18-rc1. This addresses an
-Warray-bounds warning found under a few ARM defconfigs, and disables
long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.

Thanks!

-Kees

The following changes since commit afcf5441b9ff22ac57244cd45ff102ebc2e32d1a:

  arm64: Add gcc Shadow Call Stack support (2022-03-10 09:22:09 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-v5.18-rc1-fix1

for you to fetch changes up to 229a08a4f4e4f9949801cc39b6480ddc9c487183:

  ARM/dma-mapping: Remove CMA code when not built with CMA (2022-03-31 11:19:25 -0700)

----------------------------------------------------------------
hardening updates for v5.18-rc1-fix1

- Disable CONFIG_HARDENED_USERCOPY_PAGESPAN

- DMA: remove CMA code when not buiding CMA

----------------------------------------------------------------
Kees Cook (2):
      usercopy: Disable CONFIG_HARDENED_USERCOPY_PAGESPAN
      ARM/dma-mapping: Remove CMA code when not built with CMA

 arch/arm/mm/dma-mapping.c | 2 ++
 arch/arm/mm/mm.h          | 4 ++++
 include/linux/cma.h       | 4 ----
 security/Kconfig          | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

-- 
Kees Cook

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
  2022-03-31 18:35 ` Kees Cook
@ 2022-03-31 18:46   ` Russell King (Oracle)
  -1 siblings, 0 replies; 14+ messages in thread
From: Russell King (Oracle) @ 2022-03-31 18:46 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Stephen Rothwell, Zi Yan

On Thu, Mar 31, 2022 at 11:35:40AM -0700, Kees Cook wrote:
> Hi Linus,
> 
> Please pull these hardening fixes for v5.18-rc1. This addresses an
> -Warray-bounds warning found under a few ARM defconfigs, and disables
> long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.

I don't see these patches on linux-arm-kernel... are we doing away with
patch review now? :D

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 18:46   ` Russell King (Oracle)
  0 siblings, 0 replies; 14+ messages in thread
From: Russell King (Oracle) @ 2022-03-31 18:46 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Stephen Rothwell, Zi Yan

On Thu, Mar 31, 2022 at 11:35:40AM -0700, Kees Cook wrote:
> Hi Linus,
> 
> Please pull these hardening fixes for v5.18-rc1. This addresses an
> -Warray-bounds warning found under a few ARM defconfigs, and disables
> long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.

I don't see these patches on linux-arm-kernel... are we doing away with
patch review now? :D

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
  2022-03-31 18:35 ` Kees Cook
@ 2022-03-31 18:49   ` Linus Torvalds
  -1 siblings, 0 replies; 14+ messages in thread
From: Linus Torvalds @ 2022-03-31 18:49 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux Kernel Mailing List, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Linux ARM, Logan Gunthorpe,
	Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

On Thu, Mar 31, 2022 at 11:35 AM Kees Cook <keescook@chromium.org> wrote:
>
> Please pull these hardening fixes for v5.18-rc1. This addresses an
> -Warray-bounds warning found under a few ARM defconfigs, and disables
> long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.

Can't we just remove that HARDENED_USERCOPY_PAGESPAN thing entirely?

Yes, yes, I know Matthew did that as part of other patches that is too
late to go in any more in this merge window, but just the removal
patch is a no-brainer.

IOW, why not just do the attached?

                    Linus

[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 4460 bytes --]

 arch/powerpc/configs/skiroot_defconfig |  1 -
 mm/usercopy.c                          | 67 ----------------------------------
 security/Kconfig                       | 11 ------
 3 files changed, 79 deletions(-)

diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index f491875700e8..64176cc12d0e 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -274,7 +274,6 @@ CONFIG_NLS_UTF8=y
 CONFIG_ENCRYPTED_KEYS=y
 CONFIG_SECURITY=y
 CONFIG_HARDENED_USERCOPY=y
-CONFIG_HARDENED_USERCOPY_PAGESPAN=y
 CONFIG_FORTIFY_SOURCE=y
 CONFIG_SECURITY_LOCKDOWN_LSM=y
 CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
diff --git a/mm/usercopy.c b/mm/usercopy.c
index 2c235d5c2364..1ad8c755850b 100644
--- a/mm/usercopy.c
+++ b/mm/usercopy.c
@@ -157,70 +157,6 @@ static inline void check_bogus_address(const unsigned long ptr, unsigned long n,
 		usercopy_abort("null address", NULL, to_user, ptr, n);
 }
 
-/* Checks for allocs that are marked in some way as spanning multiple pages. */
-static inline void check_page_span(const void *ptr, unsigned long n,
-				   struct page *page, bool to_user)
-{
-#ifdef CONFIG_HARDENED_USERCOPY_PAGESPAN
-	const void *end = ptr + n - 1;
-	struct page *endpage;
-	bool is_reserved, is_cma;
-
-	/*
-	 * Sometimes the kernel data regions are not marked Reserved (see
-	 * check below). And sometimes [_sdata,_edata) does not cover
-	 * rodata and/or bss, so check each range explicitly.
-	 */
-
-	/* Allow reads of kernel rodata region (if not marked as Reserved). */
-	if (ptr >= (const void *)__start_rodata &&
-	    end <= (const void *)__end_rodata) {
-		if (!to_user)
-			usercopy_abort("rodata", NULL, to_user, 0, n);
-		return;
-	}
-
-	/* Allow kernel data region (if not marked as Reserved). */
-	if (ptr >= (const void *)_sdata && end <= (const void *)_edata)
-		return;
-
-	/* Allow kernel bss region (if not marked as Reserved). */
-	if (ptr >= (const void *)__bss_start &&
-	    end <= (const void *)__bss_stop)
-		return;
-
-	/* Is the object wholly within one base page? */
-	if (likely(((unsigned long)ptr & (unsigned long)PAGE_MASK) ==
-		   ((unsigned long)end & (unsigned long)PAGE_MASK)))
-		return;
-
-	/* Allow if fully inside the same compound (__GFP_COMP) page. */
-	endpage = virt_to_head_page(end);
-	if (likely(endpage == page))
-		return;
-
-	/*
-	 * Reject if range is entirely either Reserved (i.e. special or
-	 * device memory), or CMA. Otherwise, reject since the object spans
-	 * several independently allocated pages.
-	 */
-	is_reserved = PageReserved(page);
-	is_cma = is_migrate_cma_page(page);
-	if (!is_reserved && !is_cma)
-		usercopy_abort("spans multiple pages", NULL, to_user, 0, n);
-
-	for (ptr += PAGE_SIZE; ptr <= end; ptr += PAGE_SIZE) {
-		page = virt_to_head_page(ptr);
-		if (is_reserved && !PageReserved(page))
-			usercopy_abort("spans Reserved and non-Reserved pages",
-				       NULL, to_user, 0, n);
-		if (is_cma && !is_migrate_cma_page(page))
-			usercopy_abort("spans CMA and non-CMA pages", NULL,
-				       to_user, 0, n);
-	}
-#endif
-}
-
 static inline void check_heap_object(const void *ptr, unsigned long n,
 				     bool to_user)
 {
@@ -239,9 +175,6 @@ static inline void check_heap_object(const void *ptr, unsigned long n,
 	if (folio_test_slab(folio)) {
 		/* Check slab allocator for flags and size. */
 		__check_heap_object(ptr, n, folio_slab(folio), to_user);
-	} else {
-		/* Verify object does not incorrectly span multiple pages. */
-		check_page_span(ptr, n, folio_page(folio, 0), to_user);
 	}
 }
 
diff --git a/security/Kconfig b/security/Kconfig
index 9b2c4925585a..7d639f1b0c4a 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -163,17 +163,6 @@ config HARDENED_USERCOPY
 	  or are part of the kernel text. This kills entire classes
 	  of heap overflow exploits and similar kernel memory exposures.
 
-config HARDENED_USERCOPY_PAGESPAN
-	bool "Refuse to copy allocations that span multiple pages"
-	depends on HARDENED_USERCOPY
-	depends on BROKEN
-	help
-	  When a multi-page allocation is done without __GFP_COMP,
-	  hardened usercopy will reject attempts to copy it. There are,
-	  however, several cases of this in the kernel that have not all
-	  been removed. This config is intended to be used only while
-	  trying to find such users.
-
 config FORTIFY_SOURCE
 	bool "Harden common str/mem functions against buffer overflows"
 	depends on ARCH_HAS_FORTIFY_SOURCE

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 18:49   ` Linus Torvalds
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Torvalds @ 2022-03-31 18:49 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux Kernel Mailing List, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Linux ARM, Logan Gunthorpe,
	Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

On Thu, Mar 31, 2022 at 11:35 AM Kees Cook <keescook@chromium.org> wrote:
>
> Please pull these hardening fixes for v5.18-rc1. This addresses an
> -Warray-bounds warning found under a few ARM defconfigs, and disables
> long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.

Can't we just remove that HARDENED_USERCOPY_PAGESPAN thing entirely?

Yes, yes, I know Matthew did that as part of other patches that is too
late to go in any more in this merge window, but just the removal
patch is a no-brainer.

IOW, why not just do the attached?

                    Linus

[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 4460 bytes --]

 arch/powerpc/configs/skiroot_defconfig |  1 -
 mm/usercopy.c                          | 67 ----------------------------------
 security/Kconfig                       | 11 ------
 3 files changed, 79 deletions(-)

diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index f491875700e8..64176cc12d0e 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -274,7 +274,6 @@ CONFIG_NLS_UTF8=y
 CONFIG_ENCRYPTED_KEYS=y
 CONFIG_SECURITY=y
 CONFIG_HARDENED_USERCOPY=y
-CONFIG_HARDENED_USERCOPY_PAGESPAN=y
 CONFIG_FORTIFY_SOURCE=y
 CONFIG_SECURITY_LOCKDOWN_LSM=y
 CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
diff --git a/mm/usercopy.c b/mm/usercopy.c
index 2c235d5c2364..1ad8c755850b 100644
--- a/mm/usercopy.c
+++ b/mm/usercopy.c
@@ -157,70 +157,6 @@ static inline void check_bogus_address(const unsigned long ptr, unsigned long n,
 		usercopy_abort("null address", NULL, to_user, ptr, n);
 }
 
-/* Checks for allocs that are marked in some way as spanning multiple pages. */
-static inline void check_page_span(const void *ptr, unsigned long n,
-				   struct page *page, bool to_user)
-{
-#ifdef CONFIG_HARDENED_USERCOPY_PAGESPAN
-	const void *end = ptr + n - 1;
-	struct page *endpage;
-	bool is_reserved, is_cma;
-
-	/*
-	 * Sometimes the kernel data regions are not marked Reserved (see
-	 * check below). And sometimes [_sdata,_edata) does not cover
-	 * rodata and/or bss, so check each range explicitly.
-	 */
-
-	/* Allow reads of kernel rodata region (if not marked as Reserved). */
-	if (ptr >= (const void *)__start_rodata &&
-	    end <= (const void *)__end_rodata) {
-		if (!to_user)
-			usercopy_abort("rodata", NULL, to_user, 0, n);
-		return;
-	}
-
-	/* Allow kernel data region (if not marked as Reserved). */
-	if (ptr >= (const void *)_sdata && end <= (const void *)_edata)
-		return;
-
-	/* Allow kernel bss region (if not marked as Reserved). */
-	if (ptr >= (const void *)__bss_start &&
-	    end <= (const void *)__bss_stop)
-		return;
-
-	/* Is the object wholly within one base page? */
-	if (likely(((unsigned long)ptr & (unsigned long)PAGE_MASK) ==
-		   ((unsigned long)end & (unsigned long)PAGE_MASK)))
-		return;
-
-	/* Allow if fully inside the same compound (__GFP_COMP) page. */
-	endpage = virt_to_head_page(end);
-	if (likely(endpage == page))
-		return;
-
-	/*
-	 * Reject if range is entirely either Reserved (i.e. special or
-	 * device memory), or CMA. Otherwise, reject since the object spans
-	 * several independently allocated pages.
-	 */
-	is_reserved = PageReserved(page);
-	is_cma = is_migrate_cma_page(page);
-	if (!is_reserved && !is_cma)
-		usercopy_abort("spans multiple pages", NULL, to_user, 0, n);
-
-	for (ptr += PAGE_SIZE; ptr <= end; ptr += PAGE_SIZE) {
-		page = virt_to_head_page(ptr);
-		if (is_reserved && !PageReserved(page))
-			usercopy_abort("spans Reserved and non-Reserved pages",
-				       NULL, to_user, 0, n);
-		if (is_cma && !is_migrate_cma_page(page))
-			usercopy_abort("spans CMA and non-CMA pages", NULL,
-				       to_user, 0, n);
-	}
-#endif
-}
-
 static inline void check_heap_object(const void *ptr, unsigned long n,
 				     bool to_user)
 {
@@ -239,9 +175,6 @@ static inline void check_heap_object(const void *ptr, unsigned long n,
 	if (folio_test_slab(folio)) {
 		/* Check slab allocator for flags and size. */
 		__check_heap_object(ptr, n, folio_slab(folio), to_user);
-	} else {
-		/* Verify object does not incorrectly span multiple pages. */
-		check_page_span(ptr, n, folio_page(folio, 0), to_user);
 	}
 }
 
diff --git a/security/Kconfig b/security/Kconfig
index 9b2c4925585a..7d639f1b0c4a 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -163,17 +163,6 @@ config HARDENED_USERCOPY
 	  or are part of the kernel text. This kills entire classes
 	  of heap overflow exploits and similar kernel memory exposures.
 
-config HARDENED_USERCOPY_PAGESPAN
-	bool "Refuse to copy allocations that span multiple pages"
-	depends on HARDENED_USERCOPY
-	depends on BROKEN
-	help
-	  When a multi-page allocation is done without __GFP_COMP,
-	  hardened usercopy will reject attempts to copy it. There are,
-	  however, several cases of this in the kernel that have not all
-	  been removed. This config is intended to be used only while
-	  trying to find such users.
-
 config FORTIFY_SOURCE
 	bool "Harden common str/mem functions against buffer overflows"
 	depends on ARCH_HAS_FORTIFY_SOURCE

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
  2022-03-31 18:46   ` Russell King (Oracle)
@ 2022-03-31 18:57     ` Kees Cook
  -1 siblings, 0 replies; 14+ messages in thread
From: Kees Cook @ 2022-03-31 18:57 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Linus Torvalds, linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Stephen Rothwell, Zi Yan

On Thu, Mar 31, 2022 at 07:46:28PM +0100, Russell King (Oracle) wrote:
> On Thu, Mar 31, 2022 at 11:35:40AM -0700, Kees Cook wrote:
> > Hi Linus,
> > 
> > Please pull these hardening fixes for v5.18-rc1. This addresses an
> > -Warray-bounds warning found under a few ARM defconfigs, and disables
> > long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.
> 
> I don't see these patches on linux-arm-kernel... are we doing away with
> patch review now? :D

Uh, what? The links in the patches show the reviews, even. I assume
you're mainly talking about the DMA one; it's right here:
https://lore.kernel.org/linux-arm-kernel/20220309175107.195182-1-keescook@chromium.org/

I had thought hch was going to take this patch, but the dma tree didn't
have it, so I sent it in.

And the usercopy patch was here, with references to the discussion
around it too:
https://lore.kernel.org/all/20220324230255.1362706-1-keescook@chromium.org/

-- 
Kees Cook

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 18:57     ` Kees Cook
  0 siblings, 0 replies; 14+ messages in thread
From: Kees Cook @ 2022-03-31 18:57 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Linus Torvalds, linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Stephen Rothwell, Zi Yan

On Thu, Mar 31, 2022 at 07:46:28PM +0100, Russell King (Oracle) wrote:
> On Thu, Mar 31, 2022 at 11:35:40AM -0700, Kees Cook wrote:
> > Hi Linus,
> > 
> > Please pull these hardening fixes for v5.18-rc1. This addresses an
> > -Warray-bounds warning found under a few ARM defconfigs, and disables
> > long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.
> 
> I don't see these patches on linux-arm-kernel... are we doing away with
> patch review now? :D

Uh, what? The links in the patches show the reviews, even. I assume
you're mainly talking about the DMA one; it's right here:
https://lore.kernel.org/linux-arm-kernel/20220309175107.195182-1-keescook@chromium.org/

I had thought hch was going to take this patch, but the dma tree didn't
have it, so I sent it in.

And the usercopy patch was here, with references to the discussion
around it too:
https://lore.kernel.org/all/20220324230255.1362706-1-keescook@chromium.org/

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
  2022-03-31 18:49   ` Linus Torvalds
@ 2022-03-31 19:00     ` Kees Cook
  -1 siblings, 0 replies; 14+ messages in thread
From: Kees Cook @ 2022-03-31 19:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Kernel Mailing List, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Linux ARM, Logan Gunthorpe,
	Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

On Thu, Mar 31, 2022 at 11:49:42AM -0700, Linus Torvalds wrote:
> On Thu, Mar 31, 2022 at 11:35 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > Please pull these hardening fixes for v5.18-rc1. This addresses an
> > -Warray-bounds warning found under a few ARM defconfigs, and disables
> > long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.
> 
> Can't we just remove that HARDENED_USERCOPY_PAGESPAN thing entirely?
> 
> Yes, yes, I know Matthew did that as part of other patches that is too
> late to go in any more in this merge window, but just the removal
> patch is a no-brainer.

I can do that, but it seemed like more work for folks: a larger diff to
look at, and a rebase for Matthew or me. It's not MUCH more work, but
given the timing of the merge window, I wanted to have a minimal diff.

> IOW, why not just do the attached?

But I can certainly respin it, if you'd prefer?

-- 
Kees Cook

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 19:00     ` Kees Cook
  0 siblings, 0 replies; 14+ messages in thread
From: Kees Cook @ 2022-03-31 19:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Kernel Mailing List, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Linux ARM, Logan Gunthorpe,
	Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

On Thu, Mar 31, 2022 at 11:49:42AM -0700, Linus Torvalds wrote:
> On Thu, Mar 31, 2022 at 11:35 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > Please pull these hardening fixes for v5.18-rc1. This addresses an
> > -Warray-bounds warning found under a few ARM defconfigs, and disables
> > long-broken CONFIG_HARDENED_USERCOPY_PAGESPAN.
> 
> Can't we just remove that HARDENED_USERCOPY_PAGESPAN thing entirely?
> 
> Yes, yes, I know Matthew did that as part of other patches that is too
> late to go in any more in this merge window, but just the removal
> patch is a no-brainer.

I can do that, but it seemed like more work for folks: a larger diff to
look at, and a rebase for Matthew or me. It's not MUCH more work, but
given the timing of the merge window, I wanted to have a minimal diff.

> IOW, why not just do the attached?

But I can certainly respin it, if you'd prefer?

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
  2022-03-31 19:00     ` Kees Cook
@ 2022-03-31 19:09       ` Linus Torvalds
  -1 siblings, 0 replies; 14+ messages in thread
From: Linus Torvalds @ 2022-03-31 19:09 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux Kernel Mailing List, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Linux ARM, Logan Gunthorpe,
	Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

On Thu, Mar 31, 2022 at 12:00 PM Kees Cook <keescook@chromium.org> wrote:
>
> I can do that, but it seemed like more work for folks: a larger diff to
> look at, and a rebase for Matthew or me. It's not MUCH more work, but
> given the timing of the merge window, I wanted to have a minimal diff.

Stuff that just does obvious code removal may _look_ big, but I
actually think it's conceptually a smaller patch than the subtle one
that just made the code impossible to enable.

Marking something broken implies that maybe we'll be able to fix it.

This seems to be more of a "let's just get rid of it".

               Linus

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 19:09       ` Linus Torvalds
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Torvalds @ 2022-03-31 19:09 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux Kernel Mailing List, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Linux ARM, Logan Gunthorpe,
	Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

On Thu, Mar 31, 2022 at 12:00 PM Kees Cook <keescook@chromium.org> wrote:
>
> I can do that, but it seemed like more work for folks: a larger diff to
> look at, and a rebase for Matthew or me. It's not MUCH more work, but
> given the timing of the merge window, I wanted to have a minimal diff.

Stuff that just does obvious code removal may _look_ big, but I
actually think it's conceptually a smaller patch than the subtle one
that just made the code impossible to enable.

Marking something broken implies that maybe we'll be able to fix it.

This seems to be more of a "let's just get rid of it".

               Linus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
  2022-03-31 18:35 ` Kees Cook
@ 2022-03-31 19:12   ` pr-tracker-bot
  -1 siblings, 0 replies; 14+ messages in thread
From: pr-tracker-bot @ 2022-03-31 19:12 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Kees Cook, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

The pull request you sent on Thu, 31 Mar 2022 11:35:40 -0700:

> https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-v5.18-rc1-fix1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f87cbd0565eb7e2fa15296c74210658db1346431

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

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

* Re: [GIT PULL] hardening fixes for v5.18-rc1
@ 2022-03-31 19:12   ` pr-tracker-bot
  0 siblings, 0 replies; 14+ messages in thread
From: pr-tracker-bot @ 2022-03-31 19:12 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, linux-kernel, Andrew Morton, Christoph Hellwig,
	David Hildenbrand, Hari Bathini, Kees Cook, linux-arm-kernel,
	Logan Gunthorpe, Martin Oliveira, Matthew Wilcox (Oracle),
	Mike Kravetz, Minchan Kim, Russell King, Stephen Rothwell,
	Zi Yan

The pull request you sent on Thu, 31 Mar 2022 11:35:40 -0700:

> https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-v5.18-rc1-fix1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f87cbd0565eb7e2fa15296c74210658db1346431

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-03-31 19:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 18:35 [GIT PULL] hardening fixes for v5.18-rc1 Kees Cook
2022-03-31 18:35 ` Kees Cook
2022-03-31 18:46 ` Russell King (Oracle)
2022-03-31 18:46   ` Russell King (Oracle)
2022-03-31 18:57   ` Kees Cook
2022-03-31 18:57     ` Kees Cook
2022-03-31 18:49 ` Linus Torvalds
2022-03-31 18:49   ` Linus Torvalds
2022-03-31 19:00   ` Kees Cook
2022-03-31 19:00     ` Kees Cook
2022-03-31 19:09     ` Linus Torvalds
2022-03-31 19:09       ` Linus Torvalds
2022-03-31 19:12 ` pr-tracker-bot
2022-03-31 19:12   ` pr-tracker-bot

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.