SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- archive_files/common/lib/modules/fglrx/build_mod/2.6.x/Makefile
  2. +++ archive_files/common/lib/modules/fglrx/build_mod/2.6.x/Makefile
  3. @@ -87,7 +87,7 @@ fglrx-cfiles    = ${fglrx-c-objs:.o=.c}
  4.  # default:: kmod_build
  5.  
  6.  kmod_build:: $(fglrx-libs) $(fglrx-cfiles) $(fglrx-hdrs) $(drm-hdrs)
  7. -   $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
  8. +   $(MAKE) -C $(KDIR) M=$(PWD) modules
  9.  
  10.  %.c:
  11.     @ln -s ../$@
  12. --- archive_files/common/lib/modules/fglrx/build_mod/drmP.h
  13. +++ archive_files/common/lib/modules/fglrx/build_mod/drmP.h
  14. @@ -218,12 +218,10 @@
  15.  #define DRM_PROC_LIMIT (PAGE_SIZE-80)
  16.  
  17.  #define DRM_PROC_PRINT(fmt, arg...)                    \
  18. -   len += sprintf(&buf[len], fmt , ##arg);             \
  19. -   if (len > DRM_PROC_LIMIT) { *eof = 1; return len - offset; }
  20. +   if ((len += sprintf(&buf[len], fmt , ##arg)) > DRM_PROC_LIMIT) { *eof = 1; return len - offset; }
  21.  
  22.  #define DRM_PROC_PRINT_RET(ret, fmt, arg...)               \
  23. -   len += sprintf(&buf[len], fmt , ##arg);             \
  24. -   if (len > DRM_PROC_LIMIT) { ret; *eof = 1; return len - offset; }
  25. +   if ((len += sprintf(&buf[len], fmt , ##arg)) > DRM_PROC_LIMIT) { ret; *eof = 1; return len - offset; }
  26.  
  27.  /*@}*/
  28.  
  29. --- archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
  30. +++ archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
  31. @@ -2741,12 +2741,12 @@ void ATI_API_CALL KCL_UnlockMemPage(void* pt)
  32.  
  33.  int ATI_API_CALL KCL_MEM_VerifyReadAccess(void* addr, kcl_size_t size)
  34.  {
  35. -    return access_ok(VERIFY_READ, addr, size) ? 0 : -EFAULT;
  36. +    return access_ok(addr, size) ? 0 : -EFAULT;
  37.  }
  38.  
  39.  int ATI_API_CALL KCL_MEM_VerifyWriteAccess(void* addr, kcl_size_t size)
  40.  {
  41. -    return access_ok(VERIFY_WRITE, addr, size) ? 0 : -EFAULT;
  42. +    return access_ok(addr, size) ? 0 : -EFAULT;
  43.  }
  44.  
  45.  /** \brief Get Init kernel PTE by address. Couldn't be used for kernel >= 2.6.25.
  46. @@ -6602,6 +6602,7 @@ void ATI_API_CALL KCL_create_uuid(void *buf)
  47.      generate_random_uuid((char *)buf);
  48.  }
  49.  
  50. +#ifndef CONFIG_X86_64
  51.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
  52.  static int KCL_fpu_save_init(struct task_struct *tsk)
  53.  {
  54. @@ -6658,6 +6659,8 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
  55.     return 1;
  56.  }
  57.  #endif
  58. +#endif
  59. +
  60.  
  61.  /** \brief Prepare for using FPU
  62.   *  \param none
  63. @@ -6666,12 +6669,7 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
  64.  void ATI_API_CALL KCL_fpu_begin(void)
  65.  {
  66.  #ifdef CONFIG_X86_64
  67. -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
  68.      kernel_fpu_begin();
  69. -#else
  70. -    preempt_disable();
  71. -    __kernel_fpu_begin();
  72. -#endif
  73.  #else
  74.  #ifdef TS_USEDFPU
  75.      struct thread_info *cur_thread = current_thread_info();
  76. @@ -6718,12 +6716,7 @@ void ATI_API_CALL KCL_fpu_begin(void)
  77.   */
  78.  void ATI_API_CALL KCL_fpu_end(void)
  79.  {
  80. -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
  81.      kernel_fpu_end();
  82. -#else
  83. -    __kernel_fpu_end();
  84. -    preempt_enable();
  85. -#endif
  86.  }
  87.  
  88.  /** Create new directory entry under "/proc/...."
  89. --- archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
  90. +++ archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
  91. @@ -668,7 +668,7 @@ extern unsigned long        KCL_SYSINFO_TimerTicksPerSecond;
  92.  #endif
  93.  
  94.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
  95. -#ifndef boot_cpu_has(X86_FEATURE_PGE)
  96. +#ifndef boot_cpu_has
  97.  #define boot_cpu_has(X86_FEATURE_PGE) test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability)
  98.  #endif
  99.  #else
  100. --- archive_files/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
  101. +++ archive_files/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
  102. @@ -228,7 +228,7 @@ void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
  103.      void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
  104.  
  105.      /* prevent stack overflow */
  106. -    if (!access_ok(VERIFY_WRITE, ret, size))
  107. +    if (!access_ok(ret, size))
  108.          return NULL;
  109.  
  110.      return (void *)ret;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top