]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.0
authorSasha Levin <sashal@kernel.org>
Sun, 27 Nov 2022 23:05:49 +0000 (18:05 -0500)
committerSasha Levin <sashal@kernel.org>
Sun, 27 Nov 2022 23:12:46 +0000 (18:12 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.0/init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch [new file with mode: 0644]
queue-6.0/nfsd-fix-reads-with-a-non-zero-offset-that-don-t-end.patch [new file with mode: 0644]
queue-6.0/nios2-add-force-for-vmlinuz.gz.patch [new file with mode: 0644]
queue-6.0/series

diff --git a/queue-6.0/init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch b/queue-6.0/init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch
new file mode 100644 (file)
index 0000000..6c00fbe
--- /dev/null
@@ -0,0 +1,50 @@
+From b5e0034bbdb399397a3b94fb5fb51982068d3e98 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 15 Nov 2022 12:01:58 +0100
+Subject: init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+[ Upstream commit 534bd70374d646f17e2cebe0e6e4cdd478ce4f0c ]
+
+When using dash as /bin/sh, the CC_HAS_ASM_GOTO_TIED_OUTPUT test fails
+with a syntax error which is not the one we are looking for:
+
+<stdin>: In function ‘foo’:
+<stdin>:1:29: warning: missing terminating " character
+<stdin>:1:29: error: missing terminating " character
+<stdin>:2:5: error: expected ‘:’ before ‘+’ token
+<stdin>:2:7: warning: missing terminating " character
+<stdin>:2:7: error: missing terminating " character
+<stdin>:2:5: error: expected declaration or statement at end of input
+
+Removing '\n' solves this.
+
+Fixes: 1aa0e8b144b6 ("Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug")
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Reviewed-by: Sean Christopherson <seanjc@google.com>
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ init/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/init/Kconfig b/init/Kconfig
+index 532362fcfe31..d1d779d6ba43 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -76,7 +76,7 @@ config CC_HAS_ASM_GOTO_OUTPUT
+ config CC_HAS_ASM_GOTO_TIED_OUTPUT
+       depends on CC_HAS_ASM_GOTO_OUTPUT
+       # Detect buggy gcc and clang, fixed in gcc-11 clang-14.
+-      def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .\n": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
++      def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
+ config TOOLS_SUPPORT_RELR
+       def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
+-- 
+2.35.1
+
diff --git a/queue-6.0/nfsd-fix-reads-with-a-non-zero-offset-that-don-t-end.patch b/queue-6.0/nfsd-fix-reads-with-a-non-zero-offset-that-don-t-end.patch
new file mode 100644 (file)
index 0000000..de3ec53
--- /dev/null
@@ -0,0 +1,45 @@
+From 8cfe5d86ad94b044e8d64032342c3b81d57667c8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 23 Nov 2022 14:14:32 -0500
+Subject: NFSD: Fix reads with a non-zero offset that don't end on a page
+ boundary
+
+From: Chuck Lever <chuck.lever@oracle.com>
+
+[ Upstream commit ac8db824ead0de2e9111337c401409d010fba2f0 ]
+
+This was found when virtual machines with nfs-mounted qcow2 disks
+failed to boot properly.
+
+Reported-by: Anders Blomdell <anders.blomdell@control.lth.se>
+Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
+Link: https://bugzilla.redhat.com/show_bug.cgi?id=2142132
+Fixes: bfbfb6182ad1 ("nfsd_splice_actor(): handle compound pages")
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/nfsd/vfs.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
+index fc17b0ac8729..f3cd614e1f1e 100644
+--- a/fs/nfsd/vfs.c
++++ b/fs/nfsd/vfs.c
+@@ -847,10 +847,11 @@ nfsd_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
+       struct svc_rqst *rqstp = sd->u.data;
+       struct page *page = buf->page;  // may be a compound one
+       unsigned offset = buf->offset;
++      struct page *last_page;
+-      page += offset / PAGE_SIZE;
+-      for (int i = sd->len; i > 0; i -= PAGE_SIZE)
+-              svc_rqst_replace_page(rqstp, page++);
++      last_page = page + (offset + sd->len - 1) / PAGE_SIZE;
++      for (page += offset / PAGE_SIZE; page <= last_page; page++)
++              svc_rqst_replace_page(rqstp, page);
+       if (rqstp->rq_res.page_len == 0)        // first call
+               rqstp->rq_res.page_base = offset % PAGE_SIZE;
+       rqstp->rq_res.page_len += sd->len;
+-- 
+2.35.1
+
diff --git a/queue-6.0/nios2-add-force-for-vmlinuz.gz.patch b/queue-6.0/nios2-add-force-for-vmlinuz.gz.patch
new file mode 100644 (file)
index 0000000..0e2643f
--- /dev/null
@@ -0,0 +1,37 @@
+From be8585d851c734468d241c1be9f805811ffbebbe Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 23 Nov 2022 19:20:53 -0800
+Subject: nios2: add FORCE for vmlinuz.gz
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 869e4ae4cd2a23d625aaa14ae62dbebf768cb77d ]
+
+Add FORCE to placate a warning from make:
+
+arch/nios2/boot/Makefile:24: FORCE prerequisite is missing
+
+Fixes: 2fc8483fdcde ("nios2: Build infrastructure")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/nios2/boot/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/nios2/boot/Makefile b/arch/nios2/boot/Makefile
+index 8c3ad76602f3..29c11a06b750 100644
+--- a/arch/nios2/boot/Makefile
++++ b/arch/nios2/boot/Makefile
+@@ -20,7 +20,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
+ $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
+       $(call if_changed,gzip)
+-$(obj)/vmImage: $(obj)/vmlinux.gz
++$(obj)/vmImage: $(obj)/vmlinux.gz FORCE
+       $(call if_changed,uimage)
+       @$(kecho) 'Kernel: $@ is ready'
+-- 
+2.35.1
+
index 7506a89ac8578468c62ac0d5dc415f2b99f99a31..257f1266dc1092b24d435be4f2240c6d06d7c575 100644 (file)
@@ -158,3 +158,6 @@ s390-crashdump-fix-tod-programmable-field-size.patch
 io_uring-filetable-fix-file-reference-underflow.patch
 io_uring-poll-fix-poll_refs-race-with-cancelation.patch
 lib-vdso-use-grep-e-instead-of-egrep.patch
+init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch
+nfsd-fix-reads-with-a-non-zero-offset-that-don-t-end.patch
+nios2-add-force-for-vmlinuz.gz.patch