mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-09-17 04:29:21 +00:00
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.42 Added backport to fix ipv6 breakage with the 6.12.42 release: generic/backport-6.12/621-proc-fix-missing-pde_set_flags.patch[1] All other patches automatically rebased. 1. https://lore.kernel.org/all/20250821105806.1453833-1-wangzijie1@honor.com Build system: x86/64 Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc (Intel N150) Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/19618 Signed-off-by: Robert Marko <robimarko@gmail.com>
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
From fe6b4d634c05842f00e766dcdb1511c180854036 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Mon, 22 May 2023 14:22:55 +0100
|
|
Subject: [PATCH] pps: Compatibility hack should be X86-specific
|
|
|
|
As of [1], using PPS_FETCH on a 64-bit ARM kernel with a 32-bit userland
|
|
is broken, returning a timeout. This is because the requested 4-byte
|
|
alignment for struct pps_ktime_compat (illegal on arm64) results in the
|
|
timeout flags field being uninitialised.
|
|
|
|
Make the hack specific to X86_64 builds with CONFIG_COMPAT defined.
|
|
|
|
[1] commit c2a49fe8eeef ("pps: fix padding issue with PPS_FETCH for
|
|
ioctl_compat")
|
|
|
|
See: https://github.com/raspberrypi/linux/issues/5430
|
|
Fixes: c2a49fe8eeef ("pps: fix padding issue with PPS_FETCH for ioctl_compat")
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
drivers/pps/pps.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/pps/pps.c
|
|
+++ b/drivers/pps/pps.c
|
|
@@ -254,12 +254,13 @@ static long pps_cdev_ioctl(struct file *
|
|
static long pps_cdev_compat_ioctl(struct file *file,
|
|
unsigned int cmd, unsigned long arg)
|
|
{
|
|
- struct pps_device *pps = file->private_data;
|
|
- void __user *uarg = (void __user *) arg;
|
|
|
|
cmd = _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(void *));
|
|
|
|
+#ifdef CONFIG_X86_64
|
|
if (cmd == PPS_FETCH) {
|
|
+ struct pps_device *pps = file->private_data;
|
|
+ void __user *uarg = (void __user *) arg;
|
|
struct pps_fdata_compat compat;
|
|
struct pps_fdata fdata;
|
|
int err;
|
|
@@ -296,6 +297,7 @@ static long pps_cdev_compat_ioctl(struct
|
|
return copy_to_user(uarg, &compat,
|
|
sizeof(struct pps_fdata_compat)) ? -EFAULT : 0;
|
|
}
|
|
+#endif
|
|
|
|
return pps_cdev_ioctl(file, cmd, arg);
|
|
}
|