0003-move-recent-linux-version-ifdefs-from-v6.4-to-v6.5.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From bb8bc7cf60d2c0b097c8b3b0e807f805b577a53f Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <[email protected]>
  3. Date: Mon, 3 Jul 2023 00:46:02 +0000
  4. Subject: [PATCH] Move recent Linux version #ifdefs from v6.4 to v6.5
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The latest commits, meant to fix the build on Linux 6.4, are actually
  9. fixing the build for API changes introduced in the merge window of the
  10. yet-unreleased Linux 6.5, and actually break the build for Linux 6.4.
  11. In particular, the upstream commits introducing the API changes are the
  12. following, which are *not* included in the Linux v6.4 tag:
  13. * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19c4e618a1bc3d0cad1f04c857be8076cb05bbb2
  14. * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca5e863233e8f6acd1792fd85d6bc2729a1b2c10
  15. Change to #ifdef's to v6.5, where they will most likely be included.
  16. Signed-off-by: Joan Bruguera Micó <[email protected]>
  17. ---
  18. ioctl.c | 4 ++--
  19. zc.c | 2 +-
  20. 2 files changed, 3 insertions(+), 3 deletions(-)
  21. diff --git a/ioctl.c b/ioctl.c
  22. index 4262bbd..e3eefe1 100644
  23. --- a/ioctl.c
  24. +++ b/ioctl.c
  25. @@ -1246,7 +1246,7 @@ static struct ctl_table verbosity_ctl_root[] = {
  26. {
  27. .procname = "ioctl",
  28. .mode = 0555,
  29. -#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
  30. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
  31. .child = verbosity_ctl_dir,
  32. #endif
  33. },
  34. @@ -1269,7 +1269,7 @@ static int __init init_cryptodev(void)
  35. return rc;
  36. }
  37. -#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
  38. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
  39. verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
  40. #else
  41. verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
  42. diff --git a/zc.c b/zc.c
  43. index 6637945..00e00c1 100644
  44. --- a/zc.c
  45. +++ b/zc.c
  46. @@ -80,7 +80,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
  47. ret = get_user_pages_remote(task, mm,
  48. (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
  49. pg, NULL, NULL);
  50. -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
  51. +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
  52. ret = get_user_pages_remote(mm,
  53. (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
  54. pg, NULL, NULL);