From: Greg Kroah-Hartman Date: Mon, 11 Sep 2023 06:17:52 +0000 (+0200) Subject: 6.4-stable patches X-Git-Tag: v6.1.53~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10bd4d5b63d2e57420ca5c28cee88c750dcddb78;p=thirdparty%2Fkernel%2Fstable-queue.git 6.4-stable patches added patches: media-ipu3-cio2-allow-ipu_bridge-to-be-a-module-again.patch net-remove-duplicate-indirect_callable_declare-of-udp_ehashfn.patch revert-memfd-improve-userspace-warnings-for-missing-exec-related-flags.patch --- diff --git a/queue-6.4/media-ipu3-cio2-allow-ipu_bridge-to-be-a-module-again.patch b/queue-6.4/media-ipu3-cio2-allow-ipu_bridge-to-be-a-module-again.patch new file mode 100644 index 00000000000..4f993ac71ee --- /dev/null +++ b/queue-6.4/media-ipu3-cio2-allow-ipu_bridge-to-be-a-module-again.patch @@ -0,0 +1,119 @@ +From 2545a2c02ba1da9cfb9ec218623c71b00eb4a555 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Thu, 27 Jul 2023 14:22:58 +0200 +Subject: media: ipu3-cio2: allow ipu_bridge to be a module again + +From: Arnd Bergmann + +commit 2545a2c02ba1da9cfb9ec218623c71b00eb4a555 upstream. + +This code was previously part of the VIDEO_IPU3_CIO2 driver, which could +be built-in or a loadable module, but after the move it turned into a +builtin-only driver. This fails to link when the I2C subsystem is a +module: + +x86_64-linux-ld: drivers/media/pci/intel/ipu-bridge.o: in function `ipu_bridge_unregister_sensors': +ipu-bridge.c:(.text+0x50): undefined reference to `i2c_unregister_device' +x86_64-linux-ld: drivers/media/pci/intel/ipu-bridge.o: in function `ipu_bridge_init': +ipu-bridge.c:(.text+0x9c9): undefined reference to `i2c_acpi_new_device_by_fwnode' + +In general, drivers should not have to be built-in, so change the option +to a tristate with the corresponding dependency. This in turn opens a +new problem with the dependency, as the IPU bridge can be a loadable module +while the ipu3 driver itself is built-in, producing a new link failure: + +86_64-linux-ld: drivers/media/pci/intel/ipu3/ipu3-cio2.o: in function `cio2_pci_probe': +ipu3-cio2.c:(.text+0x197e): undefined reference to `ipu_bridge_init' + +In order to fix this, restore the old Kconfig option that controlled +the ipu bridge driver before it was split out, but make it select a +hidden symbol that now corresponds to the bridge driver. + +When other drivers get added that share ipu-bridge, this should cover +all corner cases, and allow any combination of them to be built-in +or modular. + +Link: https://lore.kernel.org/linux-media/20230727122331.2421453-1-arnd@kernel.org + +Fixes: 881ca25978c6 ("media: ipu3-cio2: rename cio2 bridge to ipu bridge and move out of ipu3")' +Signed-off-by: Arnd Bergmann +Reviewed-by: Andy Shevchenko +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/pci/intel/Kconfig | 21 +++++---------------- + drivers/media/pci/intel/ipu-bridge.c | 3 +++ + drivers/media/pci/intel/ipu3/Kconfig | 20 ++++++++++++++++++++ + 3 files changed, 28 insertions(+), 16 deletions(-) + +--- a/drivers/media/pci/intel/Kconfig ++++ b/drivers/media/pci/intel/Kconfig +@@ -1,21 +1,10 @@ + # SPDX-License-Identifier: GPL-2.0-only + config IPU_BRIDGE +- bool "Intel IPU Sensors Bridge" +- depends on VIDEO_IPU3_CIO2 && ACPI +- depends on I2C ++ tristate ++ depends on I2C && ACPI + help +- This extension provides an API for the Intel IPU driver to create +- connections to cameras that are hidden in the SSDB buffer in ACPI. +- It can be used to enable support for cameras in detachable / hybrid +- devices that ship with Windows. +- +- Say Y here if your device is a detachable / hybrid laptop that comes +- with Windows installed by the OEM, for example: +- +- - Microsoft Surface models (except Surface Pro 3) +- - The Lenovo Miix line (for example the 510, 520, 710 and 720) +- - Dell 7285 +- +- If in doubt, say N here. ++ This is a helper module for the IPU bridge, which can be ++ used by ipu3 and other drivers. In order to handle module ++ dependencies, this is selected by each driver that needs it. + + source "drivers/media/pci/intel/ipu3/Kconfig" +--- a/drivers/media/pci/intel/ipu-bridge.c ++++ b/drivers/media/pci/intel/ipu-bridge.c +@@ -497,3 +497,6 @@ err_free_bridge: + return ret; + } + EXPORT_SYMBOL_NS_GPL(ipu_bridge_init, INTEL_IPU_BRIDGE); ++ ++MODULE_LICENSE("GPL"); ++MODULE_DESCRIPTION("Intel IPU Sensors Bridge driver"); +--- a/drivers/media/pci/intel/ipu3/Kconfig ++++ b/drivers/media/pci/intel/ipu3/Kconfig +@@ -8,6 +8,7 @@ config VIDEO_IPU3_CIO2 + select VIDEO_V4L2_SUBDEV_API + select V4L2_FWNODE + select VIDEOBUF2_DMA_SG ++ select IPU_BRIDGE if CIO2_BRIDGE + + help + This is the Intel IPU3 CIO2 CSI-2 receiver unit, found in Intel +@@ -17,3 +18,22 @@ config VIDEO_IPU3_CIO2 + Say Y or M here if you have a Skylake/Kaby Lake SoC with MIPI CSI-2 + connected camera. + The module will be called ipu3-cio2. ++ ++config CIO2_BRIDGE ++ bool "IPU3 CIO2 Sensors Bridge" ++ depends on VIDEO_IPU3_CIO2 && ACPI ++ depends on I2C ++ help ++ This extension provides an API for the ipu3-cio2 driver to create ++ connections to cameras that are hidden in the SSDB buffer in ACPI. ++ It can be used to enable support for cameras in detachable / hybrid ++ devices that ship with Windows. ++ ++ Say Y here if your device is a detachable / hybrid laptop that comes ++ with Windows installed by the OEM, for example: ++ ++ - Microsoft Surface models (except Surface Pro 3) ++ - The Lenovo Miix line (for example the 510, 520, 710 and 720) ++ - Dell 7285 ++ ++ If in doubt, say N here. diff --git a/queue-6.4/net-remove-duplicate-indirect_callable_declare-of-udp_ehashfn.patch b/queue-6.4/net-remove-duplicate-indirect_callable_declare-of-udp_ehashfn.patch new file mode 100644 index 00000000000..e9b0430a816 --- /dev/null +++ b/queue-6.4/net-remove-duplicate-indirect_callable_declare-of-udp_ehashfn.patch @@ -0,0 +1,46 @@ +From 74bdfab4fd7c641e55f7fe9d1be9687eeb01df67 Mon Sep 17 00:00:00 2001 +From: Lorenz Bauer +Date: Mon, 31 Jul 2023 11:42:53 +0200 +Subject: net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn + +From: Lorenz Bauer + +commit 74bdfab4fd7c641e55f7fe9d1be9687eeb01df67 upstream. + +There are already INDIRECT_CALLABLE_DECLARE in the hashtable +headers, no need to declare them again. + +Fixes: 0f495f761722 ("net: remove duplicate reuseport_lookup functions") +Suggested-by: Martin Lau +Signed-off-by: Lorenz Bauer +Reviewed-by: Kuniyuki Iwashima +Link: https://lore.kernel.org/r/20230731-indir-call-v1-1-4cd0aeaee64f@isovalent.com +Signed-off-by: Martin KaFai Lau +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv4/inet_hashtables.c | 2 -- + net/ipv6/inet6_hashtables.c | 2 -- + 2 files changed, 4 deletions(-) + +--- a/net/ipv4/inet_hashtables.c ++++ b/net/ipv4/inet_hashtables.c +@@ -333,8 +333,6 @@ static inline int compute_score(struct s + return score; + } + +-INDIRECT_CALLABLE_DECLARE(inet_ehashfn_t udp_ehashfn); +- + struct sock *inet_lookup_reuseport(struct net *net, struct sock *sk, + struct sk_buff *skb, int doff, + __be32 saddr, __be16 sport, +--- a/net/ipv6/inet6_hashtables.c ++++ b/net/ipv6/inet6_hashtables.c +@@ -112,8 +112,6 @@ static inline int compute_score(struct s + return score; + } + +-INDIRECT_CALLABLE_DECLARE(inet6_ehashfn_t udp6_ehashfn); +- + struct sock *inet6_lookup_reuseport(struct net *net, struct sock *sk, + struct sk_buff *skb, int doff, + const struct in6_addr *saddr, diff --git a/queue-6.4/revert-memfd-improve-userspace-warnings-for-missing-exec-related-flags.patch b/queue-6.4/revert-memfd-improve-userspace-warnings-for-missing-exec-related-flags.patch new file mode 100644 index 00000000000..8a832bd5abd --- /dev/null +++ b/queue-6.4/revert-memfd-improve-userspace-warnings-for-missing-exec-related-flags.patch @@ -0,0 +1,44 @@ +From 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0 Mon Sep 17 00:00:00 2001 +From: Andrew Morton +Date: Sat, 2 Sep 2023 15:59:31 -0700 +Subject: revert "memfd: improve userspace warnings for missing exec-related flags". + +From: Andrew Morton + +commit 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0 upstream. + +This warning is telling userspace developers to pass MFD_EXEC and +MFD_NOEXEC_SEAL to memfd_create(). Commit 434ed3350f57 ("memfd: improve +userspace warnings for missing exec-related flags") made the warning more +frequent and visible in the hope that this would accelerate the fixing of +errant userspace. + +But the overall effect is to generate far too much dmesg noise. + +Fixes: 434ed3350f57 ("memfd: improve userspace warnings for missing exec-related flags") +Reported-by: Damian Tometzki +Closes: https://lkml.kernel.org/r/ZPFzCSIgZ4QuHsSC@fedora.fritz.box +Cc: Aleksa Sarai +Cc: Christian Brauner +Cc: Daniel Verkamp +Cc: Jeff Xu +Cc: Kees Cook +Cc: Shuah Khan +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + mm/memfd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/memfd.c ++++ b/mm/memfd.c +@@ -315,7 +315,7 @@ SYSCALL_DEFINE2(memfd_create, + return -EINVAL; + + if (!(flags & (MFD_EXEC | MFD_NOEXEC_SEAL))) { +- pr_info_ratelimited( ++ pr_warn_once( + "%s[%d]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set\n", + current->comm, task_pid_nr(current)); + } diff --git a/queue-6.4/series b/queue-6.4/series index 0f9da8f95b4..b25d93c044b 100644 --- a/queue-6.4/series +++ b/queue-6.4/series @@ -721,6 +721,7 @@ usb-core-fix-oversight-in-superspeed-initialization.patch x86-sgx-break-up-long-non-preemptible-delays-in-sgx_vepc_release.patch x86-build-fix-linker-fill-bytes-quirk-incompatibility-for-ld.lld.patch perf-x86-uncore-correct-the-number-of-chas-on-emr.patch +media-ipu3-cio2-allow-ipu_bridge-to-be-a-module-again.patch loongarch-ensure-fp-simd-registers-in-the-core-dump-.patch bluetooth-msft-extended-monitor-tracking-by-address-.patch bluetooth-hci-introduce-hci_quirk_broken_le_coded.patch @@ -730,3 +731,5 @@ mm-memfd-sysctl-fix-memfd_noexec_scope_noexec_enforc.patch selftests-memfd-sysctl-fix-memfd_noexec_scope_noexec.patch memfd-do-not-eacces-old-memfd_create-users-with-vm.m.patch memfd-improve-userspace-warnings-for-missing-exec-re.patch +revert-memfd-improve-userspace-warnings-for-missing-exec-related-flags.patch +net-remove-duplicate-indirect_callable_declare-of-udp_ehashfn.patch