From 47a0db9b7402ffabe1f3091c5227b97c05784b1c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 17 Nov 2015 17:16:05 +0100 Subject: default to 4.3, works fine with a patch on gdb h8/300 simulator --- target/linux/patches/4.3/h8300.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 target/linux/patches/4.3/h8300.patch (limited to 'target/linux/patches/4.3/h8300.patch') diff --git a/target/linux/patches/4.3/h8300.patch b/target/linux/patches/4.3/h8300.patch new file mode 100644 index 000000000..fc45e6529 --- /dev/null +++ b/target/linux/patches/4.3/h8300.patch @@ -0,0 +1,29 @@ +diff -Nur linux-4.3.orig/include/asm-generic/uaccess.h linux-4.3/include/asm-generic/uaccess.h +--- linux-4.3.orig/include/asm-generic/uaccess.h 2015-11-02 01:05:25.000000000 +0100 ++++ linux-4.3/include/asm-generic/uaccess.h 2015-11-17 13:01:11.745876944 +0100 +@@ -163,9 +163,10 @@ + + #define put_user(x, ptr) \ + ({ \ ++ __typeof__((ptr)) __p = (ptr); \ + might_fault(); \ +- access_ok(VERIFY_WRITE, ptr, sizeof(*ptr)) ? \ +- __put_user(x, ptr) : \ ++ access_ok(VERIFY_WRITE, __p, sizeof(*__p)) ? \ ++ __put_user((x), __p) : \ + -EFAULT; \ + }) + +@@ -225,9 +226,10 @@ + + #define get_user(x, ptr) \ + ({ \ ++ __typeof__((ptr)) __p = (ptr); \ + might_fault(); \ +- access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ? \ +- __get_user(x, ptr) : \ ++ access_ok(VERIFY_READ, __p, sizeof(*__p)) ? \ ++ __get_user((x), __p) : \ + -EFAULT; \ + }) + -- cgit v1.2.3