From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CCE3F15800D for ; Wed, 5 Jul 2023 20:34:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1907EE0874; Wed, 5 Jul 2023 20:34:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 01DE1E0874 for ; Wed, 5 Jul 2023 20:34:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 437BC335DAD for ; Wed, 5 Jul 2023 20:34:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A8AEA119 for ; Wed, 5 Jul 2023 20:34:13 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1688589221.1bfb91f619e81be1b7ba059b62cbddf0ce837bf5.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:6.1 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 1800_mm-execve-mark-stack-as-growing-down.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: 1bfb91f619e81be1b7ba059b62cbddf0ce837bf5 X-VCS-Branch: 6.1 Date: Wed, 5 Jul 2023 20:34:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 82e4e821-d508-4029-972b-40743dbdb5db X-Archives-Hash: cddee5f3b61710f7b5982bf3ff18ee20 commit: 1bfb91f619e81be1b7ba059b62cbddf0ce837bf5 Author: Mike Pagano gentoo org> AuthorDate: Wed Jul 5 20:33:41 2023 +0000 Commit: Mike Pagano gentoo org> CommitDate: Wed Jul 5 20:33:41 2023 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1bfb91f6 Remove redundant patch Removed: 1800_mm-execve-mark-stack-as-growing-down.patch Signed-off-by: Mike Pagano gentoo.org> 0000_README | 4 -- 1800_mm-execve-mark-stack-as-growing-down.patch | 82 ------------------------- 2 files changed, 86 deletions(-) diff --git a/0000_README b/0000_README index 6c8d0f22..3b5aa81d 100644 --- a/0000_README +++ b/0000_README @@ -207,10 +207,6 @@ Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings -Patch: 1800_mm-execve-mark-stack-as-growing-down.patch -From: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git -Desc: execve: always mark stack as growing down during early stack setup - Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 diff --git a/1800_mm-execve-mark-stack-as-growing-down.patch b/1800_mm-execve-mark-stack-as-growing-down.patch deleted file mode 100644 index 7c71f7ea..00000000 --- a/1800_mm-execve-mark-stack-as-growing-down.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 0140eae44accd0df8071de6487afe0921eb0d7fd Mon Sep 17 00:00:00 2001 -From: Linus Torvalds -Date: Sun, 2 Jul 2023 23:20:17 -0700 -Subject: execve: always mark stack as growing down during early stack setup - -commit f66066bc5136f25e36a2daff4896c768f18c211e upstream. - -While our user stacks can grow either down (all common architectures) or -up (parisc and the ia64 register stack), the initial stack setup when we -copy the argument and environment strings to the new stack at execve() -time is always done by extending the stack downwards. - -But it turns out that in commit 8d7071af8907 ("mm: always expand the -stack with the mmap write lock held"), as part of making the stack -growing code more robust, 'expand_downwards()' was now made to actually -check the vma flags: - - if (!(vma->vm_flags & VM_GROWSDOWN)) - return -EFAULT; - -and that meant that this execve-time stack expansion started failing on -parisc, because on that architecture, the stack flags do not contain the -VM_GROWSDOWN bit. - -At the same time the new check in expand_downwards() is clearly correct, -and simplified the callers, so let's not remove it. - -The solution is instead to just codify the fact that yes, during -execve(), the stack grows down. This not only matches reality, it ends -up being particularly simple: we already have special execve-time flags -for the stack (VM_STACK_INCOMPLETE_SETUP) and use those flags to avoid -page migration during this setup time (see vma_is_temporary_stack() and -invalid_migration_vma()). - -So just add VM_GROWSDOWN to that set of temporary flags, and now our -stack flags automatically match reality, and the parisc stack expansion -works again. - -Note that the VM_STACK_INCOMPLETE_SETUP bits will be cleared when the -stack is finalized, so we only add the extra VM_GROWSDOWN bit on -CONFIG_STACK_GROWSUP architectures (ie parisc) rather than adding it in -general. - -Link: https://lore.kernel.org/all/612eaa53-6904-6e16-67fc-394f4faa0e16@bell.net/ -Link: https://lore.kernel.org/all/5fd98a09-4792-1433-752d-029ae3545168@gmx.de/ -Fixes: 8d7071af8907 ("mm: always expand the stack with the mmap write lock held") -Reported-by: John David Anglin -Reported-and-tested-by: Helge Deller -Reported-and-tested-by: Guenter Roeck -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman ---- - include/linux/mm.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/linux/mm.h b/include/linux/mm.h -index f5b6ef943ede2..b8ed44f401b58 100644 ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -378,7 +378,7 @@ extern unsigned int kobjsize(const void *objp); - #endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */ - - /* Bits set in the VMA until the stack is in its final location */ --#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ) -+#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ | VM_STACK_EARLY) - - #define TASK_EXEC ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) - -@@ -400,8 +400,10 @@ extern unsigned int kobjsize(const void *objp); - - #ifdef CONFIG_STACK_GROWSUP - #define VM_STACK VM_GROWSUP -+#define VM_STACK_EARLY VM_GROWSDOWN - #else - #define VM_STACK VM_GROWSDOWN -+#define VM_STACK_EARLY 0 - #endif - - #define VM_STACK_FLAGS (VM_STACK | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) --- -cgit -