diff -Nru fwts-16.03.00/debian/changelog fwts-16.03.00/debian/changelog --- fwts-16.03.00/debian/changelog 2018-08-10 09:06:12.000000000 +0000 +++ fwts-16.03.00/debian/changelog 2019-01-24 10:12:09.000000000 +0000 @@ -1,3 +1,11 @@ +fwts (16.03.00-0ubuntu1.3) xenial; urgency=low + + [Colin Ian King] + * efi_runtime: fix access_ok build issues on 5.0 kernels (LP: #1813059) + - add Linux 5.0 compat fix to access_ok to fix dkms build issue + + -- Colin Ian King Thu, 24 Jan 2019 09:25:11 +0000 + fwts (16.03.00-0ubuntu1.2) xenial; urgency=low * enable PM debug messages for S3 + S4 (LP: #1772563) diff -Nru fwts-16.03.00/debian/patches/0017-efi_runtime-fix-access_ok-build-issues-on-5.0-kernel.patch fwts-16.03.00/debian/patches/0017-efi_runtime-fix-access_ok-build-issues-on-5.0-kernel.patch --- fwts-16.03.00/debian/patches/0017-efi_runtime-fix-access_ok-build-issues-on-5.0-kernel.patch 1970-01-01 00:00:00.000000000 +0000 +++ fwts-16.03.00/debian/patches/0017-efi_runtime-fix-access_ok-build-issues-on-5.0-kernel.patch 2019-01-24 10:11:33.000000000 +0000 @@ -0,0 +1,70 @@ +From 94ffb91a090047ea6d058608f9c69c27db656cdb Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Thu, 24 Jan 2019 09:01:59 +0000 +Subject: [PATCH] efi_runtime: fix access_ok build issues on 5.0 kernels +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +BugLink: https://bugs.launchpad.net/bugs/1813059 + +The type argument to access_ok has been dropped in the 5.0 kernel +so add a compat shim to handle the new version. + +Signed-off-by: Colin Ian King +--- + efi_runtime/efi_runtime.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +Index: fwts-16.03.00/efi_runtime/efi_runtime.c +=================================================================== +--- fwts-16.03.00.orig/efi_runtime/efi_runtime.c ++++ fwts-16.03.00/efi_runtime/efi_runtime.c +@@ -42,6 +42,12 @@ MODULE_LICENSE("GPL"); + #define EFI_RUNTIME_ENABLED efi_enabled + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) ++#define ACCESS_OK(type, addr, size) access_ok(addr, size) ++#else ++#define ACCESS_OK(type, addr, size) access_ok(type, addr, size) ++#endif ++ + static void convert_from_efi_time(efi_time_t *eft, EFI_TIME *time) + { + memset(time, 0, sizeof(EFI_TIME)); +@@ -154,7 +160,7 @@ copy_ucs2_from_user_len(uint16_t **dst, + return 0; + } + +- if (!access_ok(VERIFY_READ, src, 1)) ++ if (!ACCESS_OK(VERIFY_READ, src, 1)) + return -EFAULT; + + buf = kmalloc(len, GFP_KERNEL); +@@ -179,7 +185,7 @@ copy_ucs2_from_user_len(uint16_t **dst, + */ + static inline int get_ucs2_strsize_from_user(uint16_t __user *src, size_t *len) + { +- if (!access_ok(VERIFY_READ, src, 1)) ++ if (!ACCESS_OK(VERIFY_READ, src, 1)) + return -EFAULT; + + *len = __ucs2_strsize(src); +@@ -205,7 +211,7 @@ static inline int copy_ucs2_from_user(ui + { + size_t len; + +- if (!access_ok(VERIFY_READ, src, 1)) ++ if (!ACCESS_OK(VERIFY_READ, src, 1)) + return -EFAULT; + + len = __ucs2_strsize(src); +@@ -227,7 +233,7 @@ copy_ucs2_to_user_len(uint16_t __user *d + if (!src) + return 0; + +- if (!access_ok(VERIFY_WRITE, dst, 1)) ++ if (!ACCESS_OK(VERIFY_WRITE, dst, 1)) + return -EFAULT; + + return copy_to_user(dst, src, len); diff -Nru fwts-16.03.00/debian/patches/series fwts-16.03.00/debian/patches/series --- fwts-16.03.00/debian/patches/series 2018-08-10 08:56:59.000000000 +0000 +++ fwts-16.03.00/debian/patches/series 2019-01-24 10:10:00.000000000 +0000 @@ -6,3 +6,4 @@ 0014-acpi-s4-force-enable-sys-power-pm_debug_messages-LP-.patch 0015-acpi-s3power-force-enable-sys-power-pm_debug_message.patch 0016-cpufreq-fix-fwts_set-paths.patch +0017-efi_runtime-fix-access_ok-build-issues-on-5.0-kernel.patch