aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--queue-6.6/kbuild-rpm-pkg-simplify-installkernel-post.patch106
-rw-r--r--queue-6.6/media-uvcvideo-rollback-non-processed-entities-on-error.patch116
-rw-r--r--queue-6.6/scripts-clean-up-ia-64-code.patch163
-rw-r--r--queue-6.6/series3
4 files changed, 388 insertions, 0 deletions
diff --git a/queue-6.6/kbuild-rpm-pkg-simplify-installkernel-post.patch b/queue-6.6/kbuild-rpm-pkg-simplify-installkernel-post.patch
new file mode 100644
index 0000000000..16aab6b059
--- /dev/null
+++ b/queue-6.6/kbuild-rpm-pkg-simplify-installkernel-post.patch
@@ -0,0 +1,106 @@
+From 358de8b4f201bc05712484b15f0109b1ae3516a8 Mon Sep 17 00:00:00 2001
+From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
+Date: Mon, 29 Jan 2024 10:28:19 +0100
+Subject: kbuild: rpm-pkg: simplify installkernel %post
+
+From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
+
+commit 358de8b4f201bc05712484b15f0109b1ae3516a8 upstream.
+
+The new installkernel application that is now included in systemd-udev
+package allows installation although destination files are already present
+in the boot directory of the kernel package, but is failing with the
+implemented workaround for the old installkernel application from grubby
+package.
+
+For the new installkernel application, as Davide says:
+<<The %post currently does a shuffling dance before calling installkernel.
+This isn't actually necessary afaict, and the current implementation
+ends up triggering downstream issues such as
+https://github.com/systemd/systemd/issues/29568
+This commit simplifies the logic to remove the shuffling. For reference,
+the original logic was added in commit 3c9c7a14b627("rpm-pkg: add %post
+section to create initramfs and grub hooks").>>
+
+But we need to keep the old behavior as well, because the old installkernel
+application from grubby package, does not allow this simplification and
+we need to be backward compatible to avoid issues with the different
+packages.
+
+Mimic Fedora shipping process and store vmlinuz, config amd System.map
+in the module directory instead of the boot directory. In this way, we will
+avoid the commented problem for all the cases, because the new destination
+files are not going to exist in the boot directory of the kernel package.
+
+Replace installkernel tool with kernel-install tool, because the latter is
+more complete.
+
+Besides, after installkernel tool execution, check to complete if the
+correct package files vmlinuz, System.map and config files are present
+in /boot directory, and if necessary, copy manually for install operation.
+In this way, take into account if files were not previously copied from
+/usr/lib/kernel/install.d/* scripts and if the suitable files for the
+requested package are present (it could be others if the rpm files were
+replace with a new pacakge with the same release and a different build).
+
+Tested with Fedora 38, Fedora 39, RHEL 9, Oracle Linux 9.3,
+openSUSE Tumbleweed and openMandrive ROME, using dnf/zypper and rpm tools.
+
+cc: stable@vger.kernel.org
+Co-Developed-by: Davide Cavalca <dcavalca@meta.com>
+Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/package/kernel.spec | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+--- a/scripts/package/kernel.spec
++++ b/scripts/package/kernel.spec
+@@ -55,12 +55,12 @@ patch -p1 < %{SOURCE2}
+ %{make} %{makeflags} KERNELRELEASE=%{KERNELRELEASE} KBUILD_BUILD_VERSION=%{release}
+
+ %install
+-mkdir -p %{buildroot}/boot
+-cp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/vmlinuz-%{KERNELRELEASE}
++mkdir -p %{buildroot}/lib/modules/%{KERNELRELEASE}
++cp $(%{make} %{makeflags} -s image_name) %{buildroot}/lib/modules/%{KERNELRELEASE}/vmlinuz
+ %{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} modules_install
+ %{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
+-cp System.map %{buildroot}/boot/System.map-%{KERNELRELEASE}
+-cp .config %{buildroot}/boot/config-%{KERNELRELEASE}
++cp System.map %{buildroot}/lib/modules/%{KERNELRELEASE}
++cp .config %{buildroot}/lib/modules/%{KERNELRELEASE}/config
+ ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/build
+ %if %{with_devel}
+ %{make} %{makeflags} run-command KBUILD_RUN_COMMAND='${srctree}/scripts/package/install-extmod-build %{buildroot}/usr/src/kernels/%{KERNELRELEASE}'
+@@ -70,13 +70,14 @@ ln -fns /usr/src/kernels/%{KERNELRELEASE
+ rm -rf %{buildroot}
+
+ %post
+-if [ -x /sbin/installkernel -a -r /boot/vmlinuz-%{KERNELRELEASE} -a -r /boot/System.map-%{KERNELRELEASE} ]; then
+-cp /boot/vmlinuz-%{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm
+-cp /boot/System.map-%{KERNELRELEASE} /boot/.System.map-%{KERNELRELEASE}-rpm
+-rm -f /boot/vmlinuz-%{KERNELRELEASE} /boot/System.map-%{KERNELRELEASE}
+-/sbin/installkernel %{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm
+-rm -f /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm
++if [ -x /usr/bin/kernel-install ]; then
++ /usr/bin/kernel-install add %{KERNELRELEASE} /lib/modules/%{KERNELRELEASE}/vmlinuz
+ fi
++for file in vmlinuz System.map config; do
++ if ! cmp --silent "/lib/modules/%{KERNELRELEASE}/${file}" "/boot/${file}-%{KERNELRELEASE}"; then
++ cp "/lib/modules/%{KERNELRELEASE}/${file}" "/boot/${file}-%{KERNELRELEASE}"
++ fi
++done
+
+ %preun
+ if [ -x /sbin/new-kernel-pkg ]; then
+@@ -94,7 +95,6 @@ fi
+ %defattr (-, root, root)
+ /lib/modules/%{KERNELRELEASE}
+ %exclude /lib/modules/%{KERNELRELEASE}/build
+-/boot/*
+
+ %files headers
+ %defattr (-, root, root)
diff --git a/queue-6.6/media-uvcvideo-rollback-non-processed-entities-on-error.patch b/queue-6.6/media-uvcvideo-rollback-non-processed-entities-on-error.patch
new file mode 100644
index 0000000000..849d8f2904
--- /dev/null
+++ b/queue-6.6/media-uvcvideo-rollback-non-processed-entities-on-error.patch
@@ -0,0 +1,116 @@
+From a70705d3c020d0d5c3ab6a5cc93e011ac35e7d48 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda <ribalda@chromium.org>
+Date: Mon, 24 Feb 2025 10:34:55 +0000
+Subject: media: uvcvideo: Rollback non processed entities on error
+
+From: Ricardo Ribalda <ribalda@chromium.org>
+
+commit a70705d3c020d0d5c3ab6a5cc93e011ac35e7d48 upstream.
+
+If we fail to commit an entity, we need to restore the
+UVC_CTRL_DATA_BACKUP for the other uncommitted entities. Otherwise the
+control cache and the device would be out of sync.
+
+Cc: stable@kernel.org
+Fixes: b4012002f3a3 ("[media] uvcvideo: Add support for control events")
+Reported-by: Hans de Goede <hdegoede@redhat.com>
+Closes: https://lore.kernel.org/linux-media/fe845e04-9fde-46ee-9763-a6f00867929a@redhat.com/
+Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
+Message-ID: <20250224-uvc-data-backup-v2-3-de993ed9823b@chromium.org>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/usb/uvc/uvc_ctrl.c | 39 ++++++++++++++++++++++++++-------------
+ 1 file changed, 26 insertions(+), 13 deletions(-)
+
+--- a/drivers/media/usb/uvc/uvc_ctrl.c
++++ b/drivers/media/usb/uvc/uvc_ctrl.c
+@@ -1801,7 +1801,7 @@ static int uvc_ctrl_commit_entity(struct
+ unsigned int processed_ctrls = 0;
+ struct uvc_control *ctrl;
+ unsigned int i;
+- int ret;
++ int ret = 0;
+
+ if (entity == NULL)
+ return 0;
+@@ -1830,8 +1830,6 @@ static int uvc_ctrl_commit_entity(struct
+ dev->intfnum, ctrl->info.selector,
+ uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
+ ctrl->info.size);
+- else
+- ret = 0;
+
+ if (!ret)
+ processed_ctrls++;
+@@ -1843,17 +1841,25 @@ static int uvc_ctrl_commit_entity(struct
+
+ ctrl->dirty = 0;
+
+- if (ret < 0) {
++ if (!rollback && handle &&
++ ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS)
++ uvc_ctrl_set_handle(handle, ctrl, handle);
++
++ if (ret < 0 && !rollback) {
+ if (err_ctrl)
+ *err_ctrl = ctrl;
+- return ret;
++ /*
++ * If we fail to set a control, we need to rollback
++ * the next ones.
++ */
++ rollback = 1;
+ }
+
+- if (!rollback && handle &&
+- ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS)
+- uvc_ctrl_set_handle(handle, ctrl, handle);
+ }
+
++ if (ret)
++ return ret;
++
+ return processed_ctrls;
+ }
+
+@@ -1884,7 +1890,8 @@ int __uvc_ctrl_commit(struct uvc_fh *han
+ struct uvc_video_chain *chain = handle->chain;
+ struct uvc_control *err_ctrl;
+ struct uvc_entity *entity;
+- int ret = 0;
++ int ret_out = 0;
++ int ret;
+
+ /* Find the control. */
+ list_for_each_entry(entity, &chain->entities, chain) {
+@@ -1895,17 +1902,23 @@ int __uvc_ctrl_commit(struct uvc_fh *han
+ ctrls->error_idx =
+ uvc_ctrl_find_ctrl_idx(entity, ctrls,
+ err_ctrl);
+- goto done;
++ /*
++ * When we fail to commit an entity, we need to
++ * restore the UVC_CTRL_DATA_BACKUP for all the
++ * controls in the other entities, otherwise our cache
++ * and the hardware will be out of sync.
++ */
++ rollback = 1;
++
++ ret_out = ret;
+ } else if (ret > 0 && !rollback) {
+ uvc_ctrl_send_events(handle, entity,
+ ctrls->controls, ctrls->count);
+ }
+ }
+
+- ret = 0;
+-done:
+ mutex_unlock(&chain->ctrl_mutex);
+- return ret;
++ return ret_out;
+ }
+
+ int uvc_ctrl_get(struct uvc_video_chain *chain,
diff --git a/queue-6.6/scripts-clean-up-ia-64-code.patch b/queue-6.6/scripts-clean-up-ia-64-code.patch
new file mode 100644
index 0000000000..14cbd945fc
--- /dev/null
+++ b/queue-6.6/scripts-clean-up-ia-64-code.patch
@@ -0,0 +1,163 @@
+From 0df8e97085946dd79c06720678a845778b6d6bf8 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <masahiroy@kernel.org>
+Date: Fri, 24 Nov 2023 23:09:08 +0900
+Subject: scripts: clean up IA-64 code
+
+From: Masahiro Yamada <masahiroy@kernel.org>
+
+commit 0df8e97085946dd79c06720678a845778b6d6bf8 upstream.
+
+A little more janitorial work after commit cf8e8658100d ("arch: Remove
+Itanium (IA-64) architecture").
+
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/checkstack.pl | 3 ---
+ scripts/gdb/linux/tasks.py | 15 +++------------
+ scripts/head-object-list.txt | 1 -
+ scripts/kconfig/mconf.c | 2 +-
+ scripts/kconfig/nconf.c | 2 +-
+ scripts/package/kernel.spec | 6 ------
+ scripts/package/mkdebian | 2 +-
+ scripts/recordmcount.c | 1 -
+ scripts/recordmcount.pl | 7 -------
+ scripts/xz_wrap.sh | 1 -
+ 10 files changed, 6 insertions(+), 34 deletions(-)
+
+--- a/scripts/checkstack.pl
++++ b/scripts/checkstack.pl
+@@ -68,9 +68,6 @@ my (@stack, $re, $dre, $sub, $x, $xs, $f
+ # 2f60: 48 81 ec e8 05 00 00 sub $0x5e8,%rsp
+ $re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%(e|r)sp$/o;
+ $dre = qr/^.*[as][du][db] (%.*),\%(e|r)sp$/o;
+- } elsif ($arch eq 'ia64') {
+- #e0000000044011fc: 01 0f fc 8c adds r12=-384,r12
+- $re = qr/.*adds.*r12=-(([0-9]{2}|[3-9])[0-9]{2}),r12/o;
+ } elsif ($arch eq 'm68k') {
+ # 2b6c: 4e56 fb70 linkw %fp,#-1168
+ # 1df770: defc ffe4 addaw #-28,%sp
+--- a/scripts/gdb/linux/tasks.py
++++ b/scripts/gdb/linux/tasks.py
+@@ -86,21 +86,12 @@ LxPs()
+
+ thread_info_type = utils.CachedType("struct thread_info")
+
+-ia64_task_size = None
+-
+
+ def get_thread_info(task):
+ thread_info_ptr_type = thread_info_type.get_type().pointer()
+- if utils.is_target_arch("ia64"):
+- global ia64_task_size
+- if ia64_task_size is None:
+- ia64_task_size = gdb.parse_and_eval("sizeof(struct task_struct)")
+- thread_info_addr = task.address + ia64_task_size
+- thread_info = thread_info_addr.cast(thread_info_ptr_type)
+- else:
+- if task.type.fields()[0].type == thread_info_type.get_type():
+- return task['thread_info']
+- thread_info = task['stack'].cast(thread_info_ptr_type)
++ if task.type.fields()[0].type == thread_info_type.get_type():
++ return task['thread_info']
++ thread_info = task['stack'].cast(thread_info_ptr_type)
+ return thread_info.dereference()
+
+
+--- a/scripts/head-object-list.txt
++++ b/scripts/head-object-list.txt
+@@ -17,7 +17,6 @@ arch/arm/kernel/head-nommu.o
+ arch/arm/kernel/head.o
+ arch/csky/kernel/head.o
+ arch/hexagon/kernel/head.o
+-arch/ia64/kernel/head.o
+ arch/loongarch/kernel/head.o
+ arch/m68k/68000/head.o
+ arch/m68k/coldfire/head.o
+--- a/scripts/kconfig/mconf.c
++++ b/scripts/kconfig/mconf.c
+@@ -247,7 +247,7 @@ search_help[] =
+ " -> PCI support (PCI [=y])\n"
+ "(1) -> PCI access mode (<choice> [=y])\n"
+ " Defined at drivers/pci/Kconfig:47\n"
+- " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
++ " Depends on: X86_LOCAL_APIC && X86_IO_APIC\n"
+ " Selects: LIBCRC32\n"
+ " Selected by: BAR [=n]\n"
+ "-----------------------------------------------------------------\n"
+--- a/scripts/kconfig/nconf.c
++++ b/scripts/kconfig/nconf.c
+@@ -216,7 +216,7 @@ search_help[] =
+ "Symbol: FOO [ = m]\n"
+ "Prompt: Foo bus is used to drive the bar HW\n"
+ "Defined at drivers/pci/Kconfig:47\n"
+-"Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
++"Depends on: X86_LOCAL_APIC && X86_IO_APIC\n"
+ "Location:\n"
+ " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
+ " -> PCI support (PCI [ = y])\n"
+--- a/scripts/package/kernel.spec
++++ b/scripts/package/kernel.spec
+@@ -56,13 +56,7 @@ patch -p1 < %{SOURCE2}
+
+ %install
+ mkdir -p %{buildroot}/boot
+-%ifarch ia64
+-mkdir -p %{buildroot}/boot/efi
+-cp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/efi/vmlinuz-%{KERNELRELEASE}
+-ln -s efi/vmlinuz-%{KERNELRELEASE} %{buildroot}/boot/
+-%else
+ cp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/vmlinuz-%{KERNELRELEASE}
+-%endif
+ %{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} modules_install
+ %{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
+ cp System.map %{buildroot}/boot/System.map-%{KERNELRELEASE}
+--- a/scripts/package/mkdebian
++++ b/scripts/package/mkdebian
+@@ -26,7 +26,7 @@ set_debarch() {
+
+ # Attempt to find the correct Debian architecture
+ case "$UTS_MACHINE" in
+- i386|ia64|alpha|m68k|riscv*)
++ i386|alpha|m68k|riscv*)
+ debarch="$UTS_MACHINE" ;;
+ x86_64)
+ debarch=amd64 ;;
+--- a/scripts/recordmcount.c
++++ b/scripts/recordmcount.c
+@@ -590,7 +590,6 @@ static int do_file(char const *const fna
+ ideal_nop = ideal_nop4_arm64;
+ is_fake_mcount64 = arm64_is_fake_mcount;
+ break;
+- case EM_IA_64: reltype = R_IA64_IMM64; break;
+ case EM_MIPS: /* reltype: e_class */ break;
+ case EM_LOONGARCH: /* reltype: e_class */ break;
+ case EM_PPC: reltype = R_PPC_ADDR32; break;
+--- a/scripts/recordmcount.pl
++++ b/scripts/recordmcount.pl
+@@ -275,13 +275,6 @@ if ($arch eq "x86_64") {
+ $section_type = '%progbits';
+ $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_AARCH64_CALL26\\s+_mcount\$";
+ $type = ".quad";
+-} elsif ($arch eq "ia64") {
+- $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
+- $type = "data8";
+-
+- if ($is_module eq "0") {
+- $cc .= " -mconstant-gp";
+- }
+ } elsif ($arch eq "sparc64") {
+ # In the objdump output there are giblets like:
+ # 0000000000000000 <igmp_net_exit-0x18>:
+--- a/scripts/xz_wrap.sh
++++ b/scripts/xz_wrap.sh
+@@ -15,7 +15,6 @@ LZMA2OPTS=
+ case $SRCARCH in
+ x86) BCJ=--x86 ;;
+ powerpc) BCJ=--powerpc ;;
+- ia64) BCJ=--ia64; LZMA2OPTS=pb=4 ;;
+ arm) BCJ=--arm ;;
+ sparc) BCJ=--sparc ;;
+ esac
diff --git a/queue-6.6/series b/queue-6.6/series
index bbcd83936d..d5fb9fb161 100644
--- a/queue-6.6/series
+++ b/queue-6.6/series
@@ -136,3 +136,6 @@ drm-amdgpu-add-kicker-device-detection.patch
drm-amdgpu-switch-job-hw_fence-to-amdgpu_fence.patch
ksmbd-use-unsafe_memcpy-for-ntlm_negotiate.patch
ksmbd-remove-unsafe_memcpy-use-in-session-setup.patch
+scripts-clean-up-ia-64-code.patch
+kbuild-rpm-pkg-simplify-installkernel-post.patch
+media-uvcvideo-rollback-non-processed-entities-on-error.patch